Failed to copy from module agi-bin

Today I decided to install 2.3beta2 over a working 2.2.3 installation.

The FreePBX notices box now gives me an error message:

Failed to copy from module agi-bin

The detail of this error is as follows:

[code:1]Retrieve conf failed to copy file(s) from a module’s agi-bin dir: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method notifications::create() should not be called statically[/code:1]

Unfortunately, there is no detail on which file it had trouble with.

Any suggestions appreciated.

Greg

Same here, looks like the exact same message. No problems noticed yet though, so it may just be an upgrade issue, I’ll delete the alert and see if it comes back.

[code:1]Failed to copy from module agi-bin
Retrieve conf failed to copy file(s) from a module’s agi-bin dir: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
is_a(): Deprecated. Please use the instanceof operator
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method notifications::create() should not be called statically[/code:1]

UPDATE: yes, it came back after making a change and hitting reload. Looks like a persistant issue but I’ve no idea what with.

confirmed. i have it too… has anyone made a ticket yet?

are all of you running php5?

We saw a similar bug on another php5 system, it all relates to is_a() being deprecated, which is not used in any of the FreePBX code so we are trying to hunt it down. On a php4 based system I notice it is used in pear:[code:1][plindheimer@atengo-kirkland 2.3]$ pushd /usr/share/pear
/usr/share/pear /usr/src/freepbx-svn/amportal/freepbx/branches/2.3
[plindheimer@atengo-kirkland pear]$ grep ‘is_a(’ -R .
./PEAR.php: if (is_a($data, ‘PEAR_Error’)) {
./PEAR.php: if (isset($this) && is_a($this, ‘PEAR’)) {
./PEAR.php: if (isset($this) && is_a($this, ‘PEAR’)) {
./PEAR.php: if (isset($this) && is_a($this, ‘PEAR’)) {
./PEAR.php: if (isset($this) && is_a($this, ‘PEAR’)) {
./PEAR.php: if (isset($this) && is_a($this, ‘PEAR’)) {
./DB/common.php: if (is_a($result, ‘DB_result’)) {
./DB.php: return is_a($value, ‘DB_Error’);
./PEAR/Autoloader.php: if (is_a($obj, $classname)) {
./PEAR/Command.php: is_a($GLOBALS[’_PEAR_Command_uiobject’], $uiclass)) {
[/code:1]
But I don’t know what show on a php5 based system (I need to go dig one up and look).

yup, php5.

[code:1]$ php -v
PHP 5.2.0-8+etch7 (cli) (built: Jul 2 2007 21:46:15)
Copyright © 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright © 1998-2006 Zend Technologies[/code:1]

and it does seem to be used once here:

[code:1]
$ cat /usr/share/php/DB.php | grep 'is_a('
return is_a($value, ‘DB_Error’);
[/code:1]

seeing the same thing… and running php5…

can you guys try the following for us please:

in retrieve_conf which you can find in your AMPBIN directory, usually /var/lib/asterisk/bin, you will see as the first three lines of the file:

[code:1]#!/usr/bin/php -q

<?php [/code:1]Can you change it to this (basically add the fourth line below:[code:1]#!/usr/bin/php -q <?php ini_set('display_errors', false); [/code:1] and then tell me what if any errors are still being reported. (I suspect there will probably still be the agi-bin error but hopefully not the others, in which case I'll post a fix that will also remove that one. thanks

btw, more detail here - update the ticket or here as appropriate, I’ll role the fix if you verify the first line gets rid of the other errors.

http://www.freepbx.org/trac/ticket/2138#preview

[quote=“p_lindheimer”]btw, more detail here - update the ticket or here as appropriate, I’ll role the fix if you verify the first line gets rid of the other errors.

http://www.freepbx.org/trac/ticket/2138#preview[/quote]

Failed to copy from module agi-bin

Retrieve conf failed to copy file(s) from a module’s agi-bin dir: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method DB::isError() should not be called statically, assuming $this from incompatible context
Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context
Non-static method notifications::create() should not be called statically

gbutters:
was that with the ini_set(‘display_errors’, false); added?

With that extra line, the error message is still appearing.

Process: Click the button to hide the error message, make a change to a setting and click reload, error returns, check timestamp of error to make sure it’s recent (if it’s very recent it will show “added ago” instead of “added 1 minute ago” or whatever)

[quote=“p_lindheimer”]gbutters:
was that with the ini_set(‘display_errors’, false); added?[/quote]

Yes

when i click on the admin page button, it takes me to the landing page (status), but it seems to be all text?

[quote=“gbutters”][quote=“p_lindheimer”]gbutters:
was that with the ini_set(‘display_errors’, false); added?[/quote]

Yes[/quote]
can you try this line and tell me what results you get:

[code:1]
ini_set(‘error_reporting’, E_ALL & ~E_NOTICE)
[/code:1]
The issue we are running into is a pear bug (we think) in combination with a rather sensitive notice level set on your systems. The bug is not harmful but hte alternative is that we need to pull the whole pear DB library as part of the FreePBX distro and fix their bug, which has disadvantages of its own.

With the first few lines of /var/lib/asterisk/bin/retrieve_conf showing as:

[code:1]
#!/usr/bin/php -q

<?php ini_set('display_errors', false); ini_set('error_reporting', E_ALL & ~E_NOTICE); define("AMP_CONF", "/etc/amportal.conf"); $amportalconf = AMP_CONF; [/code:1] The error is still recreated when the (no longer red) red bar is pressed.

[code:1]
#!/usr/bin/php -q

<?php ini_set('display_errors', false); ini_set('error_reporting', E_ALL & ~E_NOTICE); define("AMP_CONF", "/etc/amportal.conf"); $amportalconf = AMP_CONF; [/code:1] The error is still recreated when the reload bar is pressed. Retrieve conf failed to copy file(s) from a module's agi-bin dir: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context Non-static method DB::isError() should not be called statically, assuming $this from incompatible context Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context Non-static method DB::isError() should not be called statically, assuming $this from incompatible context Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context Non-static method DB::isError() should not be called statically, assuming $this from incompatible context Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context Non-static method DB::isError() should not be called statically, assuming $this from incompatible context Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context Non-static method DB::isError() should not be called statically, assuming $this from incompatible context Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context Non-static method notifications::create() should not be called statically I have also gone through pear and replaced is_a with instanceof.

can you please do the following, assuming the directory below is where you keep retrieve_conf:

[code:1]
cd /var/lib/asterisk/bin
cp retrieve_conf retrieve_conf.original
wget http://mirror.freepbx.org:/retrieve_conf
chown asterisk:asterisk ./retrieve_conf
chmod +x ./retrieve_conf
[/code:1]
Now test with that - and also, you can just type:

[code:1]
./retrieve_conf
[/code:1]
at that point to test and see what errors you are getting. What I sent should get rid of the agi-bin error you are getting - well, kind of, it should at least be more meaningful as to what the issue is. Then let me know what the other warnings are. Also - let me know what OS you are running because I’ve now tested this on Ubuntu Server with PHP5 and I still can’t get the errors (some of which I don’t think are incorrect).

and the errors did go away. i’m on clarkconnect, which is RHEL4.

ok, you should do the online update of Framework 2.3.0beta2.2. It will clean up some of your issues.

several of the other warnings you were running into, mostly from Pear but one from ours, appears to be a result of having a very high level of error warnings on in PHP, mainly E_STRICT. Since the code base works on php4 and php5 - you will see some of these warnings (including the is_a() issue which you should not have to change in the pear library as it still works fine). The warnings are not an issue, it’s just there is a more proper way to do it in php5 which - when we no longer support php4, we can look into cleaning up. You may have to make the change in your php.ini file if the attempt to reset the error level at the top of the retrieve_conf file does not do the trick.

If you are still having issues - let us know and/or post a bug to let us know.

only oddity is the status page says:

The following new modules are available for download
dashboard (0.2.2)

Added 1 days, 5 hours, 10 minutes ago
(freepbx.NEWMODS)

but i’ve got 0.2.4?