Forums

×

Warning

JUser: :_load: Unable to load user with ID: 194441
Medium
Offline
Resolved
0 votes
Good day!

I need set up short_open_tag = on in php.ini. I selected php 5.6. I executed phpinfo command in php code. Configuration File (php.ini) Path /etc/opt/rh/rh-php56. I Went in this file and changed short_open_tag=On. Than executed phpinfo command once more time. But nothing changed. I saw that short_open_tag Off Off in output. I went to the /etc/php.ini file and made changes there. Than executed phpinfo command once more time. But nothing changed again. I restarted server. Nothing changed.

[root@clearosdev ~]# php -i |grep 'Configuration File'
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
[root@clearosdev ~]#


Why in phpinfo output i see short_open_tag Off Off ? Where i must to change this?
Friday, September 14 2018, 09:47 AM
Share this post:
Responses (5)
  • Accepted Answer

    Friday, September 14 2018, 11:58 AM - #Permalink
    Resolved
    0 votes
    You haven't changed your user environment to specifically use the php version from SCL.

    I believe the proper way to do this is, for example:


    php -v
    source /opt/rh/rh-php56/enable
    php -v


    The first will report the default 5.4 version, the second will show that the default has changed to 5.6.

    B.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, September 14 2018, 01:17 PM - #Permalink
    Resolved
    0 votes
    I did it. Nothing changed in phpinfo() output.

    php -v
    source /opt/rh/rh-php56/enable
    php -v


    [root@clearosdev htdocs]# php -v
    PHP 5.6.25 (cli) (built: Oct 21 2016 18:00:07)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    [root@clearosdev htdocs]# php -i | grep short_open_tag
    short_open_tag => On => On


    But when i open page <?php phpinfo(); ?> i see that short_open_tag Off Off

    And my site say short_open_tag value must be turned on in you php.ini or .htaccess file.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, September 17 2018, 01:10 PM - #Permalink
    Resolved
    0 votes
    But when i open page <?php phpinfo(); ?> i see that short_open_tag Off Off


    Are you executing that script in Webconfig or the Apache engine? They are two *separate* Apache engines. The php.ini file for Webconfig is in /var/clearos/sandbox/etc/.

    B.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 18 2018, 12:14 PM - #Permalink
    Resolved
    0 votes
    Ben Chambers wrote:

    But when i open page <?php phpinfo(); ?> i see that short_open_tag Off Off


    Are you executing that script in Webconfig or the Apache engine? They are two *separate* Apache engines. The php.ini file for Webconfig is in /var/clearos/sandbox/etc/.

    B.


    I think i executing that script in Apache engine from /var/www/html by 80 port.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 18 2018, 03:25 PM - #Permalink
    Resolved
    0 votes
    I think i executing that script in Apache engine from /var/www/html by 80 port.


    Then it all depends on what PHP version (from app-php-engines) you're using. Eg:


    /etc/opt/rh/rh-php56/php.ini
    /etc/opt/rh/rh-php70/php.ini
    /etc/opt/rh/rh-php71/php.ini
    The reply is currently minimized Show
Your Reply