Jochem Maas wrote:
rewrite 'section/addfriend/will' -
'index.php?cmd=section/addfriendusername=will'
rewrite 'section/addfriend/templates/js/jquery.js' -
'index.php?cmd=section/addfriendusername=templates/js/jquery.js'
and what's the bet that this second rewritten url is the bogey man here.
# [EMAIL PROTECTED] / 2007-01-22 15:17:16 +:
The key is that the function is returning false but it continues to
execute! If I stick in an exit; after the in_array() check at point #4,
this doesn't happen. There are no other places where this function is
called, and it is only called
I can't see how there is a bug in my code if when I echo the contents of
the 2 variables, they are exactly the same as when I set them manually.
Except in the former the function continues executing but in the
latter it doesn't.
I also cannot see how the function can return false and execute
# [EMAIL PROTECTED] / 2007-01-22 15:31:55 +:
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-22 15:17:16 +:
The key is that the function is returning false but it continues to
execute! If I stick in an exit; after the in_array() check at point #4,
this doesn't happen. There are
Yes, I know it looks like a bug in my code because I'm not able to write
a test case that can reproduce it simply enough to report as a bug -
hence why I am posting here. However, the behaviour I am describing
surely suggests some kind of issue somewhere in PHP itself.
My reasoning for this
On Mon, 2007-01-22 at 16:36 +, David Mytton wrote:
Yes, I know it looks like a bug in my code because I'm not able to write
a test case that can reproduce it simply enough to report as a bug -
hence why I am posting here. However, the behaviour I am describing
surely suggests some kind
I added this in and it outputs 1 as I suspected - the function is being
called only once.
David
Robert Cummings wrote:
On Mon, 2007-01-22 at 16:36 +, David Mytton wrote:
Yes, I know it looks like a bug in my code because I'm not able to write
a test case that can reproduce it simply
Please don't top post and trim the quoted material if you want me to
discuss this with you.
# [EMAIL PROTECTED] / 2007-01-22 16:36:40 +:
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-22 15:31:55 +:
I also cannot see how the function can return false and execute the SQl
query
David Mytton wrote:
Hi,
I have come across what appears to be a bug in PHP, but one that I am
having difficulty writing test code for. Also, the bug only happens on a
Linux build of PHP - the code is working as expected on Windows. This is
on both PHP 5.2.0 and the very latest snapshots:
At the very bottom of your function place another return with a string
like return 'FOUND THE END OF FUNCTION';
now, echo the return of the function and see if it really the return
function that you think it is that is returning false, or you are just
hitting the end of the function.
Jim
# [EMAIL PROTECTED] / 2007-01-22 17:45:23 +:
However, it seems this is actually being caused by some weirdness with
mod_rewrite. Basically, if I use the rewritten URL e.g.
example.com/section/addfriend/will/ which rewrites to
index.php?cmd=section/addfriendusername=will
I get this
Roman Neuhauser wrote:
Can we see your mod_rewrite configuration? RewriteCond, RewriteRule, all
that jazz.
There are a number of rules but the only one that is relevant for this
page is:
RewriteRule ^section/addfriend(/)?(.*)$
index.php?cmd=section/addfriendusername=$2
David
--
PHP
# [EMAIL PROTECTED] / 2007-01-22 18:48:27 +:
Roman Neuhauser wrote:
Can we see your mod_rewrite configuration? RewriteCond, RewriteRule, all
that jazz.
There are a number of rules but the only one that is relevant for this
page is:
RewriteRule ^section/addfriend(/)?(.*)$
Roman Neuhauser wrote:
Ok, what does RewriteLog contain for one such request?
RewriteLogLevel 9.
http://paste.lisp.org/display/35779
David
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
# [EMAIL PROTECTED] / 2007-01-22 19:28:29 +:
Roman Neuhauser wrote:
Ok, what does RewriteLog contain for one such request?
RewriteLogLevel 9.
http://paste.lisp.org/display/35779
As you can see, the processing doesn't stop when it hits the RewriteRule
you thought was the only relevant
# [EMAIL PROTECTED] / 2007-01-22 20:45:42 +:
# [EMAIL PROTECTED] / 2007-01-22 19:28:29 +:
Roman Neuhauser wrote:
Ok, what does RewriteLog contain for one such request?
RewriteLogLevel 9.
http://paste.lisp.org/display/35779
As you can see, the processing doesn't stop when it
Roman Neuhauser wrote:
Bzzzt, I'm an idiot. It doesn't, of course. You're still missing [L]
and that's what I was trying to point you at until the cat ran over my
keyboard...
Alright. So if the rewrite rules were (and they are):
RewriteRule ^section/account(/)?$
# [EMAIL PROTECTED] / 2007-01-22 19:56:58 +:
Roman Neuhauser wrote:
Bzzzt, I'm an idiot. It doesn't, of course. You're still missing [L]
and that's what I was trying to point you at until the cat ran over my
keyboard...
Alright. So if the rewrite rules were (and they are):
Roman Neuhauser wrote:
append [L,NS] to all RewriteRules
Done that, but the problem is still there - doesn't seem to have made
any difference.
David
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
# [EMAIL PROTECTED] / 2007-01-22 21:17:04 +:
Roman Neuhauser wrote:
append [L,NS] to all RewriteRules
Done that, but the problem is still there - doesn't seem to have made
any difference.
Can I see the rewrite log for a single request now? Please make sure
it's only one request.
--
Roman Neuhauser wrote:
Can I see the rewrite log for a single request now? Please make sure
it's only one request.
http://paste.lisp.org/display/35791
David
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
# [EMAIL PROTECTED] / 2007-01-22 22:03:30 +:
Roman Neuhauser wrote:
Can I see the rewrite log for a single request now? Please make sure
it's only one request.
http://paste.lisp.org/display/35791
Are you sure you added the NS flag? It looks like the RewriteRules
are applied to the
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-22 22:03:30 +:
Roman Neuhauser wrote:
Can I see the rewrite log for a single request now? Please make sure
it's only one request.
http://paste.lisp.org/display/35791
Are you sure you added the NS flag? It looks like the RewriteRules
On Tue, 2007-01-23 at 02:43 +0100, Jochem Maas wrote:
there is no way in hell that [a released version of] php is so borked that
it's capable
returning a value from a function and then going on to running code that
occurs in the function
after the return statement that returned the value.
Robert Cummings wrote:
On Tue, 2007-01-23 at 02:43 +0100, Jochem Maas wrote:
there is no way in hell that [a released version of] php is so borked that
it's capable
returning a value from a function and then going on to running code that
occurs in the function
after the return statement
On Tue, 2007-01-23 at 03:01 +0100, Jochem Maas wrote:
Robert Cummings wrote:
On Tue, 2007-01-23 at 02:43 +0100, Jochem Maas wrote:
there is no way in hell that [a released version of] php is so borked that
it's capable
returning a value from a function and then going on to running code
26 matches
Mail list logo