Dynadot โ€” .com Registration $8.99

Please help me

Spaceship Spaceship
Watch
Impact
11
go to www.ratemymug.com rate somone, now see..? the message at the top.. what does this mean? everything is working fine, i just get this message for some reason.. please help me
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Look near the top of the file it's giving the error for. Most likely, you have a blank line, space or some text or something before

PHP:
session_start();

Which can cause the error..
 
Last edited:
0
•••
that dowsnt seem to do anything this is what i have minus the usernames passwords.
PHP:
<?
$dbServer = "";
$dbuserName = "";
$dbpassword = "";
$dbName  ="";
$site_title = "Rate My Mug, meet people, have fun!!";
$site_copyright = "Rate My Mug";
$bannerprice ="";
$newletterprice ="";
$paypalemail ="";
$stormpayemail = "";
$passwordemail = ""; 
$con=mysql_connect ($dbServer, $dbuserName, $dbpassword) or die ('Cannot connect to the database.');
$db=mysql_select_db ($dbName);
session_start();
?>
 
Last edited:
0
•••
EDIT: PLEASE USE [ PHP ] [ /PHP ] TAGS!



Correction - You can have ANYTHING before sending a header (or using session_start()) AS LONG AS it DOES NOT send ANY DATA to the browser before calling that function!

You can have blank lines, spaces, etc. You CANNOT HAVE:
-echo statements
-printf statements
-HTML
-CSS
etc.
Okay, try putting the db connection AFTER the session_start.
Thanks.
 
1
•••
compuXP said:
EDIT: PLEASE USE [ PHP ] [ /PHP ] TAGS!



Correction - You can have ANYTHING before sending a header (or using session_start()) AS LONG AS it DOES NOT send ANY DATA to the browser before calling that function!

You can have blank lines, spaces, etc. You CANNOT HAVE:
-echo statements
-printf statements
-HTML
-CSS
etc.
Okay, try putting the db connection AFTER the session_start.
Thanks.
Forgive me, as I'm not an "expert" ....
:p

Anyway skrilla....

PHP:
<?php
session_start();
$dbServer = "";
$dbuserName = "";
$dbpassword = "";
$dbName ="";
$site_title = "Rate My Mug, meet people, have fun!!";
$site_copyright = "Rate My Mug";
$bannerprice ="";
$newletterprice ="";
$paypalemail ="";
$stormpayemail = "";
$passwordemail = "";
$con=mysql_connect ($dbServer, $dbuserName, $dbpassword) or die ('Cannot connect to the database.');
$db=mysql_select_db ($dbName);

?>
 
Last edited:
0
•••
tried, still doesnt work. :(

this script works fine without the mesage on another server.. if that helps.. somone told me i might be having a conflict between mysql and the version of php my server is using.. you can check the info on my server at www.ratemymug.com/sparky2.php
 
0
•••
it is the db connection. When you run the database connection it sends a "reply" to the browser, from the server. You should always put session_start() right after <?php.
 
0
•••
i hasve put the session_start at eht op below <? but nothing happens. i still get the message :(
 
0
•••
EDIT: nvmd
 
1
•••
thats my config.php file.

as you can see the message says

Warning: Cannot modify header information - headers already sent by (output started at /home/ratemy/public_html/config.php:22) in /home/ratemy/public_html/index.php on line 29

and each time i move session_start the config.php:22) changes config.php:20) config.php:21) etc.
 
0
•••
When you "include" or "require" the config page, is that the first line in your phpfile?

You cant have anything sending anything from the server to the html file before the session_start()
 
0
•••
no there is nothing b4 session_start like i said this works fine on my other host www.paruch.com/ratemymug.com somone told me it had to do with installing modules on the server.. ???
 
0
•••
can you post the error you get with the source code from the current config file so that we can see the line it says you have an error in.
 
0
•••
the config.php file looks like this
PHP:
<?
session_start();
$dbServer = "";
$dbuserName = "";
$dbpassword = "";
$dbName  ="";
$site_title = "Rate My Mug, meet people, have fun!!";
$site_copyright = "Rate My Mug";
$bannerprice ="";
$newletterprice ="";
$paypalemail ="";
$stormpayemail = "";
$passwordemail = ""; 
$con=mysql_connect ($dbServer, $dbuserName, $dbpassword) or die ('Cannot connect to the database.');
$db=mysql_select_db ($dbName);
?>


and the message is this

Warning: Cannot modify header information - headers already sent by (output started at /home/ratemy/public_html/config.php:22) in /home/ratemy/public_html/index.php on line 29
 
0
•••
skrilla said:
no there is nothing b4 session_start like i said this works fine on my other host www.paruch.com/ratemymug.com somone told me it had to do with installing modules on the server.. ???
sorry don't know about that. It dosen't seem like you have a server problem, it seems like you have a php problem.
 
0
•••
0
•••
it says that something was sent to the browser in index.php on line 29.

skrilla said:
then why does it work on my other server? www.paruch.com/ratemymug.com ?
are all the files the same on both servers? Have you updated one server and not the other?
 
1
•••
they are exactly the same except the dbase on www.ratemymug.com is updated and the config file of course has differnt username password and such.

the problem is still not fixed, but i am adding to everyone's rep that has tried to help. :)
 
0
•••
could the database stuff be wrong? The connection to the database might not be working, and your server might not relay the error back.

I am sorry, if that dosen't work, I don't know what will. :(

Tom
 
0
•••
that could be it.. But how is it still writing to the database? again, everything seems to be working properly except when you try to rate someone from 1-10 the message appears at the top of the screen.
 
0
•••
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back