Hi,
I followed the following tutorial to setup php and configure apache with php:
http://www.sebastiansulinski.co.uk/tuto ... windows_xp
and as the guide suggests: created a file called: phpinfo.php in C:\webserver\htdocs with the following content:
<?php
phpinfo();
?>
but http://localhost/phpinfo.php doesn't show the php config page. It rather only shows:
<?php
phpinfo();
?>
do you know why this is?
Thanks,
parachuter2b
not showing the php page!
Moderator: General Moderators
Re: not showing the php page!
Yes, that's a sure symptom that Apache isn't configured to recognize PHP file extensions, or can't find the PHP directory on your computer. If you installed PHP and Apache independently (as contrasted with installing a package like WAMP or XAMP, that install everything at one time), you need to make (usually) 2 changes in your httpd.conf file. The file is probably in a directory named conf, under your Apache installation directory. It should contain lines like the following. If it doesn't, you will have to add them (modified according to your installation, of course).
Code: Select all
PHPIniDir "C:/Program Files/PHP/"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"-
parachuter2b
- Forum Newbie
- Posts: 9
- Joined: Thu Jun 11, 2009 12:04 pm
Re: not showing the php page!
I had those lines in the httpd.conf file, but not working
Re: not showing the php page!
And did you verify that the exact .dll filename really IS in that exact directory? And that the PHP.ini file really IS in the directory shown? If so, I'm at a loss to explain why Apache wouldn't interpret your PHP code.parachuter2b wrote:I had those lines in the httpd.conf file, but not working
-
parachuter2b
- Forum Newbie
- Posts: 9
- Joined: Thu Jun 11, 2009 12:04 pm
Re: not showing the php page!
thanks a lot ! did work! stupid mistake: i had a '#' sign before every line that I had added to httpd.conf, so guess they were all being commented out lol
Re: not showing the php page!
Glad you got it working. Yes, # means the beginning of a comment line. It happens. I wish I could forget all the stupid mistakes I've made.