[PHP] simplexml_load_file and proxy auth

2007-06-29 Thread Paul Scott

Does anyone know of a way to pass proxy auth to simplexml_load_*?

Previously, I have used cURL to return the XML string from remote, but
this seems kind of hacky to me, and was wondering if anyone had a better
solution?

Thanks

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

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

Re: [PHP] Currency Exchange Database?

2007-06-29 Thread Jochem Maas
Andy B. wrote:
 You could have a look at the Euro foreign exchange reference rates rom the
 European Central Bank.
 
 They also provide a regularly updated XML file:
 
 http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html
 


/* pass this func a 3 letter currency code */
function getCurrentRate($curID)
{
static $rates;

if (is_null($rates)) {
$rates = array('EUR' = 1.0);

$doc = new DomDocument;
$doc-load( 
'http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml' );

foreach ($doc-getElementsByTagname(Cube) as $node) {
$c = $node-getAttribute(currency) and
$rates[$c] = 1 / $node-getAttribute(rate);
}
}

return (isset($rates[$curID]) ? $rates[$curID] : 0.0);
}

 
 
 Andy
 
 -Original Message-
 From: Tom Ray [Lists] [mailto:[EMAIL PROTECTED] 
 Sent: Friday, June 29, 2007 02:45
 To: php-general@lists.php.net
 Subject: [PHP] Currency Exchange Database?
 
 I have a client that's looking to do auto conversions of currency on 
 their reservation payment form. No big deal, I can that part down. 
 However, exchange rates change on a minute to minute basis and they want 
 the program to automatically know the current rates. Is there an online 
 database or a way I can tap into a database that has that information?
 
 Any help would be appreciated.
 
 Thanks.
 

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



[PHP] HELP - I have tried to unsubscribe from this list mutiple times but cannot.

2007-06-29 Thread -Patrick
I no longer have a need for this list and My mailbox is getting flooded, 
Can someone assist ?


TIA
-Patrick

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



Re: [PHP] HELP - I have tried to unsubscribe from this list mutiple times but cannot.

2007-06-29 Thread Paul Scott

On Fri, 2007-06-29 at 01:59 -0400, -Patrick wrote:
 I no longer have a need for this list and My mailbox is getting flooded, 
 Can someone assist ?

Read the footer on every single mail posted to this list to unsubscribe

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

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

Re: [PHP] HELP - I have tried to unsubscribe from this list mutiple times but cannot.

2007-06-29 Thread Chris

-Patrick wrote:
I no longer have a need for this list and My mailbox is getting flooded, 
Can someone assist ?


Click the unsubscribe link that appears at the bottom of every email.

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

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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutiple times but cannot.

2007-06-29 Thread M. Sokolewicz

Paul Scott wrote:

On Fri, 2007-06-29 at 01:59 -0400, -Patrick wrote:
I no longer have a need for this list and My mailbox is getting flooded, 
Can someone assist ?


Read the footer on every single mail posted to this list to unsubscribe

--Paul





All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 
I must have missed a lot of footers then because I can't find a single 
one which says anything about unsubscribing...!


Anyway, easiest way: send an empty email to 
[EMAIL PROTECTED] (I think), and it should 
auto-unsubscribe you using the email address you sent it from.


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



Re: [PHP] PHP Brain Teasers

2007-06-29 Thread clive

ok this one should be easy:

?
$animal = array (pig,cow,bat,chicken,dog);
for ($i = 0; $i  sizeof($animal); $i++) {
   $sighted = ($animal[$i] != bat ?  see : blind);
}
?

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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutiple times but cannot.

2007-06-29 Thread Chris

M. Sokolewicz wrote:

Paul Scott wrote:

On Fri, 2007-06-29 at 01:59 -0400, -Patrick wrote:
I no longer have a need for this list and My mailbox is getting 
flooded, Can someone assist ?


Read the footer on every single mail posted to this list to unsubscribe

--Paul





All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 
I must have missed a lot of footers then because I can't find a single 
one which says anything about unsubscribing...!


You missed this?

To unsubscribe, visit: http://www.php.net/unsub.php

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

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



RE: [PHP] Re: Swear filter ideas

2007-06-29 Thread Ryan A
  Humans are such a strange bunch :)


 That's why I live with computers and cats -




No fucking cats! Kill all of them...keep only dogs and whales (to protect them)
The only cat I like is a pussy.


Damn... used up a bit of my swear words quota of the day...


--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
   
-
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.

Re: [PHP] PHP P O K E R...... and JAVA (convert)

2007-06-29 Thread Ryan A
Thanks!

Dont know if it will help but its nice of you to share becausei always feel 
good reading someone elses ways of doing things. Might help if I get bogged 
down somewhere.

Cheers!
R

Guillaume Theoret [EMAIL PROTECTED] wrote: This isn't exactly what was asked 
for but when I TA'd the principles
of programming languages course, an assignment I gave was to write a
simple poker game in Haskell. If anyone's interested here's the sample
solution I gave:

http://smokinn.tengun.net/comp348/poker.hs

It's all console based of course. You'll need either ghc or hugs
installed to run it.

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




--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
 
-
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.

Re: [PHP] PHP P O K E R...... and JAVA (convert)

2007-06-29 Thread Ryan A
Hey Nathan,

Cool! Thanks for taking the time to find and fix that error and your 
suggestions below...
Will give you a buzz if I run into a programming stonewall.

Cheers!
R

Nathan Nobbe [EMAIL PROTECTED] wrote: Ryan,

if you want to port the java code to php it wouldnt be very difficult since
this code doesnt rely heavily on much besides core language constructs.
really you could just save it as a php file and start making changes where
needed; it wouldnt take too long to port.
as for the compilation issue i took a look at this myself and discovered
some broken logic in the flush method.

 for (int i=0; i=  0  sorted[i] = 12) suitA++;
  else if (sorted[i] = 13  sorted[i] = 25) suit

i converted this to

for (int i=0; i  fv.length; i++) {
  if(i =  0  sorted[i] = 12) suitA++;

though im not sure if that is correct (spent about 5 minutes on it) a quick
guess tells me it should be.
The HandRanker class is dependent upon another proprietary class
HandRankwhich is burried in a link (not in blue text) on the page you
provided us.
There are actually links in the statement.
  This HandRanker
class is used to
calculate the rank of a poker hand. It uses the
HandRank  class to
store the rank of the poker hand.
So if you just make 2 files
HandRanker.java
HandRank.java
Place the respective class definitions in those files (put them in the same
directory for simplicity).
Apply the patch i provided above to HandRanker.java (lines 123, 124)
 then issue (at command prompt)
javac HandRanker.java

and you should have the compiled code :)

-nathan



On 6/27/07, Tijnema  wrote:

 On 6/27/07, Stephen  wrote:
  Tijnema  wrote:
  Well, I find this a very interesting thing ;)
 
  I have played quite a lot poker, and I still play it sometimes, and
  this doesn't seems too hard for me :)
 
  My approach would be this:
  1) Deal cards, rand(1,13) for the numbers(1- Ace, 11-Jack,
  12-Queen, 13-King), and rand (1,4) for color(1- spades, 2- clubs,
  3- diamonds, 4-hearts)
  2) Betting, with some buttons and AJAX to update pot etc.
  3) Turn
  4) Step 2
  5) River
  6) Step 2
  7) Looping through all players and check what their highest
  combination is, take the 2 best combinations, and see if they are
  equal.If not, the highest wins of course, but if they are equal, check
  if number 3 has also same combination, and if so, check number 4, ...
  Now you have some players with same combination, and you need to sort
  the guys by highest cards in combination. If one has higher cards than
  all others, he won. If not, get only those guys that have the same
  highest cards in the combination, and check those guys for their
  kicker (only for Pair, Two pair, Three of a Kind, Four of a Kind). If
  their kicker is equal, or there combination isn't the one I noted,
  it's a split pot :)
 
  Not too hard to program right?
 
  Tijnema
 
  You need to add logic to ensure that the same card is not dealt twice!
  An initial routine to shuffle the deck is the approach that I would
 take.
 
  Stephen

 Yes, I fixed that in a second reply ;)

 Tijnema

 --
 Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

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





--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
   
-
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us.

[PHP] shuffle or mt_rand

2007-06-29 Thread Ryan A
Hey,

Have a quick question about which is better to get real random values, shuffle 
or mt_rand.

I am trying to shuffle a deck of cards and reading another thread I saw that 
after a couple of thousand random generations patterns have been observed using 
rand()... so its better to use mt_rand().

After i wrote a function (copied below) to get real random cards from a 52 
deck, Tijnema from the list kindly sent me a piece of code thats 
simpler/faster/should or would use less processing and does exactly what my 
function does except it uses shuffle()...

Any idea which would be better to constantly generate proper random numbers for 
a long period of time?


= My original code with mt_rand() 

function load_cards($no_of_players)
{
$i=0;
$cards=array();

while($i1)
{


if(empty($cards[0]))
{
$cards[]=mt_rand(1,52);
}
else
{
$no_of_cards_already_in_array=count($cards);
$cards_to_be_dealt=$no_of_players * 2; 
$cards_to_be_dealt=$cards_to_be_dealt + 5;

if($no_of_cards_already_in_array  $cards_to_be_dealt)
{
$new_generated_card=mt_rand(1,52);

if(!in_array($new_generated_card,$cards))
{
$cards[]=$new_generated_card;
}
}else
{
// end the loop
$i=2;
break; // just in case the above does not break outa the loop.
}

}
}
return $cards;
}


== Contributed code ===
// only generating 5 numbers here
$deck=array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52);
shuffle($deck);


for($i=0; $i5; $i++)
{
$card = array_pop($deck);
echo $card.br;
}

==


Any comments and suggestions are also welcome.

Thanks!
Ryan





--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
   
-
Need a vacation? Get great deals to amazing places on Yahoo! Travel. 

Re: [PHP] shuffle or mt_rand

2007-06-29 Thread Richard Heyes

Ryan A wrote:

Hey,

Have a quick question about which is better to get real random values, shuffle 
or mt_rand.

I am trying to shuffle a deck of cards and reading another thread I saw that 
after a

 couple of thousand random generations patterns have been observed
 using rand()... so its better to use mt_rand().

Well they do different things - shuffle() randomises an array, whereas 
mt_rand() gives you a random number. If you want to randomise an array, 
use shuffle(). If you want a random number, use mt_rand().


--
Richard Heyes
+44 (0)844 801 1072
http://www.websupportsolutions.co.uk
Knowledge Base and HelpDesk software

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



Re: [PHP] shuffle or mt_rand

2007-06-29 Thread Tijnema

On 6/29/07, Ryan A [EMAIL PROTECTED] wrote:

Hey,

Have a quick question about which is better to get real random values, shuffle 
or mt_rand.

I am trying to shuffle a deck of cards and reading another thread I saw that 
after a couple of thousand random generations patterns have been observed using 
rand()... so its better to use mt_rand().

After i wrote a function (copied below) to get real random cards from a 52 
deck, Tijnema from the list kindly sent me a piece of code thats 
simpler/faster/should or would use less processing and does exactly what my 
function does except it uses shuffle()...

Any idea which would be better to constantly generate proper random numbers for 
a long period of time?



code



Any comments and suggestions are also welcome.

Thanks!
Ryan


Just did a quick benchmark for 10.000 hands (making a full deck on
your code, 23.5 players):
Microtime difference:
Ryan's code:15.725826978683
Tijnema's code:0.40006709098816

Unique decks out of 1:
Ryan's code:1
Tijnema's code:1

When making a full deck my code is 40 times faster, and a lot less
memory intensive. And as you can see, for both all 1 decks are
unique, so both are random :)

But, also when generating cards for only 4 players, my code is twice
as fast as yours, and both generate still 1 random decks:

Microtime difference:
Ryan's code:0.82403707504272
Tijnema's code:0.40426802635193

Unique decks out of 1:
Ryan's code:1
Tijnema's code:1


Tijnema

--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread M. Sokolewicz

Chris wrote:

M. Sokolewicz wrote:

Paul Scott wrote:

On Fri, 2007-06-29 at 01:59 -0400, -Patrick wrote:
I no longer have a need for this list and My mailbox is getting 
flooded, Can someone assist ?


Read the footer on every single mail posted to this list to unsubscribe

--Paul





All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 
I must have missed a lot of footers then because I can't find a single 
one which says anything about unsubscribing...!


You missed this?

To unsubscribe, visit: http://www.php.net/unsub.php



Yes, only about 1 in a hundred emails have that footer. Might be because 
I'm not subscribed, and just use the NNTP interface :)


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



[PHP] mail function problem

2007-06-29 Thread web2

Hi,

I'm running PHP 5.2.3 on Solaris 10 (AMD64).

My mail function doesn't send any mail, the return value of mail 
function is false...
But sendmail_path value is OK in php.ini, and I've tried to send a mail 
with sendmail on console with the same user (the apache user), and 
everything's ok...


Does anyone have solution ?

Thanks for help.

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



Re: [PHP] shuffle or mt_rand

2007-06-29 Thread Fredrik Thunberg



snip


Just did a quick benchmark for 10.000 hands (making a full deck on
your code, 23.5 players):
Microtime difference:
Ryan's code:15.725826978683
Tijnema's code:0.40006709098816

Unique decks out of 1:
Ryan's code:1
Tijnema's code:1

When making a full deck my code is 40 times faster, and a lot less
memory intensive. And as you can see, for both all 1 decks are
unique, so both are random :)

But, also when generating cards for only 4 players, my code is twice
as fast as yours, and both generate still 1 random decks:

Microtime difference:
Ryan's code:0.82403707504272
Tijnema's code:0.40426802635193

Unique decks out of 1:
Ryan's code:1
Tijnema's code:1


Tijnema



Just a pointer:

Just because you get 1 different decks doesn't mean that it is random.

Since there are 52! (around 8*10^67) different decks and you choose 
1 of theese you would be very lucky to get 2 that are the same.

--
/Thunis

I refuse to answer that question on the grounds that I don't know the 
answer.

  --The Hitchikers Guide to the Galaxy

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



[PHP] Address book - LDAP or MySQL?

2007-06-29 Thread Timothy Murphy
I'm thinking of setting up an address-book on my server,
but I'm not sure whether to use LDAP or MySQL.

As I see it, LDAP is actually designed for this,
and seems to have a more-or-less standard address-book format.
On the other hand, I'm already using MySQL for several things,
eg gallery2.

But there doesn't seem to be any standard address-book format
for SQL.
Another thing, kmail and other mail clients
seem to have standard LDAP interfaces.

I'm using phpMyAdmin with MySQL,
but there seems to be a PHP interface to LDAP too.

I don't really like LDAP, but it seems the way to go.
Is that right ... ?
I'd be interested to hear your views.


-- 
Timothy Murphy  
e-mail (80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

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



RE: [PHP] Address book - LDAP or MySQL?

2007-06-29 Thread Jay Blanchard
[snip]
I'm thinking of setting up an address-book on my server,
but I'm not sure whether to use LDAP or MySQL.

As I see it, LDAP is actually designed for this,
and seems to have a more-or-less standard address-book format.
On the other hand, I'm already using MySQL for several things,
eg gallery2.

But there doesn't seem to be any standard address-book format
for SQL.
Another thing, kmail and other mail clients
seem to have standard LDAP interfaces.

I'm using phpMyAdmin with MySQL,
but there seems to be a PHP interface to LDAP too.

I don't really like LDAP, but it seems the way to go.
Is that right ... ?
I'd be interested to hear your views.
[/snip]

First of all LDAP is not a database, it is a connection protocol that
can connect to many things, most notably Active Directory seems to be
the most popular usage. Therefore you cannot compare it to MySQL,
because MySQL is a database product. Are you talking about Active
Directory being the database?

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



[PHP] RE: Address book - LDAP or MySQL?

2007-06-29 Thread Timothy Murphy
Jay Blanchard wrote:

 I'm thinking of setting up an address-book on my server,
 but I'm not sure whether to use LDAP or MySQL.

 First of all LDAP is not a database, it is a connection protocol that
 can connect to many things, most notably Active Directory seems to be
 the most popular usage. Therefore you cannot compare it to MySQL,
 because MySQL is a database product. Are you talking about Active
 Directory being the database?

As I understand it, LDAP and MySQL offer two different ways
of setting up a networked address book.
So I take it they can be compared as far as that is concerned.

Actually, I normally run Linux, so Active Directory
would not be a priority for me.

I didn't say LDAP was a database.
However, the principal usage of LDAP, as far as I can see
(by googling for LDAP) is in fact
to set up a network address book of some kind.
It may be used for other purposes,
but they are not really relevant to my enquiry.


-- 
Timothy Murphy  
e-mail (80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

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



Re: [PHP] PHP Brain Teasers [SPOILER]

2007-06-29 Thread Daniel Brown

On 6/29/07, clive [EMAIL PROTECTED] wrote:

ok this one should be easy:

?
$animal = array (pig,cow,bat,chicken,dog);
for ($i = 0; $i  sizeof($animal); $i++) {
$sighted = ($animal[$i] != bat ?  see : blind);
}
?

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




   Blind as a bat.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

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



RE: [PHP] RE: Address book - LDAP or MySQL?

2007-06-29 Thread Jay Blanchard
[snip]
As I understand it, LDAP and MySQL offer two different ways
of setting up a networked address book.
So I take it they can be compared as far as that is concerned.

Actually, I normally run Linux, so Active Directory
would not be a priority for me.

I didn't say LDAP was a database.
However, the principal usage of LDAP, as far as I can see
(by googling for LDAP) is in fact
to set up a network address book of some kind.
It may be used for other purposes,
but they are not really relevant to my enquiry.
[/snip]

The Lightweight Directory Access Protocol (LDAP) is an application
protocol for querying and modifying directory services running over
TCP/IP.

A directory service is a software application - or a set of applications
- that stores and organizes information about a computer network's users
and network resources, and that allows network administrators to manage
users' access to the resources. Additionally, directory services act as
an abstraction layer between users and shared resources.

A directory service should not be confused with the directory repository
itself; which is the database that holds information about named objects
that are managed in the directory service. The directory service
provides the access interface to the data that is contained in one or
more directory namespaces. The directory service interface acts as a
central/common authority that can securely authenticate the system
resources that manage the directory data.

Like a database, a directory service is highly optimized for reads and
provides advanced search possibilities on many different attributes that
can be associated with objects in a directory. The data that is stored
in the directory is defined by an extendible and modifiable schema.
Directory services use a distributed model for storing their information
and that information is usually replicated between directory servers. 

I suspect for your purposes it is better (easier) to create an address
book using MySQL and access it with PHP's library of MySQL functions.
Using LDAP to access the directory service that access data namespaces
may be a little over the top for an address book.

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



[PHP] Re: Address book - LDAP or MySQL?

2007-06-29 Thread Colin Guthrie
Jay Blanchard wrote:
 First of all LDAP is not a database, it is a connection protocol that
 can connect to many things, most notably Active Directory seems to be
 the most popular usage.

Well I don't disagree with you - LDAP = Lightweight Directory Access
Protocol.

 Therefore you cannot compare it to MySQL,

Well, you kinda can. If you have an LDAP server it will internally use a
database of sorts to store your data and will then expost that to you
via a Structured Query Language of sorts (see what I did there? I
made comparison of LDAP to SQL - not to MySQL, SQL the language).

 because MySQL is a database product. Are you talking about Active
 Directory being the database?

Erm, have you heard of OpenLDAP? It's probably the widest used one.
AFAIK it's on all OSX machines (used interanlly from what I can gather)
and is very widely used on Linux.


As for the OP, I'd defo go for LDAP if it's in your office. You can find
plenty methods to access you address book if it's in LDAP: via the web
(PHP) in Horde or Roundcubemail, directly in your mail application
(Thunderbird, Apple Mail, even outlook (tho' it's rubbish)), or through
specific applications - e.g. KAddressBook in KDE on linux etc. etc.

Trouble is there are a lot of schemas for representing Contacts in LDAP
as no-one seems to agree on a universal scheme. What works perfectly in
Apple's address book will not be flawlessly available in Thunderbird for
example.

YMMV but I'm very happy with LDAP.

Col

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



RE: [PHP] RE: Address book - LDAP or MySQL?

2007-06-29 Thread bruce
umm...

not sure who posted that ldap isn't a database... ldap isn't a database like
oracle, mysql, sybase, etc.. it's meant to be a kind of lightweight
database/protocol for establishing user address book kinds of information,
normally used for user id/auth processes.

peace..


-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Timothy Murphy
Sent: Friday, June 29, 2007 7:02 AM
To: php-general@lists.php.net
Subject: [PHP] RE: Address book - LDAP or MySQL?


Jay Blanchard wrote:

 I'm thinking of setting up an address-book on my server,
 but I'm not sure whether to use LDAP or MySQL.

 First of all LDAP is not a database, it is a connection protocol that
 can connect to many things, most notably Active Directory seems to be
 the most popular usage. Therefore you cannot compare it to MySQL,
 because MySQL is a database product. Are you talking about Active
 Directory being the database?

As I understand it, LDAP and MySQL offer two different ways
of setting up a networked address book.
So I take it they can be compared as far as that is concerned.

Actually, I normally run Linux, so Active Directory
would not be a priority for me.

I didn't say LDAP was a database.
However, the principal usage of LDAP, as far as I can see
(by googling for LDAP) is in fact
to set up a network address book of some kind.
It may be used for other purposes,
but they are not really relevant to my enquiry.


--
Timothy Murphy
e-mail (80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

--
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



Re: [PHP] shuffle or mt_rand

2007-06-29 Thread Ryan A
Just did a quick benchmark for 10.000 hands (making a full deck on
your code, 23.5 players):
Microtime difference:
Ryan's code:15.725826978683
Tijnema's code:0.40006709098816

Unique decks out of 1:
Ryan's code:1
Tijnema's code:1

When making a full deck my code is 40 times faster, and a lot less
memory intensive. And as you can see, for both all 1 decks are
unique, so both are random :)

But, also when generating cards for only 4 players, my code is twice
as fast as yours, and both generate still 1 random decks:

Microtime difference:
Ryan's code:0.82403707504272
Tijnema's code:0.40426802635193

Unique decks out of 1:
Ryan's code:1
Tijnema's code:1



Hey Tijnema,
 
 I really had no doubt about your code being faster and cleaner... (as i 
mentioned in my original post) but can you send me the benchmarking scripts 
that you used so i may test them a bit more?
 
 Thanks!
 Ryan




--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
 
-
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.

[PHP] Flash / Ajax / PHP

2007-06-29 Thread David Giragosian

I've recently been using some limited free time to explore the Freemovie
(Flash-PHP API) and Ajax technologies.

Can anyone help me to understand whether these can be used together? Can I,
for example, pull data from MySQL, dynamically alter Flash function
parameters, then use Ajax to deliver the new content?

Thanks in advance,

David


Re: [PHP] RE: Address book - LDAP or MySQL?

2007-06-29 Thread Nathan Nobbe

i havent worked w/ LDAP and PHP together as of yet; but maybe i can jump in
the conversation and share some of my thoughts on the topic..

in terms of options for Timothy's address book the data for the address book
will need to be stored somewhere.
since Timothy is already using MySQL that sounds like a great place for the
data.  likely, Timothy is planning a graphical Web interface to the address
book.  So let me see if i can draw LDAP into the equation.

lets suppose Timothy cranks out the MySQL table structure and builds an
graphical interface via PHP, but he wants to allow people to query the
directory through another context, something programmatic.  without LDAP he
could build some sort of API around the code that accesses the MySQL data.
this would be exposed over http, ideally a RESTfull of SOAP interface.  im
wondering if LDAP would better serve this purpose since it is a protocol
aimed at directory information in the first place.

so if Timothy were to use LDAP instead, there would be no creation (see
caveat) of the data profile for the address book.  LDAP servers talks to an
internal database (at least thats what OpenLDAP does [w/
BerkDB]http://www.openldap.org/doc/admin23/install.html).
in that case there would be no time spent building the table structure.  the
PHP-based ui would interact w/ the LDAP server instead of the proprietary
MySQL structure and third parties could access the directory via the
standard LDAP protocol, thus no need to build the API.

one caveat is, defining the data structure the LDAP server will access.
reading the man page on OpenLDAP i discovered LDAP provides access to

X.500 directory services

i began to read a bit on the information model of
X.500http://www.surfnet.nl/innovatie/afgesloten/x500/introducing/chapt-2.html#2.1,
which appears to be customizable, but this is getting way out of my
immediate zone of knowledge.  so if the stock data profile from the OpenLDAP
server (if thats what is ultimately used) would have to suffice or there
would have to be some mad research!

it seems to me like using LDAP for the directory implementation is a design
decision dependent upon
- a need to expose external access to the directory
- a need to support standard interface to the directory
- familiarity w/ LDAP (this could be the kicker :)
- as always time / deadline ..

-nathan


On 6/29/07, Jay Blanchard [EMAIL PROTECTED] wrote:


[snip]
As I understand it, LDAP and MySQL offer two different ways
of setting up a networked address book.
So I take it they can be compared as far as that is concerned.

Actually, I normally run Linux, so Active Directory
would not be a priority for me.

I didn't say LDAP was a database.
However, the principal usage of LDAP, as far as I can see
(by googling for LDAP) is in fact
to set up a network address book of some kind.
It may be used for other purposes,
but they are not really relevant to my enquiry.
[/snip]

The Lightweight Directory Access Protocol (LDAP) is an application
protocol for querying and modifying directory services running over
TCP/IP.

A directory service is a software application - or a set of applications
- that stores and organizes information about a computer network's users
and network resources, and that allows network administrators to manage
users' access to the resources. Additionally, directory services act as
an abstraction layer between users and shared resources.

A directory service should not be confused with the directory repository
itself; which is the database that holds information about named objects
that are managed in the directory service. The directory service
provides the access interface to the data that is contained in one or
more directory namespaces. The directory service interface acts as a
central/common authority that can securely authenticate the system
resources that manage the directory data.

Like a database, a directory service is highly optimized for reads and
provides advanced search possibilities on many different attributes that
can be associated with objects in a directory. The data that is stored
in the directory is defined by an extendible and modifiable schema.
Directory services use a distributed model for storing their information
and that information is usually replicated between directory servers.

I suspect for your purposes it is better (easier) to create an address
book using MySQL and access it with PHP's library of MySQL functions.
Using LDAP to access the directory service that access data namespaces
may be a little over the top for an address book.

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




RE: [PHP] Re: Address book - LDAP or MySQL?

2007-06-29 Thread Jay Blanchard
[snip]
Erm, have you heard of OpenLDAP? It's probably the widest used one.
AFAIK it's on all OSX machines (used interanlly from what I can gather)
and is very widely used on Linux.
[/snip]

Yes, and I use it extensively. 

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



RE: [PHP] RE: Address book - LDAP or MySQL?

2007-06-29 Thread Jay Blanchard
[snip]
umm...

not sure who posted that ldap isn't a database... ldap isn't a database
like
oracle, mysql, sybase, etc.. it's meant to be a kind of lightweight
database/protocol for establishing user address book kinds of
information,
normally used for user id/auth processes.
[/snip]

Twas me. LDAP is not a database it is a protocol for accessing a
directory service which is the abstraction layer for the actual data
repository namespace. 

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



[PHP] simple OCR in php

2007-06-29 Thread Ray
Hello all,
I am looking for a way to incorporate some simple OCR into a php script. The 
user will bulk scan a pile of invoices. I want the php script to look at each 
invoice and read a number off the invoice. The image will then be renamed, 
and be organized into a directory and the file name will be added to a 
database. (all of these steps are straight forward once the number is read.) 
I have no problem with a system that requires a special OCR font and/or some 
sort of registration mark to help locate the Invoice number. Can anybody tell 
me of any tools out there that can do this?
Thanks,
Ray

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



[PHP] Re: HELP - I have tried to unsubscribe from this list mutiple times but cannot.

2007-06-29 Thread Jonesy
On Fri, 29 Jun 2007 09:03:53 +0200, Paul Scott wrote:
 On Fri, 2007-06-29 at 01:59 -0400, -Patrick wrote:
 I no longer have a need for this list and My mailbox is getting flooded, 
 Can someone assist ?

 Read the footer on every single mail posted to this list to unsubscribe

And, a really curious and 'desparate' person might've thought to look at 
the headers.

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



Re: [PHP] shuffle or mt_rand

2007-06-29 Thread Tijnema

On 6/29/07, Ryan A [EMAIL PROTECTED] wrote:

Just did a quick benchmark for 10.000 hands (making a full deck on
your code, 23.5 players):
Microtime difference:
Ryan's code:15.725826978683
Tijnema's code:0.40006709098816

Unique decks out of 1:
Ryan's code:1
Tijnema's code:1

When making a full deck my code is 40 times faster, and a lot less
memory intensive. And as you can see, for both all 1 decks are
unique, so both are random :)

But, also when generating cards for only 4 players, my code is twice
as fast as yours, and both generate still 1 random decks:

Microtime difference:
Ryan's code:0.82403707504272
Tijnema's code:0.40426802635193

Unique decks out of 1:
Ryan's code:1
Tijnema's code:1



Hey Tijnema,

I really had no doubt about your code being faster and cleaner... (as i
mentioned in my original post) but can you send me the benchmarking scripts
that you used so i may test them a bit more?

Thanks!
Ryan


Sure, you can look at the code here:
http://86.86.80.41/cards.phps

Tijnema





--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)


Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.





--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

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



RE: [PHP] simple OCR in php

2007-06-29 Thread Jay Blanchard
[snip]
I am looking for a way to incorporate some simple OCR into a php script.
The 
user will bulk scan a pile of invoices. I want the php script to look at
each 
invoice and read a number off the invoice. The image will then be
renamed, 
and be organized into a directory and the file name will be added to a 
database. (all of these steps are straight forward once the number is
read.) 
I have no problem with a system that requires a special OCR font and/or
some 
sort of registration mark to help locate the Invoice number. Can anybody
tell 
me of any tools out there that can do this?
[/snip]

In short PHP cannot perform OCR functions. You could insert an OCR
application into the process and have the OCR app pass PHP the
information.

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



Re: [PHP] RE: Address book - LDAP or MySQL?

2007-06-29 Thread Nathan Nobbe

Ed,

Im not sure if OpenLDAP or other can use a different backed, such as MySQL.
I suspect there would be a server to support this, but it would almost
certainly define the table structure in the database of choice.  From the
sound of it there are ways to change the information model of X.500 (when
using OpenLDAP) to manipulate the structure of the internal database, but
telling the LDAP server to use a different database seems to be out of the
question. this, based upon some light research this morning.
if you want to expose an LDAP layer to clients of the CRM application you
would likely have to batch some sort of import process to a new LDAP server
installation.  Also, you would have to support synchronization of the data
in the LDAP servers database and the MySQL database of your CRM application
using the LDAP as an interface.
plus i dont think its too far off OP's topic, because this is something that
would have to be considered in the LDAP implementation he was curious about
in the first place.

-nathan

On 6/29/07, Edward Kay [EMAIL PROTECTED] wrote:


 On 6/29/07, Jay Blanchard [EMAIL PROTECTED] wrote:
 
  [snip]
  As I understand it, LDAP and MySQL offer two different ways
  of setting up a networked address book.
  So I take it they can be compared as far as that is concerned.
 
  Actually, I normally run Linux, so Active Directory
  would not be a priority for me.
 
  I didn't say LDAP was a database.
  However, the principal usage of LDAP, as far as I can see
  (by googling for LDAP) is in fact
  to set up a network address book of some kind.
  It may be used for other purposes,
  but they are not really relevant to my enquiry.
  [/snip]

PHP/MySQL/LDAP integration is something I've been thinking about for a
little while too.

I've built a CRM system in PHP with a MySQL database and would like the
contact info to be available to our users in their email programs. LDAP
seems a good (the only?) option for this due to support in Outlook etc.

From my understanding, LDAP is just a defined protocol for accessing
directory data. The data must be stored somewhere else, in my case the
MySQL
database.

In order to access the data using a LDAP, you need to set-up an LDAP
server
(e.g. OpenLDAP). What I haven't looked into much yet is how to interface
the
LDAP server to the MySQL database...

I know this isn't too helpful to the OP's question - just wanted to
register
my interest in the topic and (hopefully) stimulate conversation.

Edward

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




RE: [PHP] RE: Address book - LDAP or MySQL?

2007-06-29 Thread Edward Kay
 On 6/29/07, Jay Blanchard [EMAIL PROTECTED] wrote:
 
  [snip]
  As I understand it, LDAP and MySQL offer two different ways
  of setting up a networked address book.
  So I take it they can be compared as far as that is concerned.
 
  Actually, I normally run Linux, so Active Directory
  would not be a priority for me.
 
  I didn't say LDAP was a database.
  However, the principal usage of LDAP, as far as I can see
  (by googling for LDAP) is in fact
  to set up a network address book of some kind.
  It may be used for other purposes,
  but they are not really relevant to my enquiry.
  [/snip]

PHP/MySQL/LDAP integration is something I've been thinking about for a
little while too.

I've built a CRM system in PHP with a MySQL database and would like the
contact info to be available to our users in their email programs. LDAP
seems a good (the only?) option for this due to support in Outlook etc.

From my understanding, LDAP is just a defined protocol for accessing
directory data. The data must be stored somewhere else, in my case the MySQL
database.

In order to access the data using a LDAP, you need to set-up an LDAP server
(e.g. OpenLDAP). What I haven't looked into much yet is how to interface the
LDAP server to the MySQL database...

I know this isn't too helpful to the OP's question - just wanted to register
my interest in the topic and (hopefully) stimulate conversation.

Edward

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



Re: [PHP] RE: Address book - LDAP or MySQL?

2007-06-29 Thread Nathan Nobbe

On 6/29/07, Jay Blanchard [EMAIL PROTECTED] wrote:
Twas me. LDAP is not a database it is a protocol for accessing a
directory service which is the abstraction layer for the actual data
repository namespace.


And an LDAP server will typically house said repository namespace.  Like
OpenLDAP using BerkDB.
I think thats where people are getting confused.  The difference between
LDAP as a protocol and LDAP servers,
which incorporate the protocol and the directory storage.
(please correct me if im wrong [like i had to ask :)])

-nathan

On 6/29/07, Jay Blanchard [EMAIL PROTECTED] wrote:


[snip]
umm...

not sure who posted that ldap isn't a database... ldap isn't a database
like
oracle, mysql, sybase, etc.. it's meant to be a kind of lightweight
database/protocol for establishing user address book kinds of
information,
normally used for user id/auth processes.
[/snip]

Twas me. LDAP is not a database it is a protocol for accessing a
directory service which is the abstraction layer for the actual data
repository namespace.

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




Re: [PHP] simple OCR in php

2007-06-29 Thread Ray
On Friday 29 June 2007 10:32 am, you wrote:
 [snip]
 I am looking for a way to incorporate some simple OCR into a php script.
 The
 user will bulk scan a pile of invoices. I want the php script to look at
 each
 invoice and read a number off the invoice. The image will then be
 renamed,
 and be organized into a directory and the file name will be added to a
 database. (all of these steps are straight forward once the number is
 read.)
 I have no problem with a system that requires a special OCR font and/or
 some
 sort of registration mark to help locate the Invoice number. Can anybody
 tell
 me of any tools out there that can do this?
 [/snip]

 In short PHP cannot perform OCR functions. You could insert an OCR
 application into the process and have the OCR app pass PHP the
 information.

Exactly. 
Are there any third party tools or OCR applications that anybody can 
recommend? (I suppose you could write an OCR application in PHP, but that 
sounds like an awful lot of work.)
Thanks 
Ray

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



RE: [PHP] simple OCR in php

2007-06-29 Thread Robert Cummings
On Fri, 2007-06-29 at 11:32 -0500, Jay Blanchard wrote:
 [snip]
 I am looking for a way to incorporate some simple OCR into a php script.
 The 
 user will bulk scan a pile of invoices. I want the php script to look at
 each 
 invoice and read a number off the invoice. The image will then be
 renamed, 
 and be organized into a directory and the file name will be added to a 
 database. (all of these steps are straight forward once the number is
 read.) 
 I have no problem with a system that requires a special OCR font and/or
 some 
 sort of registration mark to help locate the Invoice number. Can anybody
 tell 
 me of any tools out there that can do this?
 [/snip]
 
 In short PHP cannot perform OCR functions. You could insert an OCR
 application into the process and have the OCR app pass PHP the
 information.

Why can PHP not perform OCR functions?

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] simple OCR in php

2007-06-29 Thread Crayon Shin Chan
On Saturday 30 June 2007 00:32, Jay Blanchard wrote:

 In short PHP cannot perform OCR functions. 

Why? PHP provides all requisite functions/features so if someone was 
sadistic enough and talented enough there's nothing to stop them writing 
an OCR app using it.

 You could insert an OCR 
 application into the process and have the OCR app pass PHP the
 information.

That would be the smart choice though.

-- 
Crayon

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



[PHP] Problem extending mysqli - No database connected

2007-06-29 Thread Lee PHP

Hi,

I have a class that extends msyqli that AFAIK can connect to the
database, but gives me an error when I try and query it. Here's my
class:

-- BEGIN DATABASE CLASS --
require_once('Configuration.php');
require_once('RSFSException.php');

class Database extends mysqli {

private $strUrl = DEV;
private $strUser;
private $strPass;
private $strHost;
private $intPort;
private $strName;

private static $INSTANCE;
private static $CONFIG;

private function __construct() {
$this-CONFIG = Configuration::getInstance();
$this-establishConnectionSettings();
$this-connect($this-getHost(), $this-getUser(),
$this-getPass(), $this-getName);

if (mysqli_connect_errno()) {
throw new RSFSException(Connect exception:\n .
mysqli_connect_error(), -1);
}
}

public static function getInstance($url = null) {
// Set the URL if one is provided.
if (isset($url)) {
$this-setUrl($url);
}

// Instantiate the Singleton if not already instantiated.
if(empty(self::$INSTANCE)) {
self::$INSTANCE = new Database();
}

return self::$INSTANCE;
}

public function establishConnectionSettings() {
// DEVELOPMENT (default) database settings.
if ($this-getUrl() == DEV) {

$this-setUser($this-CONFIG-getProperty(rsfsTestDbUser));

$this-setPass($this-CONFIG-getProperty(rsfsTestDbPass));

$this-setHost($this-CONFIG-getProperty(rsfsTestDbHost));

$this-setPort($this-CONFIG-getProperty(rsfsTestDbPort));

$this-setName($this-CONFIG-getProperty(rsfsTestDbName));
}

// PRODUCTION database settings.
else if ($this-getUrl() == PROD) {

$this-setUser($this-CONFIG-getProperty(rsfsDbUser));

$this-setPass($this-CONFIG-getProperty(rsfsDbPass));

$this-setHost($this-CONFIG-getProperty(rsfsDbHost));

$this-setPort($this-CONFIG-getProperty(rsfsDbPort));

$this-setName($this-CONFIG-getProperty(rsfsDbName));
}

else {
// Throw an exception.  
}
}

public function query($sql) {
$result = parent::query($sql);

if(mysqli_error($this)){
throw new RSFSException(mysqli_error($this), 
mysqli_errno($this));
}

return $result;
}

public function valueExists($table, $column, $value,
$caseInsensitive = false) {
if (!$caseInsensitive) {
$sql = SELECT * FROM $table WHERE $column = $value;
}

else {
$sql = SELECT * FROM $table  .
WHERE upper($column) = ($value);
}

$result = $this-query($sql);
echo Result: $result\n;
$count = $result-num_rows;

if ($count  0) {
return true;
}

else {
return false;
}
}

public function valuesExist($table, $columns, $values) {
// Placeholder.
}

public function procedureQuery($name, $params) {
return $this-query(call $name($params));
}

/** Return the URL. */
public function getUrl() {
return $this-strUrl;
}

.
.
.

/** Set the database URL. */
public function setName($url) {
$this-strUrl = $$url;
}
}

-- END DATABASE CLASS --

To test it, I'm doing the following:

-- BEGIN --
echo Attempting to establish connection.\n;
$CONN = Database::getInstance();

if ($CONN-ping()) {
   printf (Our connection is ok!\n);
} else {
   printf (Danger, Will Robinson!!!\n);
}

echo Attempting to test query() method.\n;
if ($result = $CONN-query(SELECT * FROM country)) {
echo In result set\n;
while( $row = mysqli_fetch_assoc($result) ){
printf(%s (%s)\n, $row['cnt_code'], $row['cnt_name']);
}
}
-- END --

Which outputs the following:

Attempting to establish connection.
localhost:rsfs:rsfs:rsfs
Our connection is ok!
Attempting 

Re: [PHP] Problem extending mysqli - No database connected

2007-06-29 Thread Stut

Lee PHP wrote:

I have a class that extends msyqli that AFAIK can connect to the
database, but gives me an error when I try and query it. Here's my
class:

-- BEGIN DATABASE CLASS --
require_once('Configuration.php');
require_once('RSFSException.php');

class Database extends mysqli {

private $strUrl = DEV;

private $strUser;
private $strPass;
private $strHost;
private $intPort;
private $strName;

private static $INSTANCE;

private static $CONFIG;

private function __construct() {

$this-CONFIG = Configuration::getInstance();
$this-establishConnectionSettings();
$this-connect($this-getHost(), $this-getUser(),
$this-getPass(), $this-getName);


I'm assuming $this-getName should have () on the end.

This is probably why it's failing. It's connecting ok, but not selecting 
a database.


-Stut

--
http://stut.net/

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



Re: [PHP] Problem extending mysqli - No database connected

2007-06-29 Thread Stut

Lee PHP wrote:

public static function getInstance($url = null) {
// Set the URL if one is provided.
if (isset($url)) {
$this-setUrl($url);
}
   
// Instantiate the Singleton if not already instantiated.

if(empty(self::$INSTANCE)) {
self::$INSTANCE = new Database();
}

return self::$INSTANCE;
}


Also, this is a static method so there is no $this available.

-Stut

--
http://stut.net/

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



Re: [PHP] Problem extending mysqli - No database connected

2007-06-29 Thread Stut

Please always include the list when replying.

Lee PHP wrote:

Yup, that was it - thanks! Coming from a Java OO background, I find it
frustrating that PHP doesn't warn me about stuff like that. Oh well, I
guess I'll know next time.


End the frustration, turn notices on. This reminds me of a saying about 
workmen and their tools.


-Stut

--
http://stut.net/


On 6/29/07, Stut [EMAIL PROTECTED] wrote:

Lee PHP wrote:
 I have a class that extends msyqli that AFAIK can connect to the
 database, but gives me an error when I try and query it. Here's my
 class:

 -- BEGIN DATABASE CLASS --
 require_once('Configuration.php');
 require_once('RSFSException.php');

 class Database extends mysqli {

 private $strUrl = DEV;
 private $strUser;
 private $strPass;
 private $strHost;
 private $intPort;
 private $strName;

 private static $INSTANCE;
 private static $CONFIG;

 private function __construct() {
 $this-CONFIG = Configuration::getInstance();
 $this-establishConnectionSettings();
 $this-connect($this-getHost(), $this-getUser(),
 $this-getPass(), $this-getName);

I'm assuming $this-getName should have () on the end.

This is probably why it's failing. It's connecting ok, but not selecting
a database.

-Stut

--
http://stut.net/



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



[PHP] Re: Problem extending mysqli - No database connected

2007-06-29 Thread Lee PHP

Actually, the post by hans at lintoo dot dk (22-Mar-2005 11:33) @
http://theserverpages.com/php/manual/en/ref.mysqli.php show why.

Weird.

On 6/29/07, Lee PHP [EMAIL PROTECTED] wrote:

Hi,

I have a class that extends msyqli that AFAIK can connect to the
database, but gives me an error when I try and query it. Here's my
class:

-- BEGIN DATABASE CLASS --
require_once('Configuration.php');
require_once('RSFSException.php');

class Database extends mysqli {

private $strUrl = DEV;
private $strUser;
private $strPass;
private $strHost;
private $intPort;
private $strName;

private static $INSTANCE;
private static $CONFIG;

private function __construct() {
$this-CONFIG = Configuration::getInstance();
$this-establishConnectionSettings();
$this-connect($this-getHost(), $this-getUser(),
$this-getPass(), $this-getName);

if (mysqli_connect_errno()) {
throw new RSFSException(Connect exception:\n .
mysqli_connect_error(), -1);
}
}

public static function getInstance($url = null) {
// Set the URL if one is provided.
if (isset($url)) {
$this-setUrl($url);
}

// Instantiate the Singleton if not already instantiated.
if(empty(self::$INSTANCE)) {
self::$INSTANCE = new Database();
}

return self::$INSTANCE;
}

public function establishConnectionSettings() {
// DEVELOPMENT (default) database settings.
if ($this-getUrl() == DEV) {

$this-setUser($this-CONFIG-getProperty(rsfsTestDbUser));

$this-setPass($this-CONFIG-getProperty(rsfsTestDbPass));

$this-setHost($this-CONFIG-getProperty(rsfsTestDbHost));

$this-setPort($this-CONFIG-getProperty(rsfsTestDbPort));

$this-setName($this-CONFIG-getProperty(rsfsTestDbName));
}

// PRODUCTION database settings.
else if ($this-getUrl() == PROD) {

$this-setUser($this-CONFIG-getProperty(rsfsDbUser));

$this-setPass($this-CONFIG-getProperty(rsfsDbPass));

$this-setHost($this-CONFIG-getProperty(rsfsDbHost));

$this-setPort($this-CONFIG-getProperty(rsfsDbPort));

$this-setName($this-CONFIG-getProperty(rsfsDbName));
}

else {
// Throw an exception.
}
}

public function query($sql) {
$result = parent::query($sql);

if(mysqli_error($this)){
throw new RSFSException(mysqli_error($this), 
mysqli_errno($this));
}

return $result;
}

public function valueExists($table, $column, $value,
$caseInsensitive = false) {
if (!$caseInsensitive) {
$sql = SELECT * FROM $table WHERE $column = $value;
}

else {
$sql = SELECT * FROM $table  .
WHERE upper($column) = ($value);
}

$result = $this-query($sql);
echo Result: $result\n;
$count = $result-num_rows;

if ($count  0) {
return true;
}

else {
return false;
}
}

public function valuesExist($table, $columns, $values) {
// Placeholder.
}

public function procedureQuery($name, $params) {
return $this-query(call $name($params));
}

/** Return the URL. */
public function getUrl() {
return $this-strUrl;
}

.
.
.

/** Set the database URL. */
public function setName($url) {
$this-strUrl = $$url;
}
}

-- END DATABASE CLASS --

To test it, I'm doing the following:

-- BEGIN --
echo Attempting to establish connection.\n;
$CONN = Database::getInstance();

if ($CONN-ping()) {
printf (Our connection is ok!\n);
} else {
printf (Danger, Will Robinson!!!\n);
}

echo Attempting to test query() method.\n;
if ($result = $CONN-query(SELECT * FROM country)) {
echo In result set\n;
while( $row = mysqli_fetch_assoc($result) ){
printf(%s (%s)\n, $row['cnt_code'], $row['cnt_name']);
}
}
-- END --

Which outputs the following:

Attempting to establish connection.
localhost:rsfs:rsfs:rsfs
Our connection is ok!
Attempting to test query() method.


Fatal 

Re: [PHP] simple OCR in php

2007-06-29 Thread M. Sokolewicz

Robert Cummings wrote:

On Fri, 2007-06-29 at 11:32 -0500, Jay Blanchard wrote:

[snip]
I am looking for a way to incorporate some simple OCR into a php script.
The 
user will bulk scan a pile of invoices. I want the php script to look at
each 
invoice and read a number off the invoice. The image will then be
renamed, 
and be organized into a directory and the file name will be added to a 
database. (all of these steps are straight forward once the number is
read.) 
I have no problem with a system that requires a special OCR font and/or
some 
sort of registration mark to help locate the Invoice number. Can anybody
tell 
me of any tools out there that can do this?

[/snip]

In short PHP cannot perform OCR functions. You could insert an OCR
application into the process and have the OCR app pass PHP the
information.


Why can PHP not perform OCR functions?

Cheers,
Rob.


It's not so much impossible to perform OCR as it is unrealistic to do 
so. PHP contains only the very most basic support for such things, not 
to mention there are barely any (OS) libraries for PHP to do this, it's 
simply not realistic to try and make one if you're on your own. Other 
languages (ie. C) have libraries, written by people specifically for 
this purpose, so it seems clear to me: PHP is (currently) not the most 
realistic language to try and do OCR with, instead it'd be a lot easier 
(at this point) to borrow from another. Be this a low-level library in 
C, or a full-blown package, it doesn't matter.


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



[PHP] Re: Address book - LDAP or MySQL?

2007-06-29 Thread Colin Guthrie
Nathan Nobbe wrote:
 On 6/29/07, Jay Blanchard [EMAIL PROTECTED] wrote:
 Twas me. LDAP is not a database it is a protocol for accessing a
 directory service which is the abstraction layer for the actual data
 repository namespace.
 
 And an LDAP server will typically house said repository namespace.  Like
 OpenLDAP using BerkDB.
 I think thats where people are getting confused.  The difference between
 LDAP as a protocol and LDAP servers,
 which incorporate the protocol and the directory storage.
 (please correct me if im wrong [like i had to ask :)])

You are totally correct. That's why I posted to Jay's original reply as
it wasn't particularly helpful in that it basically said LDAP is not a
database and left it at that.

For the vast majority of scenarios, you can just consider LDAP (when
referencing an LDAP server) as a database of sorts, just with a
different query interface to std SQL :)

Lots of things integrate with LDAP and since deploying it in my office
we've continually found new uses for it due to extensive support in lots
of applications, web based and desktop alike.

Col

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



Re: [PHP] simple OCR in php

2007-06-29 Thread Tijnema

On 6/29/07, M. Sokolewicz [EMAIL PROTECTED] wrote:

Robert Cummings wrote:
 On Fri, 2007-06-29 at 11:32 -0500, Jay Blanchard wrote:
 [snip]
 I am looking for a way to incorporate some simple OCR into a php script.
 The
 user will bulk scan a pile of invoices. I want the php script to look at
 each
 invoice and read a number off the invoice. The image will then be
 renamed,
 and be organized into a directory and the file name will be added to a
 database. (all of these steps are straight forward once the number is
 read.)
 I have no problem with a system that requires a special OCR font and/or
 some
 sort of registration mark to help locate the Invoice number. Can anybody
 tell
 me of any tools out there that can do this?
 [/snip]

 In short PHP cannot perform OCR functions. You could insert an OCR
 application into the process and have the OCR app pass PHP the
 information.

 Why can PHP not perform OCR functions?

 Cheers,
 Rob.

It's not so much impossible to perform OCR as it is unrealistic to do
so. PHP contains only the very most basic support for such things, not
to mention there are barely any (OS) libraries for PHP to do this, it's
simply not realistic to try and make one if you're on your own. Other
languages (ie. C) have libraries, written by people specifically for
this purpose, so it seems clear to me: PHP is (currently) not the most
realistic language to try and do OCR with, instead it'd be a lot easier
(at this point) to borrow from another. Be this a low-level library in
C, or a full-blown package, it doesn't matter.


Take the library of a C OCR program, write some PHP C code around it
and a new extension is born :)

Tijnema


--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

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



Re: [PHP] simple OCR in php

2007-06-29 Thread Robert Cummings
On Fri, 2007-06-29 at 22:57 +0200, M. Sokolewicz wrote:
 Robert Cummings wrote:
  On Fri, 2007-06-29 at 11:32 -0500, Jay Blanchard wrote:
  [snip]
  I am looking for a way to incorporate some simple OCR into a php script.
  The 
  user will bulk scan a pile of invoices. I want the php script to look at
  each 
  invoice and read a number off the invoice. The image will then be
  renamed, 
  and be organized into a directory and the file name will be added to a 
  database. (all of these steps are straight forward once the number is
  read.) 
  I have no problem with a system that requires a special OCR font and/or
  some 
  sort of registration mark to help locate the Invoice number. Can anybody
  tell 
  me of any tools out there that can do this?
  [/snip]
 
  In short PHP cannot perform OCR functions. You could insert an OCR
  application into the process and have the OCR app pass PHP the
  information.
  
  Why can PHP not perform OCR functions?
  
  Cheers,
  Rob.
 
 It's not so much impossible to perform OCR as it is unrealistic to do 
 so. PHP contains only the very most basic support for such things, not 
 to mention there are barely any (OS) libraries for PHP to do this, it's 
 simply not realistic to try and make one if you're on your own. Other 
 languages (ie. C) have libraries, written by people specifically for 
 this purpose, so it seems clear to me: PHP is (currently) not the most 
 realistic language to try and do OCR with, instead it'd be a lot easier 
 (at this point) to borrow from another. Be this a low-level library in 
 C, or a full-blown package, it doesn't matter.

Well I agree with that, but as you indicate, it is possible to do it in
PHP, just not particularly practical :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread -Patrick

M. Sokolewicz wrote:

Chris wrote:

M. Sokolewicz wrote:

Paul Scott wrote:

On Fri, 2007-06-29 at 01:59 -0400, -Patrick wrote:
I no longer have a need for this list and My mailbox is getting 
flooded, Can someone assist ?


Read the footer on every single mail posted to this list to 
unsubscribe


--Paul



 



All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 
I must have missed a lot of footers then because I can't find a 
single one which says anything about unsubscribing...!


You missed this?

To unsubscribe, visit: http://www.php.net/unsub.php



Yes, only about 1 in a hundred emails have that footer. Might be 
because I'm not subscribed, and just use the NNTP interface :)


Don't be jackasses - I specifically stated I have tried to unsubscribe 
What does that mean to you? That I just 'said i did' and didn't actually 
try it??? I used the official unsubscribe link at the bottom . IT DIDNT 
WORK FOR ME!


All I want is a Moderator or someone who runs the list or whatever to 
actually remove my email from the list - no matter how many times I 
attempt to unsubscribe using the links it doesn't work. Is that possible?


-Patrick

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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread Jim Lucas

-Patrick wrote:

M. Sokolewicz wrote:

Chris wrote:

M. Sokolewicz wrote:

Paul Scott wrote:

On Fri, 2007-06-29 at 01:59 -0400, -Patrick wrote:
I no longer have a need for this list and My mailbox is getting 
flooded, Can someone assist ?


Read the footer on every single mail posted to this list to 
unsubscribe


--Paul



 



All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 
I must have missed a lot of footers then because I can't find a 
single one which says anything about unsubscribing...!


You missed this?

To unsubscribe, visit: http://www.php.net/unsub.php



Yes, only about 1 in a hundred emails have that footer. Might be 
because I'm not subscribed, and just use the NNTP interface :)


Don't be jackasses - I specifically stated I have tried to unsubscribe 
What does that mean to you? That I just 'said i did' and didn't actually 
try it??? I used the official unsubscribe link at the bottom . IT DIDNT 
WORK FOR ME!


All I want is a Moderator or someone who runs the list or whatever to 
actually remove my email from the list - no matter how many times I 
attempt to unsubscribe using the links it doesn't work. Is that possible?


-Patrick


This is an unmoderated list. So no, it can't happen that way.

Lets look at this like a PHP question.

What type of error do you get, please include messages that you have sent and responses that you 
have gotten back.




--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread -Patrick

Simon wrote:
Don't be jackasses - I specifically stated I have tried to 
unsubscribe What does that mean to you? That I just 'said i did' and 
didn't actually try it??? I used the official unsubscribe link at the 
bottom . IT DIDNT WORK FOR ME!


Call an ambulance too, just in case!

Wow, have you tried all possible ways? Using different browsers on the 
website, connecting directly to the modem, disabling your firewall, 
basically, try at someone else's house?...


Good luck!



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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread -Patrick
Yes, I am still having a problem,after trying to unsubscribe AGAIN, it 
sends me a confirm message. I reply to it then it sends me back the 
confirm-identity message, I reply with the text block it requires and 
still no positive result. I must mention that in the past when I have 
tried to do this it occasionally did not send me a confirm-identity 
message. It appears to randomly ask for confirmation of identity.


-Patrick



Stut wrote:

-Patrick wrote:
Don't be jackasses - I specifically stated I have tried to 
unsubscribe What does that mean to you? That I just 'said i did' and 
didn't actually try it??? I used the official unsubscribe link at the 
bottom . IT DIDNT WORK FOR ME!


Tell us what you tried and any messages you got. We're not 
mind-readers. And don't confuse being jackasses with simple sarcasm. 
And don't be so sensitive.


All I want is a Moderator or someone who runs the list or whatever to 
actually remove my email from the list - no matter how many times I 
attempt to unsubscribe using the links it doesn't work. Is that 
possible?


This list is not moderated so there is nobody that can remove you from 
the list. You need to go through the process.


I've use the form on the mailing list page to send an unsubscribe 
request to your email address. You should receive an email with 
instructions that you need to follow to complete the process. If you 
have problems feel free to let me know.


-Stut



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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread -Patrick
this message below should not have gone through as I tried to 
unsubscribe shortly before this reply


-Patrick wrote:
Yes, I am still having a problem,after trying to unsubscribe AGAIN, it 
sends me a confirm message. I reply to it then it sends me back the 
confirm-identity message, I reply with the text block it requires and 
still no positive result. I must mention that in the past when I have 
tried to do this it occasionally did not send me a confirm-identity 
message. It appears to randomly ask for confirmation of identity.


-Patrick



Stut wrote:

-Patrick wrote:
Don't be jackasses - I specifically stated I have tried to 
unsubscribe What does that mean to you? That I just 'said i did' 
and didn't actually try it??? I used the official unsubscribe link 
at the bottom . IT DIDNT WORK FOR ME!


Tell us what you tried and any messages you got. We're not 
mind-readers. And don't confuse being jackasses with simple sarcasm. 
And don't be so sensitive.


All I want is a Moderator or someone who runs the list or whatever 
to actually remove my email from the list - no matter how many times 
I attempt to unsubscribe using the links it doesn't work. Is that 
possible?


This list is not moderated so there is nobody that can remove you 
from the list. You need to go through the process.


I've use the form on the mailing list page to send an unsubscribe 
request to your email address. You should receive an email with 
instructions that you need to follow to complete the process. If you 
have problems feel free to let me know.


-Stut





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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread Stut

-Patrick wrote:
this message below should not have gone through as I tried to 
unsubscribe shortly before this reply


You do not need to be subscribed to post to this list.


-Patrick wrote:
Yes, I am still having a problem,after trying to unsubscribe AGAIN, it 
sends me a confirm message. I reply to it then it sends me back the 
confirm-identity message, I reply with the text block it requires and 
still no positive result. I must mention that in the past when I have 
tried to do this it occasionally did not send me a confirm-identity 
message. It appears to randomly ask for confirmation of identity.


I've never known an unsubscribe request to need identity confirmation. 
Are you sure you're asking the system to unsubscribe you not subscribe you?


I'm really not sure how, or even if it's possible, to escalate this to 
the next level. I've subscribed and unsubscribed to PHP lists various 
times with several addresses and have never had any issues.


I call PEBKAC.

-Stut

--
http://stut.net/


Stut wrote:

-Patrick wrote:
Don't be jackasses - I specifically stated I have tried to 
unsubscribe What does that mean to you? That I just 'said i did' 
and didn't actually try it??? I used the official unsubscribe link 
at the bottom . IT DIDNT WORK FOR ME!


Tell us what you tried and any messages you got. We're not 
mind-readers. And don't confuse being jackasses with simple sarcasm. 
And don't be so sensitive.


All I want is a Moderator or someone who runs the list or whatever 
to actually remove my email from the list - no matter how many times 
I attempt to unsubscribe using the links it doesn't work. Is that 
possible?


This list is not moderated so there is nobody that can remove you 
from the list. You need to go through the process.


I've use the form on the mailing list page to send an unsubscribe 
request to your email address. You should receive an email with 
instructions that you need to follow to complete the process. If you 
have problems feel free to let me know.


-Stut


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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread Edward Krack

To remove your address from the list, just send a message to
the address in the ``List-Unsubscribe'' header of any list
message. If you haven't changed addresses since subscribing,
you can also send a message to:
 [EMAIL PROTECTED]

I'm done with you
--
Edward Krack


Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread -Patrick

Stut wrote:


I've never known an unsubscribe request to need identity confirmation. 
Are you sure you're asking the system to unsubscribe you not subscribe 
you?


I'm really not sure how, or even if it's possible, to escalate this to 
the next level. I've subscribed and unsubscribed to PHP lists various 
times with several addresses and have never had any issues.


I call PEBKAC.

-Stut



Yes, I tried every link on that confirmation message when nothing would
work. And I am 110% positive I have used the confirmation-unsubscribe
link. It sends me a message asking if I am sure that I want to UNsubscribe.

Great, I am stuck receiving the email equivalent of spam(since I do not
want to receive it) for the rest of this email address's life. wtf.

-Patrick

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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread -Patrick

Edward Krack wrote:


To remove your address from the list, just send a message to
the address in the ``List-Unsubscribe'' header of any list
message. If you haven't changed addresses since subscribing,
you can also send a message to:
  [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]


I'm done with you
--
Edward Krack 

Tried that many time.

And I'm done with you. Thanks.

-Patrick.

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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread Janet Valade
Here's a page with more info about unsubscribing and problems. Have you 
seen this? http://www.php.net/unsub.php


Janet


-Patrick wrote:

Stut wrote:



I've never known an unsubscribe request to need identity confirmation. 
Are you sure you're asking the system to unsubscribe you not subscribe 
you?


I'm really not sure how, or even if it's possible, to escalate this to 
the next level. I've subscribed and unsubscribed to PHP lists various 
times with several addresses and have never had any issues.


I call PEBKAC.

-Stut



Yes, I tried every link on that confirmation message when nothing would
work. And I am 110% positive I have used the confirmation-unsubscribe
link. It sends me a message asking if I am sure that I want to UNsubscribe.

Great, I am stuck receiving the email equivalent of spam(since I do not
want to receive it) for the rest of this email address's life. wtf.

-Patrick




--
Janet Valade -- janet.valade.com

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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread Jim Lucas

-Patrick wrote:

Stut wrote:


I've never known an unsubscribe request to need identity confirmation. 
Are you sure you're asking the system to unsubscribe you not subscribe 
you?


I'm really not sure how, or even if it's possible, to escalate this to 
the next level. I've subscribed and unsubscribed to PHP lists various 
times with several addresses and have never had any issues.


I call PEBKAC.

-Stut



Yes, I tried every link on that confirmation message when nothing would
work. And I am 110% positive I have used the confirmation-unsubscribe
link. It sends me a message asking if I am sure that I want to UNsubscribe.

Great, I am stuck receiving the email equivalent of spam(since I do not
want to receive it) for the rest of this email address's life. wtf.

-Patrick



no, you have to make sure that you are sending and receiving all messages 
through this account.

If you have more then one account configured in your email client, make sure when it sends out the 
message, that it is using the account that is registered with the php mailing list.  I had the same 
problems years ago, until I realized that I was sending the requests from the wrong email account.


Not that I was submitting the wrong email address, but when I sent the request, it would send me the 
confirmation email, when I replied to that message, I used the wrong account because the default 
account in my email client was a different account then what I was getting the mailing list from.


Just a suggestion from someone that went through  the exact same problem.

--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread -Patrick

Yes, I've seen that page on php.net

And no Jim, I'm not sure this is the 'exact' same problem. I understand 
what you are saying and it's not working.


Ok, I am done for now with this list. Thanks for trying anyways.
-Patrick

Jim Lucas wrote:

-Patrick wrote:

Stut wrote:


I've never known an unsubscribe request to need identity 
confirmation. Are you sure you're asking the system to unsubscribe 
you not subscribe you?


I'm really not sure how, or even if it's possible, to escalate this 
to the next level. I've subscribed and unsubscribed to PHP lists 
various times with several addresses and have never had any issues.


I call PEBKAC.

-Stut



Yes, I tried every link on that confirmation message when nothing would
work. And I am 110% positive I have used the confirmation-unsubscribe
link. It sends me a message asking if I am sure that I want to 
UNsubscribe.


Great, I am stuck receiving the email equivalent of spam(since I do not
want to receive it) for the rest of this email address's life. wtf.

-Patrick



no, you have to make sure that you are sending and receiving all 
messages through this account.


If you have more then one account configured in your email client, 
make sure when it sends out the message, that it is using the account 
that is registered with the php mailing list.  I had the same problems 
years ago, until I realized that I was sending the requests from the 
wrong email account.


Not that I was submitting the wrong email address, but when I sent the 
request, it would send me the confirmation email, when I replied to 
that message, I used the wrong account because the default account in 
my email client was a different account then what I was getting the 
mailing list from.


Just a suggestion from someone that went through  the exact same problem.



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



Re: [PHP] HELP - I have tried to unsubscribe from this listmutipletimes but cannot.

2007-06-29 Thread David Wonderly

-Patrick wrote:

Yes, I've seen that page on php.net

And no Jim, I'm not sure this is the 'exact' same problem. I 
understand what you are saying and it's not working.


Ok, I am done for now with this list. Thanks for trying anyways.
-Patrick

Jim Lucas wrote:

-Patrick wrote:

Stut wrote:


I've never known an unsubscribe request to need identity 
confirmation. Are you sure you're asking the system to unsubscribe 
you not subscribe you?


I'm really not sure how, or even if it's possible, to escalate this 
to the next level. I've subscribed and unsubscribed to PHP lists 
various times with several addresses and have never had any issues.


I call PEBKAC.

-Stut



Yes, I tried every link on that confirmation message when nothing would
work. And I am 110% positive I have used the confirmation-unsubscribe
link. It sends me a message asking if I am sure that I want to 
UNsubscribe.


Great, I am stuck receiving the email equivalent of spam(since I do not
want to receive it) for the rest of this email address's life. wtf.

-Patrick



no, you have to make sure that you are sending and receiving all 
messages through this account.


If you have more then one account configured in your email client, 
make sure when it sends out the message, that it is using the account 
that is registered with the php mailing list.  I had the same 
problems years ago, until I realized that I was sending the requests 
from the wrong email account.


Not that I was submitting the wrong email address, but when I sent 
the request, it would send me the confirmation email, when I replied 
to that message, I used the wrong account because the default account 
in my email client was a different account then what I was getting 
the mailing list from.


Just a suggestion from someone that went through  the exact same 
problem.




I don't know... just an idea... if you don't want to see this list then 
create a rule in your email program that states that anything with [PHP] 
in the subject line goes to trash... That way you don't have to bother 
with getting upset.


*sighs* What is this world coming to?

-Dave

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



[PHP] implementation of guest book

2007-06-29 Thread Shiv Prakash
Sir,
   
  I have implemented the guest book in web site successfully and its working 
also without any problem but administration side is asking for ID and Password, 
my request is how do I get that because I have tried my level best to find it 
in the site but I couldn’t get it ,there was not any option for that and as of 
downloading is concern it was free, therefore I request you to help me out of 
this and solve my problem,
   
  Thank you
   
  Shiv Prakash
  Email Id 2. [EMAIL PROTECTED]


[PHP] Re: Handling animated GIFs with GD?

2007-06-29 Thread Manuel Lemos
Hello,

on 06/26/2007 06:38 AM Tijnema said the following:
 Is it possible to parse animated GIFs with GD, just frame by frame?

Try Laszlo Zsidi GIF animation classes:

http://www.phpclasses.org/gifmerge

http://www.phpclasses.org/gifsplit

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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



[PHP] Re: simple OCR in php

2007-06-29 Thread Manuel Lemos
Hello,

on 06/29/2007 01:24 PM Ray said the following:
 Hello all,
 I am looking for a way to incorporate some simple OCR into a php script. The 
 user will bulk scan a pile of invoices. I want the php script to look at each 
 invoice and read a number off the invoice. The image will then be renamed, 
 and be organized into a directory and the file name will be added to a 
 database. (all of these steps are straight forward once the number is read.) 
 I have no problem with a system that requires a special OCR font and/or some 
 sort of registration mark to help locate the Invoice number. Can anybody tell 
 me of any tools out there that can do this?

I think you are looking for something like this:

http://www.phpclasses.org/phpocr

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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



[PHP] Selecting Rows Based on Row Values Being in Array

2007-06-29 Thread kvigor
Hello All,

I'm attempting to return rows from a mysql DB based on this criteria:

I have a list, in the form of an array that I need to compare against each 
row
in the table.  Where theres a match I need that entire row returned.

e.g.$varListof 3outOf_10Fields = array(6blue40lbs, 7orange50lbs, 
8orange60lbs, 9purple70lbs);

The array contains 3 of the db row fields in 1 value. However there are 10 
fields/columns in the table.

===
what table looks like  |
===
  size   colorweight
ROW 1| value1 | value1 | value1 | value1 | value1 | value1 |

So how could I set up a query that would SELECT the entire row, if the row 
contained $varListof 3outOf_10Fields[1].

Open to any suggestions or work arounds.  I'm playing with extract() but 
code is too crude to even post.

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