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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem showing PHP 1

Status
Not open for further replies.

richvalve

Programmer
Mar 2, 2001
20
GB
A simple one I know, but we all have to start somewhere!

I'm using Apache, which is running fine. But I can't see my PHP pages. I put them in the htdocs folder and name them .php files, but I see nothing when I goto localhost!

I wondered if anyone had had this problem or can help.

Many thanks in advance

Rich
 
When I try to access the php info... I just get the text doc

<?php phpinfo(); ?>

Saying this

I've tried 'hello world' style php pages and this just appear as a blank page. It doesn't give me errors.
 
Have you setup Apache to execute the PHP scripts as PHP scripts and not text files? //Daniel
 
Yeah..... I think

I did this by typing this in the httpd.conf file

AddType application/x-httpd-php .phtml .php .php3 .php4
AddType aplication/x-httpd-php-source .phps

ScriptAlias /php/ &quot;c:/php/&quot;
Action application/x-httpd-php &quot;/php/php.exe&quot;
 
Since you are using Apache, you _should_ use the module version of PHP as the CGI version is known to have some problems. Read the installation instructions for installing PHP as an Apache module here: It is also available in the INSTALL file in the PHP directory. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top