I received email from cronjob saying that there was PHP module already loaded:
PHP Warning: ย Module 'mysql' already loaded in Unknown on line 0
This warning happens when there is PHP extension loaded more than once. To fix this problem, check /etc/php5/apache2/php.ini file and the corresponding module configuration file in /etc/php5/conf.d/. For mysql module, I found it loaded 2 times in /etc/php5/apache2/php.ini and /etc/php5/conf.d/mysql.ini. Deactivate one module will settle the problem.
I also found that mysql.so extension is loaded 2 times on /etc/php5/cli/php.ini and /etc/php5/cli/conf.d/mysql.ini
I put ; (semi colon)ย in front of the line in /etc/php5/conf.d/mysql.ini
Thanks!!!!
I resolved my problem!!!! ๐
Thanks, you saved my day
But why it’s was happening only in cronjob? do you know?
Ubuntu has cronjob to check PHP modules regularly. If a problem found, such as multiple module loaded, it will send email notification to server administrator.
Thanks for your reply ๐
@Reza
The cron is probably using wget -O. An alternative Cron command line command that is safer to use is lynx -source instead of wget -O. You would simply replace the wget command line with lynx -source.
I’m wondering why you chose to disable the conf.d instance, and not the apache one.
The reason I ask is conf.d is linked (in my case anyway) to several sub php instances (apache2, cli, cgi, )
So essentially the choice was to disable the mysql extension ‘globally’ as opposed to per instance.
I’m not an expert here (looking for reasoning so I can attempt intelligent decision making in the future..) just wanted to understand the justification.
Thanks so much.. by the way this indeed solved my issue.
Thanks in advance,
giz
My reason is because I’m using EHCP (easy hosting control panel) which has script to check php.ini for mysql.so extension. If there is no mysql.so in php.ini, the EHCP script will say no MySQL is running. If you don’t use EHCP, you can disable the php.ini record and keep the one in conf.d.
Thank you, i found another instance, but can’t figure it out how it came there :).
Thanks
Thanks, it’s work for me. But module was “pcntl” I commented the extra line.
Great ๐
Hi, thanks a lot. it works perfectly
gracias mil gracias… solo esto era el problema…
PHP Warning: Module ‘mongodb’ already loaded in Unknown on line 0
It worked for me too! (mssql module). Thanks.