Page 1 of 1
HTTP Error 500
Posted: 2019-09-20 16:04
by buck1942
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
Re: HTTP Error 500
Posted: 2019-09-20 18:32
by pbottcher
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?
Re: HTTP Error 500
Posted: 2019-09-21 01:06
by buck1942
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">
...
Re: HTTP Error 500
Posted: 2019-09-21 06:25
by pbottcher
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>
Re: HTTP Error 500
Posted: 2019-09-21 08:10
by onoehring
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):
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="">
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
Re: HTTP Error 500
Posted: 2019-09-25 15:24
by buck1942
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
Re: HTTP Error 500
Posted: 2019-10-11 04:05
by buck1942
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
Re: HTTP Error 500
Posted: 2019-10-11 07:10
by onoehring
Hi Buck,
thanks for reporting back.
Olaf