PDA

View Full Version : php problems


eudora
06-10-2003, 20:10
i helping a fren with his site
then i realise the site somehow dun seem to load php files properly
ie when i type in the IE the browser prompts me to dl the php file instead of displaying it
i believe there is an option for this
can someone tell me?
i got round the problem by putting a .htaccess file with some commands to force php files i think cannot remember the codes offhand

userguy
06-10-2003, 20:15
I think that shows that the server is running his php files does not support php or that he have not install php support on his server yet. Does it occur for everybody who visits his site or just for you only?

alien
06-10-2003, 20:22
<Files filename>
ForceType application/x-httpd-php
</Files>

eudora
06-10-2003, 20:25
Originally posted by alien
<Files filename>
ForceType application/x-httpd-php
</Files>

yes that is the one

i think there is something to activate it or something

eudora
06-10-2003, 20:28
Originally posted by userguy
I think that shows that the server is running his php files does not support php or that he have not install php support on his server yet. Does it occur for everybody who visits his site or just for you only?

i believe that occurs to everyone... who visits his site

michaelfoo
06-10-2003, 20:44
Hi eudora,
Please try the code provided by Alien and let us know the result. It seems more to the server is unable to support PHP to me, as I faced such problem before on a system that does not support PHP. I'm not very sure about yours.

userguy
06-10-2003, 20:45
Originally posted by eudora
i believe that occurs to everyone... who visits his site
Does he have PHP installed correctly installed on his server? This problem usually occurs when PHP is not installed on the server correctly :) Either check the php.ini file or re-install the php files...

eudora
06-10-2003, 21:54
Originally posted by michaelfoo
Hi eudora,
Please try the code provided by Alien and let us know the result. It seems more to the server is unable to support PHP to me, as I faced such problem before on a system that does not support PHP. I'm not very sure about yours.

i used the same codes on the htaccess file and the directory is able to load php files properly..

eudora
06-10-2003, 21:55
Originally posted by userguy
Does he have PHP installed correctly installed on his server? This problem usually occurs when PHP is not installed on the server correctly :) Either check the php.ini file or re-install the php files...

is it go phpmyadmin to check?

alien
06-10-2003, 21:59
You might also wanna check your httpd.conf for the MIME types.

userguy
06-10-2003, 22:05
Originally posted by eudora
is it go phpmyadmin to check?
Does he have root access to the server? Anyway, try using a phpinfo script to check if the php files are there in the first place.

alien
06-10-2003, 22:45
phpinfo script


<?php
phpinfo();
?>

eudora
06-10-2003, 22:45
Originally posted by alien
You might also wanna check your httpd.conf for the MIME types.

hmmz.. i dun see anything in MIME
but i got a group call php which is on with extensions
.php3
.php
.phps

eudora
06-10-2003, 22:47
ok i got the phpinfo file
now what are the things i shld look for?

userguy
06-10-2003, 22:51
Look under the php section and make sure all the php-related stuff are installed and working properly. Anyway, is it his own server or is it a shared/dedicated server?

eudora
06-10-2003, 23:07
http://relaklah.com/phpinfo.php

he is on shared server like me with DH
i believe it is more of a setting problem then anything else..

userguy
06-10-2003, 23:11
Yeah...I looked through the phpinfo.php file. Nothing seems to be wrong with it. It might be a problem with DH since the hacking incident. You may want to check with the other DH clients to see if they are experiencing the similar problem before getting back to us :)

eudora
06-10-2003, 23:19
hmmz i dun have such problems though.. ok i will check out more
thanks

userguy
06-10-2003, 23:33
Maybe both of you are on different servers? As far as I know, only a few of their servers are affected in that incident. Anyway, if it still doesn't work, keep us updated on the situation :)

alien
06-10-2003, 23:49
In the httpd.conf, check for "ScriptAlias ", "AddType", "Action", etc.

For example, the "AddType", it should have something like "AddType application/x-httpd-php .php".

Or ask your server admin..

userguy
07-10-2003, 00:05
Since alien talked about the httpd.conf, I might as well list down what to check in the configuration file.
- AddType application/x-httpd-php .php .php4 .phtml
- Action application/x-httpd-php /php4/php.exe
- ScriptAlias /php4/ "c:/php4/"
Anyway, was the phpinfo.php file on his site or was that on your site? If you're able to load that file, there should be no big problem with the php files or did it forced it to load through .htaccess?