Jump to content

IS php working?


Recommended Posts

I have installed php version 5.1.4 and apache 2.0.58. After the installation, the book I was following said to create a phpinfo page. Which I did, and put into the correct directory for apache. When I open that phpinfo.php page, I get a page that list all sorts of various information about php. So, I thought php was up and running and working fine. No matter what examples of php scripts I copy and pace from the net. When I open them in I.E. I don’t get anything. Nothing on my screen, no error messages or anything. So, it comes down to this… is php working?? cause I am getting a little confused now.

duffie

Link to comment
Share on other sites

Here are two links, that I copied and placed into the websever with a .php extension

 

http://www.php-scripts.com/php_diary/example2.phps

 

http://www.php-scripts.com/php_diary/example3.phps

 

I did notice that in the example he was missing <?php at the beginning, to make sure it wasn’t a conflict with my version of PHP I tried adding it. I still don’t get anything different.  But I do get the html portion listed in the top of I.E., but I dont get anything eles.

 

Thanks again for your assistance.

duffie

Link to comment
Share on other sites

Also can you define what you mean by:

When I open them in I.E. I don’t get anything.

How are you opening the file in IE? Make sure you are going to http://localhost/ in order to run your .php files. You cannot run them by going to File > Open or Right click > Open With... > IE to run them. Web browsers do not understand PHP.

 

Also ensure you are saving your .PHP files with a .php file extension and not .php.txt. By default Windows will hide file extensions when browsing files in Windows Explorer. I would recommend you to disable a setting called Hide extension for know file types by going to Tools > Folder Options > View Tab within any open directory.

 

Another note is all .php files must be saved in Apaches document root, Default will be C:/program files/Apache foundation/Apache2/htdocs (depending on version you have installed)

Link to comment
Share on other sites

Hey thanks for the advice, I was looking in the forum and read about Wamp, So I removed everything and installed wamp. Everything is up and running and my php pages look good. The wamp install, and setup time for me to use php mysql generator was approx. 45min and now I am done! Thanks again.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.