[PHP] LDAP support...

2002-12-23 Thread Peter Lavender
Hi everyone

Quick question:

I'm running debian and have apt-get php and openldap.  openldap works,
as does php.  I'm now working with the ldap functions and here is where
I'm stuck.

I can see from phpinfo() that ldap has been compiled in:

'--with-ldap=shared,/usr'

My problem is the following error on ldap_connect();

undefined function: ldap_connect()

So where do I look now?  

Will I need to get the source and compile it?

Thanks,

Pete



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] LDAP support...

2002-12-23 Thread Peter Lavender
OK this is lame, but I'm posting a reply straight after the message hits
my box...

> I'm running debian and have apt-get php and openldap.  openldap works,
> as does php.  I'm now working with the ldap functions and here is where
> I'm stuck.


apt-cache search php4

what turns up?

php4-ldap

I've installed the package, restarted apache but still not joy.. :(

Pete



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] rounding...sort of

2002-12-28 Thread Peter Lavender
Hi everyone,

I have a nubmer: 4.1 but I only want the whole number 4, even if it's
4.9, so this rules out using round (Unless I missed a parameter).

How could I do this.. I'm drawing a blank...

Pete




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] inserting a file into MSSQL

2002-01-08 Thread Peter Lavender

Hi everyone,

Does anyone have a link to a good reference on how to insert a binary file
(zip file) into MSSQL?

I've got the upload and stuff working, just a bit unsure about how I'm now
going to put the file(it's been moved) into the database itself.  The
datatype I have used is Image, but most of the examples I have seen have
used text or some similar to store the file.

Thanks,

Pete


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] inserting a file into MSSQL

2002-01-08 Thread Peter Lavender

Sorry to post twice, I should have said that I'm using php 4.1.11.

A PEAR example would be even better :)

> Hi everyone,
>
> Does anyone have a link to a good reference on how to insert a binary file
> (zip file) into MSSQL?
>
> I've got the upload and stuff working, just a bit unsure about how I'm now
> going to put the file(it's been moved) into the database itself.  The
> datatype I have used is Image, but most of the examples I have seen have
> used text or some similar to store the file.
>
> Thanks,
>
> Pete
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] binary data - MSSQL

2002-01-09 Thread Peter Lavender

Hi Everyone,

I did ask this earlier, but I have made some head way since, but I'm still
not sure that I have things right.

What datatype should I use for zip files?

How do I create a link to a file to be downloaded from the database?

All the examples I have read all relate to images, which hasn't really
helped.

THanks,

Pete


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] session problems not finding my variables..

2002-01-15 Thread Peter Lavender

Hi everyone,

I'm not sure what I have done wrong here.  I haven't been sucessful in
finding anything that points to what the cuase could be.

What I find interesting is that I have used session in another area of the
web site with out problems.  The only difference between it and the way I
have done it here is that I'm using the header function in this bit of code,
where as the session is started and variables registered and the processing
is done on another page.

Anyway here is the code for the log in page:



function checkdetails($db, $HTTPVARS) {
//check if allowed access
$user = $HTTPVARS['uid'];
$passwd = $HTTPVARS['passwd'];

$sql = "select * from tbl_maxware where loginID = '$user' and password =
'$passwd';";
$result = $db->query($sql);
checkError($result, $db, "Error in checkDetails");

if ($result->numrows() == 0) {
echo "";
echo "Error Loging In";
echo "Not a valid login try again or contact the admin";
echo "Try Again";
echo "";
exit();
} else {
// matched in the maxware table
$result->fetchinto($success);
$UID = $success[0];
$logUID = $success[1];
$logName = $success[2];
//echo session_save_path();
session_register("UID", "logUID", "logName");
// send them to the main page
header("Location: ./supportau.php");
}

} // end checkdetails

if (array_key_exists( "uid", $HTTP_POST_VARS ) ) {
checkdetails($db, $HTTP_POST_VARS);
} else {
login();
}
?>



Code for the following "main page"










Support Database






This returns an error:

 PHP Warning: Undefined variable: logName in
c:\inetpub\wwwroot\supportau\supportau.php on line 25

Thanks,

Pete




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] odbc_num_rows always returns -1

2001-11-20 Thread Peter Lavender

Hi Everyone,

As the subject says.

I'm using 4.0.6 on IIS/win2k to a MSSQL 2000 database.

I wish to check if a query returns any values, so the code I have is nothing
more than:

$numRows = odbc_num_rows($result);
print ("$numRows");
if ($numRows <= 0) {

print("Nothing to show");

}

Have I missed something.. with the result always being -1, it causes me some
problems.. :)

Thanks

Pete


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] error on update

2001-11-25 Thread Peter Lavender

Hi everyone,

I'm connecting to a SQL SVR 2000 database and get an error that I haven't
been able to resolve.

The following code generates an error Incorrect syntax near 'longer'; SQL
state 3700 in SQLExecDirect

I read some where that it might be due to a reserved word in column names,
but this isn't the case.

Here is the code:

  print("QID: $qIDQuestion to be updated to: $updateQuest");
$updateQuest = cleanUpText($updateQuest);

$query = "update tbl_question ";
$query .= "set question = '$updateQuest' ";
$query .= "where questID = '$qID';";

print("Query= $query");

print("Cleaned up: $updateQuest");
$result = odbc_exec($conn, $updateQuest);
unset($updateQuest);

I can copy and paste the resultant SQL and execute it fine in the query
analyser.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]