View Full Version : heres a crazy php question
rumrunner439 12-03-2008, 05:01 PM heres a crazy php question
Ok my site does videos, music and graphics
im noticing when i upload my jpeg images everything is fine
but when i do a .gif or .png or any corel x2 image where theres glitter or movement in the image well it does not work or show that or trasfer the data
what would cause this ? Is it a server module or script issue ?
ive got another site thats on the same server and its got glitter graphics so thats what has me wondering whats going on
any ideas i take that back it cant be server issues because its working on one site and not the other so is there something in php that has to be done to make it display it right ?www.xeleven59.com/vs/pictures.php it dont work here but below you will see it works on my other sitehttp://xeleven59.com/skins/myspace-glitter-words/
etogre 12-03-2008, 06:25 PM Have you made sure $_FILES['field']['error'] is equal to 0? Or are you using a pre-made script?
__________________
blawar 12-03-2008, 08:41 PM you must be using a library that is processing the image. Only possibly scenario. So its not a crazy PHP question, just a "I don't know what Im doing" question.
rumrunner439 12-03-2008, 09:03 PM well be nice lol
Hey im still learning and atleast i try i do make alot of mistakes but im learning and thats what counts
Yes its a pre-made script what would i have to modify or create to get it to show the images correctly ? Like i said on one site it works and this video graphics site it dont so i have to find out what to do to let the images work right
any ideas or suggestions are greatly appreciated !!
chrisranjana 12-04-2008, 09:50 AM I guess the necessary modules have not been installed in your server.
__________________chrisranjana.comPhp Programmers, Mysql, C#, dot net, web developers."While money may not help make people happy, being happy may help them make money." - Forbes magazine
blawar 12-04-2008, 01:29 PM Quote:
Originally Posted by chrisranjana
I guess the necessary modules have not been installed in your server.
Doubtful, its probably using the gd library, which as far as I know does not support animated gifs.
HivelocityDD 12-04-2008, 02:25 PM The standard GD library can support Animated GIF, but PHP does have some issues with animated GIF. Can you please search on the http://www.phpclasses.org. There you may have a better luck to find a work around.
__________________Dedicated Servers - sales@hivelocity.net - 1-888-869-HOST(4678)Viva Hivelocity "THE SERVER STUD" - Award Winning Hosting
Managed Dedicated Servers. Reseller Discounts. 24/7 Impressive Tech Support.
rumrunner439 12-06-2008, 01:43 AM ok im going to the phpclasses.org link but this is where im not sure about the server modules this part of the site is on my serverhttp://xeleven59.com/skins/myspace-glitter-words/ and you can clearly see the .gif's are doing their thing
But on www.xeleven59.com/vs/pictures.php none of the .gif's are working, so im leaning towards it being a php issue that i dont know about or have to add to my script to make it work.
This one is of a turkey thats suppose to be dancing around,but it only shows it like it is a .jpeg file.http://www.xeleven59.com/vs/view_pic...05438df996a3e5
rumrunner439 12-16-2008, 09:31 PM ok i found out my gd supports .gif's and the site is not doing something right in the script it displays the .gif ashttp://www.xeleven59.com/vs/view_pic...118dd5128dd6f5
Its the first picture says music if life at www.xeleven59.com/vs/pictures.php
but i went into my admin control panel and found the picture id and then went to this link i madehttp://www.xeleven59.com/vs/pictures/876.gif and it works fine
so im not sure whats going on here. what would make it display it on the site to where its not animated its displayed as a .jpg to me but in the server its a .gif file
would this be something in the upload.php the view_picture.php
or pictures.php ? Seems like the pictures.php isnt displaying the .gif right
rumrunner439 12-17-2008, 05:12 PM ok ive looked closer and for some reason the site is linking it wierd.
It looks like the file being linked in thumbnail is not the gif file rather the related jpg files and thus not animating in below link :
-- http://www.xeleven59.com/vs/view_pic...118dd5128dd6f5
--
e.g. when you right click the image in above link it shows below path :
-- http://www.xeleven59.com/vs/pictures/876_1.jpg
--
Where as the path to related gif is below :
-- http://www.xeleven59.com/vs/pictures/876.gif
--
So where would i look to see where its linking it so i can find that code to try and figure out how to make it go to the correct file location ?
Steve_Arm 12-17-2008, 05:17 PM I don't see anything blinking, but the last case that I've met this condition is when:
You display images from a script file like <img src="/image.php?id=111" />
So what happens is that images are not cached and while you browser (from first page access) caches the image, when you refresh the page you see the cached image but the server tells him to download it again, creating this blink effect.
__________________
PHP Code Repository | Worst Wide Web, now PR2
rumrunner439 12-17-2008, 10:40 PM Heres part if my pictures.php
I dont really see where it finds or makes the link to where i picture is to display it. So would this be in maybe the pictures.tpl ? Or could it be in the funtions.php thats making the link to the pictures ?
$category = $_REQUEST[category];
if($category=="mr")$sql = "SELECT count(*) as total from picture where type='public' $active order by addtime desc limit $config[total_per_ini]";
elseif($category=="mv")$sql = "SELECT count(*) as total from picture where type='public' $active order by viewnumber desc limit $config[total_per_ini]";
elseif($category=="md")$sql = "SELECT count(*) as total from picture where type='public' $active order by com_num desc limit $config[total_per_ini]";
elseif($category=="tf")$sql = "SELECT count(*) as total from picture where type='public' $active order by fav_num desc limit $config[total_per_ini]";
elseif($category=="tr")$sql = "SELECT count(*) as total from picture where type='public' $active order by ratedby*rate desc limit $config[total_per_ini]";
elseif($category=="rf")$sql = "SELECT count(*) as total from picture where type='public' $active and featured='yes' order by addtime desc limit $config[total_per_ini]";
elseif($category=="rd")$sql = "SELECT count(*) as total from picture where type='public' $active order by rand() limit $config[total_per_ini]";
$ars = $conn->Execute($sql);
if($ars->fields['total']<=$config[total_per_ini])$total = $ars->fields['total'];
else $total = $config[total_per_ini];
$tpage = ceil($total/$config[items_per_page]);
if($tpage==0) $spage=$tpage+1;
else $spage = $tpage;
$startfrom = ($page-1)*$config[items_per_page];
//generate next and previous
$next="";
$prev="";
$next_page=$page+1;
$prev_page=$page-1;
if($page>1
$prev="<b><a href='pictures.php?page=$prev_page
}
else if($page<$spage)
{
$next="<b><a href='pictures.php?page=$next_page
}
else if($page>1
}
if($category=="mr")$sql="SELECT * from picture where type='public' $active order by addtime desc limit $startfrom, $config[items_per_page]";
elseif($category=="mv")$sql="SELECT * from picture where type='public' $active order by viewnumber desc limit $startfrom, $config[items_per_page]";
elseif($category=="md")$sql="SELECT * from picture where type='public' $active order by com_num desc limit $startfrom, $config[items_per_page]";
elseif($category=="tf")$sql="SELECT * from picture where type='public' $active order by fav_num desc limit $startfrom, $config[items_per_page]";
elseif($category=="tr")$sql="SELECT * from picture where type='public' $active order by (ratedby*rate) desc limit $startfrom, $config[items_per_page]";
elseif($category=="rf")$sql="SELECT * from picture where type='public' $active and featured='yes' order by addtime desc limit $startfrom, $config[items_per
|