Saint2054 Posted February 17, 2008 Share Posted February 17, 2008 Hello, I've installed PHP 5.2.5 manually onto my Win XP Prof SP2 computer. I turned off the firewall, am running the server from a college (unfortunately), and have Apache 2.2.8. I am now in the midst of trying to figure out why PHP is not showing up on my page. I unzipped php to: "f:\php" and changed the php.ini-recommended to php.ini and adjusted the code for doc_root to be: "F:\Apache\htdocs\". I installed Apache obviously to F:\Apache In any case, I altered the PATH in environmental variables to include ";F:\php". When I edited the httpd.config I added the following lines: # At the end of the loadmodule list... LoadModule php5_module "F:/php/php5apache2_2.dll" # After the AddType application/x-gzip .gz .tgz.. AddType application/x-httpd-php .php # And at the very end of the httpd.conf PHPIniDir "F:/php" #Also tried it as "F:/php/" Can anyone give me any hints as to what I've done wrong/need to add? :'( Quote Link to comment https://forums.phpfreaks.com/topic/91585-problems-with-installing/ Share on other sites More sharing options...
wildteen88 Posted February 17, 2008 Share Posted February 17, 2008 What is the script you are trying to run? Make sure you are not using shorthand tags (<? ?> or <?= ?>) for your PHP scripts. If your script is quite large then enable a setting called short_open_tag within the php.ini Your Apache configuration appears to be fine. Quote Link to comment https://forums.phpfreaks.com/topic/91585-problems-with-installing/#findComment-469125 Share on other sites More sharing options...
Saint2054 Posted February 17, 2008 Author Share Posted February 17, 2008 Secondly, my apache manager is catching the fact that I have PHP installed, since it has the following message at the bottom of the window: Apache/2.2.8 (Win32) PHP/5.2.5 Wild, I am basically just running the phpInfo() Quote Link to comment https://forums.phpfreaks.com/topic/91585-problems-with-installing/#findComment-469203 Share on other sites More sharing options...
Saint2054 Posted February 18, 2008 Author Share Posted February 18, 2008 And I made sure not to use shorthand as well as an additional point. Quote Link to comment https://forums.phpfreaks.com/topic/91585-problems-with-installing/#findComment-469281 Share on other sites More sharing options...
wildteen88 Posted February 18, 2008 Share Posted February 18, 2008 Seems strange. PHP is loaded as an Apache as. Enable the following settings within the php: display_errors (and ensure error_reporting is set to E_ALL) display_startup_errors Save the php.ini and restart Apache. Is there any errors reported during startup, or when running your script. Also note you don't need to set the doc_root within your php.ini. Quote Link to comment https://forums.phpfreaks.com/topic/91585-problems-with-installing/#findComment-469818 Share on other sites More sharing options...
Saint2054 Posted February 20, 2008 Author Share Posted February 20, 2008 [Tue Feb 19 23:50:05 2008] [error] [client ---] File does not exist: F:/Apache/htdocs/favicon.ico That is the only error I picked up when I connected to the page and I found that in my Apache errors log. When I set display_errors and display_startup_errors to E_ALL. The error_log for my php.ini are all ; out and I'm not sure how to intialize it properly, but I tried making it output to my php folder, didn't seem to work though. Changed the doc_root to blank. Lastly, my page I'm testing it out on is an HTML. I have the <php? phpinfo() ?> inside the body of the page, but that should work right? Quote Link to comment https://forums.phpfreaks.com/topic/91585-problems-with-installing/#findComment-471345 Share on other sites More sharing options...
wildteen88 Posted February 20, 2008 Share Posted February 20, 2008 Lastly, my page I'm testing it out on is an HTML. I have the <php? phpinfo() ?> inside the body of the page, but that should work right? By that do you mean you have your PHP code within an HTML file (.html). If so then no it wont work. You should save your PHP code within a .php file in order for the PHP code to execute. HTML code can go inside .php files, eg: <html> <head> <title>PHPInfo</title> </head> <body> <?php phpinfo (); ?> </body> </html> If you want to parse .html files as PHP you can do so by appending .html to the following line within the httpd.conf: AddType application/x-httpd-php .php Example: AddType application/x-httpd-php .php .html Quote Link to comment https://forums.phpfreaks.com/topic/91585-problems-with-installing/#findComment-471965 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.