Results 1 to 3 of 3

Thread: How to run php files?

  1. #1

    Default How to run php files?

    I followed the following page Install & Configure LAMP (Apache/MySQL/PHP) in openSUSE 11.0 | SUSE & openSUSE and installed everything except phpmyadmin, which I couldn't find in the repositories.

    My problem is earlier I was opening php files with gedit. Now after installing all the softwares I don't know which software to use to run php files with. Whenever I open the file from my web browser I get a blank screen.

  2. #2
    Join Date
    Dec 2009
    Location
    Prague
    Posts
    75

    Default Re: How to run php files?

    You can either run php5 'your php file' to see the html it'll generate, or if you want to see it in the browser, you have to run apache.

  3. #3

    Default Re: How to run php files?

    Quote Originally Posted by ISharma View Post
    I followed the following page Install & Configure LAMP (Apache/MySQL/PHP) in openSUSE 11.0 | SUSE & openSUSE and installed everything except phpmyadmin, which I couldn't find in the repositories.

    My problem is earlier I was opening php files with gedit. Now after installing all the softwares I don't know which software to use to run php files with. Whenever I open the file from my web browser I get a blank screen.
    Your browser cannot open PHP files, it needs to send a request to your installed webserver (apache in your case). The webserver then starts the php script and send the output to your webbrowser. Your webbrowser is typically listening at port 80, which is default in your webbrowser, so you don't have to point to it. You also have a root folder set in apache for your websites, so when your file has the name "myfile.php" and is lying directly in the root-folder which you have set in apache, you need to connect to "http://127.0.0.1:80/myfile.php" in your browser. You can omit the port number 80 and the http statement as they are default, so you could also type "127.0.0.1/myfile.php".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •