Opencart: OpenCart v3.0.0.0 IIS server

Created on 20 Jun 2017  路  4Comments  路  Source: opencart/opencart

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

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:

  • Created a sessions folder under system/storage/session/
  • Added define('DIR_SESSION', DIR_SYSTEM . 'storage/session/'); to config files
  • In system/library/session/file.php replaced the functionality of __construct() with $this->directory = DIR_SESSION;

All 4 comments

It's likely a server configuration problem, but I was able to get around it on my end by doing the following:

  • Created a sessions folder under system/storage/session/
  • Added define('DIR_SESSION', DIR_SYSTEM . 'storage/session/'); to config files
  • In system/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.

5571 multiple users reporting problems with session file creation :(

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PrivateAlpha picture PrivateAlpha  路  3Comments

evgenekorolev picture evgenekorolev  路  3Comments

calderwood picture calderwood  路  3Comments

yzy9951 picture yzy9951  路  4Comments

danceleisure picture danceleisure  路  3Comments