Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: GD problem - switched servers  (Read 21964 times)

0 Members and 1 Guest are viewing this topic.

nirre

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
GD problem - switched servers
« on: October 14, 2003, 10:29:07 am »

"PHP running on your server does not support the GD image library, check with your webhost if ImageMagick is installed "  :cry:

I have just backed up all of my CPG and just moved my pics and db:entries to a upgraded server.. the server uses the same enviroument as the old one .. slackware linux... all time out valuse are the same image filesizes are ok.. phpinfo() shows that GD is enabled and the libs are installed...

there is one thing tho.. my friend installed the GD and libraries after he moved the CPG installation..

i get the GD error when i try a batch upload and webupload..

so i think there is one patch or something that kinda got mested up when we moved the page..

my question is where should i start looking ?
how does CPG check if GD is enabled ? 
when u install CPG does it set some path that it uses for GD ?

everything else works tho...

regards
Niclas

ps. THX for all your hardwork with this script ;D
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
GD problem - switched servers
« Reply #1 on: October 14, 2003, 11:19:31 am »

http://coppermine.sourceforge.net/faq.php?q=VersionGD#VersionGD

If it's not in phpinfo, then php doesn't "know" about gd. Check you php configuration.

GauGau
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
GD problem - switched servers
« Reply #2 on: October 14, 2003, 06:28:31 pm »

One way to test your theory test if it is the server or a missing patch would be to install ImageMagick, change the config settings, and try uploading batches then. Alternatively, your error message could appear if a function is missing from the GD library.  Be sure to check the version number on PHP info with the version number being used in the config settings.

-Hyperion
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

nirre

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
GD problem - switched servers
« Reply #3 on: October 15, 2003, 06:45:27 am »

Quote from: "gaugau"
http://coppermine.sourceforge.net/faq.php?q=VersionGD#VersionGD

If it's not in phpinfo, then php doesn't "know" about gd. Check you php configuration.

GauGau


 :shock: little confused... the phpinfo shows that GD IS installed .. latest version 2.xx ... BUT it was installed after the cpg script was transfered ... can that be a problem...?

on both servers GD 2.xx was/is installed  - not exactly the same  version number could that be the problem..?
Logged

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
GD problem - switched servers
« Reply #4 on: October 15, 2003, 08:44:21 am »

If the current GD (PHP actually) path is the same as the old one it should work. Otherwise you may have to reinstall CPG, which looks like the case.
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
GD problem - switched servers
« Reply #5 on: October 15, 2003, 08:46:17 am »

Test your server's GD capability by running the following script:

Code: [Select]

<?php

$image 
imagecreate&#40;100,100&#41;;

$white=imagecolorallocate&#40;$image, 0, 0, 0&#41;;

$red=imagecolorallocate&#40;$image, 255, 51, 51&#41;;

imagefill &#40;$image, 0, 0, $white&#41;;

imagestring&#40;$image, 4, 30, 42, "Image", $red&#41;;

header&#40;"Content-type&#58; image/jpeg"&#41;;

imagejpeg&#40;$image&#41;;

imagedestroy&#40;$image&#41;;

?>



You should get a black 100 x 100 pixel image with the word "Image" in red in the center.

CPG is telling you that it cannot find the imagecreatefromjpeg() function in PHP.

You can test for yourself by:

Code: [Select]

<?php

if &#40;function_exists&#40;imagecreatefromjpeg&#41;&#41; &#123;

print "Yes, it's here.";

&
#125; else &#123;

print "No, it's not here.";

&
#125;

?>



If the script says it's there, then reinstall CPG.

Otherwise, reinstall the latest PHP. GD is now built in. Installation should only require activating the extension, etc.
Logged
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

nirre

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
GD problem - switched servers
« Reply #6 on: October 16, 2003, 08:43:38 am »

A big thx for all your fast replies  :D

But i think the easiest thing for me is to reinstall the script and then overwrite the "defoult" db with my old db... WOULD that create any problem ??? is the paths and stuff stored in the db or a seperete config file when i install ??  :roll:

regards
Nirre
Logged

nirre

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
GD problem - switched servers
« Reply #7 on: October 27, 2003, 05:03:07 am »

hmmmm.... think its something wrong with th enew server i reinstalled the script and flushed the db... but i still get the same error...

pls check http://meklubba.rack.cx/yeah2.php ...  :oops:
Logged

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
GD problem - switched servers
« Reply #8 on: October 27, 2003, 05:29:56 am »

The GD is installed, but there's no JPEG support. That could be a problem,  albeit possibly unrelated.

What exactly are you trying to do now? Create a new gallery with an old database?
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
GD problem - switched servers
« Reply #9 on: October 27, 2003, 07:04:05 am »

Did you try to compile GD library in PHP manually?  If so, you may have forgotten to include the JPEG library, which is not available witht he rest of GD on boutell.com.  That would explain the lack of JPEG support.

It is far easier to upgrade PHP since the newest versions come with GD already installed with the needed libraries.  All you have to do is alter php.ini (and move a .dll file if you have windows).
Logged
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

nirre

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
GD problem - switched servers
« Reply #10 on: October 29, 2003, 04:15:09 am »

i didn even think about the jpeg lib  :oops:

yes the GD is installed manually.. BUT i tried to upload a .png file but that didnt work either...  :(    (according to the phpinfo png lib should work....)

phpinfo looks good but something isnt really working...  :cry:
Logged

nirre

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
GD problem - switched servers
« Reply #11 on: October 29, 2003, 04:54:29 am »

Quote from: "hyperion"
Test your server's GD capability by running the following script:

Code: [Select]

<?php

$image 
imagecreate&#40;100,100&#41;;

$white=imagecolorallocate&#40;$image, 0, 0, 0&#41;;

$red=imagecolorallocate&#40;$image, 255, 51, 51&#41;;

imagefill &#40;$image, 0, 0, $white&#41;;

imagestring&#40;$image, 4, 30, 42, "Image", $red&#41;;

header&#40;"Content-type&#58; image/jpeg"&#41;;

imagejpeg&#40;$image&#41;;

imagedestroy&#40;$image&#41;;

?>



You should get a black 100 x 100 pixel image with the word "Image" in red in the center.

CPG is telling you that it cannot find the imagecreatefromjpeg() function in PHP.

You can test for yourself by:

Code: [Select]

<?php

if &#40;function_exists&#40;imagecreatefromjpeg&#41;&#41; &#123;

print "Yes, it's here.";

&
#125; else &#123;

print "No, it's not here.";

&
#125;

?>



If the script says it's there, then reinstall CPG.

Otherwise, reinstall the latest PHP. GD is now built in. Installation should only require activating the extension, etc.


I just tested both these scipte and on the first one i got a "broken" picture ..
and the second one says that the functions isnt there... which i guess IS a big problem  :)

ok so i guess the best thing to do is to reinstall the latest php ??? but y doesnt  the funtction work (i guess its becouse i dont have the jpeg lib).. do i have to activate it manually ??


y doesnt png work according to the phpinfo the png lib is installed ...?
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
GD problem - switched servers
« Reply #12 on: October 29, 2003, 06:31:23 am »

For whatever reason, your manual GD install/compile didn't take.  That's not unusual, and it is difficult enough that it convinced the PHP team to incorporate it into the most recent versions of PHP.

You will have to activate the GD extension, which is in the php.ini file.  First, you must check that your extension library value points to the right place.  Then you uncomment the GD2 extension.  Finally, if you have Windows, you place the GD2.dll in the sytem file. This is a good thing to learn how to do, as many other extensions are not on by default, and they can be very useful.
 
Detailed instructions are available for free if you got to a bookstore and look in any advanced PHP book.
Logged
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
GD problem - switched servers
« Reply #13 on: October 30, 2003, 05:02:00 am »

I'm not too sure if you can enable it in php.ini if you haven't got it compiled in. Where's your php info? I was going to check out if you actually have libpng support as well..
Logged

nirre

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
yes...
« Reply #14 on: October 30, 2003, 06:00:30 am »

the problem was the missing jpeg lib...  :D
we installed it and recompiled and now everything seems to be working *fingers crossed*

a BIG thanks to all of you who helped me with my problem (which wasnt "really" CPG releated)  :wink:

I also want to thank u all guys in the dev team for keeping this great software alive  8)
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 18 queries.