Yesterday PHP worked just fine and today it wants to serve up the php code.
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yesterday PHP worked just fine and today it wants to serve up the php code.
I'm using Slackware 12 and Apache. Yesterday everything was working fine. It was just happy serving up php webpages and today it wants to serve up the source code to some browsers and others it wants to let the download the php file. I cannot figure out what's changed from yesterday to today. Nothing in the logs, no resets nothing. Even tried copying my backed up httpd.conf file and resetting my webserver this morning and still wants to do the same thing.
Any suggestions on how to get this back to normal?
Maybe the package responsable of php is now broken.
Quote:
Originally Posted by orsty9001
I'm using Slackware 12 and Apache. Yesterday everything was working fine. It was just happy serving up php webpages and today it wants to serve up the source code to some browsers and others it wants to let the download the php file. I cannot figure out what's changed from yesterday to today. Nothing in the logs, no resets nothing. Even tried copying my backed up httpd.conf file and resetting my webserver this morning and still wants to do the same thing.
Any suggestions on how to get this back to normal?
Not sure if it's the server. I have experienced this with firefox on ubuntu and some sites (like LQ).
It might be conditions on the network (in my case the isp / internet) and happens when my internet experience is 'slow'. Wait a few hours and it's OK again.
Not sure if it's the server. I have experienced this with firefox on ubuntu and some sites (like LQ).
It might be conditions on the network (in my case the isp / internet) and happens when my internet experience is 'slow'. Wait a few hours and it's OK again.
I let it sit over night and still the same thing this morning. I'm going to try later to reinstall PHP.
It has to be the server, without question. The client system only sees what is shipped to it, and the server should not be shipping the raw PHP code.
If this is a sudden change for no apparent reason, that suggests that perhaps a file has become corrupted. Before reinstalling PHP (which probably is a good choice), I think you might want to run fsck on the affected hard drive/partition.
It has to be the server, without question. The client system only sees what is shipped to it, and the server should not be shipping the raw PHP code.
If this is a sudden change for no apparent reason, that suggests that perhaps a file has become corrupted. Before reinstalling PHP (which probably is a good choice), I think you might want to run fsck on the affected hard drive/partition.
Drive looks good, no errors. It's like Apache isn't sending the code to the PHP engine to be compiled.
I reinstalled php and upgraded Apache, still doing the same thing. I've found where this has happened a couple of other times on google in other forums. It's really got me stuck.
I had the same problem appear, but it was on a server that hosts my website and my solution was to contact the hosting company and make them fix it. It happened as part of a major upgrade they were doing to the server, and IIRC they told me that putting a php.ini file in the root of my website solved the problem.
I have never experienced it on the servers I own, hence have never had to figure it out myself, and thus don't know the solution.
What happens when you try to invoke one of your pages from the command line? eg: php mypage.php
If you have command line PHP installed, you should get an html stream back. If you don't, this might be a clue for you.
This problem is due in part to Apache not loading the php module correctly and thus does not know how to handle php request. Look through your httpd.conf file for the following three statements. I know you said that nothing has changed but I would still ensure that they are there. Also try a reboot on the server. This has helped me before when I had the same problem.
When I invoke it from the command line it processes the PHP code. It produces the html that should be sent to the browser which makes me suspect apache.
Also jstephens84, those lines are in httpd.conf. That was the first thing I checked.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.