phpmyadmin - forbidden

I'm in the process of setting up PhpMyAdmin and have come across numerous guides many of which show slightly conflicting advice.

At the moment I can access PhpMyAdmin via Apache but I get this message:

Code:
Forbidden

You don't have permission to access /phpmyadmin on this server.

Is this due to my phpMyAdmin.conf which has

Code:
Alias /phpmyadmin "/usr/local/www/phpMyAdmin/"
<Directory "/usr/local/www/phpMyAdmin/">
      Order deny,allow
      Allow from all
      Allow from 192.168.1.0/24
</Directory>

Does this setup explain the 'forbidden' message? Or should I look at something else like file permissions?
 
Does the site open if you add index.php at the end of the URL? If that's the case you may need to set DirectoryIndex.
 
Looking at httpd-error.log. I see lots of lines complaining about 'Cannot open....'. For example .../php/20121212-zts/ctype.so which does not exist. I only have .../php/20121212/ctype.so. I guess I may have picked the wrong build options when building PHP :(. Not sure if that would create the 'forbidden' error though.
 
After rebuilding PHP, I now get a different error in httpd-error.log..

Code:
'../sbin/httpd -D NOHTTPACCEPT'
 
It's not an error, it's a warning. Add to /boot/loader.conf:
Code:
accf_http_load="YES"
That will get rid of it.
 
Hello,

This block:
balanga said:
I'm in the process of setting up PhpMyAdmin and have come across numerous guides many of which show slightly conflicting advice.
Code:
Alias /phpmyadmin "/usr/local/www/phpMyAdmin/"
<Directory "/usr/local/www/phpMyAdmin/">
      Order deny,allow
      Allow from all
      Allow from 192.168.1.0/24
</Directory>

should look like:
Code:
Alias /phpmyadmin "/usr/local/www/phpMyAdmin/"
<Directory "/usr/local/www/phpMyAdmin/">
      Order deny,allow
      Deny from all
      Allow from 192.168.1.0/24 # your IP address(es) from which you would like to access PHPMyAdmin
</Directory>

http://httpd.apache.org/docs/2.2/howto/access.html
 
On Apache 2.4 it would be something like:
Code:
Alias /phpmyadmin "/usr/local/www/phpMyAdmin/"
<Directory "/usr/local/www/phpMyAdmin/">
 Require ip 192.168.1.0/24
</Directory>
 
Back
Top