Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
jjmusicpro
Involved
Involved



Joined: Jul 12, 2005
Posts: 283

PostPosted: Wed Aug 06, 2008 6:46 pm Reply with quote

my site is imagesticky dot com
and im using a prepackaged script that worked fine on my VPS
and now i moved to a Dedicated server
and my site display a bunch of weirld letters and numbers so someone said i sould try putting this in header

header('Content-type: image/jpeg'); //second line

and that worked, made the page show, but why do i have to put that?
is there something in php.ini that i can change?

_________________
- JJMUSICPRO
Myspacetoolbelt.com || RankBook.com || GamerBomb.com || MyspaceJar.com 
View user's profile Send private message Visit poster's website
jestrella
Moderator



Joined: Dec 01, 2005
Posts: 593
Location: Santiago, Dominican Republic

PostPosted: Wed Aug 06, 2008 8:38 pm Reply with quote

I may be wrong but get nothing when trying to access your site.

using header('Content-type: image/jpeg'); you are telling your browser that content type for the document is a JPEG image, and IMHO it should never be hardcoded in your header file.

all that weird characters may be due to an incompatible charset.

_________________
"For those whom have not reach the sky... Every mountain seems high"

Best Regards
Jonathan Estrella
http://about.me/jestrella04 
View user's profile Send private message Visit poster's website
jjmusicpro







PostPosted: Wed Aug 06, 2008 8:46 pm Reply with quote

i am using http://www.mihalism.org/ image hosting script.
 
jestrella







PostPosted: Wed Aug 06, 2008 8:54 pm Reply with quote

jjmusicpro wrote:
i am using http://www.mihalism.org/ image hosting script.


don't get it... Confused
 
jjmusicpro







PostPosted: Wed Aug 06, 2008 8:55 pm Reply with quote

i was showing the script i was using, its not something i custom made etc.
i didnt want people saying "check your code"

its simple script, you just upload it, then go to your site and it will walk you through the setup.

however when i uploaded it to my site, i see this

‹¬VëOÜ8ÿ Å4ZØdUmaw«òæD¹У×/+'™M Ž³}HýãolÈ"úîöÃ:Ï{~3öàÕÑŸ‡7¡´•€ñ—ƒ‹óCˆzIr»{˜$G7GðõìæólÇ}¸¶šg6IŽ/#ˆJkë½$™Ïçñ|7VºHn®’~'¹:>ì-œºížÛ÷ß÷·¢¤¥¯%ÎmÖÞì¢Ò _P¹ýáÇ AÎõ0VG ˜,†Ê^‘FNv¯Kp:‘å´Th8=ü§á³at¨¤Ei{7Ë#ÈÂnY\ØÄÙ؇¬dÚ ~¹9齏 ù™–k»ø¢®Ì˜_È^Ã +º’m8/ŠñŠx­R"eº#"Uà·Ü Kc™Ìr%áÊIjÌI8l•JVá0ºÇå\éÜtTy P*c¹,¶`e õŒg¸U#,¯Â3öF ^q‹9¤LæsžÛr ȁì~•³^ð$G“i^;—;Î7À$ 3Ëçž(Ñøø¦JÎP/•Ä8¨M™!FÓ yyÎî—q¦ª$ð .ï[^*Vb\)c_6bù½)m– Ü­k…9gÄ’iDÙÑK¥mÖXà™‹èÉBp#™²™;‰é/ˆ†ð»FîØŒjFg+ÁJ„9&™XRHÆGÔè¬ä2¾3ÑhÉßSl‰bÂe&*DR ¼ Ï•%mG¥*_B&˜¡f­) I†BPÇ­ r>{8ªPÑèµLM½?HèàÙ¹d³I…²qrkƒF¸er8°6a\済벎FgªÂAÂÈbxqªßG–Ù!KUc' yþÉ}Á󛂺¡bG£Ô•5…ë÷KÔf½àá¸IÏà4Ð~,äÐMÖ­N¹À‰Æš®ü ŸÒÆü4Ü6/s5ÑÔiªZÝ Éû œ;”uå‰ÏïKe¨°JQ›‰)ÞÔÚÊqÑP×L²M{|‹‚à†pêN„M¶¨k«ååyÛ›®Y£•nõ”Ñúú³RWhL8^P”4|ç˜çP2K¤)¢ ¥¡.Ìc tÓÖç:øô ¡/JÔŠNØaŸËÝ7ï\SqðüE|z§JQÌ€c5'tÃ,Ÿ vFãÂ©Z¸.š*ÁU˜õ£?‰ZÀ˜è'Ž°Þ)ÿÊ(¨5Ÿ±l9©‰7£\ÃžäÝþ >?ìêvïÇÐaønQ°úª×ƒOyî³| Ô}Åô=4Öҝvp|z~ ½žoÜŸÎoÇÀrºg¹™4Zý† TÒê|Û'Ò ›8¶\e `{Êþ3¶ºIƒ¶(¤4rŠ<ÏÓ…ð+ÿV..ó.nuû¢Ü™äÁ=èYãs7nït¯œ_¤êøò¨MÔw»Â_çf|t©,œ? uð§ñ7H\øëŒ{´: X}æ%ÜTðÙ=sàŒÞЃCU/µëDØÈ6´ï¶ÜÿûGö-2—Å°áPXµ4é¦óð_ÿÿ ŽPÄ`
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Aug 06, 2008 11:08 pm Reply with quote

The script must not be coded correctly. If it is an upload script specifically for JPEG images, then yes.. you will need the header declaration to tell the browser it is image data and not HTML

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
jjmusicpro







PostPosted: Thu Aug 07, 2008 6:35 am Reply with quote

no the main page has nothing to do with showing an image, its just a normal home page for a site.
 
jestrella







PostPosted: Thu Aug 07, 2008 9:01 am Reply with quote

what kind of file did you upload???
what FTP client did you use???
binary or ASCI mode????


try re-uploading the files with a good FTP client and in the proper transfer mode.
 
jjmusicpro







PostPosted: Thu Aug 07, 2008 9:02 am Reply with quote

i use filezilla
filezilla is set on AUTO type upload

still messed up.
 
jestrella







PostPosted: Thu Aug 07, 2008 9:22 am Reply with quote

have you tried to run the site without the given script????

this way you can determine if is something with the script itself or maybe with the site code.
 
jjmusicpro







PostPosted: Thu Aug 07, 2008 9:24 am Reply with quote

this script runs fine and installs fine on my VPS
but when i try to install this on my dedicated server i get that

i know the script works, but it think its something in my php.ini that needs to be set or turned off.
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Thu Aug 07, 2008 12:32 pm Reply with quote

Check what MIMETYPE settings you have between the two different servers.
 
View user's profile Send private message Send e-mail
jjmusicpro







PostPosted: Thu Aug 07, 2008 1:39 pm Reply with quote

how and where do i check that?
 
Guardian2003







PostPosted: Fri Aug 08, 2008 4:59 am Reply with quote

You should find it in your servers control panel - Plesk/cPanel vDeck etc
It looks to me like it is trying to execute the content (bytes) of the image rather than treating it as an actual image. The header content trick should work but it is 'better' to make sure the server is handling file types in the correct way.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©