xinglp wrote:
> 2013/5/9 Bruce Dubbs <bruce.du...@gmail.com>
>
>> xinglp wrote:
>>
>>> And I got these errors with PHP 5.4.12
>>> PHP Warning:  Invalid argument supplied for foreach() in
>>> /xxx/lfs-latest-files.php on line 26
>>> PHP Warning:  Invalid argument supplied for foreach() in
>>> /xxx/lfs-latest-files.php on line 26
>>> PHP Warning:  Invalid argument supplied for foreach() in
>>> /xxx/lfs-latest-files.php on line 26
>>> PHP Warning:  Invalid argument supplied for foreach() in
>>> /xxx/lfs-latest-files.php on line 188
>>> PHP Warning:  Invalid argument supplied for foreach() in
>>> /xxx/lfs-latest-files.php on line 26
>>
>> That line is "foreach ( $lines as $line )".  That would indicate that
>> the $lines array is null.  That indicates that the ftp or http get
>> command didn't work.  Add a line
>>
>> echo $dirpath . "\n";
>>
>> at the top of the get_packages() function to see what files are not
>> being retrieved.  I somehow suspect the sourceforge files, but it could
>> be something else.
>>
>>> sh: -t: command not found
>>
>> I have no idea where this came from.
>>
> The the output is below:
> http://ftp.gnu.org/gnu/autoconf
> http://ftp.gnu.org/gnu/automake
> http://ftp.gnu.org/gnu/bash
> http://alpha.gnu.org/gnu/bc
> http://ftp.gnu.org/gnu/binutils
> http://ftp.gnu.org/gnu/bison
> http://www.bzip.org/1.0.6
> http://sourceforge.net/projects/check/files/check/0.9.10
> http://ftp.gnu.org/gnu/coreutils
> http://ftp.gnu.org/gnu/dejagnu
> http://ftp.gnu.org/gnu/diffutils
> http://prdownloads.sourceforge.net/e2fsprogs
> http://prdownloads.sourceforge.net/expect
> ftp://ftp.astron.com/pub/file
> PHP Warning:  Invalid argument supplied for foreach() in
> /home/alex/.data/lfs_build/a.php on line 26
> http://ftp.gnu.org/gnu/findutils
> http://prdownloads.sourceforge.net/flex
> http://ftp.gnu.org/gnu/gawk
> http://ftp.gnu.org/gnu/gcc/gcc-4.8.0
> http://ftp.gnu.org/gnu/gdbm
> http://ftp.gnu.org/gnu/gettext
> http://ftp.gnu.org/gnu/glibc
> ftp://ftp.gmplib.org/pub/gmp-5.1.1
> PHP Warning:  Invalid argument supplied for foreach() in
> /home/alex/.data/lfs_build/a.php on line 26
> PHP Warning:  Invalid argument supplied for foreach() in
> /home/alex/.data/lfs_build/a.php on line 26
> http://ftp.gnu.org/gnu/grep
> http://ftp.gnu.org/gnu/groff
> http://ftp.gnu.org/gnu/grub
> http://ftp.gnu.org/gnu/gzip
> http://anduin.linuxfromscratch.org/sources/LFS/lfs-packages/conglomeration//iana-etc
> http://ftp.gnu.org/gnu/inetutils
> http://www.kernel.org/pub/linux/utils/net/iproute2
> http://ftp.altlinux.org/pub/people/legion/kbd
> http://www.kernel.org/pub/linux/utils/kernel/kmod
> http://www.greenwoodsoftware.com/less
> http://www.linuxfromscratch.org/lfs/downloads/development
> http://download.savannah.gnu.org/releases/libpipeline
> http://ftp.gnu.org/gnu/libtool
> http://www.kernel.org/pub/linux/kernel/v3.x
> http://ftp.gnu.org/gnu/m4
> http://ftp.gnu.org/gnu/make
> http://download.savannah.gnu.org/releases/man-db
> http://www.kernel.org/pub/linux/docs/man-pages
> http://www.multiprecision.org/mpc/download
> http://www.mpfr.org/mpfr-3.1.2
> http://ftp.gnu.org/gnu/ncurses
> http://ftp.gnu.org/gnu/patch
> http://www.cpan.org/src/5.0
> http://pkgconfig.freedesktop.org/releases
> http://sourceforge.net/projects/procps-ng/files/Production
> http://prdownloads.sourceforge.net/psmisc
> http://ftp.gnu.org/gnu/readline
> http://ftp.gnu.org/gnu/sed
> http://pkg-shadow.alioth.debian.org/releases
> http://www.infodrom.org/projects/sysklogd/download
> http://download.savannah.gnu.org/releases/sysvinit
> http://ftp.gnu.org/gnu/tar
> http://prdownloads.sourceforge.net/tcl
> http://www.iana.org/time-zones/repository/releases
> http://ftp.gnu.org/gnu/texinfo
> http://www.freedesktop.org/software/systemd
> http://anduin.linuxfromscratch.org/sources/other
> http://www.kernel.org/pub/linux/utils/util-linux/v2.23
> ftp://ftp.vim.org/pub/vim/unix
> PHP Warning:  Invalid argument supplied for foreach() in
> /home/alex/.data/lfs_build/a.php on line 26
> http://tukaani.org/xz
> http://www.zlib.net
> sh: -t: command not found

All the files that have an error are ftp.  For some reason the ftp fetch 
part of the script is not working for you.

The problem is the line

$lines = ftp_rawlist ($conn, $path);

is not returning anything.

I still don't know where 'sh: -t' came from.  You do need to change the 
mail command.  Just comment it out and uncomment the echo command just 
before it.

    -- Bruce


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to