#45 Restore working directory inside the shutdown function

closed-accepted
None
5
2011-11-30
2011-10-09
Anonymous
No

Note for register_shutdown_function:
Working directory of the script can change inside the shutdown function under some web servers, e.g. Apache.

In such cases the relative path does not work.
Solution: save the current working directory in autorun.php and restore it in the shutdown function simpletest_autorun().

Discussion

  • Nobody/Anonymous

    autorun.php diff file

     
  • Perrick Penet

    Perrick Penet - 2011-11-30
    • assigned_to: nobody --> pp11
    • status: open --> open-accepted
     
  • Perrick Penet

    Perrick Penet - 2011-11-30

    Do you have a specific test case in mind ? It could help me apply the patch. Which by the way doesn't include the lines : I can'y apply it simply enough ;-)

    Yours,
    Perrick

     
  • Perrick Penet

    Perrick Penet - 2011-11-30
    • status: open-accepted --> closed-accepted
     
  • Perrick Penet

    Perrick Penet - 2011-11-30

    Patch applied...

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks