The Soothingly Seamless Setup of Apache, SSL, MySQL, and PHP - PHP Installation (*NIX) (Page 6 of 11 )
Now it's time to install the PHP (Hypertext Prerocessor) language.
You are still supposedly root, if not su back to root.
PHP requires that you have Apache pre-configured so that it knows where where everything is. You will come back to this later in the section when you setup the Apache server. Change back to the directory where you have the sources.
# cd /tmp/download# gunzip -c apache_1.3.12.tar.gz | tar xf -# cd apache_1.3.12# ./configure --prefix=/usr/local/apache# cd ..
Ok, now you can start with PHP. Extract the source files and change to the new directory.
# gunzip -c php-4.0.0.tar.gz | tar xf -# cd php-4.0.0
Configure will always be your friend if you are compiling code :-) So, again there are many options with the configure command. Use "configure --help" to determine what you want to add. We just want MySQL and of course Apache.
# ./configure --with-mysql=/usr/local/mysql \
--with-xml \
--with-apache=../apache_1.3.12 \
--enable-track-vars
Make and install the binaries.
# make# make install
Copy the ini file to the lib directory.
# cp php.ini-dist /usr/local/lib/php.ini
You can edit the PHP file to set PHP options. You could for example increase the "max_execution_time" in PHP by inserting the following line in your php.ini file.
max_execution_time = 60;
Next: Apache >>
More PHP Articles
More By Israel Denis Jr. and Eugene Otto