[Resolved] PHP & MySQL problem

#1
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:
root@localhost# /usr/local/lsws/fcgi-bin/lsphp -v
PHP 4.4.9 (litespeed) (built: Sep 16 2009 17:31:11)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
root@localhost# /usr/local/lsws/fcgi-bin/lsphp5 -v
PHP 4.4.9 (litespeed) (built: Sep 16 2009 17:31:11)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
The server is up-to-date (updated today). also ffrom PHPInfo I see:
Client API version 3.23.49
MYSQL_MODULE_TYPE builtin
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:
#3
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:
Main Status:

**MAIN_STATUS** retrieved from /usr/local/lsws/phpbuild/buildphp_1280772918.9.progress
Start building PHP 5.3.3 with LSAPI
Configuring PHP build (2-3 minutes)
**ERROR** Could not configure PHP build

Detailed Log:

...
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
**ERROR** Could not configure PHP build
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:

NiteWave

Administrator
#4
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
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?
 
#8
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:
Fatal error: require_once() [function.require]: Failed opening required './libraries/dbi/mysqli.dbi.lib.php' (include_path='.:/usr/local/lsws/lsphp5/lib/php') in /usr/local/lsws/path/phpmyadmin/libraries/database_interface.lib.php o
I guess there's smth with MySQL?
Other scripts which work with MySQL aren't running.
 
Last edited:
#9
Also what I saw in PHPInfo at last:
Configuration File (php.ini) Path /usr/local/lsws/lsphp5/lib
Loaded Configuration File (none)
Scan this dir for additional .ini files (none)
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:

NiteWave

Administrator
#10
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
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
I copied that file & restarted LiteSpeed. now
Loaded Configuration File /usr/local/lsws/lsphp5/lib/php.ini
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:
Fatal error: require_once() [function.require]: Failed opening required './libraries/dbi/mysqli.dbi.lib.php' (include_path='.:/usr/local/lsws/lsphp5/lib/php') in /usr/local/lsws/path/phpmyadmin/libraries/database_interface.lib.php on line 77
Other script which works with MySQL says:
Fatal error: Call to undefined function mysql_connect() in /usr/local/lsws/path/includes/file.php on line 311
So MySQL doesn't work.
 
Last edited:
#12
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.
 
#15
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.
 
Top