Go Back   FlashFXP Forums > >

Programming Need help with C/C++/Delphi? Ask here and make us all laugh.

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 12-29-2003, 03:07 PM   #1
anjo
Junior Member
 
Join Date: Dec 2003
Posts: 5
Question php doesn't terminate

hey!

I've written a script in php. When I call the script in windows from dos (php.exe -q -n c:/blabla/bla.php) it runs as it should and then terminates.

But when I call the same script from ioftpd (phptest = EXEC c:/blabla/php.exe c:/blabla/bla.php under [scripts] in ioftpd.ini) with 'site phptest' the script runs but never terminates! Even when I tell it to terminate with both die() and exit()!

In the ftpclient no result is presented untill I manually kill php.exe through taskmanager.

Any suggestions would be appreciated!

ioftpd v5.3.0
anjo is offline  
Old 12-29-2003, 03:25 PM   #2
ADDiCT
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Aug 2003
Posts: 517
Default

why don't u supply the parameters -q -n in your sitecommand ? i don't know what they do, but:
- u use them in your console box, and not in ioftpd
- when running it in your console box it closes, and in ioftpd it doesn't

and please upgrade your ioFTPD to latest 5.3.9 version (or 5.4.3)
ADDiCT is offline  
Old 12-29-2003, 04:52 PM   #3
anjo
Junior Member
 
Join Date: Dec 2003
Posts: 5
Smile

I actually do supply the -q -n parameters in site command.. I only forgot to write them when I posted..

.. I upgraded to 5.3.9 and there was no change.. I'll try upgrading php to latest version(5.x beta ?) tomorrow

... okey I couldn't wait for morning so I upgraded php to latest beta (5.0.0b3) and it seems to have solved the problem..

btw
look at http://aspn.activestate.com/ASPN/doc...mmandline.html
if you want to know what -q and -n does
anjo is offline  
Old 12-30-2003, 10:35 AM   #4
SnypeTEST
Senior Member
ioFTPD Scripter
 
Join Date: Feb 2003
Posts: 458
Default

use php.exe from \cli\ folder of your php distribution.
SnypeTEST is offline  
Old 12-30-2003, 05:50 PM   #5
anjo
Junior Member
 
Join Date: Dec 2003
Posts: 5
Default

cli = command line interface?`
heh ok thanks..

since you're using php in your script maybe you know the answer to another question of mine?

I have a very simple ftp login script that works in windows dos.
I change nothing and run it from ioftpd and it fails to login!!?!!
anjo is offline  
Old 12-30-2003, 06:01 PM   #6
SnypeTEST
Senior Member
ioFTPD Scripter
 
Join Date: Feb 2003
Posts: 458
Default

you need systemroot and windir in the environment
SnypeTEST is offline  
Old 01-08-2004, 05:41 AM   #7
MaZza_Dj
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 123
Default

Excuse me but i have used this php.exe donwloaded from http://members.lycos.co.uk/snypetest/ don't go have pho.exe php.ini and 3 files *.dll
this php don't terminate my cpu work 100% all time....this are one big problem but the sfv check go with this php i can't use this!!!

in alternative i have used only php.exe and php4ts.dll from php-5.0.0b3-Win32 downloaded from www.php.net...with the old version of ioFTPD go and go very good perfect cpu usage and perfect sfvcheck with ioFTPD 5.4.3 tell me this error

[23.21.54] 226-<b>Fatal error</b>: Maximum execution time of 30 seconds exceeded in <b>E:\ioFTPD\scripts\php_psio\funcs.php</b> on line <b>1256</b><br />
[23.21.54] 226 Transfer complete.

I CANT USE THIS with this version of ioFTPD or the last version of php_psio i don't know what is it!!!

Now i try php.exe from cli folder in php-5.0.0b3-Win32 and all file from SnypeTEST php packet download from http://members.lycos.co.uk/snypetest/: DON'T GO THE SFV CHECK with this config and all file uploaded was deleted in automatic!!!

The last alternative is php.exe from cli folder and php4ts.dll from php-5.0.0b3-Win32 downloaded from www.php.net AND WITH THIS CONFIG I HAVE THE SAME PROBLEM WITH THE ORIGINAL PACKET DOWNLOAD FROM http://members.lycos.co.uk/snypetest/
DON'T CLOSE IT THE PHP.EXE
MaZza_Dj is offline  
Old 01-08-2004, 06:22 AM   #8
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

As already suggested it's likely that some environment variable is missing.
darkone is offline  
Old 01-09-2004, 05:36 AM   #9
anjo
Junior Member
 
Join Date: Dec 2003
Posts: 5
Default

With the cli (php v4.3.4) and the windir/systemdir in enivronment everything seems to be working as it should.

How to add windir and systemdir to environment, iotrial:
"
$windir="c:\\windows\\";
putenv("WINDIR=".$windir);
putenv("SYSTEMROOT=".$windir);
"
anjo is offline  
Old 01-09-2004, 11:40 AM   #10
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

adding those variables in ioftpd.env would be a better solution...

SYSTEMROOT=%[environment(SYSTEMROOT)]
WINDIR=%[environment(SYSTEMROOT)]

Both have the same value btw... thus where (SYSTEMROOT) in both...
Mouton is offline  
Closed Thread

Tags
c/blabla/bla.php, php, runs, script, terminates

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:10 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)