Trying to update my site to php 7.3, But I keep getting errors session_start(): & PHP Warning: Cannot declare class

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
penguinsuits
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Mar 24, 2016 12:17 am

Trying to update my site to php 7.3, But I keep getting errors session_start(): & PHP Warning: Cannot declare class

Post by penguinsuits » Fri May 14, 2021 4:36 pm

So right now I am tiring to improve my websites performance by updating plugins, themes, cores files, etc; However for some stuff I cannot update unless I update my php. However when I do that, I break my website completely. The error I am getting is "session_start(): Failed to read session data: user (path: /var/cpanel/php/sessions/ea-php73) in /home1/miramarpool/public_html/libraries/joomla/session/handler/native.php on line 260" and " PHP Warning: Cannot declare class Joomla\CMS\Document\Renderer\Html\ModulesRenderer, because the name is already in use in /home1/miramarpool/public_html/templates/yootheme/vendor/yootheme/theme-joomla-modules/src/ModulesListener.php on line 22"

I have read some stuff about this issue and it seems to be a database error? Anyways I am completely lost I have tried to disable plugins, disabled my yootheme, I took a look at my configuration.php and everything was looking ok.
Forum Post Assistant (v1.6.2) : 14-May-2021 wrote:
Last PHP Error(s) Reported :: wrote:[14-May-2021 10:11:26 America/Chicago] PHP Warning: Cannot declare class Joomla\CMS\Document\Renderer\Html\ModulesRenderer, because the name is already in use in /home1/miramarpool/public_html/templates/yootheme/vendor/yootheme/theme-joomla-modules/src/ModulesListener.php on line 22
Basic Environment :: wrote:Joomla! Instance :: Joomla! 3.9.26-Stable (Amani) 13-April-2021
Joomla! Platform :: Joomla Platform 13.1.0-Stable (Curiosity) 24-Apr-2013
Joomla! Configured :: Yes | Read-Only (444) |
Configuration Options :: Offline: false | SEF: true | SEF Suffix: false | SEF ReWrite: true | .htaccess/web.config: Yes | GZip: true | Cache: false | CacheTime: 15 | CacheHandler: file | CachePlatformPrefix: false | FTP Layer: false | Proxy: false | LiveSite: | Session lifetime: 15 | Session handler: database | Shared sessions: false | SSL: 2 | Error Reporting: default | Site Debug: true | Language Debug: false | Default Access: 1 | Unicode Slugs: false | dbConnection Type: mysqli | PHP Supports J! 3.9.26: Yes | Database Supports J! 3.9.26: Unknown | Database Credentials Present: Yes |

Host Configuration :: OS: Linux | OS Version: 4.19.150-76.ELK.el6.x86_64 | Technology: x86_64 | Web Server: Apache | Encoding: gzip, deflate, br | System TMP Writable: Yes | Free Disk Space : 1097.61 GiB |

PHP Configuration :: Version: 7.3.28 | PHP API: cgi-fcgi | Session Path Writable: Yes | Display Errors: | Error Reporting: 32759 | Log Errors To: error_log | Last Known Error: 14th May 2021 11:19:01. | Register Globals: | Magic Quotes: | Safe Mode: | Allow url fopen: 1 | Open Base: | Uploads: 1 | Max. Upload Size: 512M | Max. POST Size: 516M | Max. Input Time: 60 | Max. Execution Time: 30 | Memory Limit: 256M

Database Configuration :: Connection Error: PHP function mysqli_connect not found.User Privileges : Unknown
Detailed Environment :: wrote:PHP Extensions :: Core (7.3.28) | date (7.3.28) | libxml (7.3.28) | openssl (7.3.28) | pcre (7.3.28) | zlib (7.3.28) | filter (7.3.28) | hash (7.3.28) | pcntl (7.3.28) | readline (7.3.28) | Reflection (7.3.28) | SPL (7.3.28) | session (7.3.28) | standard (7.3.28) | cgi-fcgi () | Zend Engine (3.3.28) |
Potential Missing Extensions :: xml | zip | curl | iconv | mbstring | mysqli | pdo_mysql |

Switch User Environment :: PHP CGI: Yes | Server SU: Yes | PHP SU: Yes | Potential Ownership Issues: No
Folder Permissions :: wrote:Core Folders :: images/ (755) | components/ (755) | modules/ (755) | plugins/ (755) | language/ (755) | templates/ (755) | cache/ (755) | logs/ (---) | tmp/ (755) | administrator/components/ (755) | administrator/modules/ (755) | administrator/language/ (755) | administrator/templates/ (755) | administrator/logs/ (755) |

Elevated Permissions (First 10) :: administrator/components/com_akeeba/backup/ (777) |
Extensions Discovered :: wrote:Components :: Site ::
Core :: com_mailto (3.0.0) ? | com_wrapper (3.0.0) ? |
3rd Party::

Components :: Admin ::
Core :: com_search (3.0.0) ? | com_tags (3.1.0) ? | com_config (3.0.0) ? | com_finder (3.0.0) ? | com_modules (3.0.0) ? | com_installer (3.0.0) ? | com_joomlaupdate (3.6.2) ? | com_login (3.0.0) ? | com_checkin (3.0.0) ? | com_cache (3.0.0) ? | com_privacy (3.9.0) ? | com_languages (3.0.0) ? | com_categories (3.0.0) ? | com_media (3.0.0) ? | com_menus (3.0.0) ? | com_actionlogs (3.9.0) ? | com_templates (3.0.0) ? | com_ajax (3.2.0) ? | com_postinstall (3.2.0) ? | com_admin (3.0.0) ? | com_users (3.0.0) ? | com_associations (3.7.0) ? | com_content (3.0.0) ? | com_newsfeeds (3.0.0) ? | com_messages (3.0.0) ? | com_contenthistory (3.2.0) ? | com_fields (3.7.0) ? | com_banners (3.0.0) ? | com_redirect (3.0.0) ? | com_plugins (3.0.0) ? | com_cpanel (3.0.0) ? |
3rd Party:: Akeeba (6.4.0) ? | sh404SEF (4.13.2.3783) ? | plg_system_shlib (0.3.1.661) ? | sh404sef - System plugin (4.13.2.3783) ? | sh404sef - System mobile template s (4.13.2.3783) ? | plg_installer_sh404sef (4.13.2.3783) ? | PLG_SH404SEFCORE_SH404SEFSOCIAL (4.13.2.3783) ? | sh404sef - Analytics plugin (4.13.2.3783) ? | sh404sef - Offline code plugin (4.13.2.3783) ? | sh404sef - Similar urls plugin (4.13.2.3783) ? | sh404sef - Default component suppor (4.13.2.3783) ? | COM_BREEZINGFORMS (1.9.1 Stable ) ? | sysbreezingforms (1.0.0) ? | com_widgetkit (2.9.21) ? | JCH Optimize Pro (5.2.9) ? | GSD (1.0) ? |

Modules :: Site ::
Core :: mod_articles_news (3.0.0) ? | mod_custom (3.0.0) ? | mod_footer (3.0.0) ? | mod_wrapper (3.0.0) ? | mod_articles_category (3.0.0) ? | mod_articles_categories (3.0.0) ? | mod_search (3.0.0) ? | mod_login (3.0.0) ? | mod_whosonline (3.0.0) ? | mod_languages (3.5.0) ? | mod_banners (3.0.0) ? | mod_articles_popular (3.0.0) ? | mod_stats (3.0.0) ? | mod_tags_popular (3.1.0) ? | mod_menu (3.0.0) ? | mod_articles_latest (3.0.0) ? | mod_related_items (3.0.0) ? | mod_feed (3.0.0) ? | mod_finder (3.0.0) ? | mod_tags_similar (3.1.0) ? | mod_breadcrumbs (3.0.0) ? | mod_articles_archive (3.0.0) ? | mod_random_image (3.0.0) ? | mod_users_latest (3.0.0) ? | mod_syndicate (3.0.0) ? |
3rd Party:: BreezingForms (1.8.4) ? | Builder (2.4.14) ? | POWr Form Builder (3.0) ? | Widgetkit (2.9.21) ? |

Modules :: Admin ::
Core :: mod_custom (3.0.0) ? | mod_latestactions (3.9.0) ? | mod_sampledata (3.8.0) ? | mod_stats_admin (3.0.0) ? | mod_login (3.0.0) ? | mod_status (3.0.0) ? | mod_quickicon (3.0.0) ? | mod_logged (3.0.0) ? | mod_toolbar (3.0.0) ? | mod_multilangstatus (3.0.0) ? | mod_menu (3.0.0) ? | mod_submenu (3.0.0) ? | mod_feed (3.0.0) ? | mod_popular (3.0.0) ? | mod_privacy_dashboard (3.9.0) ? | mod_latest (3.0.0) ? | mod_title (3.0.0) ? | mod_version (3.0.0) ? |
3rd Party::

Libraries ::
Core ::
3rd Party:: file_fof30 (3.7.0) ? |

Plugins ::
Core :: PLG_SYSTEM_ACTIONLOGS (3.9.0) ? | plg_system_logrotation (3.9.0) ? | plg_system_privacyconsent (3.9.0) ? | plg_system_fields (3.7.0) ? | plg_system_sessiongc (3.8.6) ? | plg_system_p3p (3.0.0) ? | plg_system_stats (3.5.0) ? | plg_system_languagecode (3.0.0) ? | plg_system_languagefilter (3.0.0) ? | plg_system_remember (3.0.0) ? | plg_system_log (3.0.0) ? | plg_system_cache (3.0.0) ? | plg_system_updatenotification (3.5.0) ? | plg_system_redirect (3.0.0) ? | plg_system_sef (3.0.0) ? | plg_system_debug (3.0.0) ? | plg_system_highlight (3.0.0) ? | plg_system_logout (3.0.0) ? | PLG_INSTALLER_URLINSTALLER (3.6.0) ? | plg_installer_webinstaller (1.1.1) ? | plg_installer_packageinstaller (3.6.0) ? | PLG_INSTALLER_FOLDERINSTALLER (3.6.0) ? | plg_fields_media (3.7.0) ? | plg_fields_radio (3.7.0) ? | plg_fields_imagelist (3.7.0) ? | plg_fields_url (3.7.0) ? | plg_fields_text (3.7.0) ? | plg_fields_list (3.7.0) ? | plg_fields_editor (3.7.0) ? | plg_fields_integer (3.7.0) ? | plg_fields_color (3.7.0) ? | plg_fields_calendar (3.7.0) ? | plg_fields_checkboxes (3.7.0) ? | plg_fields_sql (3.7.0) ? | plg_fields_repeatable (3.9.0) ? | plg_fields_usergrouplist (3.7.0) ? | plg_fields_user (3.7.0) ? | plg_fields_textarea (3.7.0) ? | plg_privacy_actionlogs (3.9.0) ? | plg_privacy_message (3.9.0) ? | plg_privacy_content (3.9.0) ? | plg_privacy_consents (3.9.0) ? | plg_privacy_user (3.9.0) ? | plg_search_tags (3.0.0) ? | plg_search_contacts (3.0.0) ? | plg_search_content (3.0.0) ? | plg_search_newsfeeds (3.0.0) ? | plg_search_categories (3.0.0) ? | plg_twofactorauth_totp (3.2.0) ? | plg_twofactorauth_yubikey (3.2.0) ? | PLG_ACTIONLOG_JOOMLA (3.9.0) ? | plg_content_fields (3.7.0) ? | plg_content_pagenavigation (3.0.0) ? | plg_content_confirmconsent (3.9.0) ? | plg_content_emailcloak (3.0.0) ? | plg_content_loadmodule (3.0.0) ? | plg_content_joomla (3.0.0) ? | plg_content_finder (3.0.0) ? | plg_content_vote (3.0.0) ? | plg_content_pagebreak (3.0.0) ? | plg_extension_joomla (3.0.0) ? | plg_captcha_recaptcha (3.4.0) ? | plg_captcha_recaptcha_invisible (3.8) ? | plg_quickicon_phpversioncheck (3.7.0) ? | plg_quickicon_extensionupdate (3.0.0) ? | plg_quickicon_joomlaupdate (3.0.0) ? | plg_quickicon_privacycheck (3.9.0) ? | plg_finder_tags (3.0.0) ? | plg_finder_contacts (3.0.0) ? | plg_finder_content (3.0.0) ? | plg_finder_newsfeeds (3.0.0) ? | plg_finder_categories (3.0.0) ? | plg_user_contactcreator (3.0.0) ? | plg_user_terms (3.9.0) ? | plg_user_profile (3.0.0) ? | plg_user_joomla (3.0.0) ? | plg_authentication_gmail (3.0.0) ? | plg_authentication_ldap (3.0.0) ? | plg_authentication_joomla (3.0.0) ? | plg_authentication_cookie (3.0.0) ? | plg_editors-xtd_article (3.0.0) ? | plg_editors-xtd_menu (3.7.0) ? | plg_editors-xtd_fields (3.7.0) ? | plg_editors-xtd_image (3.0.0) ? | plg_editors-xtd_readmore (3.0.0) ? | plg_editors-xtd_module (3.5.0) ? | plg_editors-xtd_pagebreak (3.0.0) ? |
3rd Party:: System - Widgetkit K2 (2.9.21) ? | plg_system_gsd (4.0.8) ? | System - YOOtheme Framework (2.4.14) ? | System - Widgetkit (2.9.21) ? | PLG_SYSTEM_AKEEBAACTIONLOG (1.0) ? | plg_system_shlib (0.3.1.661) ? | System - Widgetkit ZOO (2.9.21) ? | PLG_SYSTEM_BACKUPONUPDATE (3.7) ? | sh404sef - System plugin (4.13.2.3783) ? | sh404sef - System mobile template s (4.13.2.3783) ? | PLG_SYSTEM_JCH_OPTIMIZE (5.2.9) ? | plg_system_nrframework (4.2.4) ? | sysbreezingforms (1.0.0) ? | PLG_SYSTEM_AKEEBAUPDATECHECK (1.1) ? | plg_editors_codemirror (5.60.0) ? | plg_editors_tinymce (4.5.12) ? | Installer - YOOtheme (1.0.3) ? | plg_installer_sh404sef (4.13.2.3783) ? | Fields - YOOtheme Location (2.4.14) ? | PLG_GSD_HIKASHOP (1.0) ? | PLG_GSD_VIRTUEMART (1.0) ? | PLG_GSD_RSBLOG (1.0) ? | PLG_GSD_SPPAGEBUILDER (1.0) ? | PLG_GSD_ESHOP (1.0) ? | PLG_GSD_EVENTBOOKING (1.0) ? | PLG_GSD_EASYBLOG (1.0) ? | PLG_GSD_CONTENT (1.0) ? | PLG_GSD_K2 (1.0) ? | PLG_GSD_J2STORE (1.0) ? | PLG_GSD_JSHOPPING (1.0) ? | PLG_GSD_ZOO (1.0) ? | PLG_GSD_MENUS (1.0) ? | Content - Widgetkit (2.9.21) ? | POWr Shortcodes (3.0) ? | BreezingForms (1.8) ? | PLG_SH404SEFCORE_SH404SEFSOCIAL (4.13.2.3783) ? | sh404sef - Analytics plugin (4.13.2.3783) ? | sh404sef - Offline code plugin (4.13.2.3783) ? | sh404sef - Similar urls plugin (4.13.2.3783) ? | sh404sef - Default component suppor (4.13.2.3783) ? | plg_quickicon_akeebabackup (1.0) ? | Editors-XTD - Widgetkit (2.9.21) ? | POWr Icon (1.0) ? |
Templates Discovered :: wrote:Templates :: Site :: yootheme (2.4.14) ? | protostar (1.0) ? | beez3 (3.1.0) ? |
Templates :: Admin :: isis (1.0) ? | hathor (3.0.0) ? |
Last edited by toivo on Fri May 14, 2021 11:03 pm, edited 1 time in total.
Reason: mod note: disabled smilies in post Options for readability

User avatar
abernyte
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3992
Joined: Fri May 15, 2009 2:01 pm
Location: Écosse - Scozia - Escocia - Škotija -स्कॉटलैंड

Re: Trying to update my site to php 7.3, But I keep getting errors session_start(): & PHP Warning: Cannot declare class

Post by abernyte » Fri May 14, 2021 5:19 pm

The module MySQLi is not running by default in your build of PHP7.3
If your hosting uses cPanel then you can go in and enable that module in the PHP7.3 settings. If not speak to your host.
What we obtain too cheap, we esteem too lightly…Thomas Paine

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27814
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Trying to update my site to php 7.3, But I keep getting errors session_start(): & PHP Warning: Cannot declare class

Post by Per Yngve Berg » Fri May 14, 2021 6:21 pm

You are missing other modules as well

Potential Missing Extensions :: xml | zip | curl | iconv | mbstring | mysqli


Session handler: database

Change it to php (none)

More efficient with php 7.

p3ngu[n
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Mar 31, 2015 8:12 pm

Re: Trying to update my site to php 7.3, But I keep getting errors session_start(): & PHP Warning: Cannot declare class

Post by p3ngu[n » Fri May 14, 2021 7:22 pm

abernyte wrote:
Fri May 14, 2021 5:19 pm
The module MySQLi is not running by default in your build of PHP7.3
If your hosting uses cPanel then you can go in and enable that module in the PHP7.3 settings. If not speak to your host.
Ok, So where would I go to edit that info in the cPanel? Sorry for asking but I have no idea where that is, is it the multiphp tool?

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 6753
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Trying to update my site to php 7.3, But I keep getting errors session_start(): & PHP Warning: Cannot declare class

Post by AMurray » Fri May 14, 2021 9:59 pm

We don't know anything about your web host (company) and what they provide, so it is better you speak to their support, or refer to their documentation on how to do these sorts of things.

The multi-php may be the place - it sounds like you can change the PHP version there, but it should also have options to turn on the PHP modules such as MySQLIi.
Regards - A Murray


Post Reply

Return to “General Questions/New to Joomla! 3.x”