[Mediawiki-l] Maintaining Session Information

Kevin Jones kevinaj at gmail.com
Mon Aug 18 14:00:58 UTC 2008


Hi,

I am trying to intercept page edits and send them to a PHP page that will
make some modifications to the text and test to see if various conditions
have been satisfied.

I have changed the post action of the edit form to point to 'modify.php'. I
also added another hidden form field with the original action ($action) as
it's value.

This way I'm able to use cURL to pass along the modified $_POST data to the
page contained in $action. This all works fine until cURL passes the data
on. At which point I'm redirected to a preview page that states:

*"**Sorry! We could not process your edit due to a loss of session data.
Please try again. If it still doesn't work, try logging out and logging back
in."

Does anyone know how I can maintain the session data throughout this
process? I have verified that $_COOKIE still contains the appropriate
values. However $_SESSION does not. This seems to be the cause of the
problem.  Any comments and/or suggestions are welcome.

Thanks,
Kevin
*


More information about the MediaWiki-l mailing list