Database integration with phpBB3
-
- Site Admin
- Posts: 2087
- Joined: Tue Sep 29, 2009 6:09 am
Re: Database integration with phpBB3
Could you chat with me using livechat on our website? I am Luke
-
- Posts: 16
- Joined: Thu Sep 09, 2010 1:32 am
Re: Database integration with phpBB3
when i insert that code you gave me
i get
Code: Select all
<?php
//Wing FTP Server MOD start
$ftp_dbname = "chaosnat_phpbb3"; //Wing FTP Server's mysql database name, assume in the same server.
$ftp_domain_name = "default"; //ftp's domain name.
$ftp_dirpath = "D:/ftp_data/".$data['username'];//user's directory path
$ftp_upload_limit = TRUE; //whether to limit the quota size
$ftp_maxuoload_size = 1024*1024*100; //if $ftp_upload_limit = TRUE, this value means the max quota bytes.
$db->sql_query("USE ".$ftp_dbname.";");
$db->sql_query("INSERT INTO `wftp_mysqltable_user` VALUES ('".$ftp_domain_name."','".$data['username']."',1,1,'".md5($data['new_password'])."',63,0,NULL,0,0,0,0,0,0,0,1,1,1,0,1,1,0,0,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,0,0,0,'0',NULL,0,0,0,".intval($ftp_upload_limit).",0,".$ftp_maxuoload_size.",0,0,0,'');");
$mkdir_result = @mkdir($ftp_dirpath);
if($mkdir_result == TRUE)
$db->sql_query("INSERT INTO `wftp_mysqltable_dir` VALUES ('".$ftp_domain_name."','".$data['username']."','".$ftp_dirpath."','/',1,1,1,1,1,1,1,1,1,1,1,1);");
$db->sql_query("USE ".$db->dbname.";");
//Wing FTP Server end
?>
Fatal error: Call to a member function sql_query() on a non-object in C:\xampp\htdocs\10x-PHP\phpBB3\sql\sqltest.php on line 9
-
- Site Admin
- Posts: 2087
- Joined: Tue Sep 29, 2009 6:09 am
Re: Database integration with phpBB3
Oh, no, you mixed testing code and real code... you just need to look for, in the source file "includes/ucp/ucp_register.php", the code:
$user_id = user_add($user_row, $cp_data);
then add the below code directly after it. (please change the variables $ftp_domain_name and $ftp_domain_name into yourself)
$user_id = user_add($user_row, $cp_data);
then add the below code directly after it. (please change the variables $ftp_domain_name and $ftp_domain_name into yourself)
Code: Select all
//Wing FTP Server MOD start
$ftp_dbname = "chaosnat_phpbb3"; //Wing FTP Server's mysql database name, assume in the same server.
$ftp_domain_name = "default"; //ftp's domain name.
$ftp_dirpath = "D:/ftp_data/".$data['username'];//user's directory path
$ftp_upload_limit = FALSE; //whether to limit the quota size
$ftp_maxuoload_size = 0; //if $ftp_upload_limit = TRUE, this value means the max quota bytes.
$db->sql_query("USE ".$ftp_dbname.";");
$db->sql_query("INSERT INTO `wftp_mysqltable_user` VALUES ('".$ftp_domain_name."','".$data['username']."',1,1,'".md5($data['new_password'])."',63,0,NULL,0,0,0,0,0,0,0,1,1,1,0,1,1,0,0,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,0,0,0,'0',NULL,0,0,0,".intval($ftp_upload_limit).",0,".$ftp_maxuoload_size.",0,0,0,'');");
$mkdir_result = @mkdir($ftp_dirpath);
if($mkdir_result == TRUE)
$db->sql_query("INSERT INTO `wftp_mysqltable_dir` VALUES ('".$ftp_domain_name."','".$data['username']."','".$ftp_dirpath."','/',1,1,1,1,1,1,1,1,1,1,1,1);");
$db->sql_query("USE ".$db->dbname.";");
//Wing FTP Server end
-
- Posts: 16
- Joined: Thu Sep 09, 2010 1:32 am
Re: Database integration with phpBB3
this is what i inserted into my php script:
is this correct?
i am running it locally so not domain name
Code: Select all
//Wing FTP Server MOD start
//Wing FTP Server MOD start
$ftp_dbname = "chaosnat_phpbb3"; //Wing FTP Server's mysql database name, assume in the same server.
$ftp_domain_name = "default"; //ftp's domain name.
$ftp_dirpath = "D:/ftp_data/".$data['username'];//user's directory path
$ftp_upload_limit = TRUE; //whether to limit the quota size
$ftp_maxuoload_size = 1024*1024*100; //if $ftp_upload_limit = TRUE, this value means the max quota bytes.
$db->sql_query("USE ".$ftp_dbname.";");
$db->sql_query("INSERT INTO `wftp_mysqltable_user` VALUES ('".$localhost."','".$data['username']."',1,1,'".md5($data['new_password'])."',63,0,NULL,0,0,0,0,0,0,0,1,1,1,0,1,1,0,0,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,0,0,0,'0',NULL,0,0,0,".intval($ftp_upload_limit).",0,".$ftp_maxuoload_size.",0,0,0,'');");
$mkdir_result = @mkdir($ftp_dirpath);
if($mkdir_result == TRUE)
$db->sql_query("INSERT INTO `wftp_mysqltable_dir` VALUES ('".$localhost."','".$data['username']."','".$ftp_dirpath."','/',1,1,1,1,1,1,1,1,1,1,1,1);");
$db->sql_query("USE ".$db->dbname.";");
//Wing FTP Server end
i am running it locally so not domain name
-
- Site Admin
- Posts: 2087
- Joined: Tue Sep 29, 2009 6:09 am
Re: Database integration with phpBB3
Code: Select all
$ftp_domain_name = "default"; //ftp's domain name.
$ftp_dirpath = "D:/ftp_data/".$data['username']; //user's directory path
$ftp_upload_limit = TRUE; //whether to limit the quota size
$ftp_maxuoload_size = 1024*1024*100; //if $ftp_upload_limit = TRUE, this value means the max quota bytes.
$ftp_domain_name is your domain name in Wing FTP Server.
Folder "D:/ftp_data/" must be created already.
-
- Posts: 16
- Joined: Thu Sep 09, 2010 1:32 am
Re: Database integration with phpBB3
my domain name is ct.com
so i hav inserted:
is this right?
and created C\:ftp_data folder on the ftp server, (does the folder need to be shared)
so i hav inserted:
Code: Select all
//Wing FTP Server MOD start
//Wing FTP Server MOD start
$ftp_dbname = "chaosnat_phpbb3"; //Wing FTP Server's mysql database name, assume in the same server.
$ftp_domain_name = "ct.com"; //ftp's domain name.
$ftp_dirpath = "c:/ftp_data/".$data['root'];//user's directory path
$ftp_upload_limit = TRUE; //whether to limit the quota size
$ftp_maxuoload_size = 1024*1024*100; //if $ftp_upload_limit = TRUE, this value means the max quota bytes.
$db->sql_query("USE ".$ftp_dbname.";");
$db->sql_query("INSERT INTO `wftp_mysqltable_user` VALUES ('".$ftp_domain_name."','".$data['username']."',1,1,'".md5($data['new_password'])."',63,0,NULL,0,0,0,0,0,0,0,1,1,1,0,1,1,0,0,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,0,0,0,'0',NULL,0,0,0,".intval($ftp_upload_limit).",0,".$ftp_maxuoload_size.",0,0,0,'');");
$mkdir_result = @mkdir($ftp_dirpath);
if($mkdir_result == TRUE)
$db->sql_query("INSERT INTO `wftp_mysqltable_dir` VALUES ('".$ftp_domain_name."','".$data['username']."','".$ftp_dirpath."','/',1,1,1,1,1,1,1,1,1,1,1,1);");
$db->sql_query("USE ".$db->dbname.";");
//Wing FTP Server end
and created C\:ftp_data folder on the ftp server, (does the folder need to be shared)
-
- Site Admin
- Posts: 2087
- Joined: Tue Sep 29, 2009 6:09 am
Re: Database integration with phpBB3
I think the above code will be OK. Just test it.
-
- Posts: 16
- Joined: Thu Sep 09, 2010 1:32 am
Re: Database integration with phpBB3
O.k,
when i run the ucp_register.php i get a blank page which suggest to me there r no errors,
but i still don't have the users populating into the wing ftp user panel
any ideas?
when a user registers on php forums should we not see the user in the ftp user panel?
when i run the ucp_register.php i get a blank page which suggest to me there r no errors,
but i still don't have the users populating into the wing ftp user panel
any ideas?
when a user registers on php forums should we not see the user in the ftp user panel?
-
- Site Admin
- Posts: 2087
- Joined: Tue Sep 29, 2009 6:09 am
Re: Database integration with phpBB3
Use livechat, I am online now.