Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having bit of a trouble here. I have a SLES machine which was running on php 5.3, but for some reason it was downgraded to 5.2. Since 5.3 can't be installed over YAST (repositories aren't up to date, and there's no connection to the internet to update those) I have to install php from source.

I have googled and read the INSTALL documentation, but I can't figure out how to install 5.3 the same way it was before. The current installation is in /etc/php5 with apache being installed in /etc/apache2, and I need support for PDO with PostGres. phpinfo states the following for the configure command

'./configure' '--prefix=/usr' '--datadir=/usr/share/php5'
'--mandir=/usr/share/man' '--bindir=/usr/bin' '--with-libdir=lib64'
'--includedir=/usr/include' '--sysconfdir=/etc/php5/apache2'
'--enable-libxml' '--enable-session' '--with-mm' '--with-pcre-regex=/usr' 
'--enable-xml' '--enable-simplexml' '--enable-spl' '--enable-filter' 
'--disable-debug' '--enable-inline-optimization' '--disable-rpath' 
'--disable-static' '--enable-shared' '--program-suffix=5' '--with-pic' 
'--with-gnu-ld' '--with-system-tzdata=/usr/share/zoneinfo' 
'--with-apxs2=/usr/sbin/apxs2' '--disable-all' '--disable-cli'

Any help is greatly appreciated!

share|improve this question

migrated from May 2 '12 at 13:42

This question came from our site for professional and enthusiast programmers.

So you are running a machine with no (security) updates?! Even if it's not connected to the internet - who knows if that won't change at some point in the future! – ThiefMaster May 2 '12 at 6:17
Well, I know it won't connect to the internet, because it's only purpose is web task management for internal purposes. – Ahatius May 2 '12 at 6:19
It would still be a good idea to give it one-way access to the internet (no incoming connections from outside but outgoing connections) to keep it up to date! – ThiefMaster May 2 '12 at 6:23
Thanks for the info, I'll ask the infrastructure admin about the connection (since I would benefit from that also). – Ahatius May 2 '12 at 6:27
Tell him even internal machines need to be kept up to date since a potential attacker might be working at your company and thus have network access to the machine. – ThiefMaster May 2 '12 at 6:29

type "configure --help" to find out anything you need then add to the configure command.

support for PDO with postGres you need --with-pdo-pgsql=DIR DIR is the PostgreSQL base install directory or the path to pg_config

share|improve this answer
What I tried was running the config with the parameters from the phpinfo. It tells me that " apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs". Do I need that parameter? – Ahatius May 2 '12 at 6:49
I tried the config without apxs2 and it looks like he accepted it. What's the next step? What commands do I need to execute? – Ahatius May 2 '12 at 6:53
make && make install – Kevin Wang May 2 '12 at 7:08
Tried that, but make throws "make: *** No targets specified and no makefile found. Stop.". There are makefiles with extensions, guess it should only be "makefile". The reason he doesn't create it is probably because he throws this error in configure: "configure: error: xml2-config not found. Please check your libxml2 installation." – Ahatius May 2 '12 at 7:12
download and install libxml from here.then --enable-libxml=DIR linkhttp:/‌​/ – Kevin Wang May 2 '12 at 7:18

I've talked to the admin. We have updated the machine with SP2, which also includes php 5.3.

I've got some configuration problems now, but I'll see if I can fix them, otherwise new question.

Thanks for the help anyway ;)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.