Hi!
I have a strange issue here. After uploading an image, I (sometimes) get a blank screen. No html in the source at all. The image is there, but there's no proper ok message. Looking into the logs shows this:
PHP Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 74 bytes) in /data/www/htdocs/languages/Language.php on line 2298
I have already tried to increase the memory limit in php.ini, with no success. It happens mostly with bigger images.
Thanks a lot!
André
Hello! Have you restarted apache after changing the settings in php.ini?
-----Ursprüngliche Nachricht----- Von: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] Im Auftrag von Andre Bonhote Gesendet: Dienstag, 8. Juli 2008 10:55 An: MediaWiki announcements and site admin list Betreff: [Mediawiki-l] Upload screen - white!
Hi!
I have a strange issue here. After uploading an image, I (sometimes) get a blank screen. No html in the source at all. The image is there, but there's no proper ok message. Looking into the logs shows this:
PHP Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 74 bytes) in /data/www/htdocs/languages/Language.php on line 2298
I have already tried to increase the memory limit in php.ini, with no success. It happens mostly with bigger images.
Thanks a lot!
André _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi! Yeah, did. I have also added these two lines to LocalSettings.php:
error_reporting( E_ALL ); ini_set( 'display_errors', 1 );
Unfortunately I wasn't able to reproduce the error in the meantime :-/
On Tue, Jul 8, 2008 at 11:38 AM, Heilmannseder Tobias (LVT) < Tobias.Heilmannseder@liebherr.com> wrote:
Hello! Have you restarted apache after changing the settings in php.ini?
Yeah, did. I have also added these two lines to LocalSettings.php:
error_reporting( E_ALL ); ini_set( 'display_errors', 1 );
Unfortunately I wasn't able to reproduce the error in the meantime :-/
If Apache is causing the problem, those lines won't help. It may be that your Apache upload limit is too low.
V/r,
Ryan Lane
Hi again
I have noticed that it doesn't only fail with the upload page, but also with pages like Special:Allmessages. I have checked my php.ini and verified that it's being loaded (phpinfo()). I have set the memory limit to 32M, which should be enough.
Now (right now, in fact) I found the solution. There is one line in LocalSettings.php:
# If PHP's memory limit is very low, some operations may fail. ini_set( 'memory_limit', '20M' );
Apparently, 20M is not enough. I have set it to 32M and now it works.
Any idea how I could save some memory?
Cheers
André
On Tue, Jul 8, 2008 at 3:15 PM, Lane, Ryan Ryan.Lane@ocean.navo.navy.mil wrote:
Yeah, did. I have also added these two lines to LocalSettings.php:
error_reporting( E_ALL ); ini_set( 'display_errors', 1 );
Unfortunately I wasn't able to reproduce the error in the meantime :-/
If Apache is causing the problem, those lines won't help. It may be that your Apache upload limit is too low.
V/r,
Ryan Lane
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Andre Bonhote wrote:
I have noticed that it doesn't only fail with the upload page, but also with pages like Special:Allmessages. I have checked my php.ini and verified that it's being loaded (phpinfo()). I have set the memory limit to 32M, which should be enough.
[snip]
Apparently, 20M is not enough. I have set it to 32M and now it works.
Any idea how I could save some memory?
Note that recent versions of PHP (5.1 or 5.2?) have changed how they account memory in a way which tends to inflate the numbers (or rather, the old counts were too small), so you're more likely to hit problems with a smaller limit than you used it. I'll go ahead and raise the default "bumped" amount...
If your MediaWiki installation is resizing image thumbnails using the internal GD libraries, it's also more likely to hit limits, since the full image gets loaded into PHP-accounted memory. Try installing ImageMagick and switching to it if possible (or just keep the memory limit higher :)
-- brion
2008/7/9 Brion Vibber brion@wikimedia.org:
If your MediaWiki installation is resizing image thumbnails using the internal GD libraries, it's also more likely to hit limits, since the full image gets loaded into PHP-accounted memory. Try installing ImageMagick and switching to it if possible (or just keep the memory limit higher :)
In addition, ImageMagick seems to do nicer thumbnails.
(unspeakably bad for SVGs, though.)
- d.
Thanks. Switched to ImageMagick. Will see how that evolves.
CU
André
On Wed, Jul 9, 2008 at 1:49 AM, David Gerard dgerard@gmail.com wrote:
2008/7/9 Brion Vibber brion@wikimedia.org:
If your MediaWiki installation is resizing image thumbnails using the internal GD libraries, it's also more likely to hit limits, since the full image gets loaded into PHP-accounted memory. Try installing ImageMagick and switching to it if possible (or just keep the memory limit higher :)
In addition, ImageMagick seems to do nicer thumbnails.
(unspeakably bad for SVGs, though.)
- d.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org