0

I've converted a file from Mysql_* to use PDO. Only this one file out of the application uses PDO, the rest of the files are still in Mysql_*.

After uploading the file, I received the following error: Warning: session_start(): Cannot send session cache limiter - headers already sent

The error seems to be from line 65 from my code which is if(!isset($_SESSION)) session_start()

llawliet
  • 9
  • 3
  • The warning means that there already has been an output from your php script before you called `session_start()`. Ensure that `session_start()` is in the first line of your script, then the warning should disappear and you can see what the output from `mysql_connect` is. I suppose another warning. – Mario A Oct 05 '16 at 08:53
  • The error message you get is irrelevant. It probably says that mysql_connect emitted an error, but for some reason you don't show it here. So we cannot tell you what's the problem – Your Common Sense Oct 05 '16 at 08:58
  • @yourcommonsense That's the error I received. I don't see why you believe I'm not providing the real error. – llawliet Oct 05 '16 at 09:02
  • because by itself mysql_query *obviously* doesn't send any HTTP headers. and because you didn't post the full code for calling this function either. – Your Common Sense Oct 05 '16 at 09:09
  • @yourcommonsense l post the full code then. Not understanding where the downvote is coming from. Am I being penalized because you don't like my question? – llawliet Oct 05 '16 at 09:20

0 Answers0