Hi!
I had great troubles with the easy populate contribution when transfering our site to a new server - the upload did not work and gave no error messages. I read many threads without getting any answers... however I solved the issues, and thought I wanted to share it.
1. Many people had problems with the temp directory which often on a shared server got assiged wrong - this was my first issue which I solved with adding $_SERVER["DOCUMENT_ROOT"] before each $tempdir.
this will give the correct root path on a shared server i.e. /usr/local/apache/www/catalog/temp/
2. The next and biggest problem I had lies in the server I use had "Register globals off" which caused form post and other variables to come back empty.
Since my host don't allow register globals to be turned on - this is common on all new PHP versions (PHP 4.2.0 and later). I solved this by adding a couple of lines at the top of easypopulate.php, after the $tempdir declarations:
// fix by jb 20040815 set the strings to http post/request, since they don't seem to work on the new server, with register globals=off...
$dltype=$_REQUEST['dltype'];
$download=$_REQUEST['download'];
global $HTTP_POST_FILES;
foreach( $HTTP_POST_FILES as $varname => $fileinfo ){
$GLOBALS[$varname] = $fileinfo["tmp_name"];
$GLOBALS[$varname.'_name'] = $fileinfo["name"];
}
// end fix jb
I hope this will give some people a few days less work on how to get EasyPopulate to work!
Regards Jonas