[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing • View topic - chroot path issues

Cheshire Cat Computing

Software support and information
It is currently Wed Nov 12, 2025 8:20 am

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: chroot path issues
PostPosted: Wed Jan 10, 2007 10:17 am 
Offline
Silver User

Joined: Wed Jan 10, 2007 9:37 am
Posts: 20
Location: Fairbanks, AK
I just attempted to install routers2.cgi on an OpenBSD 4.0 box, but whenever I try to execute it I get an error in my apache logs saying:

[Tue Jan 9 11:54:59 2007] [error] (2)No such file or directory: exec of /cgi-bin/routers2.cgi failed
[Tue Jan 9 11:54:59 2007] [error] [client x.x.x.x] Premature end of script headers: /cgi-bin/routers2.cgi

Looking at the routers2.cgi, I see that the first line is /usr/bin/perl. With Apache being chrooted to /var/www on OpenBSD, obviously it wouldn't be able to find this directory, thus explaining the error. How can I fix this? Thanks.


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 10:40 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
Since the script is a Perl script, it will need access to both the Perl executable plus the Perl libraries. Also, it will need to be able to see the MRTG .cfg files and RRDTool .rrd files (if you have these under your www directory then this can be a security problem - you don't want people to be able to see the contents of the .cfg files over the web as they contain your SNMP community strings!)

I think you will need to make a special copy of Perl and the libraries under the chroot path.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 6:35 am 
Offline
Silver User

Joined: Wed Jan 10, 2007 9:37 am
Posts: 20
Location: Fairbanks, AK
hmmm- scratch that plan then. Is there any way to get it to run using Apache's mod_perl rather than calling perl directly? That would eliminate the issue, i would think...


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 9:13 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
Yes, routers2 will run with mod_perl (and also with speedycgi as well) and will run much better as it will implement config caching for a big speed boost.

Enable mod_perl as you would normally, and in the routers2.conf enable the 'cache=yes' line. This enables the extra caching.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 10:10 am 
Offline
Silver User

Joined: Wed Jan 10, 2007 9:37 am
Posts: 20
Location: Fairbanks, AK
Ok, that sounds good, but then what would I need to change the first line to? As I understand things, running under mod_perl it shouldn't need to call the perl interpreter directly-apache should recognize it as a perl script and run it. Is this correct? Perhaps I just need to remove that first line? Or am I missing something? Thanks for the quick replies and assistance.


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 10:30 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
I've never used mod_perl, but as I understand it, you dont need to change it although you may need to change the extension to .pl or something, or put it into a special directory with the mod_perl handler defined for it.... Probably your best path is to read the documentation for mod_perl...?

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject: Fixed- mostly
PostPosted: Fri Jan 12, 2007 8:58 am 
Offline
Silver User

Joined: Wed Jan 10, 2007 9:37 am
Posts: 20
Location: Fairbanks, AK
Ok, after much head pounding and things tried, I have it working- at least initially. The frames load, but the main page gives an error. Since I believe this to be an unrelated issue, see my other post at http://www.steveshipway.org/forum/viewt ... =6881#6881 Thanks for the assistance.

Israel


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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