leenooks / phpLDAPadmin

phpLDAPadmin - Web based LDAP administration tool
www.phpldapadmin.org
GNU General Public License v2.0
523 stars 166 forks source link

get_magic_quotes_gpc() error #210

Open brendankearney opened 1 year ago

brendankearney commented 1 year ago

Describe the bug Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /usr/share/phpldapadmin/lib/common.php:299 Stack trace: #0 /usr/share/phpldapadmin/htdocs/common.php(13): require_once() #1 /usr/share/phpldapadmin/htdocs/cmd.php(13): require_once('/usr/share/phpl...') #2 /usr/share/phpldapadmin/htdocs/index.php(153): include('/usr/share/phpl...') #3 {main} thrown in /usr/share/phpldapadmin/lib/common.php on line 299

To Reproduce Steps to reproduce the behavior: fresh install of fedora 38, with phpLDAPAdmin package, and all the fixin's copy existing configs from fedora 32 install with PLA v1.2.6.2 browse to new install of PLA, and receive the above error

Expected behavior PLA would display the LDAP tree(s)

Screenshots N/A, no page displays, only the error above

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context i have tried pulling the latest version from git, but that had its own issues. using the packaged version of PLA from fedora 38 (1.2.6.6) results in the error. no work around was able to get things working. i tried turning on debugging and could not get the output file to be written out. seems the error happens before debugging kicks in?

bendem commented 1 year ago

That problem was fixed in 3ec9c23d585826aa29f5f25ac43ca077f5fe5377, which is included in 1.2.6.5 and 1.2.6.6. F38 ships 1.2.6.6 with this fixed so I'd say you weren't running 1.2.6.6 if you had this error.

This is mentioned in #133 and #150.

bendem commented 1 year ago

Also, latest git doesn't even call this function any more. If you provide stacktraces, we can work on solving those too. https://github.com/leenooks/phpLDAPadmin/commit/d1dae60f05d82a12f4631bf764db21c04a2b9a3a

brendankearney commented 1 year ago

ok, so i nuked the box and started over. now, i am getting this:

Deprecated: Creation of dynamic property page::$index is deprecated in /usr/share/phpldapadmin/lib/page.php on line 38

Deprecated: Creation of dynamic property page::$sysmsg is deprecated in /usr/share/phpldapadmin/lib/page.php on line 468

Deprecated: Creation of dynamic property page::$_block is deprecated in /usr/share/phpldapadmin/lib/page.php on line 241

and this:

Error

Unrecognized error number: 8192: Creation of dynamic property page::$index is deprecated

PHP Debug Backtrace

File/usr/share/phpldapadmin/lib/functions.php (192) Functionerror (a:5:{i:0;s:88:"Unrecognized error number: 8192: Cr...) File/usr/share/phpldapadmin/lib/page.php (38) Functionapp_error_handler (a:4:{i:0;i:8192;i:1;s:55:"Creation of dynamic prop...) File/usr/share/phpldapadmin/htdocs/cmd.php (41) Functionconstruct (a:1:{i:0;i:1;}) File/usr/share/phpldapadmin/htdocs/index.php (153) Functioninclude (a:1:{i:0;s:38:"/usr/share/phpldapadmin/htdocs/cmd....) | File | /usr/share/phpldapadmin/lib/functions.php (192) |   | Function | error (a:5:{i:0;s:88:"Unrecognized error number: 8192: Cr...) | File | /usr/share/phpldapadmin/lib/page.php (38) |   | Function | app_error_handler (a:4:{i:0;i:8192;i:1;s:55:"Creation of dynamic prop...) | File | /usr/share/phpldapadmin/htdocs/cmd.php (41) |   | Function | construct (a:1:{i:0;i:1;}) | File | /usr/share/phpldapadmin/htdocs/index.php (153) |   | Function | include (a:1:{i:0;s:38:"/usr/share/phpldapadmin/htdocs/cmd....) File | /usr/share/phpldapadmin/lib/functions.php (192)   | Function | error (a:5:{i:0;s:88:"Unrecognized error number: 8192: Cr...) File | /usr/share/phpldapadmin/lib/page.php (38)   | Function | app_error_handler (a:4:{i:0;i:8192;i:1;s:55:"Creation of dynamic prop...) File | /usr/share/phpldapadmin/htdocs/cmd.php (41)   | Function | __construct (a:1:{i:0;i:1;}) File | /usr/share/phpldapadmin/htdocs/index.php (153)   | Function | include (a:1:{i:0;s:38:"/usr/share/phpldapadmin/htdocs/cmd....)

brendankearney commented 1 year ago

the errors i am getting now are the original errors i got, that started me down the rabbit hole of trying to pull the latest code out of git. that rabbit hole is what lead to the utterly borked install i had and the errors that i originally posted.

the original errors, which are what the real issue is, is about dynamic properties being deprecated in php 8.2. fedora 38 comes with php 8.2.6, so those lines in page.php are fouling things up.

not sure if it is related or not, but when i look at the php-fpm status page, it says "Ajax status: Error 404"

brendankearney commented 1 year ago

as a workaround, i added "#[AllowDynamicProperties]" to the line above the "class page" definition, and restarted httpd and php-fpm. for now things are working, but the 8.2.6 version deprecating the dynamic properties would need to be worked through

brendankearney commented 1 year ago

seems that many php pages in lib/ need the workaround...

bendem commented 1 year ago

Yeah, there is #202 in the works to prevent those errors. You can try it out and report back. That would probably help push it forward.