Jump to content

cdromes

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cdromes's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Specifically, when the user hits the back from a specific page, I need to execute a system command that deletes the contents of a directory that I create for each user via a session variable. The tap-dancing involves the fact that I've been trying to do this in Javascript because PHP doesn't seem to have any way of catching the 'Back' button. The problem with the Javascript method is that it simply displays a dialog box informing that you're about to leave the page. Click OK and you move back; click cancel and you don't. The method doesn't allow for the use of conditionals to check which choice was made, so there's no way to execute anything in the event 'OK' is clicked. I've never worked with AJAX....might that be the answer? Jason
  2. Howdy I'm wondering if there's a way to catch when the user clicks the 'Back' button from a specific page. When this happens, I need to run a system call that deletes everything in a session-specific directory. The systems call would look something like this: system('rm -r /home/websites/genework/html/DATA/'.$Sess_ID.'/*'); So, the only thing left is the snag involving the catch of the 'Back' button. Javascript has a way to catch this action (window.onbeforeunload), but the tap-dancing that would be required to get PHP to activate the system call is extremely ugly and I'm not even sure it'd work. Any help is greatly appreciated. Jason
  3. I was trying to execute stuff from directories that weren't specified in the OPEN_BASEDIR directive. Since I'm not the only user on the box, the solution was to create a directory structure on the web server and move all of the information from my personal directories over. Why is it that some solutions make you feel galactically stupid? Live. Learn. Yay.
  4. Nope. That was the first thing I checked. So, in this one case, it isn't The Man that's keeping me down.
  5. When I run your code, I get this output to the screen: perl -S /home/fyejm5/PERL/GetSeq.p /home/fyejm5/GENOME/MOUSE/CHR_17/149313536 34324324 500 /home/websites/genework/html/DATA/07-12-07--13:20:24/07-12-07--13:20:24 ...but it didn't actually work. When I copy this and paste it directly onto the command line and hit enter, it works perfectly. This screams "PERMISSIONS PROBLEM", but I don't know what other directories or file(s) need to be changed. Is it necessary to 'chmod 777' every directory in every path in this command?
  6. Howdy I'm attempting to use the exec() in a Linux environment involving files in directories, all of which have been 'chmod 777'd. This is the function call that doesn't work: $result = exec('perl -S /home/fyejm5/PERL/GetSeq.p '.$Path.'/'.$GI.' '.$Upstream.' '.$len.' /home/websites/genework/html/DATA/'.$Sess_ID.'/'.$Sess_ID, $response, $return_code); print_r(array('result was'=>$result, 'response was'=>$response, 'return code'=>$return_code )); Here's the actual output off the command, which works like a champ when I run it from the command line: perl -S /home/me/PERL/GetSeq.p /home/me/GENOME/MOUSE/CHR_17/149313536 34324324 500 /home/websites/genework/html/DATA/07-12-07--12:03:49/07-12-07--12:03:49 The result is the creation of two files in the 07-12-07--12:03:49 directory, each named 07-12-07--12:03:49.txt and 07-12-07--12:03:49.out. This is the result from the print_r: result was => response was => Array() return code => 13 What does the response mean? What error does 13 represent? Is there something syntactically wrong with the exec()? This. Is driving me. Insane. I've gotten execs to work in the past, so that makes this one a little heavier on the soul-crushing side of things. Please help. Jason
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.