NYCPHP Meetup

NYPHP.org

[nycphp-talk] 2 hour EMERGENCY HELP!

Edward Potter ejp at well.com
Mon Aug 18 11:52:14 EDT 2003


On these kind of bugs, u can try to become the user your web server 
runs as (maybe 'nobody?' if u don't have a shell account for that user, 
u can sudo nobody from root). Then try to move around in the 
directories, and save files at various points along the path.  May help 
find your bug.

- ed


On Monday, August 18, 2003, at 11:26 AM, Brian Pang wrote:

> are you sure that your $ACTUAL_STARTPATH is a full filesystem path?
> i.e.   /home/path/to/actual/start/path
>
> the error seems to indicate that you're just trying to move up
> relatively to the parent dir
>
> Hopefully you figured it out as I believe that your 2 hour deadline is
> long past due :)
>
>
>> This is a multi-part message in MIME format.
>>
>>
>> I am facing a 2 hour deadline (it's 4:30EST right now) and I can't get
> past this:
>>
>> Warning: Unable to create '../content/absolutetruthrelativetruth.txt':
> Permission denied in
> /home/youth/finesocceryouthsessions-www/include/admin_content.php on 
> line 80
>>
>> Warning: Unable to move '/tmp/phpYLgpcn' to
> '../content/absolutetruthrelativetruth.txt' in
> /home/youth/finesocceryouthsessions-www/include/admin_content.php on 
> line 80
>>
>> Warning: chmod failed: No such file or directory in
> /home/youth/finesocceryouthsessions-www/include/admin_content.php on 
> line 86
>>
>>
>> Please, someone, anyone on earth, HELP!
>>
>> Code:
>>
>>     if ($hasSubmittedContent) {
>>      $fileName = str_replace(' ', '_', $_FILES['content']['name']);
>>      // MOVE TO /content folder AND ADD _ TO ANY SPACES IN ORIGINAL 
>> NAME
>>      move_uploaded_file($_FILES['content']['tmp_name'],
> "$ACTUAL_STARTPATH/content/$fileName");
>>     }
>>
>>
>>     if ($hasSubmittedContent) {
>>      // LOCK THE FILES DOWN AND REMOVE THE TEMP FILES - LOCK TO
> PREVENT UNPAID USERS FROM VIEWING
>>      chmod("$ACTUAL_STARTPATH/content/$fileName", 0700);
>>      echo $font . '<font color=000099>File Uploaded: ' .
>>           $ACTUAL_STARTPATH . '/content/' . $fileName .
> '</font></font><p>';
>>      @unlink($_FILES['content']['tmp_name']); // SUPPRESS POTENTIAL
> WARNINGS IF !is_uploaded_file
>>     }
>>
>>
>>
>> Phil
>>
>
>
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>




More information about the talk mailing list