0

My home PHPMyAdmin was working fine a day or two ago. Now it's giving me a generic 500 Internal Server Error and suggesting I look at my server logs.

The Apache log contains these error messages:

[Sun Feb 06 23:38:56 2011] [error] [client ::1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

And this is where I get stuck. Something is creating an infinite loop, but what can it be? I haven't done anything (that I can think of) to my setup since PHPMyAdmin was last working. Where would I follow the LimitInternalRecursion and LogLevel debug advice... an .htaccess file of some kind? I don't know where to find that.

Can anyone offer any pointers towards a solution or course of action?

EDIT: Thanks to Alvosu I've been able to get some information from the Rewrite log:

::1 - - [07/Feb/2011:09:19:48 --0800] [localhost/sid#10080d720][rid#1009854a8/initial] (3) [perdir /Library/WebServer/Documents/] strip per-dir prefix: /Library/WebServer/Documents/pma/ -> pma/
::1 - - [07/Feb/2011:09:19:48 --0800] [localhost/sid#10080d720][rid#1009854a8/initial] (3) [perdir /Library/WebServer/Documents/] applying pattern '^$' to uri 'pma/'
::1 - - [07/Feb/2011:09:19:48 --0800] [localhost/sid#10080d720][rid#1009854a8/initial] (3) [perdir /Library/WebServer/Documents/] strip per-dir prefix: /Library/WebServer/Documents/pma/ -> pma/
::1 - - [07/Feb/2011:09:19:48 --0800] [localhost/sid#10080d720][rid#1009854a8/initial] (3) [perdir /Library/WebServer/Documents/] applying pattern '(.*)' to uri 'pma/'
::1 - - [07/Feb/2011:09:19:48 --0800] [localhost/sid#10080d720][rid#1009854a8/initial] (2) [perdir /Library/WebServer/Documents/] rewrite 'pma/' -> 'app/webroot/pma/'
::1 - - [07/Feb/2011:09:19:48 --0800] [localhost/sid#10080d720][rid#1009854a8/initial] (3) [perdir /Library/WebServer/Documents/] add per-dir prefix: app/webroot/pma/ -> /Library/WebServer/Documents/app/webroot/pma/
::1 - - [07/Feb/2011:09:19:48 --0800] [localhost/sid#10080d720][rid#1009854a8/initial] (2) [perdir /Library/WebServer/Documents/] strip document_root prefix: /Library/WebServer/Documents/app/webroot/pma/ -> /app/webroot/pma/

Can anyone interpret that to understand the problem for me?

1 Answer 1

1

LimitInternalRecursion will not help. Add RewriteLog and RewriteLogLevel directives in virtual host or server config(/etc/apache2/.. or /etc/httpd/.. for Linux). Then look rewrite log.

4
  • Hmm... I've added those directives into the httpd.conf file with what I think are sensible values (it's Linux by the way, MacOSX), but they don't seem to be doing anything that I can tell. This is hard! Feb 7, 2011 at 8:10
  • Do you restart Apache? If you gave virtual host, you need added directives to virtual host definition.
    – alvosu
    Feb 7, 2011 at 8:12
  • Good call! As you can tell I'm a bit of a newbie. I've upvoted you and edited my question with the contents of the Rewrite log - does that tell you what I need to go / where I need to go to kill this pma loop? Feb 7, 2011 at 17:32
  • Um, okay, today my Rewrite log had completely new contents, which enabled me to work out that the following lines in my htaccess were creating an infinite loop: RewriteRule ^$ app/webroot/ [L], RewriteRule (.*) app/webroot/$1 [L]. Commenting them out seems to fix the problem. I have no idea where they came from or whether they're meant to do anything useful. But thanks for all your help in getting me on the right track! Feb 10, 2011 at 6:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .