Posts tagged SuPHP Cannot allocate memory Error

/usr/bin/php: error while loading shared libraries: libselinux.so.1

While enabling PHP SuPHP handler  on one of my server, I  started to get 500 Internal Server Error for all php pages .

So, my initial reaction  was to check  the Permissions and Ownerships for all PHP  files as while enabling PHP SuPHP  the max file permissions should be 644 and max folder permissions should be 755 and all  php files should ran under the ownership of user.user instead of apache.apache.

Also, I have checked all .htaccess files to see any one of the contains PHP flags like php_flag or php_admin_value as while enabling PHP SuPHP all PHP flags defined under .htaccess files will  result in a   500 Internal Server Error .

But after checking all the above, I  started to wonder as to what it could be  and then I realized  that it could be the RLimitMEM and RLimitCPU defined in the httpd.conf file and after disabling those values all the PHP  pages started to  work like a charm. 
Continue reading /usr/bin/php: error while loading shared libraries: libselinux.so.1