473,836 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

imagecreatefrom gif not working

Hi, I've tried to upload a picture using the function
imagecreatefrom gif, with a script as simple as possible to avoid miss
spellings and stuff like that. I've ran the following line of code to
see if my host had the right gd lib, and it was positive:

<?PHP print_r(gd_info ()); ?>

so if it's not the server, what am i missing?
Here is my tiny script as it looks now:

<?php
function billede()
{
$bill = imageCreateFrom GIF ("hindenburg.gi f");
return $bill;
}
billede();
?>

Thanks for your help :)

Aug 10 '06 #1
16 6498
What's the error message ?
"moxmormor" <mo*******@gmai l.coma écrit dans le message de news:
11************* *********@i3g20 00...legro ups.com...
Hi, I've tried to upload a picture using the function
imagecreatefrom gif, with a script as simple as possible to avoid miss
spellings and stuff like that. I've ran the following line of code to
see if my host had the right gd lib, and it was positive:

<?PHP print_r(gd_info ()); ?>

so if it's not the server, what am i missing?
Here is my tiny script as it looks now:

<?php
function billede()
{
$bill = imageCreateFrom GIF ("hindenburg.gi f");
return $bill;
}
billede();
?>

Thanks for your help :)



Aug 10 '06 #2

Bob Bedford wrote:
What's the error message ?
"moxmormor" <mo*******@gmai l.coma écrit dans le message de news:
11************* *********@i3g20 00...legro ups.com...

There was no error message. The screen was just blank.

http://www.moxmormor.org/node.php

Aug 10 '06 #3
"moxmormor" <mo*******@gmai l.coma écrit dans le message de news:
11************* *********@m73g2 00...legr oups.com...

Bob Bedford wrote:
What's the error message ?
"moxmormor" <mo*******@gmai l.coma écrit dans le message de news:
11************* *********@i3g20 00...legro ups.com...

There was no error message. The screen was just blank.

http://www.moxmormor.org/node.php

Are you sure about the file path ? try to add the complete path of the file,
maybe with a if file_exists() to be sure...and print an error message if it
doesn't exists.

Aug 10 '06 #4
Are you sure about the file path ? try to add the complete path of the file,
maybe with a if file_exists() to be sure...and print an error message if it
doesn't exists.

Now I'm confused. When it executed the following script, the output was
'nonexistant'.

<?php
function billede()
{
if (!file_exists(' hindenburg.gif' ))
{
$bill = imageCreateFrom GIF ('hindenburg.gi f');
return $bill;
}
else
echo "nonexistan t";
}
billede();
?>

However, when I changed 'hindenburg.gif ' to
'moxmormor_org/htdocs/hindenburg.gif' it went blank again.

Aug 10 '06 #5
Are you sure about the file path ? try to add the complete path of the file,
maybe with a if file_exists() to be sure...and print an error message if it
doesn't exists.

Now I'm confused. When it executed the following script, the output was
'nonexistant'.

<?php
function billede()
{
if (!file_exists(' hindenburg.gif' ))
{
$bill = imageCreateFrom GIF ('hindenburg.gi f');
return $bill;
}
else
echo "nonexistan t";
}
billede();
?>

However, when I changed 'hindenburg.gif ' to
'moxmormor_org/htdocs/hindenburg.gif' it went blank again.

Aug 10 '06 #6

"moxmormor" <mo*******@gmai l.coma écrit dans le message de news:
11************* *********@i42g2 00...legr oups.com...
>Are you sure about the file path ? try to add the complete path of the
file,
maybe with a if file_exists() to be sure...and print an error message if
it
doesn't exists.


Now I'm confused. When it executed the following script, the output was
'nonexistant'.

<?php
function billede()
{
if (!file_exists(' hindenburg.gif' ))
{
$bill = imageCreateFrom GIF ('hindenburg.gi f');
return $bill;
}
else
echo "nonexistan t";
}
billede();
?>

However, when I changed 'hindenburg.gif ' to
'moxmormor_org/htdocs/hindenburg.gif' it went blank again.
You shouldn't user a path like this, instead use server variables in order
to be sure:
change moxmormor_org/htdocs/hindenburg.gif
to $_SERVER['DOCUMENT_ROOT'].'/hindenburg.gif' ;

also be very carefull, on Linux the filesystem is case sensitive, so
hindenburg.gif <hindenburg.G IF
Bob

Aug 10 '06 #7
You shouldn't user a path like this, instead use server variables in order
to be sure:
change moxmormor_org/htdocs/hindenburg.gif
to $_SERVER['DOCUMENT_ROOT'].'/hindenburg.gif' ;

also be very carefull, on Linux the filesystem is case sensitive, so
hindenburg.gif <hindenburg.G IF
Bob
Thank you, but it's still nonexistant. :(

Aug 10 '06 #8
"moxmormor" <mo*******@gmai l.coma écrit dans le message de news:
11************* *********@b28g2 00...legr oups.com...
>You shouldn't user a path like this, instead use server variables in
order
to be sure:
change moxmormor_org/htdocs/hindenburg.gif
to $_SERVER['DOCUMENT_ROOT'].'/hindenburg.gif' ;

also be very carefull, on Linux the filesystem is case sensitive, so
hindenburg.g if <hindenburg.G IF
Bob

Thank you, but it's still nonexistant. :(
try a echo $_SERVER['DOCUMENT_ROOT'].'/hindenburg.gif' to be sure, maybe
your config root is wrong (pointing to the wrong file). Also to be sure, put
everything in a var:

$filename = $_SERVER['DOCUMENT_ROOT'].'/hindenburg.gif' ;
echo $filename;
if(file_exists( $filename))
echo 'file exists';
else
echo 'file doesnt exist';

Bob

Are you on linux or XP ?

Aug 10 '06 #9
try a echo $_SERVER['DOCUMENT_ROOT'].'/hindenburg.gif' to be sure, maybe
your config root is wrong (pointing to the wrong file). Also to be sure, put
everything in a var:

$filename = $_SERVER['DOCUMENT_ROOT'].'/hindenburg.gif' ;
echo $filename;
if(file_exists( $filename))
echo 'file exists';
else
echo 'file doesnt exist';

Bob
Pretty strange. Now the output is that the file is nonexistant, then
the full path, then that the file DOES exist.

>
Are you on linux or XP ?
I'm on a Linux server I'm pretty sure. Since they are operating with
php. My PC is XP.

Aug 10 '06 #10

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

Similar topics

2
6299
by: Gary | last post by:
I am trying to use the "System.Windows.Forms.SendKeys" class for triggering the Ctrl+P key. Syntax: System.Windows.Forms.SendKeys.Send("^(P)"); This is not working ..what could be the reason..? Situation: I have a menu in my form, which is given a short key "Ctrl+P", now when the
6
3065
by: Mullin Yu | last post by:
hi, i have a web service that has file operations on Windows OS, and there may be a file concurrency issue if only one working directory e.g. c:\working therefore, i want to have a unique sub directory for each request so as to get rid of any file concurrency issue, e.g c:\working\unique-identifier1 for Request #1 c:\working\unique-identifier1 for Request #2
3
3125
by: | last post by:
Hello, I am hoping someone else has thought about a date time calculation i need to perform. I would like to be able to calculate the number of "working minutes" between 2 dates, given my working week definition. Lets say I have a working week definition of Monday through Friday, 9 am to 5 pm. Date1 = January 1st, 2005 at 8 am
5
2814
by: Martin Heuckeroth | last post by:
Hi We are working on a webservice application and are having some problems with the cookies and/or sessions. We have them working on our intranet but then its not working on the internet. We have been looking our asses off but can not find a working solution. the code we came up with is ...
5
3067
by: tshad | last post by:
I have been working with setting my drop boxes to allow double clicking to select an item. It worked fine until I made some changes. I then stripped the page down to the bare essentials to find out why it quit working. I found that if I didn't have a linkbutton, it quit working????????? If I changed the linkbutton to a regular button, it quit working. Here is the page:
8
2548
by: jojobar | last post by:
Okay, I am trying to do is to test the webresource in 2.0 1. I created a new project with assembly name (and default assembly name) "Office". 2. I added the following to the AssemblyInfo.cs file (present under the Properties folder of the project) 3. Now I created a file called test.js on the root folder of the project,
2
14830
by: Don | last post by:
I'm having problems with intellisense, autocomplete, etc. suddenly not working in certain classes of a project I'm working on. All the options are set, and it all works fine for most classes, but for some it just suddenly stopped working. After a build it'll work maybe once or twice, then stop. I've tried repairing my installation of Visual Studio 2003 but that didn't help. Is Microsoft working on a fix for this, or is there something...
9
3223
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. What it does is to call a webservice with two parameters, one being a integer, the other one being a "String" which contains XML (not the best practice, however that is the target interface and we cannot change that).
3
1818
by: comp.lang.php | last post by:
re: http://www.google.com/search?hl=en&q=swedish+flag&btnG=Google+Search I am trying only this: $image = @imagecreatefromgif('/path/to/this/image.gif'); This line alone causes a segfault on my machine; when I measured how
0
9668
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
10843
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
10546
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...
0
10254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7790
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6978
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5648
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4448
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

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.