vincej Posted June 25, 2012 Share Posted June 25, 2012 Hi - my site is almost done. Now I want to put all my existing code up on a server for remote testing. However, I want it in a separate folder, not available to the public as there is an existing old site still installed. So .. I created a separate folder 'CLFarms' inside /public/ and uploaded all my files off my C drive. I made no further changes. I am now getting 3 errors: Message: Cannot modify header information - headers already sent by (output started at /services9/webpages/g/r/organiclife.com/public/CLFarms/index.php:2) Message: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /services9/webpages/g/r/organiclife.com/public/CLFarms/index.php:2) Message: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /services9/webpages/g/r/organiclife.com/public/CLFarms/index.php:2) Needless to say my site does not display anything. I tried changing the config file to see if that would help - I made the following changes to no effect: $config['base_url'] = 'http://organiclife.com/public/CLFarms/'; I have tried using the config with the /public/ in and out of the address - it made not difference. Can anybody tell me where I am going wrong ?? Many Many thanks ! Quote Link to comment Share on other sites More sharing options...
trq Posted June 25, 2012 Share Posted June 25, 2012 The error tells you what the problem is. index.php is producing output on line 2. You cannot send any output to the browser prior to calling session_start(). Quote Link to comment Share on other sites More sharing options...
vincej Posted June 25, 2012 Author Share Posted June 25, 2012 Many Thanks ... I realised my mistake adn so I fixed all the output errors or at least I'm not getting any messages anymore. However, I'm still getting a white screen of nothing ... any ideas where I should look ? I'm using codeigniter Many Thanks ! Quote Link to comment Share on other sites More sharing options...
Psycho Posted June 25, 2012 Share Posted June 25, 2012 I'm going to venture a guess that the site was built with some code that assumes the site is running at the root of the website even if you do set the path in the config using $config['base_url'] = 'http://organiclife.com/public/CLFarms/'; Ideally, that shouldn't be the case. But,if you are going to run the site from the root as I would suspect, there is another solution. Depending upon your host you can set up different web roots for different domains or even sub-domains. If so, you can set up a sub-domain and point it to a different folder. For example set up the sub-domain dev.organiclife.com and point it to a specific folder and dump your files there. I would suggest a completely separate folder rather than a sub-folder of the main site to keep everything separate. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted June 25, 2012 Share Posted June 25, 2012 Turning off error reporting doesn't fix the errors. All that does is make it so when you do have errors, you no longer have any clue as to what the error actually is. There's a sticky topic titled "HEADER ERRORS - READ HERE BEFORE POSTING THEM" that should help you with this problem. Quote Link to comment Share on other sites More sharing options...
vincej Posted June 25, 2012 Author Share Posted June 25, 2012 Thanks Psycho - I have tried changing the base url removing the 'public' component. When I place a 'hello World' test file in the CLFarms folder and go : http://www.organiclife.com/CLFarms/test.php it works fine. but if I change test to index.php I get nothing - white screen. I can try the sub domain thing but certianly this should work .. no ? any advice ? btw - Pikachu I have error reporting set to E_ALL - thanks anyway. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted June 25, 2012 Share Posted June 25, 2012 OK. Your previous post made it sound as though you turned off error reporting . . . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.