Forum

Thread tagged as: Question, Problem, Error

Errors on index.php

I am getting these errors onmy index.php. How to I fix this?

Warning: include(/home4/digitale/public_html/index.php): failed to open stream: No such file or directory in /home4/digitale/public_html/perch/core/runway/start.php on line 27

Warning: include(): Failed opening '/home4/digitale/public_html/index.php' for inclusion (include_path='.:/usr/local/php53/lib:/usr/lib/php:/usr/local/lib/php') in /home4/digitale/public_html/perch/core/runway/start.php on line 27

David Roberts

David Roberts 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

"No such file or directory". The file is not there.

It is there, though, default home page? /public_html/perch. There is a index.php page public_html/perch/index.php

When I go to view home page in Perch that's what I get on the page.

 <?php
    // This is just a placeholder. All core files are in /core for easy updating.
    include(dirname(__FILE__).'/core/index.php');

! (https://www.dropbox.com/s/02e6co4icmbsv4e/screenshot.png?dl=0)

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you're seeing that then it looks like your web server isn't parsing PHP.

Did you get a pass from the compatibility test?

I have used Perch on the same server and have had no problems.

Drew McLellan

Drew McLellan 2638 points
Perch Support

So is PHP parsing now?

No I get the same errors as before on index.php. Would it be any good in deleting the version I have and starting with a fresh version ?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

The first thing to do would be to make sure you get a pass from the compatibility test.

It passed the compatibility test, although I started from scratch again.

Why am I getting this error:

Parse error: syntax error, unexpected ']' in /home4/digitale/public_html/perch/templates/pages/home.php on line 9


Line 9 is ]); after this perch_page_attributes(array( 'template' =>'seo.html'), <?php // Include the header. You can find this in tempates/layouts/global perch_layout('global/global.header', [ 'page_title'=>perch_pages_title(true), ]); perch_page_attributes(array( 'template' =>'seo.html'), ]); perch_layout('header.home'); // An editable content region perch_content('Main heading'); // Main navigation perch_pages_navigation([ 'levels'=>1 ]); // An editable content region perch_content('Intro'); // Include the footer. You can find this in tempates/layouts/global perch_layout('global/global.footer');
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you running PHP 5.3? Runway requires 5.4 or greater.

PHP 5.4.41 version is okay, but a little out of date. Consider updating soon.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ah, I see it. This:

   perch_page_attributes(array(
      'template' =>'seo.html'),
    ]);

should be:

   perch_page_attributes([
      'template' =>'seo.html',
    ]);

Thanks Drew that bit worked.

OK, the footer is not showing up on the 'web page' but is showing in the source code (as above).? Nothing else on the page at present.

<!-- Undefined content: Intro -->I have this line at the start of the footer code in the source code, what does it mean?

Drew McLellan

Drew McLellan 2638 points
Perch Support

That just means you have a region called Intro that doesn't have any content yet.

Thanks

Were can I find / see how to set up php for master pages.

e.g. the difference between ~~ ), ]);

, ]);

~~~ thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's not different for master pages, you just had a basic PHP syntax error.