php-general Digest 29 Nov 2006 08:40:34 -0000 Issue 4486

Topics (messages 245246 through 245266):

Re: Process of creating invoices requiring human thought!
        245246 by: Jon Anderson

Odd error after upgrading from Php4 to Php5
        245247 by: Ian Barnes
        245255 by: Jochem Maas
        245260 by: Ian Barnes
        245266 by: Jochem Maas

session issues on ie
        245248 by: blackwater dev
        245264 by: Vincent DUPONT

Re: backing up a database
        245249 by: James Tu
        245250 by: Chris
        245252 by: Warren Vail

Re: Readdir
        245251 by: Tom Chubb
        245256 by: Jochem Maas

Re: mail header questions
        245253 by: Chris

Re: Detecting naughty sites
        245254 by: Paul Novitski
        245257 by: Travis Doherty

Re: func_get_args as a hash? (faster constructors)
        245258 by: Jochem Maas

Connect to Sybase !
        245259 by: Le Phuoc Canh

Re: Tidy HTML source?
        245261 by: Fredrik Thuresson

Re: Write to boolean attribute
        245262 by: Carsten Gehling
        245263 by: Chris
        245265 by: Carsten Gehling

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
James Nunnerley wrote:
Can anyone see an easy way of putting that sort of “human thinking” into a
script?  Any guidance would be gratefully received…
You could include a "fuzz" factor that is acceptable to your application. You could also provide a "nicer" fuzz factor to people who don't use up all the hours in other time periods.

E.g. (pseudo-code, time represented in seconds)

$fuzz = 1800;
if ($client['end']-$fuzz < $timePeriod['start']) // freebie

or for the unused time thing:

if ($client['end']-($fuzz+$unused) < $timePeriod['start']) // freebie

Of course you can probably think of dozens of variations on that theme, but you get the idea.

jon

--- End Message ---
--- Begin Message ---
Hi,

We recently upgraded our primary webserver to php 5 from php4 and we are now
getting the following errors on the site:

*Catchable fatal error*: Object of class stdClass could not be converted to
string in /home/www/somesite/somfile.php on line *199

*Around that area in the code is some code something like:

if(!$db->query("SQL QUERY HERE"))
{
  echo 'Fail';
}

Any ideas what it means or how I can fix it ?

Thanks
Ian

P.S. Please copy me, i dont know if my list membership is working.

--- End Message ---
--- Begin Message ---
Ian Barnes wrote:
> Hi,
> 
> We recently upgraded our primary webserver to php 5 from php4 and we are
> now
> getting the following errors on the site:
> 
> *Catchable fatal error*: Object of class stdClass could not be converted to
> string in /home/www/somesite/somfile.php on line *199
> 
> *Around that area in the code is some code something like:

so what is line 199?

> 
> if(!$db->query("SQL $HaveYouGoTAVarInHere HERE"))

                        ^^^^---- ??

> {
>   echo 'Fail';
> }
> 
> Any ideas what it means or how I can fix it ?
> 
> Thanks
> Ian
> 
> P.S. Please copy me, i dont know if my list membership is working.
> 

--- End Message ---
--- Begin Message ---
Hi,

$sql1 = "UPDATE members SET $pass WHERE id = '$editid'";

Thats whats on 199. ON line 198 i have: $pass = $_POST['pass'];

Thanks,
Ian



On 11/29/06, Jochem Maas <[EMAIL PROTECTED]> wrote:

Ian Barnes wrote:
> Hi,
>
> We recently upgraded our primary webserver to php 5 from php4 and we are
> now
> getting the following errors on the site:
>
> *Catchable fatal error*: Object of class stdClass could not be converted
to
> string in /home/www/somesite/somfile.php on line *199
>
> *Around that area in the code is some code something like:

so what is line 199?

>
> if(!$db->query("SQL $HaveYouGoTAVarInHere HERE"))

                        ^^^^---- ??

> {
>   echo 'Fail';
> }
>
> Any ideas what it means or how I can fix it ?
>
> Thanks
> Ian
>
> P.S. Please copy me, i dont know if my list membership is working.
>



--- End Message ---
--- Begin Message ---
Ian Barnes wrote:
> Hi,
> 
> $sql1 = "UPDATE members SET $pass WHERE id = '$editid'";

you might consider that $editid is not what you think.
use var_dump() et al to discover what is really in each var.

> 
> Thats whats on 199. ON line 198 i have: $pass = $_POST['pass'];

which means I can inject just about any SQL I want into your server.
(you need to plug that hole)

> 
> Thanks,
> Ian
> 
> 
> 
> On 11/29/06, Jochem Maas <[EMAIL PROTECTED]> wrote:
>>
>> Ian Barnes wrote:
>> > Hi,
>> >
>> > We recently upgraded our primary webserver to php 5 from php4 and we
>> are
>> > now
>> > getting the following errors on the site:
>> >
>> > *Catchable fatal error*: Object of class stdClass could not be
>> converted
>> to
>> > string in /home/www/somesite/somfile.php on line *199
>> >
>> > *Around that area in the code is some code something like:
>>
>> so what is line 199?
>>
>> >
>> > if(!$db->query("SQL $HaveYouGoTAVarInHere HERE"))
>>
>>                         ^^^^---- ??
>>
>> > {
>> >   echo 'Fail';
>> > }
>> >
>> > Any ideas what it means or how I can fix it ?
>> >
>> > Thanks
>> > Ian
>> >
>> > P.S. Please copy me, i dont know if my list membership is working.
>> >
>>
>>
> 

--- End Message ---
--- Begin Message ---
I have code which logs someone in and then allows them to see certain info
if they are logged in.  I have users who claim it works fin in some of their
browsers, firefox, safari, etc and some versions of IE but not all and I'm
stumped.

Here's the code:


//this is from the login routine
if ($this->db->getField('user_id')){

                       session_start();

$_SESSION['user']['user_id']=$this->db->getField('user_id');

$_SESSION['user']['email']=$this->db->getField('email');
                       return true;
}

       <?
       //only show if they are logged in
       if (isset($_SESSION['user']['user_id']) && !$_REQUEST['mlsid']){
//show something
}
       ?>

People are claiming it tells them they are logged in yet they don't see what
is displayed under the code which checks their session.  For some reason,
sessions don't seem to be there on all browsers yet they claim that cookies
and all are on.

Any ideas?

Thanks!

--- End Message ---
--- Begin Message ---
Hi,

do you have any access to the client computers (is it an intranet)? If so, 
check yourself the existence of the cookie and check JS and cookie settings on 
their browser.From my own experience, you should never truct the user's 
comments about their config or actions...

Otherwise, you could make a simple session_test.php pages that will test the 
session_id() values. 
simply put session_start();
then print the session_id();


If the session is ok, then the users should see the same session id on every 
successive refresh (F5). If they don't see the same ID, then, they have a 
problem.


If they have a problem for Ie only, I only see the cookie reason.

good luck
vincent

-----Original Message-----
From: blackwater dev [mailto:[EMAIL PROTECTED]
Sent: Tue 28/11/2006 22:47
To: php-general@lists.php.net
Subject: [PHP] session issues on ie
 
I have code which logs someone in and then allows them to see certain info
if they are logged in.  I have users who claim it works fin in some of their
browsers, firefox, safari, etc and some versions of IE but not all and I'm
stumped.

Here's the code:


//this is from the login routine
 if ($this->db->getField('user_id')){

                        session_start();

$_SESSION['user']['user_id']=$this->db->getField('user_id');

$_SESSION['user']['email']=$this->db->getField('email');
                        return true;
 }

        <?
        //only show if they are logged in
        if (isset($_SESSION['user']['user_id']) && !$_REQUEST['mlsid']){
//show something
}
        ?>

People are claiming it tells them they are logged in yet they don't see what
is displayed under the code which checks their session.  For some reason,
sessions don't seem to be there on all browsers yet they claim that cookies
and all are on.

Any ideas?

Thanks!

--- End Message ---
--- Begin Message ---
Thanks Brad:

I'm just surprised that when people mention mysqldump, most of the time they don't talk about locking the tables at all.
I'm curious why this is the case.

-James



Does one need to lock(?) MySQL before running mysqldump?
Or will the mysqldump command wait for any pending operations to
finish, lock the tables for dumping and once finished release the lock?

-James

It is my understanding that mysql will not do this unless specified.

http://dev.mysql.com/doc/refman/4.1/en/mysqldump.html


--lock-all-tables, -x

Lock all tables across all databases. This is achieved by acquiring a global read lock for the duration of the whole dump. This option automatically turns off --single-transaction and --lock-tables. Added in MySQL 4.1.8.

--lock-tables, -l

Lock all tables before dumping them. The tables are locked with READ LOCAL to allow concurrent inserts in the case of MyISAM tables. For transactional tables such as InnoDB and BDB, --single-transaction is a much better option,
because it does not need to lock the tables at all.

Please note that when dumping multiple databases, --lock-tables locks tables for each database separately. Therefore, this option does not guarantee that the tables in the dump file are logically consistent between databases. Tables in different databases may be dumped in completely different states.

-B

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



--- End Message ---
--- Begin Message ---
James Tu wrote:
Thanks Brad:

I'm just surprised that when people mention mysqldump, most of the time they don't talk about locking the tables at all.
I'm curious why this is the case.

Because you don't need to. More of a mysql-mailing list question to be honest.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
I think it becomes an issue only if the database structure is complex
with multiple related tables, and have lots of update activity.  I think
most people design applications that don't require anything so complex,
and most queries are of the select variety.

Warren Vail

-----Original Message-----
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 28, 2006 2:50 PM
To: James Tu
Cc: PHP General List
Subject: Re: [PHP] backing up a database

James Tu wrote:
> Thanks Brad:
> 
> I'm just surprised that when people mention mysqldump, most of the
time 
> they don't talk about locking the tables at all.
> I'm curious why this is the case.

Because you don't need to. More of a mysql-mailing list question to be 
honest.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

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

--- End Message ---
--- Begin Message ---
Got it working fine. Thanks Vincent and Jochem for pointing me in the
right direction. Here is the code I used in case anyone's
interested...

<?php
foreach(glob($path.$id."{*.doc,*.pdf,*.txt,*.rtf}",
GLOB_BRACE) as $filename) { $cvs[]=$filename; }

//Loop through the four possible extensions
$i = 0;
while ($i <= 3) {
        //Check there is a value before displaying
        if(!empty($cvs[$i])) {
        $cv = str_replace($path, "", $cvs[$i]) ;
       echo "<a href=\"$cvs[$i]\">$cv</a>";
                echo "<br>";
       }
        echo "\n";
        $i++;
}
?>

On 28/11/06, Tom Chubb <[EMAIL PROTECTED]> wrote:
Thanks guys,
Looks like just what I need. Will test it out later.

Tom

On 28/11/06, Vincent DUPONT <[EMAIL PROTECTED]> wrote:
>
> yes, glob works well.
> here is an example to get pictures inside a folder ($path)
>
> foreach(glob($path."/*/{*.gif,*.jpg,*.JPG,*.jpeg,*.JPEG,*.png}", GLOB_BRACE) 
as $filename){
>                        $pics[]=$filename;
>                }
>
> vincent
> -----Original Message-----
> From: Jochem Maas [mailto:[EMAIL PROTECTED]
> Sent: Tue 28/11/2006 10:59
> To: Tom Chubb
> Cc: [php] PHP General List
> Subject: Re: [PHP] Readdir
>
> Tom Chubb wrote:
> > What would be the best way to retrieve a list of files from an upload
> > folder that are called "id" where the extension could be .doc .txt or
> > .pdf
> > For example, I have a folder where people can upload a document and
> > the document is renamed as their user id. They can upload a PDF, DOC
> > or TXT file. They may wish to upload one of each. I am using
> > file_exists for each case, but is there an easier/tidier way of doing
> > it?
> > Thanks in advance,
> >
> > Tom
> >
>
> try the glob() function, something like:
>
> $id = getUserId();
> foreach (glob("/path/to/user/files/$id.*") as $file) {
>        echo $file,"<br />";
> }
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
Tom Chubb wrote:
> Got it working fine. Thanks Vincent and Jochem for pointing me in the
> right direction. Here is the code I used in case anyone's
> interested...
> 
> <?php
> foreach(glob($path.$id."{*.doc,*.pdf,*.txt,*.rtf}",
> GLOB_BRACE) as $filename) { $cvs[]=$filename; }
> 
> //Loop through the four possible extensions
> $i = 0;
> while ($i <= 3) {
>     //Check there is a value before displaying

why? glob only finds things if they exist.
*looks* like a misunderstanding of GLOB_BRACE.

why 2 loops?

>     if(!empty($cvs[$i])) {
>        $cv = str_replace($path, "", $cvs[$i]) ;
>        echo "<a href=\"$cvs[$i]\">$cv</a>";
>         echo "<br>";
>        }
>     echo "\n";
>     $i++;

this shouldn't work. at least the links shouldn't work
unless the files are on a local disk (which is a web scenario is unlikely).

foreach(glob($path.$id."{*.doc,*.pdf,*.txt,*.rtf}",GLOB_BRACE) as $f) {
        echo '<a 
href="',makeFilePathIntoValidURL($f),'">',basename($f),'</a><br />';
}

// just a example/idea - I assume the 'id' files are accessible via the web
function makeFilePathIntoValidURL($f) {
        if (!strpos($f, $_SERVER['DOCUMENT_ROOT']) === 0) return '#nolink';
        return str_replace($_SERVER['DOCUMENT_ROOT'], $f);
}

>

> }
> ?>
> 
> On 28/11/06, Tom Chubb <[EMAIL PROTECTED]> wrote:
>> Thanks guys,
>> Looks like just what I need. Will test it out later.
>>
>> Tom
>>
>> On 28/11/06, Vincent DUPONT <[EMAIL PROTECTED]> wrote:
>> >
>> > yes, glob works well.
>> > here is an example to get pictures inside a folder ($path)
>> >
>> > foreach(glob($path."/*/{*.gif,*.jpg,*.JPG,*.jpeg,*.JPEG,*.png}",
>> GLOB_BRACE) as $filename){
>> >                        $pics[]=$filename;
>> >                }
>> >
>> > vincent
>> > -----Original Message-----
>> > From: Jochem Maas [mailto:[EMAIL PROTECTED]
>> > Sent: Tue 28/11/2006 10:59
>> > To: Tom Chubb
>> > Cc: [php] PHP General List
>> > Subject: Re: [PHP] Readdir
>> >
>> > Tom Chubb wrote:
>> > > What would be the best way to retrieve a list of files from an upload
>> > > folder that are called "id" where the extension could be .doc .txt or
>> > > .pdf
>> > > For example, I have a folder where people can upload a document and
>> > > the document is renamed as their user id. They can upload a PDF, DOC
>> > > or TXT file. They may wish to upload one of each. I am using
>> > > file_exists for each case, but is there an easier/tidier way of doing
>> > > it?
>> > > Thanks in advance,
>> > >
>> > > Tom
>> > >
>> >
>> > try the glob() function, something like:
>> >
>> > $id = getUserId();
>> > foreach (glob("/path/to/user/files/$id.*") as $file) {
>> >        echo $file,"<br />";
>> > }
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>>
> 

--- End Message ---
--- Begin Message ---
Chantal Rosmuller wrote:
Hi Manuel,

1) I can't get the From header right, when I receive the test mail the
sender is apache
There is From: and From . From is not a real header. It is just set by
some MTA to the return path address and is also used as separator in
mailbox files with multiple messages in the mbox format.

If you can set the Return-Path address, you will most likely change what
appears in the From header.

I forgot to mention that I can't set the return-path either.

That can *only* be an email address - you can't include a "name" in the return-path. Also it can't be changed if safe-mode is on for the server.

From your code, where does $mainmail come from? It's not in the code you posted at all.

$headers .= "From: $mainmail \r\n";

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
At 11/28/2006 11:57 AM, Rory Browne wrote:
I didn't mean something quite that simple, or as an absolute solution.

I meant something slightly more advanced, but based on that idea.

From a robot point of view, what do you think is the difference
between the php archives and a porn site?


What eaxctly do you mean by "porn"? Certainly there are websites that 99 people in a room of 100 would label as pornography, but the grey area is the killer -- an enormous volume of material that various people will label "pornographic" and others won't. Whose opinion will you use in crafting your software?

Only when you define "porn site" with sufficient specificity can you attempt to write an algorithm to recognize one. When you've accomplished all that, you can apply similar logic to recognizing truly good movies, really delightful reads, absolutely delicious recipes, and undeniably correct political opinions. You'll be a genius -- providing you can find enough people to agree with you.

If we humans can't reliably define the boundaries of a set, how can we write software to recognize its (pardon the expression) members? How would we know when the software was functioning correctly? Who would judge the accuracy of its findings?

You can work for weeks developing an algorithm to detect "porn" and it will take others an hour or a day to find the gaps in the definition. I think any program you could write would have so many false positives & false negatives that you'd end up having to manually moderate the process anyway.

Please understand that I love (if I may use that verb ever so delicately) writing software that parses human expression in search of patterns and specific content. I love bestowing on a program the flexibility and grace it requires to enter that messy jungle and return with a map or a fact. I could write a spider that flagged websites containing certain words (in English, at least, without assistance), but I'm not as comfortable with the prospect of writing a sexual content filter so dependable that I'd be happy to leave it to guard a gate on its own. I'm sure it would slam the door on many undeserving people and would happily let in others my client wouldn't want. For a commercial site hoping to make money from advertisers, it wouldn't pay to have a near-sighted or illiterate gatekeeper.

Perhaps the only way to do what you're suggesting is to write an image pattern recognition algorithm so sophisticated that it can differentiate a photograph of a hand caressing a breast from a photograph of a breast self-exam.

Or are photos of breast self-exams pornographic?

Yikes,
Paul
--- End Message ---
--- Begin Message ---
Tom Chubb wrote:

> On 28/11/06, Dave Goodchild <[EMAIL PROTECTED]> wrote:
>
>> Hi all. I am building a web app and as part of it advertisers can upload
>> their ad image and website URL to go with their ad. Is there a good
>> way to
>> detect whether that site is a porn site via php?
>>
>> -- 
>> http://www.web-buddha.co.uk
>>
>>
> I remember seeing something that used GD to detect colours similar to
> flesh within an image and thinking it was funny that someone had taken
> so much time to to it, but I can't remember where it was.
> I think it was on phpclasses.org but can't find it. Maybe someone else
> remembers it?
>
And more recently a commercial vendor is performing something along the
lines of 'curve recognition' to the same effect.  That's fine for any
vector graphics (banner ads might fall here.)  False positives will be
high with beach photos from family vacation, for example.

Travis

--- End Message ---
--- Begin Message ---
Kelly Jones wrote:
> If I define a function like this:
> 
> function foo ($x, $y, $z) {}
> 
> and then call: foo(1,2,"bar");
> 
> is there a function I can call inside foo() that yields this hash:
> 
> {"x" => 1, "y" => 2, "z" => "bar"}
> 
> In other words, gives me the values *and names* of the arguments to foo?
> 
> func_get_args just yields the values.
> 
> Having this function would make writing constuctors easier.
> 
> The normal way:
> 
> fuction ClassName ($x, $y, $z) {
>   $this->x = $x;
>   $this->y = $y;
>   $this->z = $z;
> }
> 
> could be replaced with:
> 
> function ClassName ($x, $y, $z) {
>   foreach (magic_function_i_want() as $key=>$val) {
>      $this->$key =$val;
>   }

which is slower.
what might be nice is a special function modifier (just thinking out loud):

        autoargs function __construct($x, $y, $z) {
                $this->foo = 'bar';
        }

which would be equivalent to:

        function __construct($x, $y, $z) {
                $this->x = $x;
                $this->y = $y;
                $this->z = $z;
                $this->foo = 'bar';
        }

but it's such a simplistic idea that its probably
not worthy - in practice objects don't often taken that many args
and more often than not you [should be] doing some sanitation
of the args.

> }
> 
> Obviously, it's more of a savings when you have a large number of
> parameters.

you might consider a meta class concept - write classes that are used as 
configurations
add/update boiler-plate init code for classes.

MetaCls () {
        $args = array('x', 'y', 'z');
}

--

php run_meta_generation_routine.php -c Cls

--

Cls {
        /* added by run_meta_generation_routine.php */
        function __construct($x, $y, $z) {
                $this->x = $x;
                $this->y = $y;
                $this->z = $z;
        }
}

> 

--- End Message ---
--- Begin Message ---
Dear all,
I want to make a connection to sybase database with PHP on win32 platform,
but i can't recompile PHP with extension --with-cybase-ct. Please help me
!!!

--- End Message ---
--- Begin Message ---
"At one point or another plain HTML has to be generated. "

Care to give me an example? I never generate any html in my php code anymore.

It's not very pretty when your code looks like echo "\n\t\t\t\t\t\t<tr>";

Is that not a form of a templating engine that your are building?

Fredrik

Satyam wrote:
May I invite you to check http://satyam.com.ar/pht/? This is a project I started some time ago to help me produced HTML in a more clean and efficient way. Usually, producing good HTML involves running a sample output through some HTML validator or looking at the HTML and checking it out by hand, which, of course, requires good formatting to make it understandable. In the case of too dynamic HTML (meaning, output can vary widely) it is impossible to produce enough samples of all the possible outputs to get them checked out.

So, my idea was to embed HTML into the language itself so that the final output could be checked at 'compile time' and even before, using the standard tools provided by the IDE (even just matching braces goes a long way into checking for missmatched HTML tags).

The samples page (http://satyam.com.ar/pht/sample.htm) show several examples.

I think that a tool such as this one might avoid any concern about tidying up HTML since, after all, most of the checking could be done at the PHP source level. Further development (which I have not started yet) would lead to automatic verification against DTDs or XSchemas.

And, of course, I would appreciate any comment on the project, EXCEPT that you use template engines and that you do not generate HTML directly. I've heard that and it is completely missing the point so, please, spare me that one. At one point or another plain HTML has to be generated.

Satyam

----- Original Message ----- From: "Mark Kelly" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Tuesday, November 28, 2006 4:13 AM
Subject: Re: [PHP] Tidy HTML source?


On Monday 27 November 2006 17:10, Mark Kelly wrote:

Am I crazy to make an extra effort in my code to make the generated HTML
pretty?

Thanks everyone for your thoughts on this - I'm quite relieved that I'm not
the only one who sits and tweaks so that the HTML is nice and readable.

It just struck me that trying to make my PHP spit out page source that
looks like it was made lovingly by hand was perhaps the work of an
obsessive.

Now I know that even if it is, I'm not alone :)

Cheers!

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



--- End Message ---
--- Begin Message ---
Hi,

I am using PHP's LDAP to read and write information fron user-objects
in Active Directory (Windows Server 2003).

The AD has been extended with 2 attributes (call them "xx" and "yy")
with the field type BOOLEAN

How do i write to these fields?

If I use ldap_mod_replace, and set the values for these fields to eg.
0 or 1, I get a "Syntaxt error" from LDAP.

Kind regards,

Carsten Gehling

--- End Message ---
--- Begin Message ---
Carsten Gehling wrote:
Hi,

I am using PHP's LDAP to read and write information fron user-objects
in Active Directory (Windows Server 2003).

The AD has been extended with 2 attributes (call them "xx" and "yy")
with the field type BOOLEAN

How do i write to these fields?

If I use ldap_mod_replace, and set the values for these fields to eg.
0 or 1, I get a "Syntaxt error" from LDAP.

You posted this before, no need to send it again.

Maybe try true/false instead of 0/1 ?

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Sorry for that - I couldn't see the previous post.

I've tried true/false, but I think PHP might be converting this to
string values (eg. "" and "1") before sending to AD

- Carsten

--- End Message ---

Reply via email to