Please help test new handling of uploaded files - urgent!

Please help test new handling of uploaded files - urgent!

by Petr Skoda -
Number of replies: 10
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Hi!

I have completely rewritten handling of uploaded files. Please help me with testing.

Steps:
  1. download latest 1.4.2+ to your test server
  2. apply attached patch (unzip it to your moodle directory)
  3. turn slasharguments "on"
  4. go to http://yoursite/file.php/test
  5. if it does not work, try setting "cgi.fix_pathinfo=1" in your php.ini
  6. test resubmitting assignments, uploaded files, tex, quiz images, etc.
  7. report to this thread

Changes:
  • built-in diagnostics of slasharguments
  • slasharguments should work on IIS in PHP cgi mode (ISAPI does not work)
  • assignments are accessible only by teachers and its authors
  • assignments are not cached - can be viewed after resubmitting
  • fixed preview of questions in unsaved quizes
  • other internal fixed and code cleanup

I need to get as much testers as possible, especially IIS users and linux platform with old PHP (4.3.3 and older). If everything works fine this code will be part of 1.4.3 release.

It is not finished yet, please do not install it on production servers!

skodak
Average of ratings: -
In reply to Petr Skoda

Re: Please help test new handling of uploaded files - urgent!

by Teemu Sumi -
Works very well with Debian Linux and PHP 4.1.2. I tested for example resubmitting assignments and the new picture appeared right away. I tried slasharguments off and it worked too.


Teemu
In reply to Teemu Sumi

Re: Please help test new handling of uploaded files - urgent!

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Thanks!!!

I am reviewing my code and fixing headers to be more compatible with IE and Word. I will upload updated version within 12 hours.

skodak
In reply to Petr Skoda

Re: Please help test new handling of uploaded files - urgent!

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
I need more time to test the prevention of caching of assigments.

I did not find any major problem in patch above yet, so please test it.
In reply to Petr Skoda

Re: Please help test new handling of uploaded files - urgent!

by Peter Honan -
Changes:

Whats the issue with ISAPI, changing to ISAPI over CGI solved a number of issues for my sites? Does this break ISAPI??mixed

In reply to Peter Honan

Re: Please help test new handling of uploaded files - urgent!

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
I did not manage to configure my test servers to work correctly using slasharguments (for PHP 4.3.9) in IIS+ISAPI.

I am sure my code is correct, I only need to find the correct configuration (or bug in PHP?) for PHP.

I wil test PHP 5 later.

If somebody makes it work under ISAPI, he/she will make me very happy wink


skodak
In reply to Petr Skoda

Re: Please help test new handling of uploaded files - urgent!

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
big grin I have just updated my testbox to PHP 5.0.3RC1 and slasharguments under IIS work for cgi and isapi - without any configuration big grin
In reply to Petr Skoda

Re: Please help test new handling of uploaded files - urgent!

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
This is really good but I think it might have become too large a change to try in 1.4.x ... can you check it into 1.5??
In reply to Martin Dougiamas

Re: Please help test new handling of uploaded files - urgent!

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Sure, I will check it into 1.5 tonight wink

I will also update moodlelib.php (PARAM_ALHANUM) and quiz/lib.php (question preview problem - missing quiz id) in 1.4_STABLE. Both changes are 100% compatible with present code and would simplify testing of the code above for the brave ones willing to use it on their servers. If it is a problem, please let me know.

skodak
In reply to Petr Skoda

Re: Please help test new handling of uploaded files - urgent!

by Martín Langhoff -
Is this checked in yet? Was reviewing cvs logs and couldn't see it.

I've unzipped the file you uploaded into my STABLE working copy and reviewed the changes a bit. As MD suggests, it's quite large to take in one go.

And yet... some (most?) changes will make it into stable anyway -- addressing issues we are tracking in the security center. I will give it a second review, with an aim to see how much we can merge in.

Do you think you can help, breaking it out unto chunks that address a few issues at a time? That way, can merge it bit by bit, and, who knows, may end up with the whole thing in there.

In reply to Martín Langhoff

Re: Please help test new handling of uploaded files - urgent!

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
I did some major refactoring in all scripts that handle uploaded files. I have also changed headers a bit. It would be hard to break apart. It is IMO easier to fix the weak spots in current code base for 1.4.3 release.

I did not have time to review & commit it to 1.5dev yet, I will get to it after I am done with sessions wink

skodak