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

Posted on 2009-02-22
Last Modified: 2012-05-06
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/
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
I added name and password to the file.

What am I missing?  Thanks
Question by:CA Campbell-Pearson
    LVL 23

    Expert Comment

    by:Maciej S
    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.
    LVL 5

    Expert Comment

    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:

    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.
    LVL 16

    Expert Comment

    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

    And restart the apache server.

    service httpd restart

    Accepted Solution

    Reinstall php and phpMyAdmin using yum.  Now it all works.  Thank you

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now