[Resolved] PHP & MySQL problem

Discussion in 'Install/Configuration' started by KXP, Aug 2, 2010.

  1. KXP

    KXP New Member

    Hi all, I'm very new to LSWS. I wanted to try it out on my debian server because I tried it before on some shared host and liked it.
    But what I noticed is the old PHP version. I use PHPMyAdmin and it says that PHP 5.2+ is required. So I ran:
    The server is up-to-date (updated today). also ffrom PHPInfo I see:
    Does it mean that it uses 3rd version of MySQL? I need its 5th version.
    So how to fix it and use the current software?
    Last edited by a moderator: Aug 4, 2010
  2. NiteWave

    NiteWave Administrator

    build lsphp5 yourself:

    lsws admin console --> Actions --> Compile PHP
  3. KXP

    KXP New Member

    Ok I did it and they ask me to run /usr/local/lsws/phpbuild/buildphp_manual_run.sh
    The terminal says:
    build/buildphp_1280772918.9.log 2>&1
    chown -R lsadm:lsadm /usr/local/lsws/phpbuild/php-5.3.3[/quote]And the page says:
    What's that? libxml2 is already the newest version.
    P.S. I post only last lines of logs, prev.lines don't have errors and forum doesn't allow me to post it because it's to big.
    Last edited: Aug 2, 2010
  4. NiteWave

    NiteWave Administrator

    the general way to resolve this kind of build warning/error(assume on centOS) :
    Code:
    #yum search libxml2
    ....
    libxml2.i386 : Library providing XML and HTML support
    libxml2.x86_64 : Library providing XML and HTML support
    libxml2-devel.i386 : Libraries, includes, etc. to develop XML and HTML applications
    libxml2-devel.x86_64 : Libraries, includes, etc. to develop XML and HTML applications
    ....
    
    then
    Code:
    #yum install libxml2-devel.i386
    
    if 32-bit platform. or
    Code:
    #yum install libxml2-devel.x86_64
    
    if 64-bit platform
    will resolve the reported issue.
  5. KXP

    KXP New Member

    Ok I installed libxml2-dev and it really worked. But now I have a problem with libpng, the builder doesn't find it. How should I fix this problem?
  6. holisticspider

    holisticspider New Member

    yum install libpng-devel
  7. NiteWave

    NiteWave Administrator

    per output of "yum search libpng", should be
    Code:
    yum install libpng-devel.i386
  8. KXP

    KXP New Member

    Ok I didn't find that pakidge for my OS, but I desabled GD and all worked fine.
    But now when I want to run PHPMyAdmin I get this error:
    I guess there's smth with MySQL?
    Other scripts which work with MySQL aren't running.
    Last edited: Aug 3, 2010
  9. KXP

    KXP New Member

    Also what I saw in PHPInfo at last:
    Is it normal? I think no. And I don't find any php.ini at the given path.
    But MySQL is now up-to-date.
    Last edited: Aug 3, 2010
  10. NiteWave

    NiteWave Administrator

    php.ini not exist for a fresh lsphp build. pick one from phpbuild folder and copy to /usr/local/lsws/lsphp5/lib/ . for example,
    Code:
    cp /usr/local/lsws/phpbuild/php-5.3.2/php.ini-production /usr/local/lsws/lsphp5/lib/php.ini
  11. KXP

    KXP New Member

    I copied that file & restarted LiteSpeed. now
    But when I try to run any script which works with MySQL (PHPMyAdmin for example) I get just a white blank page.
    But I replaced that PHP.ini with php.ini-development and now I get the same:
    Other script which works with MySQL says:
    So MySQL doesn't work.
    Last edited: Aug 4, 2010
  12. holisticspider

    holisticspider New Member

    Here is a complete configure that I used for PHP 5.3.3 (latest) and MySQL 5.0.77 on CentOS 5.5 (i386)
    Code:
    ./configure \
      --prefix=/usr/local/php53 \
      --with-libdir=lib \
      --with-config-file-path=/usr/local/php53/etc \
      --with-config-file-scan-dir=/usr/local/php53/php.d \
      --with-litespeed \
      --with-bz2 \
      --with-curl \
      --with-exec-dir=/usr/bin \
      --with-freetype-dir=/usr \
      --with-png-dir=/usr \
      --enable-gd-native-ttf \
      --without-gdbm \
      --with-gettext \
      --with-gmp \
      --with-iconv \
      --with-jpeg-dir=/usr \
      --with-openssl \
      --with-png-dir=/usr \
      --with-pspell \
      --with-libexpat-dir=/usr \
      --with-pcre-regex=/usr \
      --with-zlib \
      --with-layout=GNU \
      --enable-exif \
      --enable-ftp \
      --enable-magic-quotes \
      --enable-sockets \
      --enable-sysvsem \
      --enable-sysvshm \
      --enable-sysvmsg \
      --enable-wddx \
      --with-kerberos \
      --enable-ucd-snmp-hack \
      --enable-shmop \
      --enable-calendar \
      --with-mysql=mysqlnd \
      --with-mysqli=mysqlnd \
      --with-pdo-mysql=mysqlnd \
      --with-mysql-sock=/var/lib/mysql/mysql.sock \
      --with-libxml-dir=/usr \
      --with-gd=/usr
    I installed under /usr/local/php53 to keep it from conflicting with the OS base install package. I switched to use the new mysqlnd library within PHP and all is working fine with Joomla sites.
  13. KXP

    KXP New Member

    What I got:
  14. holisticspider

    holisticspider New Member

    yum install pcre-devel
  15. KXP

    KXP New Member

    Ok I also had some problems, but now fixed them all, thank you.
    A hint for future users: there is a good instrument in Debian- apt-cache search "text". If you get errors saying about this or that pakidge mismatching try it out.

Share This Page