[fw-general] Unusual error... ZF 1.7.5

2009-08-24 Thread Shawn
Greets Zend users...

Looking for someone to shed some light on this error I receive when
using an unusual URL.

Not that I want this url to perform any sort of task, rather I found
many requests similar to the one below in my server logs. (I suspect it
comes from google translate but not sure) I simply wish to make sure the
warnings do not appear on the page copy.

For example a url like this:
http://www.mysite.org/translate_c?hl=essl=enu=http://www.mysite.org

will throw a warning in ZF:
Warning:parse_url(/translate_c?hl=essl=enu=http://www.mysite.org/)
[function.parse-url]: Unable to parse URL
in /usr/share/php5/Zend/Controller/Request/Http.php on line 394


Obviously a malformed URL however, is there anything I can do to
suppress these warnings in my production release? Or is there something
I can do with mod_rewrite to redirect the request to an contextual error
page? 

Recommendations...?

Thanks in advance for any assistance. ~Shawn

---
using ZF 1.7.5 on Apache 2.2.9 


Re: [fw-general] Unusual error... ZF 1.7.5

2009-08-24 Thread Nick Pack
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Why dont you urlencode() the site address on the end, and decode it in
your action?

Shawn wrote:
 Greets Zend users...
 
 Looking for someone to shed some light on this error I receive when
 using an unusual URL.
 
 Not that I want this url to perform any sort of task, rather I found
 many requests similar to the one below in my server logs. (I suspect it
 comes from google translate but not sure) I simply wish to make sure the
 warnings do not appear on the page copy.
 
 For example a url like this:
 http://www.mysite.org/translate_c?hl=essl=enu=http://www.mysite.org
 
 will throw a warning in ZF:
 Warning:parse_url(/translate_c?hl=essl=enu=http://www.mysite.org/)
 [function.parse-url]: Unable to parse URL
 in /usr/share/php5/Zend/Controller/Request/Http.php on line 394
 
 
 Obviously a malformed URL however, is there anything I can do to
 suppress these warnings in my production release? Or is there something
 I can do with mod_rewrite to redirect the request to an contextual error
 page? 
 
 Recommendations...?
 
 Thanks in advance for any assistance. ~Shawn
 
 ---
 using ZF 1.7.5 on Apache 2.2.9 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJKkm2cAAoJEDENZSw4OipT2OIIAJjYlOBO43HnkFYMmZ+K/p2F
95oKOVf+xj4ZLzBKkkAhL9+U9EiBd37R4SLYgk7uq3axcCadyhhJlj79EIlhFYdU
omXka6LyMSgvL6LDmAcxCjrnB/i7DIBDVue6bcKJhewJWyr+cwfnx2INRXSQ25g5
xkqWaUz+eC8CWJ9l/wudJUd4iWfCdAAvVWgBc8XGpuD907FF9VKVnODz7sF/4ci5
Ku37qheVjgTGOWMYb6U5sDTTBQ0+bhMq0omQ8mRHZOaZYikH8k9O2CxPbNvHYnv4
ySzPB0EThIBjjywBDOxizcybS60LZq5W48xNQpFATzlvfMZG8LAwc4WwEuG1AFw=
=KhCf
-END PGP SIGNATURE-


Re: [fw-general] Unusual error... ZF 1.7.5

2009-08-24 Thread Shawn
On Mon, 24 Aug 2009 11:38:20 +0100
Nick Pack n...@nickpack.com wrote:

 Why dont you urlencode() the site address on the end, and decode it in
 your action?

True, but I don't think that is necessary in this instance
since I have no need for that URL to perform any sort of action.

It was only a test to see how my site/application reacted to a
malformed URL detected from my server logs.

Ultimately, re-directing to 400 Bad Request page would be
more ideal instead of the 10 lines of Warning: ... at the top
of my site.

So, is there a way to do this within ZF or would it be better
practice to have a mod_rewrite do it? 

Thanks BTW for the quick reply...  ~Shawn


Re: [fw-general] Unusual error... ZF 1.7.5

2009-08-24 Thread Carlton Gibson


On 24 Aug 2009, at 12:04, Shawn wrote:


Ultimately, re-directing to 400 Bad Request page would be
more ideal instead of the 10 lines of Warning: ... at the top
of my site.


You need to turn display_errors off. This should ALWAYS be done in  
production.


http://uk.php.net/manual/en/errorfunc.configuration.php#ini.display-errors


Re: [fw-general] Unusual error... ZF 1.7.5

2009-08-24 Thread Shawn
On Mon, 24 Aug 2009 16:24:34 +0100
Carlton Gibson li...@noumenal.co.uk wrote:

 On 24 Aug 2009, at 12:04, Shawn wrote:
 
  Ultimately, re-directing to 400 Bad Request page would be
  more ideal instead of the 10 lines of Warning: ... at the
  top of my site.  
 
 You need to turn display_errors off. This should ALWAYS be done in  
 production.
 
 http://uk.php.net/manual/en/errorfunc.configuration.php#ini.display-errors

Ah yes! So simple... and me thinking it was a ZF thing! My
apologies.  Thanks again!  ~Shawn