Click to See Complete Forum and Search --> : php installed?


pobrien11
03-07-2003, 07:49 PM
Hi,
I was told that php is installed on a server. I am not the server administrator, just a site developer. I have not used php before, so this may be a dumb question. My problem is when I try to view the php page, it either 1) does nothing - in IE it shows a blank page and in Netscape it shows the page source (when the file is named just .php) or 2)asks to open or save the file (when named .php3). I believe php3 is installed, not php4.

I'm just doing a simple print statement to see that it works:
<?php print "php works"; ?>

I'm putting the files in the folder for the site. The structure looks like this: root->htdocs->site_folder. The cgi-bin, cgi-src, conf, etc.. are in the root directory.

I would greatly appreciate some help. I know very little about php and don't know if I'm putting the files in the wrong folder or if it is not installed correctly. Thanks,
Patrick

matto
03-12-2003, 11:56 AM
looks as if your admin has not set the php extensions in the apache configuration file properly.

the section in httpd.conf should look like this:

#
# These types cause httpd to let the PHP interpreter handle files with
# the specified extensions.
#
<IfModule mod_php4.c>
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
</IfModule>
<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
</IfModule>
<IfModule mod_php.c>
AddType application/x-httpd-php .phtml
</IfModule>