500 error attempting to run new copy of app

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
dkano
Posts: 10
Joined: 2023-09-27 09:48

500 error attempting to run new copy of app

Post by dkano » 2023-11-18 04:37

I'm enhancing an appgini that has been running in PHP 5.x generated by an old version 5.6 of appgini. So I upgraded to the latest 23.16 version of appgini and I'm attempting to use the new files on PHP 8.x on the live server.

The new code runs fine on my xampp setup on my windows box, running PHP 8.2.4.

When I try to run on the live server running PHP 8.0, or 8.1, I'm getting a 500 error before I can even get to the captcha step of setup. When I add debugging lines in some of the include files, then the 500 error clears but the code still does not work. I kept adding debugging lines in include files, until finally the captcha test appeared. When I answered the test correctly, it ran setup.php finally, but again got a 500 error.

I've looked in the apache logs and can't see the problem beyond the 500 error the browser was reporting.

When I've tested the same PHP setup with simple code, there seems to be a problem including files with the syntax:

$currDir = __DIR__;
include("{$currDir}/hellotest.php"); // none of the code in hellotest.php gets run!

vs

include('hellotest.php'); // when the hellotest.php is in the same directory, so this works and the code all gets run normally.


I've talked to the tech support at ionos.com where my client has their website served, and they could not help me get the simple include statements to work. I thought it was a problem with their setup of subdomains, but now I'm getting the same problem with another domain name setup that is not a subdomain!

Could there be a bug in the latest version of appgini that could cause the 500 error?

Has anyone else seen this problem with including based on the __DIR__ or dirname(__FILE__) prepended in front of the file before? I insisted to ionos.com that this should work as it is such a common strategy, with no help from them!

I assume I have to use a fairly new version of PHP for 23.16, right? I can't just install the latest generations with PHP 5.6 can I?

Thanks,
David

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

Re: 500 error attempting to run new copy of app

Post by dkano » 2023-12-03 14:03

I finally figured out my problem.

I'm sorry if I wasted your time on these. It turns out that PHP was working to a large extent on my bluehost server as I had it set up, so I thought the basic subdomain setup couldn't be the problem. However, when I changed the directory that the subdomain was pointing to it fixed the problem.
For our purposes, the subdomains can only serve sub-directories of public_html, even though the web interface that they supply allows them to be in my root directory.

I still don't know exactly when it failed, but it must be some kind of security thing. It wasn't the simple case of apache not being able to write the config.php or setup.md5 files though. At this point, I don't care because I finally got it working!

Thanks,
David

Post Reply