PHP.ini location.

Slavik

Administrator
#1
When installing OLS a php.ini file is made at /usr/local/lsws/php/php.ini

However the configuration path is set to /usr/local/lsws/lsphp5/lib

I would suggest having them matching. Ideally under the lsphp5 directory somewhere to enable seperation of php versions.
 
#2
Maybe you have something configured differently ? You source compiling ? Or using prebuilt RPMs ?

With OLS 1.2.4, for me default PHP install out of box is still missing any php.ini as it doesn't get copied to the right place at /usr/local/lsws/lsphp5/lib. Edit: I see why it's blank it's gone to /usr/local/lsws/php/php.ini :)

But with my source compiled OLS via git repository and customised PHP configuration's I copy over the php.ini-production file to the right place. OpenLiteSpeed with PHP 5.4.18 + APC 3.1.15 dev and Memcache PHP extension 3.0.7

Code:
/usr/local/lsws/lsphp5/bin/php -v
PHP 5.4.18 (cli) (built: Aug 23 2013 18:59:00)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
Code:
/usr/local/lsws/lsphp5/bin/php -i | egrep 'php.ini|/openlitespeed/php.d/'

Configuration File (php.ini) Path => /usr/local/lsws/lsphp5/lib
Loaded Configuration File => /usr/local/lsws/lsphp5/lib/php.ini
Additional .ini files parsed => /openlitespeed/php.d/apc.ini,
/openlitespeed/php.d/memcache.ini
Code:
/usr/local/lsws/lsphp5/bin/php -i | grep -A8 'APC Support'

APC Support => enabled
Version => 3.1.15-dev
APC Debugging => Disabled
MMAP Support => Enabled
MMAP File Mask =>
Locking type => pthread mutex Locks
Serialization Support => php
Revision => $Revision: 330418 $
Build Date => Aug 23 2013 18:59:24

Code:
/usr/local/lsws/lsphp5/bin/php -i | grep -A15 'memcache support'

memcache support => enabled
Version => 3.0.7
Revision => $Revision: 326387 $
Directive => Local Value => Master Value
memcache.allow_failover => 1 => 1
memcache.chunk_size => 32768 => 32768
memcache.compress_threshold => 20000 => 20000
memcache.default_port => 11211 => 11211
memcache.hash_function => crc32 => crc32
memcache.hash_strategy => consistent => consistent
memcache.lock_timeout => 15 => 15
memcache.max_failover_attempts => 20 => 20
memcache.protocol => ascii => ascii
memcache.redundancy => 1 => 1
memcache.session_redundancy => 2 => 2
I'm using

LSWSHOME='/usr/local/lsws'
LIBDIR='lib64'

With --with-config-file-scan-dir=/openlitespeed/php.d set to drop in and load PHP extension *.ini files separately from main php.ini

Code:
./configure --prefix=${LSWSHOME}/lsphp5 --with-mcrypt --with-mhash --with-zlib --with-gettext --enable-exif --enable-zip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=${LIBDIR} --with-mysqli=mysqlnd --with-mysql-sock --with-curl --with-gd --with-xmlrpc --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --with-freetype-dir=${LIBDIR} --with-jpeg-dir=${LIBDIR} --with-png-dir=${LIBDIR} --with-xpm-dir=${LIBDIR} --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd --enable-inline-optimization --with-imap --with-imap-ssl --with-kerberos --enable-posix --enable-xml --with-libexpat-dir=/usr --with-config-file-scan-dir=/openlitespeed/php.d --with-litespeed
 
Last edited:

Slavik

Administrator
#3
Yea, im running an out the box compile, but not specifying the config file scan dir in the PHP options, it justs seems weird to me to put that folder there with that php.ini and then ignore it.

I also find the way the modules are compiled into the php source directories strange, it would also make sence to me to have those moved into a /usr/local/lsws/lsphp5/lib/modules/extension.so type location as default.
 
#4
Probably an overlooked mistake for php.ini ? :)

Yeah, but all that matters is where the php extension directory is. :D

Checking my php extension directory is at /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20100525 for me which is in line with what I am use to anyway

Code:
ls -lah /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20100525
total 2.5M
drwxr-xr-x 2 root root 4.0K Aug 25 06:15 .
drwxr-xr-x 3 root root 4.0K Aug 25 05:40 ..
-rwxr-xr-x 1 root root 787K Aug 25 06:14 apc.so
-rwxr-xr-x 1 root root 179K Aug 25 06:14 igbinary.so
-rwxr-xr-x 1 root root 1.1M Aug 25 06:15 imagick.so
-rwxr-xr-x 1 root root 456K Aug 25 06:14 memcache.so
 
#5
Was thinking could /usr/local/lsws/php/php.ini be the admin_php version and not the server PHP version ?

seems to be a few php.ini files

Code:
/usr/local/lsws/admin/conf/php.ini
/usr/local/lsws/admin/misc/php.ini
/usr/local/lsws/lsphp5/lib/php.ini
/usr/local/lsws/php/php.ini
Code:
sdiff -s /usr/local/lsws/admin/conf/php.ini /usr/local/lsws/admin/misc/php.ini
output_buffering = Off                                        | output_buffering = 4096
register_argc_argv = Off                                      | register_argc_argv = On
file_uploads = Off                                            | file_uploads = On
mysql.allow_persistent = Off                                  | mysql.allow_persistent = On
Code:
sdiff -s /usr/local/lsws/admin/conf/php.ini /usr/local/lsws/php/php.ini
output_buffering = Off                                        | output_buffering = 8192
allow_call_time_pass_reference = Off                          | allow_call_time_pass_reference = On
max_execution_time = 30    ; Maximum execution time of each  | max_execution_time = 0    ; Maximum execution time of each s
memory_limit = 8M      ; Maximum amount of memory a script ma | memory_limit = 32M      ; Maximum amount of memory a script m
post_max_size = 8M                                            | post_max_size = 10M
file_uploads = Off                                            | file_uploads = On
upload_max_filesize = 2M                                      | upload_max_filesize = 10M
allow_url_fopen = On                                          | allow_url_fopen = Off
 
Last edited:
Top