Ah, so you mean you have not yet copied the URI mapping files into the ZC210 fileset.
Well, take a backup of the db before you do so, but it should not run the URI installer again.
Use the latest files on my Github.
Ah, so you mean you have not yet copied the URI mapping files into the ZC210 fileset.
Well, take a backup of the db before you do so, but it should not run the URI installer again.
Use the latest files on my Github.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
Hi,
I'm having the same issue as shags38 in post #332.
ZC Version 2.0.1
Ceon Version 5.1.1
PHP Version (as recently changed by our host): 8.2
[27-Jan-2025 21:48:11 UTC] PHP Fatal error: Uncaught Error: Undefined constant "FILENAME_DOCUMENT_GENERAL_INFO" in /home/zcammell8139nz/public_html/includes/extra_datafiles/ceon_uri_mapping_product_pages.php:24
Stack trace:
#0 /home/****/public_html/includes/init_includes/init_file_db_names.php(54): include()
#1 /home/****/public_html/includes/application_top.php(214): require('/home/zcammell8...')
#2 /home/****/public_html/index.php(25): require('/home/zcammell8...')
#3 {main}
thrown in /home/****/public_html/includes/extra_datafiles/ceon_uri_mapping_product_pages.php on line 24
I've reverted to PHP 8.0 as a temporary solution and it appears to work. Is there a long-term solution to this issue on the cards?
Further to the above, changing to PHP 8.0 was only temporary and for some reason only worked for about an hour before the error was thrown again.
I've also reuploaded all the files and that works temporarily as well, and then the error comes back and the website goes down.
I have Ceon URI Mapping 5.1.0 (I think) and, searching for FILENAME_DOCUMENT_GENERAL_INFO, I see that as my init_file_db_names.php runs its last few lines it's iterating $directory_array and executing each file, for me these two are executed in this order:
The file ceon_uri_mapping_filenames.php defines the constant you're seeing an error for:Code:includes/extra_datafiles/ceon_uri_mapping_filenames.php includes/extra_datafiles/ceon_uri_mapping_product_pages.php
In your case, from your stack trace, init_file_db_names.php seems to be executing ceon_uri_mapping_product_pages.php but the constant is not defined at that time.Code:if (!defined('FILENAME_DOCUMENT_GENERAL_INFO')) { define('FILENAME_DOCUMENT_GENERAL_INFO', 'document_general_info'); }
Do you have ceon_uri_mapping_filenames.php on your system, and does it define the constant correctly? If you can't use a debugger (I use VS Code for local development) you may want to put echo statements or similar in various files to check what order they're being loaded.
In addition to the above, as far as I know prior to PHP 8.0 use of an undefined constant would generate a Warning level error, and from 8.0 onward it generates a Fatal level error. So, I doubt that changing to PHP 8.0 would have fixed the problem you described, it should still have generated a Fatal error (and brought the website down, since these files are executed for every page load). Maybe your admin side would have worked, but not the customer facing catalog side, as there is a separate YOUR_ADMIN/includes/extra_datafiles/ceon_uri_mapping_filenames.php file that defines the constant that you may have but are missing the catalog side equivalent .
Thanks neekfenwick for your feedback.
ceon_uri_mapping_filenames.php is in the correct place and the constant is defined as:
if (!defined('FILENAME_DOCUMENT_GENERAL_INFO')) {
define('FILENAME_DOCUMENT_GENERAL_INFO', 'document_general_info');
I've since found that the file ceon_uri_mapping_database_tables.php is being deleted after approximately 25mins and this is causing the error - I'm unsure if this is how the modules is supposed to function or if something has gone wrong.
That sounds pretty crazy :) Also, you don't say if it's the catalog or admin version of that file, and that file doesn't seem to define anything that would cause the stack trace you reported, it may not be the only file going missing. Maybe your host has some kind of antivirus software that is flagging the file as malicious? If you have access to your server's logs you might try searching for any mention of ceon_uri_mapping_database_tables to see if any software is logging about it, for example `find /var/log -type f | xargs grep ceon_uri_mapping_database_tables` .. it'll be very dependent on what access you have to your server and what software is on it.
Use an updated version from my GitHub.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
Hi,
Thanks for the help.
I typed in the wrong file name in my last post, the file that goes missing is indeed ceon_uri_mapping_filenames.php.
I am using the latest files from Github.
It could be that the issue is caused by my host, I am awaiting a response from them as I don't have access to the server logs.
Hi,
I've found the source of the problem, the anti-virus software on our host's server was treating ceon_uri_mapping_filenames.php as malware.
If anyone else runs into this issue this may be the cause of your problem as well.
Thanks again for the help.
Bookmarks