Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHPinfo file type not known 1

Status
Not open for further replies.

Deewhyren

Programmer
Jun 16, 2005
4
AU

Hi Guys,

I have just installed (well a few days ago) Apache2 and PHP4.3.11.

Have configured apache2 and php.ini as shown from the developer website and can access localhost.

When I try to access phpinfo.php then XP asks which app would I like to open it with, if I choose php.exe then it displays phpinfo.
If I choose IE I get the line <? phpinfo(); ?>
So I think its going wrong somewhere in the link between IE and PHP but can't figure it out.

Anybody have any ideas?

Thanks

Andy.


 
Try this:

Make sure phpinfo.php is in your "document root" - usually your htdocs folder (ex. "C:/Program Files/Apache Group/Apache2/htdocs")

then add these lines to your httpd.confg file (you can just cut and past what I have below to the bottom of your httpd file.)

LoadModule php5_module php/php5apache2.dll
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir "C:\Program Files\Apache Group\Apache2\php"


IMPORTANT: make sure the path in the last line (PHPIniDir) is the path to wherever your php.ini file is.

next, be sure to restart apache (or the changes won't take effect)

then open up your browser and try accessing phpinfo.php (i.e.
hope that helps

atsea
 
Excellent Atsea.

It was the PHP.ini which I had put in the C:Windows dir, as soon as I moved it back to the webroot folder it worked.

Thanks,

Andy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top