latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Error in utils-conds

Home Forums Community Forum Error in utils-conds

This topic contains 5 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 8 months ago.

Topic Author Topic
Posted: Thursday May 3rd, 2012 at 12:43 pm #12479

Hi, we’re receiving this error:
Parse error: syntax error, unexpected ‘.’, expecting ‘(‘ in /home/simalam/public_html/achieveconsultinggroup.ca/wp-content/plugins/s2member/includes/classes/utils-conds.inc.php on line 136

Here’s the function starting on line 136

public static function is_achieveconsultinggroup.simalam.ca()
{
if((defined(“achieveconsultinggroup.simalam.ca”) && achieveconsultinggroup.simalam.ca) || stripos($_SERVER[“HTTP_HOST”], “achieveconsultinggroup.simalam.ca”) !== false || strpos($_SERVER[“HTTP_HOST”], “127.0.0.1”) !== false)
return true;
/**/ return /* Default return false. */ false;
}

Here’s the previous working copy:
public static function is_localhost()
{
if((defined(“LOCALHOST”) && LOCALHOST) || stripos($_SERVER[“HTTP_HOST”], “localhost”) !== false || strpos($_SERVER[“HTTP_HOST”], “127.0.0.1”) !== false)
return true;
/**/
return /* Default return false. */ false;
}

I know we’re missing something basic, however fresh eyes and thoughts would be appreciated. Thanks!

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Thursday May 3rd, 2012 at 11:54 pm #12537

You have periods in the function’s name. http://www.php.net/manual/en/functions.user-defined.php

A valid function name starts with a letter or underscore, followed by any number of letters, numbers, or underscores.

Is this something you customized in the file? The function has your domain name and I don’t think s2Member does that.

If you can’t fix it, could you upload a fresh copy of the file to your server to overwrite it?

Posted: Monday May 7th, 2012 at 3:08 pm #12815

We’ve tried changing the function name so that it does not have periods in it. Now we are getting a different error:

Warning: Cannot modify header information – headers already sent by (output started at /home/simalam/public_html/achieveconsultinggroup.ca/wp-content/plugins/s2member/includes/classes/utils-conds.inc.php:200) in /home/simalam/public_html/achieveconsultinggroup.ca/wp-includes/pluggable.php on line 866

The line of code in question:

header(“Location: $location”, true, $status);

When we remove that line of code, we no longer receive any error messages. In fact, we receive nothing at all, just a blank white page. We’re doing our best to find the source of the problem, but we’re coming up short. As always, any help would be greatly appreciated.

Posted: Monday May 7th, 2012 at 4:09 pm #12827

Could you reupload the [hilite mono]utils-conds.inc.php[/hilite] file from the s2Member zip archive? http://wordpress.org/extend/plugins/s2member/download/

Posted: Tuesday May 8th, 2012 at 12:31 pm #12916

Reuploading the original files seems to have worked. We are doing further investigation if we’ve lost any functionality, but for now, thank you for your assistance.

Posted: Tuesday May 8th, 2012 at 12:40 pm #12921

Cool. Thanks for the update. Glad I could help. :)

Viewing 5 replies - 1 through 5 (of 5 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.