0

I have an issue with my CENTOS server. PHP will not parse. php -v shows that PHP 5.3 is installed.

Things I've tried:

  • Uninstalling httpd, and reinstalling it
  • uninstalling PHP and reinstalling it (php53u)
  • My http.conf contains the php directive lines required for PHP5, but it seems I have to enable these directive lines in my magento site .htaccess (1and1 related commented lines) to get any effect. When that happens, PHP files are no longer being downloaded, but the source is visible in my browser.
  • I did do a test trying to use an existing domain and point it to the new sites root directory, but the issue persists
  • I've looked around the internet for the answer and on Stack Overflow, my problem seems to be different than other users, because my original sites still work. The only sites I have a problem with are new sites.

Other things I've noticed:

  • Magento sites on the server are still running fine. If I create a new subdomain site, I get the same PHP will not parse error.

  • The existing sites DO NOT have the .htaccess php5/1and1 directive lines uncommented.

  • I did originally have an INNODB issue today on the server. I ended up having to rebuild some sites. The site with the rebuilt database is fine.

What could be the reason as to why existing sites work, even after uninstall and reinstall of php/apache, but new sites don't seem to be configured correctly on setup?

UPDATE:

New Things I've tried:

  • renamed /etc/php.ini. Original sites still work. New sites still show source. I guess this means that I have 2 php.ini files on the server somehow. After checking, I can only find one.

  • Enabling short tags in PHP

Other relevant information:

The server is currently at PHP 5.1.6. My sites that worked now correctly show a PHP version error message (Magento sites need 5.2+). The new sites are still not working. I'm also using Plesk.

Community
  • 1
  • 1
ShaunTheSheep
  • 271
  • 1
  • 10
  • 26
  • This issue is relating to NEW sites defined on a VPS. The old sites work fine. I am trying to understand what part of the subdomain setup via plesk is failing to allow the setup of PHP....setting up of new sites/subdomains is not hard, and ive never had an issue before. But all old sites still work....even after reinstalling PHP/APACHE. strange. – ShaunTheSheep Dec 12 '13 at 09:29
  • Try to get to know which php.ini it uses using php -i or phpinfo() – Daniel W. Dec 12 '13 at 10:32
  • It is possible to disable PHP in some directories . You might want to have a look at `/etc/httpd.conf` . Find if any directives in this file or any `.htaccess` files are doing this . This link might be helpful : [http://stackoverflow.com/questions/1271899/disable-php-in-directory-including-all-sub-directories-with-htaccess](http://stackoverflow.com/questions/1271899/disable-php-in-directory-including-all-sub-directories-with-htaccess) – Uours Dec 12 '13 at 12:11
  • I have the same issue, but I really don't know how I can solve this! – Marcos Bergamo Jun 18 '15 at 02:17

0 Answers0