Is that a mistake: +ADw-form method+AD0AXAAi-POST+AFwAIg- action+AD0AXAAiACQ-PHSELF+AFwAIg- +enctype+AD0AXAAi-multipart/form-data+AFwAIgA+-
or just a mistyped line: +ACQ-PHSELF instead of +ACQ-PHP+AF8-SELF? Ciao, Nino +AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9- http://www.vessella.it (italiano, esperanto, kiswahili, english) http://www.changamano.org (Iniziative di solidariet+AOA- per la Tanzania) Corso di lingua swahili: http://corsoswahili.vessella.net Corso di lingua esperanto: http://esperanto.vessella.net Jifunze lugha ya Kiesperanto: http://kiesperanto.vessella.net Kamusi/Vortaro: http://kamusi.vessella.net Vocabolario esperanto-italiano: http://vortaro.vessella.net ----- Original Message ----- From: +ACI-Aidal+ACI- +ADw-aidal+AEA-nospam.dk+AD4- To: +ADw-php-windows+AEA-lists.php.net+AD4- Sent: Wednesday, October 23, 2002 11:27 AM Subject: +AFs-PHP-WIN+AF0- HTTP+AF8-POST+AF8-VARS - need help +AD4- I'm trying to make a simple upload script. +AD4- The script is suppose to do severel checks after form submition. +AD4- The problem is that it seems that I don't have access to HTTP+AF8-POST+AF8-VARS for +AD4- some reason. +AD4- In php.ini I have the following definitions (among others of cause): +AD4- +AD4- upload+AF8-tmp+AF8-dir +AD0- +ACI-C:+AFw-php4+AFw-uploadtemp+ACI- +AD4- file+AF8-uploads +AD0- On +AD4- register+AF8-globals +AD0- On +AD4- +AD4- The sending FORM looks like this (all HTML removed): +AD4- +AD4- +ADw-form method+AD0AXAAi-POST+AFwAIg- action+AD0AXAAiACQ-PHSELF+AFwAIg- +enctype+AD0AXAAi-multipart/form-data+AFwAIgA+- +AD4- +ADw-input type+AD0-hidden name+AD0-AKTION value+AD0-upload+AF8-img+AD4- +AD4- +ADw-input type+AD0-file name+AD0-file+AD4- +AD4- +ADw-input type+AD0-submit value+AD0-Upload+AD4- +AD4- +AD4- The receiving script looks like this: +AD4- +AD4- switch(+ACQ-AKTION) +AHs- +AD4- case upload+AF8-img: +AD4- echo +ACI-upload check started+ADw-br+AD4AIgA7- +AD4- echo +ACQ-GLOBALS+AFs-'file'+AF0-.+ACIAPA-br+AD4AIgA7- +AD4- +AD4- if (+ACQ-HTTP+AF8-POST+AF8-VARS+AFs-'submit'+AF0-) +AHs- +AD4- print+AF8-r(+ACQ-HTTP+AF8-POST+AF8-FILES)+ADs- +AD4- if +(+ACE-is+AF8-uploaded+AF8-file(+ACQ-HTTP+AF8-POST+AF8-FILES+AFs-'file'+AF0AWw-'tmp+AF8-name'+AF0-)) + +AHs- +AD4- echo +ACI-The file wasn't uploaded+ACIAOw- +AD4- +unlink(+ACQ-HTTP+AF8-POST+AF8-FILES+AFs-'file'+AF0AWw-'tmp+AF8-name'+AF0-)+ADs- +AD4- +AH0- else +AHs- +AD4- +ACQ-maxfilesize+AD0-10240+ADs- +AD4- if (+ACQ-HTTP+AF8-POST+AF8-FILES+AFs-'file'+AF0AWw-'size'+AF0- +AD4- ++ACQ-maxfilesize) +AHs- +AD4- echo +ACI-The file was too large+ACIAOw- +AD4- +unlink(+ACQ-HTTP+AF8-POST+AF8-FILES+AFs-'file'+AF0AWw-'tmp+AF8-name'+AF0-)+ADs- +AD4- +AH0- else +AHs- +AD4- if (+ACQ-HTTP+AF8-POST+AF8-FILES+AFs-'file'+AF0AWw-'type'+AF0- ++ACEAPQ- +ACI-image/gif+ACI- AND +AD4- +ACQ-HTTP+AF8-POST+AF8-FILES+AFs-'file'+AF0AWw-'type'+AF0- +ACEAPQ- ++ACI-image/pjpeg+ACI-) +AHs- +AD4- echo +ACI-This file type isn't allowed for uploads+ACIAOw- +AD4- +unlink(+ACQ-HTTP+AF8-POST+AF8-FILES+AFs-'file'+AF0AWw-'tmp+AF8-name'+AF0-)+ADs- +AD4- +AH0- else +AHs- +AD4- +copy(+ACQ-HTTP+AF8-POST+AF8-FILES+AFs-'file'+AF0AWw-'tmp+AF8-name'+AF0-,+ACI-C:+AFwAXA-Program +AD4- +Files+AFwAXA-Apache+AFwAXA-htdocs+AFwAXA-nef+AFwAXA-images+AFwAXAAi-.+ACQ-HTTP+AF8-POST+AF8-FILES+AFs-'file'+AF0AWw-'name'+AF0-)+ADs- +AD4- +unlink(+ACQ-HTTP+AF8-POST+AF8-FILES+AFs-'file'+AF0AWw-'tmp+AF8-name'+AF0-)+ADs- +AD4- print +ACI-File has been successfully uploaded+ACEAIgA7- +AD4- exit+ADs- +AD4- +AH0- +AD4- +AH0- +AD4- +AH0- +AD4- +AH0- else +AHs- +AD4- echo +ACI-No form submition was registered+ACIAOw- +AD4- +AH0- +AD4- break+ADs- +AD4- +AH0- +AD4- +AD4- This produces the following 3 lines of output: +AD4- +AD4- upload check started +AD4- C:+AFw-php4+AFw-uploadtemp+AFw-php9223.TMP +AD4- No form submition was registered +AD4- +AD4- Acording to my script this means that the receiving script couldn't +AD4- catch/access the HTTP+AF8-POST+AF8-VARS. +AD4- I'm aware that some variable names have changed, like HTTP+AF8-POST+AF8-FILES ++AD0APg- +AD4- +ACQAXw-FILES and so on, but this shouldn't affect this script since it never get +AD4- to the part with HTTP+AF8-POST+AF8-FILES. +AD4- +AD4- If anyone can give me a clue to whats wrong here please let me know. +AD4- Also if you need more info about php.ini settings let me know and I'll post +AD4- it asap. +AD4- +AD4- Regards +AD4- +AH4- Aidal +AD4- +AD4- +AD4- +AD4- +AD4- +AD4- +AD4- +AD4- +AD4- +AD4- +AD4- +AD4- +AD4- +AD4- +AD4- +AD4- -- +AD4- PHP Windows Mailing List (http://www.php.net/) +AD4- To unsubscribe, visit: http://www.php.net/unsub.php +AD4- -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php