Warning: fopen(/d6e2a260ef96e8b114ee5abb55a187b4c2557268) [function.fopen]: failed to open stream: Permission denied in /var/sites/s/seo-creative.co.uk/public_html/wp-content/plugins/fv-code-highlighter/Includes/Cache.php on line 137
Warning: fopen(/8c4231d60ebc28bb540113dcee780876a8b9f633) [function.fopen]: failed to open stream: Permission denied in /var/sites/s/seo-creative.co.uk/public_html/wp-content/plugins/fv-code-highlighter/Includes/Cache.php on line 137
Recently whilst developing a website we came across a small issue. We already had Contact Form 7 installed on a WordPress website, we also required a gallery for this website so included NextGen which is our bread and butter gallery. When trying to upload images to NextGen via the flash uploader we were presented with a PHP error. This error was seen within the popup box so we had to screen shot it to be able to figure out what the error was.
After finding that error we can see that its referring to the wpcf7_add_tag_generator function. After looking into this we find that this function is for the plugin Contact Form 7. However this is not the genuine issue, this is a knock on form something else.
The NextGen file upload.php does not actually require the wp-load.php file. This loads all of the plugins, then later on the WordPress admin bootstrap is included. This is a problem because WordPress already loaded this as a non-admin. The fix is actually quite simple. We just need to change the last line of NextGen’s ngg-config.php file. (this can be found in the root of the nextgen plugin folder)
require_once( WP_LOAD_PATH . 'wp-load.php');
require_once( WP_LOAD_PATH . 'wp-admin/admin.php');
That’s it! NextGen’s Flash up loader should now be working again.