This question is closed because it's offtopic. I've posted again in http://serverfault.com/questions/481032/problems-installing-php5-from-source-in-ubuntu. Excuse me for the inconveniences.
I've been trying to install php5 for a while.
I'm using. Ubuntu 12.10 Apache 2.4.3
And the version of php I want to install is: PHP 5.4.11
I follow the documentation in the webpage.
I install Apache (after putting the apr and apr-util folders in ./scrlib, just as the documentation says).
sudo ./configure --enable-so
sudo make
sudo make install
All of these commands output a lot of information, but no error nor warning as long as I'm aware.
Just for the record:
/usr/local/apache2/bin/httpd -l
Compiled in modules:
core.c
mod_so.c
http_core.c
event.c
mod_so.c is there, so I think the installation were alright.
Now, I attempt to install PHP (after putting the
.sudo ./configure \
--prefix=/home/usr/local/php5/ \
--with-mysql \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-xsl \
--with-gdbm \
--with-gd \
--with-freetype=/usr/include/freetype2/ \
--with-zlib-dir=/usr/include \
--with-ttf \
--with-jpeg-dir=/usr/lib
Everything goes fine except the following warning:
configure: WARNING: unrecognized options: --with-freetype, --with-ttf
However, those options aren't the greatest of my problems and I follow to the next steps.
sudo make
And these are the lasts lines of the output.
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
invertedregexiterator.inc
pharcommand.inc
directorytreeiterator.inc
directorygraphiterator.inc
clicommand.inc
phar.inc
Build complete.
Don't forget to run 'make test'.
Next step.
sudo make install
Everything seems fine.
sudo cp php.ini-development /usr/local/lib/php.ini
I edit the conf file (/usr/local/apache2/conf/httpd.conf). The line...
LoadModule php5_module modules/libphp5.so
...was already there. Just under that line I add:
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
I restart apache:
sudo service apache2 restart
So, php5 should be already installed. I make the following script in php.
// info.php
<?php
phpinfo();
?>
And saved it in /var/www/info.php
I put the following url in my browser:
http://127.0.0.1/info.php
There's no output.
Why? What did I miss?
And the version of php I want to install is: PHP 5.4.11
. – h2ooooooo Feb 20 at 10:11/var/log/apache2/error.log
? – Colin Pickard Feb 20 at 10:12