[mythtv-users] Re: mythweb2 and 0.10 release?

Omer Shenker mail at omershenker.net
Fri Aug 1 18:34:03 EDT 2003


On Fri, 1 Aug 2003 12:54:35 -0700 Alan Snyder wrote:
> If I just load <hostip>/mythweb/ or
> <hostip>/mythweb/recorded_programs.php or
> any other page, I get IE asking me if I want to
> download the php file.  If I
> cancel that and reload, I can get a semi-readable
> page.  Ctrl-reload, which in
> IE ignores the cache, seems to help, but clearing the
> cache does not.
>
> HTTP/1.1 200 OK Date: Fri, 01 Aug 2003 19:45:04 GMT
> Server:
> Apache-AdvancedExtranetServer/2.0.45 (Mandrake
> Linux/4.3mdk) mod_perl/1.99_08
> Perl/v5.8.0 mod_ssl/2.0.45 OpenSSL/0.9.7a PHP/4.3.1
> Last-Modified: Fri, 01 Aug
> 2003 00:51:58 GMT ETag: "fc286-a3f-6d7f4780"
> Accept-Ranges: bytes
> Content-Length: 2623 Keep-Alive: timeout=15, max=99
> Connection: Keep-Alive
> Content-Type: application/x-httpd-php 
> Warning: (null)() [ref.outcontrol]: Cannot change
> zlib.output_compression -
> headers already sent in Unknown on line 0
> 
> --------------------------------------------------------------
> ------------------
> Warning at
> /var/www/html/mythweb2/includes/mythbackend.php, line
> 16:
> shell_exec() [function.shell-exec]: Cannot execute
> using backquotes in Safe Mode
> 
> --------------------------------------------------------------
> ------------------
> Warning at
> /var/www/html/mythweb2/themes/Default/theme.php, line
> 14:
> Cannot modify header information - headers already
> sent by (output started at
> /var/www/html/mythweb2/includes/errors.php:68) 

Here, as far as I can tell, is what's happening. In
includes/mythbackend.php, there's a backquote call to hostname. (This
probably could be replaced with an environment variable.) Because you're
using safe mode, that's a non-fatal error. This triggers the user-supplied
error handler, which prints something. But as Michael explained in his
reply, that will make PHP dump default headers, including a Content-Type of
[the PHP config option] default_mimetype, which on my system is text/html.
On your system it's sending application/x-httpd-php instead; I'm not
completely sure why. Since IE doesn't recognize that MIME type, it assumes
you want to download the file. Later on themes/Default/theme.php tries to
send a text/html header explicitly, but it can't because the headers have
already been sent.

What mystifies me is why it's returning application/x-httpd-php. I'd be
pretty surprised if your default_mimetype weren't text/html. (Use phpinfo()
to check.) You do have mod_mime loaded, right? (Use /server-info to check.)

Turning off safe_mode should hopefully solve the problem to some extent. If
you're still having problems with IE wanting to download files, turn on
output_buffering; this allows you to send headers even after sending
non-header stuff. Sorry I can't really give you more help, but without
seeing your config files and getting some sleep, this is the best guess I
have. Have you set DefaultType or default_mimetype to something weird?

-- 
Omer Shenker                          http://omershenker.net/




More information about the mythtv-users mailing list