Author Topic: Error trying to launch installer, undefined function in bootstrap.php  (Read 14458 times)

Offline echz

  • Newbie
  • *
  • Posts: 1
Hello all.  I have had several successful installations of Roundcube and love it!  However, I am attempting to figure out what's going on with an installation that I recently upgraded via FreeBSD ports to 1.1.1,1. 

I'm running Apache 2.4 and PHP 5.6.8 on FREEBSD 10.1-p9.  When attempting to go to the installer via http://www.server.com/roundcube/installer/, I am presented with the message: Fatal error: Call to undefined function filter_var() in /usr/local/www/roundcube/program/lib/Roundcube/bootstrap.php on line 46.  I know the filter extension is installed, and this installation was previously working so I'm unsure what could be the cause...

When going to the roundcube base page, I'm just getting a blank white screen with no content at all. 

At first glance, anything else that uses PHP on the system seems to be working correctly, so I'm not sure what could be going on ... If anyone can offer any insight or things to test, that would be awesome as I'd much rather check my email on the roundcube interface instead of via my phone!  THANKS!!

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
There are other peaple with filter extension issue on FreeBSD. Google for "freebsd filter_var php".

Offline kewldaemon

  • Newbie
  • *
  • Posts: 8
Hi folks,

I'm running into the same issue as echz. "Fatal error: Call to undefined function filter_var() in /usr/local/www/roundcube/program/lib/Roundcube/bootstrap.php on line 46"

So far I have been unable to find any useful information from googling "freebsd filter_var php".

FreeBSD 10.0-RELEASE-p18
PHP 5.6.11 (cli) (built: Jul 29 2015 16:23:55)
# php -m | grep -i filter
filter

Roundcube version 1.1.1,1 was working fine until I upgraded to 1.1.1,2

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
filter_var exists in PHP >= 5.2.0.

I see in the info you posted it says "PHP 5.6.11 (cli)" but you need to check what version of PHP the webserver is using or (if you webserver runs multiple versions of PHP) what version of PHP the server is configured to run for the roundcube website.

An easy way would be to put a phpinfo() file into the roundcube root and then check what it reports.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline kewldaemon

  • Newbie
  • *
  • Posts: 8
Thanks JohnDoh.

https://www.myserver.com/roundcube/info.php

SERVER_SOFTWARE  Apache/2.4.16 (FreeBSD) OpenSSL/1.0.1l-freebsd PHP/5.6.11 

Please let me know if there is anything else I can provide that may help resolve this.

Thanks.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development

Offline kewldaemon

  • Newbie
  • *
  • Posts: 8
Thanks SKaero, but I have the filter extension installed. From my initial post:

# php -m | grep -i filter
filter

Also
# pkg info php5\* |grep filter
php56-filter-5.6.11

I even tried reinstalling it.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Hmm, http://php.net/manual/en/filter.installation.php says that the PECL extension is no loner updated maybe its broken with php 5.6.x. You may need to build PHP from source in order to get it to work.

Offline kewldaemon

  • Newbie
  • *
  • Posts: 8
Thanks SKaero. They used PECL prior to PHP 5.2.0. At version 5.2.0 was when they started using the filter extension.

Like I said, Roundcube version 1.1.1,1 was working fine with PHP-5.4.43 and php5-filter-5.4.43.  It wasn't until I upgraded Roundcube to 1.1.1,2. a week or so ago, that it broke. Yesterday I upgraded to PHP 5.6.11 in hopes that would fix the issue. It's almost like the code changed in the bootstap.php file, but then everyone would be having an issue and not just me and one other person. Maybe another FreeBSD user can help shed some light on this.

I'm also open to any other ideas or suggestions.

Thanks,

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
This: https://github.com/roundcube/roundcubemail/commit/fdcef5ef7e20db4241ea6977a1dff15d65464660 was the only code change to bootstrap.php between 1.1.1 and 1.1.2 and that should have caused any problems. If you create a php file in the Roundcube directory with the following code was does it output?
Code: [Select]
<?php
filter_var
('true'FILTER_VALIDATE_BOOLEAN);

Offline kewldaemon

  • Newbie
  • *
  • Posts: 8
Re: Error trying to launch installer, undefined function in bootstrap.php
« Reply #10 on: July 30, 2015, 02:54:37 PM »
http://www.myserver.com/roundcube/testbootstrap.php gets "The website cannot display the page  HTTP 500".

The http-error.log has the following:

PHP Fatal error:  Call to undefined function filter_var() in /usr/local/www/roundcube/testbootstrap.php on line 2

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Error trying to launch installer, undefined function in bootstrap.php
« Reply #11 on: July 30, 2015, 03:45:07 PM »
So that means its not in anyway a Roundcube problem so the FreeBSD forum maybe able to help better. Just to confirm you did also check the the filter extension is being loaded in the php config right?

Offline kewldaemon

  • Newbie
  • *
  • Posts: 8
Re: Error trying to launch installer, undefined function in bootstrap.php
« Reply #12 on: July 30, 2015, 03:57:27 PM »
It appears to be loaded, yes.

# cat /usr/local/etc/php/extensions.ini |grep filter
extension=filter.so

Let me reiterate, Roundcube version 1.1.1,1 was working fine with PHP-5.4.43 and php5-filter-5.4.43.  It wasn't until I upgraded Roundcube to 1.1.2,1 . a week or so ago, that it broke. I too believe that something maybe going on with PHP, it just seems a bit odd that I didn't have any problems until I upgraded Roundcube.

Is there anything else you can think of that I could check?

Thanks.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Error trying to launch installer, undefined function in bootstrap.php
« Reply #13 on: July 31, 2015, 12:38:24 AM »
Does restoring a backup of Roundcube 1.1.1 make the problem go away?

Offline kewldaemon

  • Newbie
  • *
  • Posts: 8
Re: Error trying to launch installer, undefined function in bootstrap.php
« Reply #14 on: July 31, 2015, 08:21:48 AM »
I'd have to build it from scratch. I used FreeBSD ports to upgrade it. I'll try it and let you know.

Thanks