Re: pnCPG 5.00 Re: pnCPG 5.00
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Re: pnCPG 5.00

Started by Hurricane, January 04, 2009, 01:19:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hurricane

Hello,
I have a question. I use Zikula 1.1.0 and pnCPG 5.
Do I have to still install pnSSI? That cannot be done. Work the pnSSI with Zikula 1.1.0?

Can't I syncronisieren the Zikula user into the CPG?
If I on " Start Sync" get I click the following errors indicated:
QuoteFatal error: Call to undefined function readini() in /srv/www/htdocs/web???/html/modules/pnCPG/pnadmin.php on line 583
there stands:
Quote$cpg_loc = readini($configfile,"settings","cpg_location");
my path is however correct. It tried already with absolute and folds also not?????

for my bad English  ::) :-[ :-[

Greetings
Hurricane

Joachim Müller

Split from sticky thread. Do not try to hijack announcement threads with your individual issues.

Hurricane


casNuy

Yes it does work together with pnSSI, the files needed are within the download.( You do need to download pnSSI seperately.)
Then automatically the users will be synchronized on first access.

I will look into the reported error but this may take some time since I am travelling @ the moment.

Hurricane

QuoteYes it does work together with pnSSI, the files needed are within the download.( You do need to download pnSSI seperately.)
Then automatically the users will be synchronized on first access.
OK then I try that again.


QuoteI will look into the reported error but this may take some time since I am travelling @ the moment.
That is not a problem. Always slowly.  :) Thanks!!

Hurricane

Hello.
Is here already which in view? A new version of Zikula (1.1.1) came.
Thanks..

Greetings
Hurricane

casNuy

Can you try this function ()in pnadmin.php (simply replace the old one):

function pnCPG_admin_SyncPN() {
// first get configuration parameter
$selconfig = pnModGetVar('pnCPG', '_inifile');
// if not supplied, insert default value
if(!$selconfig){
$selconfig="config.ini";
}
$configfile =getcwd() ;
$configfile.="/modules/pnCPG/pnconfig/";
$configfile.=$selconfig ;
$ini_array = parse_ini_file($configfile);
$CPGloc1=$ini_array[cpg_location];
$cpg_loc=trim($CPGloc1);
$_cpg_prf = $ini_array[cpg_prefix];
$db=$ini_array[cpg_database];
$_dbhost=$ini_array[cpg_pn_host];
$_dbuser=$ini_array[cpg_pn_dbuser];
$_dbpw=$ini_array[cpg_pn_dbpwd];
$_pnroot=$ini_array[cpg_pn_root];
$makealbum=$ini_array[cpg_create_album];
$_pn_prf = pnConfigGetVar('prefix');
// Load Postnuke users
$results = mysql_query( "SELECT pn_uname,pn_email FROM $_pn_prf LIMIT 0 , 999999" );

//store the result in a PHP array for multiple use
$dbdata=array();
$dbdata1=array();
$usr_num = 0;
while($row = mysql_fetch_array($results)) {
$usr_num ++;
$dbdata[$usr_num]=$row[0];
$dbdata1[$usr_num]=$row[1];
}

// is there another database owner, let's connect
if ($_dbhost !==""){
$link = mysql_connect($_dbhost, $_dbuser, $_dbpw) or mysql_error();
}
$true = mysql_select_db($db) ;

$teller = 0;
while ($teller < $usr_num ){
$teller ++ ;
$username = $dbdata[$teller];
$usermail = $dbdata1[$teller];

// Check if already added to Coppermine
$results1 = mysql_query( "SELECT * FROM $_cpg_prf WHERE user_name=$username " );
$num_rows1 = mysql_num_rows($results1);

// if not there, add the account
if ($num_rows1 < 1){
$cpg_pwd = ranpass() ;
$adding = mysql_query("INSERT INTO $_cpg_prf(user_group, user_active,user_name, user_password,user_lastvisit, user_regdate,user_email) VALUES ('2','YES', '$username','$cpg_pwd',NOW(), NOW(),'$usermail')");
if ($makealbum == 'y'){
$results = mysql_query( "SELECT * FROM $_cpg_prf where user_name='$username' " );
$USER_DATA = mysql_fetch_array($results);
$temp_user_cat = $USER_DATA['user_id'];
$temp_user_cat = $temp_user_cat + 10000;
mysql_query("INSERT INTO $_cpg_album(title, description, visibility, uploads, comments, votes, pos, category, pic_count, thumb, last_addition, stat_uptodate, keyword) VALUES ('$f_username', '', '0', 'NO', 'YES', 'YES', '1', '$temp_user_cat', '0', '0', '0', 'NO', '$f_username')");
}
} else {
//update e-mail
$updating = mysql_query("UPDATE $_cpg_prf set  user_email = '$usermail' where user_name='$username' limit 1");
}
}

$true = pnDBInit();
    // Return
    return true;
}


eberthet

Hi all,

I have the same issue as Hurricane.  ???

I've Zikula 1.1.1 web site on IIS7.
I'm using the pnCPG 5.01
Single sign on works fine when users exist in zikula table and Coppermine table. They are correctly logged on Coppermine with their username.
The problem is when I tried to synchronize all users of my Zikula site with Coppermine users, when I click on "Start Sync" and get the error
"Fatal error: Call to undefined function readini() in ...\pnadmin.php on line 583 "

I tried several settings (config file). I've tried the function code provided by casNuy. With that code I don't receive any error but the page keep blank. However no modification occurs in the tables.

Thank you for your help

Eberthet

Joachim Müller

Hurrican hijacked the announcement thread and got split from that. You hijack Hurrican's thread instead of starting a thread of your own that contains the needed information for supporters to enable them to help you (like a link to your gallery). Locking. Start a thread of your own, doing as suggested in the board rules thread.