[FLOW3-general] Exception when executing 'flow3 cache flush' and opening welcome page
Thomas Fritz
fritztho at gmail.com
Mon Feb 1 16:13:15 CET 2010
I could workaround the problem. After modifing the 'remove()' method
in F3\FLOW3\Cache\Backend\FileBackend.php FLOW3 works as expected.
/**
* Removes all cache entries matching the specified identifier.
* Usually this only affects one entry.
*
* @param string $entryIdentifier Specifies the cache entry to remove
* @return boolean TRUE if (at least) an entry could be removed or
FALSE if no entry was found
* @author Robert Lemke <robert at typo3.org>
* @api
*/
public function remove($entryIdentifier) {
$pathAndFilename = $this->cacheDirectory . $entryIdentifier;
if (!file_exists($pathAndFilename)) return FALSE;
if (unlink ($pathAndFilename) === FALSE) return FALSE;
$tagFilesByEntry = $this->findTagFilesByEntry($entryIdentifier);
if(false === $tagFilesByEntry) return FALSE;
foreach($tagFilesByEntry as $pathAndFilename) {
if (!file_exists($pathAndFilename)) return FALSE;
if (unlink ($pathAndFilename) === FALSE) return FALSE;
}
$this->systemLogger->log(sprintf('Cache %s: removed entry "%s".',
$this->cacheIdentifier, $entryIdentifier), LOG_DEBUG);
return TRUE;
}
I have added a check if findTagFilesByEntry returns false. Because
this triggered the error in remove.
But i think it normally should return an empty array, but in my case
it returns false - so i think glob is triggering an error.
Does someone know why this happens?
Thanks
On Sat, Jan 30, 2010 at 13:25, Thomas Fritz <fritztho at gmail.com> wrote:
>
> On Thu, Jan 28, 2010 at 16:14, Thomas Fritz <fritztho at gmail.com> wrote:
>
> > Hi everybody!
> >
> > I just updated to Rev. 3781 and i get some errors. This error happened
> > before but only when i updated FLOW3 and i didn't flushed the cache manually
> > (rm -rf Data/Temporary/*). But now it happens anytime.
> > It is a clean checkout without any packages from me, No Configuration
> > changes. The only thing i have patched is the Environment.php and the
> > .htaccess as described in http://forge.typo3.org/issues/show/3029 . ( By
> > the way, when gets this Issue fixed? )
> > Below are the steps to reproduce it:
> >
> > developer at wda ~/vhosts/flow3/www $ ./flow3 cache flush
> >
> >
> > Uncaught Exception in FLOW3 #1: Warning: Invalid argument supplied for
> > foreach() in
> > /home/developer/vhosts/flow3/www/Packages/Framework/FLOW3/Classes/Cache/Backend/FileBackend.php
> > line 197
> >
> > thrown in file Packages/Framework/FLOW3/Classes/Error/ErrorHandler.php
> >
> > in line 82
> >
> >
> > developer at wda ~/vhosts/flow3/www $ rm -rf Data/Temporary/*
> >
> >
> >
> > developer at wda ~/vhosts/flow3/www $ ./flow3 cache flush
> >
> >
> > Uncaught Exception in FLOW3 #1: Warning: Invalid argument supplied for
> > foreach() in
> > /home/developer/vhosts/flow3/www/Packages/Framework/FLOW3/Classes/Cache/Backend/FileBackend.php
> > line 197
> >
> > thrown in file Packages/Framework/FLOW3/Classes/Error/ErrorHandler.php
> >
> > in line 8
> >
> >
> >
> > When opening http://dev.flow3.wda.local/ ( Development Context ) the same
> > Exception gets thrown. (see attachment Screenshot)
> >
> >
> >
> > I also tried to remove the whole Data Directory and the i did a svn update
> > to get a fresh checkout, but the same error happened.
> >
> >
> > When opening the same Production Context the welcome site works as
> > expected.
> >
> >
> > Thanks for working on FLOW3 guys anyway. I am very impressed by your work!
> >
> >
> > Greetz
> >
> > Thomas
> >
>
>
> Hi everybody!
>
> I have done a complete new checkout yesterday and i get the same error, but
> only in Development Context. In Production Context the welcome page shows
> up as expected. I have also tried to expand the permissions for the files
> (644) and directories (755). But didn't help either.
>
>
> Development Server Details:
>
> Linux wda 2.6.31-gentoo-r6 #15 Wed Jan 20 19:51:00 CET 2010 i686 Intel(R)
> Core(TM)2 Duo CPU T7700 @ 2.40GHz GenuineIntel GNU/Linux
> www-servers/apache-2.2.14-r1 suexec threads mpm_worker
> dev-db/mysql-5.0.84-r1
> www-apache/mod_fcgid-2.2
> php-5.3.1
>
> configure statement:
> './configure' \
> '--prefix=/usr/lib/php-5.3.1' \
> '--host=i686-pc-linux-gnu' \
> '--mandir=/usr/lib/php-5.3.1/man' \
> '--infodir=/usr/lib/php-5.3.1/info' \
> '--sysconfdir=/etc' \
> '--cache-file=./config.cache' \
> '--with-pcre-regex=/usr' \
> '--enable-cli' \
> '--enable-cgi' \
> '--with-config-file-path=/etc/php/cgi-php-5.3.1' \
> '--with-config-file-scan-dir=/etc/php/cgi-php-5.3.1/ext-active' \
> '--with-pear' \
> '--enable-bcmath' \
> '--with-bz2' \
> '--enable-calendar' \
> '--with-curl' \
> '--without-curlwrappers' \
> '--enable-exif' \
> '--disable-ftp' \
> '--without-gettext' \
> '--without-gmp' \
> '--disable-ipv6' \
> '--without-kerberos' \
> '--enable-mbstring' \
> '--with-mcrypt' \
> '--with-mhash' \
> '--without-mssql' \
> '--with-openssl' \
> '--with-openssl-dir=/usr' \
> '--enable-pcntl' \
> '--without-pgsql' \
> '--without-pspell' \
> '--without-recode' \
> '--disable-shmop' \
> '--without-snmp' \
> '--enable-soap' \
> '--enable-sockets' \
> '--without-sybase-ct' \
> '--enable-sysvmsg' \
> '--enable-sysvsem' \
> '--enable-sysvshm' \
> '--with-tidy' \
> '--enable-wddx' \
> '--with-xmlrpc' \
> '--with-xsl' \
> '--enable-zip' \
> '--with-zlib' \
> '--disable-debug' \
> '--enable-dba' \
> '--with-cdb' \
> '--with-db4' \
> '--with-gdbm' \
> '--without-qdbm' \
> '--with-freetype-dir=/usr' \
> '--with-t1lib=/usr' \
> '--enable-gd-jis-conv' \
> '--with-jpeg-dir=/usr' \
> '--with-png-dir=/usr' \
> '--without-xpm-dir' \
> '--with-gd' \
> '--with-imap' \
> '--with-imap-ssl' \
> '--with-mysql=/usr' \
> '--with-mysql-sock=/var/run/mysqld/mysqld.sock' \
> '--with-mysqli=/usr/bin/mysql_config' \
> '--without-pdo-dblib' \
> '--with-pdo-mysql=/usr' \
> '--without-pdo-odbc' \
> '--without-pdo-pgsql' \
> '--with-pdo-sqlite=/usr' \
> '--with-readline' \
> '--without-libedit' \
> '--without-mm' \
> '--with-sqlite=/usr' \
> '--enable-sqlite-utf8'
>
>
>
>
> Any Ideas?
>
> Thanks for helping.
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list