Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 3:01 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Aug 12, 2012 1:12 pm 
Offline

Joined: Sat Aug 11, 2012 2:56 pm
Posts: 7
Hello,
i want to deploy a php validation server but i have some problems while testing.
i following this tutorial: http://forum.yubico.com/viewtopic.php?f ... ploy#p1716
but I get a php error when I want to test. (as described in the tutorial in step 6)
Quote:
Notice: Use of undefined constant LOG_LOCAL0 - assumed 'LOG_LOCAL0' in C:\webserver\htdocs\yubico\ksm\ykksm-config.php on line 6

Warning: openlog() expects parameter 3 to be long, string given in C:\webserver\htdocs\ksm\ykksm-decrypt.php on line 34
ERR Syslog open error

what does this error mean and how can I fix this?
there are also other ways to make a validation server on a Windows server?


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Mon Aug 13, 2012 7:06 am 
Offline
Site Admin
Site Admin

Joined: Thu Apr 19, 2012 1:45 pm
Posts: 148
Hello,

It seems LOG_LOCAL0 is not defined on windows, as the user 'bertunad' finds out in the thread you linked it seems you have to change it to something that is defined, LOG_USER should work fine.

/klas


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 13, 2012 5:28 pm 
Offline

Joined: Sat Aug 11, 2012 2:56 pm
Posts: 7
Klas-at-Yubico wrote:
Hello,

It seems LOG_LOCAL0 is not defined on windows, as the user 'bertunad' finds out in the thread you linked it seems you have to change it to something that is defined, LOG_USER should work fine.

/klas

Thanks, I solved this error but there comes a new problem.
I now get: Database error ERR.
I have everything checked 2 times.
Here I have the config file, but I think the problem is not the config file.
Code:
<?php
$db_dsn      = "mysql:dbname=ykksm;host=127.0.0.1";
$db_username = "root";
$db_password = "password"; //I have the password hidden
$db_options  = array();
$logfacility = LOG_USER;
?>



Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 14, 2012 2:05 pm 
Offline
Site Admin
Site Admin

Joined: Thu Apr 19, 2012 1:45 pm
Posts: 148
Hello,

Have you made sure the mysql module is loaded in php? If you're sure that it is, can you paste the exact falure you get here?

/klas


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 14, 2012 5:02 pm 
Offline

Joined: Sat Aug 11, 2012 2:56 pm
Posts: 7
i got here 2 screenshots,
one is from my php configuraton with loaded modules.
The second screenshots is from my browser when i now test the otp after i corrected the value LOG_LOCAL0 to LOG_USER
my server logs says nothing about the problem now.

I have a suspicion that the problem is in ykksm-decrypt.php.
I do not know if the perl files is because I do not know the programming language Perl.


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 15, 2012 6:55 am 
Offline
Site Admin
Site Admin

Joined: Thu Apr 19, 2012 1:45 pm
Posts: 148
Did you follow the step in the linked HOWTO where you rename the yubikeys table to ksm_yubikeys (in step 4) in that case you have to change the "...FROM yubikeys..." to read "...FROM ksm_yubikeys..."

The error is written from one of those 'die("ERR Database Error")', modify them so you can see which one. If it's the first one the error is triggered in connecting to the database or loading the database modules. If it's the second one it's triggered on querying the database. You should get the log lines in syslog as well, I guess that depends on what php on windows does with syslog..

/klas


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 15, 2012 7:55 am 
Offline

Joined: Sat Aug 11, 2012 2:56 pm
Posts: 7
I think I've read too fast ... (my wrong :lol:)
I have corrected the errors and and behind the first ("Database error ERR") is the following error.

Quote:
Notice: Undefined variable: dbh in C:\webserver\root\yubico\ksm\ykksm-decrypt.php on line 60
Fatal error: Call to a member function query() on a non-object in C:\webserver\root\yubico\ksm\ykksm-decrypt.php on line 60


i`ve tried again on a another server (xampp) and the error is gone but the error is now on that server.
Quote:
Fatal error: Cannot redeclare hex2bin() in C:\xampp\htdocs\yubico\ksm\ykksm-utils.php on line 39


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 15, 2012 8:47 am 
Offline
Site Admin
Site Admin

Joined: Thu Apr 19, 2012 1:45 pm
Posts: 148
On the first server it's probably either an error with the database modules or with connecting to the database.

On the second server you're probably running php 5.4, which comes with it's own hex2bin function, it should give the same results to the one shipped with yubikey-ksm, so you can remove/rename the function in ykksm-utils.php.

/klas


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 15, 2012 11:08 am 
Offline

Joined: Sat Aug 11, 2012 2:56 pm
Posts: 7
It works now. :D
Yubikey ksm runs correctly now: OK counter=0004 low=8c04 high=d8 use=18
The yubikey-val-server-php is almost ready but i got this: :? (One day I shall get this working! :lol: )
Quote:
Notice: Undefined property: DbImpl::$result in C:\xampp\htdocs\yubico\validation\ykval-db-pdo.php on line 85

Notice: Undefined property: DbImpl::$result in C:\xampp\htdocs\yubico\validation\ykval-db-pdo.php on line 98

Fatal error: Call to a member function closeCursor() on a non-object in C:\xampp\htdocs\yubico\validation\ykval-db-pdo.php on line 99


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 15, 2012 12:57 pm 
Offline
Site Admin
Site Admin

Joined: Thu Apr 19, 2012 1:45 pm
Posts: 148
Great that the KSM is working.

Did you change the database table name to val_yubikeys for the validation server? Since that forum post was written the validation server has been refactored. You'll need to change the tablename in the file ykval-synclib.php.

/klas


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group