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!

  • 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
  • 3
    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
  • 2
    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

  • 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
  • 1
    download and install libxml from here.then --enable-libxml=DIR linklinuxfromscratch.org/blfs/view/svn/general/libxml2.html – 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 ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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