Linux Help - Installing PHP on Linux machine

//VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
// Linux Help - Installing PHP on Linux machine
//VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

Just download the latest version of PHP and unzip it.

Second step is to make sure you unzip in the desired PHP directory and run the configure script.
To enable PHP to access Sybase, you may need to –with-sybase-ct.
You will also need to specify the web server interface to be used; in this situation, this is Apache,
so we will use –with-apache To generate a CGI version of PHP, –with-apache.

Below is the complete script to configure with the two otions above
Here is a complete configure script with the above two options, as well as a number of other options that are useful.

# ./configure –with-apache=../apache_1.3.19
–with-sybase-ct=/opt/sybase –enable-bcmath –enable-calendar
–enable-ctype –enable-exif –enable-ftp –enable-gd-imgstrttf
–with-gd –enable-trans-sid –enable-shmop –enable-sockets
–enable-sysvsem –enable-sysvshm –enable-wddx

Then you will have to change to apache’s path to where you have unzip the apache distribution

If the configuration runs and completed succesfully, you may proceed

# make && make install

PHP will compule without any problems. After installing, you will need to install the php.ini file.

# cp php.ini-optimized /usr/local/lib/php.ini

The next step is to change settings in /usr/local/lib/php.ini, you need to set the file with the following parameters shown below.

magic_quotes_sybase = on
sybct.min_server_severity = 11
sybct.min_client_severity = 11

I also like to set the following:
To set the register global on or off (it is advisable to be off) Do not depend on register globals
too much this is for security purposes.

register_globals = off
include_path=.:/usr/local/lib/php


About this entry