Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Brad 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
-
there is no problem with either phpnuke or esmith. as much as i hate to say RTFM.....you need to read phpnukes install directions.
-
I have the same problem, and maybe im Dum, but i can't find it..:-)..??
-
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.
-
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.
-
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
-
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.
-
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;
-
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.
-
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...
-
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.
-
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
-
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
-
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?
-
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.
-
Following up to myself...
I forgot one important step. After creating the nuke user, you'll need to do one more thing:
# mysqladmin reload
This will cause MySQL to reload the user tables. If you don't do this, you won't be able to use the nuke user to access the database.
-
It looks to me like the whole problem comes from not using localhost as the host machine name in the config.php file for php-nuke.
Use what ever user you want just be aware that root user has much more access than php-nuke needs so that could create a security issue.
I usually create a user for each of the sites that I host.
-
Thanks everybody for the above newbie guide to PHP-Nuke.
I now have a working version of this and phpMyAdmin.
Keith
-
Hi all
Interesting topic you brought up here. I have for some time been testing a few php/MySQL Apps on my e-smith server... a few things I would like to point out (especially regarding security!)
1) This is more of a question: with regards to installing you tarball into a html directory, are you creating i-bays and then dumping it into there or are you using the primary html directory?
2)'chmod all *.php files to 666, all directorys to 777' is this command safe to run on my directories.... i-bay or primary html...?
3)I have been running both TWIG & phpGroupware - I setup both to run from and i-bay (as described on Tim's web site http://linux.made-to-order.net/article.php ) and from the primary html directory .... I have discussed this setup with the experts (e-smith) and have been warned about security .. they suggest writing an alias url script (or something like that!!) , the same way webmail and the e-smith manager have been setup...?
Well jus thought I would give my 2 cents worth...
Regards
BF
-
Brandon Friedman wrote:
>
> Hi all
> Interesting topic you brought up here. I have for some time
> been testing a few php/MySQL Apps on my e-smith server... a
> few things I would like to point out (especially regarding
> security!)
>
> 1) This is more of a question: with regards to installing you
> tarball into a html directory, are you creating i-bays and
> then dumping it into there or are you using the primary html
> directory?
ibays
> 3)I have been running both TWIG & phpGroupware - I setup both
> to run from and i-bay (as described on Tim's web site
> http://linux.made-to-order.net/article.php ) and from
> the primary html directory .... I have discussed this setup
> with the experts (e-smith) and have been warned about
> security
> .. they suggest writing an alias url script (or
> something like that!!) , the same way webmail and the e-smith
> manager have been setup...?
Sounds like a good idea. How do we do this? is it easy(ish) ;}
Regards
keith
-
Brandon Friedman wrote:
> [...]
> 2)'chmod all *.php files to 666, all directorys to 777' is
> this command safe to run on my directories.... i-bay or
> primary html...?
> [...]
I can pretty much guarantee that doing so is unsafe.
On the whole, directories should be 755 (write by owner only) and files should
be 644 (write by owner only). Or even more restrictive, depending on your
application. But 666/777 is almost certainly asking for trouble.
Gordon
-
Hi,
Trying to install php-nuke (post-nuke) i'm encountering the following problem:
Fatal error: Call to undefined function: mysql_connect() in /home/e-smith/files/ibays/intranet/html/mainfile.php on line 66
The root user has a new password to use MySQL so I use -p option with mysql.
With all the suggestions and instructions i'm kind a lost here about what is the 'correct' way to install php-nuke.... I'm afraid I messed up my MySQL installation.
Any ideas?
ps. Can anybody point out the location of the php-sqladmin I keep reading about, so I can examine my MySQL databases. Thanks.
Thanks
-
That error indicates that MySQL support for PHP isn't installed. You shouldn't get it on a standard e-smith installation.
-
Hmmm, it really is a standard installation of 4.1.2, however I did follow your how-to to upgrade php. (look at your logs and you'll see my visits).
You test.php works fine though..?
Any idea
Thanks
RequestedDeletion
-
If the test.php works, see if mysql support is indicated there.
-
Dan,
How can I tell (What do I look for in the test.php result)
The only time mysql is mentioned is in the block configure command:
--snipp--
shmop=shared' '--with-unixODBC=shared' '--with-mysql=shared,/usr' '--with-ldap=shared' '--with-pgsql=shared' '--with-gettext=shared'
---snapp--
RequestedDeletion
-
Dan,
The mysql rpm from your how-to install well, but it seems I do not have mysql support.
Any idea why?
ps. Is there a way to go back to the original state, I was sure it would go well, I installed it on my production machine....
I would like to give it a try on another machine.
Thanks,
guestHH
-
check /etc/php.ini for a line that says extension=mysql.so
-
Dan,
It's there (not commented out with ; )
RequestedDeletion
-
btw to all readers,
I realise this is off topic, but I don't know any place else to go with e-smith issues, since it is specific e-smith related.
RequestedDeletion
ps. Yes, I should get more in to MySql and PHP :)
-
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';
I did this and then mysqladmin reload,
but still the postnuke php scriopt says
'unable to make database'.
I am logged in as root at the console, in a virtual ibay. Should I not first log in as root in mysql or mysqladmin? Are those programs open to anyone or just root? I quess root, but why then can I not make a db?
Perhaps because I use the database Roque? should one of the words in
mysql> grant all on nuke.* to nuke@localhost identified by 'nukespassword';
be Roque then?
hope you can help.
hc
-
tried doing
mysql> grant all on Roque.* to nuke@localhost identified by 'nukespassword';
but that does not help either:-(
-
hanscees wrote:
>
> tried doing
> mysql> grant all on Roque.* to nuke@localhost identified by
> 'nukespassword';
>
> but that does not help either:-(
damn typo!! IT does!!
sorry for the bandtwidt
hc
-
I have 2 how-to for postnuke. One for the mutant release on essg 4.1.2/sme 5 and another for the rogue release on sme 5. I will be sending both to documentation@e-smith.com real soon but if you want it, let me know and I'll send you the how-to's.
My site is down for testing at this time. I'm waiting on Mitel to host them :)
J-L
jl AT boers DOT cc