Page 1 of 1

PHP short_open_tag not working + php.ini wiped out from dashboard

Posted: Tue Jul 14, 2020 7:07 pm
by asheroto
Hey all!

I have many PHP script that use a short open tag "<?" instead of "<?php". I tried changing the var short_open_tag to On in the following files. Restarted apache but it didn't fix it.

Code: Select all

./etc/php/7.3/cli/php.ini
./etc/php/7.3/fpm/php.ini
./etc/php/7.3/cgi/php.ini
ALSO - I tried configuring it through the VestaCP dashboard in Server->Apache->Configure php.ini. Once I did that, it WIPED OUT the above files and replaced them with the mostly-empty one from the dashboard. Check out this weirdness...

Image

Is that a bug? I would think so because now there are no php.ini options set anywhere!!!

Thanks!

Re: PHP short_open_tag not working + php.ini wiped out from dashboard

Posted: Tue Jul 14, 2020 7:15 pm
by asheroto
UPDATE:

I restored my php.ini files from an old server. Restarting apache stilll didn't work, however, I did a full system restart and the short tags now work!

In the future, what/how do I need to restart if I change php.ini?

Re: PHP short_open_tag not working + php.ini wiped out from dashboard

Posted: Tue Jul 14, 2020 7:46 pm
by myVesta
Change /etc/php/7.3/fpm/php.ini and then restart php-fpm:

Code: Select all

service php7.3-fpm restart
... because PHP is not in Apache but in PHP-FPM.

Re: PHP short_open_tag not working + php.ini wiped out from dashboard

Posted: Tue Jul 14, 2020 7:48 pm
by asheroto
dpeca wrote: Tue Jul 14, 2020 7:46 pm Change /etc/php/7.3/fpm/php.ini and then restart php-fpm:

Code: Select all

service php7.3-fpm restart
... because PHP is not in Apache but in PHP-FPM.
Perfect, thanks so much!