Re: [PHP] goto - My comments

2010-12-21 Thread Jim Lucas
On 12/18/2010 9:17 PM, Ethan Rosenberg wrote: Dear List - Thanks to all for your EXCELLENT comments. I definitly agree that goto is a command to be avoided at all costs. In this case, I could not figure out how to acheive the desired result without the goto. So being a newbie, I humbly reque

[PHP] Re: Warning when calling session_start()

2010-12-21 Thread webdev
Hi, folks, On Tue, 21 Dec 2010 21:35:17 -0800 [06:35:17 AM CET], Michael Shadle wrote: > first - this is probably your culprit: > don't output empty lines before you do > anything (just a general good practice) Whow! This did the trick ! Warning vanished when I changed beginning of script to:

Re: [PHP] Warning when calling session_start()

2010-12-21 Thread Michael Shadle
On Tue, Dec 21, 2010 at 9:27 PM, wrote: >   Warning: session_start() [function.session-start]: >   Cannot send session cache limiter - headers already >   sent (output started at /./sess.php:3) in >   /./sess.php on line 5 first - this is probably your culprit: don't output empty lines

[PHP] Warning when calling session_start()

2010-12-21 Thread webdev
Hi, folks, good morning ! Since I'm a newbie with respect of sessions & cookies I'm quite lost here getting always a warning when calling session_start(); I developed and tested some php code using a session to pass some values betwen different scripts on my local machine. All went O.K. But whe

[PHP] Warning when calling session_start()

2010-12-21 Thread webdev
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Is there a simple way to enforce a private method in a subclass?

2010-12-21 Thread Carlos Medina
Am 21.12.2010 17:36, schrieb Richard Quadling: Hi. If I have an abstract class of Task and I want all subclasses of Task to have a private method _runTask, is there a way to enforce this? Currently an abstract private function in an abstract class isn't allowed. Fatal error: Abstract function

Re: [PHP] Problem with Include

2010-12-21 Thread Bastien Koert
On Tue, Dec 21, 2010 at 1:28 PM, a...@ashleysheridan.co.uk wrote: > (Apologies for top posting; on my mobile just now.) > > Not true. Refactoring code is one of the main tasks of a developer. None of > us produce perfect code, and some code is less perfect than other code. It's > instinct to wan

Re: [PHP] Problem with Include

2010-12-21 Thread Ravi Gehlot
Hello, Good points. If you are getting paid to do that then fine. There is a difference between enhancing code and wasting time. I do my best to come up with the best I can. I always take notes to perform better in upcoming projects. It is imperative to make good use of time. Unless it is a securi

Re: [PHP] PDO Prepared Statements and stripslashes

2010-12-21 Thread Rico Secada
On Tue, 21 Dec 2010 10:32:21 -0500 Adam Richardson wrote: > 1. Turn off magic_quotes_gpc if on, as its use has been deprecated. > 2. Use prepared statements. > 3. Don't worry about stripping slashes ever again :) Thank you for a very enlightening answer. I guess I misunderstood the "PDO automati

Re: [PHP] Problem with Include

2010-12-21 Thread a...@ashleysheridan.co.uk
(Apologies for top posting; on my mobile just now.) Not true. Refactoring code is one of the main tasks of a developer. None of us produce perfect code, and some code is less perfect than other code. It's instinct to want to fix bad code when we're maintaining it or having to add new features t

Re: [PHP] Re: Session problem

2010-12-21 Thread Ravi Gehlot
Walter, Session variables may be using cookies which in turn create temp files for storing such cookies. Ravi. On Tue, Dec 21, 2010 at 11:32 AM, Walter Caielli wrote: > I've fixed the problem. > I don't know why, but suddenly windows prevents PHP from writing into > C:\windows\temp directory.

Re: [PHP] Is there a simple way to enforce a private method in a subclass?

2010-12-21 Thread David Harkness
On Tue, Dec 21, 2010 at 8:36 AM, Richard Quadling wrote: > If I have an abstract class of Task and I want all subclasses of Task > to have a private method _runTask, is there a way to enforce this? > I cannot think of a reason to force a class to have a specifically-named *private* method. Since

Re: [PHP] Common session for all subdomains?

2010-12-21 Thread Ravi Gehlot
Daniel, Good info. Ravi. On Tue, Dec 21, 2010 at 10:23 AM, Daniel Brown wrote: > On Tue, Dec 21, 2010 at 02:27, Ravi Gehlot wrote: > > That's a good question. > > > > There should be a setting on php.ini to allow cross session. > > Right. Because who needs to teach folks about computer

Re: [PHP] PHPInfo disabled due to security

2010-12-21 Thread Ravi Gehlot
Hello there, GoDaddy show 20M for their limit size when they only allow a max of 5.6 MB of upload. So what I mean is don't try what you see from php_info(). Ravi. On Tue, Dec 21, 2010 at 9:48 AM, Daniel Brown wrote: > On Tue, Dec 21, 2010 at 02:40, Ravi Gehlot wrote: > > Hello there, > > >

Re: [PHP] Problem with Include

2010-12-21 Thread Ravi Gehlot
If something is working and you don't know exactly whats under the hood then you are wasting your time in trying to re-invent your own wheel and waste your time and resources to modify something that isn't needed to be touched. Good programmers make good use of their time as well. We need to keep i

[PHP] Is there a simple way to enforce a private method in a subclass?

2010-12-21 Thread Richard Quadling
Hi. If I have an abstract class of Task and I want all subclasses of Task to have a private method _runTask, is there a way to enforce this? Currently an abstract private function in an abstract class isn't allowed. Fatal error: Abstract function Task::_runTask() cannot be declared private in D:

Re: [PHP] Ways to attend usergroups meeting

2010-12-21 Thread Daniel Brown
On Tue, Dec 21, 2010 at 11:07, wrote: > Thanks for the link. > I already been through the given link. But, it is filled with inactive and > non-responsive groups. I was hoping to get in touch with an active one. We don't seem to have any user group events for Mumbai on the calendar, either.

[PHP] Re: Session problem

2010-12-21 Thread Walter Caielli
I've fixed the problem. I don't know why, but suddenly windows prevents PHP from writing into C:\windows\temp directory. Moving the session and log files to another directory solved the problem. Until few days ago it worked. I've now to discovered what was changed in windows configuration. ""W

Re: [PHP] Ways to attend usergroups meeting

2010-12-21 Thread vikash . iitb
Thanks for the link. I already been through the given link. But, it is filled with inactive and non-responsive groups. I was hoping to get in touch with an active one. Thanks, Vikash Kumar -- http://vika.sh On 21 December 2010 21:00, Daniel Brown wrote: > On Tue, Dec 21, 2010 at 05:35, wrot

Re: [PHP] PDO Prepared Statements and stripslashes

2010-12-21 Thread Adam Richardson
On Mon, Dec 20, 2010 at 11:31 PM, Rico Secada wrote: > Hi. > > In an article about SQL Injection by Chris Shiflett he mentions the > following in a comment: "The process of escaping should preserve data, > so it should never be necessary to reverse it. When I'm auditing an > application, things l

[PHP] Re: PHPmailer.. best way to send to many recipients?

2010-12-21 Thread Govinda
Hi, I regularly use PHPMailer to send out a mailshot to two batches of 5 and had no problems at all. I would not use BCC. Just set the recipient, send the email, then use the ClearAllRecipients() function and start again. We do other things like set a custom MessageID for tracking bounc

Re: [PHP] Ways to attend usergroups meeting

2010-12-21 Thread Daniel Brown
On Tue, Dec 21, 2010 at 05:35, wrote: > Hi, > > I want to know if there is a central repo of all the php usergroups and its > activities. wiki.php.net page is empty on this topic. Anyone aware of a php > group meetings in Mumbai, India? If not, how to go about starting it? http://links.paras

Re: [PHP] Common session for all subdomains?

2010-12-21 Thread Daniel Brown
On Tue, Dec 21, 2010 at 02:27, Ravi Gehlot wrote: > That's a good question. > > There should be a setting on php.ini to allow cross session. Right. Because who needs to teach folks about computer security when we can just disable it for them anyway? Like Jonathan pointed out, it's a mat

Re: [PHP] Problem with Include

2010-12-21 Thread Paul M Foster
On Tue, Dec 21, 2010 at 02:35:33AM -0500, David Hutto wrote: > On Tue, Dec 21, 2010 at 2:29 AM, Ravi Gehlot wrote: > > Why mess with something that is already working? If you are trying to make > > it pretty then you are not solving a problem. You are creating one. > > > Define working. I've ha

Re: [PHP] Problem with Include

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 9:54 AM, David Hutto wrote: > On Tue, Dec 21, 2010 at 9:50 AM, Daniel P. Brown > wrote: >> On Tue, Dec 21, 2010 at 02:48, Ravi Gehlot wrote: >>> My point is that you tried to take code from one page and put it all >>> "organized" in another page and the include that page

Re: [PHP] Problem with Include

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 9:50 AM, Daniel P. Brown wrote: > On Tue, Dec 21, 2010 at 02:48, Ravi Gehlot wrote: >> My point is that you tried to take code from one page and put it all >> "organized" in another page and the include that page of includes back into >> the pages that you want it to feed

Re: [PHP] Problem with Include

2010-12-21 Thread Daniel P. Brown
On Tue, Dec 21, 2010 at 02:48, Ravi Gehlot wrote: > My point is that you tried to take code from one page and put it all > "organized" in another page and the include that page of includes back into > the pages that you want it to feed off from. If stuff works the way that it > does then there a r

Re: [PHP] PHPInfo disabled due to security

2010-12-21 Thread Daniel Brown
On Tue, Dec 21, 2010 at 02:40, Ravi Gehlot wrote: > Hello there, > > If you have a small to medium size web site then go to GoDaddy. Do not > believe all that you see from php_info(). I will give you an example. The > memory_limit it gives on shared hosting does not reflect the one intended > for

[PHP] Re: PHPmailer.. best way to send to many recipients?

2010-12-21 Thread Ian
On 20/12/2010 21:33, Govinda wrote: > followup question, please see below the OP: > >> I just started using PHPmailer for one project that requires SMTP >> authentication (if I said that right).. and all is well.. but I want >> to ask now before it might get outta hand later: >> >> How many comma-

[PHP] Ways to attend usergroups meeting

2010-12-21 Thread vikash . iitb
Hi, I want to know if there is a central repo of all the php usergroups and its activities. wiki.php.net page is empty on this topic. Anyone aware of a php group meetings in Mumbai, India? If not, how to go about starting it? Thanks, Vikash Kumar -- http://vika.sh

[PHP] Session problem

2010-12-21 Thread Walter Caielli
I'm facing the following basic problem: I have made two simple sample files to explain it: 1st file: ".session_id(); echo 'page 1'; ?> 2nd file "; echo session_name().'+'.session_id(); echo $_SESSION['SS_user']; ?> $_SESSION seems to be empty. Nothing is print. Session Name and

Re: [PHP] Problem with Include

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 2:48 AM, Ravi Gehlot wrote: > My point is that you tried to Not me personally. take code from one page and put it all > "organized" in another page and the include that page of includes back into > the pages that you want it to feed off from. If stuff works the way that