I am facing a rather strange Appgini-generated application behavior.
When I generate any project in my local machine (Windows with XAMPP) and test the application it runs fine, letting me and other users login and showing all tables and functions properly. Then I upload the project onto a Bluehost hosting virtual server, by first making a ZIP file of the entire app, then uploading and unzipping it into the production server and it stops running. Usually, this old-fashioned way of zip-upload-unzip worked just fine up until these later versions (I have been facing this issue since de 23.xx version).
The problem is only with the login user procedure (because I tested the app without any restrictions for the visitor user and it runs fine, adding modifying, and deleting records). The login window shows correctly and then after typing the user & password the app runs with a fast blank page showing this message "Click here If you aren't automatically redirected." for a second and then displays back the login page and nothing happens. This process goes the same whether the user is a registered user or not. Meaning the procedure IS NOT validating the user. Unfortunately, I do not have an old version of Appgini anymore to try to generate this same project in an old version, to see if a new updated procedure might be causing this issue.
After consulting with Ahmed he suggested I run/test the application (or generated project) without any of the plugins (The AppGini-Helper, Calendar, MassUpdate, Messages, Summary Reports and Search Page Maker) which I did; Got the same result.
And frankly, I am dedicated to solving this issue with the newer version because my customer likes what he sees with the new version running locally on my laptop. Does anyone have an idea of what could be causing this issue? Or can anyone help me solve this problem?
Thanks in advance
NOTES:
a) To help understand what is causing this behavior I looked for the "click here" sentence through all the scripts and found that only the "function redirect()" function within the "IncFunctions.php" script has this message.
b) I am using version 24.10 rev.1579.
Problems with login in production server
Re: Problems with login in production server
And yes, after uploading and unzipping the app/project, I erased the "config.php" script and the "setup.md5" file to generate a new clean installation. Just in case anyone is wondering if that might be causing this issue.
Re: Problems with login in production server
Hi,
do you have any addtional code in the hooks/__global.php -> login_ok function, or in the hooks/header-extras.php or footer-extras.php that calls an sql/sqlvalue function?
On which PHP version are you running in your production environment?
do you have any addtional code in the hooks/__global.php -> login_ok function, or in the hooks/header-extras.php or footer-extras.php that calls an sql/sqlvalue function?
On which PHP version are you running in your production environment?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Problems with login in production server
Thanks pböttcher,
"do you have any additional code in the hooks/__global.php -> login_ok function"? ... No, function is returning a blank space "return ' '; "
or in the "hooks/header-extras.php" or the "hooks/footer-extras.php" ? ... No both files are empty, they only have "<?php ?>" on each
And running with PHP 8.0
"do you have any additional code in the hooks/__global.php -> login_ok function"? ... No, function is returning a blank space "return ' '; "
or in the "hooks/header-extras.php" or the "hooks/footer-extras.php" ? ... No both files are empty, they only have "<?php ?>" on each
And running with PHP 8.0
Re: Problems with login in production server
Thanks to pbotcher who found out the problem causing the app to not validate any login user into the project. He found that the language code for the language.php file had UTF-8-BOM instead of UTF-8 code, and that happened when I saved the changes to that file language.php