Well 3 hours later I have a solution.. I turned off output_compression using
the ini_set function, within the scripts dynamically generating javascript
variables. This wasn't possible earlier, as I think there was a bug that
didn't allow me to use ini_set on the zlib.output_compression directive.


"Christian Calloway" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have ran into a rather interesting problem while zlib or gzip
compression
> is enabled on my site. I have an external javascript-php file (a
javascript
> file that is dynamically generated as in filename.js.php) which is
included
> in the main template using the <script> element (for example <script
> src="filename.js.php"></script>). This file defines variables that are
used
> to populate a javascript drop-down menu. With compression turned on, from
> time-to-time, I get a javascript error basically saying that certain
> variables have not been defined. At other times it works perfectly; this
> phenomenom appears to be completely random. My theory is, with compression
> turned on (via php.ini), the external php file does not get placed into
the
> output buffer until some point in time after the currently executing
script
> has been compressed. The reason being, is that the file is not included
into
> the script using a php "require" construct, but rather via HTML's <script>
> element. I have played with this forever, and I have not found a solution.
> Has anyone else ran into this problem; any suggetions or comments are
> greatly welcomed. Thanks in advance,
>
> Christian

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

Reply via email to