Hello.
We have tried to install OpenCart v3.0.0.0 on IIS server but we got a lot of errors:
PHP Fatal error: Call to undefined function openssl_random_pseudo_bytes() in \system\library\session.php on line 31
PHP Warning: fwrite(): 19 is not a valid stream resource in \system\library\log.php on line 10
PHP Warning: fwrite(): 19 is not a valid stream resource in \system\library\log.php on line 10
PHP Warning: fwrite(): 19 is not a valid stream resource in \system\library\log.php on line 10
PHP Warning: fwrite(): 19 is not a valid stream resource in \system\library\log.php on line 10
PHP Warning: fwrite(): 19 is not a valid stream resource in \system\library\log.php on line 10
PHP Warning: fwrite(): 19 is not a valid stream resource in \system\library\log.php on line 10
Error: Invalid session ID!Warning: fopen(/sess_): failed to open stream: Permission denied in \system\library\session\file.php on line 39Warning: flock() expects parameter 1 to be resource, boolean given in \system\library\session\file.php on line 41Warning: fwrite() expects parameter 1 to be resource, boolean given in \system\library\session\file.php on line 43Warning: fflush() expects parameter 1 to be resource, boolean given in \system\library\session\file.php on line 45Warning: flock() expects parameter 1 to be resource, boolean given in \system\library\session\file.php on line 47Warning: fclose() expects parameter 1 to be resource, boolean given in \system\library\session\file.php on line 49
It's likely a server configuration problem, but I was able to get around it on my end by doing the following:
system/storage/session/define('DIR_SESSION', DIR_SYSTEM . 'storage/session/'); to config filessystem/library/session/file.php replaced the functionality of __construct() with $this->directory = DIR_SESSION;Hello.
Thank you!
First error could be PHP version. Second one is permissions on folder.
Uncommenting the following line in my php.ini located at /etc/php/php.ini solved the issue for me:
session.save_path = "/tmp"
After that you'll probably have to restart your webserver.
Most helpful comment
It's likely a server configuration problem, but I was able to get around it on my end by doing the following:
system/storage/session/define('DIR_SESSION', DIR_SYSTEM . 'storage/session/');to config filessystem/library/session/file.phpreplaced the functionality of__construct()with$this->directory = DIR_SESSION;