LSWS installed but serves Apache test page instead of my site

#21
looks it's automatic

#yum search libxml2-devel
...
libxml2-devel.i686 : Libraries, includes, etc. to develop XML and HTML applications
libxml2-devel.x86_64 : Libraries, includes, etc. to develop XML and HTML applications
...

actually no libxml2-devel
but on 64 bit platform, when
#yum install libxml2-devel
it selects libxml2-devel.x86_64 automatically

if want to install 32 bit library, need specify .i686 explicitly
#yum install libxml2-devel.i686
Okay thanks just checking, as usual I'm simply ignorant. Will attempt it now.
 
#22
By the way, for the pre-requisites (the build tools), I have everthing, except:

autoconf.x86_64

instead I have:

autoconf.noarch

Does this matter?
 
#24
Okay I finally successfully rebuilt PHP, after getting through many other errors (had to keep installing things).

But now I have two issues:

1. When I try to access anything (even a test phpinfo.php page), I get this error logged:

PHP Fatal error: Out of memory (allocated 786432) (tried to allocate 491520 bytes) in /var/www/vhosts/[mydomain]/httpdocs/vbseo.php on line 282

So perhaps I need to increase the memory allowed for PHP, in the php.ini? Which leads me to my next issue:

2. What about php.ini? Where is it (is there one already; I don't see it)? And what should I put there? Should I copy my old php.ini (the one I used with Apache)? [DISREGARD THIS 2ND QUESTION, I ANSWERED IT MYSELF IN THE NEXT POST]
 
Last edited:
#25
Okay so I now see that we specified in the config options config file path /etc so apparently LSWS PHP is using the exact same php.ini file as Apache PHP.

So if that's the case, why am I getting this error?
 
#26
Okay I checked the memory_limit in php.ini and it's 128MB. So why am I getting this error:

PHP Fatal error: Out of memory (allocated 786432) (tried to allocate 491520 bytes) in /var/www/vhosts/[mydomain]/httpdocs/vbseo.php on line 282
 
#28
Okay I searched your forum for answers and found the suggestion to increase Memory Soft Limit and Memory Hard Limit. I did that and now I can get the test phpinfo page.

However when try to access the front page of my site (which is a vbulletin+vbseo forum), I get that vbulletin database error page:

Database error
The database has encountered a problem.
Please try the following:
Load the page again by clicking the Refresh button in your web browser.
Open the [mydomain]:2080 home page, then try to open another page.
Click the Back button to try another link.
The [mydomain]:2080 forum technical staff have been notified of the error, though you may contact them if the problem persists.

We apologise for any inconvenience.
 
#29
Okay the vbulletin script automatically sent me an email with details of the database error. Here is the important part:

Database error in vBulletin :

mysqli_real_connect(): [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock)
/var/www/vhosts/[mydomain]/httpdocs/includes/class_core.php on line 1356
 
#30
Okay I googled that error, found a solution. Not sure if this is the best fix (don't know if it affects performance or whatever), but I simply created a symbolic link in the directory /tmp :

ln -s /var/lib/mysql/mysql.sock mysql.sock

Now my site comes up --- finally.

If my fix for the missing mysql.sock is not the best fix, please advise. Should I instead set something in php.ini?

Thanks!
 
#31
I think the fix is good and no performance loss.

if modify php.ini,
mysql.default_socket=/tmp/mysql.sock

litespeed will work but apache may fail.

so this fix can satisfy both apache and litespeed.

Congratulation to you! you've built lsphp5 successfully and have vB up under litespeed.

expecting to hear more good news from you.
 
#32
Thank you Nitewave for helping me to get there.

I have done some preliminary testing, comparing first byte time for a 20-post showthread.php page (vbulletin+vbseo) on apache vs LSWS. I'm not seeing an improvement in my testing so far, in fact slightly longer first byte time for LSWS, for first access of a the showthread page as a visitor. However the second access is significantly faster than apache, but not the first. (I'm talking about the speed test results from webpagetest.org, which does two requests for each test).

This is only preliminary and I understand there may be other factors, like maybe I haven't given xCache time to effectively cache the php or whatever on LSWS. *shrug*

Also I understand that what LSWS is known for is being able to handle many more concurrent requests. That's not really my concern at the moment. I just want PHP page execution time for the forum threads to be much faster.

And I'm still interested in trying the LSWS Cache.
 
Top