imagecreatefromjpeg failure

Problems with the Windows version of XAMPP, questions, comments, and anything related.

imagecreatefromjpeg failure

Postby kyletreubig » 11. June 2007 21:08

I am attempting to create an image upload page with a resizing function that implements the following php functions:

Code: Select all
imagecreatefromgif($file)
imagecreatefromjpg($file)
imagecreatefrompng($file)


and neither one of them will work. I have tested with images of all three extensions and of various sources (cameras, image programs/from scratch, etc.) and still I get nothing.

What I find ironic is that it works with the XAMPPlite portable app version on my thumb drive, but not on the full XAMPP distro that I have just recently installed on my computer.

I know there are many threads about this in the German sections, but my German is a tad bit rusty and thusly, very time-consuming.

I would appreciate any solutions to this problem, and if there is a good German topic that has the solution, I would accept that as well.

thanks
kyletreubig
 
Posts: 5
Joined: 11. June 2007 20:50

Postby Wiedmann » 11. June 2007 22:41

and neither one of them will work.

Why not?
- error message? (with error_reporting = E_ALL)
- what (not) happens?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby kyletreubig » 11. June 2007 22:44

I do not receive any error messages of any kind. Is there a way to "turn on" error messages?
I inserted my own debugging lines, and execution of the PHP code stops as soon as the createfromimagejpg function is called. Everything (the code) after that point is discarded.
kyletreubig
 
Posts: 5
Joined: 11. June 2007 20:50

Postby Wiedmann » 11. June 2007 23:21

Is there a way to "turn on" error messages?

For example:
http://de.php.net/manual/en/function.er ... orting.php
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby kyletreubig » 12. June 2007 04:15

Alright. I checked the error log and I found this error that occurs:

Code: Select all
[error] [client 127.0.0.1] PHP Fatal error:  Call to undefined function: imagecreatefromjpeg() in C:\\xampp\\htdocs\\photo_album\\photo_album_script\\photo_album_create.php on line 35, referer: http://localhost/photo_album/index.php?action=create
kyletreubig
 
Posts: 5
Joined: 11. June 2007 20:50

Postby Wiedmann » 12. June 2007 08:58

Call to undefined function: imagecreatefromjpeg()

The GD extension is not enabled in the "php.ini". (verify this with phpinfo())
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby kyletreubig » 12. June 2007 16:01

I have checked in the php.ini file and the extension is enabled (it is not commented out with a semicolon).

I looked at the phpinfo() page provided by the XAMPP home page, and I do not see anything under the additional modules section.

I've also run the php switch script, and I do not see any of the dll extensions being loaded (I don't know if I should be seeing anything, the modules for each PHP are loaded though).

Thanks for your help and patience so far.
kyletreubig
 
Posts: 5
Joined: 11. June 2007 20:50

Postby Wiedmann » 12. June 2007 16:04

I have checked in the php.ini file and the extension is enabled

Which "php.ini" does your PHP use? (verify this with phpinfo())
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby kyletreubig » 12. June 2007 19:31

It seems that the PHP that I had installed on my computer to run with Apache 2.2.4 (even though the Apache module was not running) was interfering with the PHP of XAMPP. I have uninstalled the unused servers and modules and now XAMPP is working as it should (my upload/resize page works).

Thanks for your help.
kyletreubig
 
Posts: 5
Joined: 11. June 2007 20:50


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 102 guests