Closed desbest closed 2 months ago
You don’t have to write PHP error reporting line manually. Mecha already has it set up in conditional statement internally. Simply change the TEST
constant value to true
will enable all PHP error reporting. Save changes, delete all log files, then reload the site to see the updated error log messages.
When I made the video, I didn't know about the TEST
constant, so it's somewhat outdated now.
The error log with the TEST
constant set to true, is indicated above under "core application" logs, not "general" logs.
I might not yet delete-create the v3.0.0 tag as usual. But since the previous bug has been resolved the Genome
class should be updated already to fix the last issue.
My suggestion: download the main
branch then install it then let me know if it gives you the same errors as in version 3.0.0 (dev).
I've tried running the branch and I just get Error 403 Not Authorised, with no logs, even with TEST
set to true.
403 is not typical error caused by Mecha. Check the file permission of your .\index.php
file.
The file permissions are normal. 755 for folders and 644 for files. Deleting all the `.htaccess files doesn't help either. See this video for details.
Downloading the ZIP file from repo will not include the submodules, maybe that’s why. After extracting, if you open the .\lot\x
folder there will contain empty folders. Download it from the site instead, so it will also include all the submodules automatically, so it will install.
The 403 status code is the default status where there is no route defined. Page routes are defined in the .\lot\x\page
extension which is missing in your case.
But you told me to download the main
branch.
My suggestion: download the
main
branch then install it then let me know if it gives you the same errors as in version 3.0.0 (dev).
I've now downloaded it from both these places and the error still happens, except the error changed.
Minifying the php is set to off
[07-Aug-2024 05:37:03 UTC] PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0
Parse error: syntax error, unexpected end of file, expecting function (T_FUNCTION) or const (T_CONST) in /home/desbest/public_html/flatfiletest/mecha3-mainbranch-gen/engine/kernel/genome.php on line 1
Fatal error: Exception thrown without a stack frame in Unknown on line 0
Parse error: syntax error, unexpected end of file, expecting function (T_FUNCTION) or const (T_CONST) in /home/desbest/public_html/flatfiletest/mecha3-mainbranch-gen/engine/kernel/genome.php on line 1
Fatal error: Exception thrown without a stack frame in Unknown on line 0
[07-Aug-2024 05:42:08 UTC] PHP Parse error: syntax error, unexpected end of file, expecting function (T_FUNCTION) or const (T_CONST) in /home/desbest/public_html/flatfiletest/mecha3-mainbranch-gen/engine/kernel/genome.php on line 1
[07-Aug-2024 05:42:08 UTC] PHP Parse error: syntax error, unexpected end of file, expecting function (T_FUNCTION) or const (T_CONST) in /home/desbest/public_html/flatfiletest/mecha3-mainbranch-gen/engine/kernel/genome.php on line 1
[07-Aug-2024 05:42:08 UTC] PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0
[07-Aug-2024 05:42:08 UTC] PHP Parse error: syntax error, unexpected end of file, expecting function (T_FUNCTION) or const (T_CONST) in /home/desbest/public_html/flatfiletest/mecha3-mainbranch-gen/engine/kernel/genome.php on line 1
[07-Aug-2024 05:42:08 UTC] PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0
But you told me to download the
main
branch.
Sorry, I mean from the website, there’s a dropdown that shows 3.0.0 by default. There’s also an option with the label “main” in the dropdown.
Any error message that said on line 1
is likely come from a PHP file that has been minified. Open .\engine\kernel\genome.php
with a code/text editor and see its content. Is it minified?
The token error likely caused by the new PHP attribute that is not supported by your PHP. It should be treated as normal PHP comment in older PHP versions, but since its code is minified and my server does not remove the PHP attribute syntax (because it is not a comment) so that any code that comes after the #[asdf]
token will be treated as a continuation of a comment on a web server that does not support PHP attributes.
I've just tried that now and now although I can see the home page, the about page doesn't work.
That means your web server does not support URL rewrite. You didn’t remove the .htaccess
files, right?
All the initial .htaccess
files still exist
/.htaccess
/engine/.htaccess
/lot/.htaccess
/lot/asset/.htaccess
/lot/y/log/.htaccess
Just one more step, you just need to make sure that URL rewrite feature is available and active.
From the video, I saw some other CMSes are also installed, do they have URL rewrite issue like Mecha?
It works now. I just uploaded it somewhere else like here. So it was the CMS I was already using on my website (in the parent directory) causing it.
With that said, how about fixing the v3.0.0 release on github?
When I visit the new site, it displays the HTML as plain text for once then it displays as proper HTML on the later hot-reload.
With that said, how about fixing the v3.0.0 release on github?
Show me the .htaccess
file content of your parent site.
You may truncate/censor certain parts that you think private.
Here it is. I was using the Stacey CMS v2.3.0 It's associated website was archived here.
Not really sure, but the trailing slash enforcing part may cause it to always visit the URL twice (to add the /
ending), since Mecha’s URL are mostly clean but does not end with trailing slash by nature.
It looks like the v3.0.0 release has been updated. I can now close this issue.
Make sure that your issue is reproducible by doing the following tasks
TEST
constant value totrue
in the.\index.php
file.error
orerror-x
orerror-y
in the.\engine\log
folder.What installation method did you use?
File
Describe your issue in the field below
I've tried the steps described in my previous issue and it doesn't work,
As the error is non-descript, showing a video is better. See this video for details. https://www.bitchute.com/video/TNdfL4XFoiad/
Package version
Stable release version (package with semantic version label such as
v1.0.0
)Package version number
3,0,0
What browsers are you seeing the problem on?
Others
Error logs of the core application if any
Error log of the extension if any
Error log of the layout if any
General error logs if any (if the application fails to set a custom error log path, then the error log will usually appear in this location)