SMF 1.0.5 bridge SMF 1.0.5 bridge
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

SMF 1.0.5 bridge

Started by trackie, October 31, 2005, 09:21:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

trackie

Hi,

I tried to bridge CPG and SMF 1.0.5 and this is the result I get: Who can help me out, I'am lost at this point.

Notice: Undefined offset: 7 in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 75

Notice: Undefined offset: 7 in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79

Warning: main(): open_basedir restriction in effect. File(/Settings.php) is not within the allowed path(s): (.) in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79

Warning: main(/Settings.php): failed to open stream: Operation not permitted in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79

Fatal error: main(): Failed opening required '/Settings.php' (include_path='.:/usr/apache/lib/php') in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79

These are the lines in smf.inc.php (I included the line numbers)

63 // ------------------------------------------------------------------------- //
64 // Nothing to edit below this line
65 // ------------------------------------------------------------------------- //
66
67 // Otherwise, try to autodetect SMF path if not set:
68 if (substr($path, -1) == '/')
69         $path = substr($path, 0, -1);
70
71 $possible_paths = array($path, '..', '../forum', '../forums',
72 '../community', '../yabbse', '../smf');
73
74 $correct = 0;
75 while (!file_exists($possible_paths[$correct] . '/Settings.php') &&
76 count($possible_paths) > $correct)
77         $correct++;
78
80         require_once('../forum/smf_api.php');
81
82 smf_authenticateUser();
83 smf_loadSession();
84 smf_logOnline('coppermine');
85       
86 require_once($possible_paths[$correct] . '/Settings.php');
87
88 define ('SMF', 1);

My host is running PHP in safe mode!

Hope to hear from you.

Cheers,

Alfred

Nibbler

You specified the path wrong.


// Set this to the location of your Settings file:
$path = '../smf';

trackie

I do not use the ./smf directory, I placed all my files in the ./forum directory.


Nibbler

Right, so change it :)


// Set this to the location of your Settings file:
$path = '../forum';


That's the only part of the file you need to change.

trackie

I also get an error message about my host name.

I use an IP-address and not a specific name. When I fill in the IP-address of my MYSQL host I get an error saying:

Parse error: parse error, unexpected T_DNUMBER in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 95

89 // other includes
90 cm_include_smf_funcs("$sourcedir/Load.php", array("cache_get_data", "reloadSettings", "md5_hmac", "loadUserSettings"));
91 cm_include_smf_funcs("$sourcedir/Subs.php", array("updateMemberData", "updateStats", "updateSettings"));
92
93 // database configuration
94 define('SMF_DB_NAME', ********); // The name of the database used by the board
95 define('SMF_DB_HOST', 172.16.110.131); // The name of the database server
96 define('SMF_DB_USERNAME', ********); // The username to use to connect to the database
97 define('SMF_DB_PASSWORD', ********); // The password to use to connect to the database
98
99 // The web path to your SMF Board directory
100 define('SMF_WEB_PATH', "$/forum/");
101
102 // The Name of the Cookie used for SMF logon
103 define('SMF_COOKIE_NAME', SMFCookie10);
104
105 // Prefix for the database tables
106 define('SMF_TABLE_PREFIX', smf_); // Table Prefix

Nibbler

As I said before, the path is the only part of the file you need to change. Leave the rest alone.

trackie

Thnxs,

I extracted the smf.inc.php file from the original zip package. I did no adjustmenst or what so ever, But.... the same error message:

Notice: Undefined offset: 7 in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 75

Notice: Undefined offset: 7 in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79

Warning: main(): open_basedir restriction in effect. File(/Settings.php) is not within the allowed path(s): (.) in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79

Warning: main(/Settings.php): failed to open stream: Operation not permitted in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79

Fatal error: main(): Failed opening required '/Settings.php' (include_path='.:/usr/apache/lib/php') in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79


My hosting provider is running PHP in safe mode and some features are disabled/excluded. Has this something to do with it?

Nibbler

It means you still haven't set the path correctly. What's your directory layout ? Post links to your coppermine gallery and smf forum and what you have set for the path currently.

trackie

the forum is installed in

www.trackie.nl/forum

/html/forum

the gallery is installed in:

www.trackie.nl/CPG_Gallery

/html/CPG_Gallery


This is the path in the smf.inc.php file

// Set this to the location of your Settings file:
$path = '../smf';

Nibbler

Right, so change this:

$path = '../smf';

to this

$path = '../forum';

trackie

Done!

No result. Error message stays.

trackie

The error message is hosting provider related.

Ladot/Active 24 is running PHP in safe mode and therefor some PHP functions are not allowed/available. I tried putting Settings.pl from my forum directory in the bridge directory to bypass the file location problem.

But my PHP knowledge is very basic so I am not able to change the smf.inc.php file so it will work properly. Is there someone who can rewrite the bridge file, so it will work in PHP safemode?


These are the error message I get:

Notice: Undefined offset: 7 in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 75

Notice: Undefined offset: 7 in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79

Warning: main(): open_basedir restriction in effect. File(/Settings.php) is not within the allowed path(s): (.) in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79

Warning: main(/Settings.php): failed to open stream: Operation not permitted in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79

Fatal error: main(): Failed opening required '/Settings.php' (include_path='.:/usr/apache/lib/php') in /mnt/storage2/t/tr/trackie.nl/html/CPG_Gallery/bridge/smf.inc.php on line 79


There are no flaws in the script and it should work properly.