Web lists-archives.com

Re: [PHP] Glob issue




On Wed, Jul 15, 2015 at 05:18:37PM -0400, Aziz Saleh wrote:
> On Wed, Jul 15, 2015 at 5:01 PM, The Doctor <doctor@xxxxxxxxxxxxxxxxx>
> wrote:
> 
> > REcently in our php error log we have been seeing
> >
> > [15-Jul-2015 07:16:39 America/Edmonton] PHP Fatal error:  Call to
> > undefined function glob() in /var/www/docs/foreachtest.phtml on line 2
> >
> >
> > And  the foreachtest.phtml read
> >
> >
> > <?php
> > foreach (glob("*.html") as $filename) {
> >     echo "$filename size " . filesize($filename) . "\n";
> > }
> > ?>
> >
> >
> > What is happening?
> >
> > Using php 5.6.11 on Apache 2.2 latest.
> >
> > --
> > Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@
> > nl2k.ab.ca
> > God,Queen and country!Never Satan President Republic!Beware AntiChrist
> > rising!
> > http://www.fullyfollow.me/rootnl2k  Look at Psalms 14 and 53 on Atheism
> > Abuse a man unjustly, and you will make friends for him.  -Edgar Watson
> > Howe
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> Sounds like a bad install. I would suggest you recompile/install PHP, fixes
> such issues most of the times (missing core functionality).

Here are my configuration diectives:


 ./configure \
  --prefix=/usr/contrib \
  --localstatedir=/var \
  --htmldir=/var/www/docs/php \
  --enable-re2c-cgoto  \
  --with-apxs2=/usr/contrib/bin/apxs \
  --with-libxml-dir=/usr/contrib \
  --with-openssl=/usr/contrib \
  --with-zlib=/usr \
  --with-bz2=shared,/usr/contrib  \
   --enable-bcmath \
  --enable-calendar     \
  --with-curl=/usr/contrib \
  --with-db4=/usr/contrib \
  --with-pcre-dir=/usr/contrib \
  --with-openssl-dir=/usr/contrib \
  --with-gd --enable-fpm  \
  --with-gettext=/usr \
  --with-gmp=shared,/usr \
  --with-mhash=/usr \
  --with-imap-ssl=/usr/source/imap-2007f \
  --enable-mbstring \
  --with-onig=/usr/contrib \
  --with-mcrypt=shared,/usr/contrib \
  --with-mysql=/usr/contrib \
  --with-mysqli=/usr/contrib/bin/mysql_config \
  --with-mysql-sock=/tmp/mysql.sock \
  --with-zlib-dir=/usr \
  --with-iodbc=shared,/usr/contrib \
  --with-unixODBC=shared,/usr/contrib \
  --enable-opcache=no --enable-pcntl=no      \
  --with-pdo-mysql=/usr/contrib \
  --with-pgsql=/usr/contrib/pgsql/ \
  --without-mm \
  --disable-sockets    \
  --enable-soap \
  --enable-sysvmsg \
  --enable-sysvsem \
  --enable-sysvshm \
  --with-xsl=shared,/usr/contrib \
  --enable-zip  \
  --with-pcre-dir=/usr/contrib \
  --with-pear=/usr/contrib \
  --with-tsrm-pthreads \
  --enable-shared=yes \
  --enable-static=no \
  --with-gnu-ld \
  --with-pic

Anything I should add?
-- 
Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca
God,Queen and country!Never Satan President Republic!Beware AntiChrist rising! 
http://www.fullyfollow.me/rootnl2k  Look at Psalms 14 and 53 on Atheism
Abuse a man unjustly, and you will make friends for him.  -Edgar Watson Howe

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php