Trouble configuring php5 in litespeed

zep

Active Member
#1
I am in the process of trying to prove litespeed in worth the investment to my company. I have downloaded the standard version to try and prove this point. We are running Fedora on a quad-core dedicated server with 2gigs of RAM. We are moving from a shared host enviornment. I have installed lite speed with no problems, and compiled with PHP5 and eaccelerator successfully.

When I first went to the default sample install, the HTML page showed up fine, I then checked the phpini file that came with the install, which was fine, but did not show the php5 install or the eaccelerator.

After pawing through the forums I changed the configuration in the external apps and script handler. I now have a 503 service unavailable for the phpini file. Please help with the proper setup in the system, I have not moved or changed any files or configurations besides what is available through the admin GUI.

I have attached screen shots of my current configuration. Thanks in advance!
 

Attachments

zep

Active Member
#2
the error.log file

Update : here is some of my error.log file

2008-05-06 15:02:59.331 [NOTICE] Loading LiteSpeed/3.3.11 Standard ...
2008-05-06 15:02:59.431 [NOTICE] [ADMIN] server socket: uds://opt/lsws/admin/tmp/admin.sock.7190
2008-05-06 15:02:59.431 [NOTICE] Loading configuration from /opt/lsws/conf/httpd_config.xml ...
2008-05-06 15:02:59.433 [NOTICE] Recovering server socket: [*:8088]
2008-05-06 15:02:59.433 [NOTICE] Recovering server socket: [*:7080]
2008-05-06 15:02:59.433 [INFO] old priority: 0, new priority: 0
2008-05-06 15:02:59.433 [INFO] [config:server:basic] For better obscurity, server version number is hidden in the response header.
2008-05-06 15:02:59.435 [NOTICE] The maximum number of file descriptor limit is set to 1024.
2008-05-06 15:02:59.436 [NOTICE] [config:server:epsr:Isphp5]'Process Limit' probably is too low, adjust the limit to: 200.
2008-05-06 15:02:59.436 [WARN] [config:server:epsr:Isphp4] Improper configuration: the value of PHP_LSAPI_CHILDREN should not be less than 'Max connections', 'Max connections' is reduced to 20.
2008-05-06 15:02:59.437 [WARN] [config:vhost:Example:epsr:Isphp5] Possible mis-configuration: 'Instances=40', 'Max connections=80', if one instance of your application is capable of handling multiple connections, you should add 'LSAPI_CHILDREN' environment varaible matches the value of 'Max connections'. If your application cannot handle more than one connections with one instance, you should set 'Instances' greater or equal to 'Max connections'.
2008-05-06 15:02:59.437 [NOTICE] [config:vhost:Example:epsr:Isphp5]'Process Limit' probably is too low, adjust the limit to: 170.
2008-05-06 15:02:59.440 [NOTICE] [child: 2775] Successfully change current user to nobody
2008-05-06 15:02:59.440 [NOTICE] [Child: 2775] Core dump is enabled.
2008-05-06 15:02:59.440 [NOTICE] [AutoRestarter] new child process with pid=2775 is forked!
2008-05-06 15:02:59.440 [INFO] [Isphp4] add child process pid: 2776
2008-05-06 15:02:59.440 [INFO] [Isphp4] pid list size: 1
2008-05-06 15:02:59.440 [NOTICE] [Child: 2775] Setup swapping space...
2008-05-06 15:02:59.440 [NOTICE] [Child: 2775] LiteSpeed/3.3.11 Standard starts successfully!
2008-05-06 15:03:00.100 [NOTICE] [AutoUpdate] Checking for new releases...
2008-05-06 15:03:00.143 [INFO] [AutoUpdate] No new update.
2008-05-06 15:03:02.106 [INFO] [AdminPHP] pid list size: 1
2008-05-06 15:03:02.106 [INFO] [AdminPHP] add child process pid: 2778
2008-05-06 15:03:06.962 [WARN] Can not listen on address[/tmp/Ishttpd/Isphp5.sock.*]: No such file or directory, please clean up manually!
2008-05-06 15:03:06.963 [INFO] [Isphp5] pid list size: 1
2008-05-06 15:03:06.963 [INFO] [Isphp5] add child process pid: 2787
2008-05-06 15:03:06.963 [WARN] Can not listen on address[/tmp/Ishttpd/Isphp5.sock.*]: No such file or directory, please clean up manually!
2008-05-06 15:03:06.963 [INFO] [Isphp5] pid list size: 2
2008-05-06 15:03:06.963 [INFO] [12.39.46.106:32483-0#Example] add child process pid: 2788
2008-05-06 15:03:06.963 [INFO] [12.39.46.106:32483-0#Example] connection to [uds://tmp/Ishttpd/Isphp5.sock] on request #0, error: No such file or directory!
2008-05-06 15:03:06.963 [INFO] [uds://tmp/Ishttpd/Isphp5.sock] Connection refused, restart!
2008-05-06 15:03:06.963 [WARN] Can not listen on address[/tmp/Ishttpd/Isphp5.sock.*]: No such file or directory, please clean up manually!
2008-05-06 15:03:06.964 [INFO] [Isphp5] pid list size: 1
2008-05-06 15:03:06.964 [INFO] [XX.XX.46.106:32483-0#Example] add child process pid: 2789
2008-05-06 15:03:06.964 [INFO] [XX.XX.46.106:32483-0#Example] connection to [uds://tmp/Ishttpd/Isphp5.sock] on request #0, error: No such file or directory!
2008-05-06 15:03:06.964 [INFO] [uds://tmp/Ishttpd/Isphp5.sock] Connection refused, restart!
2008-05-06 15:03:06.964 [WARN] Can not listen on address[/tmp/Ishttpd/Isphp5.sock.*]: No such file or directory, please clean up manually!
2008-05-06 15:03:06.973 [INFO] [Isphp5] pid list size: 1
2008-05-06 15:03:06.973 [INFO] [XX.XX.46.106:32483-0#Example] add child process pid: 2790
2008-05-06 15:03:06.973 [INFO] [XX.XX.46.106:32483-0#Example] connection to [uds://tmp/Ishttpd/Isphp5.sock] on request #0, error: No such file or directory!
2008-05-06 15:03:06.973 [INFO] [uds://tmp/Ishttpd/Isphp5.sock] Connection refused, restart!
2008-05-06 15:03:06.973 [INFO] Remove pid: 2788
2008-05-06 15:03:06.973 [INFO] Pid: 2788 associated with [Isphp5]
2008-05-06 15:03:06.973 [INFO] [Isphp5] pid list size: 0, pid stop list size: 3
2008-05-06 15:03:06.973 [NOTICE] [Isphp5] stop worker processes
2008-05-06 15:03:06.973 [INFO] Remove pid: 2787
2008-05-06 15:03:06.973 [INFO] Pid: 2787 associated with [Isphp5]
2008-05-06 15:03:06.973 [INFO] [Isphp5] pid list size: 0, pid stop list size: 2
2008-05-06 15:03:06.973 [NOTICE] [XX.XX.46.106:32483-0#Example] oops! 503 Service Unavailable
2008-05-06 15:03:06.973 [NOTICE] [XX.XX.46.106:32483-0#Example] Content len: 0, Request line:
GET /phpinfo.php HTTP/1.1
2008-05-06 15:03:06.974 [INFO] Remove pid: 2789
2008-05-06 15:03:06.974 [INFO] Pid: 2789 associated with [Isphp5]
2008-05-06 15:03:06.974 [INFO] [Isphp5] pid list size: 0, pid stop list size: 1
2008-05-06 15:03:06.974 [INFO] Remove pid: 2790
2008-05-06 15:03:06.974 [INFO] Pid: 2790 associated with [Isphp5]
2008-05-06 15:03:06.974 [INFO] [Isphp5] pid list size: 0, pid stop list size: 0
2008-05-06 15:03:12.083 [WARN] Can not listen on address[/tmp/Ishttpd/Isphp5.sock.*]: No such file or directory, please clean up manually!
2008-05-06 15:03:12.083 [INFO] [Isphp5] pid list size: 1
2008-05-06 15:03:12.083 [INFO] [Isphp5] add child process pid: 2797
2008-05-06 15:03:12.083 [WARN] Can not listen on address[/tmp/Ishttpd/Isphp5.sock.*]: No such file or directory, please clean up manually!
2008-05-06 15:03:12.084 [INFO] [Isphp5] pid list size: 2
2008-05-06 15:03:12.084 [INFO] [XX.XX.46.106:32485-0#Example] add child process pid: 2798
2008-05-06 15:03:12.084 [INFO] [XX.XX.46.106:32485-0#Example] connection to [uds://tmp/Ishttpd/Isphp5.sock] on request #0, error: No such file or directory!
2008-05-06 15:03:12.084 [INFO] [uds://tmp/Ishttpd/Isphp5.sock] Connection refused, restart!
2008-05-06 15:03:12.084 [WARN] Can not listen on address[/tmp/Ishttpd/Isphp5.sock.*]: No such file or directory, please clean up manually!
 
Last edited:

mistwang

LiteSpeed Staff
#3
Maybe you /tmp directory is special, create a temp directory under /opt/lsws, then set the socket "Address" to /opt/lsws/tmp/lsphp5.sock
 

zep

Active Member
#4
OK,that was not the problem, but I did find it anyway. The command was incorrect. So now I get the PHP 5.2.5 info page, but eaccelerator is not listed. I added

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
extension=suhosin.so

to the end of my php.ini file, and the ini file is being used (I see it in the phpinfo)
the suhosin.so patch is working correctly, and the eaccelerator.so is in the same directory as the suhosin patch.

Why won't it show up?
 
Last edited:

zep

Active Member
#6
I got this working, php5 works but I keep getting an error

Call to undefined function: mysql_connect(). Please install the MySQL Connector for PHP

running:

php 5.2.5
mysql 5.0.45
linux fedora

naturally you would think the socket is pointing wrong. I searched for hours I cant figure this out. Ive recompiled PHP5 (with the litespeed GUI)using the following:

--with-mysqli --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-mhash --with-mcrypt --with-dom --enable-simplexml --with-pdo-mysql --with-iconv --with-mysql


(above verified with phpinfo.php, does litepeed show loaded modules like apache? There is no litespeed info section like apache...)
added to the php.ini file :
extension=apc.so
extension=suhosin.so
extension=mysql.so
extension=mysqli.so
extension=pdo_mysql.so
extension=pdo.so
extension=php_mysql.so
extension=libmysql.so

; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =/var/lib/mysql/mysql.sock

-----still no luck, I also have yum install *mysql*

pulling my hair out....Please help!
 
Last edited:

zep

Active Member
#8
The Mysql is seeing MySQL in the phpinfo, and seeing MySQLi. I checked the host where I have the site running (where I am moving from) and the phpinfo file shows both MySQL and MySQLi, as I understand the MySQLi is the improved MySQL extension for PHP5.

I recompiled the PHP with the following:
--with-mysql --with-mysqli --with-zlib --with-gd --enable-mbstring --with-mhash --with-mcrypt --with-dom --enable-simplexml --with-pdo-mysql --with-iconv --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes

WELL... now after moving with-mysql to the beginning, I can now see mysql in the phpinfo, but I still have a connection problem, and can see in the following readout of PHPinfo:

Active Persistent Links 0
Active Links 0
Client API version 5.0.45
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient

any ideas are appreciated!!
Thanks
 
Last edited:

zep

Active Member
#10
thanks everyone, it was the code that was the issue, or actually the password I had for the database login (I used the old pw) :banghead:

anyway, for those of you troubleshooting a similar issue and winding up in this thread try the following script to do a very simple test to the connection, put it in a plain text file (or use you php ide) and save it as anything really (iI used mysql_test.php) slap it on your server and type the location into your browser.

Code:
<?php
$link = mysql_connect('localhost', 'Username', 'Password');
if (!$link) {
   die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
Hope my despair helps somebody! Again thanks for answering this thread.
 
Last edited:
Top