Jump to content

Cant load index.php in front office


Recommended Posts

I installed prestashop 1.4. I can load the backoffice, but I cannot load the front office. When I want to open it, I see the content of the folder where I installed prestashop. I installed it on a localhost to test it. Just the index.php doesnt load. Other pages, such as sitemap work.
I think the problem is the index.php.
in my case it looks like this:

<?php
require(dirname(__FILE__).'/config/config.inc.php');
ControllerFactory::getController('IndexController')->run();



I read some where I should enter:

<?php
include(dirname(FILE).’/config/config.inc.php’);
include(dirname(FILE).’/header.php’);
$smarty->assign(‘HOOK_HOME’, Module::hookExec(‘home’));
$smarty->display(PS_THEME_DIR.‘index.tpl’);
include(dirname(FILE).’/footer.php’);
?>


When I do this I get the following errors and warnings:

Warning: Division by zero in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 2
Warning: include(.incphp’) [function.include]: failed to open stream: No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 2
Warning: include() [function.include]: Failed opening '.incphp’' for inclusion (include_path='.;C:\php\pear') in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 2
Warning: include(.php’) [function.include]: failed to open stream: No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 3
Warning: include() [function.include]: Failed opening '.php’' for inclusion (include_path='.;C:\php\pear') in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 3
Fatal error: Call to a member function assign() on a non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 5


Besides I get a lot of notes about undefined constants and an undefinded smarty variable.
Does anybody know what might be the problem?
Thanks in advance!

Link to comment
Share on other sites

  • 3 weeks later...
I installed prestashop 1.4. I can load the backoffice, but I cannot load the front office. When I want to open it, I see the content of the folder where I installed prestashop. I installed it on a localhost to test it. Just the index.php doesnt load. Other pages, such as sitemap work.
I think the problem is the index.php.
in my case it looks like this:
<?php
require(dirname(__FILE__).'/config/config.inc.php');
ControllerFactory::getController('IndexController')->run();



I read some where I should enter:

<?php
include(dirname(FILE).’/config/config.inc.php’);
include(dirname(FILE).’/header.php’);
$smarty->assign(‘HOOK_HOME’, Module::hookExec(‘home’));
$smarty->display(PS_THEME_DIR.‘index.tpl’);
include(dirname(FILE).’/footer.php’);
?>


When I do this I get the following errors and warnings:

Warning: Division by zero in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 2
Warning: include(.incphp’) [function.include]: failed to open stream: No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 2
Warning: include() [function.include]: Failed opening '.incphp’' for inclusion (include_path='.;C:\php\pear') in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 2
Warning: include(.php’) [function.include]: failed to open stream: No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 3
Warning: include() [function.include]: Failed opening '.php’' for inclusion (include_path='.;C:\php\pear') in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 3
Fatal error: Call to a member function assign() on a non-object in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\prestashop\index.php on line 5


Besides I get a lot of notes about undefined constants and an undefinded smarty variable.
Does anybody know what might be the problem?
Thanks in advance!



Did you solve your problem? Because I have a similiar problem.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...