[BlueOnyx:06912] Re: JSON and PHP

Herb Rubin herbr at pfinders.com
Wed Apr 6 16:15:06 -05 2011


Dennis,

I see I tried running it under /tmp and that filesystem has noexec. I moved it to
the /root home directory and got better results.

cd /root
pecl download json
tar -zxvf json-1.2.1.tar.gz
cd json-1.2.1
phpize
autoconf
autoheader
./configure
make
make install

vi /etc/php.d/json.ini
type this line and file it -> extension=json.so
/sbin/service httpd restart

To prove it works type this:

php -r 'var_dump(function_exists("json_encode"));'


Why do all of the above? So you have json_encode() and json_decode() as PHP functions
that are now standard in PHP 5.2.1 and higher.

See:

http://www.itnewb.com/v/Introduction-to-JSON-and-PHP

Herb





----- Original Message -----
From: "Dennis" <daodennis at gmail.com>
To: "BlueOnyx General Mailing List" <blueonyx at blueonyx.it>
Cc: "Herb Rubin" <herbr at pfinders.com>
Sent: Wednesday, April 6, 2011 1:37:30 PM
Subject: Re: [BlueOnyx:06906] JSON and PHP

On Wed, Apr 6, 2011 at 1:25 PM, Herb Rubin <herbr at pfinders.com> wrote:

> /usr/bin/phpize: /tmp/tmpi2jOM6/json-1.2.1/build/shtool: /bin/sh: bad interpreter: Permission denied

Hey Herb,

Are you running this as root/sudo?  At surface level sounds like a
directory permissions issue.


Dennis O.

-- 

Herb Rubin
Pathfinders Software
http://www.pfinders.com 



More information about the Blueonyx mailing list