Mailing List Archive

mythweb2 and 0.10 release?
I tried mythweb2 from CVS as of last night but I'm
still running myth-0.10.

*Occasionally* I get a listing screen (with the same
php Safe Mode warnings I
get with mythweb-0.10), but usually Internet Explorer
thinks I want to download
the php file.

Is this an artifact of a work-in-progress,
incompatibility with 0.10 (there's no
database upgrade that I see in the mythtv CVS), or
some other mistake I'm
making?


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Re: mythweb2 and 0.10 release? [ In reply to ]
> *Occasionally* I get a listing screen (with the same
> php Safe Mode warnings I

the "occasionally" is odd... seems like it would be there always or never...
what error are you getting relating to safe mode?

do you know how to turn it off? (do a search for php.ini examples... it
goes in /etc/php.ini ...you'll need to restart apache). On Mandrake 9.1,
there was no existing /etc/php.ini for me... so it defaults at startup to
safe mode... i created a blank /etc/php.ini with 3 or 4 options *only* ...
amoung them safe_mode=Off ... the rest I let stay at the default... this
eliminated the safe mode errors I was having when loading the "recordings"
screen.... (where it was running GD or something to create thumbnails of the
recordings).

i'm not getting any safe mode errors in mythweb2 either

-dane

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
RE: mythweb2 and 0.10 release? [ In reply to ]
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.

One clue: If I view the source, it's clear that part
of the html page is cut
off. The recorded programs page for example begins
with

rder_t menu_border_b"><table class="body" width="100%"
border="0"
cellspacing="2" cellpadding="2">
<tr>
<td><a id="category_legend_anchor"
onmouseover="show('category_legend');return true;"


Here are some errors embedded in the recorded programs
page:

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)
--------------------------------------------------------------------------------

Could there be a problem with mythweb2 in the
directory mythweb2 rather than
mythweb?

Could Apache be confused by serving two sets of pages
with many of the same file
names (seems doubtful)?

> -----Original Message-----
> From: mythtv-users-bounces@mythtv.org
[mailto:mythtv-users-bounces@mythtv.org]
> On Behalf Of Dane Kantner
> Sent: Friday, August 01, 2003 1:49 PM
> To: Discussion about mythtv
> Subject: Re: [mythtv-users] mythweb2 and 0.10
release?
>
> > *Occasionally* I get a listing screen (with the
same
>
> > php Safe Mode warnings I
>
>
>
> the "occasionally" is odd... seems like it would be
there always or never...
>
> what error are you getting relating to safe mode?
>
>
>
> do you know how to turn it off? (do a search for
php.ini examples... it
>
> goes in /etc/php.ini ...you'll need to restart
apache). On Mandrake 9.1,
>
> there was no existing /etc/php.ini for me... so it
defaults at startup to
>
> safe mode... i created a blank /etc/php.ini with 3
or 4 options *only* ....
>
> amoung them safe_mode=Off ... the rest I let stay at
the default... this
>
> eliminated the safe mode errors I was having when
loading the "recordings"
>
> screen.... (where it was running GD or something to
create thumbnails of the
>
> recordings).
>
>
>
> i'm not getting any safe mode errors in mythweb2
either
>
>
>
> -dane
>
>
>
> _______________________________________________
>
> mythtv-users mailing list
>
> mythtv-users@mythtv.org
>
>
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
RE: mythweb2 and 0.10 release? [ In reply to ]
Alan Snyder said:
> 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.
>
> One clue: If I view the source, it's clear that part
> of the html page is cut
> off. The recorded programs page for example begins
> with
>
> rder_t menu_border_b"><table class="body" width="100%"
> border="0"
> cellspacing="2" cellpadding="2">
> <tr>
> <td><a id="category_legend_anchor"
> onmouseover="show('category_legend');return true;"
>
>
> Here are some errors embedded in the recorded programs
> page:
>
> 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)
> --------------------------------------------------------------------------------
>
> Could there be a problem with mythweb2 in the
> directory mythweb2 rather than
> mythweb?
>
> Could Apache be confused by serving two sets of pages
> with many of the same file
> names (seems doubtful)?

Those error messages are caused by those pages trying to send headers,
probably cookies for php sessions when headers have already been sent.
When the server returns a php page, it doesn't finish the headers off
until the first line of content is returned, this allows the php script to
add headers to be sent. The problem you are running into is probably
comming from the php open tags. PHP has several methods for starting off
the PHP in the file (<?php <? are the most common). What most likely is
happening is you don't have short tags turned on meaning that only <?php
works. When the PHP script engine sees the <? it assumes this is content,
the headers are finished off and the following text is sent to the
browser. The reason your page is incomplete could be that some of the
page should have been generated by the script. Something you could try
doing is setting the short tags option on in the PHP settings file. Add
or set the following line in /etc/php.ini:
short_open_tag = On
see if that doesn't help you out.

I may be totaly off base but it is worth a shot.

Michael
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythweb2 and 0.10 release? [ In reply to ]
Alan Snyder wrote:

>Here are some errors embedded in the recorded programs
>page:
>
>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
>
>
Remove the lines in .htaccess that has with

zlib.output_compression

to do. That helped for me. Also change all the <? in the beginning of the php files to <?php.
I also added DirectoryIndex program_listing.php in the .htaccess file, but this I think wasn't necessary. Had to restart Mozilla before it started to work. I guess jo already have changed the line 97 as required for 0.10 ?


--

peraage

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythweb2 and 0.10 release? [ In reply to ]
> page should have been generated by the script. Something you could try
> doing is setting the short tags option on in the PHP settings file. Add
> or set the following line in /etc/php.ini:
> short_open_tag = On
> see if that doesn't help you out.
>
you shouldn't really be getting all of those errors ...the cannot execute
thing is less of a problem with the php coding and more of a problem in your
setup... there *are* ways of getting around the exec issues in safe mode
(e.g., calling perl to run it), but thats more of a hack and probably isn't
necessary for 90% of the mythweb users

so..going along with the adding that line to /etc/php.ini theme....maybe add
a line to turn safe mode off... i wrote a post about this earlier, after
getting warnings about the safe mode (in a default mandrake 9.1 install)
...my installation had a blank /etc/php.ini file, meaning php was booting
with pretty conservative compiled in defaults... add a "safe_mode = Off"
...safe mode is really only important if you're setting up a shared hosting
server... i also added safe_mode_gid = Off but don't really remember the
reasoning behind that.also, i set added doc_root = , user_dir =
(yes,=nothing).

-dane

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythweb2 and 0.10 release? [ In reply to ]
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/
Re: mythweb2 and 0.10 release? [ In reply to ]
> Remove the lines in .htaccess that has with
> zlib.output_compression

that shouldn't affect anything.

> to do. That helped for me. Also change all the <? in the beginning of the php files to <?php.
> I also added DirectoryIndex program_listing.php in the .htaccess file, but this I think wasn't necessary. Had to restart Mozilla before it started to work. I guess jo already have changed the line 97 as required for 0.10 ?

this is on the todo list. I don't want to do a global find/replace
because it would mess up a lot of my formatting. For now, just enable
short_open_tag in php.ini (it's set to do so in the .htaccess file, but
there's a bug in php that makes it ignore the directive)

You shouldn't need the DirectoryIndex thing - there's an index.html file
there that should redirect you just fine. Or is it not showing up in
cvs for some reason?

-Chris

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: Re: mythweb2 and 0.10 release? [ In reply to ]
> 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.)

unfortunately, there doesn't seem to be a pre-defined variable with the
exact information in it (ie. php sees my main webserver as
"forevermore.net" but `hostname` returns the machine's actual name of
"indra")

Perhaps I can turn off safe mode in the .htaccess file. I'm just
checking this into cvs now. However, you might want to be careful, as
I've also been playing around with the recording options to add weekly
timeslots, etc. (it should work, but I'm not going to guarantee
anything).

-Chris

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythweb2 and 0.10 release? [ In reply to ]
Chris Petersen wrote:

>>Remove the lines in .htaccess that has with
>>zlib.output_compression
>>
>>
>
>that shouldn't affect anything.
>
>
Well, it does. Mozilla and Konqueror asks if I wan't to download the php
files with these two lines. I tried putting them back in, with the same
result. So, yes, they do matter.

>
>
>>to do. That helped for me. Also change all the <? in the beginning of the php files to <?php.
>>I also added DirectoryIndex program_listing.php in the .htaccess file, but this I think wasn't necessary. Had to restart Mozilla before it started to work. I guess jo already have changed the line 97 as required for 0.10 ?
>>
>>
>
>this is on the todo list. I don't want to do a global find/replace
>because it would mess up a lot of my formatting. For now, just enable
>short_open_tag in php.ini (it's set to do so in the .htaccess file, but
>there's a bug in php that makes it ignore the directive)
>
>
>You shouldn't need the DirectoryIndex thing - there's an index.html file
>there that should redirect you just fine. Or is it not showing up in
>cvs for some reason?
>
>
No, that's fine. Nice work with the new design, BTW.
Re: mythweb2 and 0.10 release? [ In reply to ]
> Well, it does. Mozilla and Konqueror asks if I wan't to download the php
> files with these two lines. I tried putting them back in, with the same
> result. So, yes, they do matter.

Weird, works fine for me in every browser I use. Are you doing anything
weird in your php.ini file? Also, are you running php as a server
module (mod_php) or as a cgi?

It seems that for some reason, your browser doesn't do the zlib
compression thing, though php is supposed to be aware of that (the
browser tells the server whether or not it can accept compressed pages,
and php checks for that).

-Chris

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythweb2 and 0.10 release? [ In reply to ]
Chris Petersen wrote:

>>Well, it does. Mozilla and Konqueror asks if I wan't to download the php
>>files with these two lines. I tried putting them back in, with the same
>>result. So, yes, they do matter.
>>
>>
>
>Weird, works fine for me in every browser I use. Are you doing anything
>weird in your php.ini file? Also, are you running php as a server
>module (mod_php) or as a cgi?
>
>
It's the php.ini that is default with Mandrake 9.1. It loads php as a
module, i think.

--

peraage

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: mythweb2 and 0.10 release? [ In reply to ]
> It's the php.ini that is default with Mandrake 9.1.

Can you do me a favor? keep the zlib stuff in .htaccess commented out,
but go into php.ini and enable it? You'll have to restart httpd/apache
to get the changes. Let me know if/how it works.

> It loads php as a module, i think.

that would be in apache, but if it's a standard mandrake install, I'm
going to guess that this is the case.

-Chris

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users