Greetings all!
My website just migrated to a new hosting service. However when I try to view the temporary site, I get the following error:
Warning: require_once(/home/cdmfun5/public_html/index.php/includes/lib/db.inc.php) [function.require-once]: failed to open stream: Not a directory in /home/cdmfun5/public_html/includes/config.inc.php on line 54
Fatal error: require_once() [function.require]: Failed opening required '/home/cdmfun5/public_html/index.php/includes/lib/db.inc.php' (include_path='.:/home/cdmfun5/public_html/index.php:/home/cdmfun5/public_html/index.php/siteadmin:/usr/lib/php:/usr/local/lib/php') in /home/cdmfun5/public_html/includes/config.inc.php on line 54
I'm lost. I barely write PHP and cannot understand why a straight transfer of code and db causes a fatal error.
The code is below (with sensitive information replaced with XXXXXXXXX)
<?php
//web frontend configuration
$sitedomain = "www.cdmfun.org";
if (!isset($root)) {
list($root) = explode($_SERVER['PHP_SELF'], $_SERVER['SCRIPT_FILENAME']);
}
$libpath = "$root/includes/lib";
//widget frontend configs
$fileuploadfolder = "/uploadedfiles";
$newsimagedir = $fileuploadfolder;
$articlesimagedir = $fileuploadfolder;
$staffimagedir = $fileuploadfolder;
$fanofmonthimagedir = $fileuploadfolder;
$paypalimagedir = $fileuploadfolder;
$listingsimagedir = $fileuploadfolder;
$vacancyimagedir = $fileuploadfolder;
$cafeeventsimagedir = $fileuploadfolder;
$booksimagedir = $fileuploadfolder;
$navigationimagedir = $fileuploadfolder;
$securefileuploaddir = "$root/../secure-upload";
//form config
$__use_form_message = TRUE;
//database connection Items
#$host= "psqlhost";
#$dbusername= "XXXXXXXXX";
#$dbpassword= "XXXXXXXXXXX";
#$dbname = "webtools_live_cdm";
$host= "localhost";
$dbusername= "XXXXXXXXXXXX";
$dbpassword= "XXXXXXXXXXXX";
$dbname = "XXXXXXXXXXX";
$__query_cache_timeout = 60;
$DBTYPE = 'PG8';
$DBHOST = $host;
$DBUSER = $dbusername;
$DBPASS = $dbpassword;
$DATABASE = $dbname;
require_once("$libpath/db.inc.php");
$PAYMENT_GATEWAY = "Authorize.Net";
// Authorize.Net config
$AUTHNET_LOGIN_ID = "XXXXXXXXXXXX";
$AUTHNET_TRANS_KEY = "XXXXXXXXXXXXX";
//widget Display names
$widgetnamelookup = array(
"articles" => "Useful Articles",
"growler" => "Growler Club",
"links" => "Related Links",
"news" => "News Events",
"paypal" => "Available Products",
"staff" => "Our Staff",
"Vendors" => "Vendors and Distributors",
"business-listings" => "Business Listings",
"events" => "Events Calendar",
"vacancies" => "Current Vacancies",
"pages-navigation" => "Pages",
"file-upload" => "Files",
);
//Search Configuration
$numberofresultsperpage = 999999;
$searchresultsviewpage = array(
"articles" => "/test.php",
"news" => "/test.php",
"paypal" => "/test.php",
"staff" => "/test.php",
"business-listings" => "/test.php",
"events" => "/test.php",
"vacancies" => "/test.php",
"pages-navigation" => "/test.php",
);
//WYSIWYG Configuration
if(strpos($_SERVER['REQUEST_URI'], '/siteadmin/') !== FALSE) {
require_once("$root/includes/JSON.php");
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
$wysiwyg_options = array(
'mode' => "textareas",
'editor_selector' => "mceEditor",
'theme' => "advanced",
'plugins' => "imagemanager,spellchecker,advlink",
'theme_advanced_toolbar_align' => "left",
'theme_advanced_toolbar_location' => "top",
'content_css' => "/css/for-admin.css",
'theme_advance_buttons3_add' => "spellchecker",
'spellchecker_languages' => "+English=en",
'relative_urls' => 'true',
'document_base_url' => '',
'gecko_spellcheck' => 'true',
'apply_source_formatting' => 'true',
'cleanup_on_startup' => 'true'
);
// For table controls in the wysiwyg, uncomment the following lines
$wysiwyg_options['plugins'] .= ',table';
$wysiwyg_options['theme_advanced_buttons3_add'] .= ',tablecontrols';
$wysiwyg_options['theme_advanced_blockformats'] .= 'h3,h4,p,div,blockquote';
$wysiwyg_options['extended_valid_elements'] .= 'form[accept|accept-charset|action|class|dir<ltr?rtl|enctype|id|lang|method<get?post|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onsubmit|style|title|target],input[accept|accesskey|align<bottom?left?middle?right?top|alt|checked<checked|class|dir<ltr?rtl|disabled<disabled|id|ismap<ismap|lang|maxlength|name|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect|readonly<readonly|size|src|style|tabindex|title|type<button?checkbox?file?hidden?image?password?radio?reset?submit?text|usemap|value]';
$wysiwyg_options = $json->encode($wysiwyg_options);
}
?>