Problem when uploading

Ermöglicht es dem Benutzer ein Bild in sein Profil einzufügen.

Problem when uploading

Beitragvon Fusione » 15. Aug 2006 22:38

Hi,
Thank you for this great mod!

I have a small problem when uploading the image. If the image is larger than the dimensions in the admin there will only be a white blank page and the image is not uploaded or resized.


What could be wrong?

Thank you!
Fusione
 
Beiträge: 13
Registriert: 15. Aug 2006 22:22

Beitragvon AmigaLink » 19. Aug 2006 18:51

The MOD needs a functioning gd_library.
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Beitragvon Fusione » 19. Aug 2006 21:53

Thanks for your reply. The server has working GD. I'm also using the Smatror photo album. Could there be some settings in this mod that need to be changed?
Fusione
 
Beiträge: 13
Registriert: 15. Aug 2006 22:22

Beitragvon AmigaLink » 20. Aug 2006 07:57

Normally my MOD is inteligent and do all settings by himself. :)
But you can try this:
Code: Alles auswählen
#
#----------[ OPEN ]-------------------------------------
#

includes/functions_profilepic.php

#
#----------[ FIND ]-------------------------------------
#

/**
* Get which version of GD is installed, if any.
*
* Returns the version (1 or 2) of the GD extension.
*/
# from Hagan Fox at http://de3.php.net/manual/en/function.gd-info.php#52481
function gdVersion($user_ver = 0)
{
   if (! extension_loaded('gd')) { return; }
   static $gd_ver = 0;
   // Just accept the specified setting if it's 1.
   if ($user_ver == 1) { $gd_ver = 1; return 1; }
   // Use the static variable if function was called previously.
   if ($user_ver !=2 && $gd_ver > 0 ) { return $gd_ver; }
   // Use the gd_info() function if possible.
   if (function_exists('gd_info')) {
       $ver_info = gd_info();
       preg_match('/\d/', $ver_info['GD Version'], $match);
       $gd_ver = $match[0];
       return $match[0];
   }
   // If phpinfo() is disabled use a specified / fail-safe choice...
   if (preg_match('/phpinfo/', ini_get('disable_functions'))) {
       if ($user_ver == 2) {
           $gd_ver = 2;
           return 2;
       } else {
           $gd_ver = 1;
           return 1;
       }
   }
   // ...otherwise use phpinfo().
   ob_start();
   phpinfo(8);
   $info = ob_get_contents();
   ob_end_clean();
   $info = stristr($info, 'gd version');
   preg_match('/\d/', $info, $match);
   $gd_ver = $match[0];
   return $match[0];
} // End gdVersion()

#
#----------[ REPLACE WITH ]-----------------------------
#

function gdVersion($user_ver = 0)
{
   $gd_ver = 2;
   return $gd_ver;
}

#
#----------[ SAVE AND CLOSE ALL FILES ]-----------------
#
# EoM

In the line $gd_ver = 2; you can place the version of your GD library (thus 1 or 2).
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Beitragvon Fusione » 3. Sep 2006 08:43

Does not help. I have also the Upload Picture mod installed on the same site and it works well. Is there a possibility to limit the uploaded userpic dimensions so that it wont accept too large pictures? If the picture is too large there could be a message telling that instead of the white blank page there is now.
Fusione
 
Beiträge: 13
Registriert: 15. Aug 2006 22:22

Beitragvon udeze » 30. Sep 2006 20:41

You asked a question on uploading picture problem, I also had similar problem which led me to this website but was just able to resolve it, there is a file called "profilepic.php" which is in the root folder but was not talked about in the installation manual, you can check whether you uploaded that file, that is what causes this problem
udeze
 
Beiträge: 1
Registriert: 30. Sep 2006 20:31

Beitragvon Fusione » 30. Sep 2006 22:55

Hi,
That is not the cause of my problem. I also noticed that the profilepic.php was missing from the instructions but found it before installing.

My problem is that if the image dimensions are larger than the dimensions set in the admin there will only be a white blank page and the image is not uploaded or resized.

The same image can still be uploaded and resizes in UploadPic but not with this mod.

Added after 29 days 19 hours 40 minutes:

Any ideas anyone? It would be great to be able to upload any sized images.
Fusione
 
Beiträge: 13
Registriert: 15. Aug 2006 22:22

Beitragvon AmigaLink » 1. Nov 2006 12:17

I don't now the UploadPic MOD. But I think that is a problem of your gd_library or the the image has an error.
My MOD exermines the image. So that hacker can't upload exploids. If you have the problem only by one or two pictures. Ignore it and use another one.
If it by all pictures. Call your webhoster to check the gd_library.

More I can't say to you. Because I can not simulate the error. :(
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Beitragvon Fusione » 1. Nov 2006 18:29

Hi,
Thank you for the reply.

There cannot be any problems with the GD as it works fine with uplod pic mod: http://www.beehave.de/forum/viewforum.php?f=17

With that mod i can upload all sizes without problem. With this mod I cannot upload large pictures. I can upload the same pictures successfully with uploadpic that also uses same GD library.

Here are my tests:

Userpic in Profile:
2560x1728 and 2.3 MB JPEG image - Not successfull: white page
2560x1728 and 0.5 MB JPEG image - Not successfull: white page
2560x1728 and 250 KB JPEG image - Not successfull: white page
1600x1080 and 250 KB JPEG image - Successfully uploaded and resized

Upload Pic:
2560x1728 and 2.3 MB JPEG image - Successfully uploaded and resized

Could there be differences in the way this mod uses GD? Please feel free to try on my test site.
Fusione
 
Beiträge: 13
Registriert: 15. Aug 2006 22:22

Beitragvon AmigaLink » 1. Nov 2006 19:36

Ok - I have test it on your board an see what you mean.
At large pictures it comes to an error after generating the popup picture. Thus the thumbnail for the profile can not be create. :?

It must be a characteristic from your server. Because I do not have this problem at my 4 servers. Those asks is only which. :x

Hmmm :?: Bild

Zugefügt nach 11 Minute(n):

Bild
Please try this:
Code: Alles auswählen
#
#----------[ OPEN ]-------------------------------------
#

includes/usercp_profilepic.php

#
#----------[ FIND ]-------------------------------------
#

      @chmod($phpbb_root_path.'images/userprofile_pics/'.$profilepic_file, 0777);

#
#----------[ AFTER, ADD ]-------------------------------
#

      @ImageDestroy($profilepic_temp);

#
#----------[ FIND ]-------------------------------------
#

         @chmod($phpbb_root_path.'images/userprofile_pics/thumbnails/'.$profilepic_file, 0777);

#
#----------[ AFTER, ADD ]-------------------------------
#

         @ImageDestroy($profilepic_temp);

#
#----------[ SAVE AND CLOSE ALL FILES ]-----------------
#
# EoM
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Nächste

Zurück zu Userpic in Profile



Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast