Problem with XMLHttpRequest

See all posts Reply

Problem with XMLHttpRequest new!
by Ivo, 11 years, 7 months ago
Appears this error when I try to upload through XMLHttpRequest:
File not uploaded on the server
Error: Can't create the temporary file. Can't carry on a process.


On PHP log:
[12-Apr-2013 12:07:28 UTC] PHP Warning: file_put_contents(): open_basedir restriction in effect. File(C:\WINDOWS\TEMP\bcdd765572f242cb7595c5a0da88d0dd) is not within the allowed path(s): (D:\Ivo_trabalhos\1_PHP) in D:\Ivo_trabalhos\1_PHP\uteis\upload\class.upload.php on line 2737
[12-Apr-2013 12:07:28 UTC] PHP Warning: file_put_contents(C:\WINDOWS\TEMP\bcdd765572f242cb7595c5a0da88d0dd): failed to open stream: Operation not permitted in D:\Ivo_trabalhos\1_PHP\uteis\upload\class.upload.php on line 2737


does anyone know what can be?

PHP Version 5.3.17
WinXP
IIS 5.1Reply
Re: Problem with XMLHttpRequest new!
by colin, 11 years, 7 months ago
If you have open_basedir restrictions activated, then the class tries to create a temp file somewhere. It seems to fail, probably because of permissions. What does the log of the class say?

Also note that the class is not supported on Windows or IIS, although it should work. Please use a Unix system.Reply
Re: Problem with XMLHttpRequest new!
by Ivo Reis, 11 years, 7 months ago
system information
- class version : 0.32
- operating system : WINNT
- PHP version : 5.3.17
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : D:\Ivo_trabalhos\1_PHP
- upload_max_filesize : 2M (2097152 bytes)
- language : en_GB
source is a PHP stream ss_horoscopo_rexona_arroba.jpg
- this is a PHP stream, requires a temp file ... failedReply
Re: Problem with XMLHttpRequest new!
by colin, 11 years, 7 months ago
Check your permissions, and then it should workReply
Re: Problem with XMLHttpRequest new!
by Ivo Reis, 11 years, 7 months ago
already checked permissions
all work except the XMLHttpRequest
see link
http://www.softwaresgratis.com.br/temp/upload.gifReply
Re: Problem with XMLHttpRequest new!
by colin, 11 years, 7 months ago
In the code, above this line:
$this->error = $this->translate('temp_file');
Can you add the first line, as following:
$this->log .= '- ' . $hash;
$this->error = $this->translate('temp_file');

Then check that the filename displayed can be created.

As I said before, it should work on Windows, but I cannot support the class on this OS. I can't even test it on Windows...Reply
Re: Problem with XMLHttpRequest new!
by Ivo Reis, 11 years, 7 months ago
I still could not make it work

I thought the page below would help me, but nothing works
http://www.howyoudo.info/index.php/how-to-fix-windows-server-upload-file-inherit-permissions-error/

thank you very much for your attention, I believe that your class was the best of the web, but I'll have to try to find anotherReply