|
Host upgraded to PHP 8.3, charts down. |
| Posted by Paul Huffman on Apr-17-2026 02:46 |
|
When my hosting company, Dreamhost, upgraded to PHP 8.3, all the charts on my website went down. My old employer asked if I could come out of retirement and fix this problem. I thought it would be just a matter of downloading the correct updated PHP tar, unpack it in the same place in my site, copy the .lic file over from the backup library, and I wold be up and running. But the charts still are not working and I get errors in the site log like :
[pid 1119396] fcgid_bucket.c(153): mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Failed opening required '/home/ykfpdata/ykfp.org/php/ChartDirector/lib/phpchartdir.php' (include_path='.:') in /home/ykfpdata/ykfp.org/php/lyletrap/lylesteelheadavar.php:3 |
Re: Host upgraded to PHP 8.3, charts down. |
| Posted by Peter Kwan on Apr-18-2026 14:52 |
|
Hi Paul,
Have you configured your PHP to use the ChartDirector for PHP extension, and then restart the PHP? See:
https://www.advsofteng.com/doc/cdphp.htm#phpinstall.htm
Also, make sure the ChartDirector has the extension suitable for your PHP version. If it does not have extension for PHP 8.3, please download the latest version of ChartDirector.
The error message mentions it fails to open "/home/ykfpdata/ykfp.org/php/ChartDirector/lib/phpchartdir.php". I assume you have double check the "phpchartdir.php is really in the "/home/ykfpdata/ykfp.org/php/ChartDirector/lib" folder, and its security settings is such that it is readable by the web server, and that the phpchartdir.php comes from the ChartDirector that supports 8.3 you have downloaded.
Best Regards
Peter Kwan |
Re: Host upgraded to PHP 8.3, charts down. |
| Posted by Paul Huffman on Apr-19-2026 02:24 |
|
I checked the path again by copying from the error message info a find command:
[ -f /home/ykfpdata/ykfp.org/php/ChartDirector/lib/phpchartdir.php ] && echo "Exists" || echo "Not found"
Exists
Then I looked at file permissions again:
cd ChartDirector/lib
[pdx1-shared-a1-23]$ ls -lt *.php
-rwxr-xr-x 1 ykfpdata pg106956 98765 Nov 28 01:24 FinanceChart.php
-rwxr-xr-x 1 ykfpdata pg106956 79761 Nov 28 01:24 phpchartdir.php
I had mv my old ChartDirector folder to a back up, so I was able to compare permissions in the old installation:
ls
BOR adultpassage lyletrap
ChartDirector apihelper.py nwac
ChartDirector.7.1.bak atom phpinfo.php
ChartDirector.bak calendar tags
ChartDirector.bak.20210628 calendar.zip timetest.php
ChartDirector.bak.20210630 chartdir_php_linux_64.tar.gz upload
ChartDirector.bak.20221225 fishcounts uploader
ChartDirectorNew hatchery
[pdx1-shared-a1-23]$ cd ChartDirector.bak.20221225/lib
[pdx1-shared-a1-23]$ ls -lt *.php
-rwxr-xr-x 1 ykfpdata pg106956 98765 Dec 25 2022 FinanceChart.php
-rwxr-xr-x 1 ykfpdata pg106956 79823 Dec 25 2022 phpchartdir.php
Looks the same.
The PHP install is managed by the hosting company so I have limited ability to mess with it. I guess I could do something with a php ini file if I knew what to do.
The old ChartDirector lib folder only went up as far as phpchartdir820mt.dll, so I figured I would need to download the new version with 8.3:
-rwxr-xr-x 1 ykfpdata pg106956 12928 Dec 25 2022 phpchartdir810mt.dll
-rwxr-xr-x 1 ykfpdata pg106956 12928 Dec 25 2022 phpchartdir820.dll
-rwxr-xr-x 1 ykfpdata pg106956 12928 Dec 25 2022 phpchartdir820mt.dll
[pdx1-shared-a1-23]$ pwd
/home/ykfpdata/ykfp.org/php/ChartDirector.bak.20221225/lib
[pdx1-shared-a1-23]$ cd ../..
[pdx1-shared-a1-23]$ ls -lt ChartDirector/lib|tail
-rwxr-xr-x 1 ykfpdata pg106956 12928 Nov 28 01:24 phpchartdir810.dll
-rwxr-xr-x 1 ykfpdata pg106956 12928 Nov 28 01:24 phpchartdir810mt.dll
-rwxr-xr-x 1 ykfpdata pg106956 12928 Nov 28 01:24 phpchartdir820.dll
-rwxr-xr-x 1 ykfpdata pg106956 12928 Nov 28 01:24 phpchartdir820mt.dll
-rwxr-xr-x 1 ykfpdata pg106956 12712 Nov 28 01:24 phpchartdir830.dll
-rwxr-xr-x 1 ykfpdata pg106956 12712 Nov 28 01:24 phpchartdir830mt.dll
-rwxr-xr-x 1 ykfpdata pg106956 14896 Nov 28 01:24 phpchartdir840.dll
-rwxr-xr-x 1 ykfpdata pg106956 14896 Nov 28 01:24 phpchartdir840mt.dll
-rwxr-xr-x 1 ykfpdata pg106956 14896 Nov 28 01:24 phpchartdir850.dll
-rwxr-xr-x 1 ykfpdata pg106956 14896 Nov 28 01:24 phpchartdir850mt.dll
[pdx1-shared-a1-23]$
So I might have to ask the hosting company support what else changed. |
Re: Host upgraded to PHP 8.3, charts down. |
| Posted by Paul Huffman on Apr-19-2026 07:54 |
|
The Dream Host tech support got back to me with:
"Since the file does exist and permissions look correct, the issue is very
likely related to the ChartDirector library itself rather than the
include path.
ChartDirector relies on compiled PHP extensions, and when PHP is upgraded
(in this case to 8.3), older versions of those compiled components often
become incompatible even if the PHP files are in place. This can cause
PHP to fail when trying to load the library, which then appears as a
"failed opening required" error.
Based on what you described, it sounds like the current ChartDirector
package may not fully match the PHP 8.3 environment.
At this point, you have two options:
Roll back the site to PHP 8.1, which should restore compatibility with
your previous working ChartDirector setup.
Install a version of ChartDirector that is specifically built for PHP 8.3
on Linux, ensuring that all required binary components are compatible
with the server environment."
The latest download of Chart Director shows .dll files from PHP 4.2 to 8.5 according to file name. Does the lib/phpchartdir.php somehow know which .dll is appropriate for the current PHP version? |
Re: Host upgraded to PHP 8.3, charts down. |
| Posted by Paul Huffman on Apr-19-2026 08:07 |
|
| I downloaded and installed the linux_64.tar.gz. Did I get the wrong one for my architecture? |
Re: Host upgraded to PHP 8.3, charts down. |
| Posted by Paul Huffman on Apr-19-2026 19:36 |
|
The hosting company's error logging system was not showing the error on the require_once line, so I thought the problem was fixed and there was some other PHP upgrade problem. But when I run the script in just its own frame like http://www.ykfp.org/php/lyletrap/lylesteelheadavar.php?year=2025, I get the error in the browser that I guess is from ChartDirector. At least this error reveals the system OS, so I might be trying the correct version of the ChartDirector download Linux (x86_64). What is the Linux (aarch64) version?
Error Loading ChartDirector for PHP Extension
It appears this PHP system has not loaded the ChartDirector extension by using an extension statement in the PHP configuration file (typically called "php.ini"). An attempt has been made to dynamically load ChartDirector on the fly, but it was not successful. Please refer to the Installation section of the ChartDirector for PHP documentation on how to resolve this problem.
Error Log
The version and type of PHP in this system does not support dynmaic loading of PHP extensions. All PHP extensions must be loaded by using extension statements in the PHP configuration file.
System Information
Operating System : Linux pdx1-shared-a1-23 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
PHP version : 8.3.27
PHP / Web Server interface : cgi-fcgi
PHP configuration file location : "/etc/php83/php.ini"
PHP extension directory : "/usr/local/php83/lib/php/extensions/no-debug-non-zts-20230831" |
Re: Host upgraded to PHP 8.3, charts down. |
| Posted by Paul Huffman on Apr-19-2026 20:19 |
|
Found it!
There was a line in the site's phprc file that was calling the 8.1 version:
extension=/home/ykfpdata/ykfp.org/php/ChartDirector/lib/phpchartdir810.dll
Changing that to 830.dll fixed everything.
Dream Host Support was worthless. Claude.ai was worthless. |
Re: Host upgraded to PHP 8.3, charts down. |
| Posted by Paul Huffman on Apr-20-2026 10:04 |
|
I looked at my forum posts over the years and most of them are variations on “Dreamhost upgraded PHP version again, chrts are down.” In 2017, I figured out that the phprc file was the key. https://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&pattern=Paul+Huffman&thread=1491601426#N1491604444
Also in my forum history was all the times Dream Host Support to.d me that .dll files in my Chart Director folders were windows files, wouldn’t run on Linux, so I had to get the correct download appropriate for Linux. |
|