• Resolved jintsai

    (@jintsai)


    Hi, we are using the plugin Custom PHP Settings. We input max_execution_time=300, but the value doesn’t change. Below is a screenshot for your reference: https://ibb.co/jzG94K7

    Can you kindly help us and why is the value not changed? Thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author cyclonecode

    (@cyclonecode)

    Hello

    Can you verify that you .htaccess file is being updated as it should e.g you should have a section in this file looking something like this:

    # BEGIN CUSTOM PHP SETTINGS
    php_value max_execution_time 300
    # END CUSTOM PHP SETTINGS

    Looking on you screenshot it seems like the changes doesn’t take effect. Perhaps you have some other override for max_execution_time for instance in you wp-config.php file?

    The max_execution_time can be changed by doing

    set_time_limit(-1);

    So I am thinking perhaps that this is done in you wp-config.php file or perhaps by some other plugin?

    Thread Starter jintsai

    (@jintsai)

    Hi, we didn’t see the #Begin custom Php Setting: https://ibb.co/K7LppSR. At the same time, we don’t see any code related to max_execution_time or set_time_limit(-1) in wp-config.php.

    Can you kindly let us how do we find out and replace the setting of the max_execution_time or set_time_limit(-1) ? Many thanks!

    Plugin Author cyclonecode

    (@cyclonecode)

    When you click “Save settings” in the editor do you get a notification box at the top of the page with a message like “Settings updated and stored in /usr/local/var/www/wp/.htaccess.”?

    It would also be good if you could tell me which version of Custom PHP Settings you are currently using and also copy the information from the status page located at:

    wp-admin/tools.php?page=custom-php-settings&tab=status

    Thread Starter jintsai

    (@jintsai)

    Hi, after clicking “save setting”, I don’t have any notification on the top.

    The version of the custom PHP setting is 1.4.1

    The status is below:

    {
        "notes": {
            "review": {
                "id": 1,
                "weight": 1,
                "persistent": false,
                "time": 1623014957,
                "type": "info",
                "name": "review",
                "callback": "addReviewNotice",
                "dismissed": true,
                "dismissible": true
            },
            "support": {
                "id": 2,
                "weight": 2,
                "persistent": true,
                "time": 1623014960,
                "type": "warning",
                "name": "support",
                "callback": "addSupportNotice",
                "dismissed": true,
                "dismissible": false
            }
        },
        "php_settings": [
            "max_execution_time=300"
        ],
        "restore_config": true,
        "trim_comments": true,
        "trim_whitespaces": true,
        "update_config": null,
        "version": "1.4.1"
    }
    
    === PHP ===
    System name = Linux teemo.dhn.cl 3.10.0-962.3.2.lve1.5.25.6.el7.x86_64 #1 SMP Thu Apr 18 06:40:26 EDT 2019 x86_64
    Architecture = x64
    PHP Version = 7.4.19
    Debug build = no
    Zend Engine version = 3.4.0
    Server Api = cgi-fcgi
    Configuration File (php.ini) Path = /opt/cpanel/ea-php74/root/etc
    Extension directory = /opt/cpanel/ea-php74/root/usr/lib64/php/modules
    Loaded configuration file = /opt/cpanel/ea-php74/root/etc/php.ini
    Additional configuration files = /opt/cpanel/ea-php74/root/etc/php.d/01-ioncube.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-bcmath.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-calendar.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-ctype.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-curl.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-dom.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-exif.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-fileinfo.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-ftp.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-gd.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-iconv.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-imap.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-intl.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-json.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-mbstring.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-mysqlnd.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-pdo.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-phar.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-posix.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-simplexml.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-soap.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-sockets.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-sqlite3.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-tokenizer.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-xml.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-xmlwriter.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-xsl.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/20-zip.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/30-mysqli.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/30-pdo_mysql.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/30-pdo_sqlite.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/30-xmlreader.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/30-xmlrpc.ini,
    /opt/cpanel/ea-php74/root/etc/php.d/zzzzzzz-pecl.ini
    
    Include path = .:/opt/cpanel/ea-php74/root/usr/share/pear
    User INI file = .user.ini
    User INI file cache TTL = 300
    Thread Safety = disabled
    IPv6 Support = enabled
    PHP Streams = https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
    Stream Socket Transports = tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
    Stream Filters = zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*
    GC enabled = enabled
    
    === WordPress ===
    Version = 5.7.2
    Multisite = no
    Site address = https://ecatalog.aimvast.com
    Debug mode = no
    Memory limit = 40M
    Cron = yes
    Language = en_US
    
    === Configuration File ===
    Path = /home/aimvastc/public_html/ecatalog/.user.ini
    Readable = yes
    Writeable = yes
    Plugin Author cyclonecode

    (@cyclonecode)

    Check if this file is updated:

    /home/aimvastc/public_html/ecatalog/.user.ini

    You can also try to ask your hosting provider if you are allowed to override PHP ini directives.

    You could also try to just add a set_time_limit(300); in you wp-config.php and see if this has any effect.

    Thread Starter jintsai

    (@jintsai)

    Hi, Yes, the file of /home/aimvastc/public_html/ecatalog/.user.ini is updated: https://ibb.co/ydgtk9g

    But the setting from Current PHP Settings is still showing -1.

    Plugin Author cyclonecode

    (@cyclonecode)

    Try adding some other setting like memory_limit=128M or similar and see if this works. If you add some other setting and it works as it should, then most probably the max_execution_time is set to (-1) somewhere else, perhaps in another plugin?
    Also, the -1 means that there is not limit for the execution time at all.

    You can also join my slack channel and I might be able to help you more with this:
    slack

    Plugin Author cyclonecode

    (@cyclonecode)

    It turned out that this issue was related to a bug in another plugin which always set max_execution_time to -1.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘max_execution_time = -1’ is closed to new replies.