shiny_spoon Posted June 7, 2009 Share Posted June 7, 2009 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! Quote Link to comment https://forums.phpfreaks.com/topic/161313-solved-php-not-parsing/ Share on other sites More sharing options...
trq Posted June 8, 2009 Share Posted June 8, 2009 Are you using complete <?php ?> tags within your scripts? Quote Link to comment https://forums.phpfreaks.com/topic/161313-solved-php-not-parsing/#findComment-851243 Share on other sites More sharing options...
shiny_spoon Posted June 8, 2009 Author Share Posted June 8, 2009 Yep. Always use long tags. I also gave short tags a try for kicks, but that wasn't it. Thanks for the reply though. Quote Link to comment https://forums.phpfreaks.com/topic/161313-solved-php-not-parsing/#findComment-851294 Share on other sites More sharing options...
shiny_spoon Posted June 8, 2009 Author Share Posted June 8, 2009 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! What a headache that was... Quote Link to comment https://forums.phpfreaks.com/topic/161313-solved-php-not-parsing/#findComment-851577 Share on other sites More sharing options...
jmas9 Posted June 25, 2009 Share Posted June 25, 2009 I just posted a new topic about this same issue. Im not sure what Im doing wrong. I get php to start with apache, but still when I try to display phpinfo, my browser tries to download the file... Quote Link to comment https://forums.phpfreaks.com/topic/161313-solved-php-not-parsing/#findComment-863527 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.