Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Error pfSense update 2.1.5 to 2.2.2 openvpn

    Scheduled Pinned Locked Moved OpenVPN
    8 Posts 6 Posters 2.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      thiagomespb
      last edited by

      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
      
      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        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.

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • B
          bjefferys
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • T
            tsnider
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • P
              phil.davis
              last edited by

              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.

              As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
              If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

              1 Reply Last reply Reply Quote 0
              • H
                HenrikM
                last edited by

                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?

                1 Reply Last reply Reply Quote 0
                • P
                  phil.davis
                  last edited by

                  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?

                  As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                  If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                  1 Reply Last reply Reply Quote 0
                  • F
                    fmcallister
                    last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.