[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


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

Posted on 2009-02-22
Medium Priority
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/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
LVL 23

Expert Comment

by:Maciej S
ID: 23707484
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.

Expert Comment

ID: 23709199
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

ID: 23711198
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

Connie Campbell-Pearson earned 0 total points
ID: 23848092
Reinstall php and phpMyAdmin using yum.  Now it all works.  Thank you

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month18 days, 15 hours left to enroll

834 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