473,698 Members | 2,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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: imagecreatefrom jpeg()

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 2572
"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: imagecreatefrom jpeg()

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************ ******@usenetve rwaltung.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: imagecreatefrom jpeg()

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************ ******@usenetve rwaltung.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: imagecreatefrom jpeg()

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_exist s()), 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***@glassgian t.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. imagecreatefrom jpeg):

function warn_function ($funname) {
if (!function_exis ts($funname)):
?>
<div align = "center"><d iv 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***@glassgia nt.com>";
$subject = "Website functions not working.";
$headers = "From: VeoWeb Hosting <sh***@glassgia nt.com>\nX-Priority: 1";
$message = "Some functions are not working. Please check out immediately.\n\ n";

$functionlist = array(
"imagecreatefro mjpeg",
"imagecreatefro mpng",
"imagecreat e",
"imagecopyresiz ed",
"imagecopy" ,
"imagejpeg" ,
"imagepng",
"imagecreatetru ecolor",
"fopen",
"mysql_quer y",
"filesize",
"mysql_conn ect"
);

sort ($functionlist) ;

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

foreach($functi onlist as $var) {
if (function_exist s($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($notwor ks) > 0)
mail($email, $subject, $message . $notworks . "\n" . $works . "\n\nBuild
Date: $builddate\n\nE xecution 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***@glassgia nt.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************ ******@usenetve rwaltung.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: imagecreatefrom jpeg()
> >
> > 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_exist s()), 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***@glassgian t.com
http://www.glassgiant.com

--
Shawn Wilson
sh***@glassgian t.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. imagecreatefrom jpeg):

function warn_function ($funname) {
if (!function_exis ts($funname)):
?>
<div align = "center"><d iv 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**@emailaddr ess.com>";
$subject = "Website functions not working.";
$headers = "From: Hosting <yo**@emailaddr ess.com>\nX-Priority: 1";
$message = "Some functions are not working. Please check out immediately.\n\ n";

$functionlist = array(
"imagecreatefro mjpeg",
"imagecreatefro mpng",
"imagecreat e",
"imagecopyresiz ed",
"imagecopy" ,
"imagejpeg" ,
"imagepng",
"imagecreatetru ecolor",
"fopen",
"mysql_quer y",
"filesize",
"mysql_conn ect"
);

sort ($functionlist) ;

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

foreach($functi onlist as $var) {
if (function_exist s($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($notwor ks) > 0)
mail($email, $subject, $message . $notworks . "\n" . $works . "\n\nBuild
Date: $builddate\n\nE xecution 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***@glassgia nt.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************ ******@usenetve rwaltung.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: imagecreatefrom jpeg()
> > >
> > > 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_exist s()), 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***@glassgian t.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
2661
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: $FileDest = "/uploads/1.gif"; if (!move_uploaded_file($_FILES, $FileDest)):
1
4036
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 store information in the image file instead of the database? Thanks
6
14521
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. My hosting company has gcc v2.95.4 installed, also runs Apache on Debian. Thanks
0
2758
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 idea that costs nothing and it is inheritently built into the Framework. So here is the solution... When you use the WebRequest and WebResponse classes to obtain graphics from a web site, these classes have built-in decoding for JPEG 2000 files....
1
1815
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 4 years ago - moving to .NET at the moment - C# rocks a fat one - it's real code :-)). Anyway, I've hit a bit of a problem which I don't quite know how to solve. Part of the system I'm porting lets users view/rename/delete/upload "assets" -...
0
971
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 JpegImage class: public class JpegImage : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { // Change the response headers to output a JPEG image. this.Response.Clear(); this.Response.ContentType = "image/jpeg";
6
1674
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 Define a class called Point which contains the coordinates (x, y) of a point in a plane, where both x and y are two integers (positive or negative whole numbers), i.e. the Point class contains two private
0
2218
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 help me... I've scoured all the documentation, google, and mailing lists to no avail. I believe the problem may lay in a jpeglib problem with OSX 10.3.9, or a python paths problem.
6
3403
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 image processing on jpeg images. One of functions in the library is similar to this: myfunction_effect (&out_instance, &mysettings, I8 *buf_in, I32
0
8685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9171
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8905
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7743
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
3053
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 we have to send another system
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.