OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 11 May 2006 20:15:52 -0000 Issue 4122

php-general-digest-helplists.php.net
Date: Thu May 11 2006 - 15:15:52 CDT


php-general Digest 11 May 2006 20:15:52 -0000 Issue 4122

Topics (messages 235967 through 236016):

Re: Browser displays blank page, while request still being handled
        235967 by: Rolf Wouters
        235968 by: Rolf Wouters

Re: Parsing images
        235969 by: Dotan Cohen
        235979 by: Jochem Maas
        235988 by: tedd
        235996 by: Robert Cummings
        236000 by: Richard Lynch
        236006 by: tedd
        236009 by: Robert Cummings

extract text from pdf
        235970 by: cajbecu
        235971 by: George Pitcher
        235973 by: Rory Browne
        235978 by: João Cândido de Souza Neto
        235986 by: ray.hauge.americanstudentloan.com

Re: question about using temporary named pipe in the string for system
        235972 by: Robin Vickery

Re: php parsing and db content [RESOLVED]
        235974 by: Schalk Neethling
        235981 by: John Hicks

Re: Good Answers
        235975 by: Jay Blanchard
        236010 by: Richard Lynch
        236012 by: Micky Hulse
        236015 by: Wolf

Failing FastCGI PHP
        235976 by: Frank de Bot
        235977 by: chris smith

Re: getting $_GET params from iFrame window to parent
        235980 by: John Hicks
        235987 by: John Hicks
        236001 by: Richard Lynch

Another Shell Caught
        235982 by: Wolf
        236005 by: Chris W. Parker
        236008 by: Richard Lynch
        236013 by: Wolf

BDC to ASCII Conversion
        235983 by: Jay Blanchard
        235985 by: tedd
        235994 by: John Hicks
        235995 by: Jay Blanchard
        235997 by: Jim Moseby
        235998 by: Joe Henry
        236003 by: Jay Blanchard

Re: Paged Results Set in MySQL DB with one result
        235984 by: tedd
        235999 by: Richard Lynch
        236011 by: tedd

remove html tags in text?
        235989 by: Bing Du
        235990 by: Jim Moseby
        235991 by: Stut
        235993 by: Joe Henry
        236007 by: Jochem Maas
        236014 by: Dave Goodchild

Re: PHP URL query
        235992 by: tedd

Re: php parsing and db content
        236002 by: Richard Lynch

Re: Upload File (binary files?)
        236004 by: tedd

SMS E-Mail and other oddities
        236016 by: Jay Blanchard

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

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

attached mail follows:


> Others have mentioned that the browser timeout could be a problem. So
> I'm wondering if your script really was completing all the way, but
> the browser just gave up on waiting. Could you try a little test to
> take the spaces back out, and write the output of
> connection_status()
> http://us2.php.net/manual/en/function.connection-status.php
> to a file to see during each of the copies to see if the browser does
> go away?
Browser timeout was indeed mentioned as a possible problem. However,
I've tried prolonging those timeouts in Firefox, without result.

This little test of yours sounded like an interesting idea, so I took
the spaces back out, and wrote the output of connection_status() to a file.
For each of the 700 files I'm copying, I get connection_status() = 0,
which means the connection between browser and server is still alive.
> Just for my curiosity... do you know for a fact that the script didn't
> finish all the way before outputting data?
When the browser displays the blank page, the script is still running.
I've checked this by looking in my connection-file at the moment the
blank page pops up. At that time, only 600 of the expected 700 entries
are there. When I wait a little while (say a minute, or so) and look
again at the content of the file, all 700 entries are there, all showing
connection_status() = 0.
Previously I've checked this by examing the content of the destination
directory, which also showed me an incomplete result. Files were still
being copied to the destination, while the browser was displaying the
blank page.
> If you've spent too much time on this already that is fine, I was just
> curious for future reference. :)
I don't mind putting in some more time on this problem, and it would
satisfy my own curiousity to know what the problem exactly is. And like
I mentioned before, I know my solution is a really, really bad one, but
it works (for now :-s ).

attached mail follows:


Edward Vermillion wrote:
>
> On May 10, 2006, at 10:54 AM, Rolf Wouters wrote:
>
>> Yet another update.
>>
>> Strange thing happened. I fixed the problem... It's not a clean
>> solution, it's not the right solution, but for now, it'll (have to)
>> do :-)
>>
>> I changed my little test-script to include directives like
>> max_input_time, set_time_limit(0) etc. Than I thought, why not try
>> to generate some output when copying files!??! So I did... and you
>> know what, all of a sudden I'm seeing my response page every single
>> time I call my script :-D
>>
>> So our quick-n-dirty-but-we-know-its-wrong-solution is gonna be to
>> have the script generate some output (a single space) for each file
>> it has copied (i.e. print(" ")).
>> After testing it with the problem-app, we feel confident this is a
>> viable, temporary, solution. At least untill we complete our PHP5
>> rewrite of the Photofresher :-)
>>
>> I would like to thank all of you for your time, patience and advice.
>>
>> If anyone has any ideas on why this is working, feel free to let me
>> know :-)
>>
>
> Wild guess is the browser is receiving *something* before it times out?
It doesn't seem like the browser is actually timing out.
>
> I've only been following this off and on so slap me if I say something
> stupid, but as I understand it the script you're having problems with
> creates a 'gallery/page/something' for photogs by copying a lot of
> files around?
MMYes... kind of like that. The photos are copied from the working-dir
to the online dir, some XML-files are generated which are then read by a
Flash-film, which is responsible for loading and displaying the photos.
> Why are you just outputting a space then? Why not output something
> useful to the person sitting and staring at their screen, like "Image
> so-and-so processed...<br />\n" so they have a clue as to what's going
> on behind the scenes and an idea of how long it's going to take to
> finish? Just a thought.
I'm only using the print(" "); because all other output is being
accumulated in a string-variable $result. At the end of the request,
that variable is put into $_REQUEST and read by the result-page, which
displays the content $result.

I'm not sure why the original developers of the did it like this, and do
agree with you that it would make more sense to show some kind of
progress output.
But we are re-writing the app for php5, and there will be some major
changes, so maybe this will be one of them :-)

attached mail follows:


On 5/11/06, Peter Hoskin <peterhcriten.org> wrote:
> There are often easier solutions due to poor design.
>
> Seen many sites setting the value in cookies, or hidden form elements, etc.
> Sites made by people who can't do their jobs in other words :)
>
> Regards,
> Peter Hoskin
>

I know what you mean. But we're not actually trying to crack anything-
we just want to know if php can process the image so far as to
understand the text. Ways around it aren't what is interesting us.

The idea came up because apparently there are photo-organising tools
available that can parse an image and add a tag based upon who is in
it.

Dotan Cohen
http://gmail-com.com

attached mail follows:


Dotan Cohen wrote:
> On 5/11/06, Peter Hoskin <peterhcriten.org> wrote:
>
>> There are often easier solutions due to poor design.
>>
>> Seen many sites setting the value in cookies, or hidden form elements,
>> etc.
>> Sites made by people who can't do their jobs in other words :)
>>
>> Regards,
>> Peter Hoskin
>>
>
> I know what you mean. But we're not actually trying to crack anything-
> we just want to know if php can process the image so far as to
> understand the text. Ways around it aren't what is interesting us.
>
> The idea came up because apparently there are photo-organising tools
> available that can parse an image and add a tag based upon who is in
> it.

in short it is possible to the extent that the givne captcha image is weak
enough to allow programmatic interpretation
to do it with any speed will obviously require an extension like imageMagick to
do the grunt work and possibly even a custom lib to do the analysis.

this site might be of interest to you:

        http://ocr-research.org.ua/index.html

>
> Dotan Cohen
> http://gmail-com.com

attached mail follows:


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.

tedd
--
--------------------------------------------------------------------------------
http://sperling.com

attached mail follows:


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.

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. |
`------------------------------------------------------------'

attached mail follows:


On Thu, May 11, 2006 1:28 am, 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?

My opinion is that I have done it for a really bad CAPTCHA already :-)

So it obviously CAN be done, to some degree of success, depending on
how good your OCR and AI can be tuned to the CAPTCHA.

I doubt that anybody could write any kind of script to grab any random
CAPTCHA implementation and crack it, but if you focus on just one
CAPTCHA, and if you have the time/resources/skills, you can PROBABLY
break it, at least often enough to hammer your way through whatever
it's keeping you out of.

Oh yeah: I used GD, not ImageMagick:
http://php.net/imagecolorat

HTH
YMMV
NAIAA

--
Like Music?
http://l-i-e.com/artists.htm

attached mail follows:


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.

tedd
--
--------------------------------------------------------------------------------
http://sperling.com

attached mail follows:


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.

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. |
`------------------------------------------------------------'

attached mail follows:


Hello,

Is there any posibility to extract all text from a PDF file? (I have
read all the documentation about PHP PDF-Lib but no answer...)

Thanks in advance,
        cajbecu

attached mail follows:


Have a look at the iText java class. I use it in conjuction with php for
file splitting and concatenation, but it has a whole host of other features.
It's accessible via sourceforge or from the author at
www.lowagie.com/iText/.

Hope it helps

George

> -----Original Message-----
> From: cajbecu [mailto:cajbecugmail.com]
> Sent: 11 May 2006 9:46 am
> To: 'PHP General (E-mail)'
> Subject: [PHP] extract text from pdf
>
>
> Hello,
>
> Is there any posibility to extract all text from a PDF file? (I have
> read all the documentation about PHP PDF-Lib but no answer...)
>
> Thanks in advance,
> cajbecu
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


I use twiki.

Twiki search sucks.

Someone wrote a Plucene based search engine.

They wanted to be able to search attachments.

Including Pdf files.

They used ...

....

something out of xpdf - pdf2text or pdftotext

On 5/11/06, George Pitcher <george.pitcheringenta.com> wrote:
>
> Have a look at the iText java class. I use it in conjuction with php for
> file splitting and concatenation, but it has a whole host of other
> features.
> It's accessible via sourceforge or from the author at
> www.lowagie.com/iText/.
>
> Hope it helps
>
> George
>
> > -----Original Message-----
> > From: cajbecu [mailto:cajbecugmail.com]
> > Sent: 11 May 2006 9:46 am
> > To: 'PHP General (E-mail)'
> > Subject: [PHP] extract text from pdf
> >
> >
> > Hello,
> >
> > Is there any posibility to extract all text from a PDF file? (I have
> > read all the documentation about PHP PDF-Lib but no answer...)
> >
> > Thanks in advance,
> > cajbecu
> >
> > --
> > 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
>
>

attached mail follows:


Look at is that i found.

http://community.livejournal.com/php/295413.html

Hope help.

"cajbecu" <cajbecugmail.com> escreveu na mensagem
news:4462F9C2.5040407gmail.com...
> Hello,
>
> Is there any posibility to extract all text from a PDF file? (I have
> read all the documentation about PHP PDF-Lib but no answer...)
>
> Thanks in advance,
> cajbecu

attached mail follows:


If this is on a *nix box, I would suggest using the pdf2text command
within shell_exec. It should work as long as the PDF isn't a scanned
image. Obviously it won't get text off the images, and you'd want to
make sure that any input to filenames (if they're dynamic) are verified
and scrubbed first so people can't access different files on the
filesystem.

HTH,
Ray

> -------- Original Message --------
> Subject: [PHP] extract text from pdf
> From: cajbecu <cajbecugmail.com>
> Date: Thu, May 11, 2006 1:45 am
> To: "'PHP General (E-mail)'" <php-generallists.php.net>
>
> Hello,
>
> Is there any posibility to extract all text from a PDF file? (I have
> read all the documentation about PHP PDF-Lib but no answer...)
>
> Thanks in advance,
> cajbecu
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


On 11/05/06, Jochem Maas <jochemiamjochem.com> wrote:
> Ginger Cheng wrote:
> > Hello, PHP gurus,
> > I have a command that I want to run using system function. The
> > command exploits temporary named pipes in the place of temporary files.
> > my command is
> > paste <(cut -f1 file1) <(cut -f2 file2) > final_file
> >
> > It works perfectly well if I just type it in my interactive
> > shell. But if I do a
> >
> > <?php $cmd = " paste <(cut -f1 file1) <(cut -f2 file2) >
> > final_file";
> > system($cmd);
> > ?>
> >
> > I got the syntax error msg as
> > "sh: -c: line 1: syntax error near unexpected token `('". I have tried
>
> I notice that the 'sh' shell is being used according to your error output,
> I'm guessing that maybe your interactive shell is running something like 'bash'
> and that this discrepency might the root cause of the problem. just a guess -
> I don't know how you would define another shell for php to use either :-/.

That's exactly what's causing it.

One thing the OP can do is invoke bash to run his command line:

   $cmd = '/bin/bash -c "paste <(cut -f1 file1) <(cut -f2 file2) > file3"';

Alternatively, arrange the command line more efficiently:

   $cmd = 'paste file1 file2 | cut -f1,6 > file3';

(replacing the '6' with the correct field number)

-robin

attached mail follows:


Chris wrote:
> Schalk wrote:
>> Chris wrote:
>>
>>> Chris wrote:
>>>
>>> ....
>>>
>>> actually if it's only one variable, this might do it for you:
>>>
>>> $content = str_replace('<?php echo _root ?>', _root, $content);
>>>
>>> but that's still a bad way to do this.
>>>
>> Chris,
>>
>> This works:
>>
>> $breadcrumb = $row_pathway['pathway'];
>> $breadcrumb = str_replace('<?php echo _root ?>', _root, $breadcrumb);
>>
>> echo $breadcrumb;
>>
>> However, I would still like to know why this is a bad way to do this
>> and hopefully find a better way. Still learning all the aspects of
>> PHP so any input is appreciated.
>>
>
> Because you're including your config details in your data (I don't
> think you should do this, but others may disagree).
>
> The str_replace method should be pretty fast and won't introduce any
> security issues like the 'eval' method I originally mentioned would.
>
Thank you for all of your help Chris. Much appreciated.

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers
emotionalize.conceptualize.visualize.realize
Landlines
Tel: +27125468436
US Tel: (440) 499-5484
Fax: +27125468436
Web
email:schalkvolume4.com
Global: www.volume4.com
Messenger
Yahoo!: v_olume4
AOL: v0lume4
MSN: volume4_hotmail.com

We support OpenSource
Get Firefox!- The browser reloaded - http://www.mozilla.org/products/firefox/
 
The information transmitted is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error, please contact the sender and please delete all traces of this material from all devices.

attached mail follows:


Schalk Neethling wrote:
> Chris wrote:
>> Schalk wrote:
>>> Chris wrote:
>>>
>>>> Chris wrote:
>>>>
>>>> ....
>>>>
>>>> actually if it's only one variable, this might do it for you:
>>>>
>>>> $content = str_replace('<?php echo _root ?>', _root, $content);
>>>>
>>>> but that's still a bad way to do this.
>>>>
>>> Chris,
>>>
>>> This works:
>>>
>>> $breadcrumb = $row_pathway['pathway'];
>>> $breadcrumb = str_replace('<?php echo _root ?>', _root, $breadcrumb);
>>>
>>> echo $breadcrumb;
>>>
>>> However, I would still like to know why this is a bad way to do this
>>> and hopefully find a better way. Still learning all the aspects of
>>> PHP so any input is appreciated.
>>>
>>
>> Because you're including your config details in your data (I don't
>> think you should do this, but others may disagree).
>>
>> The str_replace method should be pretty fast and won't introduce any
>> security issues like the 'eval' method I originally mentioned would.
>>
> Thank you for all of your help Chris. Much appreciated.
>

But how did you resolve it?

(You should have been able to include a file containing <?php echo ...
?> directives and have them correctly interpreted.)

--John

attached mail follows:


[snip]
Might I make a suggestion for an addition to the newbie email - in the
"where to find more information" section - add a link either to the
manual security section or phpsec.org
[/snip]

Cool idea, let's get that info together and I'll add it and throw it up
on my server...

attached mail follows:


It turns out that what I want is sort of there...

http://catb.org/~esr/faqs/smart-questions.html#id266392

However, put me down for +1 on adding Security section of php.net
and/or phpsec.org to the NEWBIE doc. :-)

I still think we, as a community, should focus on giving better
answers as documented in the URL referenced above.

Not that we're doing BADLY, mind you, but let's aim for "better" as a
group, eh?

Anybody who has not read that URL recently, the few paragraphs in that
# anchor are worth a review, especially by experts.

It's the "Smart Answers" section.

--
Like Music?
http://l-i-e.com/artists.htm

attached mail follows:


Ligaya Turmelle wrote:
> here is the link for the improved newbie doc -
> http://zirzow.dyndns.org/php-general/NEWBIE
>

Might be nice to see a link to the NEWBIE information in the footer of
the PHP list emails... know what I mean?

attached mail follows:


Yeah, to think we used to have English Majors as the wait-staff in
restaurants and drive-thrus so you at least were understood when giving
your food and drink order...

Richard Lynch wrote:
<SNIP>
> PHP *has* lowered the "entry barrier" ridiculously low, to the point
> where we've got "idiots and English majors" writing really cool
> software -- complete with a total lack of any security features
> whatsoever.
>
> We've made it so damn easy -- Isn't it our responsibility, to some
> degree, to warn users that they really do need to buy those trigger
> guards and locked cabinets and store the ammo separately from the
> weapon?

<SNIP>
> I sometimes think PHP is a like a loaded gun in the hands of a child,
> it's just too damn easy to use and to get yourself into serious
> trouble SO quickly and easily.
>

Yeah, though you know you can require things and make them mandatory
when giving someone the weapon, but you sure can't make them use them.

But I agree 100%. I know I used to write some crappy code, but I am
definitely trying to get better about it all.

Wolf

attached mail follows:


Hi,

I have made a apache setup with PHP running as FastCGI (apache 2.0.58,
mod_fastcgi 2.4.2, php 5.1.4)
PHP is called directly as FastCGI without a wrapper script.
On a given moment the PHP FastCGI application reaches
dynamicMaxClassProcs. After that happens the PHP FastCGI application
totally crashes and can only be recovered by restarting apache.

PHP Crashes with:

"terminated due to uncaught signal '10' ((null)), a core file may have
been generated. "

After that it only shows:

"has failed to remain running for 30 seconds given 3 attempts, its
restart interval has been backed off to 600 seconds"

Is this a bug a php or fastcgi?

Regards,

Frank de Bot

attached mail follows:


On 5/11/06, Frank de Bot <phpsearchy.nl> wrote:
> Hi,
>
> I have made a apache setup with PHP running as FastCGI (apache 2.0.58,
> mod_fastcgi 2.4.2, php 5.1.4)
> PHP is called directly as FastCGI without a wrapper script.
> On a given moment the PHP FastCGI application reaches
> dynamicMaxClassProcs. After that happens the PHP FastCGI application
> totally crashes and can only be recovered by restarting apache.
>
> PHP Crashes with:
>
> "terminated due to uncaught signal '10' ((null)), a core file may have
> been generated. "

Are you able to get a core dump and what does it show? Here's some
doco on how to get a backtrace:

http://bugs.php.net/bugs-generating-backtrace.php

That will give us some clues on whether it's php or fastcgi..

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

attached mail follows:


blackwater dev wrote:
> would like
> to put the search form somewhere else on their site (it is currenly all on
> my page within the iframe) and then call their search page to do the
> search,

(This is an html/DOM thing, not PHP.)

That's what the 'target' property of the <form> tag does: the response
from the request from that form is directed to a different window (or to
a different frame within the current frameset). You give the receiving
window a name (when you create it) and refer to that name in the target
argument.

--John

attached mail follows:


blackwater dev wrote:
>
> On 5/11/06, *John Hicks* <johnlistgulfbridge.net
> <mailto:johnlistgulfbridge.net>> wrote:
>
> blackwater dev wrote:
> > would like
> > to put the search form somewhere else on their site (it is
> currenly all on
> > my page within the iframe) and then call their search page to do the
> > search,
>
> (This is an html/DOM thing, not PHP.)
>
> That's what the 'target' property of the <form> tag does: the response
> from the request from that form is directed to a different window (or to
> a different frame within the current frameset). You give the receiving
> window a name (when you create it) and refer to that name in the target
> argument.
>
> --John
>
>
> Sorry John,
>
> I thought this might not be a php issue so I'll do more research on
it now.
>
> So I gave my iFrame a name:
>
> <IFRAME name="mysite" align="middle" marginWidth="0" marginHeight="0"
> frameBorder="0" src=" http://www.mysite.com" width="100%"
> height="9000"></IFRAME>
>
> Then on the parent page have a form:
>
> <form name="search" method="get" action=" parent.htm" target="mysite">
> <input type="hidden" name="aid" value="6">
> <input type="submit">
> </form>
>
> Can I really specify another target other than _parent, _self, etc?

No, it was a joke. I was kidding.

Maybe you will believe the FM:
http://www.w3.org/TR/html4/present/frames.html#adef-target

Remember to post your replies to the list!!

--J

attached mail follows:


On Wed, May 10, 2006 10:49 pm, blackwater dev wrote:
> I have a small site which provides search functionalities. My search
> sites
> are framed in my clients sites via iframe. I have a client who would
> like
> to put the search form somewhere else on their site (it is currenly
> all on
> my page within the iframe) and then call their search page to do the
> search,
> so in essence I need a way to grab the $_REQUEST params from the
> calling
> site if they exist...is this possible?
>
>
> <main site url="mainsite.com?param1=hello&param2=there">
> **How do I see these params from within the iFrame?
>
> <iFrame mysite url="mysite.com?param2=good&param3=bye">
> I, of course, can see these params fine as this is my site
> </main>

If they don't send the params to you, you can't get them, I don't think.

Maybe maybe maybe something like:
parent.location in javaScript, but you're in the wrong place for that.

--
Like Music?
http://l-i-e.com/artists.htm

attached mail follows:


If any of you guys want to know when I get another shell caught on my
site, email me off-list and I'll set you up as a mailing list personally.

This new one is the r57shell and is picked up by Symantec

Wolf

attached mail follows:


Wolf <mailto:LoneWolfnc.rr.com>
    on Thursday, May 11, 2006 8:01 AM said:

> If any of you guys want to know when I get another shell caught on my
> site, email me off-list and I'll set you up as a mailing list
> personally.
>
> This new one is the r57shell and is picked up by Symantec

What is a shell and why is being "caught"?

Chris.

attached mail follows:


On Thu, May 11, 2006 12:44 pm, Chris W. Parker wrote:
> Wolf <mailto:LoneWolfnc.rr.com>
> on Thursday, May 11, 2006 8:01 AM said:
>
>> If any of you guys want to know when I get another shell caught on
>> my
>> site, email me off-list and I'll set you up as a mailing list
>> personally.
>>
>> This new one is the r57shell and is picked up by Symantec
>
> What is a shell and why is being "caught"?

I assumed he meant some kind of evil shell script thingies that was
spamming us, collecting our emails, or spreading viruses and other
nasties...

Though I suppose we could be talking about a nice shell collection
from the beach... :-)

--
Like Music?
http://l-i-e.com/artists.htm

attached mail follows:


Google: c99 r57 tung and PHP shell scripts

They are hack scripts for your servers to try to take them over. Since
modifying my upload area in November I have caught 4 separate shell
scripts and have been using them to harden my apache and php installs.

Wolf

attached mail follows:


I have been searching, but does anyone know of a BDC to ASCII conversion
tool for PHP right off the top of their head? If not, I'll have to write
one....

Thanks!

attached mail follows:


At 10:03 AM -0500 5/11/06, Jay Blanchard wrote:
>I have been searching, but does anyone know of a BDC to ASCII conversion
>tool for PHP right off the top of their head? If not, I'll have to write
>one....

If you're on a Mac, just use the calculator.

If not, you might try version tracker:

http://www.versiontracker.com/php/search.php?mode=basic&action=search&str=ASCII&plt%5B%5D=windows&x=0&y=0

HTH's

tedd
--
--------------------------------------------------------------------------------
http://sperling.com

attached mail follows:


Jay Blanchard wrote:
> I have been searching, but does anyone know of a BDC to ASCII conversion
> tool for PHP right off the top of their head? If not, I'll have to write
> one....

I haven't heard of BDC. Did you mean BCD (binary coded decimal)? Or
possibly EBCDIC? (What platform is this data coming from?)

If it's EBCDIC data, there are plenty of translation tables you can use,
(but you won't find a one-to-one correspondence in their character sets).

--J

attached mail follows:


[snip]
I haven't heard of BDC. Did you mean BCD (binary coded decimal)? Or
possibly EBCDIC? (What platform is this data coming from?)

If it's EBCDIC data, there are plenty of translation tables you can use,

(but you won't find a one-to-one correspondence in their character
sets).
[/snip]

Yes...typo...I am a dyslexic dog

--J

attached mail follows:


> Yes...typo...I am a dyslexic dog
>

In dog we trust.... ;)

attached mail follows:


On Thursday 11 May 2006 10:08 am, Jim Moseby wrote:
> In dog we trust....

Am partial to "Dog is my co-pilot"
--
Joe Henry
www.celebrityaccess.com
jhenrycelebrityaccess.com

attached mail follows:


[snip]
> In dog we trust....

Am partial to "Dog is my co-pilot"
[/snip]

You must be a member of the First United Universal House of Dog

attached mail follows:


At 8:35 PM -0500 5/4/06, Richard Lynch wrote:
>
> > Synopsis:
>> You could just Javascript and browser info to dynamically layout
> > text to "fit" available space and word-wrap nicely.
>
>Find me anybody on the planet who has actually successfully done this.
>
>Even easier: Point to ONE existing website that successfully does this.
>
>Cuz I can find about a thousand very sharp folks who tried, and failed...
>
>And I don't think I've ever seen one who succeeded, in a
>cross-platform way that actually works...
>
>But maybe I've just missed the boat. Has been known to happen. :-)

Does this qualify?

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

It's just the first seven pages of the Bible. If I could figure out
how to upload the entire kjv into MySQL, I would.

tedd
--
--------------------------------------------------------------------------------
http://sperling.com

attached mail follows:


On Thu, May 11, 2006 10:09 am, tedd wrote:
> At 8:35 PM -0500 5/4/06, Richard Lynch wrote:
>>
>> > Synopsis:
>>> You could just Javascript and browser info to dynamically layout
>> > text to "fit" available space and word-wrap nicely.
>>
>>Find me anybody on the planet who has actually successfully done
>> this.
>>
>>Even easier: Point to ONE existing website that successfully does
>> this.
>>
>>Cuz I can find about a thousand very sharp folks who tried, and
>> failed...
>>
>>And I don't think I've ever seen one who succeeded, in a
>>cross-platform way that actually works...
>>
>>But maybe I've just missed the boat. Has been known to happen. :-)
>
>
> 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. :-)

--
Like Music?
http://l-i-e.com/artists.htm

attached mail follows:


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

tedd

--
--------------------------------------------------------------------------------
http://sperling.com

attached mail follows:


Hello everyone,

Say, if I have a paragraph like this:

==
<h1>John Smith</h1>

Dr. Smith is the directory of <a href="http://some.center.com">Some
Center</a> . His research interests include <b>Wireless Security</b>....
==

Any functions that can help remove all the HTML tags in it? What about
just removing selected tags, like <b></b>?

Thanks in advance for any ideas,

Bing

attached mail follows:


>
> Hello everyone,
>
> Say, if I have a paragraph like this:
>
> ==
> <h1>John Smith</h1>
>
> Dr. Smith is the directory of <a href="http://some.center.com">Some
> Center</a> . His research interests include <b>Wireless
> Security</b>....
> ==
>
> Any functions that can help remove all the HTML tags in it?
> What about
> just removing selected tags, like <b></b>?
>

Sounds like a job for.....

http://us2.php.net/strip_tags

JM

attached mail follows:


Bing Du wrote:

>Say, if I have a paragraph like this:
>
>==
><h1>John Smith</h1>
>
>Dr. Smith is the directory of <a href="http://some.center.com">Some
>Center</a> . His research interests include <b>Wireless Security</b>....
>==
>
>Any functions that can help remove all the HTML tags in it? What about
>just removing selected tags, like <b></b>?
>
>Thanks in advance for any ideas,
>
>

Here's a novel idea for you... RTFM: http://php.net/strip_tags

-Stut

attached mail follows:


On Thursday 11 May 2006 9:51 am, Bing Du wrote:
> Any functions that can help remove all the HTML tags in it? What about
> just removing selected tags, like <b></b>?

Looks like strip_tags() will do the trick for you:

http://us3.php.net/manual/en/function.strip-tags.php
--
Joe Henry
www.celebrityaccess.com
jhenrycelebrityaccess.com

attached mail follows:


<new-more-constructive-way-of-saying-RTFM with-thanks-to="Richard Lynch">

obviously by now you know the function strip_tags().

given that your a university student don't you think we
could expect a little more research ability on your part?

I already knew the strip_tags() function but for fun I typed
in an arbitrary search into google and look what popped up
at position number one:

http://www.google.com/search?&q=remove+tags+from+string+php

attempting to solve your own problems before asking others
for a solution is good for you both because it makes you more
credible to those that might answer your question AND it will
increase *your* understanding of the problem and solution - in
short solving your own problems (or really trying to) will make
you a better programmer.

not to mention the satisfaction of doing it on your own.

<new-more-constructive-way-of-saying-RTFM>

:-)

Bing Du wrote:
> Hello everyone,
>
> Say, if I have a paragraph like this:
>
> ==
> <h1>John Smith</h1>
>
> Dr. Smith is the directory of <a href="http://some.center.com">Some
> Center</a> . His research interests include <b>Wireless Security</b>....
> ==
>
> Any functions that can help remove all the HTML tags in it? What about
> just removing selected tags, like <b></b>?
>
> Thanks in advance for any ideas,
>
> Bing
>

attached mail follows:


strip_tags

On 11/05/06, Bing Du <bduiastate.edu> wrote:
>
> Hello everyone,
>
> Say, if I have a paragraph like this:
>
> ==
> <h1>John Smith</h1>
>
> Dr. Smith is the directory of <a href="http://some.center.com">Some
> Center</a> . His research interests include <b>Wireless Security</b>....
> ==
>
> Any functions that can help remove all the HTML tags in it? What about
> just removing selected tags, like <b></b>?
>
> Thanks in advance for any ideas,
>
> Bing
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
http://www.web-buddha.co.uk

dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

look out for project karma, our new venture, coming soon!

attached mail follows:


At 5:43 PM +0100 5/10/06, IraqiGeek wrote:
>Hi all,
>
>I'm somewhat new to php, though I have played a bit with the
>language. I'm currently learning the language, and I'm having a
>problem passing variables through "URL query".

The following will show you how to do post and get :

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

hth's

tedd
--
--------------------------------------------------------------------------------
http://sperling.com

attached mail follows:


On Wed, May 10, 2006 9:32 pm, Schalk wrote:
> I have the following problem. I load certain links and breadcrumbs
> from
> the database into a external .php file which I include on various
> pages
> within the site. Due to this I have defined a constant '_root' and
> precede all links with this to ensure that the links will work no
> matter
> from where inside the site structure they are called.
>
> My problem is this, when I load these links from the database into the
> external .php file and the load the page that includes this, the line
> <?php echo _root ?> is not parsed and shows up in the links, for
> example:
>
> /our_work/<?php echo _root ?>/our_work/index.php when it should be
> /site_root/our_work/index.php
>
> How can I ensure that these calls to <?php echo _root ?> are parsed
> before sent to the browser?

You probably should have gotten that parsed before it got INTO the
database.

If that's truly impossible, http://php.net/eval will do it -- But you
want to avoid eval as a General Principle for various reasons.

--
Like Music?
http://l-i-e.com/artists.htm

attached mail follows:


At 1:02 AM +1000 5/11/06, Peter Hoskin wrote:
>Despite common belief, SQL is not suited to the storage of binary files.
>SQL is based on ASCII.
>Store your files on the filesystem, not SQL.

How is it not suited?

I stopped using mySQL to store images because of
browser refresh problems, but other than that --
I didn't find any major problems with using it.

Plus, moving images from one system to another
was much easier because you just moved the dB and
you don't have to worry about the file system and
breaking links.

In addition, if you are using multiple hosts, who
require the same images, then using mySQL is far
superior than trying to keep all the images in
different file systems synchronized.

Furthermore, according to Paul DuBois (author of
MySQL Cookbook, great book btw) who says "If you
store images on the file system, directory
look-up my become slow" in his comparing file
system to mySQL for image storage.

Additionally, transactional behavior is more
difficult with a file system than it is with
mySQL.

Granted, if you use mySQL for storing images,
then you bloat the tables and approach your
system limits faster than using a file system.
But for a limited amount of images, there isn't
any real problems.

And granted, pulling images from mySQL to be used
in web sites are slightly slower and present
refresh differences between some browsers, but
that's certainly not a reason to say that mySQL
is categorically not suited for the storage of
binary files -- like with everything else, there
are trade-offs. Do you not see that?

---

At 1:53 AM +1000 5/11/06, Peter Hoskin wrote:
>So, if ASCII and Binary are both codesets... which does SQL use to store
>its data?

Is ASCII stored differently than binary on a hard drive?

From my limited experience in using a hex editor,
the data all looks the same to me. If it wasn't
for my hex editor, I would be looking at 1's and
0's, right?

After all, isn't an image in a file system stored
on a hard drive the exact same fashion as an
image stored on a hard drive via mySQL?

The only difference I can see is in overhead --
but then again, I may be a Moron or an Idiot like
Rory Browne suggests.

Perhaps someone might enlighten me as to why
mySQL is not suited to store images -- and prove
it.

And for goodness sake NO, Google is NOT always
right -- it's only a collection of everyone's
view. When did Google replace valid research? I
can see tomorrow's mother's saying to their
children "If Google jumped off a bridge, would
you do it?"

Let's get real about what Google can offer.
Specificity is inversely proportional to the
number of people voicing an opinion. I would
guess that even Morons and Idiots know that.

tedd

Typical disclaimers apply -- I did not mean to
offend anyone nor to imply that anyone is an
Idiot or a Moron. Your mileage may vary. No
warranties expressed or implied. This is not a
solicitation for an investment opportunity.
Consult you doctor before applying. No hable
inglés.

--
--------------------------------------------------------------------------------
http://sperling.com

attached mail follows:


I am attempting to send SMS via an e-mail message....and it works!
*phew* <phonenumber>sms.myserver.com

Problem is that the reply to or from field on the device always shows
nobodymyserver.com regardless of what I have set the Replay-To: or
From: headers. PHP runs as nobody, so this makes sense....kinda'. So I
tried ini_set() and regardless of that the From: is always nobody. How
can I fix this? I am trying many things right now, but my stomach hurts
and my eyes are buggin'...if anyone can help let me know!

Thanks!