Forums / General Questions / Fatal error: main() Failed opening required '' in tpl_index_default.php

Fatal error: main() Failed opening required '' in tpl_index_default.php

Locked

Views: 14,198

Results 21 to 40 of 44
This thread is locked. New replies are disabled.
4 Oct 2006, 6:27 PM
#22
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

Get yourself an FTP program where that is shown as a name :wink2:

4 Oct 2006, 6:28 PM
#23
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

sprintstar:

Look, this person has the same problem: http://www.zen-cart.com/forum/showthread.php?t=46211

... that is this thread ... :wacko:

4 Oct 2006, 6:30 PM
#24
sprintstar avatar

sprintstar

New Zenner

Join Date:
Oct 2006
Location:
UK
Posts:
25
Plugin Contributions:
0

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

Sorry, try link again..

4 Oct 2006, 6:37 PM
#25
sprintstar avatar

sprintstar

New Zenner

Join Date:
Oct 2006
Location:
UK
Posts:
25
Plugin Contributions:
0

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

Ok, was using CuteFTP, but FileZilla has an 'Owner / Group' column. It shows everything as "32296 t3tuning" except public_html which is shows as "32296 99". I guess 32296 is the owner, and the group is t3tuning, however could the public_html anomaly be the cause of the problem?

4 Oct 2006, 6:46 PM
#26
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

So you may want to check the permissions again on the folders leading to shop/includes/templates/template_default/templates/tpl_index_default.php.

Sorry, I misled you a few posts back (trying to do too many things at once here ... :-)

That should have been: check permissions (and ownership) on the folders down to

/includes/languages/english/html_includes/uktemplate/define_main_page.php

and also on define_main_page.php itself.

Alternatively, try removing the define_main_page.php from your override folder (ie. revert to the stock define_main_page.php) and see if you get the same error.

4 Oct 2006, 7:06 PM
#27
sprintstar avatar

sprintstar

New Zenner

Join Date:
Oct 2006
Location:
UK
Posts:
25
Plugin Contributions:
0

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

Permisions on /includes/languages/english/html_includes/uktemplate/define_main_page.php are all 755 with the owner/group being "32296 t3tuning"..

If I remove that file, I get the same error.. :(

4 Oct 2006, 7:32 PM
#28
sprintstar avatar

sprintstar

New Zenner

Join Date:
Oct 2006
Location:
UK
Posts:
25
Plugin Contributions:
0

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

Brand new install of ZC 1.3.5 and I get the same problem. So, there is just something wrong with my server, it just can't run Zencart! :(

Hosting company is https://www.hosting-unlimited.co.uk. I am applying as much pressure on them as I can, but no progress at the moment..

I just want to cry... :cry:

4 Oct 2006, 7:38 PM
#29
sprintstar avatar

sprintstar

New Zenner

Join Date:
Oct 2006
Location:
UK
Posts:
25
Plugin Contributions:
0

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

4 Oct 2006, 7:44 PM
#30
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

If you can live without the define_pages support, go to your admin area and disable them
Admin->Configuration->Define Pages

That may provide some relief in the interim.

Meanwhile, until your hosting company agrees to dump PHP as CGI, and use ISAPI mode instead, you're stuck. They're not likely willing to make that change, since it has security implications to all the sites on their server, and they are likely using PHP as CGI so that they don't have to spend as much time keeping their server secure.

I suggest checking out the Certified Hosts in our link at the top of this page.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Oct 2006, 7:48 PM
#31
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

Your stylesheet is not showing because there is likely a permissions problem there caused by the .htaccess settings.

Zen Cart supplies some .htaccess settings in the /includes/.htaccess file which are intended to protect from inappropriate snooping of your files by hackers etc.
It seems your host doesn't like letting you control things that way, and thus you will have to rename or delete that file in order for your stylesheet to be accessible. Then you will need to get your hosting company to help you find another way to prevent unauthorized access to your .php files via a browser.

That may also help with your define pages being reachable; however, they are not accessed by the browser directly and thus the .htaccess should have no effect on them.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Oct 2006, 8:09 PM
#32
sprintstar avatar

sprintstar

New Zenner

Join Date:
Oct 2006
Location:
UK
Posts:
25
Plugin Contributions:
0

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

The only text in that .htaccess file is as follows:

<Files *.php>
Order Deny,Allow
Deny from all
</Files>

This shouldn't affect the stylesheet should it?

4 Oct 2006, 8:28 PM
#33
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

Normally it should not, but ... for some unexplained reason ... on some hosts it does.

Well ... part of that "unexplained reason" is how the host has their apache configured. They can set things up so that you are NOT allowed to use those directives in your own .htaccess files. This is typically a sign of paranoia on the host's part ... where they have too many clients on their server and can't be bothered to check on security regularly.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

5 Oct 2006, 8:53 AM
#34
sprintstar avatar

sprintstar

New Zenner

Join Date:
Oct 2006
Location:
UK
Posts:
25
Plugin Contributions:
0

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

I can't see where the css is included in the generated code?

5 Oct 2006, 10:00 PM
#35
paul_1011 avatar

paul_1011

New Zenner

Join Date:
Jul 2005
Posts:
13
Plugin Contributions:
0

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

sprintstar:

Hosting company is https://www.hosting-unlimited.co.uk. I am applying as much pressure on them as I can, but no progress at the moment..

We also have a site hosted by the same company and we also have the same problem. Have you been able to find any kind of resolution?

The one thing I did notice is that although Zen admin works ok, there are no pages listed in Tools->Define pages editor, just an empty drop down.

Need to get this fixed asap! HU never respond, but they must have changed something.

5 Oct 2006, 10:14 PM
#36
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

I would agree with Dr. Byte - find a new host ASAP.

From people's posts on their forum, the host seems to have migrated you to a new server, installed PHP as a CGI module, and (perhaps?) also upgraded you to PHP 5.0 (although they say PHP 4.x is still available), all seemingly without any advance warning or discussion on their forum about the likely problems or workarounds.

Then they go walkabout for a day or two and don't reply to client's forum posts or tickets just as the proverbial hits the speeding aerofoil.

I'd be out of there like a shot :smile:

5 Oct 2006, 10:19 PM
#37
paul_1011 avatar

paul_1011

New Zenner

Join Date:
Jul 2005
Posts:
13
Plugin Contributions:
0

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

OK, I am going to attempt to move the site to another host as soon as possible, but in the mean time our shop is down and there appears to be very little I can do about it.

Can you think of any trick we can use to get it running again where it is now as I am way too tired to migrate the site to a new host at the moment.

Thanks for your help by the way.

6 Oct 2006, 1:05 AM
#38
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

Try turning off all the define pages in Admin->Configuration->Define Pages, as that should stop the attempt to display that data, thus skipping the error message.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Oct 2006, 6:39 AM
#39
sprintstar avatar

sprintstar

New Zenner

Join Date:
Oct 2006
Location:
UK
Posts:
25
Plugin Contributions:
0

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

I have no resolution. My support tickets are still unanswered, nothing on the forums etc. :shocking:

My define pages are still listed in my dropdown box, but they are of no use anyway. You can turn them off as DrByte suggests, but the stylesheets are still screwed etc.

I have found another host, and am transfering the site over. I installed the latest version on my new server, but then realised I should install exactly the same version as the existing shop, then that would make it easiest to transfer the database over.

Paul, got your pm, will email you..

Chris

7 Oct 2006, 10:29 PM
#40
paul_1011 avatar

paul_1011

New Zenner

Join Date:
Jul 2005
Posts:
13
Plugin Contributions:
0

Re: Fatal error: main() Failed opening required '' in tpl_index_default.php

Well, after absolutley no help from the hosting company we have moved the site to myserverworld/hosteurope/webfusion setup.

I have managed to restore the database and upload the files but I cant work out what I need to put in configure.php to get the DB to connect with this host.

Anyone out there using these guys for hosting that can shed some light? Would really appreciate it, our shop has been down for 3 days :(