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

Post Reply
asheroto
Posts: 3
Joined: Tue Jul 14, 2020 7:02 pm

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!
asheroto
Posts: 3
Joined: Tue Jul 14, 2020 7:02 pm

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?
User avatar
myVesta
Site Admin
Posts: 972
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

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.
asheroto
Posts: 3
Joined: Tue Jul 14, 2020 7:02 pm

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!
Post Reply