Glad you could stop by the Linux Basement site. Linux Basement is an informational Podcast about Linux, open source software and lots of other wonderful technology. If you want to find out more about open source technologies, subscribe and have a listen!

#linuxbasement is up at irc.freenode.net

MP3 Feed
Ogg Vorbis Feed
MP3 Feed (all episodes)
Ogg Feed (all episodes)

Video blog (not the show!)

 

Hello from Miami

Hi all --
I'm Gary from Miami, Florida.  I've been using Linux for about 13 years (started with Slackware and Yggdrasil with kernel 0.96).  I use it at home and in the office.
I think this podcast is great.  It's the first podcast on Linux that I really found useful.  It's not just for newbies so I like that.  Also, I've done very little web development work, so the topics are perfect for me.
One problem though if you'll pardon my question in the intoduction forum.  I'm using Ubuntu 7.10 and installed LAMP without any problems.  So then I installed phpmyadmin.  It also seemed to install without problems.  But I ended up with nothing in /var/www, so when I browse to http://localhost/myphpadmin, I get 'Not Found'.  I know apache is working since I can put a text file called index.html in /var/www and see it displayed when I browse to http://localhost.
Any ideas on what I did wrong?
Thanks.
And Chad, great work.  Best of luck with your new podcast.
Gary
 
 
 

Tristan gave this advice for

Tristan gave this advice for the same problem in the forums and it seemed to work
Are you using Gutsy? I found this solution at http://ubuntuforums.org/showthread.php?t=591952. Make a symboloc link in the /var/www directory like so:
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
There is some debate that you should make an alias in the apache2.conf file, but I haven't got that to work.
 
Or maybe you could just move the phpmyadmin directory to /var/www?
However, I believe the problem resides with the phpmyadmin install. It should be asking you when you install, what type of install you are using. And in our case, it is Apache2... this is imparative for the install process, being that the apache2 virtual directories will the be shown the phpmyadmin install. Give tristan's suggestion a shot, and then we can look deeper if need be. Thanks so much for stopping by Gary, and glad we can help.
Chad

Thanks for the

Thanks for the suggestion.
 
I did
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
Then I used Firefox to browse to
http://localhost/phpmyadmin
and I got a dialog that indicates it doesn't know what to do with a phtml file.  It wants to know if I want to save it to disk or to browse for some program to open it.
 
Do I need to configure apache2 to know about phtml files somehow?
 
Gary

Hmm, you shouldn't be

Hmm, you shouldn't be getting that message. Could you do me a favor and let us know what your /etc/phpmyadmin/apache.conf file looks like?

Sure, here it is. #

Sure, here it is.
# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
        Options Indexes FollowSymLinks
        DirectoryIndex index.php

        # Authorize for setup
        <Files setup.php>
            # For Apache 1.3 and 2.0
            <IfModule mod_auth.c>
                AuthType Basic
                AuthName "phpMyAdmin Setup"
                AuthUserFile /etc/phpmyadmin/htpasswd.setup
            </IfModule>
            # For Apache 2.2
            <IfModule mod_authn_file.c>
                AuthType Basic
                AuthName "phpMyAdmin Setup"
                AuthUserFile /etc/phpmyadmin/htpasswd.setup
            </IfModule>
            Require valid-user
        </Files>
        <IfModule mod_php4.c>
                AddType application/x-httpd-php .php

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_value include_path .
        </IfModule>
        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_value include_path .
        </IfModule>
</Directory>
Thanks,
Gary
 

Ok there are some very

Ok there are some very distinct differences. Did you install from package or from apt-get? My /etc/phpmyadmin/apache.conf looks like this:

# Configure everything with /etc/phpmyadmin/htaccess file



<Directory /usr/share/phpmyadmin/>

    AllowOverride All

</Directory>



<Directory /var/www/phpmyadmin/>

    AllowOverride All

</Directory>





# Protect some directories



<Directory /var/lib/phpmyadmin/>

    Options -FollowSymLinks

    AllowOverride None

    Order deny,allow

    Deny from all

</Directory>



<Directory /usr/share/phpmyadmin/config/>

    Options -FollowSymLinks

    AllowOverride None

    Order deny,allow

    Deny from all

</Directory>



<Directory /var/www/phpmyadmin/config/>

    Options -FollowSymLinks

    AllowOverride None

    Order deny,allow

    Deny from all

</Directory>

Now you will notice that at the top, I am essentially creating the virtual directory for phpmyadmin under /var/www/phpmyadmin, whereas your setup does not do this, thus there is no link for the installation into your root directory. Granted the symlink should have taken care of this, that is not the proper way to do it. Notice also, that your installation is giving the ifmodule statements right in this conf file, whereas mine specifically calls the htaccess file under /etc/phpmyadmin/htaccess. In that file, is the ifmodule configurations. Here is my htaccess

DirectoryIndex index.php

Options +FollowSymLinks -Indexes



<IfModule mod_mime.c>

    <IfModule mod_php4.c>

        AddType application/x-httpd-php .php



        php_flag magic_quotes_gpc Off

        php_flag track_vars On

        php_flag register_globals Off

        php_value include_path .

    </IfModule>

    <IfModule mod_php5.c>

        AddType application/x-httpd-php .php



        php_flag magic_quotes_gpc Off

        php_flag track_vars On

        php_flag register_globals Off

        php_value include_path .

    </IfModule>

    <IfModule !mod_php4.c>

    <IfModule !mod_php5.c>

    <IfModule !mod_fastcgi.c>

    <IfModule !mod_fcgid.c>

    <IfModule mod_actions.c>

    <IfModule mod_cgi.c>

        AddType application/x-httpd-php .php



        Action application/x-httpd-php /cgi-bin/php

    </IfModule>

    <IfModule mod_cgid.c>

        AddType application/x-httpd-php .php



        Action application/x-httpd-php /cgi-bin/php

    </IfModule>

    </IfModule>

    </IfModule>

    </IfModule>

    </IfModule>

    </IfModule>

</IfModule>



# Deny config.inc.php file

<Files config.inc.php>

    Order deny,allow

    Deny from all

</Files>



# Authorize for setup

<Files setup.php>

    # For Apache 1.3 and 2.0

    <IfModule mod_auth.c>

        AuthType Basic

        AuthName "phpMyAdmin Setup"

        AuthUserFile /etc/phpmyadmin/htpasswd.setup

    </IfModule>

    # For Apache 2.2

    <IfModule mod_authn_file.c>

        AuthType Basic

        AuthName "phpMyAdmin Setup"

        AuthUserFile /etc/phpmyadmin/htpasswd.setup

    </IfModule>

    Require valid-user

</Files>

You will also notice this takes care of the DirectoryIndex function that you had mentioned earlier, which points to index.php

It really seems to me that phpmyadmin did not set up properly, so you may want to remove it and try to reinstall. You can do a

sudo apt-get remove phpmyadmin

So I did an apt-get purge

So I did an
apt-get purge phpmyadmin
to get rid of the config files followed by an
apt-get install phpmyadmin
I selected apache2 during the configuration phase.  I ended up with the same configuration files I had at the beginning.  I am running Ubuntu 7.10 (Gusty Gibbon) directly on the hardware (not from vmware).  I am running virtualbox, but only to run Windows XP as a virtual machine.
So I backed up my /etc/phpmyadmin/apache.conf file and copied in yours.  I then created the new file /etc/phpmyadmin/htaccess since it wasn't there to begin with and copied in your version.
I then rebooted.  It did solve the problem of needing the symlink in /var/www, but it still doesn't know how to process index.php.  :(
 
STOP THE PRESSES!
 
Out of despiration, I tried doing this with galeon as my web browser rather than Firefox, and it worked!  I have the login screen to phpmyadmin.  Now I do have my Firefox browser locked down quite a bit with the NoScript addon.  But even after allowing javascript for localhost, Firefox still doesn't work.  But since it does work with galeon, I'm not going to beat my head against the wall trying to get Firefox to work right now.
 
Thanks for your help, and I'm finally ready to move forward with your podcasts.  I can't wait to get to drupal.  :)
 
Gary