Archive for the ‘php’ Category

utf8_mime2text error in compiling php

Monday, December 29th, 2008

The error:
==============
checking for utf8_mime2text signature… new
checking for U8T_CANONICAL… no
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
==============
The fix:
==============
yum install libc-client-devel
==============

curl_exec error 60 SSL certificate problem

Wednesday, November 19th, 2008

The problem :
=================
curl_exec error 60 SSL certificate problem
=================
This is mainly caused because the curl root certificates file does not contain the particular root certificate chain.The best method would be add the correct root certificate to the file obtained by running the command

curl-config –ca
or a quick dirty trick would be add the following line
===================

curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, [...]

List of Different web servers on GNU Linux

Friday, September 19th, 2008

Today we have different web servers available on the GNU/Linux platform.Here i am listing only the web servers that can be used for a mainstream web hosting environment
The web servers can be classified basically into 2
1. Process based webserver - In a process based web server each new connection is handled by a new web [...]

Howto install php-fpm: PHP FastCGI Process Manager

Monday, August 11th, 2008

A PHP FastCGI Process manager can be a used to spawn php fastcgi server instances when you have configured your web server to pass php scripts to a FastCGI server .This can be used with web servers like Nginx and lighthttpd .
Download the patch file for your php version from http://php-fpm.anight.org/
Download your php version of [...]

howto install ffmpeg-php

Saturday, July 12th, 2008

According to the official ffmpeg-php website: ffmpeg-php is an extension for PHP that adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. It has methods for returning frames from movie files as images that can be manipulated using PHP’s image functions
Inodder to use this extension;you [...]

apache2 mod_suphp php-cgi

Thursday, May 22nd, 2008

A slight change in the setup and now i can see the user who is executing the scripts in my website
Before when apache intrepets a php script it calls fastcgi which inturn calls the php cgi binary.But still the php binary is executed as the calling user which in our case is the user [...]

apache mod_fcgid internal server error

Thursday, May 22nd, 2008

Today gnusys.net had a little downtime as i was trying to change my apache-php interface into FastCGI.
The installation of php-cgi and mod_fcgid went pretty simple in my Debian Etch;so was the configuration
The tricky part was that the wordpress blog was giving Internal Server Error in the index page.
====
[Thu May 22 04:15:41 2008] [notice] mod_fcgid: call [...]

plesk increase php memory_limit for a vhost

Thursday, May 15th, 2008

You can change the php memory_limit value for a particular domain or on a per virtual host basis by the following way
Add the following line to the file
/home/httpd/vhosts/gnusys.net/conf/vhost.conf
php_admin_value memory_limit “128M”
Reconfigure the vhost by running the following command
/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=gnusys.net
and restart the webserver using the command
/usr/local/psa/admin/sbin/websrvmng –restart
Check if the setting is correct using phpinfo(); function

Howto Install Xcache

Monday, May 12th, 2008

Xcache is a very good php cache that can accelerate php page deliveries .The following example uses xcache version 1.2.2.Please check the website http://xcache.lighttpd.net/ before you start the installation for the latest available release of this actively maintained software
neutron:~# wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz
neutron:~# tar -xvzf xcache-1.2.2.tar.gz
neutron:~# cd xcache-1.2.2/
neutron:~/xcache-1.2.2# phpize
neutron:~/xcache-1.2.2# ./configure –enable-xcache –enable-xcache-optimizer
neutron:~/xcache-1.2.2# make
neutron:~/xcache-1.2.2# make install
neutron:~/xcache-1.2.2# cat xcache.ini [...]

pecl install -gcc error

Thursday, May 8th, 2008

If you get the following error while trying to install pecl packages
=============
pecl install xmlrpci-1.0
WARNING: channel “pear.php.net” has updated its protocols, use “channel-update pear.php.net” to update
downloading xmlrpci-1.0.tgz …
Starting to download xmlrpci-1.0.tgz (9,668 bytes)
…..done: 9,668 bytes
4 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: [...]