include() failed to open

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

Hi everyone!

While my issue is not strictly a CMSB issue, its been driving me nuts for the past few hours and I really need help!

When I view my index.php file I get the following include error messages:

[15-Jan-2015 13:18:12 America/New_York] PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening '/common/includes/php_headerEN.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/uccvi/public_html/en/index.php on line 1
[15-Jan-2015 13:18:12 America/New_York] PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening '/common/includes/menuEN.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/uccvi/public_html/en/index.php on line 60

This is the code top of my index.php file (note 2 include statements in bold)

<?php include "/common/includes/php_header_en.inc.php"; ?>
<!DOCTYPE html>
<!--[if IE 7 ]><html lang="en" class="ie7"><![endif]-->
<!--[if IE 8 ]><html lang="en" class="ie8"><![endif]-->
<!--[if IE 9 ]><html lang="en" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="en"><!--<![endif]-->
<head>
<meta id="res" name="viewport" content="initial-scale=1 maximum-scale=1"/>

<a class="social-facebook social-import" href="#"></a>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Ukrainian, Ukrainian Culture Center, Ukrainian Cultural Center, Ukrainian Cultural Centre Victoria, Event Venue,Hall Rental, Catering, Ukrainian Food, Ukrainian Gifts, Ukrainian Heritage, Ukrainian Canadian, Ukrainian Activities" />
<meta name="Description" content="Ukrainian Canadian Cultural Society of Vancouver Island (Ukrainian Cultural Center, Victoria) was established in 1978 to serve the Victoria and Vancouver Island Ukrainian Community. The facility is located on Douglas Street in Victoria and offers a gift shop, dance studio, in house catering service, hall available for rental with seating for 180 and an extensive library in both Ukrainian and English." />

<title>Home | Ukrainian Canadian Cultural Society of Vancouver Island</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/styles.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/toggle-fade-in.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/toggle-borders.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/title-bold.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/slogan-italic.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/fluid-img.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/background-4.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/max-width-1000.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/cv1.css" />
<script type="text/javascript" src="/rw_common/themes/canvas/js/3d.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/aside-subtle.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/mi2.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/title-helvetica.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/title-28.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/slogan-georgia.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/slogan-14.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/content-top-35.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/css/content-14.css" />

<link rel="stylesheet" type="text/css" media="screen" href="/rw_common/themes/canvas/colour_tags.css" />
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<!--[if lt IE 9]><script src="/rw_common/themes/canvas/ie.js"></script><![endif]-->
<link rel='stylesheet' type='text/css' media='all' href='/rw_common/plugins/stacks/stacks.css' />
<!--[if lte IE 7]>
<link rel='stylesheet' type='text/css' media='all' href='/rw_common/plugins/stacks/stacks_ie.css' />
<![endif]-->
<link rel='stylesheet' type='text/css' media='all' href='/common/css/stacks_page_page1.css' />
<script type='text/javascript' charset='utf-8' src='/common/js/stacks_page_page1.js'></script>

</head>
<body>
<div id="outer">
<div id="wrapper">
<div>
<nav>
<?php include "/common/includes/menu_en.inc.php"; ?>
<ol><div class="clear"></div></ol>
</nav>
</div><!-- div -->
<section id="a" class="f">
<section id="b">
<span></span>
<div></div>
<aside>
<ul>
<li id="menu"></li>
</ul>
</aside>
<section id="c">
<section id="d">
<header>
<a href="http://www.uccvi.com/"><img src="/rw_common/images/logo_ucc" width="240" height="77" alt="Site logo"/></a>
<h1 id="title"><a href="http://www.uccvi.com/">Home - UCCVI</a></h1>
<h2 id="slogan"></h2>

</header>
<section id="e">

This works perfectly on all my other sites.  I have no idea why its giving me problems now.  Its probably something very simply that I missed!

Thanks!

Ragi

P.S.  If I copy the code from the include into index.php, everything works fine.  Nuts!

--
northernpenguin
Northern Penguin Technologies

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

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/

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