include_path not working – php centos

Have you been banging your head on the wall for days, trying to figure out why your include_path in php.ini is not workin? and you have tried …

1. restarting your apache/nginx
2. and verified that you are editing correct file
3. and doubled check the phpinfo() and include path is correctly set
4. and tried checking the get_include_path() whether it’s including it at run time?

Well there’s one more thing you haven’t done!

late that i know that this is not a PHP nor apache/nginx issue.

happenss to be an OS issue! for my case im using Centos 6 and i happen to discover from a friend that Centos ships with SELinux. what’s SELinux?? check out here for the explanation =>

You have to disable the SELinux for apache to be able to work outside the public path!

Give it a try!

phpMyAdmin can’t login

One of the common issue of phpMyAdmin  is getting the error on cookie or sometimes no matter how many times you login you keep getting redirected to login page.

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.

Screen Shot 2014-10-06 at 11.17.33 pm

At first i thought clearing the cookie will help solve the issue but in my case, I previously had a  apache webserver installed before i switched to nginx therefore the ownership of session folder was still under apache. All i had to do was to switch the folder ownership to nginx, but please note the effect of this incase you are still using apache user. On the command below i changed the ownership including the files inside the session folder because i know I’m not using apache user anymore. There are setup where by apache and nginx exists therefore both users are still valid and might be using the session folder.


[root@server1 php]# pwd
[root@server1 php]# ls -l
total 8
drwxrwx— 2 root apache 4096 Oct  5 15:54 session
drwxrwx— 2 root nginx  4096 Sep 20 15:16 wsdlcache
[root@server1 php]# chown root.nginx session -R
[root@server1 php]# ls -l
total 8
drwxrwx— 2 root nginx 4096 Oct  5 15:54 session
drwxrwx— 2 root nginx 4096 Sep 20 15:16 wsdlcache