问题
Im getting the following on my developer machine.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/gd.so' - /usr/lib/php5/20100525/gd.so: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/mcrypt.so' - /usr/lib/php5/20100525/mcrypt.so: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/mysql.so' - /usr/lib/php5/20100525/mysql.so: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/mysqli.so' - /usr/lib/php5/20100525/mysqli.so: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/pdo_mysql.so' - /usr/lib/php5/20100525/pdo_mysql.so: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/imagick.so' - /usr/lib/php5/20100525/imagick.so: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0
Any ideas on what is going on here? I'm running mediawiki and for each pageload these warnings appear.
The files referenced in the warning messages exists and i've tried raising the memory_limit directive in php.ini to no avail. Any suggestions on how i can proceed with this?
Regardless of these warnings, the web application seems to take no harm.
回答1:
Same issue here. This seems to be related to MediaWiki 1.21. I upgraded a Wiki from 1.20 to 1.21 without changing any installed packages, and get this error too.
Image thumbnails are not being generated neither with rsvg nor with ImageMagick anymore.
If I roll back to 1.20, things work again.
Update
So I have tried to fix the issue here, and the only thing which worked was to downgrade to MediaWiki 1.20.6, where conversions of images to other sizes or formats for SVG images works with all supported converters.
If you do not have a backup of your database before the upgrade, you can use Special:Export to dump all pages, and import that into an empty installation.
回答2:
I believe you need to raise $wgMaxShellMemory in LocalSettings.php (eg. $wgMaxShellMemory = 512000;)
Please read: $wgMaxShellMemory
Miscellaneous settings: $wgMaxShellMemory
Maximum amount of virtual memory available to shell processes under Linux, in KB.
Introduced in version: 1.7.0 (r14795)
Removed in version: still in use Allowed values: (integer)
Default value: 102400
Update: This solved my issue.
回答3:
Hope this will solve your problem
look at php.ini
look for something like this
;extension=pdo_sqlite.so
;extension=sqlite.so
Just comment it out:
extension=pdo_sqlite.so
extension=sqlite.so
来源:https://stackoverflow.com/questions/16981347/php-warning-php-startup-unable-to-load-dynamic-library-failed-to-map-seg