Editing php settings seems impossible

Discussion in 'Install/Configuration' started by tininho, Sep 20, 2011.

  1. tininho

    tininho Member

    Hi, I have tried everything I can imagine to change the php settings, I mainly want to raise the upload_max_filesize setting to restore my sql back up through phpmyadmin (filesize is bigger than 2M which is the current limit).

    my phpinfo shows the following:
    Configuration File (php.ini) Path /usr/local/lsws/lsphp5/lib

    There is no php.ini in that folder or in any subfolders.

    I made a find /usr/local/lsws/ -name 'php.ini' -run and edited all of the php.ini files found. Restarted the server and got absolutely no where (size limit is still 2M).

    Can you please point me to a right direction here?
  2. webizen

    webizen Well-Known Member

    if no php.ini under /usr/local/lsws/lsphp5/lib, default php settings are used no matter which php.ini you change. you should copy the modified php.ini to /usr/local/lsws/lsphp5/lib and restart lsws to make the change effective.
  3. tininho

    tininho Member

    I have problems with the php configuration again, I have edited the /usr/local/lsws/lsphp5/lib/php.ini (also confirmed the path from phpinfo.php) as following (part):

    post_max_size = 100M
    max_execution_time = 180
    max_input_time = 120
    upload_max_filesize = 100M
    I restarted and LSWS and afterwards the whole server, I still get this on the phpinfo and PhpMyAdmin confirm the upload limit:


    upload_max_filesize	2M	2M
    upload_tmp_dir	no value	no value
    Screenshot: http://awesomescreenshot.com/0927p49ae

    How this happens, why the attribute is not changing?
  4. NiteWave

    NiteWave Administrator

    check if it's overridden in .htaccess
    for example,

    php_value upload_max_filesize 2M
  5. tininho

    tininho Member

    I have disabled the ability to change the setting via .htaccess. The php settings remain unchanged, very strange.

    I tried to rebuild php, but now I get the following error:
    What you think is causing this?
  6. webizen

    webizen Well-Known Member

    check the ownship/permission of /usr/local/lsws/phpbuild and /usr/local/lsws/phpbuild/buildphp_manual_run.sh. they should be owned by lsadm.
  7. tininho

    tininho Member

    thanks, that helped for php reinstallation. the first problem remains, I cannot get the litespeed to read the custom php.ini file in /usr/local/lsws/lsphp5/lib/php.ini.

    None of the settings change, most importantly the upload limit. Bizarre.. Any ideas?

    could some other ownership be wrongly set (also strange, but if it helps..).
  8. webizen

    webizen Well-Known Member

    do following to locate the php.ini in use. If you have not compiled php from admin console, it is likely you use something else.
  9. tininho

    tininho Member

    Here is part of the response (seems that all is not right):

    PHP is compiled with Litespeed admin panel, php header and apc checked.

    virtual@virtual273:~$ /usr/local/lsws/fcgi-bin/lsphp5 -i | grep "Configuration File"
    PHP:  syntax error, unexpected BOOL_TRUE in /usr/local/lsws/lsphp5/lib/php.ini on line 11
    Configuration File (php.ini) Path => /usr/local/lsws/lsphp5/lib
    Loaded Configuration File => /usr/local/lsws/lsphp5/lib/php.ini
    *** glibc detected *** /usr/local/lsws/fcgi-bin/lsphp5: free(): invalid pointer: 0x00007f8f8dd688b8 ***
    ======= Backtrace: =========
    ======= Memory map: ========
    00400000-00c8a000 r-xp 00000000 08:02 393690                             /usr/local/lsws/fcgi-bin/lsphp-5.4.0
    00e8a000-00e8b000 r--p 0088a000 08:02 393690                             /usr/local/lsws/fcgi-bin/lsphp-5.4.0
    00e8b000-00e99000 rw-p 0088b000 08:02 393690                             /usr/local/lsws/fcgi-bin/lsphp-5.4.0
    00e99000-00ebc000 rw-p 00000000 00:00 0
    02081000-02292000 rw-p 00000000 00:00 0                                  [heap]
    7f8f86437000-7f8f8644c000 r-xp 00000000 08:02 1703980                    /lib/x86_64-linux-gnu/libgcc_s.so.1
    7f8f8644c000-7f8f8664b000 ---p 00015000 08:02 1703980                    /lib/x86_64-linux-gnu/libgcc_s.so.1
    7f8f8664b000-7f8f8664c000 r--p 00014000 08:02 1703980                    /lib/x86_64-linux-gnu/libgcc_s.so.1
    7f8f8664c000-7f8f8664d000 rw-p 00015000 08:02 1703980                    /lib/x86_64-linux-gnu/libgcc_s.so.1
    7f8f8664d000-7f8f8666f000 r-xp 00000000 08:02 1050379                    /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20100525/apc.so
    7f8f8666f000-7f8f8686f000 ---p 00022000 08:02 1050379                    /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20100525/apc.so
    7f8f8686f000-7f8f86871000 r--p 00022000 08:02 1050379                    /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20100525/apc.so
    7f8f86871000-7f8f86872000 rw-p 00024000 08:02 1050379 
  10. webizen

    webizen Well-Known Member

    pls fix the syntax error in php.ini and comment out 'extension=apc.so' first and see any difference.

Share This Page