Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I've Apache 1.3x installed on Rh 7.1, with php4 as a module. Now cgi perl and cgi python is working fine and normal html browsing. But when I tried to view a dynamic php page Netscape returns the raw page:
<html>
<body>
<?echo "hello";?>
</body>
</html>
I've chmod the index.php file to readable and executable, but to no effect.
Based on theat apache config file it appears ok. I played with the one here at work, I removed the Addtype directive restarted it and then it didn't do any of the PHP code, but did do HTML. Then I removed the modules from the config and again it just didn't execute any PHP code, but returned HTML.
I think maybe it's a problem with the file itself like maybe corrupt in ftp or something? maybe make a fresh file and try that? Or try a regular HTML file first. If PHP wasn't installed right you'd still have HTML ok, and you wouldn't see the tags.
The browser is getting a file from the server. The browser seems to have trouble reading the file, a file problem may also explain why the php code was never executed and is therefore returned as is, not as html. Permission problems wouldn't let you even access the file so I don't think thats it. And php code errors would just be an error returned.
Apache runs just fine. I used the rpm to install php4 but cannot get any parsed php out of from the server.
All indications point to php4 and apache running OK. The php.ini file is in the right place, all the entries for php and perl are in the httpd.conf file.
No clue what could be happening.
I tried commenting the <IfDefine HAVE_PHP4> lines on the apache config file but it had no effect.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.