Go Back   FlashFXP Forums > > > >

ioFTPD General New releases, comments, questions regarding the latest version of ioFTPD.

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-25-2005, 10:35 AM   #1
r3flux
Member
ioFTPD Foundation User
 
Join Date: Feb 2005
Posts: 48
Default Problem with PHP execution

heya ioftpd forum!

i want to call a php script through a site command.

my ioFTPD.ini looks like:

[FTP_Custom_Commands]
mycommand = EXEC php.exe -q s:\htdocs\jobs\command.php

[FTP_SITE_Permissions]
mycommand = 1M


content from command.php

PHP Code:
<?php echo "test 1 2 3"?>
(just for testing )

when i now perform this command in on the ftp, i'll only get this return message:

Code:
[R] site mycommand
[R] 200 Command successful.
but no response from the script ...

any idea what i've done wrong?

thx for help!
r3flux is offline   Reply With Quote
Old 03-25-2005, 02:53 PM   #2
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

php.exe not found.
where is it ?
Mouton is offline   Reply With Quote
Old 03-25-2005, 05:07 PM   #3
r3flux
Member
ioFTPD Foundation User
 
Join Date: Feb 2005
Posts: 48
Default

Quote:
Originally posted by Mouton
php.exe not found.
where is it ?
hm, when i run this script manually in the windows shell, it works great.

even when i enter the full path to the php.exe in ioFTPD.ini, it wont work (full path to php.exe: D:\ioFTPD\system\php.exe).
r3flux is offline   Reply With Quote
Old 03-25-2005, 05:41 PM   #4
SnypeTEST
Senior Member
ioFTPD Scripter
 
Join Date: Feb 2003
Posts: 458
Default

try making a .bat file

@echo off
echo hello balls!
php.exe -q myphp.php

and execute the bat file instead..
SnypeTEST is offline   Reply With Quote
Old 03-26-2005, 07:25 AM   #5
r3flux
Member
ioFTPD Foundation User
 
Join Date: Feb 2005
Posts: 48
Default

Quote:
Originally posted by SnypeTEST
try making a .bat file
that wont work either.

i cant find the error why this wont work.

first of all, my current folder structure:

Code:
d:\ioFTPD\system\php.exe
d:\ioFTPD\scripts\dupecheck\nuke.bat
d:\ioFTPD\scripts\dupecheck\nuke.php
content from nuke.bat

Code:
@echo off
echo hello balls!
D:\ioFTPD\system\php.exe -f D:\ioFTPD\scripts\dupecheck\nuke.php
content from ioFTPD.ini

Code:
[FTP_Custom_Commands]
nukeBat = EXEC ..\scripts\dupecheck\nuke.bat
nukePHP	= EXEC D:\ioFTPD\system\php.exe -q -f D:\ioFTPD\scripts\dupecheck\nuke.php

[FTP_SITE_Permissions]
nukeBat = 1M
nukePHP = 1M
content from php doesnt changed (see my first post).

results:

Code:
[R] site config rehash
[R] 200 config Command successful.
[R] site nukePHP
[R] 200 Command successful.

[R] site config rehash
[R] 200 config Command successful.
[R] site nukeBat
[R] 200-hello balls!
[R] 200 Command successful.
but the php wont be executed.



when i copy&paste the execute line (nukePHP) from ioFTPD.ini to windows shell it works perfect. so the problem is not the php.exe.

i dont know what i must do now, i spend now 1 hour finding the error at this strange problem.
r3flux is offline   Reply With Quote
Old 03-26-2005, 12:36 PM   #6
SnypeTEST
Senior Member
ioFTPD Scripter
 
Join Date: Feb 2003
Posts: 458
Default

try putting a \n at the end of your print statement.

<? print "1 2 3\n"; ?>

also, try this bat file..

@echo off
echo executing php
D:\ioFTPD\system\php.exe -f D:\ioFTPD\scripts\dupecheck\nuke.php
echo Finished
SnypeTEST is offline   Reply With Quote
Old 03-26-2005, 06:48 PM   #7
r3flux
Member
ioFTPD Foundation User
 
Join Date: Feb 2005
Posts: 48
Default

Quote:
Originally posted by SnypeTEST
try putting a \n at the end of your print statement.

<? print "1 2 3\n"; ?>
weeee!!!! it works! :banana:

thanks for helping me out man, really appreciated
r3flux is offline   Reply With Quote
Reply

Tags
command, ftp, mycommand, script, site

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick Question Rocket442 General Discussion 2 01-21-2005 04:25 AM


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

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