[solved] LiteSpeed conversion broke sites.

Discussion in 'Install/Configuration' started by Licensecart, Jul 7, 2014.

  1. Licensecart

    Licensecart Well-Known Member

    Hello guys,

    A client of mine I was helping install litespeed has the following issues and I can't seem to find out how or why they are happening. The installation went well, the compiling went well and then Bam sites like Joomla & Wordpress don't work but say they can't connect to the database:

    I've looked in the configuration files and everything looks fine, the database is fine too.

    The other issue is in the /usr/local/lsws/logs/error.log.2014_07_07 has loads and loads of these file permission restrictions for a lot of domains:

    The domains have a 403 error with the above.
  2. mistwang

    mistwang LiteSpeed Staff

  3. Licensecart

    Licensecart Well-Known Member

    Ah yeah the Litespeed Phpinfo is msising mysql on it's own. how can we compile Litespeed to install them modules?
  4. mistwang

    mistwang LiteSpeed Staff

    Need to rebuild PHP with configuration "--with-mysql=...", make sure the correct mysql client library devel package has been installed.
  5. Licensecart

    Licensecart Well-Known Member

    Would it be --with-mysql=/var/lib/mysql/? Here's the Apache information:


    It's a InterWorx server.

    Nope not the above nor is it: --with-mysql=/usr/local/mysql/ :s

    I seen a article about mysql-devel and tried installing that to see if I missed it:

    Last edited: Jul 8, 2014
  6. NiteWave

    NiteWave Administrator

    please show the "Configure Command" under apache's phpinfo.
  7. Licensecart

    Licensecart Well-Known Member

    There isn't one on the apache one mate. I've pm'ed you a link to the phpinfo page.
  8. NiteWave

    NiteWave Administrator

    I've read the phpinfo page, so it's php 5.4.30, and without "Configure Command"!

    how about to build lsphp with --with-mysql=mysqlnd ?
  9. Licensecart

    Licensecart Well-Known Member

    That completes but the error is still there:

    Log: http://paste2.org/v85y9OLw

    Error: Error displaying the error page: Application Instantiation Error: Could not connect to MySQL.

    Apache MySQL:

    LiteSpeed MySQL:

  10. NiteWave

    NiteWave Administrator

  11. Licensecart

    Licensecart Well-Known Member


    Connected successfully

    Warning: mysql_connect(): The server requested authentication method unknown to the client [mysql_old_password] in /chroot/home/username/domain/html/simplephp.php on line 2
    Warning: mysql_connect(): The server requested authentication method unknown to the client in /chroot/home/username/domain/html/simplephp.php on line 2
    Could not connect: The server requested authentication method unknown to the client
  12. NiteWave

    NiteWave Administrator

    by google the error message, it looks the problem is:
    "Your database server is set to use old passwords by default."
    "mysqlnd cannot use it to connect to the MySQL server."

    can you try --with-mysql=/usr --with-libdir=lib64 to recompile lsphp5.

    also check the mysql client version installed on this server
    #rpm -qa |grep -i mysql
    Licensecart likes this.
  13. Licensecart

    Licensecart Well-Known Member

    You are a legend mate :D thank you that got the bleeder, you are a life saver.

  14. Licensecart

    Licensecart Well-Known Member

    oh dam mate same sort of issue with mysqli



    I tried this:

    --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-mbstring --with-iconv --with-mysql=/usr --with-libdir=lib64 --with-mysqli=/var --with-libdir=lib
    Last edited: Jul 8, 2014
  15. NiteWave

    NiteWave Administrator

    I think "--with-mysqli=/var" is invalid, so it's replaced by default --with-mysqli=mysqlnd for php 5.4.x.

    what "Client API version" shows in phpinfo under litespeed after you re-compile it with --with-mysql=/usr ?
    if it shows 5.5.38 which is same as apache, the issue should be gone
  16. Licensecart

    Licensecart Well-Known Member

    Hello mate yes that shows up 5.5.38 on the mysql one just the mysqli issue I'm going to try now :)

    Ok that completes:


    But the site's using mysqli are still broken on LiteSpeed:

    Last edited: Jul 8, 2014
  17. mistwang

    mistwang LiteSpeed Staff

    uses "--with-mysqli=/usr" which matches --with-mysql=...
  18. Licensecart

    Licensecart Well-Known Member

    I get this mate:

  19. mistwang

    mistwang LiteSpeed Staff

    check output of "rpm -ql mysql-devel", it should give the path to mysql_config
    use that path minus "/bin/mysql_config" for "--with-mysqli" configuration.
  20. Licensecart

    Licensecart Well-Known Member

    That posted:

    So based on that would it be this mate: --with-mysqli=/usr/include/ or --with-mysqli=/usr --with-libdir=include

Share This Page