mc12345678 / EasyPopulate-4.0

Data import and export module for Zencart 1.3.x and 1.5.x
GNU General Public License v2.0
10 stars 8 forks source link

install debug log: PHP Warning: opendir(ADMIN/temp/): The system cannot find the file specified #62

Open torvista opened 2 years ago

torvista commented 2 years ago

PHP Warning: opendir(ADMIN/temp/): The system cannot find the file specified in ADMIN\easypopulate_4.php on line 918.

New install, creating configuration, when no ADMIN/temp directory.

brittainmark commented 2 years ago

Not sure if this is the same issue. Against v1.5.8. New install. White screen casue when the folder EASYPOPULATE_4_CONFIG_TEMP_DIR does not exist under YOURADMIN.

This is caused by line 46 easypopulate-4.php

$tempdir = defined('EASYPOPULATE_4_CONFIG_TEMP_DIR') ? EASYPOPULATE_4_CONFIG_TEMP_DIR : 'EASYPOPULATE_4_CONFIG_TEMP_DIR'; 

The error occurs when open the debugfile fails and is trying to be closed. line 166-167

 $fp = fopen($ep_debug_log_path . 'ep_debug_log.txt', 'w'); // new blank log file on each page impression for full testing log (too big otherwise!!)
  fclose($fp);

$fp is false.

If you create the folder YOURADMIN/EASYPOPULATE_4_CONFIG_TEMP_DIR then installation completes and the error message to set up the configuration is presented.

log file

[14-Jun-2022 15:04:46 Europe/London] Request URI: /Test158/admin/index.php?cmd=easypopulate_4, IP address: 127.0.0.1
#1  fopen() called at [/home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php:166]
#2  require(/home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php) called at [/home/lotus/public_html/innerlightcrystals/Test158/admin/index.php:11]
--> PHP Warning: fopen(/home/lotus/public_html/innerlightcrystals/Test158/admin/EASYPOPULATE_4_CONFIG_TEMP_DIR/ep_debug_log.txt): Failed to open stream: No such file or directory in /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php on line 166.

[14-Jun-2022 15:04:46 Europe/London] PHP Fatal error:  Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php:167
Stack trace:
#0 /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php(167): fclose()
#1 /home/lotus/public_html/innerlightcrystals/Test158/admin/index.php(11): require('...')
#2 {main}
  thrown in /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php on line 167

[14-Jun-2022 15:04:46 Europe/London] Request URI: /Test158/admin/index.php?cmd=easypopulate_4, IP address: 127.0.0.1
--> PHP Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php:167
Stack trace:
#0 /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php(167): fclose()
#1 /home/lotus/public_html/innerlightcrystals/Test158/admin/index.php(11): require('...')
#2 {main}
  thrown in /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php on line 167.
mc12345678 commented 2 years ago

Not sure if this is the same issue. Against v1.5.8. New install. White screen casue when the folder EASYPOPULATE_4_CONFIG_TEMP_DIR does not exist under YOURADMIN.

This is caused by line 46 easypopulate-4.php

$tempdir = defined('EASYPOPULATE_4_CONFIG_TEMP_DIR') ? EASYPOPULATE_4_CONFIG_TEMP_DIR : 'EASYPOPULATE_4_CONFIG_TEMP_DIR'; 

The error occurs when open the debugfile fails and is trying to be closed. line 166-167

 $fp = fopen($ep_debug_log_path . 'ep_debug_log.txt', 'w'); // new blank log file on each page impression for full testing log (too big otherwise!!)
  fclose($fp);

$fp is false.

If you create the folder YOURADMIN/EASYPOPULATE_4_CONFIG_TEMP_DIR then installation completes and the error message to set up the configuration is presented.

log file

[14-Jun-2022 15:04:46 Europe/London] Request URI: /Test158/admin/index.php?cmd=easypopulate_4, IP address: 127.0.0.1
#1  fopen() called at [/home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php:166]
#2  require(/home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php) called at [/home/lotus/public_html/innerlightcrystals/Test158/admin/index.php:11]
--> PHP Warning: fopen(/home/lotus/public_html/innerlightcrystals/Test158/admin/EASYPOPULATE_4_CONFIG_TEMP_DIR/ep_debug_log.txt): Failed to open stream: No such file or directory in /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php on line 166.

[14-Jun-2022 15:04:46 Europe/London] PHP Fatal error:  Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php:167
Stack trace:
#0 /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php(167): fclose()
#1 /home/lotus/public_html/innerlightcrystals/Test158/admin/index.php(11): require('...')
#2 {main}
  thrown in /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php on line 167

[14-Jun-2022 15:04:46 Europe/London] Request URI: /Test158/admin/index.php?cmd=easypopulate_4, IP address: 127.0.0.1
--> PHP Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php:167
Stack trace:
#0 /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php(167): fclose()
#1 /home/lotus/public_html/innerlightcrystals/Test158/admin/index.php(11): require('...')
#2 {main}
  thrown in /home/lotus/public_html/innerlightcrystals/Test158/admin/easypopulate_4.php on line 167.

Php version?

brittainmark commented 2 years ago

PHP 8.0 sorry. forgot to include.