PHP 7.3 to 8.3 and e107 v2.1.1 to 2.3.11 #6101
Replies: 12 comments 23 replies
|
Hallo @KuroiPhoenix, and welcome.
The fix: re-upload that file from the To confirm first, put this in your site root and open it: <?php
$f = __DIR__ . '/e107_core/templates/admin_icons_template.php';
var_dump(file_exists($f), is_readable($f), @filesize($f));What you want is I put v2.3.11 on PHP 8.3.33 here, the same build you are on, and took that file away. The front page carried on serving normally, and the admin died with: A zero-byte copy and a About your own test file, by the way: I ran your three checks against my working install and got the same three One thing for afterwards. If that file did not land, others may not have either, so once you are back in the admin go to Tools -> File Inspector. It checks every core file against the checksum image that ships with the release and lists whatever is missing or altered. If it does not go that way, whether the file comes back healthy or the admin stays dead after you have replaced it, post the three values you got and I will have another go with you. |
|
I took the test; here is the result: /edit |
|
That is a perfect file, @KuroiPhoenix, so my call was wrong. Thank you for testing it that precisely. My mistake was one I can avoid repeating: the error I matched came out of your test script, and I still have not seen what your admin area itself says. So that is what I should have asked for first. The admin's own error, with its stack trace, from your host's PHP error log: Those Meanwhile, here is my current best guess, and a way to test it. I went looking for other routes to that same message, and found one that leaves the icons file untouched: an admin folder still holding pre-2.3 files. Pre-2.3 admin code loads the icon set the old way, the v2.3.11 icons file does not answer to it, and every One way a site ends up there: e107 lets the admin folder be renamed from Same routine as last time, in your site root: <?php
require_once(__DIR__ . '/class2.php');
header('Content-Type: text/plain');
echo "admin folder : ", e_ADMIN, "\n";
$boot = e_ADMIN . 'boot.php';
echo "boot.php readable : ", (is_readable($boot) ? 'yes' : 'NO'), "\n";
if (is_readable($boot))
{
$has = strpos(file_get_contents($boot), 'loadAdminIcons') !== false;
echo "calls loadAdminIcons: ", ($has ? 'yes' : 'no'), "\n";
}
$n = e107::loadAdminIcons();
echo "icons loaded : ", (is_array($n) ? count($n) : gettype($n)), "\n";
echo "E_16_ADMIN : "; var_dump(defined('E_16_ADMIN'));On v2.3.11 that If you get If you get anything else, post all five lines. There is at least one further way to produce this that the probe will not name, so "not the stale folder" is a useful result rather than a dead end, and the stack trace is what would pin it. On going back to PHP 7.3: I would rather you didn't. Undefined constants were only warnings before PHP 8, so the admin would probably limp far enough to run File Inspector, but 7.3 has had no security fixes since December 2021 and v2.3.11 is itself a security release. File Inspector is not the step you need yet either. Let us get you back in on 8.3 first, and it will be waiting for you afterwards. |
|
`admin folder : ./e107_admin/ boot.php readable : yes calls loadAdminIcons: yes icons loaded : 138 E_16_ADMIN : bool(true)` That is the script's response. |
|
Well, maybe it is a good idea to update your site with the whole package, first revert to your original backup and try to update, i think that with the whole version you have a better chance that it works, i use the github version and i do not have these problems... |
|
I missed the edit on your earlier comment, @KuroiPhoenix, and it is the most useful thing in this thread. "I tried doing this under PHP 7.3" tells me you can still get into the admin on 7.3. That changes the shape of this. Undefined constants were only warnings before PHP 8 and became fatal errors in 8.0, so an admin that renders on 7.3 and dies on 8.3 says the constants really are missing during the real admin request, even though the script I gave you finds them perfectly well outside it. Something in the admin page's own start-up is stopping them from being defined, which is why none of my tests have caught it. It also means my last answer was wrong. You asked whether it was worth going back to 7.3 to run File Inspector and I said not yet. You had the better instinct. So: on 7.3, open Tools -> File Inspector and run the scan, then tell me what it lists. Just the first screenful if it is long. It compares every core file against checksums that ship with the release, so it answers "which of my files are not the ones v2.3.11 expects", which is the question my last three guesses were all circling at a distance. If it tells you it has no integrity data to compare against, say that instead, because that is a finding too. One warning about @Alex-e107nl's suggestion. Re-copying every file is a sensible move when you suspect the files, and it may well be where this ends up, but there is a trap in it: do not extract the full package over your existing site. I checked inside the v2.3.11 full archive just now, and the And hold on to that database update reporting "Success" while the button stays active. I am not treating it as a second fault yet, but new code running against a database that still thinks it is on the old version is exactly the sort of thing that shows up as two unrelated-looking symptoms. |
|
To Alex-e107nl: |
|
To e107help(bot): |
|
I’ve been looking for a download for v2.3.9 but can’t find one. |
|
I ran the following test (suggested by ChatGPT): error_reporting(E_ALL); echo ' ';'; require_once DIR . '/e107_admin/admin.php'; echo ' ENDE';` The response from e107: START Fatal error: Uncaught Error: Undefined constant "LAN_NAVIGATION" in /home/www/e107_handlers/sitelinks_class.php:975 Stack trace: #0 /home/www/e107_admin/boot.php(259): e_navigation->adminLinks('legacy') #1 /home/www/e107_admin/admin.php(78): require_once('/home/www/e107_...') #2 /home/www/e107-debug.php(20): require_once('/home/www/e107_...') #3 {main} thrown in /home/www/e107_handlers/sitelinks_class.php on line 975 |
|
I know I’m being a nuisance—sorry about that. I’ve now carefully copied the files from the GitHub master branch to the server. The frontend is still running, apart from one minor error. The backend is running now too, though there is a small issue. |



Uh oh!
There was an error while loading. Please reload this page.
I had to update to PHP 8.3 with my hosting provider. So, I downloaded the upgrade package to go from v2.2.1 to 2.3.11. The frontend works, but I can no longer access the backend. A small test file gives me the following message:
`PHP: 8.3.33
SAPI: fpm-fcgi
E_16_ADMIN definiert: bool(false)
E_32_ADMIN definiert: bool(false)
E_16_ADPASS definiert: bool(false)
Direkter Zugriff auf E_16_ADMIN:
Error
Undefined constant "E_16_ADMIN"`
What do I need to change, and where, to get it working again? It is also flagging other missing constants—or rather, undefined constants to be precise; basically all of them starting with
E_16_.All reactions