php-windows Digest 10 Jun 2007 19:14:53 -0000 Issue 3252

Topics (messages 28047 through 28053):

Fatle Error:   FILTER_VALIDATE_EMAIL
        28047 by: Mark Abrams
        28050 by: Niel Archer

Drag and Drop
        28048 by: Daniel Kaliel
        28049 by: Niel Archer
        28051 by: Moore, Joshua
        28052 by: Stut

Connect to Windows Active Directory : LDAP
        28053 by: CFreak

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:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
OS: XP Pro
PHP Version 5.1.2


I trying to use PHP filters (http://www.w3schools.com/php/php_filter.asp) 
which are supposted to come installed as part of the PHP core.
On three servers running v5.1.2 I recieve: Fatal error: Call to undefined 
function: filter_var() in ...


Is there something in the php.ini that needs to be enabled?
TIA
Mark



<?php
 $email = "[EMAIL PROTECTED] mple.com";if(!filter_var($email, 
FILTER_VALIDATE_EMAIL))
 {
 echo "E-mail is not valid";
 }
else
 {
 echo "E-mail is valid";
 }

 ?> 

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

filter is not part of PHP core, it is a PECL extension. For more info
read the documentation at http://uk.php.net/manual/en/ref.filter.php

Niel

--- End Message ---
--- Begin Message ---
I am trying to create a document store that will allow people to upload
documents to a website by dragging and dropping them on a certain
section of the webpage.  Further, I would prefer that the documents be
kept directly in the mySQL database as binaries.

 

I have been told you can do this with ASP, can it be done with PHP?

 

---------------------------------------------------------

Daniel Kaliel, MCP

Network Administrator

====================================

No animals were hurt during this transmission,

however, some electrons were terribly

inconvenienced.

 


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

> I am trying to create a document store that will allow people to upload
> documents to a website by dragging and dropping them on a certain
> section of the webpage.

I don't see how you could do that.  You're talking about a client-side
effect, when both ASP/PHP run server-side.  Either could be used to
receive the document, but you'd most likely want something like a Java
applet on the page to drop onto.

> Further, I would prefer that the documents be kept directly in the
> mySQL database as binaries.

That's simple enough, although I prefer to save files in the file-system
and store a reference in the database.  I find it faster that way.



Niel

--- End Message ---
--- Begin Message ---
You can use jquery.

http://interface.eyecon.ro/demos

Click droppables demo

-----Original Message-----
From: Niel Archer [mailto:Niel Archer] On Behalf Of Niel Archer
Sent: Friday, June 08, 2007 10:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Drag and Drop

Hi

> I am trying to create a document store that will allow people to upload
> documents to a website by dragging and dropping them on a certain
> section of the webpage.

I don't see how you could do that.  You're talking about a client-side
effect, when both ASP/PHP run server-side.  Either could be used to
receive the document, but you'd most likely want something like a Java
applet on the page to drop onto.

> Further, I would prefer that the documents be kept directly in the
> mySQL database as binaries.

That's simple enough, although I prefer to save files in the file-system
and store a reference in the database.  I find it faster that way.



Niel

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

--- End Message ---
--- Begin Message ---
Moore, Joshua wrote:
You can use jquery.

http://interface.eyecon.ro/demos

Click droppables demo

You really need to read the problem carefully before suggesting a solution. The question is regarding uploading files by dragging them on to a browser.

This is not possible without an ActiveX control or Java applet, and even then you'll run into lots of security issues.

-Stut

-----Original Message-----
From: Niel Archer [mailto:Niel Archer] On Behalf Of Niel Archer
Sent: Friday, June 08, 2007 10:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Drag and Drop

Hi

I am trying to create a document store that will allow people to upload
documents to a website by dragging and dropping them on a certain
section of the webpage.

I don't see how you could do that.  You're talking about a client-side
effect, when both ASP/PHP run server-side.  Either could be used to
receive the document, but you'd most likely want something like a Java
applet on the page to drop onto.

Further, I would prefer that the documents be kept directly in the
mySQL database as binaries.

That's simple enough, although I prefer to save files in the file-system
and store a reference in the database.  I find it faster that way.



Niel


--- End Message ---
--- Begin Message ---
Hi,
I am trying to connect to windows active directory to change user's password. I tried to use SSL connection to connect to the server.

ldap_connect("ldaps://myhost.com","636")

But, it always failed ( at bind, no connection ). I used ldp command which come from windows 2003 server and it finds connecting to the directory in SSL mode.

Thank you.

[code]

class CUD_ldap {

  private $host;
  private $port;
  private $dn;
private $u;
  private $p;
private $conn; function CUD_ldap() {
     //$this->host = "localhost";
     //$this->port = "389";
     $this->host = "ldaps://mydomain.com";
     $this->port = "636";
     $this->dn = "CN=Users,DC=cud35,DC=com";
  }

  function set_host( $host , $port , $dn ){
     $this->host = $host;
     $this->port = $port;
     $this->dn = $dn;
  }

  function connect() {
     //connect to server
     $this->conn = ldap_connect($this->host,$this->port);
     if( !$this->conn ) return FALSE;
     ldap_set_option($this->conn, LDAP_OPT_PROTOCOL_VERSION, 3);
     ldap_set_option($this->conn, LDAP_OPT_REFERRALS, 0);
return $this->conn;
  }
function bind($user,$pass){
     $this->u = $user;
     $this->p = $pass;
     $rs = ldap_bind( $this->conn , $this->u  , $this->p ) ;
     return $rs;
  }
function search( $key ){

     $rs = ldap_search( $this->conn, $this->dn , $key);

     if( !$rs ) return FALSE;
     $info = ldap_get_entries( $this->conn , $rs );
     if( $info['count'] != 1 ) return FALSE;
     else return $info;
  }
function modify($dn,$entry){
     ldap_modify($this->conn,$dn,$entry);
  }
}

[/code]

--- End Message ---

Reply via email to