[PHP] segmentation faults

2003-08-14 Thread Martin Peck
hi, I have a large project underway which is (hopefully!) nearing completion, running on the latest stable release, 4.3.2. However, strange things have started happening... My main page sometimes causes Apache to seg fault at some point during the execution (e.g. [Sun Aug 10 18:05:55 2003]

Re: [PHP] segmentation faults

2003-08-14 Thread Martin Peck
for the response, regards, Martin - Original Message - From: Mike Migurski [EMAIL PROTECTED] To: Martin Peck [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, August 10, 2003 8:57 PM Subject: Re: [PHP] segmentation faults I have a large project underway which is (hopefully!) nearing

Re: [PHP] segmentation faults

2003-08-14 Thread Martin Peck
- Original Message - From: Tom Rogers [EMAIL PROTECTED] Most programs will crash with null pointers so I operate with error reporting set to E_ALL and it helps when these sort of things happen. A function should never trust what it is being fed :) so your solution is the right way, I

Re: [PHP] Correct Coding

2003-08-14 Thread Martin Peck
That can generate an error if $Task was never assigned a value. could you not do if(@$Task == Add ){do something } to suppress the error of the variable not being set? I have never seen php give an error if $Task is not set to anything. I would have said that if (Add == $Task) { Do

[PHP] strange foreach behaviour

2003-08-05 Thread Martin Peck
I have come up against a very strange problem. I currently have no idea how to even approach attempting to fix it... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: strange foreach behaviour

2003-08-05 Thread Martin Peck
My apologies for the last post - somehow managed to send whilst attempting to copy and paste... d'oh. I'd like to try again. I have come up against a very strange problem. I currently have no idea how to even approach attempting to fix it... In the following code snippet, $this-items is an

[PHP] problem: creating global alias inside function

2003-07-28 Thread Martin Peck
The following code illustrates a problem I've got with references (running on PHP 4.3.2). Can anyone explain it for me? Thanks in advance for any assistance! Martin ?php $globalvariable = 0; $one = 1; //want to set up $globalvariable as a reference to $one setglobal($one); echo

Re: [PHP] uploading a file from a form

2003-07-28 Thread Martin Peck
Amanda, You need to look at some of the error messages that are available to you: 1) remove the prepended @ from the file functions. This will tell what is going wrong with the file copy. if ([EMAIL PROTECTED]($photo, $long_path . company_logo/ . $photo_name)) { echo Copy failed.;