Internal server error

After a change to the blue network a get an internal server error, when I call the WLanAP menu item. In the error log I find this entry:

Undefined subroutine &Network::get_intf_by_address called at /srv/web/ipfire/cgi-bin/wlanap.cgi line 85.
[Mon Aug 23 14:41:12.093190 2021] [cgid:error] [pid 15804:tid 135806463211072] [client 192.168.xxx.20:53400] End of script output before headers: wlanap.cgi, referer: https://192.168.xxx.1:444/

How can I fix it?

What release are you on? Are you on 159?

The same here, but it’s the OpenVPN Menu:

[Mon Aug 23 19:48:36.065014 2021] [cgid:error] [pid 2861:tid 134595148215872] [client 192.168.10.13:43680] End of script output before headers: ovpnmain.cgi, referer: https://192.168.XXX.XX:444/

Release is 159

Http-Server says:

Requests with error response codes
500 Internal Server Error
/cgi-bin/ovpnmain.cgi: 4 Time(s)
/cgi-bin/vpnmain.cgi: 2 Time(s)

Hi,

@krause:

This is a subroutine from /var/ipfire/network-functions - please check this file (contents, rights).

@hico:
/var/log/httpd/error_log should contain some more information about this error (line?).

HTH,
Matthias

@mfischer

Oh, I forgot the rest of the log:

Global symbol “@casubject” requires explicit package name (did you forget to declare “my @casubject”?) at /srv/web/ipfire/cgi-bin/ovpnmain.cgi line 1491.
Global symbol “@casubject” requires explicit package name (did you forget to declare “my @casubject”?) at /srv/web/ipfire/cgi-bin/ovpnmain.cgi line 1494.
syntax error at /srv/web/ipfire/cgi-bin/ovpnmain.cgi line 2520, near “”${General::swroot}/ovpn/openssl/ovpn.cnf)“;”
Bareword “ovpn” not allowed while “strict subs” in use at /srv/web/ipfire/cgi-bin/ovpnmain.cgi line 1229.

I resolved my Problem with downloading the 159 install image.
Extract the 2 *vpn.cgi files and copied it to the Fire. Both files had different filesizes.
Now it works.

Greetz
Heiko

I’m using release 153. Yes, I know that is not the latest version. But with a later version (155?) I had problems with my telephony, because the application layer gateway was removed. So I switched back to release 153.
I will try Heiko’s solution with the 2 cgi-files. I will report.

My fire works under the 159 Release.
If you want to change files, take them from the Image of your installed (153) release.

Any idea why those two files have been edited? We did not have any release out with any of those problems.

Hi @hico
If you still have the old files then you could run a diff between them and the replacement files to see what the differences are.

1 Like

Hi @krause

Your error message was from wlanap.cgi and not from ovpnmain.cgi so I would not expect changing the ovpnmain.cgi file will influence the error you had with wlanap.cgi

@mfischer mentioned that

What did you find for the permissions and ownership of that file. My version has the following:-

-rw-r--r-- 1 nobody nobody 16K Jun 21 22:45 /var/ipfire/network-functions.pl

No idea what happened to these two files. The date of the files was something from August 2020 and the size was smaller.
Since I thought it could use an update.

Unfortunately, since the files did not work, I overwrote them without saving theold ones.
Was just an attempt. Sorry.

I took the file wlanap.cgi from release 154 and it works, i.e. I get a website. But now I have another problem:

Direct firmware load for ath10k/QCA988X/hw2.0/firmware-6.bin failed with error -2

I guess the best way is to reinstall IPFire from scratch…