extjs / php4 on standard rhel4 requires installing json

I was playing with the extjs lib http://extjs.com/deploy/ext-2.0.1.zip on a standard rhel4 apache/php4 setup, and was wondering why the examples that use the jason encoding routines where not working. After sorting out all the misleading information that google came up with about json requiring php5, I finally have the solution for php4, and it is very simple:

1. Download php-json-ext-1.2.1.tar.bz2 from http://www.aurore.net/projects/php-json/

2. Extract and install: tar xfj php-json-ext-1.2.1.tar.bz2 ; cd php-json-ext-1.2.1 ; ./configure –prefix=/usr ; make install

3. Edit /etc/php.ini and add the line “extension=json.so”, then do a service httpd reload.

voila, it works: test.php can now do json_encode($arrayname), and all the extjs examples that use json to provide data to the tree-container drag and drop examples like /var/www/html/ext-2.0.1/examples/tree/two-trees.html now work.

I just confirmed it also works with the newer ext-2.1. Now all I have to do is figure out how to create proper trees from dmidecode output 😉

Advertisements

~ by MrMichaelWill on February 14, 2008.

2 Responses to “extjs / php4 on standard rhel4 requires installing json”

  1. thanks this really helped me out

  2. Hi! I was surfing and found your blog post… nice! I love your blog. 🙂 Cheers! Sandra. R.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: