Having trouble with Mysql

Hello!

Fairly new to all of this… I followed the http://library.linode.com/getting-start … stribution">http://library.linode.com/getting-started/#deployingalinux_distribution and thought I did everything right….

However when I go to http://109.74.205.225/phpmyadmin I get something I shouldn't… I'm not even sure what it is that I am getting but I know its not right. :roll:

I am currently running Ubuntu 8.04

any help would be greatly appreciated! :D

10 Replies

That's the code of the phpmyadmin page. You don't have php installed properly. Did you follow one of the LAMP guides?

You appear to have no php support in your webserver configuration, or at least it isn't mapped to .php files on that host you're trying to use. However, the server signature advertises PHP support.

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.

I followed everything on here exactly http://library.linode.com/lamp-guides/u … ase_server">http://library.linode.com/lamp-guides/ubuntu-8.04-hardy/#installandconfiguremysqldatabase_server

The tutorial you linked to tells you to install Apache first, add a few virtual hosts, reload Apache, and then install PHP. Unless you have rebooted since then, you must restart Apache after installing PHP in order for both to work together.

/etc/init.d/apache2 restart

Okay…when i run that command it says "

  • 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

" ServerAdmin root@blokmovaz.com

ServerName blokmovaz.com

ServerAlias www.blokmovaz.com

DocumentRoot /srv/www/blokmovaz.com/public_html/

ErrorLog /srv/www/blokmovaz.com/logs/error.log

CustomLog /srv/www/blokmovaz.com/logs/access.log combined "

anyone have any more ideas? :)

I think you need to put an index.php file in your document root. This is what I get when trying to access http://www.blokmovaz.com/index.php:

> 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 http://www.blokmovaz.com/ I get "Coming Soon" which is your index.html.

Should I put anything in the index.php?

also before someone suggested I make an info.php I did that http://www.blokmovaz.com/info.php

is there something I should be looking for?

since /info.php works, php & Apache are fine.

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"

DirectoryIndex index.php

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)

DocumentRoot "/srv/www/blokmovaz.com/phpMyAdmin"

ServerName pma.blokmovaz.com

DirectoryIndex index.php

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!

phpmyadmin should be in its own directory. However, when you add a trailing slash to your URL, your server returns a 404. This suggests that you somehow have ended up with, instead of a directory, a text file named "phpmyadmin", containing the contents intended for phpmyadmin/index.php. Any way this could have happened?

edit: or, if you created a symlink to phpmyadmin, is it possible you linked to index.php instead of the entire folder?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct