dmclambjr Posted February 12, 2008 Share Posted February 12, 2008 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 Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted February 12, 2008 Share Posted February 12, 2008 Show us one of the sample scripts you are using to get the quickest solution. Quote Link to comment Share on other sites More sharing options...
dmclambjr Posted February 12, 2008 Author Share Posted February 12, 2008 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 Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted February 12, 2008 Share Posted February 12, 2008 Those scripts use the lazy-way short open php tags - <? This results in non-portable code that might or might not work on any particular php configuration. Always use full open php tags - <?php to insure that they will be seen on any server configuration. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted February 12, 2008 Share Posted February 12, 2008 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) Quote Link to comment Share on other sites More sharing options...
dmclambjr Posted February 12, 2008 Author Share Posted February 12, 2008 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.