Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Troubleshooting › Error in estore_configs.php
- This topic has 9 replies, 4 voices, and was last updated 13 years, 1 month ago by admin.
-
AuthorPosts
-
September 29, 2011 at 12:41 pm #4443gamehermitMember
Hi,
I notice d the following error at the top of the page when I logged into my WP admin section:
Code:Warning: unserialize() expects parameter 1 to be string, array given in /home/pumpkin/public_html/wp-content/plugins/wp-cart-for-digital-products/eStore_configs.php on line 8[admin deleted code]
I haven’t tweaked the file or added any plugins…
Thanks,
Jack
September 29, 2011 at 1:09 pm #37151wzpModeratorFor now, I think you can safely ignore it. Your PHP runtime has either E_NOTICE or E_WARNING turned on.
September 29, 2011 at 3:00 pm #37152gamehermitMemberThanks wzp. Any idea why that would start showing up all of a sudden? No changes were made on the server. Is there a way to correct it?
Thanks,
Jack
September 29, 2011 at 3:19 pm #37153wzpModeratorYour provider might have upgraded their version of PHP.
For now, try changing that line from…
$this->configs = unserialize(get_option(‘wp_eStore_plugin_configs’)) ;
To…
$this->configs = @unserialize(get_option(‘wp_eStore_plugin_configs’)) ;
September 29, 2011 at 3:31 pm #37154gamehermitMemberThanks wzp….LOL…it magically fixed itself. No idea what happened
Thanks,
Jack
September 29, 2011 at 4:08 pm #37155wzpModeratorAdding the “@” tells PHP to supress error messages for that particular line.
September 30, 2011 at 12:56 am #37156adminKeymasterCan you tell me what version of PHP your server is using now?
October 7, 2011 at 3:03 am #37157mmdsMemberHello,
I just got this error as well but the @ didn’t help. My version of PHP is 5.2.17 and it didn’t change between this afternoon when I logged into my CPanel and just now when this error appeared (I refreshed – happened to have it still open!)
The problem I’m encountering, though, is that when this error shows up I can’t reset the sales data (taking my site from test to online) and I can’t manually change the info within the product itself. It stays as 1 purchased, 0 available.
Does anyone have any idea what’s happened and how I can wrap this up so I can get my site online? Seems every time I’m ready to go live, something minor happens that screws everything up in a major way Par for the course, but I’d really love for this to be ready to go! THANKS!
October 7, 2011 at 12:14 pm #37158wzpModeratorIf we are talking about the same EXACT error, on line 8 of the eStore_configs.php file, try changing it to this:
$this->configs = @unserialize( (string) get_option(‘wp_eStore_plugin_configs’)) ;
In addition to the “@” to suppress error messages; we are adding “(string)” in order to force-cast the parameter to a string type.
Technical explanation: get_option() is capable of returning a mixed cast result, but unserialize() expects a string cast parameter.
October 8, 2011 at 2:37 am #37159adminKeymasterI am modified the plugin slightly that should take care of this issue. If you are seeing this error on your server then please get another build of eStore from here and it should fix it:
-
AuthorPosts
- You must be logged in to reply to this topic.