Go Back   FlashFXP Forums > > > >

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

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-10-2004, 11:40 AM   #1
maddin
Junior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2004
Posts: 7
Question PHP script documentation

as there is a php script support in ioftpd, i want to write some test scripts for myself, but i don't find any documentation about that topic. even searching the forums brought no real matches. so, can anybody tell me how to write a php script for io or how i can access io-vars?

i'm not a complete php newbie, i wrote many web-scripts, but i haven't written any cmd-line scripts so far...

thx in advance

by the way: php5 support would be nice because there are many errors when starting io with php5 (which is installed for my local webserver)
maddin is offline   Reply With Quote
Old 11-10-2004, 12:23 PM   #2
ADDiCT
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Aug 2003
Posts: 517
Default

Quote:
Originally posted by maddin
... but i haven't written any cmd-line scripts so far.
currently, there is only php support for the internal webserver. next ioFTPD version wil (probably?) have support for scripts on events (like iTCL now)

edit: oh yeah, u can run "php.exe script.php" on events, and then read the environment variables from $_SERVER (i think, check phpinfo(); to see which system array contains them)

this documentation has been enough for me to write some http pages to list active users, browse the directory structure, add users, ...
ADDiCT is offline   Reply With Quote
Old 11-10-2004, 03:34 PM   #3
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

php scripts


site transfer
http://www.ioftpd.com/scripts/script.php?id=156

php_psio
http://www.ioftpd.com/scripts/script.php?id=6
jeza is offline   Reply With Quote
Old 11-10-2004, 03:44 PM   #4
maddin
Junior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2004
Posts: 7
Default

well ok

that means that i have to run my scripts for example by the following lines (copied from php_psio) with optional parameters

Quote:
[events]
OnUploadComplete = EXEC php.exe -q D:\ioFTPD\php_psio\zipscript-c.php
OnUploadError = EXEC php.exe -q D:\ioFTPD\php_psio\zipscript-c.php
i'll try that

thx for the help
maddin is offline   Reply With Quote
Old 11-10-2004, 07:51 PM   #5
SnypeTEST
Senior Member
ioFTPD Scripter
 
Join Date: Feb 2003
Posts: 458
Default

maddin.. yep, or wait for next version of io
SnypeTEST is offline   Reply With Quote
Old 11-11-2004, 10:50 AM   #6
maddin
Junior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2004
Posts: 7
Default

until next version is out, i'll have to use this method


but now i have another problem:

quick system information:
- win xp sp2
- ioftpd 5.8.5r
- apache 2 + php 5!! + mysql 4.0.21
- php folder c:\programme\php (would be c:\program files\php on englisch xp)
- php.ini from php5 in c:\windows

when i run my short test.php ( <?php echo "test 1 2 3"; ?> ), i get the following "error" message, the script works though:

Quote:
[R] SITE test
[R] 200-test 1 2 3
[R] 200-200 SITE COMMAND SUCCESSFUL
[R] 200-Cannot find module (IP-MIB): At line 0 in (none)
[R] 200-Cannot find module (IF-MIB): At line 0 in (none)
[R] 200-Cannot find module (TCP-MIB): At line 0 in (none)
[R] 200-Cannot find module (UDP-MIB): At line 0 in (none)
[R] 200-Cannot find module (SNMPv2-MIB): At line 0 in (none)
[R] 200-Cannot find module (SNMPv2-SMI): At line 0 in (none)
[R] 200-Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
[R] 200-Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
[R] 200-Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
[R] 200-Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
[R] 200-Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
[R] 200-Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
[R] 200-Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
[R] 200-Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
[R] 200-Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
[R] 200-Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
[R] 200-Cannot find module (SNMPv2-TM): At line 0 in (none)
[R] 200 Command successful.
i think it's because php5 is installed and io is shipped with php4

the script is called by:
Quote:
[FTP_Custom_Commands]
test = EXEC php.exe -q C:\Programme\ioFTPD\scripts\test.php
any ideas?
maddin is offline   Reply With Quote
Old 11-11-2004, 10:53 AM   #7
SnypeTEST
Senior Member
ioFTPD Scripter
 
Join Date: Feb 2003
Posts: 458
Default

nope, havent tried 5.0 yet, actually, I have :P .. try umm, puttin the windir or systemroot dir in the ioftpd.env ?
SnypeTEST is offline   Reply With Quote
Old 11-11-2004, 11:10 AM   #8
maddin
Junior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2004
Posts: 7
Default

found a solution myself faster than i thought...

in the log there are many lines saying something about snmp. so i just commented out a few php extensions which i don't need. one of these was "php_snmp.dll". furthermore i moved my php.ini from c:\windows to c:\programme\php. now it works...

Quote:
[R] SITE test
[R] 200-test 1 2 3
[R] 200-200 SITE COMMAND SUCCESSFUL
[R] 200 Command successful.
thx for all your help anyway

maddin
maddin is offline   Reply With Quote
Reply

Tags
php, php5, script, scripts, write

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
Download grinding to a halt bruceh General Discussion 6 09-07-2004 08:29 AM


All times are GMT -5. The time now is 09:47 PM.

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