freepbx fails with php errors [UPDATE]

David Koski david at kosmosisland.com
Thu Aug 14 05:15:20 UTC 2008


I fixed the includes:

# diff page.index.php.ORIGINAL page.index.php
471,473c471,473
< define("APP_ROOT", '/usr/share/phpsysinfo/includes');
< include APP_ROOT."/common_functions.php";
< include APP_ROOT."/os/class.".PHP_OS.".inc.php";
---
> define("APP_ROOT", '/usr/share/phpsysinfo');
> include APP_ROOT."/includes/common_functions.php";
> include APP_ROOT."/includes/os/class.".PHP_OS.".inc.php";

There is a new error:

Fatal error: Call to undefined method Error::singleton() 
in /usr/share/phpsysinfo/includes/common_functions.php on line 52

I noticed that the class 
file /usr/share/phpsysinfo/includes/class.Error.inc.php has an Error class 
with a method singleton() so I copied the code to 
dashboard/class.error.inc.php:

# diff class.error.inc.php.ORIGINAL class.error.inc.php
17a18,38
>   /**
>    * holds the instance of this class
>    *
>    * @access private
>    * @static
>    * @var object
>    */
>   private static $instance;
>   /**
>    * Singleton function
>    *
>    * @access public
>    * @return object instance of the class
>    */
>   public static function singleton() {
>     if (!isset(self::$instance)) {
>       $c = __CLASS__;
>       self::$instance = new $c;
>     }
>     return self::$instance;
>   }

Now it works.  Comments please?

Regards,
David Koski
dkoski at sutinen.com

--

Hello,

This problem has not been resolved as of version 2.4.0~dfsg-0.5751:

# dlocate -l freepbx | grep ^ii
ii  asterisk-config-freepbx                2.4.0~dfsg-0.5751                      
FreePBX - config files for the Asterisk PBX
ii  asterisk-sounds-moh-freepbx            2.4.0~dfsg-0.5751                      
music-on-hold files for the Asterisk PBX
ii  freepbx                                2.4.0~dfsg-0.5751                      
web-based management interface for the Aster
ii  freepbx-common                         2.4.0~dfsg-0.5751                      
FreePBX administration panel
ii  freepbx-modules                        2.4.0~0.5993                           
modules for FreePBX - a web-based GUI for As
ii  freepbx-mysql                          2.4.0~dfsg-0.5751                      
FreePBX - MySQL (4 or 5) support
ii  freepbx-panel                          2.4.0~dfsg-0.5751                      
Asterisk Flash operator panel - FreePBX inte
ii  freepbx-sounds-extra                   2.4.0~dfsg-0.5751                      
extra sounds for FreePBX

If someone gave me a clue where to go with this I would appreciate it.

Best Regards,
David Koski
dkoski at sutinen.com

On Thursday 24 July 2008 01:05, Tzafrir Cohen wrote:
> Hi David,
>
> Thanks for your report,
>
> On Wed, Jul 23, 2008 at 08:55:23PM -0700, David Koski wrote:
> > Access to the url <freepbx_server_ip>/freepbx/ yields the following
> > error:
> >
> > Warning:
> > require_once(/usr/share/phpsysinfo/includes/includes/os/class.parseProgs.
> >inc.php) [function.require-once]: failed to open stream: No such file or
> > directory in /usr/share/phpsysinfo/includes/os/class.Linux.inc.php on
> > line 27
> >
> > Fatal error: require_once() [function.require]: Failed opening required
> > '/usr/share/phpsysinfo/includes/includes/os/class.parseProgs.inc.php'
> > (include_path='.:/usr/share/php:/usr/share/pear') in
> > /usr/share/phpsysinfo/includes/os/class.Linux.inc.php on line 27
> >
> > After changing line 27 of class.Linux.inc.php from this:
> >
> > require_once (APP_ROOT . '/includes/os/class.parseProgs.inc.php');
> >
> > ..to this:
> >
> > require_once (APP_ROOT . '/os/class.parseProgs.inc.php');
> >
> > ii  asterisk-sounds-moh-freepbx            2.3.1~dfsg-0.5650             
> >         music-on-hold files for the Asterisk PBX ii  freepbx             
> >                   2.3.1~dfsg-0.5650                      web-based
> > management interface for the Aster ii  freepbx-common                    
> >     2.3.1~dfsg-0.5650                      FreePBX administration panel
> > ii  freepbx-modules                        2.3.0.5649                    
> >         modules for FreePBX - a web-based GUI for As ii  freepbx-mysql   
> >                       2.3.1~dfsg-0.5650                      FreePBX -
> > MySQL (4 or 5) support ii  freepbx-panel                         
> > 2.3.1~dfsg-0.5650                      Asterisk Flash operator panel -
> > FreePBX inte ii  freepbx-sounds-extra                   2.3.1~dfsg-0.5650
> >                      extra sounds for FreePBX
>
> I believe that this issue is fixed with latest freepbx/freepbx-modules
> packages (using proper include of the system phpsysinfo). Could you try
> those?
>
> Note that those are 2.4 packages.



More information about the Pkg-voip-maintainers mailing list