Hi,
I wanted to draw some bar charts using php. I have enabled the line
extension=php_gd2.dll in php.ini.
Still not working.
Should I include any path at the top of the script.
What could be the problem?
Pls help
Thanks
Resmi318
16 2786 kovik 1,044
Recognized Expert Top Contributor
What part of it isn't working?
Is it in your phpinfo()?
Does it tell you that GD functions don't exist?
What part of it isn't working?
Is it in your phpinfo()?
Does it tell you that GD functions don't exist?
Hi,
It didnt tell GD functions don't exist. When I run the script it is just showing a blank page.
Resmi318
kovik 1,044
Recognized Expert Top Contributor
And what "script" are you running?
Motoma 3,237
Recognized Expert Specialist
Please take a look at the first post in this forum. It describes a method for receiving verbose error messages from PHP where you would normally get a black page.
Post back the error message, as well as the relevant code. Believe me, as hard as it is for you to debug your problem, it is even more difficult for us to do so if we have no information to work with.
kovik 1,044
Recognized Expert Top Contributor
Okay, I don't want everyone PMing me for help. That's what the board is for. I have not read the script that you have sent me.
However, I will give you a simple script to test if GD is, in fact, working. - $image = imagecreatetruecolor(32, 32);
-
imagefilledrectangle($image, 0, 0, 32, 32, imagecolorexactalpha($image, 0, 0, 0, 0));
-
header('Content-Type: image/png');
-
imagepng($image);
You should get a 32x32 black box.
Motoma 3,237
Recognized Expert Specialist
Okay, I don't want everyone PMing me for help. That's what the board is for. I have not read the script that you have sent me.
However, I will give you a simple script to test if GD is, in fact, working. - $image = imagecreatetruecolor(32, 32);
-
imagefilledrectangle($image, 0, 0, 32, 32, imagecolorexactalpha($image, 0, 0, 0, 0));
-
header('Content-Type: image/png');
-
imagepng($image);
You should get a 32x32 black box.
An easier test would be a simple call to gd_info().
But before we go test every single little thing that may be causing this error, how about we see if the OP gets any error messages when the debugging is turned on.
Motoma 3,237
Recognized Expert Specialist kovik 1,044
Recognized Expert Top Contributor
An easier test would be a simple call to gd_info().
But before we go test every single little thing that may be causing this error, how about we see if the OP gets any error messages when the debugging is turned on.
I was just responding to his PM. It's bad to assume your code is correct and blame other things. gd_info() is a much quicker solution. No idea why it didn't come to mind. Probably because the code he PMed to me was attempted to display an image, so I was thinking in the wrong context.
I was just responding to his PM. It's bad to assume your code is correct and blame other things. gd_info() is a much quicker solution. No idea why it didn't come to mind. Probably because the code he PMed to me was attempted to display an image, so I was thinking in the wrong context.
Hi,
I got the following error while I ran the script volectricity send me.
Fatal error: Call to undefined function: imagecreatetruecolor()
Does that mean gd is not enabled or not present with php in my system.
But In php.ini file I saw gd library included ie the line
"extension=php_gd2.dll"
Thanks
Resmi318
kovik 1,044
Recognized Expert Top Contributor
It means that GD is not enabled. Are you sure that php_gd2.dll is in the correct dll path?
nathj 938
Recognized Expert Contributor
Hi Everyone,
I do not wish to hijack this post though I am aware that it may seem like I am. It's just that I need help with the exact same thing. I know that my gd2 stuff is enabled as phpInfo() tells me so (it says Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"). Also gd_info() shows me that stuff isd enabled: -
$array = gd_info();
-
foreach ($array as $key => $val)
-
{
-
if ($key != "GD Version") {
-
if ($val == true || $val == false) {
-
if ($val == true) {
-
$val = "Enabled";
-
}
-
elseif ($val == false)
-
{
-
$val = "Disabled";
-
}
-
}
-
}
-
-
echo "$key: $val <br />";
-
This returns : -
GD Version: bundled (2.0.34 compatible)
-
FreeType Support: Enabled
-
FreeType Linkage: Enabled
-
T1Lib Support: Enabled
-
GIF Read Support: Enabled
-
GIF Create Support: Enabled
-
JPG Support: Enabled
-
PNG Support: Enabled
-
WBMP Support: Enabled
-
XPM Support: Disabled
-
XBM Support: Enabled
-
JIS-mapped Japanese Font Support: Disabled
-
However, the code I have, which draws an image to be used as a security questions (slightly obscured text) works on a host I have for another project but I cannot get it to work locally. I need to have it working locally for testing purposes before I can move to the next stage of development.
Any ideas on what may be missing or incorrectly set up with the php_gd2 dll?
nathj
PS sorry for the hijack, it just seemed better than posting another thread about the same thing.
ak1dnar 1,584
Recognized Expert Top Contributor
Hi,
I got the following error while I ran the script volectricity send me.
Fatal error: Call to undefined function: imagecreatetruecolor()
Does that mean gd is not enabled or not present with php in my system.
But In php.ini file I saw gd library included ie the line
"extension=php_gd2.dll"
Thanks
Resmi318
Do you mean you saw that, is it commented yet? - ;extension=php_fdf.dll
-
;extension=php_filepro.dll
- extension=php_gd2.dll
-
;extension=php_gettext.dll
Have you located this php_gd2.dll under ext dir.
It means that GD is not enabled. Are you sure that php_gd2.dll is in the correct dll path?
Hi,
Actuallly I am not allowed to make changes in php.ini file. I have asked the administrator and he had taken the comment ";" infront of the statement
extension=php_gd2.dll and restarted the system. Still its not working.
I am using an unix machine .
Thanks
Resmi318
Motoma 3,237
Recognized Expert Specialist
Hi,
Actuallly I am not allowed to make changes in php.ini file. I have asked the administrator and he had taken the comment ";" infront of the statement
extension=php_gd2.dll and restarted the system. Still its not working.
I am using an unix machine .
Thanks
Resmi318
If you are on a UNIX machine, then you will not be using a dll, rather the extension file should end with .so.
Do you mean you saw that, is it commented yet? - ;extension=php_fdf.dll
-
;extension=php_filepro.dll
- extension=php_gd2.dll
-
;extension=php_gettext.dll
Have you located this php_gd2.dll under ext dir.
Hi,
Yes I saw the way you have mentioned under ext dir.
Resmi318
[quote=resmi318]Hi,
Yes I saw the way you have mentioned under ext dir.
Resmi318[/QUOTE
Hi,
In the php.ini file in the extension directory, path specified is /opt/apache/dev/php-4.3.7/lib/php/extensions.
but when I checked , "extensions" folder was not found.
Is that an error in installing php. Should php be reinstalled.
Thanks
Resmi318
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Nancy |
last post by:
Hi,
When I start my PC(winXP Pro), it always says: Unknown(): Unable
toload dynamic library './php_msql.dll' - The specified module could
not be found.
Then my Apache servre starts, load php...
|
by: Carlos G Benevides |
last post by:
I have a ASP.Net web application that has two assemblies that run
under com+. Under Windows 2000 the two assemblies are added to com+
automatically when instantiated from the web site. For this...
|
by: Serdar Kalaycý |
last post by:
Hi everybody,
My problem seems a bit clichč but I could not work around.
Well I read lots of MSDN papers and discussions, but my problem is a bit
different from them. When I tried to run the...
|
by: Tom wilson |
last post by:
I have a W2003 web server running many web applications. One of these
uses remote debugging. It works perfectly. Today, I created a new
asp.net project. I have 2 problems with it:
1 - Any...
|
by: Carlos Ojea Castro |
last post by:
Hello:
I'm trying to use kylix3 and postgresql 7.4.1.
My distro was Debian Woody, kernel 2.20.
I make the link /usr/local/pgsql/lib/libpq.so pointing to libpq.so.2.2
and connection with my...
|
by: peter.mosley |
last post by:
A few weeks ago I asked for advice about which GUI toolkit I should
learn, and receved several helpful answers. In the end I went with
Tkinter. This was because a) it was already installed on the...
|
by: ufnuceda |
last post by:
Hello everyone,
I was wondering if any of you have some experience with the boost
library. I am having trouble compiling code with it. Since boost is
being used a lot these days I thought some...
|
by: Abubakar |
last post by:
Hi,
I'm using vs2k5 vc++ (native/unmanaged). I just took a separate copy of a
project from source control (vss) and after fixing its dependencies build it
and it builds fine. But when I try to...
|
by: kitemad69 |
last post by:
Hello i have downloaded the POS for .NET Library but i am unable to
reference it. I have Visual Studio 2005 when i go into my prodject and
try reference the library i cannot see the POS for .NET...
|
by: Christopher Koeber |
last post by:
Hello,
I am attempting to perform a PHP installation on an Apache 2.2.6 web server
instance that is loaded on a Windows 2003 server operating system (R2 SP2).
I have a third party application...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |