e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
321 stars 213 forks source link

error after error with xammp #4297

Closed arel3 closed 3 years ago

arel3 commented 3 years ago

Bug Description

I'm trying to run the package locally to work on creating my own theme. It (e107 v2.3.0) runs with EasyPHP but page load times, even just refreshing, are extremely slow. I couldn't find any info on a solution for that anywhere so I'm trying Xampp. The problem with xampp is after e017 is installed it produces what seems might be an endless amount of errors. Here is the first one (I've placed blank lines in it so it's easier to read):

`Fatal error: Uncaught ArgumentCountError: Too few arguments to function error_handler::handle_error(), 

4 passed and exactly 5 expected in D:\Xampp\htdocs\e107\class2.php:2558 Stack trace: #0 

D:\Xampp\htdocs\e107\e107_handlers\core_functions.php(135): error_handler->handle_error(8192, 'Required parame...', 

'D:\\Xampp\\htdocs...', 3034) #1 D:\Xampp\htdocs\e107\e107_handlers\core_functions.php(135): require_once() #2 D:\Xampp\htdocs\e107\class2.php(266): e107_require_once('D:\\Xampp\\htdocs...') #3 
D:\Xampp\htdocs\e107\index.php(58): require_once('D:\\Xampp\\htdocs...') #4 
{main} thrown in D:\Xampp\htdocs\e107\class2.php on line 2558`

How to Reproduce

Steps to reproduce the behavior:

1. Run Xammp and go through e107's installation @localhost.
2. See error

Expected Behavior

e107 runs, no errors, as it does with easyPHP

Server Information

Win 10 Home 64bit
Xampp v3.2.4 (latest version for windows)
GD enabled in xampp's php.ini

PHP Operating System

php 8.0

Replace this code block with the "System" value found towards the top of /e107_admin/phpinfo.php Can't get there to get that info e107's index.php won't load due to these errors.

PHP Version

8.0

Replace this code block with the PHP version shown at the top of /e107_admin/phpinfo.php

Xampp installation documentation indicates it's 8.0.

PHP Modules

Not able to get there. Errors on main page, errors on every page.

Client Information

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 OPR/73.0.3856.284

Additional Information

I've tried:

Warning: compact(): Undefined variable $mySQLuser in D:\Xampp\htdocs\e107\class2.php on line 281

Warning: compact(): Undefined variable $mySQLpassword in D:\Xampp\htdocs\e107\class2.php on line 281

Warning: compact(): Undefined variable $mySQLdefaultdb in D:\Xampp\htdocs\e107\class2.php on line 281

Warning: compact(): Undefined variable $mySQLprefix in D:\Xampp\htdocs\e107\class2.php on line 281

Fatal error: Uncaught Error: Class "e107" not found in D:\Xampp\htdocs\e107\class2.php:286 Stack trace: #0 D:\Xampp\htdocs\e107\e107_admin\phpinfo.php(11): require_once() #1 {main} thrown in D:\Xampp\htdocs\e107\class2.php on line 286



I've tried disabling the entire class2.php file by renaming it, that produces the start of errors in index.php. I stopped there to ask about it here before ending up disabling almost every line in every file which is the path this seems to have me on. 

Anyone know how to run e107 v2.3.0 locally with Xampp? I'm hoping I'm missing something simple. 
Deltik commented 3 years ago

The lack of PHP 8.0 support was a known issue for the release of e107 v2.3.0. The issue was noted in the first bullet point of the release notes.

It is already fixed on the master branch. You can install the latest development revision using the instructions here.

arel3 commented 3 years ago

The lack of PHP 8.0 support was a known issue for the release of e107 v2.3.0. The issue was noted in the first bullet point of the release notes.

It is already fixed on the master branch. You can install the latest development revision using the instructions here.

Why the commands? Is it a different version doing it that way instead of downloading it from here and extracting it?

Deltik commented 3 years ago

Using Git allows you to keep updated with the latest development revision with git pull without having to redownload that GitHub source ZIP file every time you want to update. (Granted, you can also use /e107_admin/db.php?mode=github in the admin area, but git pull is still faster because it only downloads the changes rather than the whole source all over again.)

arel3 commented 3 years ago

Xampp doesn't have telenet access by default @Deltik so getting it that way isn't possible. I downloaded it normally and it seems to work except when I go to the admin area and click on Theme Management:

Fatal error: Uncaught Error: Undefined constant "MENLAN_11" in D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php:572 Stack trace: #0 D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php(370): e_menuManager->menuScanMenus() #1 D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php(122): e_menuManager->menuModify() #2 D:\Xampp\htdocs\e2\e107_handlers\theme_handler.php(2891): e_menuManager->__construct() #3 D:\Xampp\htdocs\e2\e107_handlers\theme_handler.php(2599): themeHandler->renderPresets('jumbotron_sideb...') #4 D:\Xampp\htdocs\e2\e107_admin\theme.php(645): themeHandler->renderTheme(1, Array) #5 D:\Xampp\htdocs\e2\e107_admin\theme.php(338): theme_admin_ui->renderThemeConfig('front') #6 D:\Xampp\htdocs\e2\e107_handlers\admin_ui.php(2314): theme_admin_ui->MainPage() #7 D:\Xampp\htdocs\e2\e107_handlers\admin_ui.php(1360): e_admin_controller->dispatchPage() #8 D:\Xampp\htdocs\e2\e107_admin\theme.php(1742): e_admin_dispatcher->runPage() #9 {main} thrown in D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php on line 572

More errors. Is the development for php 8.0 not complete yet? I wonder if I can revert Xampp's php version back to 7 so this just runs. Glad I didn't go through the effort of making ssh work locally.

tgtje commented 3 years ago

Helas i can confirm (xamp 64x php 8.0.0 windows/GD enabled; latest Git 5 H old).

Looks like it will not render the LAN's (cause yet unknown). However being LAN's i replaced lan 10 & 11 in _menumanagerclass like so "New menu installed" ( = MENLAN_10) 2x lines 478,532 "Menu removed" ( = MENLAN_11) 1x line 572 (These LAN's are defined in lang/_English/admin/lanmenus php) needs attention ... as some other possible text is not set as LAN.

After this runs smooth (basic test)

Deltik commented 3 years ago

@arel3: This is indeed a bug:

Fatal error: Uncaught Error: Undefined constant "MENLAN_11" in D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php:572
Stack trace:
 #0 D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php(370): e_menuManager->menuScanMenus()
 #1 D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php(122): e_menuManager->menuModify()
 #2 D:\Xampp\htdocs\e2\e107_handlers\theme_handler.php(2891): e_menuManager->__construct()
 #3 D:\Xampp\htdocs\e2\e107_handlers\theme_handler.php(2599): themeHandler->renderPresets('jumbotron_sideb...')
 #4 D:\Xampp\htdocs\e2\e107_admin\theme.php(645): themeHandler->renderTheme(1, Array)
 #5 D:\Xampp\htdocs\e2\e107_admin\theme.php(338): theme_admin_ui->renderThemeConfig('front')
 #6 D:\Xampp\htdocs\e2\e107_handlers\admin_ui.php(2314): theme_admin_ui->MainPage()
 #7 D:\Xampp\htdocs\e2\e107_handlers\admin_ui.php(1360): e_admin_controller->dispatchPage()
 #8 D:\Xampp\htdocs\e2\e107_admin\theme.php(1742): e_admin_dispatcher->runPage()
 #9 {main} thrown in D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php on line 572

More errors. Is the development for php 8.0 not complete yet?

e107 historically used constants extensively by having them everywhere, but with PHP 8 changing how it behaves towards undefined constants, fatal errors now show up if there are any unaccounted constants. We are in the process of finding undefined constants and resolving them, so no, the development for PHP 8.0 is not complete yet.

Xampp doesn't have telenet access by default @Deltik so getting it that way isn't possible. … Glad I didn't go through the effort of making ssh work locally.

I don't understand how Telnet and SSH relate to installing e107. According to your stack trace above, git clone https://github.com/e107inc/e107.git D:\Xampp\htdocs\e2 would have put e107 into the path you wanted.

arel3 commented 3 years ago

@arel3: This is indeed a bug:

Fatal error: Uncaught Error: Undefined constant "MENLAN_11" in D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php:572
Stack trace:
 #0 D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php(370): e_menuManager->menuScanMenus()
 #1 D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php(122): e_menuManager->menuModify()
 #2 D:\Xampp\htdocs\e2\e107_handlers\theme_handler.php(2891): e_menuManager->__construct()
 #3 D:\Xampp\htdocs\e2\e107_handlers\theme_handler.php(2599): themeHandler->renderPresets('jumbotron_sideb...')
 #4 D:\Xampp\htdocs\e2\e107_admin\theme.php(645): themeHandler->renderTheme(1, Array)
 #5 D:\Xampp\htdocs\e2\e107_admin\theme.php(338): theme_admin_ui->renderThemeConfig('front')
 #6 D:\Xampp\htdocs\e2\e107_handlers\admin_ui.php(2314): theme_admin_ui->MainPage()
 #7 D:\Xampp\htdocs\e2\e107_handlers\admin_ui.php(1360): e_admin_controller->dispatchPage()
 #8 D:\Xampp\htdocs\e2\e107_admin\theme.php(1742): e_admin_dispatcher->runPage()
 #9 {main} thrown in D:\Xampp\htdocs\e2\e107_handlers\menumanager_class.php on line 572

More errors. Is the development for php 8.0 not complete yet?

e107 historically used constants extensively by having them everywhere, but with PHP 8 changing how it behaves towards undefined constants, fatal errors now show up if there are any unaccounted constants. We are in the process of finding undefined constants and resolving them, so no, the development for PHP 8.0 is not complete yet.

Xampp doesn't have telenet access by default @Deltik so getting it that way isn't possible. … Glad I didn't go through the effort of making ssh work locally.

I don't understand how Telnet and SSH relate to installing e107. According to your stack trace above, git clone https://github.com/e107inc/e107.git D:\Xampp\htdocs\e2 would have put e107 into the path you wanted.

I didn't use telenet to get it because it's ridiculous to do that to access a local folder. I downloaded it and extracted it. I didn't use commands because it's not necessary. That's why I asked if it was a different version getting it with a command vs downloading it.

Since development for php 8 isn't yet finished I've moved on to a cms system that does work so I can actually work on site content instead of messing with getting things just working.

These issues are not resolved so this topic should not have been closed.

Jimmi08 commented 3 years ago

It should stay closed. It is your problem if you don't read the requirements for this CMS. Your own hosting supports PHP 7.4, your live version is running on PHP 7.4 and you install xampp with PHP 8?

If you don't believe me, read this: https://www.wordfence.com/blog/2020/11/php-8-what-wordpress-users-need-to-know/ It is not recommended for WP to use yet and you complain that it is not supported with this CMS?

This CMS has to run for PHP 5.6 too because there is a lot of installation with non-core plugins not updated for PHP 7 yet. It is a miracle that it works without issues with PHP 7.3 or 7.4 with so small a development team.

I am sorry you are disappointed but they do what they can.

Deltik commented 3 years ago

For the part of this thread that is actually a bug, I opened #4299.

Moc commented 3 years ago

PHP 8 support is in development and will be part of a next release.

You can use the largest PHP 7 version which is fully supported.

A separate issue has been opened to fix the PHP 8 compatibility bug that was reported.

That makes this current issue no longer relevant, so I'm keeping it closed.