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 9 Mar 2008 15:58:07 -0000 Issue 5338

php-general-digest-helplists.php.net
Date: Sun Mar 09 2008 - 10:58:07 CDT


php-general Digest 9 Mar 2008 15:58:07 -0000 Issue 5338

Topics (messages 271168 through 271177):

Re: include() and current working directory
        271168 by: Jim Lucas

Re: Links hierarchy maintenance
        271169 by: Per Jessen
        271176 by: Adil Drissi
        271177 by: Per Jessen

Re: Message
        271170 by: cadaver.planethalflife.com

Re: send form by email with image spam controler
        271171 by: Per Jessen
        271173 by: Richard Heyes
        271174 by: Per Jessen
        271175 by: Stut

path_info in fastcgi setting
        271172 by: Ian M. Evans

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:


phponsiteupdate.com wrote:
> Hi,
>
> I'm using include to display a html file from a different directory to
> the current working directory.
>
> This page displays, but is missing all the CSS formating.
>
> I'm assuming this is because it can't find the CSS because it's in the
> different directory to the CWD.
>
> So, the easy way out is to move the CSS, but I've got heaps of these,
> and it makes it really messy.
>
> The PHP looks like this:
>
> include("xxx/index.htm");
>
> the css is saved in the xxx folder.
>
> I'm open to any suggestions, ideas?
>
> Many thanks
> Matt
>
>

I think your problem has to do with the difference between relative and
absolute URL references.

Do some googling about those and I think you might get your answer. If
you do not, and since this really has nothing to do with PHP, you can
email off list and I can assist you with the problem.

Thanks

Jim Lucas

attached mail follows:


Adil Drissi wrote:

> Hi,
>
> Yes this is the correct way to do things. As i said,
> i'm using different styles for the menus links
> indicating the current page. Suppose my page has one
> horiontal menu at the top and one vertical menu at the
> left. In this case, one element of the horizontal menu
> and one from the vertical menu will be displayed
> differently from the other elements. So the function
> that will be inluded will be more complex to handle
> this. I was just wondering, how other poeple are
> dealing with that. Of course it is feasable, but i
> want to do it the best way.

CSS ? If that's not enough to alter the display, you need to make your
includes sensitive to or aware of the context they're being included
in.

/Per Jessen, Zürich

attached mail follows:


Hi Jessen,

The question is how to make it aware of the context.
Do you know any work dealing with that?

Thanks

--- Per Jessen <percomputer.org> wrote:

> Adil Drissi wrote:
>
> > Hi,
> >
> > Yes this is the correct way to do things. As i
> said,
> > i'm using different styles for the menus links
> > indicating the current page. Suppose my page has
> one
> > horiontal menu at the top and one vertical menu at
> the
> > left. In this case, one element of the horizontal
> menu
> > and one from the vertical menu will be displayed
> > differently from the other elements. So the
> function
> > that will be inluded will be more complex to
> handle
> > this. I was just wondering, how other poeple are
> > dealing with that. Of course it is feasable, but i
> > want to do it the best way.
>
> CSS ? If that's not enough to alter the display,
> you need to make your
> includes sensitive to or aware of the context
> they're being included
> in.
>
>
> /Per Jessen, Zürich
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

attached mail follows:


Adil Drissi wrote:

> Hi Jessen,
>
> The question is how to make it aware of the context.
> Do you know any work dealing with that?

Variables? Set a variable $context= before you include, then have your
include check on $context.

/Per Jessen, Zürich

attached mail follows:


Important message, do not show this anyone!

attached mail follows:


tedd wrote:

> Here's a few.
>
> http://webbytedd.com/aa/assorted-captcha/
>
> BUT, all can be broke by a spammer. There is no solution.
>

How about this one -

http://jessen.ch/articles/captcha

Well, of course it can be broken too - it's only a matter of money and
time, both of which are critical to spammers.

(for the moment it has a limited number of questions and only in
English).

/Per Jessen, Zürich

attached mail follows:


> How about this one -
>
> http://jessen.ch/articles/captcha
>
> Well, of course it can be broken too - it's only a matter of money and
> time, both of which are critical to spammers.
>
> (for the moment it has a limited number of questions and only in
> English).

Interesting. How well does this work? I'm interested because I wrote a
number to text converter which could be used as a CAPTCHA and it was
eventually broken, so I resorted to the more traditional image based
CAPTCHA. For example:

Enter the following in numbers:

Four thousand and twenty two.

And of course the answer is 4022.

--
Richard Heyes
Employ me:
http://www.phpguru.org/cv

attached mail follows:


Richard Heyes wrote:

>> How about this one -
>>
>> http://jessen.ch/articles/captcha
>>
>> Well, of course it can be broken too - it's only a matter of money
>> and time, both of which are critical to spammers.
>>
> Interesting. How well does this work?

Well - it's an idea I've had for a while, but I only just implemented it
this morning.
The key thing is that in order to read the question, you need to render
the HTML in an engine or browser with javascript support. Just parsing
the page won't help you.
Like I said, it can be broken too (given sufficient effort).

> I'm interested because I wrote a number to text converter which could
> be used as a CAPTCHA and it was eventually broken, so I resorted to
> the more traditional image based CAPTCHA. For example:
>
> Enter the following in numbers:
>
> Four thousand and twenty two.
>
> And of course the answer is 4022.

Did you use javascript to do that too? Seems to me it should work just
as well as what I proposed.

/Per Jessen, Zürich

attached mail follows:


On 9 Mar 2008, at 12:47, Per Jessen wrote:
> Richard Heyes wrote:
>>> How about this one -
>>>
>>> http://jessen.ch/articles/captcha
>>>
>>> Well, of course it can be broken too - it's only a matter of money
>>> and time, both of which are critical to spammers.
>>>
>> Interesting. How well does this work?
>
> Well - it's an idea I've had for a while, but I only just
> implemented it
> this morning.
> The key thing is that in order to read the question, you need to
> render
> the HTML in an engine or browser with javascript support. Just
> parsing
> the page won't help you.
> Like I said, it can be broken too (given sufficient effort).

It's not much effort - you just need to request a second URL after
you've got the form. It's not hard and really doesn't really put
anything more in the way of a bot than an image-based captcha. In fact
I'd argue that parsing the text in your questions is significantly
easier than doing OCR on an image.

>> I'm interested because I wrote a number to text converter which could
>> be used as a CAPTCHA and it was eventually broken, so I resorted to
>> the more traditional image based CAPTCHA. For example:
>>
>> Enter the following in numbers:
>>
>> Four thousand and twenty two.
>>
>> And of course the answer is 4022.
>
> Did you use javascript to do that too? Seems to me it should work just
> as well as what I proposed.

Text-based captchas will never be a big hurdle for bots. Anything you
can convert from a number or numbers into text can also be parsed back
to the numbers. Fact.

The key thing to remember when securing a form is that if you do
something that's never been seen before it's unlikely that the generic
bots will be able to get past it. If someone decides to target your
site then a text-based captcha will never be good enough, and chances
are nothing you do will work. If someone is willing to put in the
effort you've got no chance.

As an example I used to have a simple text-based captcha on the
comment form on my blog. It was pitifully simple to get past because
all it asked you to do was type 'human' into a text box, but since my
blog is not very popular it's not worth the bad guys investing time to
mod their bots to get past it. I had zero spam comments while that was
in place. I've since switched to Wordpress and I have to say that
Akismet kicks the crap out of any captcha in terms of effectiveness.

-Stut

--
http://stut.net/

attached mail follows:


Greetings all.

Making the transition to PHP 5.2.5 operating as FastCGI through Nginx.

Seem to be having a bit o' weirdness with path_info.

Under Apache and the PHP module:
a) test.php path_info is blank
b) test.php/ppp path_info=/ppp

Under PHP FastCGI:
c) test.php path_info is test.php
d) test.php/ppp path_info=/ppp

Not sure why it's not blank in 'c' and instead equals the filename.

I need coffee. :-)