Could not work out exact PHP version

HELP, For a while now I can not do anything more upgrades or installations of new scripts in my server virtualmin. Only this week I noticed the error ".. failed dependencies : Could not work out exact PHP version". How can you help me? recently renewed my license and increased the amount of domains. I am in desperate need of help. Fernando.

Status: 
Active

Comments

Howdy -- hmm, that's an unusual error!

What is the output of these two commands:

which php
php -v

Also, is this problem with just one Virtual Server?

Or does this problem occur with all your Virtual Servers?

OK,

root: which php

/usr/bin/php

root: php -v

PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0 PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261900 bytes) in Unknown on line 0

occur with all my Virtual Servers !!

Ah, it looks like PHP is running out of memory, even while just getting the PHP version number.

What output do these two commands produce:

grep memory_limit /etc/php.ini
ls /etc/php.d

Also, what does the free command output on your system?

[root@jupter ~] grep memory_limit /etc/php.ini memory_limit = 64MB

[root@jupter ~] ls /etc/php.d curl.ini gd.ini mbstring.ini mysql.ini pdo_mysql.ini pdo_sqlite.ini snmp.ini xmlrpc.ini zip.ini dom.ini imap.ini mcrypt.ini odbc.ini pdo_odbc.ini pgsql.ini wddx.ini xmlwriter.ini fileinfo.ini json.ini mysqli.ini pdo.ini pdo_pgsql.ini phar.ini xmlreader.ini xsl.ini

[root@jupter ~] free total used free shared buffers cached Mem: 2097152 1940208 156944 0 406608 541844 -/+ buffers/cache: 991756 1105396 Swap: 4128760 1360 4127400

I suspect that combination of modules may be causing PHP to use more RAM than it's allowed to use.

Try editing /etc/php.ini, and setting "memory_limit" to a higher number -- perhaps 128M for starters, but maybe 256M if that doesn't help.