FatPuzzo Posted March 28, 2010 Share Posted March 28, 2010 I've installed php (+php-fpm) 5.3.2 from ports at: centos.alt.ru. I use nginx, and when enterd my site url got <?php ...... ?> in browser. Then I logged on to ssh and tryed: # php i.php <? echo phpinfo(); ?> Ok, I tried this: # php -r 'phpinfo();'|grep USER USER => root _SERVER["USER"] => root As I see php works, it just does not compile FILES! The same system (php-fpm+nginx) works wonderfull on other server. Does anybody know, what is the problem? Thanks! Just to mention: short_open_tag=On Server is x86_64 PS: sorry for my english Quote Link to comment https://forums.phpfreaks.com/topic/196799-php-532-gives-php-files-as-plain-text/ Share on other sites More sharing options...
premiso Posted March 28, 2010 Share Posted March 28, 2010 It's not PHP's problem. It is Apache's or IIS problem (whichever server you have). You will need to add something like this to your apache httpd.conf file: LoadModule php5_module /path/to/modules/libphp5.so AddType application/x-httpd-php .php (The loadModule may already be in there, if it is you just need the addtype. So yea. Quote Link to comment https://forums.phpfreaks.com/topic/196799-php-532-gives-php-files-as-plain-text/#findComment-1033100 Share on other sites More sharing options...
FatPuzzo Posted March 28, 2010 Author Share Posted March 28, 2010 I think it's not. I'm using Nginx as http server. When I look at the header of php-page in browser I see: HTTP/1.1 200 OK Server: nginx Date: Sun, 28 Mar 2010 20:38:16 GMT Content-Type: text/html Transfer-Encoding: chunked Connection: keep-alive X-Powered-By: PHP/5.3.2 15 <? echo phpinfo(); ?> 0 As you see php is present. And as I mentioned before: php does not work from shell when parsing files. I mean: # /usr/local/bin/php i.php gives: <? echo phpinfo(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/196799-php-532-gives-php-files-as-plain-text/#findComment-1033102 Share on other sites More sharing options...
Mchl Posted March 28, 2010 Share Posted March 28, 2010 Do you have short php tags enabled? Quote Link to comment https://forums.phpfreaks.com/topic/196799-php-532-gives-php-files-as-plain-text/#findComment-1033103 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.