February 23, 2003

PHP and PHPMyAdmin

Today I've installed PHP4 and PHPMyAdmin on the debian box. It seems that Debian use a really old version of PHP4 (based on 4.1.2). Installation was a breeze. Just use apt-get php4 and it'll get the package. However there are manual configurations that need to be done to turn "on" php4. I'll detail it out here.

First you need to go into /etc/apache/httpd.conf and uncomment the lines that read,


LoadModule php4_module libexec/libphp4.so
AddType application/x-httpd-php .php

Then just do a restart by doing
apachectl graceful

After that, grab the phpmyadmin using apt-get. After getting, make sure you have set the password for you mysql root user by doing
mysqladmin -u root password yourpasswordhere
If you done this already then there is no need to do it again. You may also wish to set the password for root@yourmachinename (the previous command would only set the root@localhost password). To do this go into mysql by typing
mysql -u root -p
Enter your password that you have specified earlier and at the prompt. Just type
set password for root@yourmachinename=password('yourpasswordhere');
Also the /usr/doc/phpmyadmin/README.Debian mentioned that you should give additional privileges for a user, that is:
 GRANT USAGE ON mysql.* to 'root@yourmachinename;

Posted by zoo at February 23, 2003 07:10 PM
Comments

Pretty comfortable with Debian. New to php/apache/phpmyadmin.

I did an apt-get install php4 apache phpmyadmin

they (plus some dependencies) got installed.

my httpd.conf line has no such "LoadModule php4_module libexec/libphp4.so" line to uncomment.

i suppose i could assume that "i should manually add them".

of course such an assumption has horribly bitten me in the arse.

you then find out later on from some maintainer: "of course you should not manually put it there, if it's supposed to be there the package would have put it there"

or "rtfm, it says all configuration for php has moved from httpd.conf to file foo!"

of course i've looked at the docs include /usr/share/php*

this sucks.

Posted by: asdf on February 9, 2004 03:29 PM
Post a comment