I’m getting the following error after I generate my site:Not found
The requested URL /my_project/error was not found on this server.I have rewrite configured as per the upgrade instructions. I have tried various permutations, but still no luck. When I generate my project in PHP Maker 2020, all works well. When I open the same project (saved a copy) in PHP Maker 2021 and generate, I get the above error.I’m not sure what I’m missing, but seems like a config somewhere (but I cannot figure it out, yet).
Please follow Migrating to v2021: https://discourse.hkvstore.com/t/migrating-to-v2022/655/1
Thank you, I have followed the process to the “T”, however here goes:
- OS - Windows 10 Pro, Version 1909, Build 18363.1198
- PHP Version 7.4.2
- NodeJS version 13.7.0
- Composer version 2.0.7 2020-11-13 17:31:06
- My httpd.conf file (C:\Apache24\conf\httpd.conf) is uncommented (the # removed): LoadModule rewrite_module modules/mod_rewrite.so
5.1 Running “phpinfo()” and looking at: PHP Configuration > apache2handler > Loaded Modules > mod_rewrite (and a host of other modules), i.e. mod_rewrite is enabled - The .htaccess file in “my_project” folder (C:\Apache24\htdocs\my_project.htaccess) is contains the following:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L] - Again, my httpd.conf file (C:\Apache24\conf\httpd.conf), in the section I have (exactly) the following:
<Directory />
# AllowOverride none
AllowOverride All
# Require all denied
# Allow from all
</Directory>
I have copied this from my configuration (as per the upgrade procedure), and still I get the:
404 Not FoundNot Found
The requested URL /my_project/error was not found on this serverI have tested/tried with/without the “RewriteBase /” as well, but still no luck.
Ok, I’m making progress, but still not resolved.In my httpd.conf file (C:\Apache24\conf\httpd.conf), in the section I have (exactly) the following:
-# AllowOverride none
AllowOverride All
-# Require all denied
-# Allow from all
IGNORE the “-” before the "#"HOWEVER I have changed this back to:
AllowOverride none
-# Require all denied
-# Allow from all
IGNORE the “-” before the “#”… and in the section <Directory “c:/Apache24/htdocs”> (which follow directly after DocumentRoot c:/Apache24/htdocs), I have changed:
AllowOverride All… and now my project loads (however with errors)In Advanced Settings:
- Web root relative path = default, i.e. “.” (without the quotation marks)
2.1 rewrite = blank OR “/my_project/” (without the quotation marks) - loading the project in the “my_project” folder (which is correct, but still with errors - see below)
2.2 rewrite = “/” (without the quotation marks) - load the “index.php” in the web server root folder (which is correct)
With my Generate tab setup as follows:
- Project folder - c:\Apache24\htdocs\my_project\
- Composer update - checked
- Browse after generation - checked
- Testing Root URL - http://127.0.0.1/my_project/index.php
And I now get this error below, ERROR:Error
404!Error
Route ‘index.php’ not found
WABez wrote:
Route ‘index.php’ not found
You should not call index.php directly from browser. Just call index (without .php suffix) instead.
Thank you, that was the problem following the other issues I had. All issues resolved now.