php-general Digest 14 Sep 2007 13:11:02 -0000 Issue 5018

2007-09-14 Thread php-general-digest-help
php-general Digest 14 Sep 2007 13:11:02 - Issue 5018 Topics (messages 262096 through 262110): [EMAIL PROTECTED] 262096 by: Teo Mattiozzi Re: Preventing Access to Private Files 262097 by: Chris Re: PHP 5.2.3 - Segmentation fault (core dumped) 262098 by: Per Jessen

Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Per Jessen
Stut wrote: Please tell me you're kidding? If you can't provide a piece of code that always causes the segfault are you seriously expecting the devs to waste their time trying to find the cause? Talk about a needle in a haystack. The ease of reproduction is not particularly important,

Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Per Jessen
Per Jessen wrote: To let a user script bring down the host environment is just not acceptable. IMHO. Here's an example from this morning - I have a situation where all I need to do is add a single superfluous double quote, and I get a segfault. Is that not poor error handling somewhere?

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-14 Thread Arvids Godjuks
Don't use SQL_CALC_FOUND ROWS on simple queries, when you have to run a simple query on one or two (with join) tables with a simple WHERE. Especialy if tables are big. I found out that single SELECT COUNT(id) FROM table is far more faster when query has simple WHERE conditions. I use

Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Per Jessen
[EMAIL PROTECTED] wrote: On Fri, 14 Sep 2007 10:10:09 +0200, Per Jessen [EMAIL PROTECTED] wrote: Per Jessen wrote: To let a user script bring down the host environment is just not acceptable. IMHO. Here's an example from this morning - I have a situation where all I need to do is add a

Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Stut
Per Jessen wrote: Segfaults are a fact of life Only if you are forced to accept poor programming. I can assure you that segfaults are not tolerated in a regular production environment. Segfaults happen in test and development. I agree with you for the most part, but there are several

Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread dev
On Fri, 14 Sep 2007 10:10:09 +0200, Per Jessen [EMAIL PROTECTED] wrote: Per Jessen wrote: To let a user script bring down the host environment is just not acceptable. IMHO. Here's an example from this morning - I have a situation where all I need to do is add a single superfluous double

Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread T . Lensselink
On Fri, 14 Sep 2007 11:09:36 +0200, Per Jessen [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Fri, 14 Sep 2007 10:10:09 +0200, Per Jessen [EMAIL PROTECTED] wrote: Per Jessen wrote: To let a user script bring down the host environment is just not acceptable. IMHO. Here's an

Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread T . Lensselink
On Fri, 14 Sep 2007 11:09:36 +0200, Per Jessen [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Fri, 14 Sep 2007 10:10:09 +0200, Per Jessen [EMAIL PROTECTED] wrote: Per Jessen wrote: To let a user script bring down the host environment is just not acceptable. IMHO. Here's an

Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Per Jessen
Stut wrote: Per Jessen wrote: Segfaults are a fact of life Only if you are forced to accept poor programming. I can assure you that segfaults are not tolerated in a regular production environment. Segfaults happen in test and development. I agree with you for the most part, but there

Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Per Jessen
T.Lensselink wrote: Would love to see the code that caused this. http://jessen.ch/files/php-problem-sep2007.tar.gz /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php It's the call to virtual() that causes the

Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Per Jessen
T.Lensselink wrote: Would love to see the code that caused this. http://jessen.ch/files/php-problem-sep2007.tar.gz /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Don't really see what i has to do with a

Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread T . Lensselink
On Fri, 14 Sep 2007 12:00:19 +0200, Per Jessen [EMAIL PROTECTED] wrote: T.Lensselink wrote: Would love to see the code that caused this. http://jessen.ch/files/php-problem-sep2007.tar.gz /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Jay Blanchard
[snip] You are right. It segfaults only if the virtual() call comes before creating the XSLTProcessor instance. [/snip] I cannot replicate the problem on Linux. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Per Jessen
Jay Blanchard wrote: [snip] You are right. It segfaults only if the virtual() call comes before creating the XSLTProcessor instance. [/snip] I cannot replicate the problem on Linux. So you get the XSLT error messages instead? That's what you should be seeing. See also

RE: RE: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Jay Blanchard
[snip] You are right. It segfaults only if the virtual() call comes before creating the XSLTProcessor instance. [/snip] I cannot replicate the problem on Linux. So you get the XSLT error messages instead? That's what you should be seeing. {/snip] Yep, no segfault. I do not have a

RE: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread T . Lensselink
On Fri, 14 Sep 2007 08:10:56 -0500, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] You are right. It segfaults only if the virtual() call comes before creating the XSLTProcessor instance. [/snip] I cannot replicate the problem on Linux. -- PHP General Mailing List

[PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-14 Thread Rodolfo De Nadai
Hi all... I'm facing a serious problem with my application. I have a script write in PHP that starts in Internet Explorer, this script keep on running until a varible value change on my MySQL database. The problem is that when i restart Apache, the process child initalized isn't kill... then

RE: Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Per Jessen
Jay Blanchard wrote: [snip] A core dump or an strace or some debug output at the right time will have 99% of the information you need - provided you understand how to read it. I submit there is generally no need to reproduce a problem in order to diagnose it. To fix it, yes, it will

RE: RE: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Per Jessen
Jay Blanchard wrote: [snip] You are right. It segfaults only if the virtual() call comes before creating the XSLTProcessor instance. [/snip] I cannot replicate the problem on Linux. So you get the XSLT error messages instead? That's what you should be seeing. {/snip] Yep, no

RE: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Per Jessen
T.Lensselink wrote: In one of the other messages i stated the script works fine on linux. But PHP on windows seems to have a problem with virtual(). Even without creating an instance of the XSLProcessor class. But dropping virtual() for include() or require() solves the problem. Getting

RE: RE: RE: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Jay Blanchard
[snip] I'm on Linux too, so never mind Windows for the moment. So what's the difference between our two environments? Try putting something in the problem-include file to verify that virtual is doing what it's supposed to. [/snip] That worked fine. I am sure that there are many differences in

RE: RE: RE: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Per Jessen
Jay Blanchard wrote: [snip] I'm on Linux too, so never mind Windows for the moment. So what's the difference between our two environments? Try putting something in the problem-include file to verify that virtual is doing what it's supposed to. [/snip] That worked fine. I am sure that

RE: RE: RE: RE: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-14 Thread Jay Blanchard
[snip] That worked fine. I am sure that there are many differences in our environments. We are running Suse Linux, PHP 5.2.1, Apache 2.2.4. That's close though - my workstation is openSUSE 10.2, PHP 5.2.4, Apache 2.2.4. [/snip] As this installation is on a development box it has nearly every

RE: [PHP] blocking exec() silently

2007-09-14 Thread Instruct ICC
Instruct ICC schrieb: I was going to mention http://php.he.net/manual/en/features.safe-mode.functions.php and ask you if you need any of those functions, but I prefer Nathan's answer. You may be able to set the error reporting in conjunction with disable_functions and be done.

RE: [PHP] blocking exec() silently

2007-09-14 Thread Instruct ICC
From: [EMAIL PROTECTED] Actually in this example, there is an error handling function provided in the comments. I'm commenting again because I want to stress the distinctions between errors E_ERROR, warnings E_WARNING, *USER* and other messages/notices/etc.:

Re: [PHP] blocking exec() silently

2007-09-14 Thread Samuel Vogel
Actually I can not do that. The point of my question was, that I'm running kilu.de, a German Freehosting service. But many of our users can not cope with the error messages, occurring from the disabled_functions! I can't log to the error log, because the errors need to be displayed to our

RE: [PHP] blocking exec() silently

2007-09-14 Thread Zoltán Németh
2007. 09. 14, péntek keltezéssel 08.31-kor Instruct ICC ezt írta: Instruct ICC schrieb: I was going to mention http://php.he.net/manual/en/features.safe-mode.functions.php and ask you if you need any of those functions, but I prefer Nathan's answer. You may be able to set the

Re: [PHP] blocking exec() silently

2007-09-14 Thread Nathan Nobbe
shared hosting environments are interesting; ive sometimes wondered how i might configure the environment in such a scenario. after revoking access to the exec() command you could allow the errors to be sent to the browser and recommend to users override the stock error handler as mentioned

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-14 Thread mike
except i think innodb does not have a full row count stored. anyway the design was meant for a simple one function call. it's worked great for small and data loads. On 9/14/07, Arvids Godjuks [EMAIL PROTECTED] wrote: Don't use SQL_CALC_FOUND ROWS on simple queries, when you have to run a

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-14 Thread Zoltán Németh
2007. 09. 14, péntek keltezéssel 10.50-kor mike ezt írta: except i think innodb does not have a full row count stored. of course not, but SQL_CALC_FOUND_ROWS does not use that. it is working like it selects the rows and counts them. and in the case of complex queries (where you use more than one

[PHP] About MYSQL/PHP Shopping Cart's Product Quantity Change Input Forms

2007-09-14 Thread Ji H. Park
*The question: How would you have multiple text input forms (on shopping cart page) with different inputted data (product quantities) submitted for querying the database (for changing the quantity of multiple products in the shopping cart at the same time)?*** *Here is an ideal example to

Re: [PHP] About MYSQL/PHP Shopping Cart's Product Quantity Change Input Forms

2007-09-14 Thread Gavin M. Roy
Name all your input boxes the same thing, and include a similar level hidden input: input type=hidden name=sku[] value=abc123 / input type=text name=qty[] value=1 / input type=hidden name=sku[] value=abc321 / input type=text name=qty[] value=2 / on your POST $_POST['sku'] $_POST['qty'] will be

RE: [PHP] About MYSQL/PHP Shopping Cart's Product Quantity Change Input Forms

2007-09-14 Thread Warren Vail
*The question: How would you have multiple text input forms (on shopping cart page) with different inputted data (product quantities) submitted for querying the database (for changing the quantity of multiple products in the shopping cart at the same time)?*** easy, you can cause multiple

Re: [PHP] About MYSQL/PHP Shopping Cart's Product Quantity Change Input Forms

2007-09-14 Thread brian
Ji H. Park wrote: *The question: How would you have multiple text input forms (on shopping cart page) with different inputted data (product quantities) submitted for querying the database (for changing the quantity of multiple products in the shopping cart at the same time)?*** *Here is an

[PHP] $ SERVER[REQUEST URI] includes domain unexpectedly

2007-09-14 Thread junk
In my old server running Apache 1.3 and PHP 4 this code will return just the URI as expected: $_SERVER[REQUEST_URI] = /some-html-file.html In my new server with Apache 2 PHP 4 this code returns the domain: $_SERVER[REQUEST_URI] = /full-domain-name.com/some-html-file.html Does