collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 1002
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: Coopermine cpmfetch block shows database error  (Read 6132 times)

0 Members and 1 Guest are viewing this topic.

Offline vas

  • Jr. Member
  • **
  • Posts: 51
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Coopermine cpmfetch block shows database error
« on: September 08, 2009, 10:09:56 PM »
I have installed Coopermine Gallery nad added cpmfetch to get images to the portal.

I added the code below in the "Custom PHP"

<?php
  include "./../photos/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./../photos/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>

and I was able to see the image in the preview but when I try to add the block it says "Database error in block code. Please check the code."

I dont know what is conflicting with Simple Portal. I am using SMF 1.1.10 and Simple Portal 2.3.

Help Please. Thanks.

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Coopermine cpmfetch block shows database error
« Reply #1 on: September 08, 2009, 10:38:11 PM »
Turn on the 'Disable PHP Validation' setting, in your admin panel under SimplePortal -> Configuration -> General Settings.

It seems that the inbuilt SP php validation function has some issues.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline vas

  • Jr. Member
  • **
  • Posts: 51
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Coopermine cpmfetch block shows database error
« Reply #2 on: September 08, 2009, 11:26:59 PM »
Turn on the 'Disable PHP Validation' setting, in your admin panel under SimplePortal -> Configuration -> General Settings.

It seems that the inbuilt SP php validation function has some issues.

Thanks. It Worked. But will it affect other codes any way?

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Coopermine cpmfetch block shows database error
« Reply #3 on: September 08, 2009, 11:31:35 PM »
Yes it will affect all your PHP blocks/pages, SimplePortal will not perform PHP validation for any of your PHP blocks/pages. This will only cause problems if you have bugs in one of them.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline vas

  • Jr. Member
  • **
  • Posts: 51
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Coopermine cpmfetch block shows database error
« Reply #4 on: September 08, 2009, 11:36:59 PM »
Yes it will affect all your PHP blocks/pages, SimplePortal will not perform PHP validation for any of your PHP blocks/pages. This will only cause problems if you have bugs in one of them.

Thanks for your reply.

If My php Codes are Alright, It should not have problem is it not? Otherwise when we load the page in which the php code used that page will display error message. Am I correct in my interpretation.

Also,

Turn on the 'Disable PHP Validation' setting, in your admin panel under SimplePortal -> Configuration -> General Settings.

It seems that the inbuilt SP php validation function has some issues.

Is it a issue in Simple portal that has to be looked into? If so will it be noted down for future correction? If the problem is with my code... what to say I will live with this.

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Coopermine cpmfetch block shows database error
« Reply #5 on: September 09, 2009, 01:03:46 AM »
Yes it will affect all your PHP blocks/pages, SimplePortal will not perform PHP validation for any of your PHP blocks/pages. This will only cause problems if you have bugs in one of them.

Thanks for your reply.

If My php Codes are Alright, It should not have problem is it not? Otherwise when we load the page in which the php code used that page will display error message. Am I correct in my interpretation.

If your PHP code has no issues, then it should work okay. If it does have issues, then an error message will be displayed.

Turn on the 'Disable PHP Validation' setting, in your admin panel under SimplePortal -> Configuration -> General Settings.

It seems that the inbuilt SP php validation function has some issues.

Is it a issue in Simple portal that has to be looked into? If so will it be noted down for future correction? If the problem is with my code... what to say I will live with this.

I have already noted down this possible issue in the bugtracker, so that it will be looked into, and hopefully resolved with the next version of SimplePortal.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline vas

  • Jr. Member
  • **
  • Posts: 51
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Coopermine cpmfetch block shows database error
« Reply #6 on: September 09, 2009, 10:12:08 AM »
I have already noted down this possible issue in the bugtracker, so that it will be looked into, and hopefully resolved with the next version of SimplePortal.

Thanks for the information.

Offline vas

  • Jr. Member
  • **
  • Posts: 51
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Coopermine cpmfetch block shows database error
« Reply #7 on: September 12, 2009, 12:47:28 AM »
One more issue cropped up on the same above issue. I tried to have one more php code in the right block. it showed in the preview but when added it only showed the header and below nothing was present. Also, all the blocks following it did not display.

The code I used is

Code: [Select]
<?php
  
include "./../photos/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./../photos/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,1);
  
$objCpm->cpm_close();
?

The first php code was in the top blocks and the second one I tried is in the right block.

One more...

Now after the failure to add one more php block, I tried turning "Off" the 'Disable PHP Validation' to see any improvement.

I found no improvement i.e., the second block and the following blocks still did not display but the first block (which displayed block code error with php validation on) surprisingly displayed even after enabling the php validation function which mean that only when adding php blocks I require to  disable the php validation. Strange.
« Last Edit: September 12, 2009, 01:01:12 AM by vas »

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Coopermine cpmfetch block shows database error
« Reply #8 on: September 26, 2009, 11:36:37 PM »
Try using absolute paths instead of relative paths.

ie:
/user/www/forum/photos/cpmfetch/cpmfetch.php
not
./../photos/cpmfetch/cpmfetch.php
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline vas

  • Jr. Member
  • **
  • Posts: 51
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Coopermine cpmfetch block shows database error
« Reply #9 on: October 07, 2009, 11:31:43 AM »
Try using absolute paths instead of relative paths.

ie:
/user/www/forum/photos/cpmfetch/cpmfetch.php
not
./../photos/cpmfetch/cpmfetch.php

Changed as you suggested but there is no change.

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Coopermine cpmfetch block shows database error
« Reply #10 on: October 21, 2009, 02:00:29 AM »
The exact code I used on my test server, to test this issue was the code below:
Code: [Select]
require_once('/var/www/coppermine/cpmfetch/cpmfetch.php');
$objCpm = new cpm("/var/www/coppermine/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_close();

It worked perfectly for SMF 2 RC1.2 + SP 2.3.1.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.