ToonMariner Posted November 3, 2009 Share Posted November 3, 2009 Hey peeps. Complete linux command line noob here...... Working on clients site - they have dedicated host with 1and1 and I am trying to install the json extension because the server has php 5.1.6 and client does not want to updgrade in case it kills his other sites (assured him it won't but he is the boss). server is running centos (i think v5) pear was not installed so I ran: yum install pear that was fine and 'which pear' reveals that its in usr/bin/pear... happy with that then I tried to install json... which pecl /usr/bin/pecl pecl install json downloading json-1.2.1.tgz ... Starting to download json-1.2.1.tgz (17,780 bytes) ......done: 17,780 bytes 11 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20050922 Zend Extension Api No: 220051025 building in /var/tmp/pear-build-root/json-1.2.1 running: /tmp/tmp50rtMu/json-1.2.1/configure checking for egrep... grep -E checking for a sed that does not truncate output... //bin/sed checking for gcc... no checking for cc... no checking for cc... no checking for cl... no configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. ERROR: `/tmp/tmp50rtMu/json-1.2.1/configure' failed so that didn't go to well... when I run phpinfo() on the site the configure demand has ''--without-pear' which I reckon will hurt me... What on earth do I need to do - all the stuff I have tried i got from googling stuff and I'm now stuck. Any help will be VERY much appreciated. Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted November 3, 2009 Share Posted November 3, 2009 You need a C compiler as the error states. yum install gcc Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 3, 2009 Author Share Posted November 3, 2009 NEIL I LOVE YOU... I think that all went well find -name *json* reported json.reg in NOW is that --without-pear in the configuration command shown in phpinfo going to hurt? or do I just need to add the json.so to the modules in php.ini? Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted November 3, 2009 Share Posted November 3, 2009 I think pear install is yum install php-devel Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 3, 2009 Author Share Posted November 3, 2009 which pear /usr/bin/pear So I think that's already installed. does php have to be compiled with pear OR can I just add extension = json.so to the config file (or rather add the json.ini with that command in the php.d directory)? Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted November 3, 2009 Share Posted November 3, 2009 Not needed as a shared object. Just include the PEAR library include('Services/JSON.php'); Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 3, 2009 Author Share Posted November 3, 2009 OK but if I added the json.so to the extensions that would work too? Quote Link to comment Share on other sites More sharing options...
primefalcon Posted November 10, 2009 Share Posted November 10, 2009 I kinda advise installing the build-essential as well Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted November 10, 2009 Share Posted November 10, 2009 Compiling PHP --without-pear just means that make install won't install PEAR. This is irrelevant when you're using a package manager. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.