Editing php settings seems impossible

#1
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?
 

webizen

Well-Known Member
#2
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
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):

Code:
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:

FROM PHPINFO:

Code:
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?
 
#5
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:
fail to save current configuration.

Fail to generate build script, please try to manually fix the error first.
Failed to create manual install script: /usr/local/lsws/phpbuild/buildphp_manual_run.sh
What you think is causing this?
 

webizen

Well-Known Member
#6
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
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..).
 
#9
Here is part of the response (seems that all is not right):

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

Code:
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: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7e626)[0x7f8f8bb3b626]
/usr/local/lsws/fcgi-bin/lsphp5(destroy_zend_class+0x235)[0x73fce5]
/usr/local/lsws/fcgi-bin/lsphp5(zend_hash_clean+0x70)[0x7569a0]
/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20100525/apc.so(apc_interned_strings_shutdown+0x20)[0x7f8f86669040]
/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20100525/apc.so(apc_module_shutdown+0x12a)[0x7f8f8666295a]
/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20100525/apc.so(+0xadff)[0x7f8f86657dff]
/usr/local/lsws/fcgi-bin/lsphp5[0x750113]
/usr/local/lsws/fcgi-bin/lsphp5[0x7552bb]
/usr/local/lsws/fcgi-bin/lsphp5(zend_hash_graceful_reverse_destroy+0x18)[0x756a78]
/usr/local/lsws/fcgi-bin/lsphp5[0x749233]
/usr/local/lsws/fcgi-bin/lsphp5(php_module_shutdown+0x2a)[0x6eb76a]
/usr/local/lsws/fcgi-bin/lsphp5[0x7ec2ed]
/usr/local/lsws/fcgi-bin/lsphp5[0x431126]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f8f8bade76d]
/usr/local/lsws/fcgi-bin/lsphp5[0x431241]
======= 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
 
Top