Forums / General Questions / init_templates.php error

init_templates.php error

Locked
Results 1 to 6 of 6
This thread is locked. New replies are disabled.
09 Oct 2006, 18:15
#1
styledata avatar

styledata

Zen Follower

Join Date:
Feb 2006
Posts:
290
Plugin Contributions:
0

init_templates.php error

My error logs (1.3.02) are FILLED with the following error:

main(): Failed opening 'includes/languages/english.php' for inclusion (include_path='.:/usr/share/pear') in /home/httpd/vhosts/photoimprints.com/httpdocs/includes/init_includes/init_templates.php on line 72

In viewing that file, I see:
// THE FOLLOWING MIGHT NEED TO BE DISABLED DUE TO THE EXISTENCE OF function() DECLARATIONS IN MASTER ENGLISH.PHP FILE
// THE FOLLOWING MAY ALSO SEND NUMEROUS ERRORS IF YOU HAVE ERROR_REPORTING ENABLED, DUE TO REPETITION OF SEVERAL DEFINE STATEMENTS
include_once(DIR_WS_LANGUAGES . $_SESSION['language'] . '.php');

Should it be disabled? Can anyone tell me what this is?
Thanks in advance,
09 Oct 2006, 19:59
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: init_templates.php error

styledata:

main(): Failed opening 'includes/languages/english.php' for inclusion (include_path='.:/usr/share/pear')


This suggests that the file cannot be located.

The code you quoted is merely what's attempting to load the file. But if it doesn't exist, or is corrupt, or has permissions set too low for access, then it will fail to load for execution.

I recommend re-uploading the file from your master working fileset.
09 Oct 2006, 20:09
#3
styledata avatar

styledata

Zen Follower

Join Date:
Feb 2006
Posts:
290
Plugin Contributions:
0

Re: init_templates.php error

I use a custom english.php file which is located in my custom template directory. Why would it be trying to pull an english.php file from the main language directory? Is that english.php file different from the one in the template directory, and what permissions should be set?
thank you!
09 Oct 2006, 20:32
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: init_templates.php error

Zen Cart loads both. First your custom one, and then the master. If you deleted the master, you'll end up with this error.

It does it this way so that if you miss adding a setting to your custom language file, then the master will pick it up instead.
09 Oct 2006, 21:03
#5
styledata avatar

styledata

Zen Follower

Join Date:
Feb 2006
Posts:
290
Plugin Contributions:
0

Re: init_templates.php error

Ah! So it is not REALLY an error, in terms of function? I copied the english.php file from my custom template to the main language directory. Will that suffice?
09 Oct 2006, 21:07
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: init_templates.php error

That'll work. Your best solution is to upload the original master version of english.php to the /includes/languages folder