[Mediawiki-l] Debugging mediawiki with curl?

Daniel Barrett danb at VistaPrint.com
Mon Mar 17 14:54:08 UTC 2008


I'm trying to use "curl" to perform article edits and saves so I can
reproduce an intermittent problem.  (PHP is producing hanging processes
when invoking external programs via "cmd", on Windows 2003 Server.)
Each time I try, I get the mediawiki error:

"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."

Here's what I'm trying, based on the current cookies in my browser and
the form fields on the edit page.  Any tips?  Any better way to do this?

curl \
 -c 'wikidb_vpw_UserName=Jsmith' \
 -c 'wikidb_vpw_UserID=5' \
 -c 'wikidb_vpw_LoggedOut=20080317144239' \
 -c 'wikidb_vpw_Token=<my current token goes here>' \
 -c 'wikidb_vpw__session=<my current session goes here>'  \
 -F 'wpTextbox1=@debug-php-hangs.txt' \
 -F 'wpSection=' \
 -F 'wpStarttime=20080317162446' \
 -F 'wpEdittime=20080317162432' \
 -F 'wpScrolltop=' \
 -F 'wpSummary=bughunt' \
http://mywiki.com/w/index.php?title=mypage&action=submit

Thanks,
DanB


More information about the MediaWiki-l mailing list