Troubleshooting PHP on Linux
Moderator: General Moderators
Troubleshooting PHP on Linux
Hi all,
I'm new to both Linux and PHP. I've got RHL Enterprise Server 3 and am running Apache 2.0.
I believe that PHP is installed by default and have found a 'PHP' file that, once run, then appears in the ps -A list (therefore, I'm assuming this is the actual PHP process/service)
I run this, but my simple test PHP pages don't seem to show the PHP code as I expect - eg, I've run the 'Chicken Man' test but the actual PHP text doesn't appear.
I'm sorry if I haven't provided much info but like I said, I'm completely new to both these topics.
Any help would be greatly appreciated.
Cheers,
IM
I'm new to both Linux and PHP. I've got RHL Enterprise Server 3 and am running Apache 2.0.
I believe that PHP is installed by default and have found a 'PHP' file that, once run, then appears in the ps -A list (therefore, I'm assuming this is the actual PHP process/service)
I run this, but my simple test PHP pages don't seem to show the PHP code as I expect - eg, I've run the 'Chicken Man' test but the actual PHP text doesn't appear.
I'm sorry if I haven't provided much info but like I said, I'm completely new to both these topics.
Any help would be greatly appreciated.
Cheers,
IM
Heh heh,
I thought I'd covered that in saying "the actual PHP text doesn't appear"
Basically, I've used the Chicken Man test whereby you put in some PHP into some HTML. The PHP formatted text says "I am the CHICKEN MAN" but this piece of text does not show up. The HTML text shows up fine.
I freely accept any criticism or insult - like I say, I'm totally new to both topics and whilst I have tried to read around the subject using the likes of Google and Steve Shah's Linux Administration Beginner's Guide - I'm still quite clueless.
That said, I consider myself to be reasonably technically literate.
So ladies and gentlemen, send the comments/insults/advice/whatever else this way.
Cheers,
IM
I thought I'd covered that in saying "the actual PHP text doesn't appear"
Basically, I've used the Chicken Man test whereby you put in some PHP into some HTML. The PHP formatted text says "I am the CHICKEN MAN" but this piece of text does not show up. The HTML text shows up fine.
I freely accept any criticism or insult - like I say, I'm totally new to both topics and whilst I have tried to read around the subject using the likes of Google and Steve Shah's Linux Administration Beginner's Guide - I'm still quite clueless.
That said, I consider myself to be reasonably technically literate.
So ladies and gentlemen, send the comments/insults/advice/whatever else this way.
Cheers,
IM
Create a simple test, called test.php , with only this code in it...
What does that do/show ?
Code: Select all
<?php phpinfo() ?>Hi again,
First of all, I felt this has to do with Linux because I think I'm failing in the actual implementation of PHP on Linux - I don't feel it's an issue with any PHP code.
Mark,
Using the test.php file, literally nothing appears in the browser. The PHP file doesn't appear to have a file association but I don't know if this is the way it should be or not.
Again, any assistance would be appreciated - I'm still reading around the subject and will post anything useful I find.
Cheers,
IM
First of all, I felt this has to do with Linux because I think I'm failing in the actual implementation of PHP on Linux - I don't feel it's an issue with any PHP code.
Mark,
Using the test.php file, literally nothing appears in the browser. The PHP file doesn't appear to have a file association but I don't know if this is the way it should be or not.
Again, any assistance would be appreciated - I'm still reading around the subject and will post anything useful I find.
Cheers,
IM
It's fine where it is Pyrite. Why, becuase by virtue of the fact that he started this from a command line (or at least it sounds like it), then saw it running using ps, there is no amout of echo($var), php_info() voodo that's going to stop it.Pyrite wrote: What does this have to do with Linux? Somebody move this to the PHP Code forum.
ianmurphy:
Getting down to business, it sounds like you ran this from a command line. If there are no arguments passed to it (like a file for example), it will just sit there normally. That's been my experience at least.
So to get rid of it, type in ...
Code: Select all
killall phpTo see the output of php files through your browser, you need to make sure that apache is running. Trying typing in ...
Code: Select all
service httpd statusCheers,
BDKR