Koozali.org: home of the SME Server

PHP-Nuke on 4.1

Brad

PHP-Nuke on 4.1
« on: February 17, 2001, 06:54:39 AM »
Hello,
having a problem installing PHP-Nuke 4.4 on a clean install of E-Smith 4.1.
Whenever I try to connect to the admin or index pages I recieve the following error:

Warning: Host 'e-smith.xxxxxxx.peoria1.il.home.com' is not allowed to connect to this MySQL server in /home/e-smith/files/ibays/bradsworld/html/mainfile.php on line 17
Unable to select database

Any ideas? Thanks

erdius

Re: PHP-Nuke on 4.1
« Reply #1 on: February 17, 2001, 09:24:53 AM »
there is no problem with either phpnuke or esmith.  as much as i hate to say RTFM.....you need to read phpnukes install directions.

Alexie

Re: PHP-Nuke on 4.1
« Reply #2 on: February 18, 2001, 01:09:44 AM »
I have the same problem, and maybe im Dum, but i can't find it..:-)..??

erdius

Re: PHP-Nuke on 4.1
« Reply #3 on: February 18, 2001, 02:08:38 AM »
you need to first create the nuke database with something like.

mysqladmin -u root password mynewpassword

edit the conifg.php file, and enter the database information you just created...
thats should do it.

Dan Brown

Re: PHP-Nuke on 4.1
« Reply #4 on: February 18, 2001, 02:13:52 AM »
erdius wrote:

> you need to first create the nuke database with something like.
>
> mysqladmin -u root password mynewpassword

    This line won't do anything useful; all it will do is change the mysql root password.  The line to create the database should look something like

mysql < create_database.sql

    This is off the top of my head, as I don't have a PHP-Nuke installation to refer to.  Check the docs to be sure.

Alexie

Re: PHP-Nuke on 4.1
« Reply #5 on: February 18, 2001, 05:04:50 AM »
Thx for all the tips, it was not so hard, was it..:-))

Please Remenber, we are some novice that not can all yet..
But we geting better and better..:-)

E-Smith and all you Linux freaks have learn me so many good thing about linux, Thx for that..

Dan Brown is allways there for us...Thx Dan..

No More Thx for Today, it's late over here in Denmark..

Alexie from www.zbox.dk

erdius

Re: PHP-Nuke on 4.1
« Reply #6 on: February 18, 2001, 05:29:08 AM »
The mysqladmin was to merely setup the inital database settings.  with phpnuke, you dont need to redirect the sql into the database, you just need to create it, and point your browser at the sql page.

Dan Brown

Re: PHP-Nuke on 4.1
« Reply #7 on: February 18, 2001, 07:11:00 AM »
erdius wrote:

> The mysqladmin was to merely setup the inital database
> settings.  with phpnuke, you dont need to redirect the sql

    So all you need to do is to create the database?  OK, you'd do that with

# mysqladmin create nuke

(or, alternatively)

# mysql
mysql> create nuke;

Gerald Jansen

Re: PHP-Nuke on 4.1
« Reply #8 on: February 18, 2001, 10:58:46 PM »
I have read the FM and I am getting the same error message. Also pointing at line 17. I have tried every combination I can think of and suggestions in the PHP-Nuke forums so don't be so quick to assume that something is not clearly documented in the manual or that e-smith's directory structure is typical.

Brad

Re: PHP-Nuke on 4.1
« Reply #9 on: February 19, 2001, 08:13:52 AM »
The appropriate lines to create the db as cut from the PHP-Nuke manual are:
1) Create a database called, for example, nuke:

    mysqladmin create nuke
   
2) Now fill the databases with the tables in nuke.sql file:

    mysql nuke < nuke.sql

I have also tried the above line to change the root password on the server and put the changes into config.php.

Still no luck...

Noah

Re: PHP-Nuke on 4.1
« Reply #10 on: February 19, 2001, 03:49:37 PM »
Brad wrote:
> Warning: Host 'e-smith.xxxxxxx.peoria1.il.home.com' is not
> allowed to connect to this MySQL server in

I am not familiar with PHPNuke, but this sounds like a problem with how your permissions are setup in MySQL.  In MySQL, both the username and the hostname/address are checked before access is allowed.  Log into MySQL as the root user (mysql -u root) and issue the following Grant statement:

   GRANT ALL on nuke TO user@'e-smith.xxxxxxx.peoria1.il.home.com' IDENTIFIED BY "password";

Where 'nuke' is the name of the PHPNuke database and 'user' is the name of the user PHPNuke runs under (I think this is specified in a PHPNuke config file).  If this does not work, try replacing the host name with the IP address.

Again, I don't know much about PHPNuke, and I have not tried this myself.  Good luck.

Noah

p.s.  Anyone who plans to work with MySQL should check out the MySQL documentation (http://www.mysql.com/doc/).  Make sure to read (and re-read) Chapter 6 -- The MySQL Access Priviledge System.

shadowrex

Re: PHP-Nuke on 4.1
« Reply #11 on: February 19, 2001, 09:02:05 PM »
did you change the password for root in the config.php root's password for mysql is the same as the ldap password.  that password can be found in /etc/openldap/ldap.pw.  the smart thing to do is to create another mysql user to use with nuke because the mysql root account password will change when the ldap password is changed

Jason Miller

Re: PHP-Nuke on 4.1
« Reply #12 on: February 19, 2001, 09:22:26 PM »
It is probably a good idea to create a separate mysql user for php-nuke - but for different reasons than suggested.

Changing the ldap settings should not be overwriting the ldap password - anymore that is, it was a bug in the early 4.1 beta series that was corrected before 4.1 final.

General Advice:

Remember that the mysql root user is much like the linux root user, they have a lot more privileges than most users.  I like to think of it along the lines of this scenario:

- a newly hired webdeveloper is asked to use php-nuke to build the company website.  they need access to the database server for that: you have choice of creating a new user 'nuke' with its own password and privileges only to use the 'nuke' database OR giving them the 'root' password for mysql.

If you give them the root password, suddenly the new worker has full database privileges and can have a peek at the highly sensitive HR/finance data while on their coffee break.  Probably not something you want them to have full privileges to see.

By providing a separate user login/password/database access permissions they can try all they want to see the HR/finance data but it will always return the equivalent of 'permission denied'.

Hope that helps,

Jay

erdius

Try this
« Reply #13 on: February 19, 2001, 11:11:27 PM »
Ok.  Heres all I did to get phpnuke working.  
untar all of the phpnuke stuff into the html directory
Create a mysql user.     --     mysqladmin -u root password mynewpassword
Create a "nuke" database   --   mysqladmin -p create nuke
enter tables etc  --    mysql -p nuke < nuke.sql
chmod all *.php files to 666, all directorys to 777
edit config.php.  enter in localhost, root (for example user), and mysql password.
site should be online at this point.  tell what error messages you get with this process, as it worked just fine (with a fresh 4.1 esmith install) with me.
Are you getting errors entering tables into mysql? can you create the db? user?

Dan Brown

Re: Try this
« Reply #14 on: February 19, 2001, 11:24:38 PM »
erdius wrote:

> Create a mysql user.     --     mysqladmin -u root password
> mynewpassword

    This doesn't create a mysql user; it only changes the password of the existing root user.  There's no good reason to do this, as the root user already has a password set.  It's contained in /root/.my.cnf, so you don't have to enter it when using mysql from the command line.  If you insist on using the root user to access mysql for phpnuke, just make a note of that password and enter it into the config files.

> Create a "nuke" database   --   mysqladmin -p create nuke

    This will work, but you only need the -p if you've changed the root password--see above.  Following this, you really should create a mysql user just for phpnuke, as I (and others) have posted before.  To do this, do:

# mysql
mysql> grant all on nuke.* to nuke@localhost identified by 'nukespassword';

> enter tables etc  --    mysql -p nuke < nuke.sql

    Same comment as above; you shouldn't need the -p

> edit config.php.  enter in localhost, root (for example
> user), and mysql password.

    As above; it's much better to use nuke (or some other limited-purpose mysql user) as the user, and a password just for that user.