logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: GD lib can not work in my Apache 2.2 +PHP 5.1.4
Author
CottonXuCN



Joined: 07 Oct 2006
Posts: 4

PostPosted: Sat 07 Oct '06 15:11    Post subject: GD lib can not work in my Apache 2.2 +PHP 5.1.4 Reply with quote

The php works well in my apache web server.But when I test some gd function like imageCreate(), etc, it displays error like this:
Call to undefined function ImageCreate() in D:\Apache\htdocs\phptest\gd-jpg.php.

I am sure my other simepl test php pages can work well so there is no problem to enable php through httpd.conf in apache. I also made changes to php.ini with:
extension=php_gd2.dll
extension_dir = "c:/php5/ext"
but none of them works.
My env: windows 2000 + apache 2.2 + php-5.1.4.
Someone can help me for that. I've been working on it for the whole day.Thanks.
Back to top
Brian



Joined: 21 Oct 2005
Posts: 209
Location: Puyallup, WA USA

PostPosted: Sat 07 Oct '06 19:52    Post subject: Reply with quote

Create this little script and run it:

Code:
<?php
phpinfo();
?>

Then save this file and execute it. (i.e. http://somesite.com/php_info.php)

Then do a seach of the output and look for a section on the GD Library extension set. I use Firefox so I just press CTRL-F and type GD and it zooms me right to it. If this is lacking then you know with complete certainty that it is not loaded (as it appears to be the case).

Next, if other extensions are loading correctly and are also mapped to the same directory (as would appear to be the case), then double check your php.ini file and make sure you have a setting such as this:
Code:
display_startup_errors = On

Make sure there is no ; semi-colon in front of it. I know this is basic but everyone has had this happen once.

My point is that if you have other extension in that same directory loading, your extensions dir, and the GD is not loading and it is not commented out such as:
Code:
; extension=php_gd2.dll

Then there must be an error being generated. Moreover, you can set up a PHP error log, if you have not done so then I would suggest you do. Always check the logs to see what is reported.
Back to top
CottonXuCN



Joined: 07 Oct 2006
Posts: 4

PostPosted: Sun 08 Oct '06 3:44    Post subject: Reply with quote

Thanks brain. I'll check gd in my phpinfo() again.
Back to top


Reply to topic   Topic: GD lib can not work in my Apache 2.2 +PHP 5.1.4 View previous topic :: View next topic
Post new topic   Forum Index -> Other Software