Regression #13570
closed
pfSense - Feature #13446: Upgrade PHP from 7.4 to 8.1
openvpn-client-export php error in 2.7
Added by John Doe about 2 years ago.
Updated about 2 years ago.
Category:
OpenVPN Client Export
Plus Target Version:
23.01
Description
Greeting,
opening the Client Export Utility with pfSense 2.7 throws a php-Error:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/vpn_openvpn_export.php:456 Stack trace: #0 {main} thrown in /usr/local/www/vpn_openvpn_export.php on line 456 PHP ERROR: Type: 1, File: /usr/local/www/vpn_openvpn_export.php, Line: 456, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/vpn_openvpn_export.php:456 Stack trace: #0 {main} thrown
- Tracker changed from Bug to Regression
- Project changed from pfSense to pfSense Packages
- Category changed from OpenVPN to OpenVPN Client Export
- Release Notes deleted (
Default)
- Status changed from New to Feedback
- Assignee set to Christian McDonald
- Target version set to 2.7.0
- Plus Target Version set to 23.01
Greetings,
fyi:
I just updated to the newest Version 2.7.0.a.20221018.0600 and got a different php Error:
Parse error: Unmatched '}' in /usr/local/www/vpn_openvpn_export.php on line 463
Hi, thanks for the feedback. This should be resolved in the next build. I also saw another potentially problematic config access that was also likely to have issues under PHP8.1. I fixed that one as well.
Hi,
I just updated to the newest Version an it looks good. Client-Export seems to work now.
Shared Key Export still throws the following Error:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/vpn_openvpn_export_shared.php:200 Stack trace: #0 {main} thrown in /usr/local/www/vpn_openvpn_export_shared.php on line 200 PHP ERROR: Type: 1, File: /usr/local/www/vpn_openvpn_export_shared.php, Line: 200, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/vpn_openvpn_export_shared.php:200 Stack trace: #0 {main} thrown
But so far as i know shared-key is not supported any longer, so the feature could be considered decrepit.
Anyway good Job!
- Status changed from Feedback to Resolved
OpenVPN Client Export throws no PHP errors now in my testing either. Closing as Resolved.
- Status changed from Resolved to New
There's still some access issues - visiting vpn_openvpn_export.php
gives the following error on the latest version:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/vpn_openvpn_export.php:449 Stack trace: #0 {main} thrown in /usr/local/www/vpn_openvpn_export.php on line 449 PHP ERROR: Type: 1, File: /usr/local/www/vpn_openvpn_export.php, Line: 449, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/vpn_openvpn_export.php:449 Stack trace: #0 {main} thrown
Marcos M wrote in #note-8:
There's still some access issues - visiting vpn_openvpn_export.php
gives the following error on the latest version:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/vpn_openvpn_export.php:449 Stack trace: #0 {main} thrown in /usr/local/www/vpn_openvpn_export.php on line 449 PHP ERROR: Type: 1, File: /usr/local/www/vpn_openvpn_export.php, Line: 449, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/vpn_openvpn_export.php:449 Stack trace: #0 {main} thrown
I can't reproduce this. It's a different case than the original issue here. I'll need to see the contents of the OpenVPN package section of the config.xml on there (the part corresponding to $config['installedpackages']['vpn_openvpn_export']
) or at least get more concrete information on how to reproduce it specifically. Feels like that should be a new/fresh issue though since it's unrelated except that it happens to be the same sort of error.
- Status changed from New to In Progress
- Assignee changed from Christian McDonald to Jim Pingle
OK, with the supplied configuration from Marcos I could reproduce it and worked up a fix. Commit coming shortly.
- Status changed from In Progress to Feedback
Should be fixed in pkg v1.7_3 and v1.6_8
- Status changed from Feedback to Resolved
Tested and it's working - thanks! Marking resolved.
- Parent task set to #13446
- % Done changed from 0 to 100
Also available in: Atom
PDF