skip to Main Content

I have Plesk 12, and I installed another version of PHP using this guide. I switched a specific domain to use this version. So in the hosting settings, it says

PHP support (Run PHP as [FastCGI application], PHP version 5.3.1

Now, I needed to edit the php.ini file to turn on short tags (eww gross I know), but I can’t turn them on. When I run service apache2 restart it doesn’t restart FastCGI. It is installed at /usr/local/php531-cgi

ls -l

-rw-r--r-- 1 root root  1204 Mar 18 22:47 pear.conf
-rw-r--r-- 1 root root 69623 Mar 18 23:36 php.ini

I tried restarting the entire server, setting ini_set(‘short_open_tag’,true);, and the commands service php5-fpm restart / service php-fpm restart

But the results are the same, short_open_tag Off

2

Answers


  1. Chosen as BEST ANSWER

    I followed @mario's advice, and checked phpinfo(). I was using the wrong php.ini file. I was using /usr/local/php531-cgi/etc/php.ini. The one I needed to use was in /var/www/vhosts/system/[domainname.com]/php.ini

    I didnt even need to restart anything. Thanks Mario!


  2. a quick command to see which php.ini file you’re using

    php -i | grep /php.ini
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search