note 103119 added to json.installation
| From: | Zeathe at osu1 dot php dot net | Date: | Sun, 27 Mar 2011 01:22:56 +0000 |
| Subject: | note 103119 added to json.installation | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178243@lists.php.net to get a copy of this message | ||
A note for those who are actually using SELinux....
Per dmitryzayats:
|Installation steps on CentOs 5.3 include
|
|# 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 that phpinfo() would output
|
|json support enabled
|json version 1.2.1
This is not quite correct on SELinux enabled.
You must change the context of the json.so module for SELinux as it adopts the tmp_t context and
user-space User.... fix this simply by executing:
# chcon -u system_u -t textrel_shlib_t /usr/lib/php/modules/json.so
Otherwise...SELinux audit log will show something like:
type=AVC msg=audit(1301186547.574:24405): avc: denied { read } for pid=26998
comm="httpd" name="json.so" dev=dm-0 ino=28639463
scontext=user_u:system_r:httpd_t:s0 tcontext=user_u:object_r:tmp_t:s0 tclass=file
...and you will see json.ini being parsed and still not see the JSON info section in phpinfo()
output as PHP is being denied access to the module by SELinux.
----
Server IP: 69.147.83.197
Probable Submitter: 74.92.230.34
----
Manual Page -- http://www.php.net/manual/en/json.installation.php
Edit -- https://master.php.net/note/edit/103119
Del: integrated -- https://master.php.net/note/delete/103119/integrated
Del: useless -- https://master.php.net/note/delete/103119/useless
Del: bad code -- https://master.php.net/note/delete/103119/bad+code
Del: spam -- https://master.php.net/note/delete/103119/spam
Del: non-english -- https://master.php.net/note/delete/103119/non-english
Del: in docs -- https://master.php.net/note/delete/103119/in+docs
Del: other reasons-- https://master.php.net/note/delete/103119
Reject -- https://master.php.net/note/reject/103119
Search -- https://master.php.net/manage/user-notes.php