I have been using Appgini for years, but in recent months, on two different servers, I have been getting:
=======================================================================
This page isn’t working buckswebsite.net is currently unable to handle this request.
HTTP ERROR 500
=======================================================================
I have not developed anything new for a long time. It is strange the same problem is on two separate servers.
I have several applications on each server, but they all return the same error.
Any tho'ts would be a big help.
Buck
HTTP Error 500
Re: HTTP Error 500
Hi,
can you have a look at the webserver error log to see what causes that error.
Did the environment on the server change, eg. new PHP version?
can you have a look at the webserver error log to see what causes that error.
Did the environment on the server change, eg. new PHP version?
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: HTTP Error 500
Follows is information from the error.log... I have this same problem on two different websites that I maintain
I appreciate your taking a look.
This is the error reported from /home/bucksweb/public_html/appgini/rmb2019a/header.php
-------
[20-Sep-2019 19:19:34 UTC] PHP Warning: Use of undefined constant datalist_db_encoding -
assumed 'datalist_db_encoding' (this will throw an Error in a future version of PHP)
in /home/bucksweb/public_html/appgini/rmb2019a/header.php on line 8
=======================================================================================
here is part of /home/bucksweb/public_html/appgini/rmb2019a/header.php showing line 8
=======================================================================================
<!DOCTYPE html>
<?php if(!defined('PREPEND_PATH')) define('PREPEND_PATH', ''); ?>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="<?php echo datalist_db_encoding; ?>"> <<--------------LINE 8
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
...
I appreciate your taking a look.
This is the error reported from /home/bucksweb/public_html/appgini/rmb2019a/header.php
-------
[20-Sep-2019 19:19:34 UTC] PHP Warning: Use of undefined constant datalist_db_encoding -
assumed 'datalist_db_encoding' (this will throw an Error in a future version of PHP)
in /home/bucksweb/public_html/appgini/rmb2019a/header.php on line 8
=======================================================================================
here is part of /home/bucksweb/public_html/appgini/rmb2019a/header.php showing line 8
=======================================================================================
<!DOCTYPE html>
<?php if(!defined('PREPEND_PATH')) define('PREPEND_PATH', ''); ?>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="<?php echo datalist_db_encoding; ?>"> <<--------------LINE 8
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
...
Re: HTTP Error 500
Hi,
thanks, what version of AppGini are you using?
can you add
if(!defined('datalist_db_encoding')) define('datalist_db_encoding', 'UTF-8');
to the header.php and maybe replace UTF-8 with whatever you DB encoding is set to.
<!DOCTYPE html>
<?php if(!defined('PREPEND_PATH')) define('PREPEND_PATH', ''); ?>
if(!defined('datalist_db_encoding')) define('datalist_db_encoding', 'UTF-8');
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
thanks, what version of AppGini are you using?
can you add
if(!defined('datalist_db_encoding')) define('datalist_db_encoding', 'UTF-8');
to the header.php and maybe replace UTF-8 with whatever you DB encoding is set to.
<!DOCTYPE html>
<?php if(!defined('PREPEND_PATH')) define('PREPEND_PATH', ''); ?>
if(!defined('datalist_db_encoding')) define('datalist_db_encoding', 'UTF-8');
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
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: HTTP Error 500
Hi buck1942,
I would also think it's some problem with a new php version. I suppose all sites are running on the same host. This will probably mean, all sites are using a newer php version as well.
Did you post the contents from the header.php file or from the browser source window?
My header.php looks different (first lines only):
As pbötcher suggested, there is some php code before that line 8 you are talking about that actually defines that variable. As I am using AppGini since version 5.75, maybe it's because your AG Version is old (and thus generating old code)?
Olaf
I would also think it's some problem with a new php version. I suppose all sites are running on the same host. This will probably mean, all sites are using a newer php version as well.
Did you post the contents from the header.php file or from the browser source window?
My header.php looks different (first lines only):
Code: Select all
<?php if(function_exists('set_headers')) { set_headers(); } ?><!DOCTYPE html>
<?php if(!defined('PREPEND_PATH')) define('PREPEND_PATH', ''); ?>
<?php if(!defined('datalist_db_encoding')) define('datalist_db_encoding', 'UTF-8'); ?>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="<?php echo datalist_db_encoding; ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: HTTP Error 500
I thank you for your suggestions... I have tried them all, to no avail.
I upgraded to Appgini 5.76 and that did not help.
I am going to wait, months or so, to see if things settle down. I am tired of debugging and I am sure, at least at different levels, the problem is shared by PHP 7.xx and newer versions Appgini.
I'm sure this too will pass...
Buck
p.s. Applications I write outside of Appgini, in php, work well on PHP 7.xx. In all fairness, what I write in noway compares to the complexity of Appgini, which is a fine product
I upgraded to Appgini 5.76 and that did not help.
I am going to wait, months or so, to see if things settle down. I am tired of debugging and I am sure, at least at different levels, the problem is shared by PHP 7.xx and newer versions Appgini.
I'm sure this too will pass...
Buck
p.s. Applications I write outside of Appgini, in php, work well on PHP 7.xx. In all fairness, what I write in noway compares to the complexity of Appgini, which is a fine product
Re: HTTP Error 500
ALAS... my error 500 is fixed.
I wrote a simple app that would read and display a database to help isolate the problem.
I contacted my website provider... he had set some parameter incorrectly. He fixed it in matter of minutes and I am, once again, a happy camper.
I am running PHP 7.27 and Appgini 5.80 (the problem was fixed before I upgraded to 5.80...) looking forward to trying the math functions in 5.80... I have wanted that feature for years.
Thanks again to those that tried to give me a helping hand.
Buck
I wrote a simple app that would read and display a database to help isolate the problem.
I contacted my website provider... he had set some parameter incorrectly. He fixed it in matter of minutes and I am, once again, a happy camper.
I am running PHP 7.27 and Appgini 5.80 (the problem was fixed before I upgraded to 5.80...) looking forward to trying the math functions in 5.80... I have wanted that feature for years.
Thanks again to those that tried to give me a helping hand.
Buck
Re: HTTP Error 500
Hi Buck,
thanks for reporting back.
Olaf
thanks for reporting back.
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view