Skip to main content

PHP settings not changing

Comments

8 comments

  • cPanelMichael
    Hello :) Check to see if an individual php.ini file is uploaded to the account, as local php.ini files are supported with suPHP. You could also open the phpinfo file and review the path utilized for the php.ini file to determine which one is in-use. Thank you.
    0
  • nitdna
    Yeah, have checked that, it does not matter if a local php.ini file is present in an account's public_html folder or if there isn't and the system php.ini file is being used. The path of the php.ini file gets updated in the phpinfo, but no other setting changes. So, if no file in account, phpinfo displays the loaded configuration file as: /usr/local/lib/php.ini. or, if present, it displays the loaded configuration file as the php.ini file in the account. But, it does not actually read or get the settings from the php.ini file. The attributes for the settings do not change regardless of what is set in the php.ini file specified.
    0
  • whr
    We often forget the basic things.. Did you restart Apache? Can you post the output of: php -i | grep 'post_max_size\|upload_max_filesize' If it displays correctly, most probably Apache was not restarted or it failed to restart gracefully.
    0
  • cPanelMichael
    Hello :) Feel free to open a support ticket using the link in my signature if restarting Apache does not help. You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0
  • nitdna
    OK, output from php -i | grep 'post_max_size\|upload_max_filesize' : post_max_size => 8M => 8M upload_max_filesize => 2M => 2M Apache has been restarted. I'll log a ticket and let you know. Thanks. Also: Further steps taken thus far: I could confirm that command line PHP(php-cli) shows a different output than what its own php.ini states. Attempted an strace on the php command to see if its parsing additional ini files, but did not find any. ####### [/home/.../public_html]# strace -o /root/dump.txt php -i|grep -i loaded Loaded Configuration File => /usr/local/lib/php.ini libXML Loaded Version => 20900 [/home/.../public_html]# cat /root/dump.txt|grep -i ".ini" getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0 open("/usr/local/bin/php-cli.ini", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/local/lib/php-cli.ini", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/local/bin/php.ini", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/local/lib/php.ini", O_RDONLY) = 3 lstat("/usr/local/lib/php.ini", {st_mode=S_IFREG|0644, st_size=37476, ...}) = 0 write(1, "Configuration File (php.ini) Pat"..., 33) = 33 write(1, "/usr/local/lib/php.ini", 22) = 22 write(1, "Additional .ini files parsed", 28) = 28 write(1, "user_ini.cache_ttl", 18) = 18 write(1, "user_ini.filename", 17) = 17 write(1, ".user.ini", 9) = 9 write(1, ".user.ini", 9) = 9 ####### I also changed the handler to DSO and set it back to suphp, but no joy there either.
    0
  • cPanelMichael
    Please ensure you post the ticket number here so we can update this thread with the outcome. Thank you.
    0
  • nitdna
    Ran Easyapache and re-compiled PHP and Apache. Still the issue remained. Referred this issue to the provider who completed further testing and provided the following information: Checking the trace results for the PHP binary, I could confirm that the configuration file is being opened by the PHP binary. However, the results were defaulting to some built in values which I was unable to find. Possibly these values are binary hard coded. Comparing the trace results to a working cPanel server, I could find errors after the configuration file was being read. However, I could not confirm where exactly the error was. The Reolution: - Backed up the current configuration. - Restored the default configuration file from PHP website. - Tested that changes are now being reflected correctly: successful. So currently the default configuration file is the PHP provided default. Will now change to our preferred settings via WHM PHP editor, which is now working.
    0
  • cPanelMichael
    I am happy to see the issue is now resolved. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.