/    Sign up×
Community /Pin to ProfileBookmark

My members area

Hi guys,

Have just started implementing a members area in to my site which did previously work when I had it running through my site that I developed in htm/css but now I have integrated wordpress in to my site and basically rebuilt the site, it doesnt seem to want to play.

Have created the SQL database and imported the relevant file, but I get the following lines appear at the top of my members page:

[CODE]Warning: session_start() [function.session-start]: Cannot send session cookie – headers already sent by (output started at /home/adejones/public_html/wp-content/themes/pcc/members.php:38) in /home/adejones/public_html/wp-content/themes/pcc/members.php on line 38

Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/adejones/public_html/wp-content/themes/pcc/members.php:38) in /home/adejones/public_html/wp-content/themes/pcc/members.php on line 38

Warning: Cannot modify header information – headers already sent by (output started at /home/adejones/public_html/wp-content/themes/pcc/members.php:38) in /home/adejones/public_html/wp-content/themes/pcc/members.php on line 41[/CODE]

I thought i’d make the next page to go with this members area and see how that goes so made the settings page, but this gets the same lines at the top of the page and have noticed a few bits of the php code appear in the middle of the site too.

You can see these pages here:

[URL=”http://www.primarycarecommunity.net/members/”]http://www.primarycarecommunity.net/members/[/URL]
[URL=”http://www.primarycarecommunity.net/settings/”]http://www.primarycarecommunity.net/settings/[/URL]

I would appreciate any help you can give, thanks.

Adey

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJul 05.2011 — Any function that modifies HTTP headers, including session_start(), header(), or setcookie() must be executed before anything is output to the browser. That includes echo/print commands within PHP as well as any text -- even white-space -- not withing <?php ... ?> tags. The error message tells you what file/line is starting the output.
Copy linkTweet thisAlerts:
@djadejonesauthorJul 06.2011 — ok well line 38 is:

<? ob_start(); session_start();include_once"config.php";

and line 41 is:

header("Location: login.php");

Config.php is in the same directory but I've just had a thought that I havent actually made the login page yet so will this be the problem? And if not, I have had a couple of problems with wordpress picking up the correct paths so instead of just config.php, do you think it would be worth while trying the full path (http://www...... )

Cheers, Adey
Copy linkTweet thisAlerts:
@djadejonesauthorJul 06.2011 — I think I may have cracked it, there was already a <?php at the top from wordpress because its a page template so just jiggled where it opens/closes and now its redirecting me to login.php (which I havent made yet) because i'm not logged in...

Now just to make the other pages and see if it will go from there...
×

Success!

Help @djadejones spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...