Bjorn wrote:Also if I try the statistics i get following error:
Warning: Invalid argument supplied for foreach() in d:\customers\kullberg.nu\wwwroot\forum\uploadimg_stats.php on line 533
Warning: Invalid argument supplied for foreach() in d:\customers\kullberg.nu\wwwroot\forum\uploadimg_stats.php on line 589
Thanks for letting me know. This happens because the uploads folder is still empty (nothing has been uploaded yet), so the "contents" arrays are empty. To fix this these arrays must be declared. I will include this fix in the next version (v1.3.0).
#
#---------[ 1. OPEN ]-----------------------------------------------------------
#
uploadimg_stats.php
#
#---------[ 2. FIND (line: 75) ]-----------------------------------------------
#
$file_prefix = $pun_user['id']."_"; // the pun user id is used as the prefix for all uploaded files
$prefix_length = strlen($file_prefix);
#
#---------[ 3. AFTER, ADD ]--------------------------------------------------
#
$nuwearray = array();
$tmp_array = array();
Bjorn wrote:Can it be that nothin is uploaded?
My Server where the forum is:
gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
/Björn
Can you also please get the following info for me (using <? phpinfo() ?>)
At the very top of the page:
*PHP Version
Under Configuration - PHP Core:
(on or off?)
*safe_mode
*safe_mode_gid
*magic_quotes_gpc
*magic_quotes_runtime
*magic_quotes_sybase
At the bottom of the page:
Under Environment:
*TERM
Did you remember to CHMOD the uploads and uploads/thumbs directories to 777?
What happens right after trying to upload an image? Do you get an error message?
onecut wrote:thx a lot for quick answer.
It seems to works but i get a
"Warning: Division by zero in /home/www/xxxxxxxxxxxxx/web/forums/uploadimg.php on line 250"
message in the same time that i get the links (who are working).
thx, cu, onecut
Did you change anything in the uploadimg_config.php file?
It seems the problem is with the following two lines:
$zoomw = $currwidth/$twidth;
$zoomh = $currheight/$theight;
if $twidth and $theight is not set in the uploadimg_config.php file - you will get a 'Division by zero' error.
try replacing the above with
$zoomw = $currwidth/150;
$zoomh = $currheight/150;
to see if it fixes the problem.