473,396 Members | 1,724 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,396 software developers and data experts.

lost jpeg functionality

my hosting provider just upgraded the server and now some of my scripts
don't work....

Fatal error: Call to undefined function: imagecreatefromjpeg()

What do I need to look for in order to make sure I still have this
functionality, version is php 4.3.3
should I look for something specific in the output from phpinfo()???

Thanks for all your help
Jul 17 '05 #1
5 2553
"Simon Redmond" <no*****@sibass.com> schrieb:
my hosting provider just upgraded the server and now some of my scripts
don't work....

Fatal error: Call to undefined function: imagecreatefromjpeg()

should I look for something specific in the output from phpinfo()???


Yes. Look at the configure command There should be a '--with-gd'
somewhere in the configuration line. More information about the
configuration of gd should be some blocks down in the phpinfo().

Regards,
Matthias
Jul 17 '05 #2
not there any more
cheers will get onto the provider tomorrow
"Matthias Esken" <mu******************@usenetverwaltung.org> wrote in
message news:bp**********@usenet.esken.de...
"Simon Redmond" <no*****@sibass.com> schrieb:
my hosting provider just upgraded the server and now some of my scripts
don't work....

Fatal error: Call to undefined function: imagecreatefromjpeg()

should I look for something specific in the output from phpinfo()???


Yes. Look at the configure command There should be a '--with-gd'
somewhere in the configuration line. More information about the
configuration of gd should be some blocks down in the phpinfo().

Regards,
Matthias

Jul 17 '05 #3
Simon Redmond wrote:

not there any more
cheers will get onto the provider tomorrow
"Matthias Esken" <mu******************@usenetverwaltung.org> wrote in
message news:bp**********@usenet.esken.de...
"Simon Redmond" <no*****@sibass.com> schrieb:
my hosting provider just upgraded the server and now some of my scripts
don't work....

Fatal error: Call to undefined function: imagecreatefromjpeg()

should I look for something specific in the output from phpinfo()???


Yes. Look at the configure command There should be a '--with-gd'
somewhere in the configuration line. More information about the
configuration of gd should be some blocks down in the phpinfo().


My host keeps doing this to me. For some reason they don't build GD into PHP
whenever they do a rebuild (every few months). In the past it's taken up to 2
weeks for me to notice that the scripts aren't working. I've asked them to
email me when they make changes to the server, so I can make sure my scripts
still work. They never do. So I now use IF (function_exists()), with an array
of functions I need. If the function doesn't exist, a nicely-formatted error
message is displayed on the screen explaining that my host has made changes
again, screwed up the server and the script will no longer work. It also
mentions that I have been notified and the problem will be remedied shortly. I
put similar code into a cron job that runs every half hour. If the functions
don't exist, I get an email. You might want to consider doing this. I wish I'd
done it a year ago.

Regards,
Shawn
--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com
Jul 17 '05 #4
Simon Redmond wrote:

Hi,

I call this function where I want a warning message to go, with the name of the
function required (i.e. imagecreatefromjpeg):

function warn_function ($funname) {
if (!function_exists($funname)):
?>
<div align = "center"><div class = "warn" align = "left">
This script is not working right now. The most likely cause is my host,
<a href="http://www.veoweb.net" class =
"warn" target = "_blank">VeoWeb.net</a>, messing something up on the server
(it's happened often enough for me to put i
n this automated warning). I have been notified by email that it's not working
and will strive to fix it quickly.
</div>&nbsp;</div>
<?PHP
endif;
}
The following script mails me if something one or more functions in
$functionlist suddenly stops working. It tells me when the build date was and
lists the functions that don't work. It's set to run every half hour.

<?PHP
/*

Check to see if functions are working that have a history of not working after
Veoweb makes changes.

*/

$starttime = explode (" ", microtime());
$starttime = $start_time[1] + $start_time[0];

$email = "Shawn Wilson <sh***@glassgiant.com>";
$subject = "Website functions not working.";
$headers = "From: VeoWeb Hosting <sh***@glassgiant.com>\nX-Priority: 1";
$message = "Some functions are not working. Please check out immediately.\n\n";

$functionlist = array(
"imagecreatefromjpeg",
"imagecreatefrompng",
"imagecreate",
"imagecopyresized",
"imagecopy",
"imagejpeg",
"imagepng",
"imagecreatetruecolor",
"fopen",
"mysql_query",
"filesize",
"mysql_connect"
);

sort ($functionlist);

$works = "";
$notworks = "";
$builddate = "";

foreach($functionlist as $var) {
if (function_exists($var))
$works .= "Function \"$var\" works.\n";
else
$notworks .= "Function \"$var\" does not work.\n";
}

ob_start();
phpinfo();
$string = ob_get_contents();
ob_end_clean();

$string = explode("\n", $string);

foreach($string as $var) {
$var = strip_tags($var);
if (preg_match("/^Build Date\s+([A-Za-z]+ [0-9]+ [0-9]+
[0-9]+:[0-9]+:[0-9]+).+$/", $var)) {
$var = preg_replace("/^Build Date\s+([A-Za-z]+ [0-9]+ [0-9]+
[0-9]+:[0-9]+:[0-9]+)[^0-9]?.*$/", "\$1", $
var);
$builddate = $var;
break;
}
}

$endtime = explode (" ", microtime());
$endtime = $start_time[1] + $start_time[0];

if (strlen($notworks) > 0)
mail($email, $subject, $message . $notworks . "\n" . $works . "\n\nBuild
Date: $builddate\n\nExecution time: " .
($endtime - $starttime) . " sec", $headers);
echo "DONE";
?>


Hope you don't mind me contacting off board....

I'd be real interested in see how you achieved that..... don't want your
script per say.... just how you did it....

Thats if you don't mind : )
Simon
----- Original Message -----
From: "Shawn Wilson" <sh***@glassgiant.com>
Newsgroups: comp.lang.php
Sent: Wednesday, November 19, 2003 1:38 PM
Subject: Re: lost jpeg functionality
Simon Redmond wrote:

not there any more
cheers will get onto the provider tomorrow
"Matthias Esken" <mu******************@usenetverwaltung.org> wrote in
message news:bp**********@usenet.esken.de...
> "Simon Redmond" <no*****@sibass.com> schrieb:
>
> > my hosting provider just upgraded the server and now some of my scripts > > don't work....
> >
> > Fatal error: Call to undefined function: imagecreatefromjpeg()
> >
> > should I look for something specific in the output from phpinfo()???
>
> Yes. Look at the configure command There should be a '--with-gd'
> somewhere in the configuration line. More information about the
> configuration of gd should be some blocks down in the phpinfo().


My host keeps doing this to me. For some reason they don't build GD into

PHP
whenever they do a rebuild (every few months). In the past it's taken up

to 2
weeks for me to notice that the scripts aren't working. I've asked them

to
email me when they make changes to the server, so I can make sure my

scripts
still work. They never do. So I now use IF (function_exists()), with an

array
of functions I need. If the function doesn't exist, a nicely-formatted

error
message is displayed on the screen explaining that my host has made

changes
again, screwed up the server and the script will no longer work. It also
mentions that I have been notified and the problem will be remedied

shortly. I
put similar code into a cron job that runs every half hour. If the

functions
don't exist, I get an email. You might want to consider doing this. I

wish I'd
done it a year ago.

Regards,
Shawn
--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com

--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com
Jul 17 '05 #5
Shawn Wilson wrote:

Simon Redmond wrote:

Hi,

I call this function where I want a warning message to go, with the name of the
function required (i.e. imagecreatefromjpeg):

function warn_function ($funname) {
if (!function_exists($funname)):
?>
<div align = "center"><div class = "warn" align = "left">
This script is not working right now. The most likely cause is my host,
<a href="http://www.veoweb.net" class =
"warn" target = "_blank">VeoWeb.net</a>, messing something up on the server
(it's happened often enough for me to put i
n this automated warning). I have been notified by email that it's not working
and will strive to fix it quickly.
</div>&nbsp;</div>
<?PHP
endif;
}

The following script mails me if something one or more functions in
$functionlist suddenly stops working. It tells me when the build date was and
lists the functions that don't work. It's set to run every half hour.

<?PHP
/*

Check to see if functions are working that have a history of not working after
Veoweb makes changes.

*/

$starttime = explode (" ", microtime());
$starttime = $start_time[1] + $start_time[0];

$email = "Your Name <yo**@emailaddress.com>";
$subject = "Website functions not working.";
$headers = "From: Hosting <yo**@emailaddress.com>\nX-Priority: 1";
$message = "Some functions are not working. Please check out immediately.\n\n";

$functionlist = array(
"imagecreatefromjpeg",
"imagecreatefrompng",
"imagecreate",
"imagecopyresized",
"imagecopy",
"imagejpeg",
"imagepng",
"imagecreatetruecolor",
"fopen",
"mysql_query",
"filesize",
"mysql_connect"
);

sort ($functionlist);

$works = "";
$notworks = "";
$builddate = "";

foreach($functionlist as $var) {
if (function_exists($var))
$works .= "Function \"$var\" works.\n";
else
$notworks .= "Function \"$var\" does not work.\n";
}

ob_start();
phpinfo();
$string = ob_get_contents();
ob_end_clean();

$string = explode("\n", $string);

foreach($string as $var) {
$var = strip_tags($var);
if (preg_match("/^Build Date\s+([A-Za-z]+ [0-9]+ [0-9]+
[0-9]+:[0-9]+:[0-9]+).+$/", $var)) {
$var = preg_replace("/^Build Date\s+([A-Za-z]+ [0-9]+ [0-9]+
[0-9]+:[0-9]+:[0-9]+)[^0-9]?.*$/", "\$1", $
var);
$builddate = $var;
break;
}
}

$endtime = explode (" ", microtime());
$endtime = $start_time[1] + $start_time[0];

if (strlen($notworks) > 0)
mail($email, $subject, $message . $notworks . "\n" . $works . "\n\nBuild
Date: $builddate\n\nExecution time: " .
($endtime - $starttime) . " sec", $headers);
echo "DONE";
?>
Hope you don't mind me contacting off board....

I'd be real interested in see how you achieved that..... don't want your
script per say.... just how you did it....

Thats if you don't mind : )
Simon
----- Original Message -----
From: "Shawn Wilson" <sh***@glassgiant.com>
Newsgroups: comp.lang.php
Sent: Wednesday, November 19, 2003 1:38 PM
Subject: Re: lost jpeg functionality
Simon Redmond wrote:
>
> not there any more
> cheers will get onto the provider tomorrow
> "Matthias Esken" <mu******************@usenetverwaltung.org> wrote in
> message news:bp**********@usenet.esken.de...
> > "Simon Redmond" <no*****@sibass.com> schrieb:
> >
> > > my hosting provider just upgraded the server and now some of my

scripts
> > > don't work....
> > >
> > > Fatal error: Call to undefined function: imagecreatefromjpeg()
> > >
> > > should I look for something specific in the output from phpinfo()???
> >
> > Yes. Look at the configure command There should be a '--with-gd'
> > somewhere in the configuration line. More information about the
> > configuration of gd should be some blocks down in the phpinfo().

My host keeps doing this to me. For some reason they don't build GD into

PHP
whenever they do a rebuild (every few months). In the past it's taken up

to 2
weeks for me to notice that the scripts aren't working. I've asked them

to
email me when they make changes to the server, so I can make sure my

scripts
still work. They never do. So I now use IF (function_exists()), with an

array
of functions I need. If the function doesn't exist, a nicely-formatted

error
message is displayed on the screen explaining that my host has made

changes
again, screwed up the server and the script will no longer work. It also
mentions that I have been notified and the problem will be remedied

shortly. I
put similar code into a cron job that runs every half hour. If the

functions
don't exist, I get an email. You might want to consider doing this. I

wish I'd
done it a year ago.


I probably should have mentioned: ;o)

IF ANYONE USES THIS SCRIPT, PLEASE CHANGE THE EMAIL ADDRESSES _BEFORE_ YOU
TEST!!!

I am receiving emails telling me functions aren't working.

Thanks,
Shawn
--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com
Jul 17 '05 #6

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

Similar topics

3
by: Ming | last post by:
Hi All, I want to write a PHP webpage which allows people to upload images (no matter what formats) to me and at the same time converts any non-jpeg image to JPEG. Here's what I have: ...
1
by: Useko Netsumi | last post by:
Does anyone aware of any program/apps/scripts that has the ability to modify/add/create/delete metadata in any image type such as JPEG, GIF, PNG, etc. Question for the experts, is it wise to...
6
by: jock | last post by:
Hello, Is it possible to perform basic image manipulation through C? I'd like to upload images through a web interface and resize them so they are limited to a max height/width restriction. ...
0
by: Johann Blake | last post by:
In my need to decode a JPEG 2000 file, I discovered like many that there was no functionality for this in the .NET Framework. Instead of forking out a pile of cash to do this, I came up with the...
1
by: Tony | last post by:
I'm porting an old Coldfusion based content and asset management system to ASP.NET (and oh, how good it feels to write REAL code again - was a C++ hack for 10 years, started doing coldfusion about...
0
by: erickephart | last post by:
I have a login page (Login.aspx) that (after a certain number of failed attempts) displays a captcha. In SignIn.ascx the image is displayed via: '<img src="JpegImage.aspx">'. Here is the...
6
by: Lost Student | last post by:
Hello guys Any help that you can offer would be greatly appreciated. I am nearing the end of a C++ class and am so lost. The following is my assignment and what I have so far. Please help ...
0
by: Jack Wu | last post by:
Hi I've spent a good majority of my day trying to figure out how to have PIL 1.1.5 working on my OSX 10.3.9_PPC machine. I'm still stuck and I have not gotten anywhere. Could somebody please...
6
by: RaulAbHK | last post by:
Dear all, I guess this is a basic question with an easy answer but I am a beginner and I would much apreciate your feedbacks. Let's say I have a library with some functionality to perform some...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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.