-1

I try to run my phpinfo.php file with php5.ini, but still show me "Forbidden: You don't have permission to access /phpinfo.php on this server." error message. My site is working, only that phpinfo not...

But, if rename it the php5.ini to php.ini the phpinfo is working and show all the details. Only the problem is, my site can't working with php.ini. Have to rename it to php5.ini...

Anybody know any solution for fix it and be work with php5.ini as well?

Marcell Nemeth
  • 97
  • 3
  • 4
  • 13
  • 1
    That's way too vague of a description. I doubt that's answerable without letting on more concretely what you edited, correct paths, Apache vhost configuration, and PHP SAPI and setup details, and most importantly: `error.log` infos. – mario Aug 28 '15 at 19:50
  • Not a big change I did, just added "Options Indexes FollowSymLinks Includes ExecCGI" lines to .../apache/httpd.conf and installed php5.4, php5.5 and php5.6 with php selector... – Marcell Nemeth Aug 28 '15 at 20:41

1 Answers1

0

It's possible that your php5 running as CGI instead as an apache module.

So you have to configure Apache to use the PHP CGI modifing the httpd.conf.

Maverick
  • 905
  • 8
  • 23
  • Yeah, the php5 is running at CGI/FastCGI mode... What I have to modifing in the http.conf? Sorry, is not clear for me... – Marcell Nemeth Aug 28 '15 at 20:57
  • follow this: http://blog.no-panic.at/2007/01/26/installing-php5-cgi-on-debian/ Check if your path is "/usr/lib/cgi-bin/php5" otherwise change it with your install location – Maverick Aug 28 '15 at 21:03
  • Moreover in this forum someone have your same problem https://forums.cpanel.net/threads/you-dont-have-permission-to-access-phpinfo-php-on-this-server.10824/ – Maverick Aug 28 '15 at 21:07
  • sorry for the late reply, but the issue still not fixed. I can't run it the phpinfo.php file, but (for example) the phpBB phpinfo options still working if I click on it... I really not understand what's the problem... – Marcell Nemeth Sep 09 '15 at 22:10
  • check the "server API" in the phpBB phpinfo, you can see this guide https://www.opensource-excellence.com/blog/item/416-how-to-determine-php-is-running-as-php-cgi-or-apache-module?.html – Maverick Sep 10 '15 at 01:12