I have several websites that function like one big CMS, with all sites based on includes hosted by one central website. I posted code from one of the satellite sites below to illustrate how I include files.
The problem is that I just activated PDO online, and it's causing all kinds of problems. There's apparently a conflict between PDO and my .htaccess files that I'm working on. At the same time, my includes aren't being included.
So I'd like to ask if there's an alternate method of including files between websites online, at least until I can fix the PDO/Apache problem(s). Thanks.
$path = $_SERVER['REQUEST_URI'];
$path2 = str_replace('/', '', $path);
$Section = current(explode('/', ltrim($path, '/'), 2)); // Main line
$Sections = array('Introduction', 'Topics', 'World', 'Ecosymbols', 'Glossary', 'Reference', 'Links', 'About', 'Search');
if ( ! in_array($Section, $Sections))
{
// die('Invalid section: ' . $Section);
}
switch (PHP_OS)
{
case 'Linux':
$BaseINC = '/home/geobear2/public_html';
$BaseURL = 'http://www.geobop.org';
break;
case 'Darwin':
// Just some code for my local includes...
break;
default:
break;
}
include ($BaseINC."/2B/dbc.php");
Note: Here are the error messages I'm getting from the home page of one affected site. ACE.php is the name of the file that contains the code I posted above.
Warning: include(/home/geobear2/public_html/2B/dbc.php) [function.include]: failed to open stream: Permission denied in /home/symbolos/public_html/1A/ACE.php on line 67
Warning: include() [function.include]: Failed opening '/home/geobear2/public_html/2B/dbc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/symbolos/public_html/1A/ACE.php on line 67
Warning: include(/home/geobear2/public_html/2B/inc/A1.php) [function.include]: failed to open stream: Permission denied in /home/symbolos/public_html/index.php on line 31
Warning: include() [function.include]: Failed opening '/home/geobear2/public_html/2B/inc/A1.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/symbolos/public_html/index.php on line 31
.htaccess
and I can't imagine how you think they're interacting. You mention "all kinds of problems" without providing any useful details, and the code you've provided really doesn't tell us much at all... - ceejayozmagic_quotes_gpc
has nothing to do with PDO. Time to get a new host - if their support techs are that ignorant you're in for a world of hurt. The reason that setting is breaking your site is probably because the setting got removed in PHP 5.4 - if you're on a PHP 5.4 host, it has no clue what to do with that setting. See the red box in php.net/manual/en/security.magicquotes.php. - ceejayoz