-
Hi all, While trying to install OpenDCIM 23.01 I encountered the following error. Fatal error: Uncaught Error: Undefined constant PDO::MYSQL_ATTR_INIT_COMMAND in /var/www/html/db.inc.php:34 Stack trace: #0 /var/www/html/index.php(11): require_once() #1 {main} thrown in /var/www/html/db.inc.php on line 34 The preflight had everything listed as GOOD. rightscheck was correct. I have verified the db user/password are valid from the command line. PHP 8.0.20 Apache 2.4.37 Centos/RHEL 8.7 MariaDB 8.0.30 This is the code segment $pdo_options=array(
9 out 10 chance I missed a really simple step, but I'm not seeing the issue. Any guidance would be appreciated! Regards, Wade |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 11 replies
-
It's most likely you didn't install the php-pdo module. See the rhel9 install instructions they should be similar enough to rocky/centos/alma/rhel 8. If I need to make a specific set for 8 with the appstreams/module statements I can.
https://github.com/opendcim/openDCIM/wiki/RHEL
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: wade-lich ***@***.***>
Sent: Thursday, June 1, 2023 5:32:11 AM
To: opendcim/openDCIM ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [opendcim/openDCIM] Apache Error 500 v23.01 (Discussion #1365)
Hi all,
While trying to install OpenDCIM 23.01 I encountered the following error.
Fatal error: Uncaught Error: Undefined constant PDO::MYSQL_ATTR_INIT_COMMAND in /var/www/html/db.inc.php:34 Stack trace: #0 /var/www/html/index.php(11): require_once() #1<#1> {main} thrown in /var/www/html/db.inc.php on line 34
The preflight had everything listed as GOOD.
rightscheck was correct.
I have verified the db user/password are valid from the command line.
PHP 8.0.20
Apache 2.4.37
Centos/RHEL 8.7
MariaDB 8.0.30
This is the code segment
$pdo_options=array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
PDO::ATTR_PERSISTENT => true
);
try{
$pdoconnect="mysql:host=$dbhost;port=$dbport;dbname=$dbname";
***@***.*** PDO($pdoconnect,$dbuser,$dbpass,$pdo_options);
$dbh->exec("SET @@SESSION.sql_mode = ''");
}catch(PDOException $e){
printf( "Error! %s\n", $e->getMessage() );
die();
}
9 out 10 chance I missed a really simple step, but I'm not seeing the issue.
Any guidance would be appreciated!
Regards,
Wade
—
Reply to this email directly, view it on GitHub<#1365>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAMTY6R2VT5FDKWE3TBKULDXJBVSXANCNFSM6AAAAAAYWWYSN4>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#1365", "url": "#1365", "name": "View Discussion" }, "description": "View this Discussion on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
Beta Was this translation helpful? Give feedback.
-
I verified it is installed. Package httpd-2.4.37-51.0.1.module+el8.7.0+20778+02173b8e.x86_64 is already installed. -- Wade |
Beta Was this translation helpful? Give feedback.
-
Did you restart apache and/or php-fpm after installing the php-pdo module? |
Beta Was this translation helpful? Give feedback.
-
many times and rebooted too. |
Beta Was this translation helpful? Give feedback.
-
I will try to recreate. I just installed a fresh RHEL8.7 system and will try to duplicate my dev environment there, but I have plans for the next week already that will keep me away from the keyboard so don't expect anything extremely quickly. |
Beta Was this translation helpful? Give feedback.
-
php-mysqlnd was missing. I had copied and pasted the install line from the link, but it didn't even attempt to install it. So, I've moved past that part onto another problem... |
Beta Was this translation helpful? Give feedback.
-
Ok then... Here's my newest error. Fatal error: Unparenthesized Additionally, when running asset reports, it loads the meter, says starting then does noting after that. |
Beta Was this translation helpful? Give feedback.
-
Fatal error: Uncaught Error: Class "PhpOffice\PhpSpreadsheet\Worksheet\PageSetup" not found in /var/www/html/report_asset_Excel.php:171 Stack trace: #0 {main} thrown in /var/www/html/report_asset_Excel.php on line 171 |
Beta Was this translation helpful? Give feedback.
-
We discussed that module on IRC this morning and it appears the rhel build of PHP8 contains the zip module as part of the base
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: wade-lich ***@***.***>
Sent: Friday, June 2, 2023 6:57:22 AM
To: opendcim/openDCIM ***@***.***>
Cc: Wilbur Longwisch ***@***.***>; Mention ***@***.***>
Subject: Re: [opendcim/openDCIM] Apache Error 500 v23.01 (Discussion #1365)
The only php zip utility in 8's repo is php-pecl-zip.x86_64 : A ZIP archive management extension, which I do have installed. php-zip does not show up in a repo search. Is this package acceptable?
: [1347] ***@***.***:www # ; php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed: /etc/php.d/10-opcache.ini,
/etc/php.d/20-bz2.ini,
/etc/php.d/20-calendar.ini,
/etc/php.d/20-ctype.ini,
/etc/php.d/20-curl.ini,
/etc/php.d/20-dom.ini,
/etc/php.d/20-exif.ini,
/etc/php.d/20-fileinfo.ini,
/etc/php.d/20-ftp.ini,
/etc/php.d/20-gd.ini,
/etc/php.d/20-gettext.ini,
/etc/php.d/20-iconv.ini,
/etc/php.d/20-intl.ini,
/etc/php.d/20-ldap.ini,
/etc/php.d/20-mbstring.ini,
/etc/php.d/20-mysqlnd.ini,
/etc/php.d/20-pdo.ini,
/etc/php.d/20-phar.ini,
/etc/php.d/20-simplexml.ini,
/etc/php.d/20-snmp.ini,
/etc/php.d/20-sockets.ini,
/etc/php.d/20-sqlite3.ini,
/etc/php.d/20-tokenizer.ini,
/etc/php.d/20-xml.ini,
/etc/php.d/20-xmlwriter.ini,
/etc/php.d/20-xsl.ini,
/etc/php.d/30-mysqli.ini,
/etc/php.d/30-pdo_mysql.ini,
/etc/php.d/30-pdo_sqlite.ini,
/etc/php.d/30-xmlreader.ini,
/etc/php.d/40-zip.ini
FWIW - I dumped the entire directory and started from scratch now that the DB has been upgraded from 20.01 -> 23.01. That part took four refreshes before it completed. I configured httpd for SSL, edited the db.inc.php, set my db/dbuser/dbpass, disable apache auth, enabled ldap, updated the install base URL, renamed install.php and migrated my images and drawings. So far everything, except for some of the reports, is working just as before/expected. Also had to rebuild the image cache.
I appreciate the help you're giving!!
—
Reply to this email directly, view it on GitHub<#1365 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAMTY6S6BKYNHM2X3UNKPXDXJHWMFANCNFSM6AAAAAAYWWYSN4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#1365 (reply in thread)", "url": "#1365 (reply in thread)", "name": "View Discussion" }, "description": "View this Discussion on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
Beta Was this translation helpful? Give feedback.
-
Here's a complete list of the Reports that are causing 500 errors: Fatal error: Uncaught Error: Undefined constant PhpOffice\PhpSpreadsheet\Collection\CellsFactory::cache_in_memory_serialized in /var/www/ip_default/report_asset_Excel.php:1781 Stack trace: #0 {main} thrown in /var/www/ip_default/report_asset_Excel.php on line 1781Fatal error: Uncaught PhpOffice\PhpSpreadsheet\Exception: File /var/www/ip_default/logo.png not found! in /var/www/ip_default/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing.php:134 Stack trace: #0 /var/www/ip_default/report_projects.php(67): PhpOffice\PhpSpreadsheet\Worksheet\Drawing->setPath() #1 {main} thrown in /var/www/ip_default/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing.php on line 134report_network_map.php with "Cabinet" option:
|
Beta Was this translation helpful? Give feedback.
-
As it turns out, 80% of the problems went away when error reporting was removed. What it tells me is there's a lot of warning/errors/deprecation that the code just otherwise skips over unless it's asked to share. At this point I can live without the things that are still not functioning. Thanks for the help. |
Beta Was this translation helpful? Give feedback.
-
Display errors causes functions to break because it outputs to the client immediately. You should definitely not have that enabled.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: wade-lich ***@***.***>
Sent: Tuesday, June 6, 2023 2:06:38 PM
To: opendcim/openDCIM ***@***.***>
Cc: Wilbur Longwisch ***@***.***>; Mention ***@***.***>
Subject: Re: [opendcim/openDCIM] Apache Error 500 v23.01 (Discussion #1365)
As it turns out, 80% of the problems when away when error reporting was removed.
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
What it tells me is there's a lot of warning/errors/deprecation that the code just otherwise skips over unless it's asked to share. At this point I can live without the things that are still not functioning.
Thanks for the help.
—
Reply to this email directly, view it on GitHub<#1365 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAMTY6QH3JYLMIJJQLYBYWDXJ6LV5ANCNFSM6AAAAAAYWWYSN4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#1365 (comment)", "url": "#1365 (comment)", "name": "View Discussion" }, "description": "View this Discussion on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
Beta Was this translation helpful? Give feedback.
https://github.com/opendcim/openDCIM/wiki/RHEL
RHEL8 required packages and fully tested instructions added. This was done from a minimal install of RHEL8.7 same as I did for the RHEL9. I didn't have the 8.8 ISO downloaded or I would have done that, it shouldn't have changed. The differences with centos8 stream should be minimal.