stream
stream copied to clipboard
Fatal Error on Activate Plugin PHP 8.2.25
Bug Report
Link to the support forum: https://wordpress.org/support/topic/fatal-error-on-activate-plugin-php-8-2-25/
Expected Behavior
I'm able to activate the plugin when running on PHP 8.2.25
Describe what should happen.
Actual Behavior
Describe what actually happens.
Just sent a site live, installed Stream and it went straight to āactivateā (so must have already been installed even though it was not showing). On activate I get āPlugin could not be activated because it triggered a fatal errorā. I have deleted plugin and reinstalled same deal.
Hereās the log (actual domain replaced with the word āsiteā in these paths for privacy)
AH01071: Got error āPHP message: PHP Warning: Undefined global variable $wp_stream in [/var/www/vhosts/site/httpdocs/wp-content/plugins/stream/stream.php](https://daphne.creativewebhosting.com.au:8443/smb/file-manager/code-editor?currentDir=%2Fhttpdocs%2Fwp-content%2Fplugins%2Fstream&subscriptionId=25&file=stream.php&redirect=%2Fsmb%2Flog-file%2Fbrowser%2Fid%2F25) on line 67; PHP message: PHP Warning: Attempt to read property āinstallā on null in [/var/www/vhosts/site/httpdocs/wp-content/plugins/stream/includes/db-updates.php](https://daphne.creativewebhosting.com.au:8443/smb/file-manager/code-editor?currentDir=%2Fhttpdocs%2Fwp-content%2Fplugins%2Fstream%2Fincludes&subscriptionId=25&file=db-updates.php&redirect=%2Fsmb%2Flog-file%2Fbrowser%2Fid%2F25) on line 20; PHP message: PHP Fatal error: Uncaught Error: Call to a member function install() on null in [/var/www/vhosts/site/httpdocs/wp-content/plugins/stream/includes/db-updates.php](https://daphne.creativewebhosting.com.au:8443/smb/file-manager/code-editor?currentDir=%2Fhttpdocs%2Fwp-content%2Fplugins%2Fstream%2Fincludes&subscriptionId=25&file=db-updates.php&redirect=%2Fsmb%2Flog-file%2Fbrowser%2Fid%2F25):20\nStack trace:\n#0 [internal function]: wp_stream_update_auto_308()\n#1 [/var/www/vhosts/site/httpdocs/wp-content/plugins/stream/classes/class-install.php](https://daphne.creativewebhosting.com.au:8443/smb/file-manager/code-editor?currentDir=%2Fhttpdocs%2Fwp-content%2Fplugins%2Fstream%2Fclasses&subscriptionId=25&file=class-install.php&redirect=%2Fsmb%2Flog-file%2Fbrowser%2Fid%2F25)(340): call_user_func()\n#2 [/var/www/vhosts/site/httpdocs/wp-content/plugins/stream/classes/class-install.php](https://daphne.creativewebhosting.com.au:8443/smb/file-manager/code-editor?currentDir=%2Fhttpdocs%2Fwp-content%2Fplugins%2Fstream%2Fclasses&subscriptionId=25&file=class-install.php&redirect=%2Fsmb%2Flog-file%2Fbrowser%2Fid%2F25)(111): WP_Stream\\Install->update()\n#3 [/var/www/vhosts/site/httpdocs/wp-content/plugins/stream/classes/class-install.php](https://daphne.creativewebhosting.com.au:8443/smb/file-manager/code-editor?currentDir=%2Fhttpdocs%2Fwp-content%2Fplugins%2Fstream%2Fclasses&subscriptionId=25&file=class-install.php&redirect=%2Fsmb%2Flog-file%2Fbrowser%2Fid%2F25)(77): WP_Stream\\Install->check()\n#4 [/var/www/vhosts/site/httpdocs/wp-content/plugins/stream/classes/class-db-driver-wpdb.php](https://daphne.creativewebhosting.com.au:8443/smb/file-manager/code-editor?currentDir=%2Fhttpdocs%2Fwp-content%2Fplugins%2Fstream%2Fclasses&subscriptionId=25&file=class-db-driver-wpdb.php&redirect=%2Fsmb%2Flog-file%2Fbrowser%2Fid%2F25)(166): WP_Stream\\Install->__construct()\n#5 [/var/www/vhosts/site/httpdocs/wp-content/plugins/stream/classes/class-plugin.php](https://daphne.creativewebhosting.com.au:8443/smb/file-manager/code-editor?currentDir=%2Fhttpdocs%2Fwp-content%2Fplugins%2Fstream%2Fclasses&subscriptionId=25&file=class-plugin.php&redirect=%2Fsmb%2Flog-file%2Fbrowser%2Fid%2F25)(163): WP_Stream\\DB_Driver_WPDB->setup_storage()\n#6 [/var/www/vhosts/site/httpdocs/wp-content/plugins/stream/stream.php](https://daphne.creativewebhosting.com.au:8443/smb/file-manager/code-editor?currentDir=%2Fhttpdocs%2Fwp-content%2Fplugins%2Fstream&subscriptionId=25&file=stream.php&redirect=%2Fsmb%2Flog-file%2Fbrowser%2Fid%2F25)(42): WP_Stream\\Plugin->__construct()\n#ā¦ā, referer: https://site/wp-admin/plugins.php
Steps to Reproduce the Problem
Screenshots
Drag and drop screenshots in this area that help illustrate the problem.
System Information
- Stream plugin version:
- WordPress version:
- PHP version 8.2.25
- Browser:
- Computer operating system:
Just for a reference I wasn't able to reproduce it on my end. Asked for more details.
Using this Docker setup
# docker-compose.yml
services:
wordpress:
build: .
restart: always
ports:
- "8080:80"
environment:
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress_password
- WORDPRESS_DB_NAME=wordpress
volumes:
- wordpress_data:/var/www/html
depends_on:
- db
db:
image: mysql:8.0
restart: always
environment:
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=wordpress_password
- MYSQL_ROOT_PASSWORD=somewordpress
volumes:
- db_data:/var/lib/mysql
volumes:
wordpress_data:
db_data:
# Dockerfile
FROM php:8.2.25-apache
# Install required PHP extensions and dependencies
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libzip-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
gd \
mysqli \
zip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Download and install WordPress
RUN curl -o wordpress.tar.gz https://wordpress.org/latest.tar.gz \
&& tar -xzf wordpress.tar.gz \
&& mv wordpress/* /var/www/html/ \
&& rm wordpress.tar.gz \
&& rm -rf wordpress \
&& chown -R www-data:www-data /var/www/html
# Copy wp-config.php
RUN mv /var/www/html/wp-config-sample.php /var/www/html/wp-config.php \
&& sed -i 's/database_name_here/wordpress/' /var/www/html/wp-config.php \
&& sed -i 's/username_here/wordpress/' /var/www/html/wp-config.php \
&& sed -i 's/password_here/wordpress_password/' /var/www/html/wp-config.php \
&& sed -i 's/localhost/db/' /var/www/html/wp-config.php
# Configure Apache
RUN a2enmod rewrite