GD library problem

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
container
-


Joined: 20 Aug 2006
Posts: 11

PostPosted: Sun Aug 20, 2006 3:43 pm    Post subject: GD library problem Reply with quote

Hey!

I've got php5 installed with GDlib2 enabled in php.ini.
Function gd_info() displays:
[GD Version] => bundled (2.0.28 compatible)
[FreeType Support] => 1
[FreeType Linkage] => with freetype
[T1Lib Support] => 1
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] =>
[XBM Support] => 1
[JIS-mapped Japanese Font Support] =>


But the simple sample script from php doc site -- > http://si.php.net/manual/en/function.imagecreate.php
does not work.

I've tried the same thing on other server and it works. -->http://danijel.kurincic.si/test.php

It seems something is wrong wither with my php installation (which has not been tweaked alot) or my Abyss Web Server X1 (v 2.0.6)...

ANY IDEAS?
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Sun Aug 20, 2006 4:42 pm    Post subject: Reply with quote

Did you try Aprelium's preconfigured PHP5 package? If not you should try that.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
container
-


Joined: 20 Aug 2006
Posts: 11

PostPosted: Sun Aug 20, 2006 6:31 pm    Post subject: Reply with quote

aha...


But this installation includes php installation, which i don't want, for I have just successfully installed PEAR...

Is maybe only UPDATING to the latest version any better? Do I loose my settings on the server... or even in PHP?



Thanks!
Back to top View user's profile Send private message
container
-


Joined: 20 Aug 2006
Posts: 11

PostPosted: Sun Aug 20, 2006 6:37 pm    Post subject: Reply with quote

i'll just answer to myself - NO it doesn't do any good. :(

WHat possible configuration might be different in the php5 precofigured installation?

Is everyone happilly using GD library with no trouble?! What am I missing...
Back to top View user's profile Send private message
container
-


Joined: 20 Aug 2006
Posts: 11

PostPosted: Sun Aug 20, 2006 7:51 pm    Post subject: Reply with quote

installed the preconfigured tihng. STILL NO RESULT.
Back to top View user's profile Send private message
bprsk8r4272
-


Joined: 07 Mar 2006
Posts: 124
Location: Rochester, NY

PostPosted: Sun Aug 20, 2006 10:32 pm    Post subject: Reply with quote

please dont triple post you can edit posts and i have php5 running the GD perfectly fine i downloaded php from php's site both installer and zip file versions and i have no problem
_________________
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
container
-


Joined: 20 Aug 2006
Posts: 11

PostPosted: Sun Aug 20, 2006 10:36 pm    Post subject: Reply with quote

well.. I apologize. I just wanted to keep the track of my problem solving.

Any ideas anyway?
Back to top View user's profile Send private message
cmxflash
-


Joined: 11 Dec 2004
Posts: 872

PostPosted: Mon Aug 21, 2006 9:35 am    Post subject: Reply with quote


Use it.

Have you installed the GD library?
Did you make PHP load the extension?
Back to top View user's profile Send private message
container
-


Joined: 20 Aug 2006
Posts: 11

PostPosted: Mon Aug 21, 2006 9:38 am    Post subject: Reply with quote

i have php5 which has included gd lib. i have also checked 3x it is there. AND gd_info() says it's there!
the problem must bo in server config... (or php)
Back to top View user's profile Send private message
cmxflash
-


Joined: 11 Dec 2004
Posts: 872

PostPosted: Mon Aug 21, 2006 9:43 am    Post subject: Reply with quote

Could you please try out my own preconfigured version of PHP 5.1.4? It should be located in C:\webserver\php. You can download it here.
Back to top View user's profile Send private message
container
-


Joined: 20 Aug 2006
Posts: 11

PostPosted: Mon Aug 21, 2006 9:48 am    Post subject: Reply with quote

shit man!
SINCE i already have 2 installations of php running and 2 webservers (!) I REALLY don't want install another one...
I could though compare the installations and that is what I will do.. Only later on during the day - gotta work now :)
thnx
Back to top View user's profile Send private message
cmxflash
-


Joined: 11 Dec 2004
Posts: 872

PostPosted: Mon Aug 21, 2006 9:52 am    Post subject: Reply with quote

You do not need to install my version. Just unzip it into C:\webserver. It comes with support for SQlite and GD. I've removed the other crap that comes with it and cleaned out the configuration-file. Just follow the instructions here:

http://www.aprelium.com/abyssws/php.html
Back to top View user's profile Send private message
container
-


Joined: 20 Aug 2006
Posts: 11

PostPosted: Mon Aug 21, 2006 9:59 am    Post subject: Reply with quote

a!!

But i have allready done that!
It doesn't help (see 5th post).
I am allready running preconfigured version and have gone thru instructions, it only doesn't solve my problem...
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Aug 21, 2006 11:06 am    Post subject: Re: GD library problem Reply with quote

container wrote:
But the simple sample script from php doc site -- > http://si.php.net/manual/en/function.imagecreate.php
does not work.


What "does not work" means here? What behavior or response you get? Have you activated PHP error displaying in case you have a problem with some other settings?

If a simple PHP script works on Abyss Web Server, then the problem is not from the server (Abyss does not process your PHP code, it is PHP which does that). So if a simple phpinfo() script works, any PHP script should work provided that it is error free and that php.ini is well configured to make it work.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
container
-


Joined: 20 Aug 2006
Posts: 11

PostPosted: Mon Aug 21, 2006 12:14 pm    Post subject: Reply with quote

oops. haven't mentioned the response...

The code is OK, it is from PHP manual page (and it works perfectly on my host server).-->http://si.php.net/manual/en/function.imagecreate.php
"Dosen't work" means i get "Image '...' cannot be displayed because it contains errors". As I've read, it is usually consequnece of some error in the code, which corrupts the picture image code, but i suppose there isn't any error in the php manual script... I've commented out the header() to see if there is any error in other code, but then i just get a screen full of weird chars...

I have all standard settings, means no special error reports - currently php.ini preconfigured version from Aprelium site. Which setting should i change?


Anyhow, do expect a stupid mistake of mine here - i am not experienced user... but that's what we've all been once...
Back to top View user's profile Send private message
Mikor
-


Joined: 21 Aug 2006
Posts: 144
Location: Hull, England

PostPosted: Mon Aug 21, 2006 3:07 pm    Post subject: Reply with quote

Post your script, that error looks like you've done something wrong.
_________________
Yarrt.com - Free Arcade
RypNet.co.uk - Online Game

MSN:
michael_walker_2004 <at> hotmail <dot> com
Back to top View user's profile Send private message Send e-mail MSN Messenger
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Mon Aug 21, 2006 4:26 pm    Post subject: Reply with quote

container wrote:
oops. haven't mentioned the response...

The code is OK, it is from PHP manual page (and it works perfectly on my host server).-->http://si.php.net/manual/en/function.imagecreate.php
"Dosen't work" means i get "Image '...' cannot be displayed because it contains errors". As I've read, it is usually consequnece of some error in the code, which corrupts the picture image code, but i suppose there isn't any error in the php manual script... I've commented out the header() to see if there is any error in other code, but then i just get a screen full of weird chars...

I have all standard settings, means no special error reports - currently php.ini preconfigured version from Aprelium site. Which setting should i change?


Anyhow, do expect a stupid mistake of mine here - i am not experienced user... but that's what we've all been once...


If you get that error then its a scripting problem. If GD wasnt supported you would get an error that it doesnt know what the command is.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Mon Aug 21, 2006 4:48 pm    Post subject: Reply with quote

Try this, add this code to a file called "phpinfo.php" and put this file in your
htdocs folder. Run it from your browser. You will see the column that will tell
you the "Configuration File (php.ini) Path", is this the same php.ini file you
edited to enable the GD Library?

If not, you need to edit that one referenced from the phpinfo.php script.

Here's the "phpinfo.php" code:

Code:
<?php
phpinfo();
?>


Hope this helps you figure out the problem.

Sincerely, TRUSTAbyss
Back to top View user's profile Send private message Visit poster's website
container
-


Joined: 20 Aug 2006
Posts: 11

PostPosted: Tue Aug 22, 2006 12:10 am    Post subject: Reply with quote

phpinfo() result:
http://danijel.kurincic.si/1.png

my php.ini -- preconfigured Abyys php5 installation :
extension_dir =C:\php5 --> (file php_gd2.dll IS THERE)
extension=php_gd2.dll

error_reporting = E_ALL & ~E_NOTICE
display_errors = On (tried with OFF; not working)*
display_startup_errors = On (tried with OFF; not working)*
ignore_repeated_errors = Off

error_log = error_log.txt (where is my error log? - cant find the file...)*

*changed .ini file, saved, restarted sever.




Code:

header("Content-type: image/png");
$im = imagecreate(100, 50)
   or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5,  "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);


this code is - again - directly from php documentation page and WORKS on other server. http://danijel.kurincic.si/test.php

Thanks for help!
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Aug 22, 2006 2:22 am    Post subject: Reply with quote

I just tested your GD Example you posted and it shows up fine. I don't know
why you cannot see it, but I can assure you that it's working.

Note: if it exists, error_log.txt would be located in your C:\php5 folder.
Back to top View user's profile Send private message Visit poster's website
pkSML
-


Joined: 29 May 2006
Posts: 955
Location: Michigan, USA

PostPosted: Wed Aug 23, 2006 9:18 pm    Post subject: Reply with quote

container, have you checked your php.ini file for the line "extension=php_gd2.dll"? If it has a semicolon in front of it, GD support is existent, but not enabled. Simply take the semicolon off from the front of the line.
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
container
-


Joined: 20 Aug 2006
Posts: 11

PostPosted: Mon Aug 28, 2006 12:42 am    Post subject: Reply with quote

yes of course there is NO SEMICOLON...

@TRUSTAbyss
thanks for checking!

i'm just back from my short holidays. I'll do the second run all possible tests and ping you back with results.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group