[PHP] Re: PHP, over javascript code simple \n

2004-08-20 Thread aRZed


try simply escaping the "\" before the "n" with an additional "\" or in 
other words: use "\\n" instead of "\n". PHP will interpret "\\" as an "\".

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


Re: [PHP] Cannot Load DLLs (WinXP, Apache 2, PHP 5)

2004-08-20 Thread aRZed
Hy!
You have to restart windows after changing the path-variable, else it 
has no effect. it it functioning for me

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


[PHP] PHP5: problem with mysqli_prepare/mysqli_bind_param

2004-08-20 Thread aRZed
[snip]
172: $q = $this->DB["cms"]->prepare("SELECT t.Extension FROM Site_Mime 
as m,Type as t WHERE m.SNr=? && m.TNr=t.Nr");
173: $q->bind_param("i",$this->Site["Nr"]);
174: $q->execute();
175: $q->store_result();
[/snip]

I've got a very serious problem in big class, but these two lines are 
probably the origin if my problem:
$this->DB["CMS"] is a valid mysqli_connection
$this->Site["Nr"] is a number - in the current test-case it is 3
I've also checked the tables. There is a row with SNr=3 and TNr=2 in 
Site_Mime, and there is a row in the table Type with Nr=2.

So I would expect to get at least one row as a result of this query, but 
  $q->num_rows has only the value ""

Then I tried simply to add ' on both sides of the ? but it got only ('?' 
instead of ?)weird: Warning: mysqli_stmt::bind_param() 
[function.bind-param.html]: Number of variables doesn't match number of 
parameters in prepared statement in C:\Programme\Apache 
Group\Apache2\htdocs\cms\lib\cms\site.class.php on line 173

has anyone an idea of what is wrong there?
is it possible that this is a bug?
thx for helping ;)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] mysqli_escape_string vs. mysqli_prepare

2004-08-21 Thread aRZed
Hy!
I have a relative simple question about mysqli_prepare:
When I prepare a statement and then bind parameters to it, does php 
automatically care for escaping strings etc.?

Example:

prepare("SELECT FROM table WHERE x=?");
$p = "5'"
$stmt->bind_param("i",$p);
# is "5'" converted to 5 like it would when i use intval($p)?
$stmt->reset();
$s = "'xyz' || x LIKE '%'";
$stmt->bind_param("s",$s);
# will those "'" be escaped?
?>
thanks for help
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] just another question

2004-08-23 Thread aRZed
Arzed wrote:
Hy!
I have a relative simple question about mysqli_prepare:
When I prepare a statement and then bind parameters to it, does php 
automatically care for escaping strings etc.?

Example:

prepare("SELECT FROM table WHERE x=?");
$p = "5'"
$stmt->bind_param("i",$p);
# is "5'" converted to 5 like it would when i use intval($p)?
$stmt->reset();
$s = "'xyz' || x LIKE '%'";
$stmt->bind_param("s",$s);
# will those "'" be escaped?
?>
thanks for help
So it seems, that nobody knows what happens with those binded parameters.
Is there a more precise documentation on the mysqli-object interface?
Is there any code snipped that shows how the mysqli-classes would look 
like, when they were coded in php, like there is for the Extension class?

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


[PHP] interesting behavior of ob_end_flush() in __destruct()

2004-09-24 Thread aRZed
I discovered an interesting behavior, when ob_end_flush() or 
ob_end_clean() is used in a destructor of an object.
I don't think it is actually a bug, so i decided to post it here.


$f = new foo();
// end of file
?>
this ends in an error:
Notice: ob_end_flush(): failed to delete buffer. No buffer to delete. in ...
but this functions very well.

it seems that php first ends output buffering and then calls then 
destrcuts the objects. so the output buffering is still ended when the 
destructor is calles. one has to unset the object to reverse that order 
manually.

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


Re: [PHP] interesting behavior of ob_end_flush() in __destruct()

2004-09-25 Thread aRZed
Chris Dowell wrote:
I haven't searched through the archives to refresh my memory, but it's 
something to bear in mind. I wonder whether error messages are also not 
passed to the browser.
I have pointed out some more aspects of this issue:
Error messages and normal output are passed to the browser as expected. 
(my first examlpe and the following)


$f = new foo();
// outputs "Destructor"
?>
still unclear is what happens when ob_start() is called in the 
destructor. but it seems that this has no serious effect.


$f = new foo();
// no output - output is buffered
?>
it seems that the destructor is called when output buffering is still 
deactivated but the connection to the client is active.

i consider it a bit strange that output buffering is deactivated when 
there is still the possibility of passing something to the browser.

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


[PHP] captcha on bugs.php.net/report.php doesn't work

2005-07-14 Thread aRZed
hy!

i have a simple problem when i try to report a bug. the captcha doesn't
work. the script doesn't send any output at all. so i think my
bug-report must wait ...
is anybody else expieriencing this problem?

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