Page 1 of 1

PHP upload fails with filename including quote

Posted: Sun Jul 06, 2008 4:15 pm
by support
If you have some filenames including quotes such as abc'and''test.zip then PHP upload script could all the beginning. Then the uploaded filename becomes test.zip.

This problem is not related to the upload applet but to the way PHP is setup on your server.
See: http://us3.php.net/features.file-upload

To solve it, you have to turn magic_quotes_gpc to off either in php.ini or in .htaccess.

For php.ini, search for:
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

For .htaccess, put the following line into the .htaccess file:
php_flag magic_quotes_gpc off
See: http://www.php.net/manual/en/security.m ... .php#55935

Hope it helps.