0

Every time I try to access my website (brgy-hab.com), it shows this error:

PHP Warning:  require_once($root/include/template.php): failed to open stream: No such file or directory in G:\PleskVhosts\ibrgy-   hab.com\httpdocs\index.php on line 18
PHP Fatal error:  require_once(): Failed opening required  '$root/include/template.php' (include_path='.;.\includes;.\pear') in    G:\PleskVhosts\ibrgy-hab.com\httpdocs\index.php on line 18

I think I'm having trouble with my include path. which I am now trying to read but can't seem to understand it clearly.

orde
  • 5,233
  • 6
  • 31
  • 33
jin
  • 1
  • 1
  • Can you include the source code? – michaelbn Aug 12 '16 at 17:00
  • It seems like a concatenation error to me....can you show us your `index.php` code? – Hackerman Aug 12 '16 at 17:02
  • 1
    my guess is you are using single quotes `'` instead of double for your include `"`. so its not parsing `$root`. – cmorrissey Aug 12 '16 at 17:06
  • @Hackerman You can view my index.php here. http://shrib.com/panda2016 Sorry i put it there so the formatting will stay the same. all the "//" are my trials. thank you! Also you can see there the `$content = 'view/summary.php';` well its not showing up too. – jin Aug 12 '16 at 18:16
  • @michaelbn here you go sir. sorry im not that good at formatting codes here so i put it in a online notepad http://shrib.com/panda2016 – jin Aug 12 '16 at 18:22
  • I have website restriction policy in my work, so, I can't see the file...maybe you can post it as a `gist` on github! – Hackerman Aug 12 '16 at 18:23
  • https://gist.github.com/anonymous/63b212ef28b0fb3a0e0b1fb7f9ed5e59/61650d9cd8d6fb779af48097278df4df4e97425f Here did i done it right let me know Sir @Hackerman. Thank you very much – jin Aug 13 '16 at 03:31
  • @jin, The code you referred to is full of comment out codes. How can we figure what is responsible for your error? – michaelbn Aug 14 '16 at 07:15
  • @michaelbn thank you sir. Here is my index.php https://gist.github.com/anonymous/0e68fa7b68b3a00b2a28cf60fc020fe3 placed in the root directory of godaddy hosting. you can see it has require_once and content tags. but seems not working and not calling them. please let me know what other file you need to see. thank you! – jin Aug 15 '16 at 12:35
  • Ok, first thing, check the value of `$root`, with `var_dump($root);` ....If the value is ok, then you need to replace this line `require_once($root/include/template.php);` with this one `require_once($root."/include/template.php"); ` – Hackerman Aug 16 '16 at 12:59
  • @Hackerman Hi thank you sorry for the late reply. Also i would like to add another info here is my config.php. https://gist.github.com/anonymous/459df57c53cf39de07f6b94212efaf45 ok ill as adviced. thank you! – jin Aug 16 '16 at 14:50
  • There is a troubleshooting checklist here : http://stackoverflow.com/questions/36577020/failed-to-open-stream-no-such-file-or-directory – Vic Seedoubleyew Aug 20 '16 at 08:37

0 Answers0