I' m developing an application which runs as expected locally (4.3.8) but generates a lot of errors after uploading it to my friend's server, which is still running 4.3.0.
Just by placing
<?php
session_start ();
?>
right at the top of a page, I get all these errors:
Warning: session_start() [function.session-start]: open(D:\PHP\sessiondata\sess_657d59bfdcce76c821e591b494b8f5ae, O_RDWR) failed: Permission denied (13) in D:\Domains\domain.com\wwwroot\TMPfshvd5mvb7.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\Domains\domain.com\wwwroot\TMPfshvd5mvb7.php:2) in D:\Domains\domain.com\wwwroot\TMPfshvd5mvb7.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\Domains\domain.com\wwwroot\TMPfshvd5mvb7.php:2) in D:\Domains\domain.com\wwwroot\TMPfshvd5mvb7.php on line 2
Warning: Unknown(): open(D:\PHP\sessiondata\sess_657d59bfdcce76c821e591b494b8f5ae, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (D:\PHP\sessiondata) in Unknown on line 0
Which I really don't understand.
Well... it seems I don't have permission to use sessions... but that goes against what phpinfo() tells me.
I even get the 'headers already sent', as if there is something before the script!
So I tried
<?php
ob_start ();
session_start ();
?>
but all the other errors remain:
Warning: session_start() [function.session-start]: open(D:\PHP\sessiondata\sess_b92bd3facfca6195c885ac90d942d00d, O_RDWR) failed: Permission denied (13) in D:\Domains\domain.com\wwwroot\TMPfz1m05mvjo.php on line 3
Warning: Unknown(): open(D:\PHP\sessiondata\sess_b92bd3facfca6195c885ac90d942d00d, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (D:\PHP\sessiondata) in Unknown on line 0
This is the configurarion of the server:
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_dividend 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path D:\PHP\sessiondata D:\PHP\sessiondata
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off
which is exactly the one I have, except for the session save path:
session.save_path c:/wamp/tmp c:/wamp/tmp