pedropeixoto
pedropeixoto

Reputation: 181

Cannot send session cache limiter - PHP

I just changed a couple of websites from an old web server to a new one.

This error is occurring in various pages of the e-commerce website.

Any idea of what it could be?

Upvotes: 1

Views: 1484

Answers (3)

Mohammad Saberi
Mohammad Saberi

Reputation: 13166

This can be because of something that I faced with before:

  1. You have something before session_start(); in your codes. Make sure that this code is the fist line after <?php in your code.

  2. We have something called BOM in php files. You can set or unset this option while you are saving your php file. For PHP files, this option has to be unset. Otherwise you will get your mentioned error.

Upvotes: 0

Hearaman
Hearaman

Reputation: 8726

1.Remove Whitespaces before and after PHP Tags. It may give "Cannot send session cache limiter " Warning.

2.If SESSION is already enabled in PHP.ini, then no need to write session_start(); Statement.

3.If SESSION is disabled in PHP.ini, then keep "session_start();" Statement only once in your application.

Upvotes: 0

malko
malko

Reputation: 2382

this may sometimes happen because of something being send to the browser before the session this could be be a space at the start of a php script or a BOM unicode in your file that cause that problem.

Upvotes: 1

Related Questions