473,386 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

problem loading php_gd2.dll php5/apache2.0+

Wondering if anyone can recomend some sample code for dynamically
loading the GD module.

I have tried setting the extension dir in php.ini, and loading the GD
module from there when apache is started, but it won't load.

There is also the option of dynamically loading the module at run time
of the script.

LD() i believe is the call.

Anyone able to recommend a workaround here?

Or provide a hint with a sample?

Here's the closest usage of DL() i have found but not quite what I
need,
<?php
$gd_is_shared = "shared-library";

if (function_exists('ImageCreateFromPNG') && !@dl('gd.so')) {
$gd_is_shared = "embedded";
}

print $gd_is_shared;
?>

I'm just hoping to determine what the error message is as to why it
won't load under windows.

Mar 22 '07 #1
5 5105
Pete Marsh wrote:
Wondering if anyone can recomend some sample code for dynamically
loading the GD module.

I have tried setting the extension dir in php.ini, and loading the GD
module from there when apache is started, but it won't load.

There is also the option of dynamically loading the module at run time
of the script.

LD() i believe is the call.

Anyone able to recommend a workaround here?

Or provide a hint with a sample?

Here's the closest usage of DL() i have found but not quite what I
need,
<?php
$gd_is_shared = "shared-library";

if (function_exists('ImageCreateFromPNG') && !@dl('gd.so')) {
$gd_is_shared = "embedded";
}

print $gd_is_shared;
?>

I'm just hoping to determine what the error message is as to why it
won't load under windows.
If it won't load at Apache startup, there's a problem. And I would
expect this problem would keep it from loading dynamically, also.

Did you check your Apache error log? Perhaps even your Windows event
log might have something.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Mar 22 '07 #2
On Mar 22, 5:20 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
Pete Marsh wrote:
Wondering if anyone can recomend some sample code for dynamically
loading the GD module.
I have tried setting the extension dir in php.ini, and loading the GD
module from there when apache is started, but it won't load.
There is also the option of dynamically loading the module at run time
of the script.
LD() i believe is the call.
Anyone able to recommend a workaround here?
Or provide a hint with a sample?
Here's the closest usage of DL() i have found but not quite what I
need,
<?php
$gd_is_shared = "shared-library";
if (function_exists('ImageCreateFromPNG') && !@dl('gd.so')) {
$gd_is_shared = "embedded";
}
print $gd_is_shared;
?>
I'm just hoping to determine what the error message is as to why it
won't load under windows.

If it won't load at Apache startup, there's a problem. And I would
expect this problem would keep it from loading dynamically, also.

Did you check your Apache error log? Perhaps even your Windows event
log might have something.

hi, I think I may have a syntax error in the Load module directive in
httpd.conf

I have made a guess as I could not find the specific definition for
calling the GD module.

I've included the correct syntax bellow for loading the php5 module,
which i used as a guide.

LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll"
Loadmodule gd_module "C:/program Files/PHP/php_gd2.dll"
^^^^^^^^^

Instead of gd_module, what should I use above?

Thanks


Mar 22 '07 #3
On Mar 22, 12:19 pm, "Pete Marsh" <m...@witty.comwrote:
On Mar 22, 5:20 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
Pete Marsh wrote:
Wondering if anyone can recomend some sample code for dynamically
loading the GD module.
I have tried setting the extension dir in php.ini, and loading the GD
module from there when apache is started, but it won't load.
There is also the option of dynamically loading the module at run time
of the script.
LD() i believe is the call.
Anyone able to recommend a workaround here?
Or provide a hint with a sample?
Here's the closest usage of DL() i have found but not quite what I
need,
<?php
$gd_is_shared = "shared-library";
if (function_exists('ImageCreateFromPNG') && !@dl('gd.so')) {
$gd_is_shared = "embedded";
}
print $gd_is_shared;
?>
I'm just hoping to determine what the error message is as to why it
won't load under windows.
If it won't load at Apache startup, there's a problem. And I would
expect this problem would keep it from loading dynamically, also.
Did you check your Apache error log? Perhaps even your Windows event
log might have something.

hi, I think I may have a syntax error in the Load module directive in
httpd.conf

I have made a guess as I could not find the specific definition for
calling the GD module.

I've included the correct syntax bellow for loading the php5 module,
which i used as a guide.

LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll"
Loadmodule gd_module "C:/program Files/PHP/php_gd2.dll"
^^^^^^^^^

Instead of gd_module, what should I use above?

Further experimentation shows that the error being generated is:

Syntax error on line 963 of "C:/program files/Apache Group/Apache2/
conf/httpd.conf: Can't locate API module structure 'gd2_module' in
file C:/program files/PHP/php_gd2.dll

Any further ideas appreciated.

Mar 22 '07 #4
Pete Marsh wrote:
On Mar 22, 12:19 pm, "Pete Marsh" <m...@witty.comwrote:
>On Mar 22, 5:20 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
>>Pete Marsh wrote:
Wondering if anyone can recomend some sample code for dynamically
loading the GD module.
I have tried setting the extension dir in php.ini, and loading the GD
module from there when apache is started, but it won't load.
There is also the option of dynamically loading the module at run time
of the script.
LD() i believe is the call.
Anyone able to recommend a workaround here?
Or provide a hint with a sample?
Here's the closest usage of DL() i have found but not quite what I
need,
<?php
$gd_is_shared = "shared-library";
if (function_exists('ImageCreateFromPNG') && !@dl('gd.so')) {
$gd_is_shared = "embedded";
}
print $gd_is_shared;
?>
I'm just hoping to determine what the error message is as to why it
won't load under windows.
If it won't load at Apache startup, there's a problem. And I would
expect this problem would keep it from loading dynamically, also.
Did you check your Apache error log? Perhaps even your Windows event
log might have something.
hi, I think I may have a syntax error in the Load module directive in
httpd.conf

I have made a guess as I could not find the specific definition for
calling the GD module.

I've included the correct syntax bellow for loading the php5 module,
which i used as a guide.

LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll"
Loadmodule gd_module "C:/program Files/PHP/php_gd2.dll"
^^^^^^^^^

Instead of gd_module, what should I use above?


Further experimentation shows that the error being generated is:

Syntax error on line 963 of "C:/program files/Apache Group/Apache2/
conf/httpd.conf: Can't locate API module structure 'gd2_module' in
file C:/program files/PHP/php_gd2.dll

Any further ideas appreciated.
How about asking in an Apache group, such as alt.apache.configuration,
where the Apache gurus hang out.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Mar 23 '07 #5
On Mar 22, 8:28 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
Pete Marsh wrote:
On Mar 22, 12:19 pm, "Pete Marsh" <m...@witty.comwrote:
On Mar 22, 5:20 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
>Pete Marsh wrote:
Wondering if anyone can recomend some sample code for dynamically
loading the GD module.
I have tried setting the extension dir in php.ini, and loading the GD
module from there when apache is started, but it won't load.
There is also the option of dynamically loading the module at run time
of the script.
LD() i believe is the call.
Anyone able to recommend a workaround here?
Or provide a hint with a sample?
Here's the closest usage of DL() i have found but not quite what I
need,
<?php
$gd_is_shared = "shared-library";
if (function_exists('ImageCreateFromPNG') && !@dl('gd.so')) {
$gd_is_shared = "embedded";
}
print $gd_is_shared;
?>
I'm just hoping to determine what the error message is as to why it
won't load under windows.
If it won't load at Apache startup, there's a problem. And I would
expect this problem would keep it from loading dynamically, also.
Did you check your Apache error log? Perhaps even your Windows event
log might have something.
hi, I think I may have a syntax error in the Load module directive in
httpd.conf
I have made a guess as I could not find the specific definition for
calling the GD module.
I've included the correct syntax bellow for loading the php5 module,
which i used as a guide.
LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll"
Loadmodule gd_module "C:/program Files/PHP/php_gd2.dll"
^^^^^^^^^
Instead of gd_module, what should I use above?
Further experimentation shows that the error being generated is:
Syntax error on line 963 of "C:/program files/Apache Group/Apache2/
conf/httpd.conf: Can't locate API module structure 'gd2_module' in
file C:/program files/PHP/php_gd2.dll
Any further ideas appreciated.

How about asking in an Apache group, such as alt.apache.configuration,
where the Apache gurus hang out.

I fixed it. Turns out that GD is loaded as an extension under php5,
not a module, and has to be invoked from php.ini There was also a path
issue in php.ini, where an absolute path was required instead of the
default relative one.
Mar 23 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: michael newport | last post by:
I did the following as instructed in the docs. (see below) everything seemed to install ok and I started apache with no complaints, but, 1)I do not see a process for apache using ps -ef 2) In...
1
by: FL | last post by:
Hi, I'm tring to *test* php5 beta2 as module with Apache 2.0.48 and win2k (I know, I'm nuts :o) First, there is no php5apache2.dll in the beta2 package but a php4apache2.dll (php.net doc...
8
by: Gene Kahn | last post by:
Windows XP, Apache 2, PHP5 RC1 Hello, A total newbie here. I can't seem to get Apache2 to load the php5 module. When I loaded up this html file in a browser, only the Today's date: line prints on...
6
by: somaBoy MX | last post by:
I'm configuring PHP5 on my WinXP pro machine as an Apache2 handler. However when I start apache I get system errormessages like "PHP Shutdown: Unable to load dynamic library...
6
by: hannu | last post by:
Hello all good PHP people I have a really frustrating problem with php5.1.2+apache2 on OpenSuse 10.1 (X86-64) environment. Though I set the upload_max_filesize setting in php.ini file to any...
3
by: Mamba | last post by:
hello to everyone, I'm using Mantis bug tracking system on Ubuntu Server with apache2, mysql 5.1 and php5. Mantis uses jpgraph for graphics but when I call a graphic page, Jpgraph return this...
2
by: willl69 | last post by:
Hi All, Ive been having a problem of late with one of my sites that uses PHP5 / Ajax. The problem is that periodically the ajax functions lock up and it gets stuck in the loading phase of the...
3
by: willl69 | last post by:
Hi All, Ive been having a problem of late with one of my sites that uses PHP5 / Ajax. The problem is that periodically the ajax functions lock up and it gets stuck in the loading phase of the...
12
by: Alan M Dunsmuir | last post by:
After having worked with Apache/MySQL/PHP for a year or so under Linux I need, purely for convenience, to set up a parallel platform under Windows. Unfortunately, since I last did this (using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.