This is very strange. However i made a patch (looking a different way if the constant has been set).
De-activate and delete the plugin, and re-install as if it is a new plugin.
You will loose no data or settings.
Pls tell me if it works.
Jacob,
Thanks for getting back to me. I deleted the plugin and installed it again. Immediately after Activating the plugin, I get these messages
Warning: mkdir(): No such file or directory in /usr/local/var/www/wordpress/wp-content/plugins/wp-photo-album-plus/wppa-setup.php on line 533
Warning: chmod(): No such file or directory in /usr/local/var/www/wordpress/wp-content/plugins/wp-photo-album-plus/wppa-setup.php on line 535
Warning: Constant WPPA_MULTISITE_INDIVIDUAL already defined in /usr/local/var/www/wordpress/wp-config.php on line 108
It looks to me as if the Constant warning is a PHP error, implying that it is defined elsewhere… Just a theory
What is your php version?
Jacob
I think I found a coding error at line 80 in wppa.php: it just says
defined(‘WPPA_MULTISITE_INDIVIDUAL’) or define( ‘WPPA_MULTISITE_INDIVIDUAL’, false );
I would have expected it to look like the lines above…
This was the patch.
Before it was like the other lines.
Try to find where the error occurs.
Is that in wppa.php?
Dont bother about the other warnings
One question: Does it do what it is supposed to do: every blog its own photo system?
If so, use the plugin editor an change:
defined('WPPA_MULTISITE_INDIVIDUAL') or define( 'WPPA_MULTISITE_INDIVIDUAL', false );
into:
@ defined('WPPA_MULTISITE_INDIVIDUAL') or define( 'WPPA_MULTISITE_INDIVIDUAL', false );
i.e. place an ampersand (@) in front of the statement. This is supposed to suppress errormessages.
Makes no difference!
It looks like your code is run before wp-config.php, hence, it is not defined, so gets defined, and then wp-config.php runs and thus generates the multiple definition.
php –version
PHP 8.1.8 (cli) (built: Jul 8 2022 10:58:31) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.8, Copyright (c) Zend Technologies
with Zend OPcache v8.1.8, Copyright (c), by Zend Technologies
I haven’t tried to see the behaviour, but (given my synopsis above), I doubt it will do what I want. I’ll try that next (in a couple of days – busy tomorrow!)
p.s. my theory is confirmed as, although the setting is made in wp-config.php, I still see the error message (below) when trying to do album admin
Erro:
WP Photo ALbum Plus Error message
This is a multi site installation. One of the following 3 lines must be entered in wp-config.php:
define( 'WPPA_MULTISITE_INDIVIDUAL', true );// Multisite WP 3.5 or later with every site its own albums and photos
define( 'WPPA_MULTISITE_BLOGSDIR', true );// Multisite prior to WP 3.5 with every site its own albums and photos
define( 'WPPA_MULTISITE_GLOBAL', true );// Multisite with one common set of albums and photos
Make sure it is high up in wp-config.php, i.e. before any include or require or function call.
I am on my phone now sp i can not give more details. But this could cause the problem
So, Warning: Constant WPPA_MULTISITE_INDIVIDUAL already defined in /usr/local/var/www/wordpress/wp-config.php on line 108 means that the error occurs on line 108. Confusing errormessage.
This means that
define( ‘WPPA_MULTISITE_INDIVIDUAL’, true );
is entered after
require_once ABSPATH . 'wp-settings.php';
what loads all the stoff, including wppa.php
define( ‘WPPA_MULTISITE_INDIVIDUAL’, true ); must be entered prior to
require_once ABSPATH . 'wp-settings.php';
See wp-config-sample.php:
/* Add any custom values between this line and the "stop editing" line. */
HERE TO ADD define( ‘WPPA_MULTISITE_INDIVIDUAL’, true );
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
Thanks. That worked. I should take more notice of the comments in wp-config.php. But, perhaps, you could be a bit more explicit in your instructions?
Thanks for your help.
Yes, that too. The explanation will be more specific in the next version, stating where to add the line.