Posts: 25
Threads: 8
Joined: Mar 2010
2010-03-16, 20:20:13
(This post was last modified: 2010-03-16, 20:32:12 by bobythomas.)
Hello,
When i try to upload some files in admin, no files are added neither in folder nor in interface.
However, when the upload is finished i can see "Completed".
Moreover, upload works correctly when JS is disable.
Problem environment :
- "Health" says that everything is OK.
- Tested with many pictures < 2 Mo
GS 2.01 - Php 5.3 - Firefox 3.6 and IE8
- No error in Php log
- No error in Apache log
No request seems to be sent (console Firebug) before the "refresh" call of upload.php
Thanks for your help !
Posts: 161
Threads: 6
Joined: Jan 2010
Posts: 25
Threads: 8
Joined: Mar 2010
sal Wrote:FlashBlock?
Same problem after having disable my no-ads plugin on Firefox and I don't have any IE8 plugin.
Posts: 339
Threads: 27
Joined: Nov 2009
Did you chmod the data (all all sub-folders) correctly?
Posts: 25
Threads: 8
Joined: Mar 2010
The problem was the 'DOCUMENT_ROOT' : in my case, he had nothing to do with GS.
So, the solution is :
In upload-ajax.php
Replace the line : $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
With : $targetPath = GSDATAUPLOADPATH;
In order to have the same code to do the same thing, we can do the equivalent in upload.php
Replace the line : $path = tsl("../data/uploads/");
With : $path = GSDATAUPLOADPATH;
The code is now more simple and works very well in all cases.
Posts: 972
Threads: 27
Joined: Aug 2009
Aah, great catch, apparently not all files are using the constants yet as these are relatively new.
Posts: 1,848
Threads: 86
Joined: Aug 2009
i made the change to the core for upload-ajax, but the one in upload.php would change how the links to files/images are shown, correct?
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 25
Threads: 8
Joined: Mar 2010
It changes how they are shown and the upload location :
Code:
$file_loc = $path . $count.'-'. $_FILES["file"]["name"];
[...]
move_uploaded_file($_FILES["file"]["tmp_name"], $file_loc);
Posts: 1,848
Threads: 86
Joined: Aug 2009
you cant use an absolute path when viewing a file like that, so changing $path to use the constant wouldnt work
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 3
Threads: 1
Joined: Mar 2010
Thanks spilarix for bringing up this isue with the file uploader.
The same thing has happened to me and I intend to try it out with the java script thing turned off.
I have read through the other comments for a solution but for a novice like myself I have not understood how to sort the problem out. That is if there is a solution found yet. I hope that this uploader will work in the next version.
I would like it if there is a solution explained in another way for a person like me who needs things explained in more detail.
Many thanks for this topic
and A big thanks to get simple for the best cms I have come accross. I'm loving it.
from Hugo
Posts: 25
Threads: 8
Joined: Mar 2010
Hugo -> modification on upload-ajax.php described in post #5 is the solution...