01-13-2010, 11:40 AM
beuntje
2005-05-12 00:46:22 PDT
I Just Installed OpenDocMan v1.2p2 with the setup.php
I use IIS on Win2000
PHP 5.0.4
MySql 4.1
The installation went wirhout a problem
On the index page is used 'Sign-up for an account' , this worked.
Now i want to login with the new account or witn the admin account, but then i get the next message:
Notice: Undefined offset: 1 in d:\Inetpub\wwwroot\docserver\index.php on line 43
Warning: Cannot modify header information - headers already sent by (output started at d:\Inetpub\wwwroot\docserver\index.php:43) in d:\Inetpub\wwwroot\docserver\index.php on line 70
Does anyone know what i a doing wrong?
logart
2005-05-12 06:24:33 PDT
It is the NIS related code I applied. I guess that does not work so well with Windows, as you probably don't have the ypmatch command. Please add this to the bug tracker. Fix is below:
--- index.php 2005-05-12 06:18:54.884329475 -0700
+++ index.php.new 2005-05-12 06:23:56.361466381 -0700
@@ -38,24 +38,11 @@
$frmuser = $_POST['frmuser'];
$frmpass = $_POST['frmpass'];
- // Check for NIS/YP data
- $pwent = split(":",`ypmatch $frmuser passwd`);
- $cryptpw = crypt($frmpass,substr($pwent[1],0,2));
-
// check login and password
// connect and execute query
$query = "SELECT id, username, password FROM user WHERE username = '$frmuser' AND password = password('$frmpass')";
$result = mysql_query("$query") or die ("Error in query: $query. " . mysql_error());
- // if MySQL login fails, check NIS/YP data
- if (mysql_num_rows($result) == 0)
- {
- if (isset($pwent) && isset($cryptpw) && strcmp($cryptpw,$pwent[1]) == 0)
- {
- $query = "SELECT id, username, password FROM user WHERE username = '$frmuser'";
- $result = mysql_query("$query") or die ("Error in query: $query. " . mysql_error());
- }
- }
// if row exists - login/pass is correct
if (mysql_num_rows($result) == 1)
{
logart
2005-06-17 09:02:21 PDT
Fixed in CVS
2005-05-12 00:46:22 PDT
I Just Installed OpenDocMan v1.2p2 with the setup.php
I use IIS on Win2000
PHP 5.0.4
MySql 4.1
The installation went wirhout a problem
On the index page is used 'Sign-up for an account' , this worked.
Now i want to login with the new account or witn the admin account, but then i get the next message:
Notice: Undefined offset: 1 in d:\Inetpub\wwwroot\docserver\index.php on line 43
Warning: Cannot modify header information - headers already sent by (output started at d:\Inetpub\wwwroot\docserver\index.php:43) in d:\Inetpub\wwwroot\docserver\index.php on line 70
Does anyone know what i a doing wrong?
logart
2005-05-12 06:24:33 PDT
It is the NIS related code I applied. I guess that does not work so well with Windows, as you probably don't have the ypmatch command. Please add this to the bug tracker. Fix is below:
--- index.php 2005-05-12 06:18:54.884329475 -0700
+++ index.php.new 2005-05-12 06:23:56.361466381 -0700
@@ -38,24 +38,11 @@
$frmuser = $_POST['frmuser'];
$frmpass = $_POST['frmpass'];
- // Check for NIS/YP data
- $pwent = split(":",`ypmatch $frmuser passwd`);
- $cryptpw = crypt($frmpass,substr($pwent[1],0,2));
-
// check login and password
// connect and execute query
$query = "SELECT id, username, password FROM user WHERE username = '$frmuser' AND password = password('$frmpass')";
$result = mysql_query("$query") or die ("Error in query: $query. " . mysql_error());
- // if MySQL login fails, check NIS/YP data
- if (mysql_num_rows($result) == 0)
- {
- if (isset($pwent) && isset($cryptpw) && strcmp($cryptpw,$pwent[1]) == 0)
- {
- $query = "SELECT id, username, password FROM user WHERE username = '$frmuser'";
- $result = mysql_query("$query") or die ("Error in query: $query. " . mysql_error());
- }
- }
// if row exists - login/pass is correct
if (mysql_num_rows($result) == 1)
{
logart
2005-06-17 09:02:21 PDT
Fixed in CVS