johnc Posted August 16, 2008 Share Posted August 16, 2008 Hey guys, I recently decided to rename all of my pictures files on my web server to text instead of just numbers. Example: wowphp.jpg I am recently receiving a wierd error when I open up some of the picture files. Here is the name of the picture: productsssh.jpg. I get the following error only when i open up that picture via the web: Warning: Unexpected character in input: '' (ASCII=24) state=1 in /home/virtual/site1/fst/var/www/html/pics/productsssh.jpg on line 15 Warning: Unexpected character in input: ' in /home/virtual/site1/fst/var/www/html/pics/productsssh.jpg on line 15 Parse error: syntax error, unexpected T_STRING in /home/virtual/site1/fst/var/www/html/pics/productsssh.jpg on line 15 When i rename the file to "productsssh.jpg" it opens up perfectly fine. ??? I don't know why i am getting an apache or php error when attempting to open the file. second, I don't know why i am getting the error only when i try to view the file over the web via my server. If I actually download the file I can perfectly open it via my computer. My webserver is a linux box redhat. Any help regarding this matter would be greatly appriciated. Quote Link to comment Share on other sites More sharing options...
marcus Posted August 16, 2008 Share Posted August 16, 2008 Show the code please. Quote Link to comment Share on other sites More sharing options...
johnc Posted August 16, 2008 Author Share Posted August 16, 2008 THe thing is there is no code, but i am stilling getting an error like the picture file is a script or something. It is just a picture file i wish to open over the net. Quote Link to comment Share on other sites More sharing options...
marcus Posted August 16, 2008 Share Posted August 16, 2008 Well obviously the error is being caused by the script because of a bad file. Quote Link to comment Share on other sites More sharing options...
johnc Posted August 16, 2008 Author Share Posted August 16, 2008 it is a picture not a script. How can a picture generate a php or apache error. And also why is it happening with certain names of the pictures only? It is not a script Quote Link to comment Share on other sites More sharing options...
marcus Posted August 16, 2008 Share Posted August 16, 2008 Well you're getting an error on line 15 of a jpg file... view the source of that file in your ftp or something AFTER the name is getting changed by the script. What method are you using for renaming, are you using the rename function? Quote Link to comment Share on other sites More sharing options...
johnc Posted August 16, 2008 Author Share Posted August 16, 2008 I renamed manually via ftp download and upload. I am not using php or any other program to rename the file. I have downloaded the file and it is just like a normal pictures with a lot of encoding characters. Quote Link to comment Share on other sites More sharing options...
marcus Posted August 16, 2008 Share Posted August 16, 2008 Lol, then why are you really on a PHP help board? Do you have any mod rewrite that can potentially having jpgs act as php? Quote Link to comment Share on other sites More sharing options...
johnc Posted August 16, 2008 Author Share Posted August 16, 2008 I am on php help forum because all of my scripts are based on php and second the pictures in the past were created with gd library via php and the error looks like a php error. Nope i don't have any moderewrites acting here Quote Link to comment Share on other sites More sharing options...
marcus Posted August 16, 2008 Share Posted August 16, 2008 Just recreate the picture. Quote Link to comment Share on other sites More sharing options...
johnc Posted August 16, 2008 Author Share Posted August 16, 2008 I found this inside the picture file: "CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality" Could gd library being outputing the error from server reading the file? and if so how would i go about fixing this... rename all of my pictures? Quote Link to comment Share on other sites More sharing options...
johnc Posted August 18, 2008 Author Share Posted August 18, 2008 ?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.