Jump to content

[SOLVED] PHP not parsing


Recommended Posts

Hey everyone,

 

I've been Googling my face off all day trying to resolve this, but I simply haven't been able to figure it out.

 

I've got a Linux based Apache 2.2/PHP 5 server running. The thing simply will not parse anything. It just spits everything out in plain text or sends PHP files as downloads depending on how I configure it.

 

httpd.conf has the following lines in it:

LoadModule php5_module /etc/httpd/modules/libphp5.so

# *.php
<FilesMatch \.php$>
   SetHandler application/x-httpd-php
</FilesMatch>
# *.phps
<FilesMatch "\.phps$">
   SetHandler application/x-httpd-php-source
</FilesMatch>

 

This currently gives me the source code directly in the browser. Essentially the same thing I'd see if I were to open a PHP file in a text editor.

 

I've also tried it with:

AddType application/x-httpd-php .php

 

Doing that sends the file to the browser as a download. If I actually save and open it (it's named <random stuff>.part), it contains the source code, once again.

 

It's almost like the PHP module isn't being loaded at all. The problem with that theory is that Apache isn't reporting any errors on start-up. I'm beginning to think it's got something to do with permissions. I set the root web directories permissions to 777 though, so I don't know what's going on.

 

Any advice would be greatly appreciated!

Link to comment
Share on other sites

I'm not entirely sure how, but I managed to get it up and running this morning.

 

I re-installed PHP and re-created my whole server directory structure manually checking all the permissions.

 

Seems alright now! ;D What a headache that was...

Link to comment
Share on other sites

  • 3 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.