PDA

View Full Version : wrong default PHP problem



moshem
12-24-2008, 02:01 AM
Hi all,

I tried to update my freebsd 4.1 DA with PHP4, MYSQL 4 and apache 1.3

I did manage to upgrade it to PHP5 and apache 2.

while looking for a way to upgrade to MYSQL 5, I found the 1.1 script on the site:

http://files.directadmin.com/services/custombuild/1.1/

which I also read will upgrade my MYSQL version.

I followed the instructions and got the file, extracted it and tried to build.


./build update_data

and got :


grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
There is wrong default PHP in /usr/local/directadmin/custombuild/options.conf set.


I tried getting files from my backup, but nothing helps, I even tried ./build update_data and got the same error.

I have no idea what's wrong and I am stuck. Here is the options.conf


#PHP settings. default_php possible values - 4 or 5
default_php=5
php4_cli=no
php4_cgi=no
php5_cli=yes
php5_cgi=no
zend=no

#Possible values - 4.1, 5.0
mysql=5.0
mysql_inst=no
mysql_backup=yes

#Possible values - 1.3, 2.0 or 2.2
apache_ver=2.2

#Web applications
phpmyadmin=yes
atmail=no
squirrelmail=yes
roundcube=yes
uebimiau=no

#Mail options
exim=no
mail-header-patch=yes
dovecot=yes

#Statistics
awstats=no
webalizer=yes

#FTP options
proftpd=yes

#Jailed shell (beta)
jail=no

#CustomBuild options
custombuild=1.1
autover=no
bold=yes
clean=yes
clean_old_webapps=no

#Cron settings

cron=no
email=email@domain.com
notifications=yes
updates=no

#CustomBuild 1.2 settings
php6_cli=no
php6_cgi=no
php_ini=no
#Possible values - recommended or dist
php_ini_type=recommended
cleanapache=no
fileserver=1
eximconf=no


thanks for any help you can suggest

smtalk
12-24-2008, 03:03 AM
-m1 is used to limit grep into returning 1 line and it should be available it your versions of grep (http://unixhelp.ed.ac.uk/CGI/man-cgi?grep), but it seems it's not. Try upgrading it.

moshem
12-24-2008, 04:10 AM
well, I'm trying, but alas, now a new problem emerges..

I downloaded the gnu 2.5.3, ran configure, then make and then make install,

make install got me this:


Making install in intl
if test "grep" = "gettext" && test 'intl-compat.o' = 'intl-compat.o'; then /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/lib /usr/local/include; /usr/bin/install -c -m 644 libintl.h /usr/local/include/libintl.h; @LIBTOOL@ --mode=install /usr/bin/install -c -m 644 libintl.a /usr/local/lib/libintl.a; else : ; fi
if test 'yes' = yes; then test no != no || /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/lib; temp=/usr/local/lib/t-charset.alias; dest=/usr/local/lib/charset.alias; if test -f /usr/local/lib/charset.alias; then orig=/usr/local/lib/charset.alias; sed -f ref-add.sed $orig > $temp; /usr/bin/install -c -m 644 $temp $dest; rm -f $temp; else if test no = no; then orig=charset.alias; sed -f ref-add.sed $orig > $temp; /usr/bin/install -c -m 644 $temp $dest; rm -f $temp; fi; fi; /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/share/locale; test -f /usr/local/share/locale/locale.alias && orig=/usr/local/share/locale/locale.alias || orig=./locale.alias; temp=/usr/local/share/locale/t-locale.alias; dest=/usr/local/share/locale/locale.alias; sed -f ref-add.sed $orig > $temp; /usr/bin/install -c -m 644 $temp $dest; rm -f $temp; else : ; fi
.././mkinstalldirs: Can't open .././mkinstalldirs: No such file or directory
*** Error code 2

Stop in /home/moshebox/grep-2.5.3/intl.


I have no idea how to go over this, I tried and still trying google...

any idea ?

scsi
12-24-2008, 07:00 AM
Is freebsd 4 even supported anymore?

moshem
12-24-2008, 07:01 AM
Well...

I don't know... but that is what I got installed on my VPS and there is nothing I can do about it.

I can't understand why grep won't install correctly..

scsi
12-24-2008, 07:07 AM
Because it cant find the file:

/home/moshebox/grep-2.5.3/mkinstalldirs

is that the right location to the file?

moshem
12-24-2008, 07:11 AM
that directory name did not exist.

but I did an mkdir and it exist, then I re-ran make install :


210# make install
Making install in intl
if test "grep" = "gettext" && test 'intl-compat.o' = 'intl-compat.o'; then /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/lib /usr/local/include; /usr/bin/install -c -m 644 libintl.h /usr/local/include/libintl.h; @LIBTOOL@ --mode=install /usr/bin/install -c -m 644 libintl.a /usr/local/lib/libintl.a; else : ; fi
if test 'yes' = yes; then test no != no || /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/lib; temp=/usr/local/lib/t-charset.alias; dest=/usr/local/lib/charset.alias; if test -f /usr/local/lib/charset.alias; then orig=/usr/local/lib/charset.alias; sed -f ref-add.sed $orig > $temp; /usr/bin/install -c -m 644 $temp $dest; rm -f $temp; else if test no = no; then orig=charset.alias; sed -f ref-add.sed $orig > $temp; /usr/bin/install -c -m 644 $temp $dest; rm -f $temp; fi; fi; /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/share/locale; test -f /usr/local/share/locale/locale.alias && orig=/usr/local/share/locale/locale.alias || orig=./locale.alias; temp=/usr/local/share/locale/t-locale.alias; dest=/usr/local/share/locale/locale.alias; sed -f ref-add.sed $orig > $temp; /usr/bin/install -c -m 644 $temp $dest; rm -f $temp; else : ; fi
*cC
.µא=פ..: not found
*** Error code 127

Stop in /home/moshebox/grep-2.5.3/intl.
*** Error code 1

Stop in /home/moshebox/grep-2.5.3.
210#


I can't even understand the problem now

scsi
12-24-2008, 07:25 AM
Not sure what that even means.

Maybe you should try updating your sources and installing a new grep source.



pkg_add -r cvsup-without-gui

echo "
*default host=cvsup5.us.freebsd.org
*default base=/usr
*default prefix=/usr
*default release=cvs
*default tag=RELENG_4
*default delete use-rel-suffix
src-all

" > /etc/cvsup-src

cvsup /etc/cvsup-src

cd /usr/src/gnu/usr.bin/grep
make install

moshem
12-24-2008, 07:46 AM
thanks for your help..

pkg_add -r cvsup-without-gui


Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4.10-release/Latest/cvsup-without-gui.tgz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4.10-release/Latest/cvsup-without-gui.tgz' by URL

scsi
12-24-2008, 07:53 AM
thanks for your help..

pkg_add -r cvsup-without-gui


Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4.10-release/Latest/cvsup-without-gui.tgz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4.10-release/Latest/cvsup-without-gui.tgz' by URL

pkg_add -r "ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/4.11-RELEASE/packages/All/cvsup-without-gui-16.1h.tgz"

moshem
12-24-2008, 07:56 AM
done this:


210# pkg_add -r "ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/4.11-RELEASE/packages/All/cvsup-without-gui-16.1h.tgz"
Fetching ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/4.11-RELEASE/packages/All/cvsup-without-gui-16.1h.tgz... Done.
pkg_add: package bsdpan-mod_perl-1.29 has no origin recorded
pkg_add: package bsdpan-mod_perl-2.0.3 has no origin recorded


now running cvsup...

will report back

thank you!

moshem
12-24-2008, 09:08 AM
it is taking a while...looks like it will take a few more hours.

I am on an ssh client here, if I disconnect my laptop from the network it will the download process stop ? I have to leave here in an hour..

can I make continue work in the background somehow ?


thanks

scsi
12-24-2008, 09:17 AM
You might need to stop it then install this:




pkg_add -r "ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/4.10-RELEASE/packages/All/screen-4.0.2.tgz"


Then restart it like this:

screen cvsup /etc/cvsup-src

Then you can press:

ctrl + a + d

When you login later run:

screen -r

To reattach to it if it is still running.

moshem
12-24-2008, 09:29 AM
Ok, I installed screen using a 2nd ssh session.

I guess I can't attache the 1st using the 2nd...

if I stop the csvup process will it restart from the begining, or will it skip the ones that it already downloaded ?

scsi
12-24-2008, 09:37 AM
It will skip what is already there.

moshem
12-24-2008, 12:43 PM
damn, no luck!


Checkout src/usr.sbin/zic/zic.c
Finished successfully

[screen is terminating]
210# cd /usr/src/gnu/usr.bin/grep
210# make install
install -s -o root -g wheel -m 555 grep /usr/bin
install: grep: No such file or directory
*** Error code 71

Stop in /usr/src/gnu/usr.bin/grep.

scsi
12-24-2008, 12:46 PM
ugh you might need to build all the sources then.




cd /usr/src
screen make buildworld && make buildkernel KERNCONF=GENERIC && make installkernel KERNCONF=GENERIC

shutdown -r now

After it comes back from reboot do:

cd /usr/src
make installworld

moshem
12-24-2008, 12:50 PM
wow, that sounds drastic.....

how long will it take ?

I am on a VPS, so I may be on a jailed shell.

will shutdown have the desirable effect here ?

scsi
12-24-2008, 12:53 PM
Well if you dont wanna update all your OS sources you can probably just do:



cd /usr/src
screen make buildworld
cd /usr/src/gnu/usr.bin/grep
make install


buildworld will build all the sources but not install them. Its gonna take a few hours to compile it all.

But its best to do the above to update all your OS sources make sure everything works well together.

As far as rebooting the VPS I am not sure I have never used a VPS before.

moshem
12-24-2008, 12:56 PM
Ok,

gonna try that first. will report back

thanks

moshem
12-24-2008, 04:31 PM
ok, done.




210# screen make buildworld
210# grep -V
grep (GNU grep) 2.4d

Copyright (C) 1988, 1992-1998, 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

210# cd /usr/src/gnu/usr.bin/grep
210# make install
install -s -o root -g wheel -m 555 grep /usr/bin
install -o root -g wheel -m 444 grep.1.gz /usr/share/man/man1
/usr/share/man/man1/egrep.1.gz -> /usr/share/man/man1/grep.1.gz
/usr/share/man/man1/fgrep.1.gz -> /usr/share/man/man1/grep.1.gz
/usr/share/man/man1/zgrep.1.gz -> /usr/share/man/man1/grep.1.gz
/usr/share/man/man1/zegrep.1.gz -> /usr/share/man/man1/grep.1.gz
/usr/share/man/man1/zfgrep.1.gz -> /usr/share/man/man1/grep.1.gz
===> doc
install-info --quiet --defsection="System Utilities" --defentry= grep.info /usr/share/info/dir
install -o root -g wheel -m 444 grep.info.gz /usr/share/info
/usr/bin/egrep -> /usr/bin/grep
/usr/bin/fgrep -> /usr/bin/grep
/usr/bin/zgrep -> /usr/bin/grep
/usr/bin/zegrep -> /usr/bin/grep
/usr/bin/zfgrep -> /usr/bin/grep
210# grep -V
grep (GNU grep) 2.4d

Copyright (C) 1988, 1992-1998, 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

210# grep -m
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.



as you can see I'm back to the same grep version with the same lack of -m parameter..

scsi
12-24-2008, 09:52 PM
Is there an egrep -m

If not maybe something will have to be changed in the script to accommodate your OS.

moshem
12-25-2008, 12:54 AM
same problem, missing -m parameter.

I wonder why it did not compile the newer grep source code.. anyway to check it ?

moshem
12-25-2008, 11:09 AM
any ideas?

All I wanted is to upgrade to MySQL 5

Maybe there is an easier way ?