Hi Folks: Upgraded today from 4.0.7-dev to 4.1.1 on my Windows NT / Apache system in hopes of eliminating a problem I'm having. But, doing so brought up another problem...
First, I found that in my 4.1.1 implementation, I had to use short file names when running PGP in an exec() statement. In 4.0.7-dev, long file names were fine. Wondering if anyone knew what changed. Second, the problem I was trying to quash is still there. The script loops through an array, putting the contents into a file and then PGP signing that file. It works fine the first 17 times. But, after the 18th file is run through PGP, PHP hangs. I added some debugging after PGP is exec()'ed. That statement doesn't get executed the 18th time. If I then kill PGP via the Process list in the Task Manager, the PHP loop contiunues on, creating the file showing the results from the 18th exec() of PGP and then going into the 19th loop and then hangs after the PGP exec(). Killing PGP again, the 19th debug file is created and the process goes onto the 20th file... Is there some process or file limit I'm running into in PHP? Or is it a PGP problem? I don't think it is. I've added sleep() statements to slow things down, in the event that was the problem. It wasn't. Still gets cought at the 18th round. The size of the stuff being saved in the file doesn't matter. Things hang after 18 tries. Looking through the PGP documentation, various PHP and PGP related newsgroups and general web queries found nothing relevant. Here's a code sample... <?php # OKAY in 4.0.7-dev. BAD in 4.1.1. $PGP = 'l:/program files/network associates/pgpnt/pgp.exe'; # OKAY either way. $PGP = 'l:/PROGRA~1/NETWOR~1/pgpnt/pgp.exe'; putenv("PGPPATH=L:/PROGRA~1/NETWOR~1/PGPNT/PGPKEY~1"); $PGPFile = './zoo'; $PGPUser = 'xyz <[EMAIL PROTECTED]>'; set_time_limit(0); $Count = 25; for ($i = 1; $i < $Count; $i++) { $fp = fopen("$PGPFile$i", 'w+'); fputs($fp, "stuff"); fclose($fp); # In the 18th itteration, the process hangs AFTER executing # this statement... exec("$PGP -sta $PGPFile$i -o $PGPFile$i -u \"$PGPUser\"", $x); # Let's log PGP activity to see what happens... $fp = fopen("$PGPFile$i.txt", 'w+'); fputs($fp, implode("\r\n", $x) ); fclose($fp); unset($x); $fp = fopen("$PGPFile$i.asc", 'r'); $Out = fread($fp, filesize("$PGPFile$i.asc")); fclose($fp); # unlink("$PGPFile$i"); # unlink("$PGPFile$i.asc"); echo "<pre>$i++++++++++++++++++++++\n$Out</pre>\n\n"; } ?> Thanks for your thoughts, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php