LSWS installed but serves Apache test page instead of my site

Discussion in 'Install/Configuration' started by Psalmist, Dec 14, 2013.

  1. Psalmist

    Psalmist New Member

    Okay thanks just checking, as usual I'm simply ignorant. Will attempt it now.
  2. Psalmist

    Psalmist New Member

    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?
  3. NiteWave

    NiteWave Administrator

    #yum search autoconf
    shows no autoconf.x86_64
    so the wiki page may be wrong
  4. Psalmist

    Psalmist New Member

    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: Dec 17, 2013
  5. Psalmist

    Psalmist New Member

    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?
  6. Psalmist

    Psalmist New Member

    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
  7. Psalmist

    Psalmist New Member

    P.S. I am using xCache if that matters.........
  8. Psalmist

    Psalmist New Member

    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.
  9. Psalmist

    Psalmist New Member

    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
  10. Psalmist

    Psalmist New Member

    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!
  11. NiteWave

    NiteWave Administrator

    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.
  12. Psalmist

    Psalmist New Member

    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.

Share This Page