Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Dennis Pecynski on August 10, 2002, 03:03:56 AM
-
some one tell me what to do, Just wanted to change value in open_basedir for one Ibay...did what I was supposed to do in FAQ 6q12...even was instructed on my progress...when script took I lost my ibays....they are there but cannot access them from outside..cannot use server manager except on server itself.....I still have email yet. I cannot see or use my website..Please guide me thru this.
-
Ok I have found by rebooting and watching load sequence I have a syntax error on line 1507....I have the file name and file..could someone please instruct me on how to correct this...IE...do I type in file and retype syntax?...someway of viewing what is there?...I am not helpless just do not have the knowledge or experience yet..and do not want to srew it up worse.
Any help will be deeply appreciated...Thanks Dennis
-
Dennis,
what file is the syntax error in??.
Jon
-
Thanks for the reply...This is exactly what I see on reboot
Starting httpd-e-smith: Starting httpd: Syntax error on line 1507 of /ect/httpd/config/httpd.config:
Invalid command '/sbin/e-smith/expand-template' , perhaps mis-spelled or defined by a modual not included in the server configuration
anything you could guide me through would be deeply apreceated!!
-
Ok
First off, lets undo what you have done so far
# /sbin/e-smith/db accounts delprop your_i-bay_name PHPBaseDir
# /sbin/e-smith/signal-event ibay-modify your_i-bay_name
then try
# /etc/e-smith/expand-template /etc/httpd/conf/httpd.conf
# /etc/rc.d/init.d/httpd-e-smith restart
post any error messages
Jon
-
I do not have a directory or file of expand-template
-
Ok, I wonder where that went??.
# pico /sbin/e-smith/expand-template
and copy and paste the below into it
#!/usr/bin/perl -w
#----------------------------------------------------------------------
# copyright (C) 2002 Mitel Networks Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Technical support for this program is available from Mitel Networks
# Please visit our web site www.e-smith.com for details.
#----------------------------------------------------------------------
package esmith;
use strict;
use Errno;
use esmith::util;
use Getopt::Long;
use esmith::config;
tie my %conf, 'esmith::config';
my %options = ();
GetOptions(\%options, 'output_filename=s', 'expand_queue=s');
$options{'template_path'} = $ARGV[0];
$options{'output_filename'} = $options{'template_path'}
unless ( exists $options{'output_filename'} );
my %args = (
CONFREF => \%conf,
TEMPLATE_PATH => $options{'template_path'},
OUTPUT_FILENAME => $options{'output_filename'},
);
$args{TEMPLATE_EXPAND_QUEUE} = [$options{'expand_queue'}]
if exists $options{expand_queue};
if ( -f $options{'output_filename'} )
{
# If the target file exists, preserve its ownership and mode
use File::stat;
my $f = stat($options{'output_filename'} );
$args{UID} = $f->uid;
$args{GID} = $f->gid;
$args{PERMS} = $f->mode;
}
esmith::util::processTemplate(\%args);
save and chmod to 554 and try to expand httpd again
-
this may sound stupid....I have it in my window...how do I save it?
-
when I put in ...pico /sbin/e-smith/expand-template
the rest came up by itself...did not have to cut and paste
-
figured it out....
-
ok saved expand-template...tryed script again...cut and paste...so no typo's
and got this responce
bash: /ect/e-smith/expand-template: no such file or directory
-
Dennis Pecynski wrote:
>
>
> ok saved expand-template...tryed script again...cut and
> paste...so no typo's
> and got this responce
>
> bash: /ect/e-smith/expand-template: no such file or directory
Well, "ect" is a pretty severe typo for "sbin". :-) (It's a milder one for
"etc", but that's not where that script is located.)
--Rich
-
Oops, my typo
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
Jon
-
now......syntax error line 1507 of /ect/config/httpd.config: Invalid command /sbin/e-smith/expand-template.
Hey remember in my first post..I told you before anyone tryed to guide me..I did the sandbox disable?.....wonder if that may be causing any problems?...at that time..after disable...everything still worked...but because of the changes we have done here maybe ..there is a clash of some sort.
-
Ok its time to take a look at line 1507
/etc/httpd/conf/httpd.conf
and post that line and maybe a couple above and below.
jon
-
bash: /etc/httpd/conf/httpd.conf permission denied
-
ok....typed in....
view /etc/httpd/conf/httpd.conf..
got into file...only problem is...have to figure out line 1507...
-
changed permission on /etc/httpd/conf/httpd.conf got it to open...almost every line command not found...
at the end...line 217 : syntax error near unexpected token 'mod_ssl.c>'
/etc/httpd/conf/httpd.conf: line 217 ''
-
Use mc to open the file
log in as root
# mc
That will open a norton commander style directory. scroll to /etc/httpd/conf/httpd.conf.
press F4
This will open the file and you will be able to scroll to line 1507. At the top you will see
httpd.conf [----] 0 L:[358+24 382/1686] *(13253/50216b)= D 68 44H
382/1686 is the current line and the total lines.
Jon
-
line 1506= blank....
line 1507 = sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
line 1508 = ervice httpd restartProgram fragment at line 2 delivered error ' ' syntax error ' '
I see a space at line 1507 end of expand-template and slash
I see what looks like should be "service" at the begining of 1508...but no "s"
-
Wow, that's the most amazingly hosed httpd.conf I've ever seen. Try this, from the shell prompt:
# ls /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
If this comes back with an error that the directory doesn't exist, fine. If not, post what it indicates. If there are no files, do this, again at the shell prompt, and post the _exact_ output:
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
# /etc/rc.d/init.d/httpd-e-smith restart
If it runs without errors, how's your system?
-
95AddType00PHP2ibays.save
-
OK, try this:
# pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays.save
(all on one line) What's in that file?
-
file name too long
-
ok.....got into by getting into directory first then pico...too much to post....very long file
-
Ah, OK, do this then:
# cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
# pico 95AddType00PHP2ibays.save
-
Well, that doesn't look like a file that should be there. Try removing it (or moving it somewhere outside of /etc/e-smith, like to /root), and then re-expanding the httpd.conf file (using the expand-template command I posted previously).
-
this is where that file came from
http://forums.contribs.org/index.php?topic=12706.msg47725#msg47725
How do I remove it?...
rm un_wanted_file (enter)?
"reply". remove un_wanted_file?..(press Y) ?
is that correct?
-
Yep, that's correct.
-
It made a new file..95AddType00PHP2ibays.save.save
shows lost of conflicks when I use the expand script.
-
you did rm 95AddType00PHP2ibays.save, and it created a new file? Do you have some kind of wierd file-protection running? Try this:
# rm -rf /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
...and then do this, as posted above:
If there are no files, do this, again at the shell prompt, and post the _exact_ output:
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
# /etc/rc.d/init.d/httpd-e-smith restart
Note, "lost of conflicks" does not qualify as exact output.
-
shutting down httpd: [failed]
starting httpd: [ OK]
-
...and does it work now?
-
Yes....and a VERY STRONG THANKYOU!!!!!!!
I even went thru and did the FAQ#6q12 again...and everything works great...
Thanks again Dan......(FYI...a very useful learning experience...I really got familar with the root system of my server....I am very comftable with it now...I realize the extreme importance of watching my typing now).
Thanks again