Tuesday, December 7, 2010

Honey Moon Tea Effects

ADS authenticated JSON and Linux CentOS 0.5


  • What is JSON? Installation

  • CentOS 5.3/5.4 and PHP5.1.6


According to wikipedia JSON is an acronym for JavaScript Object Notation is a lightweight format for data exchange. JSON is a subset of the object literal notation of JavaScript that does not require the use of XML.



The simplicity of JSON has led to their widespread use, especially as an alternative to XML in AJAX. One of the supposed advantages of JSON over XML as data interchange format in this context is that it is much easier to write a JSON semantic analyzer. In JavaScript, JSON text can be easily analyzed using the procedure eval () , which has been fundamental to JSON has been accepted by the AJAX developer community due to the ubiquity of JavaScript in almost any web browser.


In practice, the arguments for facility development or performance analyzers believes are not relevant due to security issues posed by the use of eval () and the rise of native processing XML embedded in modern browsers. For that reason, JSON is commonly used in environments where the size of the data stream between client and server is of vital importance (hence its use by Yahoo, Google, etc, that cater to millions of users) when the data source is explicitly trusted and where it is important not to have XSLT processing to manipulate the data on the client.


While it is common to see positioned against JSON XML, is also frequent use of JSON and XML in the same application. For example, a client application that integrates data from Google Maps with weather data necessitate
SOAP support both formats.


There is growing support for JSON packets using written by third parties. The list of supported languages \u200b\u200bincluding ActionScript, C, C #, ColdFusion, Common Lisp, Delphi, E, Eiffel, Java, JavaScript, ML, Objective CAML, Perl, PHP, Python, Rebol, Ruby, and Lua.


for this growing popularity, began to use on your projects. Which run on an enterprise version of Linux, CentOS, characterized by long life cycles, with stable market products (including Json was not the time to create the version). In reviewing the versions of server products verified that the PHP package that came in the server is 5.1.x, which does not support already installed. Given the need to use JSON in our servers and trying to respect the philosophy of business disto, we decided to add JSON support to PHP.


Installation on CentOS 5.3/5.4/5.5 and PHP 5.1.x



# Yum install php-devel
# yum install php-pear
# yum install gcc
# pear install pecl / json

# cd / etc / php.d
# echo "extension = json.so"> json.ini
# service httpd restart

After the restart, create a test.php file with phpinfo function
and got on the web server. Upon request we will:




json support enabled json version 1.2.1

This procedure does not alter the OS and not add an external repository.