Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,166,370 members, 7,864,704 topics. Date: Wednesday, 19 June 2024 at 02:40 AM

Can Someone Tell Me What Exactly Is Causing This Problem? - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Can Someone Tell Me What Exactly Is Causing This Problem? (648 Views)

Is This Problem From My Firefox Or Google? (pic Attached) / Can Someone Tell Me How I Can Create A Forum / What Exactly Is A Template? (2) (3) (4)

(1) (Reply)

Can Someone Tell Me What Exactly Is Causing This Problem? by chrishenzo: 2:06pm On Feb 01, 2012
In one of the websites I am working on, I noticed that if I add http://www, the session_start(), won't work but if I add http:// without the "www", the session_start() will work. For example

<?php session_start();

http://www.example.com/useraccount
?>

In the above code, the session_start() won't work and the user will appear to be logout but with the code below (without the "www"), everything will be working perfectly.
<?php session_start();
http://example.com/helloworld
?>

Can someone tell me what is causing this problem?
Re: Can Someone Tell Me What Exactly Is Causing This Problem? by yawatide(f): 3:12pm On Feb 01, 2012
1) What exactly are you trying to do?
2) Why is the url inside the php script block?
3) When all is said and done, you might want to look at using a 301 redirect to send all your "non-www" urls to their "www" equivalents

good luck!
Re: Can Someone Tell Me What Exactly Is Causing This Problem? by teemy(m): 12:02am On Feb 02, 2012
yawa-ti-de:

2) Why is the url inside the php script block?
I guess it is a reference to the page contents. @poster, you probably need to give a few more details.

(1) (Reply)

Get Your Website Designed. / Get Traffic For Website / Www.workldyouthforum.net Is For Sale!!!!!

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 26
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.