The requested URL alias for "/error" is not defined

demo 2021 project

HTTP/404
The requested URL alias for “/error” is not defined.

enabled debug, no output.

using phpED:
HTTP/404
The requested URL alias for “/error” is not defined.

on actual apache web server:
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

Error 404

no changes to app settings made, regenerated every file
rewrite enabled
web server works have other test sites on it.
no apache error log entries

debugging do get to:
// Run app
$app->run();

template is updated.
composer updated
database is installed and db user tested
checked recommended Apache modules – loaded
www user owns the folders/files

i’ve tried with dns (demo2021DOT mydomain DOT com) without dns direct to web server (192 168 n n/demo2021) – all with the same results. i also uploaded to the root web folder srv www htdocs and ran as http 192 168 n n

no errors, no nothing.
could it be the rewrite engine. i checked it is enabled. using openSUSE / LEAP 15.1

we were able to get this to appeara after altering the .htaccess file:

Options Indexes FollowSymLinks MultiViews
Require all granted

{“statusCode”:0,“error”:{“class”:“text-danger”,“type”:“Error”,“description”:“An internal error has occurred while processing your request.”}}

the default Apache web config appears OK: (we uploaded to the root folder to test…)

DocumentRoot “/srv/www/htdocs”

<Directory “/srv/www/htdocs”>
Options Indexes FollowSymLinks MultiViews

AllowOverride All

<IfModule !mod_access_compat.c>
Require all granted


Order allow,deny
Allow from all

By default error is not shown if Debug is not enabled. Whenever you see “An internal error has occurred while processing your request”, click Tools → Advanced Settings, enable Debug, generate the config.php again.

Although the Debug mode is not enabled, you may still be able to check the error in more detail from the *.log file that located inside the generated “log” sub-folder under your root web application.

debug was on,
not a single entry in the log files.

  1. From: https://discourse.hkvstore.com/t/migrating-to-v2022/655/1

If you use Apache, check phpinfo() (see https://www.php.net/manual/en/function.phpinfo.php), search for ‘mod_rewrite’. If it is enabled you should see it as ‘Loaded Modules’. If not, open httpd.conf (Apache Config file) and look for:

#LoadModule rewrite_module modules/mod_rewrite.so

Remove the pound (‘#’) sign at the start and save the file. Restart your apache server. Check phpinfo() and search for ‘mod_rewrite’ again. You should be able to find it now.

  1. You may check your .htaccess at the project folder, if you generate your site to /srv/www/htdoc, the file is /srv/www/htdoc/.htaccess, if you generate your site to a subfolder of your site like /srv/www/htdoc/demo2021, the file is /srv/www/htdoc/demo2021/.htaccess. The content should be like:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

If you generate to subfolder, some server may require RewriteBase (see https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase), e.g.

RewriteEngine On
RewriteBase /demo2021/

got it finally partially going…

it seems the RewriteBase is needed on openSUSE / LEAP 15.1

doing http 192.168.0.137/demo2021/ now works… at least we know the server is setup correctly and working for 2021, we can try to convert our app which is the more important task – and since all the webfarms are setup, hopefully the balancers should not need to altered.

i think the other issues are our load balancers aren’t routing correctly to the test servers for some reason, so name access with dns is not being picked up by the load balancers.

thanks!

as well… we moved the .htaccess file to the root web folder

/srv/www/htdocs

with the app sitting at:

/srv/www/htodcs/demo2021

with .htaccess as:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

dns name access now works