LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   PHP (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=19)
-   -   php.ini on cpanel (http://www.litespeedtech.com/support/forum/showthread.php?t=6081)

flowcubano 07-11-2012 02:07 AM

php.ini on cpanel
 
Hello,

I can't find the php.ini

On my php info I get this:

Configuration File (php.ini) Path - /usr/local/lsws/lsphp5/lib

But dear I dont see the php.ini, I only see folder: php with inside this files:
System.php
peclcmd.php
pearcmd.php
PEAR5.php
PEAR.php

and more...

PHP Code:

oot@db [~]# /usr/local/lsws/fcgi-bin/lsphp5 -i | grep "Configuration File"
Configuration File (php.iniPath => /usr/local/lsws/lsphp5/lib
Loaded Configuration File 
=> (none)

root@db [~]# /usr/local/lsws/fcgi-bin/lsphp5 -v
PHP 5.4.4 (litespeed) (builtJul 10 2012 13:43:19)
Copyright (c1997-2004 The PHP Group
Zend Engine v2.4.0
Copyright (c1998-2012 Zend Technologies

root
@db [~]# curl -I http://www.xxx.net/php.php
HTTP/1.1 200 OK
Date
Wed11 Jul 2012 08:55:06 GMT
Server
LiteSpeed
Connection
close
X
-Powered-ByPHP/5.4.4
Content
-Typetext/html 

I'm use cpanel, how can I edit the php.ini?

Thanks!

NiteWave 07-11-2012 10:12 AM

you can create it --- /usr/local/lsws/lsphp5/lib/php.ini

in cPanel, if you build matching php, lsphp5 should use same php.ini -- /usr/local/lib/php.ini

flowcubano 07-12-2012 12:07 AM

I get this error when I add php.ini to /usr/local/lsws/lsphp5/lib/


PHP Code:

503 Service Unavailable

The server is temporarily busy
, try again later

Do you know why I get this timezone error:?
PHP Code:

Warningstrtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. 

I have this in my php.ini
date.timezone = "Europe/Berlin"
extension=timezonedb.so

NiteWave 07-12-2012 12:16 AM

"Europe/Berlin" is ok per http://php.net/manual/en/timezones.europe.php

should not need this:
extension=timezonedb.so

the 503 error may relate to this extension. please comment it out to see if the error disappears.

flowcubano 07-12-2012 12:25 AM

I stil get this error:
PHP Code:

503 Service Unavailable 

This is my configuration:
PHP Code:

date.timezone "Europe/Berlin"

extension_dir "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
extension=xcache.so
extension
=memcache.so
extension
=apc.so

zend_extension 
"/usr/local/IonCube/ioncube_loader_lin_5.3.so"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.check_mtime="1"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.debug="0"
eaccelerator.enable="1"
eaccelerator.filter=""
eaccelerator.optimizer="1"
eaccelerator.shm_max="0"
eaccelerator.shm_only="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_size="16"
eaccelerator.shm_ttl="0" 


NiteWave 07-12-2012 12:29 AM

you can't use 2 opcode cache together -- only select one.
comment out either apc.so or xcache.so

flowcubano 07-12-2012 12:34 AM

Still get error:

PHP Code:

date.timezone "Europe/Berlin"

extension_dir "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
extension=apc.so

zend_extension 
"/usr/local/IonCube/ioncube_loader_lin_5.3.so"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.check_mtime="1"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.debug="0"
eaccelerator.enable="1"
eaccelerator.filter=""
eaccelerator.optimizer="1"
eaccelerator.shm_max="0"
eaccelerator.shm_only="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_size="16"
eaccelerator.shm_ttl="0" 


NiteWave 07-12-2012 12:40 AM

do you have
extension=eaccelerator.so
in php.ini ? it's also opcode cache. same advice as before: only keep one.

please list all of your extensions in php.ini if still 503 error.

flowcubano 07-12-2012 12:48 AM

there only two probleem
1.timezone
PHP Code:

date
Warning
phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/xx/public_html/php.php on line 4
date/time support    enabled
"Olson" Timezone Database Version    2012.3
Timezone Database    internal
Default timezone    UTC 

2. When I create php.ini here /usr/local/lsws/lsphp5/lib I get this error:
PHP Code:

03 Service Unavailable

The server is temporarily busy
, try again later



I have change to this configuration but still get error:
PHP Code:

date.timezone "Europe/Berlin"
extension_dir "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
extension=eaccelerator.so
zend_extension 
"/usr/local/IonCube/ioncube_loader_lin_5.3.so"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.check_mtime="1"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.debug="0"
eaccelerator.enable="1"
eaccelerator.filter=""
eaccelerator.optimizer="1"
eaccelerator.shm_max="0"
eaccelerator.shm_only="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_size="16"
eaccelerator.shm_ttl="0" 

On my extension directory I have this:
xcache.so
apc.so
memcache.so
timezonedb.so
suhosin.so
ixed.5.3.lin
eaccelerator.so

NiteWave 07-12-2012 01:06 AM

please comment out all extensions:
extension=eaccelerator.so
zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.3.so"

and test again. if no 503 error, then add the extension one by one, to identify which extension is the cause.


All times are GMT -7. The time now is 12:59 PM.