Zen Cart Logo
Forums / Upgrading to 2.x.x / Problem Failed to open stream: No such file or directory in

Problem Failed to open stream: No such file or directory in

Views: 481

Results 1 to 3 of 3
31 Jan 2025, 4:19 PM
#1
borek avatar

borek

New Zenner

Join Date:
Jul 2007
Posts:
9
Plugin Contributions:
0

Problem Failed to open stream: No such file or directory in

HI,

I have installed ZC 2.0.0 and I have this problem.
When I call e.g. https://www.shop.com/import_material.php
I receive error in log:
PHP Warning: require(includes/templates/template_default/templates/tpl_import_materialphp_default.php): Failed to open stream: No such file or directory in /virtual/www/shop.com/includes/templates/responsive_classic/common/tpl_main_page.php on line 214.
In the tpl_main_page.php on the row 214 is:
require($body_code);

What is my problem?
thank you for your help
Borek

31 Jan 2025, 4:48 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Problem Failed to open stream: No such file or directory in

The script import_material.php is not part of Zen Cart. Perhaps contact the person who created that for you?

If what you want is to import CSV files to populate your database, look at dbio.

https://www.zen-cart.com/downloads.php?do=file&id=2091

1 Feb 2025, 12:00 PM
#3
borek avatar

borek

New Zenner

Join Date:
Jul 2007
Posts:
9
Plugin Contributions:
0

Re: Problem Failed to open stream: No such file or directory in

Yes, I know. This script is mine.
BUT this is not about processing the script, it's about the fact that when the script is called it doesn't process, but Zen Cart tries to use it as an internal shop page.
I found this problem when I found many files in the log/ that reported this type of error:
calling
maxi-mall.cz/Admin-MM/images/site/dld.jpg
Error:
PHP Warning: require(includes/templates/template_default/templates/tpl_AdminMMimagessitedldjpg_default.php): Failed to open stream: No such file or directory in

or other log entry
Request URI: ...nadrze-shop.cz/rss/seznam.xml, IP address: 77.75.73.56, Language id 1 (I expect this was an hacker attack)

PHP Warning: ... (includes/templates/template_default/templates/tpl_rssseznamxml_default.php)

it is clear that ZC takes /rss/seznam.xml and tries to find the page tpl_rssseznamxml_default.php, so it inserts the called page including the path into the standard template tpl_xxx_default.php

in other my shops is this art of script https://www.domain.com/import_material.pgp working well.

thank you Dalibor