
27th December 2005, 19:19
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
I'd recommend to put those values in a database table, or even better, create a new column in the isp_isp_web table, e.g. "phpnuke" where you put either 0 or 1, and then you can read all values from the database.
|

28th December 2005, 07:30
|
|
Senior Member
|
|
Join Date: Dec 2005
Location: Chile
Posts: 245
Thanks: 4
Thanked 3 Times in 2 Posts
|
|
Uhm, I'm using this query for getting the "username" that would be the "owner" of the web directory:
Code:
$go_query = "SELECT * from isp_nodes, sys_user where isp_nodes.doc_id = '$web_id' and isp_nodes.doctype_id = 1013 and sys_user.doc_id = isp_nodes.userid";
But I have realized now that this only gets the ispconfig "Login Data username" and not the "User & Email->new user->admin username" (owner of the web directory).
I had not realized this earlier because I usually named both users the same, so ispconfig login username was the same as the owner of the directory. Now I know this query does not do what I want, and that is useful only when both usernames are the same.
From the phpnuke installer *form*, only the web [ID] is passed as useful data to try to retrieve the real owner of the directory then in mysql. But I dont seem able to determine a sql query that retrieves the "user_username" in the table "isp_isp_user" with only the web [ID]. 
Any hints?
I dont want to request the "username" to the user in the form, I want to retrieve it from mysql... Is this possible?
Last edited by danf.1979; 28th December 2005 at 07:49.
|

28th December 2005, 12:11
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,903
Thanks: 693
Thanked 4,194 Times in 3,212 Posts
|
|
You can use this SQL query:
Code:
select isp_isp_user.user_username from isp_dep, isp_isp_user WHERE isp_dep.parent_doc_id = $web_id AND isp_dep.parent_doctype_id = 1013 AND isp_dep.child_doctype_id = 1014 AND isp_isp_user.user_admin = 1
I know its not easy to get started with ISPConfig development
If you need need records that depend to oather records, e.g. Web ==> User or Web ==> Co-Domain you can retrieve them by the isp_dep table. This table includes the Parent (web) doc_id's and the doc_id's of the child records like co-domains and users.
|

28th December 2005, 22:30
|
|
Senior Member
|
|
Join Date: Dec 2005
Location: Chile
Posts: 245
Thanks: 4
Thanked 3 Times in 2 Posts
|
|
Thank you...
Yes, its not easy, but ispconfig is a great piece of software. That motivates me.
Well, I had to modify a bit your query. Here is the query that works in the installer:
Code:
$go_query = "SELECT isp_isp_user.user_username from isp_isp_user, isp_dep WHERE isp_dep.parent_doc_id =$web_id AND isp_dep.parent_doctype_id = 1013 AND isp_dep.child_doctype_id = 1014 AND isp_dep.child_doc_id = isp_isp_user.doc_id AND isp_isp_user.user_admin = 1 ";
Thanks for the isp_dep tip!
Last edited by danf.1979; 28th December 2005 at 22:37.
|

28th December 2005, 22:47
|
|
Senior Member
|
|
Join Date: Dec 2005
Location: Chile
Posts: 245
Thanks: 4
Thanked 3 Times in 2 Posts
|
|
Are Mysql passwords stored some place in ispconfig tables? I would like to make an automated config.php with the name of the mysql database and the mysql password, so the user does nothing but a click to start using phpnuke...
|

28th December 2005, 22:54
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,903
Thanks: 693
Thanked 4,194 Times in 3,212 Posts
|
|
No, the passwords are only stored encrypted in the mysql "mysql" system database. The best way might be if you ask the user for the password in the installer and let him select the database because every web may have multiple databases.
|

28th December 2005, 23:58
|
|
Senior Member
|
|
Join Date: Dec 2005
Location: Chile
Posts: 245
Thanks: 4
Thanked 3 Times in 2 Posts
|
|
Maybe they should be stored in the database, like in table isp_server field server_db_passwort. Then we could use them for any install script we could develop for configuring automagically all configuration files necessary for the installed CMS to run. I think it would be a nice feature, because we could install everything for a given customer, even without knowing his database password.
|

29th December 2005, 00:03
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,903
Thanks: 693
Thanked 4,194 Times in 3,212 Posts
|
|
If the passwords are stored in clear text in the isp_server table, it will be a massive security risk. So they are only stored in encrypted form that is irreversible.
Believe me, its better to ask the user for the password. Thats why the webFTP asks for a password too even if the user is already logged in. Never store user passwords in the database in clear text.
|

29th December 2005, 00:09
|
|
Senior Member
|
|
Join Date: Dec 2005
Location: Chile
Posts: 245
Thanks: 4
Thanked 3 Times in 2 Posts
|
|
Ok, I'll think on something else then. Anyway, I see table isp_server field server_db_passwort in clear text. Is this normal?
|

29th December 2005, 07:05
|
|
Senior Member
|
|
Join Date: Dec 2005
Location: Chile
Posts: 245
Thanks: 4
Thanked 3 Times in 2 Posts
|
|
Is it impossible then for an admin or reseller to install phpnuke package for a client without asking him for his password? (to configure config.php)
Suppose I get 10 or more phpnuke install request from some clients. Will I have to call all of them for asking the admin password? (suppose I'm not the admin and the actual admin does not know how to configure config.php)
Thanks.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 01:57.
|
|
Recent comments
20 hours 9 min ago
1 day 2 hours ago
1 day 6 hours ago
1 day 8 hours ago
1 day 16 hours ago
2 days 2 hours ago
2 days 3 hours ago
2 days 6 hours ago
2 days 11 hours ago
2 days 11 hours ago