1
jochen2011
database connection issue ?
  • 2012/2/28 14:49

  • jochen2011

  • Just popping in

  • Posts: 25

  • Since: 2011/3/5 1


Hi all, we moved all files from a running xoops-installation to another hoster.

At the new hoster I created a new MySQL-database and I also already changed the database values in "secure.php" . Additionally I changed the absolute path information in "mainfile.ph" .
Are there some more files that need to be changed ? If yes, which one`s ?

Momentary I cannot acces my xoops page at http://www.refineasia.com/agents/

The following error-message is displayed, that`s all.

Anyone an idea ? Thanks in advance, Jochen


* @author Skalpa Keo * @author Taiwen Jiang * @version $Id: index.php 4941 2010-07-22 17:13:36Z beckmi $ */ include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mainfile.php'; $xoopsPreload =& XoopsPreload::getInstance(); $xoopsPreload->triggerEvent('core.index.start'); //check if start page is defined if (isset($xoopsConfig['startpage']) && $xoopsConfig['startpage'] != "" && $xoopsConfig['startpage'] != "--") { // Temporary solution for start page redirection define("XOOPS_STARTPAGE_REDIRECTED", 1); global $xoopsModuleConfig; $module_handler =& xoops_gethandler('module'); $xoopsModule =& $module_handler->getByDirname($xoopsConfig['startpage']); if (!$xoopsModule || !$xoopsModule->getVar('isactive')) { include_once $GLOBALS['xoops']->path('header.php'); echo "
" . _MODULENOEXIST . "
"; include_once $GLOBALS['xoops']->path('footer.php'); exit(); } $moduleperm_handler =& xoops_gethandler('groupperm'); if ($xoopsUser) { if (!$moduleperm_handler->checkRight('module_read', $xoopsModule->getVar('mid'), $xoopsUser->getGroups())) { redirect_header(XOOPS_URL, 1, _NOPERM, false); exit(); } $xoopsUserIsAdmin = $xoopsUser->isAdmin($xoopsModule->getVar('mid')); } else { if (!$moduleperm_handler->checkRight('module_read', $xoopsModule->getVar('mid'), XOOPS_GROUP_ANONYMOUS)) { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); exit(); } } if ($xoopsModule->getVar('hasconfig') == 1 || $xoopsModule->getVar('hascomments') == 1 || $xoopsModule->getVar('hasnotification') == 1) { $xoopsModuleConfig = $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid')); } chdir('modules/' . $xoopsConfig['startpage'] . '/'); xoops_loadLanguage('main', $xoopsModule->getVar('dirname', 'n')); $parsed = parse_url(XOOPS_URL); $url = isset($parsed['scheme']) ? $parsed['scheme'] . '://' : 'http://'; if (isset($parsed['host'])) { $url .= $parsed['host']; if (isset($parsed['port'])) { $url .= ':' . $parsed['port']; } } else { $url .= $_SERVER['HTTP_HOST']; } $_SERVER['REQUEST_URI'] = substr(XOOPS_URL, strlen($url)) . '/modules/' . $xoopsConfig['startpage'] . '/index.php'; include $GLOBALS['xoops']->path('modules/' . $xoopsConfig['startpage'] . '/index.php'); exit(); } else { $xoopsOption['show_cblock'] = 1; $xoopsOption['template_main'] = "db:system_homepage.html"; include $GLOBALS['xoops']->path('header.php'); include $GLOBALS['xoops']->path('footer.php'); } ?>

2
Peekay
Re: database connection issue ?
  • 2012/2/28 15:19

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Looks like a corrupt PHP file?.

It may not be the problem, but if you edit a config file make sure there are no whitespaces after the closing PHP tag and always upload PHP files in ASCII/Text mode.
A thread is for life. Not just for Christmas.

3
jochen2011
Re: database connection issue ?
  • 2012/2/28 15:53

  • jochen2011

  • Just popping in

  • Posts: 25

  • Since: 2011/3/5 1


Hi Peekay,

that`s allOK, i just saw that accessing the page with IE I am asked to download a file named agents without any file extension. Opening that file with an editor it has the same source as the index.php-file.


That something does not get parsed the way it should, was also my first thought, so I just entered the hoster`s page and found the following:

PHP4 support Run as an Apache module
PHP5 support Run as a CGI application

is this ok ?

I use xoops version 2-5-1


puhh, I dont know why

4
Peekay
Re: database connection issue ?
  • 2012/2/28 17:24

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I know you have uploaded the files, but can you actually run PHP?

You could test with something like:

echo "Hello World!";  
?>


if that works, perhaps install another free PHP app to see if it works.
A thread is for life. Not just for Christmas.

5
jochen2011
Re: database connection issue ?
  • 2012/2/29 11:56

  • jochen2011

  • Just popping in

  • Posts: 25

  • Since: 2011/3/5 1


Hi Peekay, on the root the hello world script works, but not inside any other folder.

Thank you very much for your help !

Now I`m gonna beat the hoster

If it other problems occur I `ll return.

br, Jochen

Login

Who's Online

252 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 252


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits