include() failed to open

7 posts by 2 authors in: Forums > CMS Builder
Last Post: January 16, 2015   (RSS)

By claire - January 15, 2015

Hi Ragi

Just on the off chance that this might work, can you try the include like so:

<?php include "common/includes/php_header_en.inc.php"; ?>

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By northernpenguin - January 15, 2015 - edited: January 15, 2015

Tried that.  Also tried ../common/includes

p.s.  It has me mystified, since on the same server (another domain), it works perfectly!

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

By claire - January 16, 2015

Sounds like something else has gone wrong then. Best thing to do is echo the current working directory and then start hopping around the folders until you find out what's in the wrong place.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By northernpenguin - January 16, 2015

Claire:  I think that yesterday was a day when Murphy's Laws were in full effect!

Today, I copied the include files to the web_root, and to the folder the web files are located.  It worked.  I placed them back in the includes folder, and it worked!

So, all in all, I ended up using <?php include "../common/includes/php_headerEN.inc.php" ?>; and everything worked!

Nuts!

Thank you for your help.

Ragi

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

By claire - January 16, 2015

Glad to know it's working properly now :) let us know if you've got any more issues!

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By northernpenguin - January 16, 2015 - edited: January 16, 2015

Ok, this is definitely a continuation of yesterday!

Two of the includes work:

<?php include "../common/includes/php_headerEN.inc.php"; ?>
<?php include "../common/includes/footerEN.inc.php"; ?>

However, the menu include does not:

<?php include "../common.includes/menuEN.inc.php"; ?>

I get the following errors generated:

[16-Jan-2015 12:37:24 America/Vancouver] PHP Warning:  include(../common/includes/menuEN.inc.php): failed to open stream: No such file or directory in /home/uccvi/public_html/en/index.php on line 54
[16-Jan-2015 12:37:24 America/Vancouver] PHP Warning:  include(): Failed opening '../common/includes/menuEN.inc.php' for inclusion (include_path='/home/uccvi/public_html/builder:/home/uccvi/public_html/builder/3rdParty:.:/usr/lib/php:/usr/local/lib/php') in /home/uccvi/public_html/en/index.php on line 54

If I place the menu code directly in the file, it works.  If I place the include file somewhere, it does not work (including the web file folder).

Gremlins!

Ragi

P.S.  Figured it out!  I incorrectly spelled the include as "menuEn.php" instead of "menu.EN.php".  Forrest for trees!

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke