php - Sessions works fine in local mode, but not in server -
i've developped project, uses sessions, in php. works fine in local mode, when upload server, doesn't works. well, works @ 50%, because when send post, can whole session correctly, when header(); index.php, session desapeared.
- sessions enabled in server.
- all docs has session_start(); @ top of page.
- when header(); set die(); below.
- syntax correct. got no errors.
does knows happening?
i think, problem arising because of mistake while moving files local server. if session not worked in server, can server problem. said session working. please check codings. if works on localhost should work on server too.
try this: on new server, php session not working. server have cpanel installed before, have uninstalled it, there no proper way of uninstalling cpanel, removed related cron jobs , cpanel folders.
to fix php session problem checked session.save_path set /tmp, on checking found read only.
it may due securetmp service of cpanel disabled during uninstallation. set path to
session.save_path = “/var/tmp”
in php.ini , restarted apache, session started working.
i have founded above in following link : http://blog.hostonnet.com/session-not-working-in-php
other posibilites: sessions either aren't enabled or aren't configured correctly in php.ini file on server.
Comments
Post a Comment