phorum_api_user_save()
Posted by sazaraki
|
Re: phorum_api_user_save() July 22, 2008 01:33AM |
Admin Registered: 22 years ago Posts: 8,532 |
You mean you are hitting your login page here over and over again, causing phorum_api_user_save() to be hit over and over again as well? It is not two queries that are run. Without looking at the code, I'd say at least one more (phorum_api_usre_get() to lookup the user to see if it's an existing user or not).
I'm not sure what you are doing exactly, but it might be useful to change the table type for the users table to innodb if you to not already use that as the default table type for your MySQL server. That might help resolving some concurrency issues that you might be having when pushing the code at this rate.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
I'm not sure what you are doing exactly, but it might be useful to change the table type for the users table to innodb if you to not already use that as the default table type for your MySQL server. That might help resolving some concurrency issues that you might be having when pushing the code at this rate.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: phorum_api_user_save() July 23, 2008 12:05AM |
Registered: 21 years ago Posts: 121 |
no not the login page . . . not unless 1 or both of those functions do.
I've now been told ppl get an error message. . . but only once. tho i've never seen it, it may be the windows to the soul of the culprit. . .
that line in my handler.php is the first line of output by my page-display abstraction
whereas that exact line in user.php is
at the end of what looks to be the cookie maker part of the function phorum_api_user_session_create. not sure what that's all about, but it leads me to believe that the error msg might somehow be related to the performance culprit.
it also makes me wonder . . . since i currently have the site set to "require cookies" in addition to using "user_session_restore" hook based on my own auth . . . i suppose cookies technically aren't explicitly required with this combo?
Edited 1 time(s). Last edit at 07/23/2008 12:06AM by sazaraki.
I've now been told ppl get an error message. . . but only once. tho i've never seen it, it may be the windows to the soul of the culprit. . .
Warning: Cannot modify header information - headers already sent by (output started at /path/to/my/handler.php:25) in /path/to/my/forum/include/api/user.php on line 2138
that line in my handler.php is the first line of output by my page-display abstraction
echo "<".'?'.'xml version="1.0" encoding="utf-8"'.'?'.">\n";
whereas that exact line in user.php is
);
at the end of what looks to be the cookie maker part of the function phorum_api_user_session_create. not sure what that's all about, but it leads me to believe that the error msg might somehow be related to the performance culprit.
it also makes me wonder . . . since i currently have the site set to "require cookies" in addition to using "user_session_restore" hook based on my own auth . . . i suppose cookies technically aren't explicitly required with this combo?
Edited 1 time(s). Last edit at 07/23/2008 12:06AM by sazaraki.
|
Re: phorum_api_user_save() August 18, 2008 11:54AM |
Admin Registered: 22 years ago Posts: 8,532 |
You print your header before Phorum sets a cookie, therefore the error happens. It is a really common PHP error message.
One way to solve it can be to start your script with a call to ob_start(). That will keep back the output till the end of the request, so headers can be sent at any time.
If you use user_session_restore, then Phorum does not need to keep track of cookies to maintain a session. You can implement the hook user_session_create and let the implementation function return NULL to flag Phorum that it should not run its own session handler. Take a look at the developer documentation for a full description of this hook.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
One way to solve it can be to start your script with a call to ob_start(). That will keep back the output till the end of the request, so headers can be sent at any time.
If you use user_session_restore, then Phorum does not need to keep track of cookies to maintain a session. You can implement the hook user_session_create and let the implementation function return NULL to flag Phorum that it should not run its own session handler. Take a look at the developer documentation for a full description of this hook.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Sorry, only registered users may post in this forum.
