dtsullc
Forum Replies Created
-
Hey Anton, glad to hear that was an old bit of code no longer needed. It got me a little worried. Anyway, the setup is fairly straightforward. It is the lastest version of WordPress running on the Bitnami image on an AWS Lightsail instance. The only other stuff is a handful of extensions but as mentioned previously all caching was cleared and we rebooted everything. Other than that it appears we are all good to go.
That all being said, it appears that changing the wp-config.php file permissions to 0660 has allowed the plugin to register successfully. In the database I am now seeing
cf-images-setup-doneis set to 1, same withcf-images-config-writtenI am also now seeing the CF_IMAGES definitions in the wp-config.php as expected. Please let me know what you think about the
/bitnami/word press/wp-content/plugins/cf-images/app/class-settings.phpissue notated above, but otherwise it looks like we are off to the races.It appears line 179 is running
chmod( $wp_config_path, FS_CHMOD_FILE );Is there any reason this is occuring? I don’t understand why the plugin is attempting to modify file permissions of the wp-config.php file. Adding a debug like to write
FS_CHMOD_FILEout returns463, which would evaluate to Owner: read, Group: readwrite, Public: write-execute. This does not seem correct. Could you please explain what this is for?[02-Jul-2023 20:17:34 UTC] 436 [02-Jul-2023 20:17:34 UTC] PHP Warning: chmod(): Operation not permitted in /bitnami/word press/wp-content/plugins/cf-images/app/class-settings.php on line 179 [02-Jul-2023 20:17:36 UTC] 436 [02-Jul-2023 20:17:36 UTC] PHP Warning: chmod(): Operation not permitted in /bitnami/word press/wp-content/plugins/cf-images/app/class-settings.php on line 179 [02-Jul-2023 20:17:38 UTC] Media loadedAltering the wp-config.php permission from 0640 to 0660 has allowed the plugin to initialize and get past the initial conditional in your code. That being said, now I am seeing:
[02-Jul-2023 20:10:30 UTC] PHP Warning: chmod(): Operation not permitted in /bitnami/word press/wp-content/plugins/cf-images/app/class-settings.php on line 179 [02-Jul-2023 20:10:32 UTC] PHP Warning: chmod(): Operation not permitted in /bitnami/word press/wp-content/plugins/cf-images/app/class-settings.php on line 179 [02-Jul-2023 20:10:34 UTC] Media loadedAnd just to verify, removing the comment indeed breaks it. Also, removing the manual definition in the wp-config.php file brings me back to the beginning.
Here are some logs after trying to save the ID, and this I am sure is the actual problem:
[02-Jul-2023 20:07:02 UTC] PHP Warning: fopen(/opt/bitnami/wordpress/wp-config.php): fail
ed to open stream: Permission denied in /bitnami/wordpress/wp-content/plugins/cf-images/ap
p/class-settings.php on line 171
[02-Jul-2023 20:07:02 UTC] PHP Warning: fwrite() expects parameter 1 to be resource, bool
given in /bitnami/wordpress/wp-content/plugins/cf-images/app/class-settings.php on line 1
72
[02-Jul-2023 20:07:02 UTC] PHP Warning: fclose() expects parameter 1 to be resource, bool
given in /bitnami/wordpress/wp-content/plugins/cf-images/app/class-settings.php on line 1
73
[02-Jul-2023 20:07:02 UTC] PHP Warning: chmod(): Operation not permitted in /bitnami/word
press/wp-content/plugins/cf-images/app/class-settings.php on line 179
[02-Jul-2023 20:07:04 UTC] PHP Warning: fopen(/opt/bitnami/wordpress/wp-config.php): fail
ed to open stream: Permission denied in /bitnami/wordpress/wp-content/plugins/cf-images/ap
p/class-settings.php on line 171
[02-Jul-2023 20:07:04 UTC] PHP Warning: fwrite() expects parameter 1 to be resource, bool
given in /bitnami/wordpress/wp-content/plugins/cf-images/app/class-settings.php on line 1
72
[02-Jul-2023 20:07:04 UTC] PHP Warning: fclose() expects parameter 1 to be resource, bool
given in /bitnami/wordpress/wp-content/plugins/cf-images/app/class-settings.php on line 1
73
[02-Jul-2023 20:07:04 UTC] PHP Warning: chmod(): Operation not permitted in /bitnami/word
press/wp-content/plugins/cf-images/app/class-settings.php on line 179Okay, so after commenting out the lines provided it is working. I also see the
media loadedlog entries.If you do see the columns, then, most likely, something is wrong with finding the API key defines.
In regards to this, could you provide some insight as to why this might be happening? In my wp-config.php file I have added the following lines:
define( 'CF_IMAGES_ACCOUNT_ID', '7dREDACTEDc6' );
define( 'CF_IMAGES_KEY_TOKEN', 'qREDACTED8' );Since both of these are defined the plugin appears connected. Is there something else I am missing?
I do see the following two cf-images files loading on the frontend:
wp-content/plugins/cf-images/assets/css/cf-images-media.min.css?ver=1.3.0/wp-content/plugins/cf-images/assets/js/cf-images.min.js
Just no button to upload and no column on current status.
Also we are currently running WordPress version 6.2.2
- This reply was modified 2 years, 11 months ago by dtsullc.
I tried completely removing all cache on the local server, cleared the varnish cache and purged all Cloudflare cache as I have been bitten by that before. Still nothing unfortunately.
In a further effort to ensure everything was removed, we rebooted the server after clearing all server side cache and while it was rebooting cleared the Cloudflare cache again. To rule out local cache as well utilized a different browser (FireFox this time) in In-Private mode. Still no dice.
Is there any way to get some logging on the plugin to figure out why it doesn’t show that column or if there are errors somewhere? I tried turning on wp_debug and wp_debug_log but didn’t see any plugin specific notices/errors related to cf-images.
Also, we are using Bitnami for our WordPress deployment if that helps in any way