Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PHP can't find image extension

0 views
Skip to first unread message

lwoods

unread,
Aug 1, 2005, 11:45:16 AM8/1/05
to
I'm trying to do some image work. I have enabled the graphics extension and
the extension path in php.ini, as well as copying the dll to C:\PHP...just
for good measure.

php.ini:

extension_dir =C:\PHP\ext
extension=php_gd2.dll

but...when I try to use ImageCreateFrom Jpeg in a script I get the following
error:

Fatal error: Call to undefined function imagecreatefromjpeg() in
C:\Inetpub\wwwroot\PHP\thumbnail\thumbnail.php on line 47


Any ideas where I should look in order to correct this?

TIA,

Larry Woods


Simon Stienen

unread,
Aug 1, 2005, 11:54:13 AM8/1/05
to

Try c:/php/ext/
Btw: Are you sure, the .ini is in the appropiate directory for your HTTPd?

HTH,
Simon
--
Simon Stienen <http://slashlife.org/>
"What you do in this world is a matter of no consequence,
The question is, what can you make people believe that you have done."
/Sherlock Holmes in A Study in Scarlet by Sir Arthur Conan Doyle/

Erwin Moller

unread,
Aug 1, 2005, 12:08:19 PM8/1/05
to
Simon Stienen wrote:

> On 2005-08-01 17-45-16 lwoods <lwoods <la...@lwoods.com>> wrote:
>> I'm trying to do some image work. I have enabled the graphics extension
>> and the extension path in php.ini, as well as copying the dll to
>> C:\PHP...just for good measure.
>>
>> php.ini:
>>
>> extension_dir =C:\PHP\ext
>> extension=php_gd2.dll
>>
>> but...when I try to use ImageCreateFrom Jpeg in a script I get the
>> following error:
>>
>> Fatal error: Call to undefined function imagecreatefromjpeg() in
>> C:\Inetpub\wwwroot\PHP\thumbnail\thumbnail.php on line 47
>>
>> Any ideas where I should look in order to correct this?
>>
>> TIA,
>>
>> Larry Woods
>
> Try c:/php/ext/
> Btw: Are you sure, the .ini is in the appropiate directory for your HTTPd?
>
> HTH,
> Simon

Hi,

One more thing:
Some pre-configured Windows-installers are really bad.
I saw a few of them that installed PHP just fine, so it seems, untill you
want to add new extension. That just won't work.

If Simons advice (which also makes perfect sense :P) doesn't help, intall
PHP as described on their site/readme.

Regards,
Erwin Moller

lwoods

unread,
Aug 1, 2005, 12:13:33 PM8/1/05
to
I changed the "C:\PHP\ext" to "C:\PHP\ext\" ...no change. Also changed the
"\" to "/"; no change. I have my php.ini in C:\PHP and I "assume" that it
is being found because I have a script that executes the "phpinfo()"
function and that seems to display O.K.

Whoa!!!! I just ran the script with the phpinfo() and it's showing
"C:\php5" as being the directory for the extensions! I have added "C:\PHP"
to my PATH environmental variable, and have added an env. variable named
PHPRC=C:\PHP\ext . php.exe in in the directory C:\PHP so obviously they are
finding it. So, what do I have to do to get them to find my php.ini. BTW,
to my knowledge there are NO other php.ini's in this system (including the
WINDOWS directory).

Larry


How can I test to see if
"Simon Stienen" <ne...@news.slashlife.org> wrote in message
news:1mjlzvuk5nlxd$.dlg@news.slashlife.org...

lwoods

unread,
Aug 1, 2005, 12:15:37 PM8/1/05
to
Thanks, Erwin,

I didn't use the installer, as others have suggested, so I don't think that
is my problem. Take a look at my latest reply.

Larry

"Erwin Moller"
<since_humans_read_this...@spamyourself.com> wrote in
message news:42ee48f3$0$11072$e4fe...@news.xs4all.nl...

lwoods

unread,
Aug 1, 2005, 12:24:10 PM8/1/05
to
I got it to work. I did two things...which is not too cool...but I copied
the php.ini to my WINDOW directory AND it restarted IIS. I have a feeling
that I needed to restart IIS to get php to reread the php.ini file.

??????????????????

TIA,

Larry

"lwoods" <la...@lwoods.com> wrote in message
news:MSrHe.54073$4o.8468@fed1read06...

Simon Stienen

unread,
Aug 1, 2005, 12:24:42 PM8/1/05
to
On 2005-08-01 18-13-33 lwoods <la...@lwoods.com> wrote:
> I changed the "C:\PHP\ext" to "C:\PHP\ext\" ...no change. Also changed the
> "\" to "/"; no change. I have my php.ini in C:\PHP and I "assume" that it
> is being found because I have a script that executes the "phpinfo()"
> function and that seems to display O.K.
PHP even runs without any php.ini - it just assumes default values.


> Whoa!!!! I just ran the script with the phpinfo() and it's showing
> "C:\php5" as being the directory for the extensions! I have added "C:\PHP"
> to my PATH environmental variable, and have added an env. variable named
> PHPRC=C:\PHP\ext . php.exe in in the directory C:\PHP so obviously they are
> finding it. So, what do I have to do to get them to find my php.ini. BTW,
> to my knowledge there are NO other php.ini's in this system (including the
> WINDOWS directory).
Then you should try to copy the php.ini to \windows or \windows\system(32).
For Apache2, the php.ini has to be located in Apaches root directory (the
main binary is bin\apache.exe from there), but I don't know, where IIS
wants its php.ini.
0 new messages