PHP/Apache blocked any file called COMMON.PHP [SOLVED]

Support/Development for PHP
keith
Forum User
Forum User
Posts: 6
Joined: Sat Jan 24, 2009 3:37 am

PHP/Apache blocked any file called COMMON.PHP [SOLVED]

Unread post by keith »

Hello,

Got a strange problem it seems, been a nightmare to track down.

Running PHP5.2.8

If I create a file called: common.php and enter:

<?
phpinfo()
?>

Then run it, I get in the error_log

"client denied by server configuration"

But if I rename it to say common2.php, it works exactly. It seems PHP (or apache?) is blocking any file called 'common.php' from running.

Have checked the php.ini and httpd.conf files, but neither has changed. Only thing that has changed recently is an upgrade to the latest art php. I have not tried going back to older versions as I'm not 100% sure on syntax to do so without effecting websites or Plesk.

A very odd error, not sure where to go next... anyone seen anything similar ?

Thanks in advance.

Keith
keith
Forum User
Forum User
Posts: 6
Joined: Sat Jan 24, 2009 3:37 am

Unread post by keith »

Found the problem to this, very obvious when I figured it out.

There was a file /var/www/vhosts/.htaccess that was blocking it with the deny all statement.

Keith
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

thanks for the follow up, its always good to have a solution in a thread, or even just the things youve ruled out. Its bound to help someone else!
Post Reply