Skip to main content
cPanel Technical Support has been heavily impacted by hurricane Beryl and our ability to respond to tickets has been hindered as a result. We appreciate your understanding and patience as we address these delays.

PHP file not execute except index.php

Comments

14 comments

  • cPRex Jurassic Moderator
    Hey there! What errors do you get when you try and visit that page in a browser? Do you see any relevant logs in the Apache log at /etc/apache2/logs/error_log?
    0
  • Tarak Nath
    I am getting mentioned below error: [Fri Feb 03 15:12:15.302122 2023] [access_compat:error] [pid 7987:tid 47570529302272] [client 123.45.67.89:53229] AH01797: client denied by server configuration: /home/username/public_html/test.php [Fri Feb 03 15:12:15.303907 2023] [core:error] [pid 7987:tid 47570529302272] [client 123.45.67.89:53229] AH00124: 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. [Fri Feb 03 15:12:15.894265 2023] [core:error] [pid 7987:tid 47570437195520] [client 123.45.67.89:53230] AH00124: 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., referer: http://domain2.com/test.php [Fri Feb 03 15:12:15.894342 2023] [core:error] [pid 7987:tid 47570437195520] [client 123.45.67.89:53230] AH00124: 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., referer: http://domain2.com/test.php [Fri Feb 03 15:12:53.903861 2023] [core:error] [pid 7872:tid 47570525099776] [client 98.76.54.321:60486] Script timed out before returning headers: index.php
    0
  • cPRex Jurassic Moderator
    Thanks for the additional details. It looks like there is a problem with the .htaccess configuration on the domain. Can you renmae /home/username/public_html/.htaccess to .htaccess.bak so it can't be read by the system, and see if the PHP page loads? If so, you'll need to adjust the redirects for PHP in the .htaccess file, as that is what is causing the issue.
    0
  • Tarak Nath
    Thank you for the prompt response. I don't think so as we have tired the same by rename the htaccess file. Even we have created a subdomain and there is no any htaccess file. Like: Subdomain name: testxyz.domain2.com Subdomain doc root directory: /testxyz.domain2.com [ under home not in public_html] And the issue still persist. Please help.
    0
  • cPRex Jurassic Moderator
    Is it possible your PHP code isn't working properly and causing that redirect issue? What if you use this code?
    0
  • Tarak Nath
    Yes, that's also we have tried and getting 403 forbidden error.
    0
  • cPRex Jurassic Moderator
    *Something* is causing the redirect issue on the domain. Are there any other .htaccess file on the account, possibly in /home/username?
    0
  • Tarak Nath
    Yes there is a htaccess with the following contents: Order allow,deny Deny from all Order allow,deny Allow from all RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]
    0
  • cPRex Jurassic Moderator
    And what happens if you also rename that one temporarily?
    0
  • Tarak Nath
    Yes, now it's working. Thank you so much for your support and time.
    0
  • cPRex Jurassic Moderator
    If you can adjust some of those redirects you can likely resolve the issue, or you may find you might not need that higher-level .htaccess file at all.
    0
  • Tarak Nath
    Yes, we don't need that one. Thank you for your support. Have a great day ahead. Bye for now Please mark this ticket as RESOLVED.
    0
  • Tarak Nath
    Hello, Reopening this thread again as the said htaccess file auto generating even deleted. Dont know how can I stopt it. Could you please help me
    0
  • cPRex Jurassic Moderator
    It would be best to open a ticket - with us, if you have root access to the serer, or with your hosting provider if you only have access to the cPanel.
    0

Please sign in to leave a comment.