session_start(): Cannot send session cookie
Moderator: General Moderators
-
unorthodokz
- Forum Newbie
- Posts: 11
- Joined: Tue Apr 10, 2007 2:33 pm
- Location: Nashville, TN
session_start(): Cannot send session cookie
Hey ya'll. I'm new to PHP, but I've worked through it and gotten a script with a database running properly on my comp (Windows). I'm trying to load it up to a GoDaddy host that is Linux based. I added the MySQL database through the steps that they provided me and simply loaded all of the files/directories to the server through an FTP. When I go to the page now (http://www.musicdocumentaries.org) I'm receiving this error:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/m/u/s/musicdocument/html/index.php:2) in /home/content/m/u/s/musicdocument/html/library/config.php on line 7
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/m/u/s/musicdocument/html/index.php:2) in /home/content/m/u/s/musicdocument/html/library/config.php on line 7
Table 'unorthodokz.tbl_shop_config' doesn't exist
I'm hoping that this is a simple fix, but I'm stumped. Is there something differently about Linux that I'm missing, or did I not config something properly for the page? My $dbHost, User, Pass, and Name all look to be changed correctly.
Any thoughts? Any bit of help is MORE THAN APPRECIATED!
Thanks,
Charlie
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/m/u/s/musicdocument/html/index.php:2) in /home/content/m/u/s/musicdocument/html/library/config.php on line 7
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/m/u/s/musicdocument/html/index.php:2) in /home/content/m/u/s/musicdocument/html/library/config.php on line 7
Table 'unorthodokz.tbl_shop_config' doesn't exist
I'm hoping that this is a simple fix, but I'm stumped. Is there something differently about Linux that I'm missing, or did I not config something properly for the page? My $dbHost, User, Pass, and Name all look to be changed correctly.
Any thoughts? Any bit of help is MORE THAN APPRECIATED!
Thanks,
Charlie
-
unorthodokz
- Forum Newbie
- Posts: 11
- Joined: Tue Apr 10, 2007 2:33 pm
- Location: Nashville, TN
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Keep digging through the results.. since it's been talked about thousands of times by now, the answer is buried under other users asking the same questions and us responding just the same.unorthodokz wrote:Yeah, I definitely searched for it and got a bunch of random stuff that was completely useless to the problem.
-
unorthodokz
- Forum Newbie
- Posts: 11
- Joined: Tue Apr 10, 2007 2:33 pm
- Location: Nashville, TN
feyd | Please use
Do I need to add a table to my PHPMyAdmin or whats the deal?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I fixed the error about the headers already sent. but I still am receiving this:
Table 'unorthodokz.tbl_shop_config' doesn't exist
Using GoDaddy's (the host) guides I set up the database and have it configured right. However, I didn't add a table in the PHPMyAdmin because I never used it before when the script was loaded on my local computer.
This is the only thing in my code that I could find that was possibly applicable:Code: Select all
function getShopConfig()
{
// get current configuration
$sql = "SELECT sc_name, sc_address, sc_phone, sc_email, sc_shipping_cost, sc_order_email, cy_symbol
FROM tbl_shop_config sc, tbl_currency cy
WHERE sc_currency = cy_id";
$result = dbQuery($sql);
$row = dbFetchAssoc($result);
if ($row) {
extract($row);
$shopConfig = array('name' => $sc_name,
'address' => $sc_address,
'phone' => $sc_phone,
'email' => $sc_email,
'sendOrderEmail' => $sc_order_email,
'shippingCost' => $sc_shipping_cost,
'currency' => $cy_symbol);
} else {
$shopConfig = array('name' => '',
'address' => '',
'phone' => '',
'email' => '',
'sendOrderEmail' => '',
'shippingCost' => '',
'currency' => '');
}
return $shopConfig;
}feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]-
unorthodokz
- Forum Newbie
- Posts: 11
- Joined: Tue Apr 10, 2007 2:33 pm
- Location: Nashville, TN