Archive

Archive for the ‘Cpanel Server’ Category

How do I enable/disable eAccelerator?

March 20th, 2009 1 comment

eAccelerator is used improve performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution.
If  eAccelerator is installed on serverwide then it is enable for all account or you can enable it eAccelerator by makeing  a .htaccess file in your ‘htdocs’ directory, and add the following lines:

php_flag eaccelerator.enable 1
php_flag eaccelerator.optimizer 1

if you’d like to turn off eAccelerator for a particular directory, put the following in a .htaccess file in that subdirectory:

php_flag eaccelerator.enable 0
php_flag eaccelerator.optimizer 0

If php suexec is enabled on server then create php.ini file and following code in that file to disble eAccelerator.

eaccelerator.enable 0
eaccelerator.optimizer 0

Regards
Alex P
System Administrator

Categories: Cpanel Server Tags:

Install & compile Firebird InterBase database server with PHP on Linux Server ?

March 18th, 2009 1 comment

What is firebird

Firebird is an open source relational database offering many ANSI SQL-99 features that runs on Linux, Windows, and a variety of Unix platforms. Firebird offers excellent concurrency, high performance, powerful language support for stored procedures and triggers. It has been used in many production systems within a large number of commercial companies since 1981.

Steps to compile compile firebird module with php

  • Download the firebird module
 #cd /usr/src
 #wget http://nchc.dl.sourceforge.net/sourceforge/firebird/
       Firebird-2.0.3.12981-1.tar.bz2

  • Manually build and install the firebird module
#tar -jxf Firebird-2.0.3.12981-1.tar.bz2
#cd Firebird-2.0.3.12981-1
#mv Firebird-2.0.3.12981-1 firebird
#cd firebird
#./autogen.sh; make;make install

  • Rebuild PHP along with the firebird
–with-interbase=/usr/src/firebird’ option.

When installing is finished, open the php.ini configuration file (located in /usr/local/lib/), and check if these lines exist (uncomment/modify them if necessary):

magic_quotes_sybase = On ; Use Sybase-style magic quotes (escape ' with '' instead of ')
extension=php_interbase.so

magic_quotes_sybase = On;Use Sybase-style magic quotes (escape ' with '' instead of ')
extension=php_interbase.so

4) check php module using php -m command

Regards

Stacy

System Administrator.

How to compile pdo_mysql module with php ?

March 18th, 2009 3 comments

Hello,

PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MySQL 3.x and 4.x databases.

PDO_MYSQL will take advantage of native prepared statement support present in MySQL 4.1 and higher. If you’re using an older version of the mysql client libraries, PDO will emulate them for you.

Steps to compile compile pdo_mysql module with php

1) Download the PDO package to server

          # wget http://pecl.php.net/get/PDO

2) Manually build and install the PDO extension:

	  # tar xzf PDO-0.2.tgz
	  # cd PDO-0.2
	  # phpize
	  # ./configure
          # make
          # make install
          # echo extension=pdo.so >> /usr/local/php5/lib/php.ini

3) rebuild PHP along with the drivers for PDO_mysql.

CUSTOM_PHP_FLAGS=”–with-pdo-mysql” /scripts/easyapache

4) check php module using php -m command

Enjoys