Blank page after redirect

I’m currently experiencing blank pages after a redirect. It doesn’t happen every time but maybe about 50% of the time.
I have a script that checks urls using curl with the timer function. This is triggered via a button, also displaying the number of urls left to check via ajax. Once they’ve all been checked, I need the page to refresh or redirect. I’ve tried this using several methods. In the php file called by ajax I’ve tried including a simple javascript refresh, calling the function ReloadPage and creating my own redirect function. All 3 worked sometimes but also sometimes resulted in a blank page after the redirect.

Can you please suggest how I need to implement the redirect to avoid getting the blank page ?

Which version of ExeOutput are you using? Maybe the redirect is not properly handled and we improved redirection handler in the last version.

I’m using ver 2018.3.

Could you post the script that performs the redirection?

In account_checker.php I have the following:

<script type=“text/javascript”>
function suspendedAccountsTable() {
$.get(‘account_checker_include.php’, {}, function(data) {
var $response = $(’<div />’).html(data);
var $contentSuspendedTable = $response.find(’#contentSuspendedTable’)
$(’#contentSuspendedTableContainer’).html($contentSuspendedTable);
},‘html’);
setTimeout(function() { suspendedAccountsTable(); }, 800);
}
</script>

<?php if($StartAccountCheck == true) : ?>
<script type=“text/javascript”>
setTimeout(function() { suspendedAccountsTable(); }, 1600);
</script>
<?php endif; ?>

In account_checker_include.php I have the following which triggers the redirect:

<?php if($StartAccountCheck != true) : ?>

<?php
// stop cron script
exo_runhescriptcom(‘UserMain.StopAccountCheck’);
?>

<?php if((isset($_SESSION[“StopAccountCheckRedirect”])) AND ($_SESSION[“StopAccountCheckRedirect”] == 1)) : ?>

<?php
// enable menus
exo_runhescriptcom(‘UserMain.EnableMyMenu’);
?>

<script>
var url= “account_checker.php?cronACEnded=1”;
window.location = url;
</script>

<?php else: ?>
<?php $_SESSION[“StopAccountCheckRedirect”] = 1; ?>
<?php endif; ?>

<?php endif; ?>

I tried a few different directs like the following but they still ended in a blank page sometimes.

<script>
var url= “account_checker.php?cronACEnded=1”;
window.location = url;
</script>

<?php exo_runhescriptcom(‘Macros.PageRefresh’); ?>

<script>
function myFunction() {
location.reload(true);
}
myFunction();
</script>

Since you want PHP to make the redirection, try:

<?php
 exo_runhescriptcom(‘UserMain.StopAccountCheck’);
 exo_runhescriptcom(‘UserMain.EnableMyMenu’);
 header('account_checker.php?cronACEnded=1');

Thanks but how I have things set up header() won’t work, as there’s output before it. I don’t need PHP to do the redirection.
Can you suggest an alternative solution please ?

Update your code so that the PHP performs a correct redirection when some parameter is passed, such as account_checker.php?redirect = 1, and does what expected when the parameter is missing.

I’m not able to do this. Why is it using a javascript redirect sometimes causes a blank page ?

A blank page can be caused by a crash of the PHP process. But there is no known reason why it would crash unless debugging it (and it’s impossible without your project EXE and source files).

A few errors I’ve experienced at different times.
Capture2 Capture Capture3 Capture4

Should I email you the files then ?

Been getting the system error alerts very often after updating to V2018.3. NEVER had them in past using EXACT app code been using since V2.

Hopefully the upcoming release of V2019 will resolve these random errors along with some virtual path issues:)

Yep, hope V2019 fixes things as I can’t release my app as it is.

Sure, you can zip them and send us the Zip by email (or send us a link for download).

I’ve upgraded to ExeOutput for PHP 2019 but looks like the problems still exist.
Also when compiling my app to use PHP 7.3 I get the message “No input file specified.”

I’ll email you a download link to my app.

I’ve PM’ed you a download link, hope that’s ok.

Answered to you by PM.

Just thought I’d better chime in here - I’ve also been getting the 233 System Error too - it’s been going on since v2018, haven’t had time to debug it yet but I figured it might be something at my end, for now I’ve just been sending errors to the log file and the app seems to run okay despite the error - would be good to find a fix though, when I get time I’ll investigate further, really not sure if it’s ExeOut or an issue with my code…

This is an example of what it looks like in the log:

15/01/2019 04:56:28 Scheme Request URL start: http://heserver/getUDstats.php?_=1547528188082
15/01/2019 04:56:29 PHP ERROR: System Error. Code: 233.
No process is on the other end of the pipe
**15/01/2019 04:56:29 PHP ERROR: **
15/01/2019 04:56:30 Scheme Request URL start: http://heserver/getUDstats.php?_=1547528190386

The getUDstats script is being polled once every second - and the error shows up in the log every 5 mins or so.

Next step is to see if it correlates with anything in the cef debug log, I’m pretty sure it did when I was looking into it a while back. I’ll update if I can figure it out… Which reminds me of a feature request I was gonna post…
https://www.gdgsoft.info/t/feature-request-would-be-good-to-have-millisecond-timing-in-main-debug-log/3949

That generally means one of the PHP process has crashed and the main EXE loses the connection.

How do you trigger the script? Do you use the CRON job timer feature?