Web Hosting Talk







View Full Version : how do u execute php files?


matt2kjones
07-25-2002, 04:05 PM
ok i have installed the following

apache 1.3.26
php 4.2.2
mysql v.xxx

ok, with all these installed this is where i am stuck. I have read the manual for php, and looked at apache documentation.

when i go to a .php page with apache, i just get the code, as if php wasn't installed

what do i do to apache to make them execute?

thanx

davidb
07-25-2002, 04:23 PM
Without seening any httpd code, I will assume that you have not added the addhandlers to apche to tell it to execute .php files as php. Why not show some code.

matt2kjones
07-25-2002, 04:39 PM
i havent added anything to the config file as i thought that maybe when you installed php it configured apache automatically.

what do i have to add the to config file.

i would copy and paste it, but its a bit big

davidb
07-25-2002, 04:42 PM
That should be listed in the install file, what to add.

Shyne
07-25-2002, 06:18 PM
matt, you can't be going around unix forums and wht and post the same questions over and over. People have told you that the answer is right in the INSTALL file. They even tell you what to put inside the httpd.conf file. There are millions of great tutorials about basic server installations.

jahsh
07-29-2002, 07:01 PM
add this to httpd.conf
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php

then restart apache:
/etc/rc.d/init.d/httpd restart
:stickout

bombino
07-29-2002, 10:16 PM
Whenever installing any sort of package, you should definately read any and all files named README, INSTALL, HOWTO, or the like. The skill of knowing how to find information is the most valuable skill you can acquire for this business.

x222943
07-29-2002, 11:13 PM
Originally posted by jahsh
add this to httpd.conf
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php

then restart apache:
/etc/rc.d/init.d/httpd restart
:stickout


or, simply


AddType application/x-httpd-php .php .php3 .php4 .phtml