Bring Your Business to Life › Support › Image Store › PHP Warning
- AuthorPosts
- December 21, 2013 at 11:40 am #55541lch503Participant
Hello,
I have upgraded my WordPress installation to 3.8 and am currently rewriting the extension for the CDs.
I have noticed a wordpress php warning in my log whenever an error message appears on screen after a submit button press.
PHP Warning: Cannot modify header information – headers already sent by (output started at /wp-content/plugins/image-store/_inc/core.php:607) in /wp-includes/option.php on line 564
I hope this helps.
Leon
December 22, 2013 at 2:26 pm #55558Xpark MediaKeymasterare your trying to set http headers or redirect a page on your plugin? if you are this is the cause of the warning.
try to set http headers or redirects in the WordPress “int” hook or Image Store’s “ims_init”
December 23, 2013 at 9:38 am #55571lch503ParticipantI get the warning even if my plugin is disabled, I have upgraded to 3.4.2.
It is whenever a submit button is pressed and the store needs to make an error appear (such as “a name is required” in pricing.php when the “add list” submit button is pressed when the name text field is blank).
By the looks of things it relates to the use of echo in the error_message function in core.php (line 607) and the setcookie function on lines 563 and 564 in option.php.
I will try another WordPress installation to see if I get the same php warning.
Thanks,
Leon
December 23, 2013 at 9:58 am #55572lch503ParticipantI have tried with a fresh installation of WordPress 3.8, fresh database, image-store 3.4.2 and still receive the warnings.
Thanks,
Leon
December 23, 2013 at 11:57 pm #55576Xpark MediaKeymasterDo you see the error on the front-end or back-end? is WordPress debug setting on?
We ran a few tests with a clean WordPress installation, the default theme and just Image Store active; we were not able to duplicate the issue.
This could be a PHP configuration on your server, the plugin uses ob_start() to avoid header warnings, be sure your server allows for stackable output buffers.
December 24, 2013 at 2:54 am #55584lch503ParticipantI’m just using a local standard installation of MAMP for testing. I haven’t changed any of the settings under the hood, only adding a database and relocating the htdocs directory.
I find it’s only in the backend. It’s weird as it all seems to work, so I don’t really understand it either! Never mind, no point in worrying about it if you don’t get the issue, I thought it might have been something with wordpress 3.8.
Thanks for your time in trying to resolve the issue.
Merry Christmas!
Leon
- AuthorPosts
- You must be logged in to reply to this topic.