Having trouble with Mysql
Fairly new to all of this… I followed the
However when I go to
I am currently running Ubuntu 8.04
any help would be greatly appreciated!
10 Replies
Create an info.php file with only
in it and place it in your webserver's root folder. Call this info.php file from your browser. It should print out loads of information about your php environment if it works.
If it works, you only have to enable for the virtual host which has the phpmyadmin package installed.
If you installed phpmyadmin from the Ubuntu repository, make sure that /etc/phpmyadmin/apache.conf gets loaded (check /etc/apache2/conf.d for a symlink that points to the phpmyadmin apache.conf file)
You can also check your apache logs, by default it's /var/log/apache2/error.log, that might contain some useful information as well.
/etc/init.d/apache2 restart
- Restarting web server apache2
apache2: aprsockaddrinfo_get() failed for blok
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
apache2: aprsockaddrinfo_get() failed for blok
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName"
Last night when I created my virtual host i did it like this
"
ServerName blokmovaz.com
ServerAlias
DocumentRoot /srv/www/blokmovaz.com/public_html/
ErrorLog /srv/www/blokmovaz.com/logs/error.log
CustomLog /srv/www/blokmovaz.com/logs/access.log combined "
> Not Found
The requested URL /index.php was not found on this server.
Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.10 with Suhosin-Patch Server at
www.blokmovaz.com Port 80
With just
also before someone suggested I make an info.php I did that
is there something I should be looking for?
First, make sure it's not something simple like permissions. Did you copy the PMA files while logged in as root? You may need to do a chown -R on the PMA folder and set group to www-data.
For PMA to come up, you can do one of 3 things:
1) place it in a folder somewhere in your public web space (i.e., /srv/www/blokmovaz.com/public_html/pma)
2) Make an alias, pointing it to some folder Apache can access (i.e., /srv/www/blokmovaz.com/pma).
3) Make up a virtual host, pointing it to some folder Apache can access (i.e., /srv/www/blokmovaz.com/pma).
Choices 2 or 3 would offer better control & security. You don't want just anyone poking around your databases, or even being able to try logging into PMA.
Create an alias in httpd.conf (or in /sites-enabled)
Alias /pma "/srv/www/blokmovaz.com/phpMyAdmin"
Order Deny,Allow
Deny from all
my.allowed.ip.address would be your home or office IP…
Allow from localhost my.allowed.ip.address
Create a virtual host in httpd.conf (or in /sites-enabled)
ServerName pma.blokmovaz.com
Order deny,allow
Deny from all
my.allowed.ip.address would be your home or office IP…
Allow from localhost my.allowed.ip.address
With a virtual host, you could also obfuscate things a little more by altering the listening port of the virtual host, but then you'd also have to add an additional listen command to the Apache conf. However, all this does is hide where you'd go to access PMA. If anyone else stumbles upon that port they could also access the files.
That's where Allow from comes in, it lets you block anyone except those specific IP's which are OK. However, if you're on DHCP, you may wish to consider using .htaccess instead, as it can be changed without restarting Apache.
No matter what you do, make sure you configure PMA to login instead of storing the credentials in config.inc.php. Since these files will be available to anyone that can find them on the web, you don't want just anyone to have access to your databases.
Before dropping the PMA files into whatever folder you decide to use, try a test index file, something like or what you did for info.php, i.e.
Once it's verified that Apache is reading PHP files in the chosen folder, if you still have trouble the problem is in the PMA config.
HTH. Good luck!
edit: or, if you created a symlink to phpmyadmin, is it possible you linked to index.php instead of the entire folder?