11
stgeorge
Re: Parse error: syntax error, unexpected T_IF
  • 2009/8/9 7:58

  • stgeorge

  • Just popping in

  • Posts: 13

  • Since: 2009/7/21


You were right tcnet about the version, it was a 2.2.2a version with the installatron.
I have, however, installed the latest version on one Server and tried to migrate it onto three different Servers.
It is a NO GO.
Basically whenever I try to migrate a XOOPS installation it always fails with all sorts of errors.
I check the mainfile.php paths, db prefixes, double, triple check everything but it will not connect to database or has lines of errors relating to includes.
I just could not recommend it as a CMS because it just will not migrate. It would be OK for someone who will stay with one host or on one Server and is prepared to re-install and hope they can import the old database without a hitch if they decide to move the installation.



12
stgeorge
Xoops does not migrate to another Server
  • 2009/8/8 13:47

  • stgeorge

  • Just popping in

  • Posts: 13

  • Since: 2009/7/21


The database has been uploaded.
The mainfile.php has been edited for the new Server.
See below:

if ( !defined("XOOPS_MAINFILE_INCLUDED") ) {

define("XOOPS_MAINFILE_INCLUDED",1);



// XOOPS Physical Path

// Physical path to your main XOOPS directory WITHOUT trailing slash

// Example: define('XOOPS_ROOT_PATH', '/home/a41xxxxx/public_html/xoops');

define('XOOPS_ROOT_PATH', '/home/a41xxxxx/public_html/xoops');



// XOOPS Virtual Path (URL)

// Virtual path to your main XOOPS directory WITHOUT trailing slash

// Example: define('XOOPS_URL', 'http://www.fxxxxxxxxxxxxx.net/xoops');

define('XOOPS_URL', 'http://www.xxxxxxxxxxxxx.net/xoops');



define('XOOPS_CHECK_PATH', '1');

// Protect against external scripts execution if safe mode is not enabled

if ( XOOPS_CHECK_PATH && !@ini_get('safe_mode') ) {

if ( function_exists('debug_backtrace') ) {

$xoopsScriptPath = debug_backtrace();

if ( !count($xoopsScriptPath) ) {

die("XOOPS path check: this file cannot be requested directly");

}

$xoopsScriptPath = $xoopsScriptPath[0]['file'];

} else {

$xoopsScriptPath = isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_FILENAME'];

}

if ( DIRECTORY_SEPARATOR != '/' ) {

// IIS6 may double the \ chars

$xoopsScriptPath = str_replace( strpos( $xoopsScriptPath, '\\\\', 2 ) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $xoopsScriptPath);

}

if ( strcasecmp( substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace( DIRECTORY_SEPARATOR, '/', XOOPS_ROOT_PATH)) ) {

exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");

}

}



// Database

// Choose the database to be used

define('XOOPS_DB_TYPE', 'mysql');



// Table Prefix

// This prefix will be added to all new tables created to avoid name conflict in the database. Please change this to something different than 'xoops'.

define('XOOPS_DB_PREFIX', 'xxxxxx');



// Database Hostname

// Hostname of the database server. If you are unsure, 'localhost' works in most cases.

define('XOOPS_DB_HOST', 'xxxxxxxx');



// Database Username

// Your database user account on the host

define('XOOPS_DB_USER', 'a41xxxxx_xxxxxxx');



// Database Password

// Password for your database user account

define('XOOPS_DB_PASS', 'xxxxxxx');



// Database Name

// The name of database on the host. The installer will attempt to create the database if not exist

define('XOOPS_DB_NAME', 'a41xxxxx_xxxxxxx');



// Use persistent connection? (Yes=1 No=0)

// Default is 'No'. Choose 'No' if you are unsure.

define('XOOPS_DB_PCONNECT', "0");



define('XOOPS_GROUP_ADMIN', '1');

define('XOOPS_GROUP_USERS', '2');

define('XOOPS_GROUP_ANONYMOUS', '3');



if (!isset($xoopsOption['nocommon']) && XOOPS_ROOT_PATH != '') {

require XOOPS_ROOT_PATH."/include/common.php";

}

}

?>

So can anyone tell me why I get this error:

XOOPS root path not defined

It is defined correctly as it works with:
Joomla
Drupal
phpNuke
Nucleus
Mambo
phpWebsite
postNuke
Wordpress
Zikula
ocPortal

Not necessarily exactly the same site or account but the same host.

I have tried migrating XOOPS to three other servers and always get the same error.

Edit by Ghia: anonimized SQL data



13
stgeorge
Parse error: syntax error, unexpected T_IF
  • 2009/7/21 8:37

  • stgeorge

  • Just popping in

  • Posts: 13

  • Since: 2009/7/21


I have tried to install XOOPS on three occasions but have never got past a blank page until now.

This time I am getting this error:

Parse error: syntax error, unexpected T_IF in /www/xxxxxxxx/x/o/o/xoops2/htdocs/mainfile.php on line 1

This was installed using a fantastico type installer.

I chose this method this time as my previous two attempts using the downloaded package have never worked.

All the requirements are met relating to sql, php versions etc.

I am not a novice to CMS I have successfully installed and migrated all below:

* Joomla
* Drupal
* postNuke
* Nucleus
* phpNuke
* phpWebsite
* Zikula
* Wordpress
* Zen Cart
* osCommerce
* Open Realty
* phpTicket
* phpWiki
* MediaWiki
* smfForum
* phpBB
* Crafty Syntax
* FaqMaster Flex
* HelpCentreLive
* Support Centre
* Advanced Guestbook
* 4images
* Coppermine
* Web Calender

I could go on but this is just a copy and paste.

Does anyone know what the error is and why it would be there?




TopTop
« 1 (2)



Login

Who's Online

57 user(s) are online (36 user(s) are browsing Support Forums)


Members: 0


Guests: 57


more...

Donat-O-Meter

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

Latest GitHub Commits