Advanced search  

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

Pages: [1]   Go Down

Author Topic: Fatal error: Cannot instantiate non-existent class (SMF forum)  (Read 4885 times)

0 Members and 1 Guest are viewing this topic.

sonic393

  • Coppermine newbie
  • Offline Offline
  • Posts: 6

Hi, i'm trying to get the cpmfetch to work together with the SMF forum. My forum and the gallery are both in the root of my server.

When i do a standalone test of the plugin, it works like a charm, producing the 4 thumbs like it's supposed to do.

When i want to intgrate this part into the BoardIndex.template.php file from SMF, just below the actual forum posts, but above the info center i get the following error :

Fatal error: Cannot instantiate non-existent class: cpm in /var/www/html/forum/Sources/Load.php(1726) : eval()'d code on line 234

The code i'm inserting :

   include_once("../../../gallery/cpmfetch/cpmfetch.php");
   $objCpm = new cpm('/gallery');
   $objCpm->cpm_viewLastAddedMedia (1,4);
   $objCpm->cpm_close();


It'is pointing to the load.php file from the SMF source directory, but i haven't got a clue why...

The line of code on line 1726 of load.php if it helps :

$file_found = file_exists($filename) && eval('?' . '>' . rtrim(file_get_contents($filename))) !== false;

I hope someone can help me here.. thanx !
Logged

Nibbler

  • Guest
Re: Fatal error: Cannot instantiate non-existent class (SMF forum)
« Reply #1 on: April 06, 2007, 05:20:20 pm »

Means the path is wrong. It should be the path as seen from Load.php so you have one ../ too many I think.
Logged

sonic393

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Fatal error: Cannot instantiate non-existent class (SMF forum)
« Reply #2 on: April 06, 2007, 10:28:47 pm »

same error, but i used a workaround with an auto resizing iframe that contains the code, that also get's the job done...
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Fatal error: Cannot instantiate non-existent class (SMF forum)
« Reply #3 on: April 08, 2007, 06:26:55 am »

same error, but i used a workaround with an auto resizing iframe that contains the code, that also get's the job done...

You can try the path from the index.php's location.

Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.