Bug #37946
closedextension manager PHP warning on Windows
100%
Description
On my IIS I have such warnings when I click "Check for new updates"
PHP Warning: filemtime(): stat failed for D:/(...)/typo3temp/extensions.xml.gz in D:\(...)\typo3_src\typo3\sysext\em\classes\index.php on line 2466
Line 2466 contains instruction:
filemtime(PATH_site . 'typo3temp/extensions.xml.gz')
So, in order to avoid such messages we need to add @ operator before the filemtime function.
@filemtime(PATH_site . 'typo3temp/extensions.xml.gz')
Updated by Jigal van Hemert over 12 years ago
- Status changed from New to Needs Feedback
Is the complete path correct? The error only shows D:/(...)/typo3temp/extensions.xml.gz (part is replaced with (...)). If the complete path is incorrect the filemtime will always fail. Adding a @ will only mask the real problem.
Updated by Tomasz Krawczyk over 12 years ago
Yes. Real path is correct in this warning. I masked part of the path.
What kind of problem do you suspect?
Updated by Martin Heinemann almost 12 years ago
I get this warning message after an update of the extension list from TER.
PHP Warning: filemtime() [function.filemtime]: stat failed for /pfad/t3/typo3temp/extensions.xml.gz in /pfad/system/typo3_src-4.5.25/typo3/sysext/em/classes/index.php line 2466
The path /pfad/t3/typo3temp is correct. But there is no file extensions.xml.gz in it.
No error message has been shown after the update of the extension list.
Updated by Gerrit Code Review over 11 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/21775
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/21776
Updated by Tomasz Krawczyk over 11 years ago
Guys!
In TYPO3 4.5.29 it is solved.
The
if (is_file(PATH_site . 'typo3temp/extensions.xml.gz')) {
was added and it solves problem. I checked it with Scheduler, old and new EM. So, the bug may be closed and no patch has to be commited.
Updated by Jigal van Hemert over 11 years ago
@Tomasz : I just checked the latest 4.5 source files from git and those in 4.5.29, and in both cases there were no changes regarding this issue. Are you sure you don't use some patched, custom version of 4.5.29?
Updated by Tomasz Krawczyk over 11 years ago
I have correctly symlined 4.5.29. Source taken from typo3_src-4.5.29.tar.gz file. I see a block:
} else { $onCLick = 'window.location.href="' . t3lib_div::linkThisScript(array( 'CMD[fetchMetaData]' => 'extensions' )) . '";return false;'; $content .= $GLOBALS['LANG']->getLL('connect_to_ter') . '<br /> <input type="submit" value="' . $GLOBALS['LANG']->getLL('retrieve_update') . '" onclick="' . htmlspecialchars($onCLick) . '" />'; if (is_file(PATH_site . 'typo3temp/extensions.xml.gz')) { $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']; $timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']; $content .= ' ' . sprintf($GLOBALS['LANG']->getLL('ext_list_last_updated') . ' ', date( $dateFormat . ', ' . $timeFormat, filemtime(PATH_site . 'typo3temp/extensions.xml.gz') ), tx_em_Database::getExtensionCountFromRepository() ); } }
in ..typo3\sysext\em\classes\index.php file.
Maybe it was fixed in another issue.
Updated by Roman Eberle almost 11 years ago
Same issue here, with TYPO3 V4.5.32, running under Linux/apache:
When I go to Extension-Manager -> "Check for extension updates", I get this notification:
PHP Warning: filemtime(): stat failed for (....)/typo3temp/extensions.xml.gz in (....)/typo3_src-4.5.32/typo3/sysext/em/classes/index.php line 2467
and
Last update of the list of extensions: 01-01-70, 01:00.
at the bottom of the page.
This seems really weird to me, because Extension Manager -> "Extension Manager" -> "Remote repository" shows:
Last Update: 13/03/2014 10:08 Extensions in repository: 6251
grepping through .../typo3/sysext/em/classes/index.php I see three lines with filemtime(),
two of which look like this:
filemtime(PATH_site . 'typo3temp/extensions.xml.gz')
and one which looks like this:
filemtime($repoUtility->getLocalExtListFile())
...so I suspect the one with getLocalExtListFile() is the correct one, and the others need to be updated.
UPDATE:
I just edited typo3/sysext/em/classes/index.php:
replacing PATH_site.'typo3temp/extensions.xml.gz' with repoUtility->getLocalExtListFile(), and adding the checks and objects needed (t3lib_div::makeInstance('tx_em_Settings'), t3lib_div::makeInstance('tx_em_Repository_Utility'), etc.).
This fixes the notification at top of page, but doesn't seem to work for the "Version information" at bottom of page.
Looks like settings-Object is empty here, no settings loaded, so no $repoUtility->setRepository($selectedRepo), and as a result no repoUtility->getLocalExtListFile().
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch TYPO3_4-5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/21776
Updated by Gerrit Code Review about 10 years ago
Patch set 3 for branch TYPO3_4-5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/21776
Updated by Jigal van Hemert about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ad8c5c4ce55d4e951e5b3ce689330ab046eb9488.