View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Sep 10, 2004 10:06 am 
Offline
Joined: Tue Sep 07, 2004 2:30 pm
Posts: 10
I posted this as a question in the "installation" forum, but, I guess it wasn't a good enough question because somebody seems to have deleted my previous message. I found the solution so I returned just in case anybody else has the problem.

This issue centers on enabling basic authentication on the MythWeb pages so if you expose your MythWeb on the internet you need a username and password to access your MythWeb.

I won't rehash the entire process step by step, but, in general you must

1. Use "htpasswd" to create a password file
2. Edit /etc/apache/conf/httpd.conf, changing AllowOverride so apache will accept the instance of .htaccess files in the htdocs directories. I changed mine to AllowOverride to All but you can probably be less permissive. You will need to change the AllowOverride for both "/" and for Apache in general.
3. EDIT the /var/www/.htaccess that is distributed by KnoppMyth (but probably comes wholesale from the MythWeb source). The first 4 lines are commented out, uncomment them. The line that points at the password file should be changed to point at the password file you created in step 1.

Now if that is all you do, your site will be protected by basic authentication, but, you will receive an error about php_sessions, a directory not existing or some such. One more change must be made

4. Go back into the .htaccess file and file the line that says something like
Quote:
session.save_path = php_sessions

change this to
Quote:
session.save_path = /tmp

and the error will be resolved. I am not quite sure with it was changed from the default (the default is /tmp) but this fixes it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 10, 2004 10:18 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Cool: I had this same problem and it looks like this will fix it. Thanks for reporting back. I will try to update the wiki as well.

(PS: since your message was a post-installation problem, it was probably removed from Installation for that reason)


Top
 Profile  
 
PostPosted: Fri Sep 10, 2004 11:40 am 
Offline
Joined: Tue Sep 07, 2004 2:30 pm
Posts: 10
I probably just need to read the FAQ for these forums... I call it Install until everything is up and running. I wouldn't personally consider MythWeb really fully running until it is protected, but, I realize others differ. Most people probably have no need to protect MythWeb.


Top
 Profile  
 
PostPosted: Thu Oct 28, 2004 1:58 pm 
Offline
Joined: Wed Jul 14, 2004 3:32 pm
Posts: 142
Good help, but I have found a few differences. I am currently running on R4V5, and found the same on R4V4. I will detail these below.

When I first edited /var/www/.htaccess (remembering /var/www is a symbolic link to /usr/share/mythtv/mythweb) the vi session said new file, so there was not a file there provided by the knoppmyth distribution, it was an empty new file, I therefore put the required information in.

I can now access mythweb fine from my internal lan, but when trying to access from outside with a good login I get php session errors (as expected).

I put in the line "session.save_path = /tmp" into my .htaccess file as explained above, and restarted the httpd daemon.

Can't now connect even from my internal lan. Upon checking the apache error log file I see the following entry

[Thu Oct 28 20:20:12 2004] [alert] [client X.X.X.X] /var/www/.htaccess: Invalid command 'session.save_path', perhaps mis-spelled or defined by a module not included in the server configuration

Once I remove the session.save_path comment and restart the webserver everything is fine, except the php sessions problem.

Please help.

Regards
Matt Shaw
matt@shagshaw.com


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 29, 2004 1:24 pm 
Offline
Joined: Thu Feb 19, 2004 6:52 pm
Posts: 117
matt,

that directive goes into your php.ini file, not the .htaccess file:
Code:
jds@mythtv:/ $ find / -name php.ini -print 2> /dev/null
/etc/php4/apache/php.ini
/usr/share/doc/php4/examples/php.ini

jds@mythtv:/ $ grep session.save_path /etc/php4/apache/php.ini
session.save_path = /tmp


after changing php.ini, you must restart apache (=httpd), as root:
Code:
root@mythtv:/# /etc/init.d/apache restart


jim


Top
 Profile  
 
 Post subject: re: php sessions/mythweb
PostPosted: Sat Oct 30, 2004 5:25 am 
Offline
Joined: Wed Jul 14, 2004 3:32 pm
Posts: 142
Hey Jim

Thanks for the suggestion, but just checked both of the php.ini files on the system, and they already contain the session.save_path = /tmp directive.

Any other ideas, anyone ???


Cheers

Matt Shaw
matt@shagshaw.com


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu