1
karuna
The avatar size limits does not woks??
  • 2004/5/23 11:41

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


my config is 120*120 but i can upload a 300*300 image

my edituser.php is


// $Id: edituser.php,v 1.19 2004/01/10 05:06:37 okazu Exp $

2
phppp
Re: The avatar size limits does not woks??
  • 2004/5/23 12:11

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


getimagesize not always work well for gif

3
Dave_L
Re: The avatar size limits does not woks??
  • 2004/5/23 12:41

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


karuna: If you can post a link to that specific image, I'll see if getimagesize works properly on it. Please also state what version of PHP you're using.

4
karuna
Re: The avatar size limits does not woks??
  • 2004/5/23 13:03

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


thanks

i uploaded this image

http://www.ppfans.com/test.gif 300*300

hotlink has been enabled so maybe you have to copy it to the address

the php version is 4.3.5

5
Dave_L
Re: The avatar size limits does not woks??
  • 2004/5/23 13:23

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I downloaded the image as ppfans_logo.gif and ran this script:

<?php

error_reporting
(E_ALL);

define('FILENAME''ppfans_logo.gif');

$get_imagesize_result getimagesize(FILENAME);
var_dump('get_imagesize_result'$get_imagesize_result);

?>


I got this result:

Quote:
string(20) "get_imagesize_result"
array(7) {
[0]=>
int(88)
[1]=>
int(31)
[2]=>
int(1)
[3]=>
string(22) "width="88" height="31""
["bits"]=>
int(8)
["channels"]=>
int(3)
["mime"]=>
string(9) "image/gif"
}


That means that getimagesize sees the dimensions as 88x31. Irfanview and Paint Shop Pro also indicate that the dimensions are 88x31.

6
karuna
Re: The avatar size limits does not woks??
  • 2004/5/23 13:37

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


sorry because the hotlink has been enabled so the url above redircted to another image.

http://vod.ppfans.com/test.gif here is the image. on another host

7
Dave_L
Re: The avatar size limits does not woks??
  • 2004/5/23 13:47

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Ok, if I run the same script on that image, the result is 300x300. Could you try placing that script on your server (in your XOOPS directory, where the problem is occurring), set the FILENAME value to that image file, run the script, and post the output here?

8
karuna
Re: The avatar size limits does not woks??
  • 2004/5/23 14:00

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


string(20) "get_imagesize_result" array(7) { [0]=> int(300) [1]=> int(300) [2]=> int(1) [3]=> string(24) "width="300" height="300"" ["bits"]=> int(6) ["channels"]=> int(3) ["mime"]=> string(9) "image/gif" }

is 300*300


but i uploaded it as a avatar
http://www.ppfans.com/userinfo.php?uid=6

here is the link

9
Dave_L
Re: The avatar size limits does not woks??
  • 2004/5/24 14:49

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


What I would do next is add some debug code into XOOPS to see what's going on.

class/uploader.php

function checkMaxWidth()
    {
[
color=ff0000]$getimagesize_result getimagesize($this->mediaTmpName);#*#DEBUG#
var_dump('in checkMaxWidth''mediaTmpName'$this->mediaTmpName'maxWidth'$this->maxWidth'maxHeight'$this->maxHeight'getimagesize_result'$getimagesize_result);#*#DEBUG#[/color]
        
if (!isset($this->maxWidth)) {


You may also need to slow down the automatic redirection, to give you time to copy the diagnostic output:

include/functions.php

function redirect_header($url$time 3$message ''$addredirect true)
{
[
color=ff0000]    $time 600;#*#LONG_REDIRECT#[/color]
    
global $xoopsConfig$xoopsRequestUri;


Make backups of those files before modifying them.

Then re-upload the 300x300 avatar in Xoops, copy the diagnostic output and post it here.

10
karuna
Re: The avatar size limits does not woks??
  • 2004/5/25 15:25

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


sorry

i have used up the bandwidth yesterday (10g in 4 days --) and changed to another host doesn's limits the bandwidth.
is strange that the avatar size limits works now it's the same file, so this must due to the server's config. And i don't have the chance to add these code to the uploader.php to post the result

Login

Who's Online

160 user(s) are online (101 user(s) are browsing Support Forums)


Members: 0


Guests: 160


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits