[PHP] Re: phpEditIni has moved to phpeditini.net

2006-05-12 Thread Barry

Jeremy C O'Connor schrieb:

The new browser based editor of PHP.INI files on Windows, phpEditIni, has
moved to a new site: http://phpeditini.net Download it today!

--
info at phpeditini dot net

Not interesting though since it only works on Windows.

Uhm remember that most Webserevers are running with unix.

And you should remove those debug stuffs you left inside that file which 
you had commented out.


Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



Re: [PHP] Re: phpEditIni has moved to phpeditini.net

2006-05-12 Thread Lester Caine

Barry wrote:


Jeremy C O'Connor schrieb:


The new browser based editor of PHP.INI files on Windows, phpEditIni, has
moved to a new site: http://phpeditini.net Download it today!

--
info at phpeditini dot net


Not interesting though since it only works on Windows.

It says that ;)
PHP-WIN may have been a better list, but given the crap that hits the 
smaller lists ...



Uhm remember that most Webserevers are running with unix.

This may be the ideal, but try telling CUSTMERS that :(
This is actually quite a useful little tidy for those sites where we 
HAVE to use windows servers ;)


And you should remove those debug stuffs you left inside that file which 
you had commented out.
Swings and roundabouts. It's nice to be able to play with this and tweak 
it for your own purposes.


--
Lester Caine - G8HFL
-
L.S.Caine Electronic Services - http://home.lsces.co.uk
Model Engineers Digital Workshop - 
http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/

Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

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



[PHP] Re: SimpleXML is creating nodes when it shouldn't...

2006-05-12 Thread Marcus Boerger
Hello D.,

Friday, May 12, 2006, 5:29:42 AM, you wrote:

> I've recently upgraded to PHP 5.1.4 from 5.1.2 and noticed that in 5.1.3 
> there were changes made to SimpleXML.  Now, when I touch an element 
> which didn't used to exist, instead of acting like it didn't exist, it 
> creates it!  That's horrible!

> Well, this used to work:

>  $xmlstr = "1";
> $xml = simplexml_load_string($xmlstr);
> print_r($xml);

> foreach ($xml->nonexist as $nonexist) {
> // do nothing
> }
> print_r($xml);
?>>

> But now, the output of the print_r is different when I do it the second 
> time because the foreach statement created nodes:

> SimpleXMLElement Object
> (
> [item] => 1
> )
> SimpleXMLElement Object
> (
> [item] => 1
> [nonexist] => SimpleXMLElement Object
> (
> )
> )

> I think that's a bug and not a feature.  Why was this changed?

It is called write support. I think we are going to add a flag
so that one can specify whether write support is enabled or not.

-- 
Best regards,
 Marcusmailto:[EMAIL PROTECTED]

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



[PHP] suExec problem

2006-05-12 Thread Laszlo Nagy


 Hello,

I have a SuSe 9.3 server, with apache version 2.0.53 and suexec 
configured. It was working for months. One day, it stopped working for 
ALL virtual hosts. I might have misconfigured something, but I'm not 
sure what is the problem. When I start up apache, I see this in the 
error_log:


[Fri May 12 11:48:40 2006] [warn] Init: Session Cache is not configured 
[hint: SSLSessionCache]
[Fri May 12 11:48:40 2006] [notice] suEXEC mechanism enabled (wrapper: 
/usr/sbin/suexec2)

Destroying config 0x80f0c08
Creating new config (0x80f4ea8) for (null)
[Fri May 12 11:48:40 2006] [notice] Apache/2.0.53 (Linux/SUSE) 
configured -- resuming normal operations


So probably the suexec binary is okay. Then I go to one of my virtual 
hosts, and execute phpinfo(). That says I'm using the mod_php version. 
There are no more error messages in apache error log neither in suexec.log.


Here is my suexec config:

dybs1 /home/nagylzs# suexec2 -V
-D AP_DOC_ROOT="/srv/www"
-D AP_GID_MIN=96
-D AP_HTTPD_USER="wwwrun"
-D AP_LOG_EXEC="/var/log/apache2/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_UID_MIN=96
-D AP_USERDIR_SUFFIX="public_html"

Here is a virtual host:


   ServerName joomla.dynabit.hu
   DocumentRoot /srv/www/vhosts/ddyb04/joomla.dynabit.hu
   ErrorLog /var/log/apache2/joomla-dynabit-error_log
   CustomLog /var/log/apache2/joomla-dynabit-access_log combined
   UseCanonicalName Off
   ServerSignature On

   ScriptAlias /php/ "/srv/www/vhosts/ddyb04/joomla.dynabit.hu/cgi-bin/"
   Action application/x-httpd-php "/php/php5"

   DirectoryIndex index.html index.htm index.php

   SuexecUserGroup ddyb04 users

   
   Options ExecCGI FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
   

   
   Options Indexes FollowSymLinks
   AllowOverride FileInfo
   Order allow,deny
   Allow from all
   



Do you have any ideas? Why it is not working? Why can't I see the error 
in the logs?


Thanks,

   Laszlo

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



Re: [PHP] Sending a lot of data to remote site

2006-05-12 Thread Jochem Maas

Ryan A wrote:

Hey,
Thanks for replying.



...


('hugo_the_boss','james007bond','max_power','etc')
in "peak season" I expect the array to go upto 5k
entries but very unlikely as I will be transferring
data every minute of only new entries.


ok so the data is pretty simple and predictable - I take it
that the max length of the username is known, this way you can calculate
pretty well how much data you could be send at a time.

...



Every 2 mins max, usually every min.



that is fairly often :-)

I would not use a webserver based solution - go directly to CLI.

setup a deamon script on your server that listens to a port for an
incoming connection from the remote server -- use a SHA hash token known
only to the client and server script for a means to to do a simple
form of protection (so only the remote server you want can connect and 
download).

... and pump out binary packed data on request.
(I have never used the pack()/unpack() commands but this seems
like an opportunity for using them)

again just an idea - maybe someone with more experience in this area can
comment as to it's validity.

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



Re: [PHP] Parsing a stdClass Object created with mimeDecode

2006-05-12 Thread Jochem Maas

Graham Anderson wrote:

Hi

I am trying to get the body text from a number of different emails  
using mimeDecode [Pear]
Unfortunately, it appears that the body text could be in any number  of 
locations in the stdClass Object depending on which email is  processed.
At this point, I can only access the node by looking at the print_r 
($structure) directly :(


sounds like you have a simpleXML object or something similar - with the
freaking overloading madness that break my head every time I work with it.

BUT if it is a StdObject try casting it to an array.

$myArr = (array) $myObj;

that should allow you to recursively traverse $myArr using a
fucntion that employs a foreach() loop (and calls it self for every value



Out of the three different emails I parsed, I got three different  
locations for the 'body' node

$structure->parts[0]->parts[0]->parts[0]->body;
$structure->body;
$structure->parts[0]->body;



Question:
Is there a way to generically traverse the entire object generated  from 
Mail_mimeDecode and  search  for the correct node ?


In my case, these conditions need to be met .

if (trim($part->ctype_primary)== "text" && trim($part- >ctype_secondary) 
== "plain")

{
$body = $part->body;
echo "the body text  is: $body";
}
}

I am a bit new to stdClass Object  and Mail_mimeDecode so any help is  
appreciated
This script was taken from a previous example on http:// 
www.troywolf.com/articles/php/class_xml/



The script currently is:

include('Mail/mimeDecode.php');

$filename = "email_multi.txt";
$message  = fread(fopen($filename, 'r'), filesize($filename));

header('Content-Type: text/plain');
header('Content-Disposition: inline; filename="stuff.txt"');

$params = array(
'input'  => $message,
'crlf'   => "\r\n",
'include_bodies' => TRUE,
'decode_headers' => TRUE,
'decode_bodies'  => TRUE
);

$structure = Mail_mimeDecode::decode($params);

// This only works if you know specifically where there node/Object  
lives :(

foreach($structure->parts[0]->parts[0]->parts as $part)
{

//for debugging
echo $part->ctype_primary."|".$part->ctype_secondary."\n\r";

// if these conditions are met, we found the right node
if (trim($part->ctype_primary)== "text" && trim($part- >ctype_secondary) 
== "plain")

{
$body = $part->body;
echo "body is: $body";
}
}

?>



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



[PHP] displaying result problem

2006-05-12 Thread adi zebic

Hi,

I have little problem while displaying a result from one simple querry.
If i insert values into mysql DB in following order (12, 3, 14, 4 )
I allways have  ( 12, 14, 3, 4 ) displaying when query the DB. (same with
letters - dcba -> abcd etc)
I would like to be able to display the data like they are inserted into
database.

Any help is welcome,


Thanks


Re: [PHP] Paged Results Set in MySQL DB with one result

2006-05-12 Thread tedd

At 5:06 PM -0500 5/11/06, Richard Lynch wrote:

On Thu, May 11, 2006 1:20 pm, tedd wrote:

  > Does this qualify?


  http://xn--ovg.com/ajax_page


Well, on page 1, I can't get it to re-size at all...

So, no, it doesn't qualify. :-)



 You didn't say it must be re-sizable.

 Okay, let me get this right.

 If the page could be resized, and the text would dynamically fill the
 space, and the user could step through the text like a reader, then
 would that qualify?

 Keep in mind that you can have it one of two ways (mutually
 exclusive).

 One, static page -- a page is what you see and each time to return to
 that page it's exactly as it looked before.

 Two, dynamic page -- when you re-size the page, "One" is no longer
 applicable.

 I just gave you "One", now you want "Two"?


I believe the OP wanted "Three":

Show only as much text as nicely fits in the browser, with "more" for
the next page...



So, the page is fluid, uses the entire browser window, and has a more 
button -- right?


Will that do it?

tedd
--

http://sperling.com

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



Re: [PHP] displaying result problem

2006-05-12 Thread tedd

At 1:33 PM +0200 5/12/06, adi zebic wrote:

Hi,

I have little problem while displaying a result from one simple querry.
If i insert values into mysql DB in following order (12, 3, 14, 4 )
I allways have  ( 12, 14, 3, 4 ) displaying when query the DB. (same with
letters - dcba -> abcd etc)
I would like to be able to display the data like they are inserted into
database.

Any help is welcome,


Auto_increment an ID field and use that to search and pull stuff out.

tedd
--

http://sperling.com

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



Re: [PHP] Sending a lot of data to remote site

2006-05-12 Thread John Wells

On 5/12/06, Jochem Maas <[EMAIL PROTECTED]> wrote:

Ryan A wrote:
> Hi,
>
> I need to send an array of data to a remote site from
> my script, the array will contain anything from 1 to
> 5000 entries of less than 150 alpha numeric characters

you could setup an XML feed that they can request at their leasure.



Ok Ryan, so when I first read your needs, I thought to myself "web
service" (along the lines of Jochem's XML feed concept).  But with my
limited experience with it, I'm hoping others can offer some reaction
to the idea.

So, if you consider SOAP as your web service solution:

a) Using XML eliviates your need to come up with custom serializing
that is careful to not use delimiters that might also be found in your
data.

b) If your client and server machines are running on different
languages (PHP on one, Java on the other, for example), then a WSDL
file will "describe" the structure of your data, so your PHP array
seamlessly becomes a Java array.  No interoperability issues.

c) You may find that after you develop this solution once, you can
easily reuse it elsewhere.

d) SOAP et al also includes a lot of custom error handling, so you
could concievably make your solution a lot more robust.

e) The standard also includes an authentication mechanism.

Ok, so that's what I'm thinking.  I know there's more work involved in
a SOAP solution than a down-and-dirty serialize-and-stream solution,
but down the road it might serve you better.

John W

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



Re: [PHP] displaying result problem

2006-05-12 Thread chris smith

On 5/12/06, adi zebic <[EMAIL PROTECTED]> wrote:

Hi,

I have little problem while displaying a result from one simple querry.
If i insert values into mysql DB in following order (12, 3, 14, 4 )
I allways have  ( 12, 14, 3, 4 ) displaying when query the DB. (same with
letters - dcba -> abcd etc)
I would like to be able to display the data like they are inserted into
database.


A database will order things randomly unless you tell it how to order
the results.

As Tedd suggested, add an id field and then you can order by that field:

select * from table order by id ASC;

http://dev.mysql.com/doc/refman/5.1/en/sorting-rows.html

--
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] suExec problem

2006-05-12 Thread chris smith

On 5/12/06, Laszlo Nagy <[EMAIL PROTECTED]> wrote:


  Hello,

I have a SuSe 9.3 server, with apache version 2.0.53 and suexec
configured. It was working for months. One day, it stopped working for
ALL virtual hosts. I might have misconfigured something, but I'm not
sure what is the problem. When I start up apache, I see this in the
error_log:


This is more of an apache question. You'll get a quicker answer on their lists:

http://httpd.apache.org/lists.html

--
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] Parsing images

2006-05-12 Thread tedd

On Thu, May 11, 2006 1:03 pm, Robert Cummings wrote:

 Edge detection, noise suppression, and data analysis don't quite
 equate
 to recognition. Also 30 years of OCR still requires that the sample be
 good quality and conform to fairly detectable patterns. If this is so
 trivial, I await the release of your captcha parser. The spammers
 would
 probably pay you millions for it. Where exactly is this bleeding edge,
 and where can I read more about it? I think you're quite
 wholeheartedly
 being naive about the complexity of visual recognition. Prove me
 wrong.


If you had millions, I would prove you wrong. But, in the meantime I 
have other stuff to do.


The original poster asked the question -- can it be done. And of 
course, the answer is Yes.


Visual recognition in its entirety is not what we are talking about 
here. Instead, we are talking about a very specific and limited 
problem of how a program can detect known characters in noise -- that 
-- are also detectable by humans.


Granted, the more complex the image, the more difficult for a program 
to decipher it, but a CAPTCHA has to be, by definition, detectable by 
a visually unimpaired human.


Image analysis, enhancement, alteration, and such are better 
performed by computers than by humans -- that's the reason we 
developed the software in the first place.


The step between analysis and detection is simply meeting an 
acceptable error threshold.


However, the reasons why CAPTCHA's still work is that the time 
required to do the analysis could be better spent elsewhere by 
spammers.


As for me being naive -- well... either one of us could be -- but 
that's probably what I get for working in signal analysis (seismic 
data) since 1975.


As for the bleeding edge, that's obvious, just look to medical 
imaging. They wish that the detection of their problems were as 
simple as CAPTCHA.


tedd

--

http://sperling.com

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



Re: [PHP] Sending a lot of data to remote site

2006-05-12 Thread Ryan A
Hey,

 
> > ('hugo_the_boss','james007bond','max_power','etc')
> > in "peak season" I expect the array to go upto 5k
> > entries but very unlikely as I will be
> transferring
> > data every minute of only new entries.
> 
> ok so the data is pretty simple and predictable - I
> take it
> that the max length of the username is known, this
> way you can calculate
> pretty well how much data you could be send at a
> time.

Yep, max length 150 chars. Can be lowered to around
100 if need be.
 
> > Every 2 mins max, usually every min.
> > 
> 
> that is fairly often :-)

Yep :-)


> I would not use a webserver based solution - go
> directly to CLI.

Ohh?

 
> use a
> SHA hash token known
> only to the client and server script for a means to
> to do a simple
> form of protection (so only the remote server you
> want can connect and download).

Already done :-) Its good we are thinking along the
same lines.

 
> ... and pump out binary packed data on request.
> (I have never used the pack()/unpack() commands but
> this seems
> like an opportunity for using them)

Never used them myself...will look into them.


> again just an idea - maybe someone with more
> experience in this area can
> comment as to it's validity.


Would appreciate all comments.

Thanks!
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
-
Fight back spam! Download the Blue Frog.
http://www.bluesecurity.com/register/s?user=bXVzaWNndTc%3D

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] Re: Upload File (binary files?)

2006-05-12 Thread tedd

At 11:07 PM +0200 5/11/06, Jochem Maas wrote:

I think you make interesting points Tedd, it's given me stuff to 
think about anyway.
leveraging a Db for image storage can have advantages but 
implementing it correctly
takes a stack more knowledge and more work to do it correctly, 
therefore the recommendation
for those starting out in php should, I feel, remain 'use the 
filesystem' - if only
because understanding and using the filesystem properly is one of 
the foundations

of the craft. no?


For beginners, I would have to agree because, as you said, they 
already have already been exposed to the concept of the "file system".


But, at some point (and I forgot to mention this in my previous post) 
all programmers start thinking in collections of data and a dB 
becomes a well suited solution (record holder and organizer) for 
that. As such, all data connected to a record, including images, are 
"better" suited if organized and saved in one place.


With regard to problems in display, speed, storage, and such -- those 
are just the temporary growing pains of the industry and will pass. 
Remember Gopher?  The Internet has come a long way since then. I 
suspect that in five-ten years, people will arguing "You still use 
the file system for storing those?"


with regard to the refresh issues I believe this can be dealt with 
by outputting

correct last-modified headers with the image data (which can also be
stored in the DB ;-)


Interesting -- but, I had problems with different browsers -- some 
worked and some didn't. So, I resorted to the "file system" for the 
storage for both thumbnail and normal size images. I was spending too 
much time trying to fix it for all main browsers, so I took the 
easy-way out. It works (I think) see:


http://ancientstones.com

At least I put it up for review in css and through BrowserCam.

with regard to increasing speed: what I often end up doing, mostly 
because I allow

dynamic resizing of images (i.e. the thumbnail and the 'large' image come
from a single stored source) is to use a memory based cache where previously
outputted images are stored for as long as possible (i.e. until the 
source changes

or the server is restarted or the cache is full or whatever).


I did the same thing including merging a copyright on the image. I 
believe that saving all related data in a dB is really the "right" 
way to go. From there, you can do anything you want with the data.


tedd
--

http://sperling.com

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



Re: [PHP] Sending a lot of data to remote site

2006-05-12 Thread tedd

Would appreciate all comments.

Thanks!
Ryan



Ryan:

How about zipping the array and sending that?

This look interesting:

http://www.weberdev.com/get_example-4066.html

hth's

tedd

--

http://sperling.com

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



Re: [PHP] Parsing images

2006-05-12 Thread David Tulloh
Robert Cummings wrote:
> On Thu, 2006-05-11 at 13:48, tedd wrote:
> 
>>At 12:11 PM -0400 5/11/06, Robert Cummings wrote:
>>
>>>On Thu, 2006-05-11 at 11:47, tedd wrote:
>>>
 At 9:28 AM +0300 5/11/06, Dotan Cohen wrote:
 >Hey all, it is possible to parse capcha's in php? I'm not asking how
 >to do it, nor have I any need, it's just something that I was
 >discussing with a friend. My stand was that ImageMagik could crack
 >them. She says no way. What are your opinions?
 >
 >Thanks.
 >
 >Dotan Cohen
 >http://what-is-what.com

>>>
>>> > Of course -- it's trivial.
>>>
 All images can be broken down into signals and analyzed as such. If
 you have any coherent data, it will show up. If it has to conform to
 glyphs, it most certainly can be identified.

 You want something that's not trivial, take a look at medical imaging
 and analysis thereof.
>>>
>>>Extracting passcodes from captcha text is not what I'd call trivial.
>>>It's one thing to pull trends out of an image, it's quite another to
>>>know that a curvy line is the morphed vertical base of the capital
>>>letter T. Similarly knowing that the intensity of red in an area is
>>>related to the existence of some radioacive tracer agent, isn't quite
>>>the same as knowing that the curvy letter T might be red, yellow, green,
>>>yellow blended to green,. etc etc. The human eye and brain are amazing
>>>accomplishments, and while someday we may match their ability in code, I
>>>don't think it's this year.
>>
>>We've been doing edge detection, noise suppression, data analysis, 
>>and OCR for over 30 years. While it may not be obvious, it's still 
>>trivial in the overall scheme of things. The bleeding edge is far 
>>beyond this technology.
> 
> 
> Edge detection, noise suppression, and data analysis don't quite equate
> to recognition. Also 30 years of OCR still requires that the sample be
> good quality and conform to fairly detectable patterns. If this is so
> trivial, I await the release of your captcha parser. The spammers would
> probably pay you millions for it. Where exactly is this bleeding edge,
> and where can I read more about it? I think you're quite wholeheartedly
> being naive about the complexity of visual recognition. Prove me wrong.

I also agree most are breakable.  I've done a very small amount of
character recognition processing and most of the captcha's I've seen
would be breakable.  The ones that look hard such as the bugs.php.net
captcha, I end up getting wrong about 1/3rd of the time.

There is a substantial difference between standard OCR and captcha
breaking.  With OCR you need to get it right 99% of the time, with a
captcha if you can get it one time in 1000 you can still get into a
website several times a second.

Really though, there are easier ways to do it.  My favorite story was a
small free porn site that required you to enter a captcha to get in.
They were taking the captcha's they needed to break and getting horny
teenagers to do the recognition phase for them.

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



Re: [PHP] Sending a lot of data to remote site

2006-05-12 Thread Ryan A
Hey Tedd,

> >Would appreciate all comments.
> >
> >Thanks!
> >Ryan
> 
> 
> Ryan:
> 
> How about zipping the array and sending that?
> 
> This look interesting:
> 
> http://www.weberdev.com/get_example-4066.html
> 
> hth's

I dont know if I can use that because I have no idea
if the remote client machines will have the necessary
addon to unzip it but none the less, that helps as its
a real good link to a really great way to use PHP to
zip files... have bookmarked it!

Thanks!
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
-
Fight back spam! Download the Blue Frog.
http://www.bluesecurity.com/register/s?user=bXVzaWNndTc%3D

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] Re: SimpleXML is creating nodes when it shouldn't...

2006-05-12 Thread D. Dante Lorenso

Marcus Boerger wrote:

I think that's a bug and not a feature.  Why was this changed?


It is called write support. I think we are going to add a flag
so that one can specify whether write support is enabled or not.
  


Creating data without using '=' assignment or calling a function is 
scary and somewhat 'magical' behavior.  When I 'read' from a SimpleXML 
node and cast that read into an array context, I NEVER expect to 
actually create an array on the object I am reading from.  If I do a SET 
(__set), I'd be ok with the magical behavior:


   $xmlstr = "1";
   $xml = simplexml_load_string($xmlstr);
   $xml->nonexist = array();

But if I'm doing a GET, changing the structure of the object is very bad:

   foreach ($xml->nonexist2 as $nonexist2) {
   }

Adding a flag is fine and all, but I definitely don't want that flag to be 
inside an INI file.  We don't need yet another flag which causes the language 
to behave differently under different circumstances.  Can't you distinguish 
between __get and __set on the object and handle it differently that way?  If 
not, the flag needs to somehow be set in code and not in an INI file with the 
default behavior to be NO, do not enable write support.  This is a bad break in 
BC from such a minor version upgrade of 5.1.2 to 5.1.4.

Dante

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



Re: [PHP] Paged Results Set in MySQL DB with one result

2006-05-12 Thread tedd

At 5:06 PM -0500 5/11/06, Richard Lynch wrote:



I believe the OP wanted "Three":

Show only as much text as nicely fits in the browser, with "more" for
the next page...



Try this:

http://xn--ovg.com/ajax_page1

Please understand: a) It's a rough estimation as to how many 
characters will fit; b) It doesn't handle zoom levels well yet; c) 
There will be variations between browsers and OS's --  but the 
solution is within reach.


tedd


--

http://sperling.com

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



Re: [PHP] Parsing images

2006-05-12 Thread Robert Cummings
On Fri, 2006-05-12 at 08:37, tedd wrote:
> On Thu, May 11, 2006 1:03 pm, Robert Cummings wrote:
> >  Edge detection, noise suppression, and data analysis don't quite
> >  equate
> >  to recognition. Also 30 years of OCR still requires that the sample be
> >  good quality and conform to fairly detectable patterns. If this is so
> >  trivial, I await the release of your captcha parser. The spammers
> >  would
> >  probably pay you millions for it. Where exactly is this bleeding edge,
> >  and where can I read more about it? I think you're quite
> >  wholeheartedly
> >  being naive about the complexity of visual recognition. Prove me
> >  wrong.
> 
> If you had millions, I would prove you wrong. But, in the meantime I 
> have other stuff to do.
>
> The original poster asked the question -- can it be done. And of 
> course, the answer is Yes.

Yes "it can be done". No, it's not trivial in the general.

> Visual recognition in its entirety is not what we are talking about 
> here. Instead, we are talking about a very specific and limited 
> problem of how a program can detect known characters in noise -- that 
> -- are also detectable by humans.

Visial recognition is what we are talking about when you say it's
trivial and can be done easily. Because visual recognition is the
necessary branch of analysis required to be able to analyse any captcha
and come up with the answer.

> Granted, the more complex the image, the more difficult for a program 
> to decipher it, but a CAPTCHA has to be, by definition, detectable by 
> a visually unimpaired human.

And you're making what point here? That you can write code to match the
capabilities of a visually unimpaired human's visual processing and
recognition? Wow!!

> Image analysis, enhancement, alteration, and such are better 
> performed by computers than by humans -- that's the reason we 
> developed the software in the first place.

WRONG! A small subset of these are better performed by computers. And in
almost every case, the computer's results are checked by humans
afterwards. Most computers just flag things as interesting, then a human
goes and makes the executive decision.

> The step between analysis and detection is simply meeting an 
> acceptable error threshold.

Maybe so, and I guess if you considering .0001 success rate ok, then
writing a captcha breaker might be trivial since you can probably just
generate a random string.

> However, the reasons why CAPTCHA's still work is that the time 
> required to do the analysis could be better spent elsewhere by 
> spammers.

When spammers do come around to generically detecting simple captchas
you can be sure the more complex captchas will increase in frequency.

> As for me being naive -- well... either one of us could be -- but 
> that's probably what I get for working in signal analysis (seismic 
> data) since 1975.

Someone once posted the following to the list, I feel it appropriate to
quote it at this time:

"Locus ab auctoritate est infirmissimus"

> As for the bleeding edge, that's obvious, just look to medical 
> imaging. They wish that the detection of their problems were as 
> simple as CAPTCHA.

Just because they may wish they were detecting something simpler such as
captcha (maybe, since I could render my captcha to look like medical
imagery and so it would be just as difficult to detect), doesn't mean
captcha is trivial. I'm not currently aware of too much medical imaging
processing that occurs without human intervention. Much of it requires
that a human view the results and make an informed decision based on the
computers analysis. I think part of your naivety is thinking that the
captcha you see right now is as hard as it gets. You are very mistaken.

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] Parsing images

2006-05-12 Thread Robert Cummings
On Fri, 2006-05-12 at 09:47, David Tulloh wrote:
> Robert Cummings wrote:
> > On Thu, 2006-05-11 at 13:48, tedd wrote:
> > 
> >>At 12:11 PM -0400 5/11/06, Robert Cummings wrote:
> >>
> >>>On Thu, 2006-05-11 at 11:47, tedd wrote:
> >>>
>  At 9:28 AM +0300 5/11/06, Dotan Cohen wrote:
>  >Hey all, it is possible to parse capcha's in php? I'm not asking how
>  >to do it, nor have I any need, it's just something that I was
>  >discussing with a friend. My stand was that ImageMagik could crack
>  >them. She says no way. What are your opinions?
>  >
>  >Thanks.
>  >
>  >Dotan Cohen
>  >http://what-is-what.com
> 
> >>>
> >>> > Of course -- it's trivial.
> >>>
>  All images can be broken down into signals and analyzed as such. If
>  you have any coherent data, it will show up. If it has to conform to
>  glyphs, it most certainly can be identified.
> 
>  You want something that's not trivial, take a look at medical imaging
>  and analysis thereof.
> >>>
> >>>Extracting passcodes from captcha text is not what I'd call trivial.
> >>>It's one thing to pull trends out of an image, it's quite another to
> >>>know that a curvy line is the morphed vertical base of the capital
> >>>letter T. Similarly knowing that the intensity of red in an area is
> >>>related to the existence of some radioacive tracer agent, isn't quite
> >>>the same as knowing that the curvy letter T might be red, yellow, green,
> >>>yellow blended to green,. etc etc. The human eye and brain are amazing
> >>>accomplishments, and while someday we may match their ability in code, I
> >>>don't think it's this year.
> >>
> >>We've been doing edge detection, noise suppression, data analysis, 
> >>and OCR for over 30 years. While it may not be obvious, it's still 
> >>trivial in the overall scheme of things. The bleeding edge is far 
> >>beyond this technology.
> > 
> > 
> > Edge detection, noise suppression, and data analysis don't quite equate
> > to recognition. Also 30 years of OCR still requires that the sample be
> > good quality and conform to fairly detectable patterns. If this is so
> > trivial, I await the release of your captcha parser. The spammers would
> > probably pay you millions for it. Where exactly is this bleeding edge,
> > and where can I read more about it? I think you're quite wholeheartedly
> > being naive about the complexity of visual recognition. Prove me wrong.
> 
> I also agree most are breakable.  I've done a very small amount of

Trivially breakable?? I'm not arguing breakability, I'm arguing against
"trivial".

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] Paged Results Set in MySQL DB with one result

2006-05-12 Thread Porpoise


"tedd" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]




Try this:

http://xn--ovg.com/ajax_page1

Please understand: a) It's a rough estimation as to how many characters 
will fit; b) It doesn't handle zoom levels well yet; c) There will be 
variations between browsers and OS's --  but the solution is within reach.




Eerrrm... Blank Page!?! 


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



[PHP] Class/function scope general question

2006-05-12 Thread Edward Vermillion
I'm doing some re-writing of a huge class I've got (don't think OOP  
cause it's really not, just the usual class full of functions). What  
I'm doing is moving the functions out of the class and into separate  
files so the (I'm hoping) memory footprint will be smaller.


The basic setup I started with is:

class foo {

function doSomething()
{
switch($var) {
case '1':
$this->bar();
break;
case '2':
$this->baz();
break;
}
}

function bar(){ // do something useful }

function baz(){ // do something else useful }

[...]
}

I've moved bar() and baz() into their own file and am now including  
those files from the original functions as so:


class foo {

function doSomething()
{
switch($var) {
case '1':
$this->bar();
break;
case '2':
$this->baz();
break;
}
}

function bar(){ include_once 'bar.php'; newBar(); }

function baz(){ include_once 'baz.php'; newBaz(); }

[...]
}

where newBar() and newBaz() are just the functions copied from the  
original class like


bar.php
Sort of unexpected behavior to me, but only slightly. Shouldn't the  
newBar() function pick up the scope from foo::bar() since, as I  
understand includes, it's the same as writing the code in the file  
where the include statement is at?


Outside of newBar() in bar.php var_dump($this) gives me the foo class.

Is it because there is basically a function within a function at this  
point and somehow the scope of $this is being lost? I would have  
thought that it would carry down, but obviously I'm wrong.


Not looking for a fix really, I'm passing in a reference to $this to  
newBar() so it's all cool there, just looking for an explanation to  
have for future reference.


PHP4.4.2 btw... if that makes any difference.

Thanks!
Ed

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



Re: [PHP] Paged Results Set in MySQL DB with one result

2006-05-12 Thread Mike

I am not seeing a blank page here.

Porpoise wrote:


"tedd" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]




Try this:

http://xn--ovg.com/ajax_page1

Please understand: a) It's a rough estimation as to how many 
characters will fit; b) It doesn't handle zoom levels well yet; c) 
There will be variations between browsers and OS's --  but the 
solution is within reach.




Eerrrm... Blank Page!?!


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



Re: [PHP] Paged Results Set in MySQL DB with one result

2006-05-12 Thread tedd

At 6:03 PM +0100 5/12/06, Porpoise wrote:
"tedd" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]




Try this:

http://xn--ovg.com/ajax_page1

Please understand: a) It's a rough estimation as to how many 
characters will fit; b) It doesn't handle zoom levels well yet; c) 
There will be variations between browsers and OS's --  but the 
solution is within reach.




Eerrrm... Blank Page!?!


It shouldn't be blank.

There should be a Next/Previous button -- isn't there?

If so, then click "Next"

If not, please tell me.

Thanks.

tedd
--

http://sperling.com

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



Re: [PHP] Paged Results Set in MySQL DB with one result

2006-05-12 Thread Brad Bonkoski

In Exploder 7 beta 2 I actually get an access denied error...
but works in firefox.

Mike wrote:


I am not seeing a blank page here.

Porpoise wrote:



"tedd" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]




Try this:

http://xn--ovg.com/ajax_page1

Please understand: a) It's a rough estimation as to how many 
characters will fit; b) It doesn't handle zoom levels well yet; c) 
There will be variations between browsers and OS's --  but the 
solution is within reach.




Eerrrm... Blank Page!?!





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



Re: [PHP] Class/function scope general question

2006-05-12 Thread Martin Alterisio

2006/5/12, Edward Vermillion <[EMAIL PROTECTED]>:


I'm doing some re-writing of a huge class I've got (don't think OOP
cause it's really not, just the usual class full of functions). What
I'm doing is moving the functions out of the class and into separate
files so the (I'm hoping) memory footprint will be smaller.

The basic setup I started with is:

class foo {

function doSomething()
{
switch($var) {
case '1':
$this->bar();
break;
case '2':
$this->baz();
break;
}
}

function bar(){ // do something useful }

function baz(){ // do something else useful }

[...]
}

I've moved bar() and baz() into their own file and am now including
those files from the original functions as so:

class foo {

function doSomething()
{
switch($var) {
case '1':
$this->bar();
break;
case '2':
$this->baz();
break;
}
}

function bar(){ include_once 'bar.php'; newBar(); }

function baz(){ include_once ' baz.php'; newBaz(); }

[...]
}

where newBar() and newBaz() are just the functions copied from the
original class like

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



When you call a function in the global scope from inside a member function
you're leaving the object scope, that's why this is null in the global
function


Re: [PHP] Class/function scope general question

2006-05-12 Thread Edward Vermillion


On May 12, 2006, at 1:09 PM, Martin Alterisio wrote:


[snip]


When you call a function in the global scope from inside a member  
function you're leaving the object scope, that's why this is null  
in the global function


But my thought is that since the include was from inside the member  
function that the included function would be in the scope of the  
member function, and not global. (?)


So if I have:

class foo {

function bar()
{
function baz(){}
}
}

Would baz() be out of class scope here? Or are includes automatically  
global no matter where they are called? Or is it the convoluted  
manner in which I'm getting to baz() that's causing this?


Thanks!
Ed

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



Re: [PHP] Paged Results Set in MySQL DB with one result

2006-05-12 Thread Joe Henry
On Friday 12 May 2006 12:01 pm, tedd wrote:

> It shouldn't be blank.
> There should be a Next/Previous button -- isn't there?
> If so, then click "Next"
> If not, please tell me.

Works:  Suse Linux 10.x/Firefox 1.0.7
Windows XP/Firefox 1.5.0.3
Mac OS 10.4.6/Safari 2.0.3

Works sort of:  Suse Linux 10.x/Konquerer 3.4.2 
=>  (first page loads but 
next/previous buttons produce no results)
Windows XP/Internet Explorer 6.0.x
=>  (first page loads but 
next/previous buttons produce no results)

Blank:  none that I tested

Don't have Firefox on the Mac box. I just clicked the next/previous buttons a 
few times, so take it for what's it's worth.

Thanks to you Tedd. Made me realize I should upgrade my Linux Firefox.

HTHs.
-- 
Joe Henry
www.celebrityaccess.com
[EMAIL PROTECTED]

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



[PHP] PHP SRM, a dead project?

2006-05-12 Thread D. Dante Lorenso

All,

I'm interested in a PHP application server that is non-webserver based 
which I can run on Linux.  I was hoping for something like:


   * http://www.vl-srm.net/index.php

Does anyone know about this project?  It appears to be dead.  Hasn't 
been updated in a couple years.  Is there a better project that has 
evolved to take it's place?


Dante

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



RE: [PHP] Paged Results Set in MySQL DB with one result

2006-05-12 Thread Chris W. Parker
tedd 
on Friday, May 12, 2006 11:01 AM said:

> At 6:03 PM +0100 5/12/06, Porpoise wrote:
>> "tedd" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> 
>>> 
>>> Try this:
>>> 
>>> http://xn--ovg.com/ajax_page1
>>> 

>> Eerrrm... Blank Page!?!
> 
> It shouldn't be blank.
> 
> There should be a Next/Previous button -- isn't there?
> 
> If so, then click "Next"
> 
> If not, please tell me.

I got a blank page too. Had to click "Next" before any content would
appear.

Fx 1.5.0.3 on Windows 2000


Chris.

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



Re: [PHP] Class/function scope general question

2006-05-12 Thread Stut

Edward Vermillion wrote:
But my thought is that since the include was from inside the member 
function that the included function would be in the scope of the member 
function, and not global. (?)


So if I have:

class foo {

function bar()
{
function baz(){}
}
}

Would baz() be out of class scope here? Or are includes automatically 
global no matter where they are called? Or is it the convoluted manner 
in which I'm getting to baz() that's causing this?


Scope is your issue here. Functions and classes defined in included 
files are registered at the global level. Therefore within your include 
file you do not have a $this because your function is actually defined 
outside the class.


The example you give above I'm not so sure about. I believe baz() 
wouldn't have a $this variable, but stick some code in it to check.


-Stut

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



Re: [PHP] Class/function scope general question

2006-05-12 Thread Martin Alterisio

2006/5/12, Edward Vermillion <[EMAIL PROTECTED]>:



On May 12, 2006, at 1:09 PM, Martin Alterisio wrote:

class foo {

function bar()
{
function baz(){}
}
}



baz() will be a global function there.
There are other ways to add member functions at runtime but I haven't had
the chance to properly used to them to say they are safe or not.


Re: [PHP] Parsing images

2006-05-12 Thread tedd

At 1:01 PM -0400 5/12/06, Robert Cummings wrote:

 > The original poster asked the question -- can it be done. And of

 course, the answer is Yes.


Yes "it can be done". No, it's not trivial in the general.


Well... generally it's of little value to me. :-)


Visial recognition is what we are talking about when you say it's
trivial and can be done easily. Because visual recognition is the
necessary branch of analysis required to be able to analyse any captcha
and come up with the answer.


I say it's trivial because it's not important. I also say it's 
trivial because what I have seen and worked on makes it pale in 
comparison.



 Granted, the more complex the image, the more difficult for a program
 to decipher it, but a CAPTCHA has to be, by definition, detectable by
 a visually unimpaired human.



And you're making what point here? That you can write code to match the
capabilities of a visually unimpaired human's visual processing and
recognition? Wow!!


No the point I am making here is that CAPTCHA is used weed out bots 
from persons who ARE NOT visually impaired -- and thus, the objection 
to it's use because CAPTCHA is a device that goes against the ADA and 
all those who care about access for persons with visual disabilities.


As for visual processing, we do have screen readers -- they do work. 
You say otherwise?


Could I write that software? Yes I could. I even wrote a Macintosh 
blind browser that would capture the content of a web page and read 
it aloud -- however -- that was not image recognition, but rather 
text to speech processing. Have I written tools to analyze signals 
and detect anomalies? Yes. Have I written AI programs? Yes. But, 
what's the point here? It isn't IF I could do it, but rather IF it 
can be done -- and it HAS been done.


The only issue you are arguing here is IF it is trivial or not. I say 
it's trivial and you say otherwise. Okay, you're entitled to your 
opinion -- as am I. Everyone has the right to be wrong. :-)



 > Image analysis, enhancement, alteration, and such are better

 performed by computers than by humans -- that's the reason we
 developed the software in the first place.


WRONG! A small subset of these are better performed by computers.


Bull--toot!

You say that you're better than PhotoShop at doing frequency 
analysis, bright/contrast, color levels and such -- now that's funny. 
I know you didn't actually mean that.



And in
almost every case, the computer's results are checked by humans
afterwards. Most computers just flag things as interesting, then a human
goes and makes the executive decision.


As it should be -- BUT -- the computer is still making a decision to 
show something, is it not? It's still a conditional outcome, right? 
It flags stuff for a reason.



 > The step between analysis and detection is simply meeting an

 acceptable error threshold.


Maybe so, and I guess if you considering .0001 success rate ok, then
writing a captcha breaker might be trivial since you can probably just
generate a random string.


It's all relative, isn't it? Like my success rate at winning an 
argument with my wife, that figure you gave above would be pretty 
high for that. :-)



 > As for me being naive -- well... either one of us could be -- but

 that's probably what I get for working in signal analysis (seismic
 data) since 1975.


Someone once posted the following to the list, I feel it appropriate to
quote it at this time:

"Locus ab auctoritate est infirmissimus"


LOL -- You got me on that one!  I almost posted that quote as a 
framework for me using my "authoritative argument". I hate it when my 
words come back to bite me in the butt.


But, in my defense, 31 years of working with signals (granted, it 
long enough ago that the first ones were smoke), has given me a 
perspective that everything can be distilled down to components and 
those components can be analyzed.


And from that analysis, one can make a more informed "final" 
decision. However, you must also realize that the computer (via the 
programmer) has helped you arrive at the final decision -- and that 
took countless smaller decisions. It's not that much different than 
programming.


I gave a talk one time for the AAPG regarding AI in the Geosciences 
and someone asked me to provide an example of a computer being 
smarter than me. I answered that many times I have been able to 
research and write a routine that would record what I learned about a 
specific algorithm at that point in my life (my apex of knowledge for 
that subject).


After writing the routine, I could then dummy-up and go on about my 
life researching other routines in similar fashion. However, my 
routines would retain the apex of my knowledge about a specific topic 
and if I placed two of these routines in concert to generate an 
outcome, then the outcome would surpass what I could have done. In 
that fashion, my computer generated intelligence surpassing my own. 
Granted, some say that a comp

Re: [PHP] Paged Results Set in MySQL DB with one result

2006-05-12 Thread tedd

At 2:08 PM -0400 5/12/06, Brad Bonkoski wrote:

In Exploder 7 beta 2 I actually get an access denied error...
but works in firefox.


I think that's my server.

Ajax is strange -- the requests are not sequential. In other words, 
if you click next twice, you may end up with the first click 
appearing second.


Also, I'm having problems calling a refresh routine that should work.

But, if anything is going to fail, it's IE's.

I probably could run down the problem in IE7 and place a IE 
conditional to circumvent the problem.


tedd
--

http://sperling.com

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



RE: [PHP] Paged Results Set in MySQL DB with one result

2006-05-12 Thread tedd

At 11:51 AM -0700 5/12/06, Chris W. Parker wrote:

tedd 
on Friday, May 12, 2006 11:01 AM said:


 At 6:03 PM +0100 5/12/06, Porpoise wrote:

 "tedd" <[EMAIL PROTECTED]> wrote in message
 news:[EMAIL PROTECTED]



 Try this:

 http://xn--ovg.com/ajax_page1




 Eerrrm... Blank Page!?!


 It shouldn't be blank.

 There should be a Next/Previous button -- isn't there?

 If so, then click "Next"

 If not, please tell me.


I got a blank page too. Had to click "Next" before any content would
appear.

Fx 1.5.0.3 on Windows 2000

Chris.


That's as it should be -- and technically, "Next" did appear so the 
page wasn't blank.


I probably should put up a "Introduction" page, which would tell 
people to "click something", but this was just a test. If it had been 
a production "open to the world" thing, then I would have written it 
for civilians.


tedd
--

http://sperling.com

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



Re: [PHP] Parsing images

2006-05-12 Thread Robert Cummings
On Fri, 2006-05-12 at 15:11, tedd wrote:
> At 1:01 PM -0400 5/12/06, Robert Cummings wrote:
> >  > The original poster asked the question -- can it be done. And of
> >>  course, the answer is Yes.
>
> >Just because they may wish they were detecting something simpler such as
> >captcha (maybe, since I could render my captcha to look like medical
> >imagery and so it would be just as difficult to detect), doesn't mean
> >captcha is trivial. I'm not currently aware of too much medical imaging
> >processing that occurs without human intervention. Much of it requires
> >that a human view the results and make an informed decision based on the
> >computers analysis. I think part of your naivety is thinking that the
> >captcha you see right now is as hard as it gets. You are very mistaken.
> 
> Mistaken? I've been there before -- and will be again. But, you still 
> haven't persuaded me that deciphering a CAPTCHA ranks in any fashion 
> whatsoever to the problems that computers are currently solving. It's 
> still a trivial problem.

I think you've changed the grounds of the argument. The problem is
fairly trivial in comparison to more important problems. But
implementing the solution is not trivial. When you first made the
trivial comment, you made it sound as though you could whip up a generic
captcha cracking program over the weekend... which is unlikely ;) When
it comes down to it, medical image processing and captcha fall under the
same problem category.

> Thanks for the exchange.

You're welcome :)

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



[PHP] Back arrow button

2006-05-12 Thread Sugrue, Sean
Does anyone know how to launch a new page with having the back arrow
button grayed out?

Sean

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



Re: [PHP] Class/function scope general question

2006-05-12 Thread Edward Vermillion


On May 12, 2006, at 1:55 PM, Stut wrote:


Edward Vermillion wrote:
But my thought is that since the include was from inside the  
member function that the included function would be in the scope  
of the member function, and not global. (?)

So if I have:
class foo {
function bar()
{
function baz(){}
}
}
Would baz() be out of class scope here? Or are includes  
automatically global no matter where they are called? Or is it the  
convoluted manner in which I'm getting to baz() that's causing this?


Scope is your issue here. Functions and classes defined in included  
files are registered at the global level. Therefore within your  
include file you do not have a $this because your function is  
actually defined outside the class.




Thanks! I didn't know that, and it's a good piece of info to have.

The example you give above I'm not so sure about. I believe baz()  
wouldn't have a $this variable, but stick some code in it to check.


Hopefully I'll never have to do anything that ridiculous (the  
example), at least it seems so now. Although I am doing sort of the  
same thing. Hopefully this is just an intermediate step (including  
functions with an include() in a class method) to the proper solution  
for my problem (it just seems wrong but I need something that will  
work for now).


Like I said, it wasn't a big surprise that I had to pass in a  
reference to the foo class, but it did make me wonder why.


Thanks for all the help!
Ed

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



Re: [PHP] Paged Results Set in MySQL DB with one result

2006-05-12 Thread Porpoise


"tedd" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

At 6:03 PM +0100 5/12/06, Porpoise wrote:




Eerrrm... Blank Page!?!


It shouldn't be blank.

There should be a Next/Previous button -- isn't there?

If so, then click "Next"

If not, please tell me.


Err. Well, yes the Previous/Next buttons are there.. but there's no 
data. Clicking "Next" doesn't achieve anything AFAICS 


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



[PHP] Issues with upgrade to PHP 4.4.1

2006-05-12 Thread Chris Bruce
I have a dedicated server and my host just did an upgrade of PHP to  
4.4.1. This has caused a couple of major errors and I wanted to share  
them to see if anyone has any answers or has experienced similar  
problems.


1. imap functions are not working correctly. Specifically calling it  
thus:


imap_open({domain.ca:110/pop3},"mailbox","password") gives the  
following error:


Certificate failure for domain.ca: self signed certificate: /C=--/ 
ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/ 
CN=localhost.localdomain/[EMAIL PROTECTED]


if I add "notls" after pop3 "domain.ca:110/pop3/notls", imap_open  
works, but the script fails on the subsequent call to  
imap_fetchstructure.


This was working flawlessly prior to the upgrade to 4.4.1. Here is  
the configure command:
'./configure' '--prefix=/usr/local' '--with-config-file-path=/etc' '-- 
with-mysql=/usr/local/mysql' '--enable-ftp' '--enable-bcmath' '-- 
disable-debug' '--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir=/ 
usr/local' '--with-ttf' '--with-freetype-dir=/usr/local/freetype2' '-- 
with-zlib' '--with-zlib-dir=/usr' '--with-imap=/usr' '--with-imap- 
ssl' '--with-kerberos' '--with-apache=../apache_1.3.34' '--enable- 
bcmath' '--with-curl=/usr' '--with-pear' '--enable-ftp' '--enable- 
calendar' '--enable-memory-limit' '--enable-magic-quotes' '--enable- 
wddx' '--with-mhash=/ usr/local/mhash' '--with-openssl-dir=/usr/local/ 
ssl' '--with-openssl=/usr/local/ssl' '--enable-mbstring' '--with- 
mcrypt=/usr/local'


My concern here is the "with-imap-ssl". I don't want to use TLS, but  
as above, disabling it causes the script to die.


I have noticed that my host seems to have dropped the build in from  
another server as the build date is from October 2005.


Anyone have any ideas?

2. Using the setcookie() function, I am not able to set an expiry for  
the cookie to anything less than 3603 seconds. 3602 or less does not  
work. Is this a documented bug?


Thanks,

Chris

Re: [PHP] Back arrow button

2006-05-12 Thread Brad Bonkoski

Not really a PHP question...

But, since it is Friday ;-)
As our friend Google:
http://www.google.com/search?hl=en&q=Javascript+disable+back+button

HTH
-Brad

Sugrue, Sean wrote:


Does anyone know how to launch a new page with having the back arrow
button grayed out?

Sean

 



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



Re: [PHP] Parsing images

2006-05-12 Thread tedd

I think you've changed the grounds of the argument.



Me??? Would I do that? Not unless I was losing the argument. :-)


The problem is
fairly trivial in comparison to more important problems.


That's basically what I meant.


But implementing the solution is not trivial. When you first made the
trivial comment, you made it sound as though you could whip up a generic
captcha cracking program over the weekend... which is unlikely ;)


Yeah, but you don't know what a programming dynamo I can be. But then 
again, we could argue over how long a week-end is -- next to a black 
hole it could be pretty long.


In any event, I'll think about it.

tedd
--

http://sperling.com

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



[PHP] php.dev, network timeout??

2006-05-12 Thread Jon
This isn't strictly a php question.  Its actually a question about the 
mailing lists in general.  I know I must be doing something really 
stupid but I seem to be having a lot of problems with network timeouts 
while browsing the mailing lists.  The dev mailing list is the worst as 
I have yet to successfully make a connection there.  Can anyone give me 
some good advice on how to fix this problem?  I'm using thunderbird to 
browse.


Thanks in advance,
~jon

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



Re: [PHP] Re: SimpleXML is creating nodes when it shouldn't...

2006-05-12 Thread Marcus Boerger
Hello D.,

  SimpleXML was never ever designed to have methods. If you prefer methods
then you probably might be better with xmlReader or Dom. Either way i *may*
do something about it. Right now it perfectly fits my needs :-)

best regards
marcus

Friday, May 12, 2006, 5:42:23 PM, you wrote:

> Marcus Boerger wrote:
>>> I think that's a bug and not a feature.  Why was this changed?
>>> 
>> It is called write support. I think we are going to add a flag
>> so that one can specify whether write support is enabled or not.
>>   

> Creating data without using '=' assignment or calling a function is 
> scary and somewhat 'magical' behavior.  When I 'read' from a SimpleXML 
> node and cast that read into an array context, I NEVER expect to 
> actually create an array on the object I am reading from.  If I do a SET 
> (__set), I'd be ok with the magical behavior:

> $xmlstr = "1";
> $xml = simplexml_load_string($xmlstr);
> $xml->nonexist = array();

> But if I'm doing a GET, changing the structure of the object is very bad:

> foreach ($xml->nonexist2 as $nonexist2) {
> }

> Adding a flag is fine and all, but I definitely don't want that flag to
> be inside an INI file.  We don't need yet another flag which causes the
> language to behave differently under different circumstances.  Can't you
> distinguish between __get and __set on the object and handle it
> differently that way?  If not, the flag needs to somehow be set in code
> and not in an INI file with the default behavior to be NO, do not enable
> write support.  This is a bad break in BC from such a minor version upgrade 
> of 5.1.2 to 5.1.4.

> Dante






-- 
Best regards,
 Marcusmailto:[EMAIL PROTECTED]

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



Re: [PHP] php.dev, network timeout??

2006-05-12 Thread chris smith

On 5/13/06, Jon <[EMAIL PROTECTED]> wrote:

This isn't strictly a php question.  Its actually a question about the
mailing lists in general.  I know I must be doing something really
stupid but I seem to be having a lot of problems with network timeouts
while browsing the mailing lists.  The dev mailing list is the worst as
I have yet to successfully make a connection there.  Can anyone give me
some good advice on how to fix this problem?  I'm using thunderbird to
browse.


If you're using thunderbird that means you're using the news groups yes?

Are you using news.php.net or your local isp's mirror copy?

--
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] php.dev, network timeout??

2006-05-12 Thread Jon

chris smith wrote:

On 5/13/06, Jon <[EMAIL PROTECTED]> wrote:

This isn't strictly a php question.  Its actually a question about the
mailing lists in general.  I know I must be doing something really
stupid but I seem to be having a lot of problems with network timeouts
while browsing the mailing lists.  The dev mailing list is the worst as
I have yet to successfully make a connection there.  Can anyone give me
some good advice on how to fix this problem?  I'm using thunderbird to
browse.


If you're using thunderbird that means you're using the news groups yes?

Are you using news.php.net or your local isp's mirror copy?



According to my thunderbird configuration I am using news.php.net.  As 
far as I know our office's ISP does not have any sort of transparent 
cache or proxy for newsgroups, however I am having someone try to verify 
that for me.  The connection difficulties I'm having with news.php.net 
are far out of proportion to any of the minor difficulties I have 
experienced with other external network services.


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



[PHP] LDAP Authentication

2006-05-12 Thread Thomas Bonham

Hello,

I'm trying to do a ldap authentication page. I can get there username 
and I don't know how to get the password from ldap. It didn't show up in 
the the search for the command line. So how do I get the password of the 
users?


Thomas

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



[PHP] Re: PHP/Dreamweaver CSS issue

2006-05-12 Thread Jon

The Doctor wrote:

I am trying to modularize a Web Page using one of Dremweaver's CSSes.

It works in Firefox but it falls about in IE.

Is IE at fault or the modularization?



It is neither Firefox's fault nor the concept of modularization.  The 
fault is probably 55% IE's and 45% dreamweaver's.  Both of these 
programs suck and were written by people who neither know about or care 
about good web page style modularization using CSS.


I recommend ditching Dreamweaver and dusting off a plain text editor and 
reading this book: http://www.zeldman.com/dwws/


After you understand the concepts involved, the web has a plethora of 
workarounds for IE's gross misbehavior that will neither violate the 
standards nor the intention behind them.


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



Re: [PHP] PHP SRM, a dead project?

2006-05-12 Thread Kevin Waterson
This one time, at band camp, "D. Dante Lorenso" <[EMAIL PROTECTED]> wrote:

> All,
> 
> I'm interested in a PHP application server that is non-webserver based 
> which I can run on Linux.  I was hoping for something like:
> 
> * http://www.vl-srm.net/index.php

Bananas rule my world. The project is a child of Derick Rethans and while it 
limps
along is not quite dead. The site has not been updated for zonks but the SRM 
code
gets attention sometimes.

What is it you were requiring?

Kind regards
Kevin

-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

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



[PHP] Re: phpEditIni has moved to phpeditini.net

2006-05-12 Thread Jeremy C O'Connor

"Barry" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jeremy C O'Connor schrieb:
> > The new browser based editor of PHP.INI files on Windows, phpEditIni,
has
> > moved to a new site: http://phpeditini.net Download it today!
> >
> > --
> > info at phpeditini dot net
> Not interesting though since it only works on Windows.
>

Since it is a GPL project, the idea is that folks out there can modify it
for Linux/*nix and contribute the code back to the project. If anyone wants
to do this, and gets a version for Linux/*nix up and running, they can email
me at [EMAIL PROTECTED] and I can put the script up on my site for
download (with your copyright as well).

> Uhm remember that most Webserevers are running with unix.
>

It is meant primarily for developers, who are running on Windows. (for the
moment).

> And you should remove those debug stuffs you left inside that file which
> you had commented out.
>

There is actually very little commented out code in the script.
--
Jeremy O'Connor
[EMAIL PROTECTED]

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



Re: [PHP] LDAP Authentication

2006-05-12 Thread Rory Browne

you're approaching this wrong - google for LDAP Authentication php, and see
how they do it

On 5/13/06, Thomas Bonham <[EMAIL PROTECTED]> wrote:


Hello,

I'm trying to do a ldap authentication page. I can get there username
and I don't know how to get the password from ldap. It didn't show up in
the the search for the command line. So how do I get the password of the
users?

Thomas

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