Link to home
Start Free TrialLog in
Avatar of Connie Campbell-Pearson
Connie Campbell-PearsonFlag for United States of America

asked on

Centos - localhost and mysql work, php & phpMyAdmin don't

I'm using PHP 5.2.8. The Apache server is 2.2.3. I see the localhost screen fine.  If I try to access phpMyAdmin (/var/www/html/phpMyAdmin) it says I don't have permission.  If I type in phpinfo.php (localhost/phpMyAdmin/phpinfo.php) it just shows the code.  
I've located the httpd.conf file and put the document root as /var/www/html.
I added the following lines to the php.ini file:
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
I added name and password to the config.inc.php file.

What am I missing?  Thanks
Avatar of Maciej S
Maciej S
Flag of Poland image

Put appropriate part of your apache error log. How are you accessing phpmyadmin? http://localhost/phpMyAdmin/?
Paste your httpd.conf.
It maybe that your have autoindexes turned off, and your DirectoryIndex directive doesn't contain index.php.
Avatar of prokvk
prokvk

Hi there,

I was tired having such problems with configurations of PHP, phpMyAdmin etc, so I looked for an alternative, you can try it out too:

http://vertrigo.sourceforge.net/

It's called vertrigo server, you just install ist as a normal Win application and you have everything there - PHP, MySQL ... No problems whatsoever so far and I am using it for about 2 years now. I'm really satisfied.
edit /etc/httpd/conf.d/phpmyadmin.conf

Remove or comment the first two lines with the arrow


#Order Allow,Deny    <---
#Deny from all           <--
Allow from 127.0.0.1

And restart the apache server.

service httpd restart
ASKER CERTIFIED SOLUTION
Avatar of Connie Campbell-Pearson
Connie Campbell-Pearson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial