3

I have a vserver running openSuse 10.3, Apache 2 and Plesk 8.4. I can update/upgrade neither, as it is apparently not recommended to upgrade openSuse 10.3 (and an update to the EOL 10.4 does not seem to make much sense) and Plesk fails to update no matter what version I try (even fails to upgrade to 8.4.1). Still I can live with that somehow, primarily because I don’t have the time to do a fresh remote install on the vserver.

What really is a problem is, that though the installed PHP is 5.2.6 it has no zip library and no json functions. The first is probably because PHP was not compiled with --enable-zip. The second is a big mystery though. As I understand it, it always comes with PHP unless its compiled with the --disable-json configure option. This is however not the case. And the json extension module is just not there. I even tried to enable it with extension=json.so with no luck either.

the configure options of my PHP are (as shipped with Plesk 8.4)

'../configure' 
'--prefix=/usr' 
'--datadir=/usr/share/php5' 
'--mandir=/usr/share/man' 
'--bindir=/usr/bin' 
'--with-libdir=lib' 
'--includedir=/usr/include' 
'--sysconfdir=/etc/php5/apache2' 
'--with-config-file-path=/etc/php5/apache2' 
'--with-config-file-scan-dir=/etc/php5/conf.d' 
'--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'

As I understand it, PECL is not an option with 5.2.6. Or am I mistaken? Even if I was not, the openSuse repository only goes as far as PHP 5.2.4. The openSuse install even came without zypper, which I had to manually install.

So is there a way to get ziplib and json running in PHP 5.2.6 without having to recompile the binary?

6
  • "PECL is not an option with 5.2.6" - what makes you think this?
    – MrWhite
    Aug 27, 2012 at 20:22
  • I might have read this on other boards. And I did not find any PECL (I think it’s the php-pear package in yast for 5.2.6). but as I already said, it’s a big possibility, that I am mistaken.
    – maddrag0n
    Aug 28, 2012 at 8:58
  • I just checked php.net/releases and did only find PECL 5.2.6 packages for Windows.
    – maddrag0n
    Aug 28, 2012 at 9:37
  • This should probably be migrated to SO
    – Anagio
    Oct 9, 2013 at 19:44
  • This should be moved to Unix&Linux instead.
    – mirabilos
    Dec 30, 2014 at 15:54

1 Answer 1

1

If this has happened it sounds like for some reason the json extension was not included for some reason. This can be fixed by downloading the json.so file from the PHP source repository, uploading it to the /usr/lib/php5/extensions directory and then restarting Apache. Will work fine from there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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