Error pfSense update 2.1.5 to 2.2.2 openvpn



  • I update an OpenVPN server, pfSense 2.1.5 to 2.2.2 .. the vpn is working, however no access via gui

    openvpn running in this update

    Fatal error: Can't use function return value in write context in /usr/local/www/vpn_openvpn_server.php on line 805
    


  • Hmmm - I wrote that code:

    // If no authmodes set then default to selecting the first entry in auth_servers
    if (empty($authmodes[0]) && !empty(key($auth_servers)))
    	$authmodes[0] = key($auth_servers);
    

    I think it is complaining about doing !empty(key($auth_servers))
    Prior to PHP 5.5 that would not work, you had to give "empty()" an actual variable to work with.
    http://php.net/manual/en/function.empty.php
    On pfSense 2.2.2 there is:

    PHP 5.5.23
    

    I can't replicate the error message on my 2.2.2 system. Is there something unusual about your PHP version? Can you go to a command prompt and do:

    php --version
    

    and post what it reports.



  • I am getting the same error and my version shows 5.5.23.  For reference, I have installed 2 identical machines in Hyper-V.  1 machine installed and shows the openvpn page fine.  The other does not.  They are fresh installs.  Both from the same ISO.



  • I think I'm experiencing the same issue.  My openVPN connections created before the upgrade seem to work fine but when I click on openVPN from the VPN dropdown I get the following error:

    Fatal error: Can't use function return value in write context in /usr/local/www/vpn_openvpn_server.php on line 805

    I'm also showing php version 5.5.23

    any help would be greatly appreciated.

    Tim



  • Those who have this problem, what packages do you have installed?
    Maybe there is some package that is putting some other PHP somewhere that the webGUI server is picking up.



  • Also got this exact error after updating.

    /root: php –version
    PHP 5.5.23 (cgi-fcgi) (built: Mar 27 2015 20:40:34)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
        with Suhosin v0.9.37.1, Copyright (c) 2007-2014, by SektionEins GmbH

    Now, the weird thing is that I rebooted pfSense one more time, and now the error is gone. :

    Thought it might be some session that caused it to bypass the auth-code generating the error.
    So I tried with another browser, private mode, even another computer.
    Nope. The error is still gone.

    Might it be user-related? That you're caching some auth/ACL stuff per user?
    Tried another admin user - the error is still not reproducible.  :o

    This is really odd- I'm glad I'm not the one trying to find the cause.  ::)

    Those of you who've seen this error - can you reproduce it after rebooting your pfSense?



  • That sounds like somehow the upgraded binaries have installed and thus "php –version" shows the new version. But somehow the system has not actually rebooted yet and the web server for the webGUI is still running the old PHP. After a reboot everything starts with the new binaries.
    But I have no idea how the system could be left in such a state. After doing the upgrade, did our system actually reboot?



  • All you need to do is go into the shell portion and type: 11 to Restart webConfigurator, after that it should restore the openvpn portion. Worked for me just fine.