Author |
|
elwoody
Joined: 05 Oct 2006 Posts: 5 Location: SFCA
|
Posted: Mon 30 Oct '06 23:03 Post subject: Apache seems to (try to) read images as ascii files... |
|
|
Friends: my 1st apache installation. Have the weird, yet probably simple conundrum described below...
Thanks!
E
**************************************
My url:
http://localhost/slides/picture001.jpg
**************************************
My Apache output:
Warning: Unexpected character in input: '' (ASCII=30) state=1 in C:\website\slides\picture001.jpg on line 186
Warning: Unexpected character in input: '' (ASCII=1 state=1 in C:\website\slides\picture001.jpg on line 186
Parse error: parse error, unexpected T_STRING in C:\website\slides\picture001.jpg on line 186
************************************
I gotz:
Apache 2.0.59
Php 5.1.6
WXPP-SP2
Server runs fine for everything but some images (png's sometimes work). |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 30 Oct '06 23:12 Post subject: |
|
|
Seems that PHP tries to parse that picture. Is there any PHP installation ? |
|
Back to top |
|
elwoody
Joined: 05 Oct 2006 Posts: 5 Location: SFCA
|
Posted: Mon 30 Oct '06 23:39 Post subject: |
|
|
Yup,
I gotz:
Apache 2.0.59
Php 5.1.6
WXPP-SP2 |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 31 Oct '06 11:02 Post subject: |
|
|
Please see if there is any .htaccess file in the slide folder.
Watch for xbithack
or in your httpd.conf is a mistake. That all files are assoiated with PHP.
What is after AddType application/x-httpd-php ? |
|
Back to top |
|
elwoody
Joined: 05 Oct 2006 Posts: 5 Location: SFCA
|
Posted: Tue 31 Oct '06 18:25 Post subject: |
|
|
Good evening Mr. Blond!
>>Please see if there is any .htaccess file in the slide folder.
None.
>>Watch for xbithack
I am researching this. The Server uses a largely default config, except for changes made for PHP/MySQL. This is a local development deployment.
>>>or in your httpd.conf is a mistake. That all files are assoiated with PHP.
>>>What is after AddType application/x-httpd-php ?
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .php5
Action application/x-httpd-php "/php/php-cgi.exe"
SetEnv PHPRC "C:/php"
This is what I know...
Thanks,
Derick
[/quote] |
|
Back to top |
|
pnllan
Joined: 05 Dec 2005 Posts: 221
|
Posted: Tue 31 Oct '06 19:03 Post subject: |
|
|
At the beginning of this thread, you state that your issue deals with images, JPG's in particular.
I'm trying to understand how JPG's (as well as PNG's) and PHP coincide. Are the images being called through PHP script? Are you using some sort of 'broad-spectrum' imaging filter via PHP? The "unexpected T_STRING" looks like something that PHP would generate as an error. If the images are being generated or 'called' by PHP, then show us the relevant PHP script, please. Unexpected T_STRINGS error, at least in PHP, usually indicates a syntax error in the script.
If PHP IS NOT being utilized to generate or pass HTML via an IMG tag (if even then), then the issue is the Apache Configuration, and most likely MIME related. |
|
Back to top |
|
elwoody
Joined: 05 Oct 2006 Posts: 5 Location: SFCA
|
Posted: Wed 01 Nov '06 20:29 Post subject: |
|
|
If PHP IS NOT being utilized to generate or pass HTML via an IMG tag (if even then), then the issue is the Apache Configuration, and most likely MIME related.
pnllan:
I suspect you're right. I mentioned PHP because 1) the server is trying to interpret the images as php, and 2) my knowledge of apache management is limited and I wanted to provide all possible detail. |
|
Back to top |
|
pnllan
Joined: 05 Dec 2005 Posts: 221
|
Posted: Wed 01 Nov '06 20:50 Post subject: |
|
|
Are you using an image gallery application like ImageFolio or Coppermine?
If you create a NEW HTML (not PHP) page with a link to an image, is the image displayed in a browser?
Just making sure, but do you have the following in your Apache Conf file:
LoadModule mime_module "modules/mod_mime.so"
TypesConfig "conf/mime.types" |
|
Back to top |
|