[Solved] Import from Apache

Discussion in 'Install/Configuration' started by Razva, Jan 27, 2011.

  1. Razva

    Razva Active Member


    This is the first time I'm installing LiteSpeed, so I should be considered as a "totally newbie LS user".

    I'm having a CentOS 5.5 VPS, fresh install, with Apache2 + PHP5. When installing the Free version there was no option to import any httpd.conf or migrate anything from Apache.

    I've searched the wiki but I didn't found anything at installation/configuration...so I am clearly missing something.

    Can you please point me to some tutorial or give a hand?


    LATER EDIT: also please take a look at litespeedtech.com/support/forum/showthread.php?t=4641
    Last edited: Feb 2, 2011
  2. webizen

    webizen Well-Known Member

  3. Razva

    Razva Active Member

    Great, worked like a charm (import and php configuration).

    Now...the single problem is..."Fatal error: Call to undefined function mysql_connect()".

    Seems that it doesn't connects to the MySQL server?

    NOTE: Package mysqlclient15-devel-5.0.91-1.jason.1.x86_64 already installed and latest version
    Last edited: Jan 28, 2011
  4. webizen

    webizen Well-Known Member

  5. Razva

    Razva Active Member

    I've tried the fix --with-mysql=/usr and --with-mysql=/usr/share

    Same result... CentOS 5.5 x64. Any ideas please?

    LATER EDIT: worked with "--with-libdir=lib64"

    So for you guys who have fresh CentOS 5.5x64...note that :p

    LATER EDIT 2: compiled, but still didn't fixed the "Fatal error: Call to undefined function mysql_connect()" problem.

    My time is up. Is there any way to receive paid support? I just need a clean installation and basic setup. Cheers!
    Last edited: Jan 28, 2011
  6. webizen

    webizen Well-Known Member

    option "--with-libdir=lib64" was noted in the troubleshooting guide.
  7. eva2000

    eva2000 Well-Known Member

  8. Razva

    Razva Active Member

    Recompiling. Fingers crossed. I have a feeling that I also need to compile adodb.
  9. Razva

    Razva Active Member

    Nope, no luck.

    If you are so kind...can you please point me to some "--with-whatever" in order to fix this darn thing? I can't fix the adodb-mysql error... :(
  10. webizen

    webizen Well-Known Member

    try '--with-mysql=shared,/usr' '--with-pdo-mysql=shared,/usr'
  11. Razva

    Razva Active Member

    Here's the full list I've used:

    '--with-adodb' '--with-adodb-mysql' '--with-litespeed' '--with-libdir=lib64' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre=shared,/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-mime-magic' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-ncurses=shared' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/bin/mysql_config' '--enable-dom=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/usr' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-pdo-dblib=shared,/usr' '--enable-json=shared' '--enable-zip=shared' '--with-readline' '--enable-dbase=shared' '--with-pspell=shared' '--with-mcrypt=shared,/usr' '--with-mhash=shared,/usr' '--with-tidy=shared,/usr' '--with-mssql=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr'

    Still...no luck... :(
  12. webizen

    webizen Well-Known Member

    Have you loaded mysql, pdo and pdo-mysql extensions in php.ini? To find out the path to php.ini in use, do '/usr/local/lsws/fcgi-bin/lsphp5 -i | grep "Loaded Configuration File" ' from command line.
  13. Razva

    Razva Active Member

  14. mistwang

    mistwang LiteSpeed Staff

    install mysql-devel with command
    "yum install mysql-devel"
  15. Razva

    Razva Active Member

    [root@adventisttv /]# yum install mysql-devel.x86_64
    Package mysql-devel-5.1.52-jason.1.x86_64 already installed and latest version
    Nothing to do
    [root@adventisttv /]#
    Nopez... :(
  16. mistwang

    mistwang LiteSpeed Staff

    "rpm -ql mysql-devel"
    to check where those files installed, if it is installed to a special directory, change your PHP configuration parameters to use that location.
  17. Razva

    Razva Active Member

    [root@adventisttv /]# rpm -ql mysql-devel
    [root@adventisttv /]#
    The php.ini is http://adventisttv.ro/php.ini.txt

    Maybe I'm a dumbass, but I can't find anything related with /include/ nor /lib64/

    I'm totally lost! :confused:
  18. mistwang

    mistwang LiteSpeed Staff

    Using "/usr" is correct, you can ignore "include", "lib64". So, you have built your binary correctly, just did not load the shared modules.
    Copy over php.ini used by Apache PHP to /usr/local/lsws/lsphp5/lib/, should make it work.
  19. Razva

    Razva Active Member

    Done. Same result...

    [root@adventisttv /]# cp /etc/php.ini /usr/local/lsws/lsphp5/lib/

    [root@adventisttv php]# locate php.ini
  20. mistwang

    mistwang LiteSpeed Staff

    change configuration from '--with-mysql=shared,/usr' to '--with-mysql=/usr', then rebuild PHP.

Share This Page