Tuesday, October 21, 2008

libsybtcl.so: cannot open shared object file: No such file or directory

libsybtcl.so: cannot open shared object file: No such file or directory

 

Problem: after php configuration with Sybase-ct and make install, when restarting apache it failes:

libsybtcl.so: cannot open shared object file: No such file or directory

 

Solution:

 

Copy the content of the entire /opt/sybase/OCS-12_5/lib directory to /usr/lib/

 

Restart apache check phpinfo() you should find sybase_ct installed 

configure: error: all--with-sybase-ct=/opt/sybase/OCS-12_5/: invalid feature name

Problem:

 

When you run ‘./configure…’ you get this error:

 

configure: error: all--with-sybase-ct=/opt/sybase/OCS-12_5/: invalid feature name

 

Solution:

 

Move the '--with-sybase-ct=/opt/sybase/OCS-12_5/' option or any other option you may have after  '--disable-all' before ‘—disable-all’

ERROR: Cannot run tests without CLI SAPI.

Problem:

 

After a successful ‘./configure…’ command you are instructed to run ‘make test’ but the command fails:

 

ERROR: Cannot run tests without CLI SAPI.

 

Solution:

 

If you are on a development server you should ignore this error and launch ‘make install’.

 

If you are on a production server then check your configure option for '--disable-cli'   and remove it from the command.

 

Make test will run fine after that

Monday, October 20, 2008

Getting details about your current installed version of php

The best way to get information like installed php version is to use the phpinfo()  function.

To use the phpinfo()  function go to your document root ( /srv/www/htdocs/ )  write a new file, name it phpinfo.php ( or whatever you like ) and write the folowing inside:
phpinfo();
?>

now go to your browser and access the page:  http://yourserver/phpinfo.php

you should now see detailed information about the version of php you have instaled and other valuable information like the comand used to configure php:
ex:

'../configure' '--prefix=/usr' '--datadir=/usr/share/php5' '--mandir=/usr/share/man' '--bindir=/usr/bin' '--with-libdir=lib' '--includedir=/usr/include' '--sysconfdir=/etc/php5/apache2' '--with-config-file-path=/etc/php5/apache2' '--with-config-file-scan-dir=/etc/php5/conf.d' '--enable-libxml' '--enable-session' '--with-mm' '--with-pcre-regex=/usr' '--enable-xml' '--enable-simplexml' '--enable-spl' '--enable-filter' '--disable-debug' '--enable-inline-optimization' '--disable-rpath' '--disable-static' '--enable-shared' '--program-suffix=5' '--with-pic' '--with-gnu-ld' '--with-system-tzdata=/usr/share/zoneinfo' '--with-apxs2=/usr/sbin/apxs2' '--disable-all' '--disable-cli'

Php 5.2.6 recompilation

To recompile php on a clean installed Suse linux first get your current version of installed php using the phpinfo() function.

Step 2 is to download the source for you installed php (or to upgrade the the lateste version). The latest version is now php 5.2.6 and the link where you can download it is http://www.php.net/get/php-5.2.6.tar.bz2/from/a/mirror 

Step 3 untar the archive you have dowloaded:

tar -zxvf php-5.2.6.tar.tar

Step 4: cd to the untared directory; ex: cd php-5.2.6

Step 5(try to recompile php without adding any extra configuration) :
copy the entire './configure..' line from your phpinfo.php file, paste it into the console : it should look like this:

'./configure' '--prefix=/usr' '--datadir=/usr/share/php5' '--mandir=/usr/share/man' '--bindir=/usr/bin' '--with-libdir=lib' '--includedir=/usr/include' '--sysconfdir=/etc/php5/apache2' '--with-config-file-path=/etc/php5/apache2' '--with-config-file-scan-dir=/etc/php5/conf.d' '--enable-libxml' '--enable-session' '--with-mm' '--with-pcre-regex=/usr' '--enable-xml' '--enable-simplexml' '--enable-spl' '--enable-filter' '--disable-debug' '--enable-inline-optimization' '--disable-rpath' '--disable-static' '--enable-shared' '--program-suffix=5' '--with-pic' '--with-gnu-ld' '--with-system-tzdata=/usr/share/zoneinfo' '--with-apxs2=/usr/sbin/apxs2' '--disable-all' '--disable-cli'

Hit enter, the configuration script should run fine and you should have no problems.