FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Cookies?





ohmsford
I created my own login script with cookie sessions and this is what I get:

Quote:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/ohmsford/domains/dreamrpg.frih.net/public_html/db.php:3) in /home/ohmsford/domains/dreamrpg.frih.net/public_html/login.php on line 3


Quote:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ohmsford/domains/dreamrpg.frih.net/public_html/db.php:3) in /home/ohmsford/domains/dreamrpg.frih.net/public_html/login.php on line 3


Sad It worked fine on other hosts of mine...And I would to have it work here too. I should say, "works" fine, because I have it on working perfectly on another host that I can't access at school.
rheanna
what did you put in the script?
/home/ohmsford/domains/dreamrpg.frih.net/public_html/login.php

/home/ohmsford/public_html/login.php

the way you have it set up is probably wrong but I have to look at mine and right now I can't grr..
ohmsford
Well, what do you mean?

I have five scripts running to keep a login and user reg working and a MySQL database for it.

I have a session Id

session_start();

And right now I am viewing another page that has the exact same code, just different $host,$user,$db,etc...and it works perfectly fine and I can view my stats such as fullname, email, and band name.
rheanna
right working fine on one site but not working fine on the this site so check where your calling it too..


/home/ohmsford/public_html/login.php

*that needs to be correct in order to work correctly and i'm trying to locate it on this server so I can tell you ;o) but give me a minute.
ohmsford
Sadly, I am not understanding what you are telling me.

I am using FTPX and uploading my files under public_html....
o.O
If that helps any...
rheanna
Quote:
It worked fine on other hosts of mine


Somewhere along the line this line needs to be changed to match frihost in order for it to work

/home/ohmsford/domains/dreamrpg.frih.net/public_html/login.php

might just be calling it wrong [PATH make sure it's right]

my phpadmin is not up because I don't have a db and i'm trying to find the site that locates all that info for me ;o)

/dreamrpg.frih.net/public_domain/login.php
ohmsford
Nah, nevermind. I'll just find another webhost then. Egad. Well, thanks anyways. If I have it working on like three other hosts just fine and not on this, then this place just doesn't suit my needs and your whole calling up things or whatever just confuses me more. So tata
rheanna
your calling it to the wrong path once you have the right MYSQL PATH it will work. Fiddle around and find your path

/dreamrpg.frih.net/public_domain/login.php
/public_domain /dreamrpg.frih.net/login.php
ohmsford
Okay, first things first here.

I have a page called db.php

It works perfectly fine.

The only time I get anything wrong is when I have a page with

start_session();

My database information is correct, I was able to register an account to the database and view it in PHPMyAdmin. I checked through everything and made sure I got the exact correct codes. (I checked with a master programming guru who taught me what I know) and he says your hosting account sucks and that I should move on.

Thank you, bye.
rheanna
ohmsford wrote:
Okay, first things first here.

I have a page called db.php

It works perfectly fine.

The only time I get anything wrong is when I have a page with

start_session();

My database information is correct, I was able to register an account to the database and view it in PHPMyAdmin. I checked through everything and made sure I got the exact correct codes. (I checked with a master programming guru who taught me what I know) and he says your hosting account sucks and that I should move on.

Thank you, bye.


What a guru? He taught you everything but even he doesn't even know? Okay? I doubt the hosting sucks even thou I just started and they seem fairly nice. Why don't you ask support and you might get better help?

*probably just a line in the script that's causing the error messages. More hands on. Heck, try to help you online even thou I'm not use to it. But still least I'm trying to help you.
ohmsford
This guru happens to be a writer of the PHP Manual for most of the MySQL connection parts and happens to be working with an account on here as we speak. So, there you have it. I won't be working here anymore.
rheanna
It is essential that nothing is outputted to the browser before session_start, so NO linebreaks and NO whitespace before session_start - and the php start tag absolute top-left corner

Try re-running the config wizard. There is probably some extra line breaks at the end of config.php, re-running the config wizard will re-create config.php...


Did you bother to check that? I found that on Yahoo. So he must not be as good as you say he is.

or

* I think here is your answer*
Your hosting company is running PHP in Safe Mode.

not sure if this will work

Quote:

What's happening is that osc is no longer able to write to /tmp on the server. It does not matter if you have sessions set to mysql in your catalog/includes/configure.php file (always best on a shared server), sessions.php still queries for the directory.


CODE
function tep_session_save_path($path = '') {
if (!empty($path)) {
return session_save_path($path);
} else {
return session_save_path();
}
}


Cause : Previous bug in PHP fixed in latest version (Chances are your ISP has updated to the new version)

Fix: Goto Admin / Configuration / Sessions and change the "Sessions Directory" to tmp (no slashes)

If you can't get into Admin, goto your Database Admin page (usually PhPAdmin app.)
Click on any table on the left hand side.
Click on SQL at the top of the screen
Overtype whatever appears in the SQL window with ...

UPDATE configuration SET configuration_value = 'tmp' WHERE configuration_key='SESSION_WRITE_DIRECTORY'

Click Go
You can also just use phpMyAdmin to edit the value directly. It's in table: configuration at about line 136.

Session Directory SESSION_WRITE_DIRECTORY /tmp

Simply change /tmp to tmp


never said I was an expert...I don't know the coding but I know the editing aspect. ;o)

Laughing Your a new member so you can't be working here...
MrBlueSky
Quote:

(I checked with a master programming guru who taught me what I know) and he says your hosting account sucks and that I should move on.


Sorry, that made me ROTFLOL Very Happy
rheanna
I was wondering how he got a job before me? And he don't know his own coding? The Guru don't know? and the cookies sessions are on yahoo for the coding. But blame it on the website. That must be it! Answer to unsolved questions. Laughing

;o)
fromegame
Top of page:

Code:
ob_start();


end of page:

Code:
ob_end_flush();


Always works Arrow
tidruG
I find it a little amusing that your guru took just one look at your error and told you that this hosting account is no good here.

I also find it amusing that you didn't even understand what Rheanna was saying, and still went on to say that the hosting here is faulty.

Anyway... staying or leaving Frihost is your choice. However, if you're leaving, please let us know so that we can delete your account, and offer that space to someone else?
rheanna
N/m I'm a blonde. ;p I got what you said. it for me.
Related topics
avoid super cookies
recipie for chocolate chip cookies
Introduction To Cookies :
PHP: Sessions and Cookies
Help for sending 2+ cookies in one page.
[php/cookies] poll on two sites
PHPBB Cookies
FireFox and Cookies/Sessions
using cookies in PHP
My forum isn't saving cookies
End of the world: Our cookies are running out
what is better? Sessions or Cookies
Mom Said to Help Girls Bake Ex-Lax Cookies
Cookies?
Cookies not getting set
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.