Author Topic: Assistance needed :P  (Read 1142 times)

0 Members and 1 Guest are viewing this topic.

Offline ToonMarinerTopic starter

  • Fanatic
  • Gender: Male
    • View Profile
Assistance needed :P
« on: November 03, 2009, 06:21:41 AM »
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:

Code: [Select]
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...

Code: [Select]
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.
follow me on twitter @PHPsycho

Offline neil.johnson

  • Guru
  • Addict
  • *
  • Gender: Male
    • View Profile
Re: Assistance needed :P
« Reply #1 on: November 03, 2009, 06:24:01 AM »
You need a C compiler as the error states.
Code: [Select]
yum install gcc
Quote
To start, press any key. Where's the 'Any' key?


Offline ToonMarinerTopic starter

  • Fanatic
  • Gender: Male
    • View Profile
Re: Assistance needed :P
« Reply #2 on: November 03, 2009, 07:24:24 AM »
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?
follow me on twitter @PHPsycho

Offline neil.johnson

  • Guru
  • Addict
  • *
  • Gender: Male
    • View Profile
Re: Assistance needed :P
« Reply #3 on: November 03, 2009, 07:51:47 AM »
I think pear install is
Code: [Select]
yum install php-devel
Quote
To start, press any key. Where's the 'Any' key?


Offline ToonMarinerTopic starter

  • Fanatic
  • Gender: Male
    • View Profile
Re: Assistance needed :P
« Reply #4 on: November 03, 2009, 08:29:43 AM »
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)?

follow me on twitter @PHPsycho

Offline neil.johnson

  • Guru
  • Addict
  • *
  • Gender: Male
    • View Profile
Re: Assistance needed :P
« Reply #5 on: November 03, 2009, 08:38:38 AM »
Not needed as a shared object. Just include the PEAR library
Code: [Select]
include('Services/JSON.php');
Quote
To start, press any key. Where's the 'Any' key?


Offline ToonMarinerTopic starter

  • Fanatic
  • Gender: Male
    • View Profile
Re: Assistance needed :P
« Reply #6 on: November 03, 2009, 09:45:27 AM »
OK but if I added the json.so to the extensions that would work too?
follow me on twitter @PHPsycho

Offline primefalcon

  • Irregular
    • View Profile
Re: Assistance needed :P
« Reply #7 on: November 10, 2009, 12:41:59 PM »
I kinda advise installing the build-essential as well

Offline Daniel0

  • Administrator
  • 'Insane!'
  • *
  • Gender: Male
  • ^bb|[^b]{2}$
    • View Profile
    • degeberg.com
Re: Assistance needed :P
« Reply #8 on: November 10, 2009, 05:04:28 PM »
Compiling PHP --without-pear just means that make install won't install PEAR. This is irrelevant when you're using a package manager.

PHP Freaks Forums

« on: »

Tired of these ads? Purchase a supporter subscription to get rid of them.