Page 1 of 1

Odd behavior of php on my work server

Posted: Fri Oct 26, 2007 2:56 am
by Sindarin
I am trying to use functions like opendir, is_dir, closedir and exec functions on my work server but none of them are working, the php file is rendered as html text. No errors/no warnings.
The admin has checked the file permissions, and I have full control, yet nothing works.
A phpinfo test shows that php is there but is there something that I'm missing? :(

Note: that the php scripts I am trying to use are tested on my server and they work.

Posted: Fri Oct 26, 2007 3:01 am
by feyd
We can't tell without seeing the code.

Posted: Fri Oct 26, 2007 3:54 am
by Sindarin
Is the same I posted on the other thread of mine:
viewtopic.php?t=75282

The problem isn't with the code as it seems.

Posted: Fri Oct 26, 2007 9:26 am
by feyd
Define what you mean by "the php file is rendered as html text"

Re: Odd behavior of php on my work server

Posted: Sat Oct 27, 2007 3:13 pm
by califdon
Sindarin wrote:I am trying to use functions like opendir, is_dir, closedir and exec functions on my work server but none of them are working, the php file is rendered as html text. No errors/no warnings.
The admin has checked the file permissions, and I have full control, yet nothing works.
A phpinfo test shows that php is there but is there something that I'm missing? :(

Note: that the php scripts I am trying to use are tested on my server and they work.
What web server is installed at work?

Posted: Mon Oct 29, 2007 7:55 am
by Sindarin
Define what you mean by "the php file is rendered as html text"
Duh, that was not smart of me. :) I meant plain text.
What web server is installed at work?
Windows Server 2003

Posted: Mon Oct 29, 2007 9:38 am
by Rovas
I think there is a problem with your configuration of the server. Check again that you have all the files needed, that they are in the right place and most important that the php extension in php.ini are activated in the right order.
I had similar problems with Win XP and IIS 5.1 and finally I installed using the installer.

Posted: Mon Oct 29, 2007 9:55 am
by feyd
As ~Rovas has said, it sounds like your server is not parsing PHP files, or rather files you assumed PHP would parse. This is an installation issue, which needs to be checked by the server administrator.