AppGini Displays a Blank Page (Not the Usual Reasons)

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
gmusgrave
Posts: 25
Joined: 2013-08-15 17:27
Location: Mexico

AppGini Displays a Blank Page (Not the Usual Reasons)

Post by gmusgrave » 2023-07-06 18:19

My apAGini app displays a totally blank page. I've been through the typical troubleshooting steps from here: https://bigprof.com/appgini/help/advanc ... lank-pages

I desperately need to get this app up and running ASAP. Any help or suggestions you gurus out there can provide would be very welcome and very much appreciated!

I hope these details give someone a clue as to what might be going wrong.

Background

I have been using Appgini since 2013, and have developed many apps. Every time I've uploaded one to a server, it just works. Flawlessly. Until now...

Description of Problem

When I first uploaded the app and entered the URL in my browser (Firefox 115.0), I got the setup page. I entered the DB credentials, and got a green "Connection OK" message. I entered my admin credentials and continued. I then get a totally blank screen. I've tried other browsers, with the same result.

I checked the database, and setup created the table, and populated it with the appropriate empty rows.

The Browser Tools Inspector shows an utterly blank page:

Code: Select all

<html class="">
    <head></head>
    <body></body>
</html>
There are no console errors. There is no PHP error log, although logging is turned on and works for other sites on the same server.

This is a basic, bare-bones implementation of my app, with no Appgini plugins or modifications to hooks files. I like to get a basic version running before I tweak it.

If I run it on Xampp on my local computer, it works perfectly. It is only on the remote server that it does not load.

Server and App Details

The site is hosted on Hostinger, and it's a Litespeed server running Linux using PHP 8.2.5.

My appGini version is 23.13.

Further Troubleshooting Steps I've Taken

After reviewing all of the above, I decided to do some more in-depth checking by inserting exit("my_message_here") statements starting at the top of index.php and working down.

In index.php it stopped displaying the exit message immediately after "include_once(__DIR__ . '/lib.php');"

So, I started at the top of lib.php, and found out that it stopped displaying the exit message immediately after "Authentication::signIn();"

I commented out "Authentication::signIn();" in lib.php, and was able to progress to home.php.

home.php failed at "include_once(__DIR__ . '/header.php');"

header.php fails at:

Code: Select all

<?php if(!Request::val('Embedded')) { ?>
    <?php if(function_exists('htmlUserBar')) echo htmlUserBar(); ?>
Testing showed that the if statement evaluates true, and it is the next line that calls htmlUserBar() that fails.

I decided not to take this any further because this could go on forever.

Thank you,
Garry Musgrave

User avatar
a.gneady
Site Admin
Posts: 1287
Joined: 2012-09-27 14:46
Contact:

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by a.gneady » 2023-07-07 11:56

Is there any error in your server error log? Even if error output is turned off (which is the right thing to do on a production server), the error log file should still contain any errors that took place.

On a Hostinger server with Litespeed HTTP server, you can find the PHP error log file in the following location:

Code: Select all

/home/[your_username]/logs/error.log
You can access this file using an FTP client or a file manager provided by your hosting control panel. Alternatively, you can use SSH to access the file using a command-line interface.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

gmusgrave
Posts: 25
Joined: 2013-08-15 17:27
Location: Mexico

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by gmusgrave » 2023-07-07 12:15

There is no error log. I know error logging works because I have other sites on Hostinger, and they have generated logs.

gmusgrave
Posts: 25
Joined: 2013-08-15 17:27
Location: Mexico

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by gmusgrave » 2023-07-07 14:42

OK... this is weird. I decided to test the error logging. I put an erroneous php statement at the top of index.php, and hit the URL. Blank page. But... there was no error log generated!

I've double check phpInfo, and log_errors is ON. In the last half hour a log file was updated for one of my other sites (generated because of Wordpress plugin errors).

I cleared the Litespeed cache and turned off caching. I cleared my browser cache. No difference.

I changed to PHP 7.4 with no change.

There very likely are PHP errors, but for some reason no log file is being generated! Any ideas?

gmusgrave
Posts: 25
Joined: 2013-08-15 17:27
Location: Mexico

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by gmusgrave » 2023-07-07 15:28

I've done more testing, and PHP error logs are not being generated! I added an invalid function call to a working file, got a blank screen, and no log file!

I will now contact Hostinger support to resolve this issue.

Once I get error logs, I'll report back.

Thanks for your patience!

gmusgrave
Posts: 25
Joined: 2013-08-15 17:27
Location: Mexico

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by gmusgrave » 2023-07-07 19:27

I did some more testing and modified .htaccess. The PHP error log is now being generated.

It appears to be a memory problem:

Code: Select all

[07-Jul-2023 12:41:52 Mexico/General] PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 262144 bytes) in /home/******/domains/******.com/public_html/members/settings-manager.php on line 197
The PHP memory setting is: memoryLimit: 1536M

User avatar
a.gneady
Site Admin
Posts: 1287
Joined: 2012-09-27 14:46
Contact:

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by a.gneady » 2023-07-08 11:09

I edited your message to hide the domain name and user id in the log message for security.

This line should usually cause no trouble and AppGini apps can run on much lower memory limits. If you like, I can take a look on the server and try to debug this issue. If so, please contact me via the support form at https://bigprof.com/appgini/support-request
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

gmusgrave
Posts: 25
Joined: 2013-08-15 17:27
Location: Mexico

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by gmusgrave » 2023-07-13 18:51

Is there any progress on this? My deadline to launch this is rapidly approaching!

Fortunately I'm able to do all my customisation and testing on the Xampp localhost version. So once the remote server problem is solved, all I have to do is upload it.

Thanks,
Garry

gmusgrave
Posts: 25
Joined: 2013-08-15 17:27
Location: Mexico

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by gmusgrave » 2023-07-15 14:28

Problem solved!

I did more digging and searching, and foud this forum post: viewtopic.php?t=4644 from March of last year.

This user had the same PHP memory error and, while not exactly the same scenario, the problem was missing or empty Appgini Admin entries in the database. I examined my remote database and discovered that none of the admin tables that were present on my local installation had been created on the remote server!

I exported my local database, cleared the remote database, imported the exported SQL file, and everything now works.

I don't know why the setup routines failed to create these database tables, but all is well now.

toolie
Posts: 4
Joined: 2016-10-02 07:23

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by toolie » 2023-08-07 23:40

I am having the same problem; here is my error. I just downloaded version 23.13 so it's fresh code from your site.

Code: Select all

[Mon Aug 07 23:31:05.896818 2023] [proxy_fcgi:error] [pid 138789:tid 139622088611584] [client [ip-address]:62639] AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in [serverpath]/admin/incFunctions.php on line 327', referer: [my website]
  • I have checked, checked, and rechecked the permissions, they're all fine.
  • This is a completely fresh installation, no customizations at all.

I am running a LAMP stack on AWS:

Code: Select all

Setting	       Value
PHP Built On	       Linux  amd64 #1 SMP Debian 5.10.179-2 (2023-07-14) x86_64
Database Type	       mysql
Database Version	10.11.4-MariaDB
Database Collation	utf8mb4_general_ci
Database Connection Collation	utf8mb4_general_ci
Database Connection Encryption	None
Database Server Supports Connection Encryption	No
PHP Version	8.1.20
Web Server	Apache
WebServer to PHP Interface	fpm-fcgi
User Agent	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Any suggestions? I'm completely stopped by this errror.

Toolie

User avatar
a.gneady
Site Admin
Posts: 1287
Joined: 2012-09-27 14:46
Contact:

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by a.gneady » 2023-08-08 12:45

Hey Toolie,

Try removing the config.php file form your server. This should trigger the setup page. From there, enter your database and admin credentials. This should rebuild any missing tables.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

dkano
Posts: 10
Joined: 2023-09-27 09:48

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by dkano » 2023-11-18 16:56

I'm having the same, or similar problem. I started to install the app, which I just tried to install on an ionos.com server, which was giving me 500 errors. See my other thread viewtopic.php?f=11&t=5261&p=21882#p21882.

I gave up on ionos.com, after they could not explain why their php server could not include files normally. Now I'm attempting on my bluehost.com server. On it, I already manually copied the database tables via an import, then uploaded all the files and ran the setup process to create the config.php file, etc. The setup process churns for a long time, then ends with a blank display or a 500 error. I'm guessing the 500 error is a timeout. When it is blank, the view source shows all the usual code including the long javascript definitions for language translations at the top. The last lines of the HTML source are these:


<script src="common.js?1700321617"></script>
<script src="shortcuts.js?1700321655"></script>

</head>
<body>
<div class="users-area container theme-bootstrap theme-3d theme-compact">


It looks like it could be a timeout to me.

When I tried to have the appgini setup process create the database tables from scratch, it churned for a long time then too. Only the appgini_query_log table had been created and none of the others.

The database isn't large. I don't know why it would be timing out or taking so long.

dkano
Posts: 10
Joined: 2023-09-27 09:48

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by dkano » 2023-11-18 17:51

One more detail, is that when I did get to the setup process on my bluehost server, I could not get past the captcha test, so I had to disable it by setting FORCE_SETUP_CAPTCHA to false. Then I could try the setup process, which as I said takes a long time and fails.

dkano
Posts: 10
Joined: 2023-09-27 09:48

Re: AppGini Displays a Blank Page (Not the Usual Reasons)

Post by dkano » 2023-11-21 13:48

While I wait for Ahmed to reply to my support request, I tried another hack: I commented out the following lines in lib.php:


/* hack to see if I can use the existing config.php and database setup since setup is hanging
detect_config();
migrate_config();

checkAppRequirements();

ob_start();
initSession();

// check if membership system exists
setupMembership();

// silently apply db changes, if any
@include_once(__DIR__ . '/updateDB.php');
end hack */


This actually did get me to the login form. But the password that I thought I set for the admin user did not work.

I tried to manually set the password hash in the config.php file and database, with no luck! Evidently there are two hash lengths, depending on the version of appgini. This app was upgraded from an old version, so most of the hashes are 32 characters long. But new ones are longer. I guess the md5() function second argument must be used in the new version? I don't know yet. Since this attempt was a hack around a problem I really want to solve, I gave up for a day.

Today I thought maybe I could use the forgot password feature to get in and get the hashes updated. The feature did not work, I suspect because I never got into the admin area yet to set up the mail to use smtp, as I usually do. So I manually updated the config.php file to put the smtp server, etc. information in and tried again. The email still never arrived. So I'm still stuck, but for a different reason.

I hope I can get help with the setup problem and get a clean install soon. These hacks are just work arounds for what seems to be an appgini bug, perhaps to do with upgrading an app from 5.6x to the current appgini? I don't know.

Post Reply