php: extensions.ini

Hi all,

Each time I update ports/php5, it appears that php/extensions.ini is updated with -- no surprise -- the list of extensions.

Each time this happens, however, many of the entry lines get duplicated (it would seem the update processes appends the list of entries to the existing file rather than rewriting it). This may not be a fatal error, but one of my cron jobs runs a php script every 15 minutes and I then get spammed by error messages, ie:
Code:
PHP Warning: Module 'bz2' already loaded in Unknown on line 0
I can fix this by piping the ini file through sort and uniq to remove the duplicate lines, but this a nuisance to do every time the php5 port is updated. Can someone suggest a more permanent fix?

Thanks
 
Thanks, but you don't seem to understand problem. Commenting out stuff won't fix this.

Currently, the .ini file is correct and php runs fine (no errors in the cronjob).

However, next time I update the port, the process will, I assume, again append the list of extensions to the existing file and the problem will return.
 
I don't know if there's another solution. But extensions.ini has a strange behaviour. Sometimes I had also the "problem". Another time nothing changed after update. And sometimes I had to add a module. Seems it depends on the modules which are installed.
 
I always copy extensions.ini to extensions.ini.bak and revert it after the upgrade. The reason is that when you upgrade, the extensions are appended to that file.
 
Back
Top