Calling API Returns Error (Please review my code) [SOLVED]
Posted by Notioner
Calling API Returns Error (Please review my code) [SOLVED] October 11, 2012 03:08PM |
Registered: 12 years ago Posts: 4 |
I use a registration system to register users - I added the following code to run after the user is register - this way it handles BOTH my site's account and their phorum account.
Doing some research, I assumed everything below would work:
And I get this error:
I'm running a LAMP server on Fedora locally. Using updated PHP5.
Main site directory is /var/www/html
Forum Directory is: /var/www/html/forum
Can anyone offer any advice?
Edited 1 time(s). Last edit at 10/11/2012 05:19PM by Notioner.
Doing some research, I assumed everything below would work:
Language: PHP$cwd = getcwd(); // save current directory for later use chdir(';/var/www/html/forum';); // change directory to phorums, so the API files work define(';phorum_page';, ';register';); // define our page include("./include/api/base.php"); // now include the phorum base.php include("./include/api/user.php"); // now include the phorum user.php $user = array( "user_id" => $model->id, // we want matching IDs "username" => $model->username, // we want matching usernames "password" => $plainTextPassword, // we want the same password "email" => $model->email, // we want the same email "admin" => 0, // no admin "active" => 1); // active is true phorum_api_user_save($user); // now save the user with the provided array info chdir($cwd); // change directory back to original so my code below can run its course
And I get this error:
Fatal error: Call to undefined function phorum_db_user_get() in /var/www/html/forum/include/api/user.php on line 934
I'm running a LAMP server on Fedora locally. Using updated PHP5.
Main site directory is /var/www/html
Forum Directory is: /var/www/html/forum
Can anyone offer any advice?
Edited 1 time(s). Last edit at 10/11/2012 05:19PM by Notioner.
Re: Calling API Returns Error (Please review my code) October 11, 2012 04:11PM |
Admin Registered: 22 years ago Posts: 9,240 |
Re: Calling API Returns Error (Please review my code) October 11, 2012 05:18PM |
Registered: 12 years ago Posts: 4 |
Re: Calling API Returns Error (Please review my code) [SOLVED] October 11, 2012 06:06PM |
Registered: 12 years ago Posts: 4 |
EDIT:
This fixed my login issue:
http://www.phorum.org/phorum5/read.php?28,125993,129010#msg-129010
Edited 2 time(s). Last edit at 10/11/2012 06:47PM by Notioner.
This fixed my login issue:
http://www.phorum.org/phorum5/read.php?28,125993,129010#msg-129010
Edited 2 time(s). Last edit at 10/11/2012 06:47PM by Notioner.
Sorry, only registered users may post in this forum.