Project

General

Profile

Actions

Bug #15970

closed

EM leaves mirror* files on failure

Added by Dmitry Dulepov over 18 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Extension Manager
Target version:
-
Start date:
2006-04-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If EM fails to load a list of mirror, it leaves mirror* file in the typo3temp. Thus after 10 displays of "Settings" page there will be 10 empty mirror* files. Not critical but unpleasant.

This happens on RC2 code, not sure about recent CVS version.

(issue imported from #M3097)


Files

bug-3097.patch (3.38 KB) bug-3097.patch Administrator Admin, 2006-04-03 10:56

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #15969: EM does not work if allow_url_open = offClosedKarsten Dambekalns2006-04-02

Actions
Actions #1

Updated by Karsten Dambekalns over 18 years ago

This is the code:
t3lib_div::writeFile($mfile, $mirrorsFile);
$mirrors = implode(gzfile($mfile));
t3lib_div::unlink_tempfile($mfile);

I cannot see immediately when this leaves a file behind. Do you have any further information?

Actions #2

Updated by Dmitry Dulepov over 18 years ago

No. I found this when allow_url_fopen was off and curl was disabled. I got new mirror* file each time. Here is a partial content of this folder with permissions:

beauty:~ # ls -al /srv/www/web1/web/typo3temp
total 1310
drwxrwxr-x    8 root   apache   2640 Apr  3 08:52 .
drwxrwxr-x   13 root   web1      752 Apr  2 18:57 ..
drwxrwxr-x    2 root   apache    240 Apr  2 16:10 GB
drwxr-xr-x  250 apache apache   6000 Apr  2 14:41 cache_pages
drwxr-xr-x    2 apache apache    200 Apr  2 15:23 cs
-rw-r--r--    1 apache apache 497699 Apr  3 08:49 extensions.bin
-rw-r--r--    1 apache apache 485533 Apr  3 08:49 extensions.xml.gz
drwxr-xr-x    2 apache apache  16008 Apr  3 08:52 llxml
-rw-------    1 apache apache      0 Apr  2 22:41 mirrors3NsEt0
-rw-------    1 apache apache      0 Apr  2 22:32 mirrors3j9s04
-rw-------    1 apache apache      0 Apr  2 22:42 mirrors3s3oxM
-rw-------    1 apache apache      0 Apr  2 22:48 mirrors3wdsD7
-rw-------    1 apache apache      0 Apr  2 22:30 mirrorsC5qPlj
-rw-------    1 apache apache      0 Apr  2 22:48 mirrorsO5tu8x
-rw-------    1 apache apache      0 Apr  2 22:30 mirrorsaAy8YN
-rw-------    1 apache apache      0 Apr  2 22:31 mirrorscePRxO
-rw-------    1 apache apache      0 Apr  2 22:31 mirrorsd3m2lv
-rw-------    1 apache apache      0 Apr  2 22:31 mirrorslwPhUN
-rw-------    1 apache apache      0 Apr  2 22:42 mirrorspud6CP
-rw-------    1 apache apache      0 Apr  2 22:40 mirrorsscxeDU
-rw-------    1 apache apache      0 Apr  2 22:31 mirrorssjwb0D
drwxr-xr-x    2 apache apache   1456 Apr  3 06:47 pics
Actions #3

Updated by Karsten Dambekalns over 18 years ago

Ah, one never stops learning. tempnam not only returns a filename, but actually creates the file. So I needed to add another unlink call. See attached patch (which adds clearer error messages, too).

Actions #4

Updated by Dmitry Dulepov over 18 years ago

I would only change "allow_url_fopen not allowed, curl not enabled" to "allow_url_fopen is off, curl is not enabled in Install tool". Otherwise looks great! :)

Actions #5

Updated by Karsten Dambekalns over 18 years ago

The suggested change will be put into the patch.

Actions

Also available in: Atom PDF