wierd behavior on parsing css with no php included

wierd behavior on parsing css with no php included

am 23.08.2009 13:49:59 von Ralph Deffke

Hi folks, i did post this also on the Wamp page but maybe someone out there
had to solve that problem as well.

systems involved

Firefox 3.0.13
Firefox 3.5.2
IE 6

Wamp:
apache 2.2.11
PHP 5.2.9 & php 5.3

I do parse css files through php

Problem: css files are loaded into the browsers but not interpreted or used
on RAW HTML files no php included. The html files are produced with
phpDocumentor 1.4.2. IE6 uses parts of the css files loaded to display the
page, Firefox NOT AT ALL.

I think it might be possible that wamp throughs some wierd characters into
the css files or is the header type a problem? It looks like parsing the css
through the php engine changes the header of the css to text/html. this
would explain why IE6 can use them. on the other hand firebug shows the
loaded css, indicates however that no css is available.

as an reverse check I did load the html files direktly from the disk with
file:/// ... and the css are interpreted perfectly. so the source of the
problem is wamp.

it seems that the @importcsss does the biggest problem.it creates a 404
error "file not found"

it seems creating dynamic css files got some secrets involved with the wamp.
I'm using this concept since ages on linux with no problem.

on the @includecss it seems that the search for files are changing to the
php include path or something.

any idear what to check?

is important for my work to create css dynamicly

ralph_deffke@yahoo.de



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: wierd behavior on parsing css with no php included

am 23.08.2009 14:23:08 von Ralph Deffke

Yes, pasring .css is the problem, is there a way to tell php to send
different headers based on the file extention of the file parsed ? should
be, it worked on linux.

ralph_deffke@yahoo.de


""Ralph Deffke"" wrote in message
news:67.4F.03363.A1E219A4@pb1.pair.com...
> Hi folks, i did post this also on the Wamp page but maybe someone out
there
> had to solve that problem as well.
>
> systems involved
>
> Firefox 3.0.13
> Firefox 3.5.2
> IE 6
>
> Wamp:
> apache 2.2.11
> PHP 5.2.9 & php 5.3
>
> I do parse css files through php
>
> Problem: css files are loaded into the browsers but not interpreted or
used
> on RAW HTML files no php included. The html files are produced with
> phpDocumentor 1.4.2. IE6 uses parts of the css files loaded to display the
> page, Firefox NOT AT ALL.
>
> I think it might be possible that wamp throughs some wierd characters into
> the css files or is the header type a problem? It looks like parsing the
css
> through the php engine changes the header of the css to text/html. this
> would explain why IE6 can use them. on the other hand firebug shows the
> loaded css, indicates however that no css is available.
>
> as an reverse check I did load the html files direktly from the disk with
> file:/// ... and the css are interpreted perfectly. so the source of the
> problem is wamp.
>
> it seems that the @importcsss does the biggest problem.it creates a 404
> error "file not found"
>
> it seems creating dynamic css files got some secrets involved with the
wamp.
> I'm using this concept since ages on linux with no problem.
>
> on the @includecss it seems that the search for files are changing to the
> php include path or something.
>
> any idear what to check?
>
> is important for my work to create css dynamicly
>
> ralph_deffke@yahoo.de
>
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: wierd behavior on parsing css with no php included

am 23.08.2009 14:29:54 von Ralph Deffke

before you come up with how to send a header in php

I'm TALKING ABOUT .CSS FILES NOT INCLUDING ANY PHP

if you put this in httpconf
AddType application/x-httpd-php .css
the problem is caused


""Ralph Deffke"" wrote in message
news:67.4F.03363.A1E219A4@pb1.pair.com...
> Hi folks, i did post this also on the Wamp page but maybe someone out
there
> had to solve that problem as well.
>
> systems involved
>
> Firefox 3.0.13
> Firefox 3.5.2
> IE 6
>
> Wamp:
> apache 2.2.11
> PHP 5.2.9 & php 5.3
>
> I do parse css files through php
>
> Problem: css files are loaded into the browsers but not interpreted or
used
> on RAW HTML files no php included. The html files are produced with
> phpDocumentor 1.4.2. IE6 uses parts of the css files loaded to display the
> page, Firefox NOT AT ALL.
>
> I think it might be possible that wamp throughs some wierd characters into
> the css files or is the header type a problem? It looks like parsing the
css
> through the php engine changes the header of the css to text/html. this
> would explain why IE6 can use them. on the other hand firebug shows the
> loaded css, indicates however that no css is available.
>
> as an reverse check I did load the html files direktly from the disk with
> file:/// ... and the css are interpreted perfectly. so the source of the
> problem is wamp.
>
> it seems that the @importcsss does the biggest problem.it creates a 404
> error "file not found"
>
> it seems creating dynamic css files got some secrets involved with the
wamp.
> I'm using this concept since ages on linux with no problem.
>
> on the @includecss it seems that the search for files are changing to the
> php include path or something.
>
> any idear what to check?
>
> is important for my work to create css dynamicly
>
> ralph_deffke@yahoo.de
>
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: wierd behavior on parsing css with no php included

am 23.08.2009 14:37:17 von Ashley Sheridan

On Sun, 2009-08-23 at 14:29 +0200, Ralph Deffke wrote:
> before you come up with how to send a header in php
>
> I'm TALKING ABOUT .CSS FILES NOT INCLUDING ANY PHP
>
> if you put this in httpconf
> AddType application/x-httpd-php .css
> the problem is caused
>
>
> ""Ralph Deffke"" wrote in message
> news:67.4F.03363.A1E219A4@pb1.pair.com...
> > Hi folks, i did post this also on the Wamp page but maybe someone out
> there
> > had to solve that problem as well.
> >
> > systems involved
> >
> > Firefox 3.0.13
> > Firefox 3.5.2
> > IE 6
> >
> > Wamp:
> > apache 2.2.11
> > PHP 5.2.9 & php 5.3
> >
> > I do parse css files through php
> >
> > Problem: css files are loaded into the browsers but not interpreted or
> used
> > on RAW HTML files no php included. The html files are produced with
> > phpDocumentor 1.4.2. IE6 uses parts of the css files loaded to display the
> > page, Firefox NOT AT ALL.
> >
> > I think it might be possible that wamp throughs some wierd characters into
> > the css files or is the header type a problem? It looks like parsing the
> css
> > through the php engine changes the header of the css to text/html. this
> > would explain why IE6 can use them. on the other hand firebug shows the
> > loaded css, indicates however that no css is available.
> >
> > as an reverse check I did load the html files direktly from the disk with
> > file:/// ... and the css are interpreted perfectly. so the source of the
> > problem is wamp.
> >
> > it seems that the @importcsss does the biggest problem.it creates a 404
> > error "file not found"
> >
> > it seems creating dynamic css files got some secrets involved with the
> wamp.
> > I'm using this concept since ages on linux with no problem.
> >
> > on the @includecss it seems that the search for files are changing to the
> > php include path or something.
> >
> > any idear what to check?
> >
> > is important for my work to create css dynamicly
> >
> > ralph_deffke@yahoo.de
> >
> >
>
>
>

Well, take the line out that's causing the problems then?!

You say you don't need to know how to set a header, but you seem to
insist that the CSS files are parsed by PHP. Which one is it?

Thanks,
Ash
http://www.ashleysheridan.co.uk




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: wierd behavior on parsing css with no php included

am 23.08.2009 15:20:51 von gary

You have a path problem. The browser is looking for your file/// . Remove
all but the folder and file information (that is if the css folder/file are
in the root directory).

So if your file looks like
url(f/////desktop/yourcomputer/mydocuments/sites/thissite/cs s/css.css),
remove all but the css/css.css

Or, if you are using Dreamweaver, right click and use the url locator

Gary
""Ralph Deffke"" wrote in message
news:67.4F.03363.A1E219A4@pb1.pair.com...
> Hi folks, i did post this also on the Wamp page but maybe someone out
> there
> had to solve that problem as well.
>
> systems involved
>
> Firefox 3.0.13
> Firefox 3.5.2
> IE 6
>
> Wamp:
> apache 2.2.11
> PHP 5.2.9 & php 5.3
>
> I do parse css files through php
>
> Problem: css files are loaded into the browsers but not interpreted or
> used
> on RAW HTML files no php included. The html files are produced with
> phpDocumentor 1.4.2. IE6 uses parts of the css files loaded to display the
> page, Firefox NOT AT ALL.
>
> I think it might be possible that wamp throughs some wierd characters into
> the css files or is the header type a problem? It looks like parsing the
> css
> through the php engine changes the header of the css to text/html. this
> would explain why IE6 can use them. on the other hand firebug shows the
> loaded css, indicates however that no css is available.
>
> as an reverse check I did load the html files direktly from the disk with
> file:/// ... and the css are interpreted perfectly. so the source of the
> problem is wamp.
>
> it seems that the @importcsss does the biggest problem.it creates a 404
> error "file not found"
>
> it seems creating dynamic css files got some secrets involved with the
> wamp.
> I'm using this concept since ages on linux with no problem.
>
> on the @includecss it seems that the search for files are changing to the
> php include path or something.
>
> any idear what to check?
>
> is important for my work to create css dynamicly
>
> ralph_deffke@yahoo.de
>
>
>
> __________ Information from ESET Smart Security, version of virus
> signature database 4360 (20090823) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>



__________ Information from ESET Smart Security, version of virus signature database 4360 (20090823) __________

The message was checked by ESET Smart Security.

http://www.eset.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: wierd behavior on parsing css with no php included

am 23.08.2009 19:54:45 von LinuxManMikeC

Try this at the beginning of each css file?

header('Content-type: text/css');
?>

On Sun, Aug 23, 2009 at 5:49 AM, Ralph Deffke wrote:
> Hi folks, i did post this also on the Wamp page but maybe someone out there
> had to solve that problem as well.
>
> systems involved
>
> Firefox 3.0.13
> Firefox 3.5.2
> IE 6
>
> Wamp:
> apache 2.2.11
> PHP 5.2.9 & php 5.3
>
> I do parse css files through php
>
> Problem: css files are loaded into the browsers but not interpreted or used
> on RAW HTML files no php included. The html files are produced with
> phpDocumentor 1.4.2. IE6 uses parts of the css files loaded to display the
> page, Firefox NOT AT ALL.
>
> I think it might be possible that wamp throughs some wierd characters into
> the css files or is the header type a problem? It looks like parsing the css
> through the php engine changes the header of the css to text/html. this
> would explain why IE6 can use them. on the other hand firebug shows the
> loaded css, indicates however that no css is available.
>
> as an reverse check I did load the html files direktly from the disk with
> file:/// ... and the css are interpreted perfectly. so the source of the
> problem is wamp.
>
> it seems that the @importcsss does the biggest problem.it creates a 404
> error "file not found"
>
> it seems creating dynamic css files got some secrets involved with the wamp.
> I'm using this concept since ages on linux with no problem.
>
> on the @includecss it seems that the search for files are changing to the
> php include path or something.
>
> any idear what to check?
>
> is important for my work to create css dynamicly
>
> ralph_deffke@yahoo.de
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: wierd behavior on parsing css with no php included

am 24.08.2009 08:55:02 von List Manager

Ralph Deffke wrote:
> Hi folks, i did post this also on the Wamp page but maybe someone out there
> had to solve that problem as well.
>
> systems involved
>
> Firefox 3.0.13
> Firefox 3.5.2
> IE 6
>
> Wamp:
> apache 2.2.11
> PHP 5.2.9 & php 5.3
>
> I do parse css files through php
>

If you state that they have not PHP to parse, then why parse them? It is a waist!

> Problem: css files are loaded into the browsers but not interpreted or used
> on RAW HTML files no php included. The html files are produced with
> phpDocumentor 1.4.2. IE6 uses parts of the css files loaded to display the
> page, Firefox NOT AT ALL.
>
> I think it might be possible that wamp throughs some wierd characters into
> the css files or is the header type a problem? It looks like parsing the css
> through the php engine changes the header of the css to text/html. this
> would explain why IE6 can use them. on the other hand firebug shows the
> loaded css, indicates however that no css is available.
>
> as an reverse check I did load the html files direktly from the disk with
> file:/// ... and the css are interpreted perfectly. so the source of the
> problem is wamp.
>
> it seems that the @importcsss does the biggest problem.it creates a 404
> error "file not found"
>
> it seems creating dynamic css files got some secrets involved with the wamp.
> I'm using this concept since ages on linux with no problem.
>
> on the @includecss it seems that the search for files are changing to the
> php include path or something.
>
> any idear what to check?
>
> is important for my work to create css dynamicly
>

My suggestion would be to have php run a script using the auto_prepend_file ini option

; Automatically add files before or after any PHP document.
auto_prepend_file = fix_headers.php
auto_append_file =

Then, in a script called fix_headers.php, somewhere in your path I hope, you have this.


# The following regex is completely untested. It is meant to
$ext = strtolower(preg_replace('|^.*\.([^.]+)$|', $_SERVER['SCRIPT_NAME']));

if ( 'css' === $ext ) {
header('Content-Type: text/css');
}

?>

Another way to get around it is to have apache instruct PHP to change, and output, the correct
content type.

http://httpd.apache.org/docs/1.3/mod/core.html#files
http://us2.php.net/manual/en/ini.core.php#ini.sect.data-hand ling
http://us2.php.net/manual/en/ini.core.php#ini.default-mimety pe


php_value default_mimetype "text/css"


Hope this helps

Jim Lucas

> ralph_deffke@yahoo.de
>
>
>


--
Jim Lucas

"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: wierd behavior on parsing css with no php included

am 25.08.2009 03:34:04 von Ralph Deffke

tx Lucas,

all your recomended solutions made sence for the different pupose.

for my purpose the apache solution worked just great


php_value default_mimetype "text/css"


and
AddType application/x-httpd-php .css

ralph_deffke@yahoo.de



"Jim Lucas" wrote in message
news:4A923946.3020806@cmsws.com...
> Ralph Deffke wrote:
> > Hi folks, i did post this also on the Wamp page but maybe someone out
there
> > had to solve that problem as well.
> >
> > systems involved
> >
> > Firefox 3.0.13
> > Firefox 3.5.2
> > IE 6
> >
> > Wamp:
> > apache 2.2.11
> > PHP 5.2.9 & php 5.3
> >
> > I do parse css files through php
> >
>
> If you state that they have not PHP to parse, then why parse them? It is
a waist!
>
> > Problem: css files are loaded into the browsers but not interpreted or
used
> > on RAW HTML files no php included. The html files are produced with
> > phpDocumentor 1.4.2. IE6 uses parts of the css files loaded to display
the
> > page, Firefox NOT AT ALL.
> >
> > I think it might be possible that wamp throughs some wierd characters
into
> > the css files or is the header type a problem? It looks like parsing the
css
> > through the php engine changes the header of the css to text/html. this
> > would explain why IE6 can use them. on the other hand firebug shows the
> > loaded css, indicates however that no css is available.
> >
> > as an reverse check I did load the html files direktly from the disk
with
> > file:/// ... and the css are interpreted perfectly. so the source of the
> > problem is wamp.
> >
> > it seems that the @importcsss does the biggest problem.it creates a 404
> > error "file not found"
> >
> > it seems creating dynamic css files got some secrets involved with the
wamp.
> > I'm using this concept since ages on linux with no problem.
> >
> > on the @includecss it seems that the search for files are changing to
the
> > php include path or something.
> >
> > any idear what to check?
> >
> > is important for my work to create css dynamicly
> >
>
> My suggestion would be to have php run a script using the
auto_prepend_file ini option
>
> ; Automatically add files before or after any PHP document.
> auto_prepend_file = fix_headers.php
> auto_append_file =
>
> Then, in a script called fix_headers.php, somewhere in your path I hope,
you have this.
>
> >
> # The following regex is completely untested. It is meant to
> $ext = strtolower(preg_replace('|^.*\.([^.]+)$|',
$_SERVER['SCRIPT_NAME']));
>
> if ( 'css' === $ext ) {
> header('Content-Type: text/css');
> }
>
> ?>
>
> Another way to get around it is to have apache instruct PHP to change, and
output, the correct
> content type.
>
> http://httpd.apache.org/docs/1.3/mod/core.html#files
> http://us2.php.net/manual/en/ini.core.php#ini.sect.data-hand ling
> http://us2.php.net/manual/en/ini.core.php#ini.default-mimety pe
>
>
> php_value default_mimetype "text/css"
>

>
> Hope this helps
>
> Jim Lucas
>
> > ralph_deffke@yahoo.de
> >
> >
> >
>
>
> --
> Jim Lucas
>
> "Some men are born to greatness, some achieve greatness,
> and some have greatness thrust upon them."
>
> Twelfth Night, Act II, Scene V
> by William Shakespeare



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php