LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > PHP > php.ini on cpanel

Reply
 
Thread Tools Display Modes
  #1  
Old 07-11-2012, 02:07 AM
flowcubano flowcubano is offline
Member
 
Join Date: May 2011
Posts: 19
Default 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!
Reply With Quote
  #2  
Old 07-11-2012, 10:12 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
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
Reply With Quote
  #3  
Old 07-12-2012, 12:07 AM
flowcubano flowcubano is offline
Member
 
Join Date: May 2011
Posts: 19
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
Reply With Quote
  #4  
Old 07-12-2012, 12:16 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
"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.
Reply With Quote
  #5  
Old 07-12-2012, 12:25 AM
flowcubano flowcubano is offline
Member
 
Join Date: May 2011
Posts: 19
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" 
Reply With Quote
  #6  
Old 07-12-2012, 12:29 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
you can't use 2 opcode cache together -- only select one.
comment out either apc.so or xcache.so
Reply With Quote
  #7  
Old 07-12-2012, 12:34 AM
flowcubano flowcubano is offline
Member
 
Join Date: May 2011
Posts: 19
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" 
Reply With Quote
  #8  
Old 07-12-2012, 12:40 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
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.
Reply With Quote
  #9  
Old 07-12-2012, 12:48 AM
flowcubano flowcubano is offline
Member
 
Join Date: May 2011
Posts: 19
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
Reply With Quote
  #10  
Old 07-12-2012, 01:06 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:07 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.