Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

12.09.1 throws warnings when php 5.4.11 is launched #113

Open
tacticz opened this issue Mar 13, 2013 · 2 comments
Open

12.09.1 throws warnings when php 5.4.11 is launched #113

tacticz opened this issue Mar 13, 2013 · 2 comments
Assignees

Comments

@tacticz
Copy link

tacticz commented Mar 13, 2013

When using midgard2-php5 12.09.1 with PHP 5.4.11 the following warnings are thrown whenever PHP is started:

PHP Warning: Function registration failed - duplicate name - MidgardSqlContentManager::get_connection in Unknown on line 0

Warning: Function registration failed - duplicate name - MidgardSqlContentManager::get_connection in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - MidgardSqlContentManager::create_job in Unknown on line 0

Warning: Function registration failed - duplicate name - MidgardSqlContentManager::create_job in Unknown on line 0

Downgrading to midgard2-php5 10.05.7 removes the warnings

@ghost ghost assigned piotras Mar 14, 2013
@piotras
Copy link
Member

piotras commented Mar 14, 2013

Is midgard2 extension loaded in ini file and only once? I can not reproduce these warnings with 5.4.8.

@tacticz
Copy link
Author

tacticz commented Mar 14, 2013

Yes, I see it happen on OS X using an Homebrew installation of the components.
The configuration is as follow:


$ php -i

phpinfo()
PHP Version => 5.4.11
...
Configuration File (php.ini) Path => /usr/local/etc/php/5.4
Loaded Configuration File => /usr/local/etc/php/5.4/php.ini
Scan this dir for additional .ini files => /usr/local/etc/php/5.4/conf.d
Additional .ini files parsed => /usr/local/etc/php/5.4/conf.d/ext-intl.ini,
/usr/local/etc/php/5.4/conf.d/ext-midgard2.ini,
/usr/local/etc/php/5.4/conf.d/ext-mongo.ini,
/usr/local/etc/php/5.4/conf.d/ext-xdebug.ini
...


In /usr/local/etc/php/5.4/php.ini
I verified that there is NO uncommented line containing "extension=..."

Each of the (4) /usr/local/etc/php/5.4/conf.d files contains only 2 lines:


$ cat /usr/local/etc/php/5.4/conf.d/ext-intl.ini

[intl]
extension="/usr/local/Cellar/php54-intl/5.4.11/intl.so"


$ cat /usr/local/etc/php/5.4/conf.d/ext-midgard2.ini

[midgard2]
extension="/usr/local/Cellar/php54-midgard2/12.09.1/midgard2.so"


$ cat /usr/local/etc/php/5.4/conf.d/ext-mongo.ini:

[mongo]
extension="/usr/local/Cellar/php54-mongo/1.3.4/mongo.so"


$ cat /usr/local/etc/php/5.4/conf.d/ext-xdebug.ini:

[xdebug]
zend_extension="/usr/local/Cellar/php54-xdebug/2.2.1/xdebug.so"


When using this configuration what I get is:


$ php -v

PHP Warning: Function registration failed - duplicate name - MidgardSqlContentManager::get_connection in Unknown on line 0

Warning: Function registration failed - duplicate name - MidgardSqlContentManager::get_connection in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - MidgardSqlContentManager::create_job in Unknown on line 0

Warning: Function registration failed - duplicate name - MidgardSqlContentManager::create_job in Unknown on line 0
PHP 5.4.11 (cli) (built: Feb 28 2013 14:57:11)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans


Changing /usr/local/etc/php/5.4/conf.d/ext-midgard2.ini to:


[midgard2]
extension="/usr/local/Cellar/php54-midgard2/10.05.7/midgard2.so"


And warnings are gone:


$ php -v

PHP 5.4.11 (cli) (built: Feb 28 2013 14:57:11)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans


Hope this helps :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants