Odd behavior of php on my work server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

Odd behavior of php on my work server

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

We can't tell without seeing the code.
User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Define what you mean by "the php file is rendered as html text"
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Odd behavior of php on my work server

Post 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?
User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

Post 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
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply