Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Jan 31, 2010 2:09 pm 
Offline
Senior Member

Joined: Wed May 27, 2009 9:04 pm
Posts: 60
Hello!
Fairly new to all of this... I followed the http://library.linode.com/getting-start ... stribution 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


Top
   
 Post subject:
PostPosted: Sun Jan 31, 2010 3:26 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
That's the code of the phpmyadmin page. You don't have php installed properly. Did you follow one of the LAMP guides?


Top
   
 Post subject:
PostPosted: Sun Jan 31, 2010 3:38 pm 
Offline
Senior Member
User avatar

Joined: Sun Mar 23, 2008 10:10 am
Posts: 71
Website: http://frontseed.com/
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
Code:
<?php phpinfo(); ?>
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.


Top
   
 Post subject:
PostPosted: Sun Jan 31, 2010 4:14 pm 
Offline
Senior Member

Joined: Wed May 27, 2009 9:04 pm
Posts: 60
I followed everything on here exactly http://library.linode.com/lamp-guides/u ... ase_server


Top
   
 Post subject:
PostPosted: Sun Jan 31, 2010 4:25 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
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.

Code:
/etc/init.d/apache2 restart


Top
   
 Post subject:
PostPosted: Sun Jan 31, 2010 4:40 pm 
Offline
Senior Member

Joined: Wed May 27, 2009 9:04 pm
Posts: 60
Okay...when i run that command it says "
* Restarting web server apache2
apache2: apr_sockaddr_info_get() failed for blok
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
apache2: apr_sockaddr_info_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

"<VirtualHost 109.74.205.225:80>
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
</VirtualHost>"


Top
   
 Post subject:
PostPosted: Sun Jan 31, 2010 7:44 pm 
Offline
Senior Member

Joined: Wed May 27, 2009 9:04 pm
Posts: 60
anyone have any more ideas? :)


Top
   
 Post subject:
PostPosted: Mon Feb 01, 2010 12:07 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
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:

Quote:
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.


Top
   
 Post subject:
PostPosted: Mon Feb 01, 2010 11:53 am 
Offline
Senior Member

Joined: Wed May 27, 2009 9:04 pm
Posts: 60
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?


Top
   
 Post subject:
PostPosted: Mon Feb 01, 2010 1:12 pm 
Offline
Senior Newbie

Joined: Thu Oct 09, 2008 10:21 am
Posts: 8
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"
<Directory "/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
</Directory>

# Create a virtual host in httpd.conf (or in /sites-enabled)
<VirtualHost my.server.ip.address:80>
DocumentRoot "/srv/www/blokmovaz.com/phpMyAdmin"
ServerName pma.blokmovaz.com
<Directory "/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
</Directory>
</VirtualHost>

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 <?php echo("Hello, World!"); ?> or what you did for info.php, i.e. <?php phpinfo(); ?>

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!


Top
   
 Post subject:
PostPosted: Tue Feb 02, 2010 7:41 am 
Offline
Senior Member
User avatar

Joined: Sun Aug 10, 2008 11:26 am
Posts: 104
Location: ~$
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?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group