Re: [PHP] if elseif elseif elseif....

2009-03-05 Thread leledumbo
Daniel Brown-7 wrote: > > On Wed, Mar 4, 2009 at 20:10, Al wrote: >> >> $obligatoryFieldNotPresent=null; >> >> foreach($_POST, as $value) >> { >>if(!empty($value)continue; > > Parse error. ;-P > There should be no comma there. See http://id2.php.net/manual/en/control-structures.

Re: [PHP] whoami explanation

2009-03-05 Thread Ashley Sheridan
On Wed, 2009-03-04 at 19:54 -0500, Robert Cummings wrote: > On Wed, 2009-03-04 at 23:21 +, Ashley Sheridan wrote: > > On Wed, 2009-03-04 at 18:14 -0500, PJ wrote: > > > Ashley Sheridan wrote: > > > > On Wed, 2009-03-04 at 17:46 -0500, Robert Cummings wrote: > > > > > > > >> On Wed, 2009-03-0

Re: [PHP] if elseif elseif elseif....

2009-03-05 Thread chris smith
>>> $obligatoryFieldNotPresent=null; >>> >>> foreach($_POST, as $value) >>> { >>>        if(!empty($value)continue; >> >>     Parse error.  ;-P >> > There should be no comma there. That fixes one, what about the rest? ;) -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Robert Cummings
On Wed, 2009-03-04 at 18:01 -0800, Michael A. Peters wrote: > Robert Cummings wrote: > > On Wed, 2009-03-04 at 15:21 -0800, Michael A. Peters wrote: > >> Robert Cummings wrote: > >> > >>> To punt what is repeated over and over during runtime to a single > >>> compilation phase when building the tem

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Robert Cummings
On Wed, 2009-03-04 at 21:42 -0700, Nathan Nobbe wrote: > On Wed, Mar 4, 2009 at 7:01 PM, Michael A. Peters wrote: > > > echoing html involves mixing html and php. > > Using an XML class (like DOMDocument) to build the document does not. > > > ive actually written a little templating system which

Re: [PHP] whoami explanation

2009-03-05 Thread Robert Cummings
On Thu, 2009-03-05 at 08:21 +, Ashley Sheridan wrote: > On Wed, 2009-03-04 at 19:54 -0500, Robert Cummings wrote: > > On Wed, 2009-03-04 at 23:21 +, Ashley Sheridan wrote: > > > On Wed, 2009-03-04 at 18:14 -0500, PJ wrote: > > > > Ashley Sheridan wrote: > > > > > On Wed, 2009-03-04 at 17:46

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Michael A. Peters
Robert Cummings wrote: On Wed, 2009-03-04 at 18:01 -0800, Michael A. Peters wrote: Robert Cummings wrote: On Wed, 2009-03-04 at 15:21 -0800, Michael A. Peters wrote: Robert Cummings wrote: To punt what is repeated over and over during runtime to a single compilation phase when building the t

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Robert Cummings
On Thu, 2009-03-05 at 02:04 -0800, Michael A. Peters wrote: > Robert Cummings wrote: > > On Wed, 2009-03-04 at 18:01 -0800, Michael A. Peters wrote: > >> Robert Cummings wrote: > >>> On Wed, 2009-03-04 at 15:21 -0800, Michael A. Peters wrote: > Robert Cummings wrote: > > > To punt wha

[PHP] Re: if elseif elseif elseif....

2009-03-05 Thread Davi Ramos
I tought you forgot to initializae the $obligatoryFieldNotPresent variable, as PHP create variables when they are initialized, the $obligatoryFieldNotPresent variable is created inside the if. $obligatoryFieldNotPresent = 0; if (strlen($_POST["titleIN"]) == 0 ) { $obligatoryFieldNotPre

Re: [PHP] Re: if elseif elseif elseif....

2009-03-05 Thread PJ
Davi Ramos wrote: > I tought you forgot to initializae the $obligatoryFieldNotPresent variable, > as PHP create variables when they are initialized, the > $obligatoryFieldNotPresent variable is created inside the if. > > $obligatoryFieldNotPresent = 0; > > if (strlen($_POST["titleIN"]) == 0 ) { >

Re: [PHP] whoami explanation

2009-03-05 Thread PJ
Shawn McKenzie wrote: > Shawn McKenzie wrote: > >> PJ wrote: >> >>> Shawn McKenzie wrote: >>> Robert Cummings wrote: > On Wed, 2009-03-04 at 15:48 -0600, Shawn McKenzie wrote: > > >> Whatever you do, please, please, please, f

Re: [PHP] Strange charecters

2009-03-05 Thread David Robley
Ashley Sheridan wrote: > On Wed, 2009-03-04 at 08:02 -0500, Bastien Koert wrote: >> On Wed, Mar 4, 2009 at 2:10 AM, Paul Scott wrote: >> >> > On Wed, 2009-03-04 at 10:09 +0530, Chetan Rane wrote: >> > > I am using ob_start() in my application. However I am getting this >> > > error about headers

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Michael A. Peters
Robert Cummings wrote: >> >> function hiddenInput($document,$name,$value) { >> $input = $document->createElement("input"); >> $input->setAttribute("type","hidden"); >> $input->setAttribute("name",$name); >> $input->setAttribute("value",$value); >> return($input); >> } >> >

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Robert Cummings
On Thu, 2009-03-05 at 03:08 -0800, Michael A. Peters wrote: > Robert Cummings wrote: > > >> > >> function hiddenInput($document,$name,$value) { > >> $input = $document->createElement("input"); > >> $input->setAttribute("type","hidden"); > >> $input->setAttribute("name",$name); >

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Michael A. Peters
Robert Cummings wrote: Is there a reason I shouldn't be doing it that way? I didn't say you shouldn't. It's just expensive on every page request to regenerate a document node by node. it also strikes me as tedious :/ It's definitely tedious - but I end up writing functions that do the tedi

Re: [PHP] if elseif elseif elseif....

2009-03-05 Thread Al
Al wrote: PJ wrote: PJ wrote: Daniel Brown wrote: On Wed, Mar 4, 2009 at 17:51, PJ wrote: elseif ($obligatoryFieldNotPresent = 1) { $obligatoryFieldNotPresent = 0; } Are you certain you only wanted a single equal operator in the last elseif() cond

[PHP] DOM recursion

2009-03-05 Thread Joanne Lane
I am trying to create a class that recursively iterates over an array an creates XML tree to reflect a multidimensional array. I am not really a PHP coder, but am trying my hand. This is what I have so far. http://pastie.org/private/w75vyq9ub09p0uawteyieq I have tried a few methods, but I keep fai

RE: [PHP] $_FILES empty, trouble with uploading

2009-03-05 Thread Karl St-Jacques
Thanks to both of you. It seems the problem lies with Apache, actually. I did try the script with my install of lighttpd on the same server, and it goes flawlessly. It's not the first time this apache server give me trouble. So I'll use lighttpd and give one finger to this particular apache s

[PHP] Re: Strange charecters

2009-03-05 Thread Al
Chetan Rane wrote: Hi gang I am using ob_start() in my application. However I am getting this error about headers already sent. I have put ob_start at the beginning of the script. I think this has to do something with Unicode. Can anyone explain why this happens. And whats the solution

Re: Re: [PHP] $_FILES empty, trouble with uploading

2009-03-05 Thread zhoo
yes,I agree with Ash ,you can test it on a local testing server or the other server. if it work ,then you can sure it's environment problem. 2009-03-05 zhoo 发件人: Ashley Sheridan 发送时间: 2009-03-05 04:10:02 收件人: Karl St-Jacques 抄送: php-general 主题: Re: [PHP] $_FILES empty, trouble wit

Re: [PHP] Re: Question about template systems

2009-03-05 Thread Nathan Nobbe
On Mar 5, 2009, at 4:16 AM, Robert Cummings wrote: On Thu, 2009-03-05 at 03:08 -0800, Michael A. Peters wrote: Robert Cummings wrote: function hiddenInput($document,$name,$value) { $input = $document->createElement("input"); $input->setAttribute("type","hidden"); $input->setAttri

[PHP] Testing gmail submission

2009-03-05 Thread haliphax
Got tired of using Microsoft Outlook to sort the PHP list discussions... apparently a lot of people use GMail for this, so I figured I would hook it into my GMail account and see what happens. // Todd

[PHP] PHP script lag (5 secs) when declaring mime type.

2009-03-05 Thread Jsbeginner
Hello, I don't know for sure is this problem is only related to PHP so I hope I've posted in the right list. My problem is that with certain headers my script takes about 5 seconds before sending the page, no matter how small the file I try to load... My server : Centos Apache 2.2 PHP 5.2.9

RE: [PHP] possible session bug - Mantis Bug Tracker

2009-03-05 Thread Edsall, William (WJ)
Just wanted to follow up with this and let any interested parties know.. This ended up being a problem with Mantis' feature to grab users email addresses from LDAP. Disabling this solved the issue. -Original Message- From: Robert Cummings [mailto:rob...@interjinn.com] Sent: Tuesday, Mar

Re: [PHP] Testing gmail submission

2009-03-05 Thread Daniel Brown
On Thu, Mar 5, 2009 at 09:20, haliphax wrote: > Got tired of using Microsoft Outlook to sort the PHP list discussions... > apparently a lot of people use GMail for this, so I figured I would hook it > into my GMail account and see what happens. Boyd? -- daniel.br...@parasane.net || danbr..

Re: [PHP] Testing gmail submission

2009-03-05 Thread haliphax
On Thu, Mar 5, 2009 at 8:56 AM, Daniel Brown wrote: > > On Thu, Mar 5, 2009 at 09:20, haliphax wrote: > > Got tired of using Microsoft Outlook to sort the PHP list discussions... > > apparently a lot of people use GMail for this, so I figured I would hook it > > into my GMail account and see what

Re: [PHP] DOM recursion

2009-03-05 Thread Jochem Maas
Joanne Lane schreef: > I am trying to create a class that recursively iterates over an array an > creates XML tree to reflect a multidimensional array. > I am not really a PHP coder, but am trying my hand. I've seen 'real coders' write stuff thats leagues worse. > This is what I have so far. > ht

Re: [PHP] PHP script lag (5 secs) when declaring mime type.

2009-03-05 Thread Jochem Maas
Jsbeginner schreef: > Hello, > > I don't know for sure is this problem is only related to PHP so I hope > I've posted in the right list. > > My problem is that with certain headers my script takes about 5 seconds > before sending the page, no matter how small the file I try to load... > My server

Re: [PHP] Conclusion of "use strict"...

2009-03-05 Thread 9el
--- Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a Free CD of Ubuntu mailed to your door without any cost. Visit : www.ubuntu.com -- On

Re: [PHP] Testing gmail submission

2009-03-05 Thread Daniel Brown
On Thu, Mar 5, 2009 at 10:05, haliphax wrote: > > Indeed, it is I! Now, if I can only figure out how to keep GMail from > mangling quotes... ah, there's the Plain Text button! :) Yeah, and if only we could get a GreaseMonkey script to stop top-posting by default. Not to suggest that you did,

Re: [PHP] Conclusion of "use strict"...

2009-03-05 Thread Jochem Maas
9el schreef: > --- > Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get > a Free CD of Ubuntu mailed to your door without any cost. Visit : > www.ubuntu.com >

Re: [PHP] Testing gmail submission

2009-03-05 Thread haliphax
On Thu, Mar 5, 2009 at 9:22 AM, Daniel Brown wrote: > On Thu, Mar 5, 2009 at 10:05, haliphax wrote: >> >> Indeed, it is I! Now, if I can only figure out how to keep GMail from >> mangling quotes... ah, there's the Plain Text button! :) > >Yeah, and if only we could get a GreaseMonkey script t

Re: [PHP] Re: [PHP-DB] Re: Problems with displaying results

2009-03-05 Thread Terion Miller
On Tue, Mar 3, 2009 at 2:16 PM, Ashley Sheridan wrote: > On Tue, 2009-03-03 at 11:08 -0600, Terion Miller wrote: > > On Tue, Mar 3, 2009 at 10:32 AM, Shawn McKenzie >wrote: > > > > > Terion Miller wrote: > > > > I have two queries one pulls out which users to use and the second > pulls > > > > t

Re: [PHP] Conclusion of "use strict"...

2009-03-05 Thread 9el
> > do we need these extra bytes in every email? > Extremely sorry about that :) > > > > > > I completely agree with Hans, as PHP cant be directly compared to that of > > java's behaviour. > > Hans is the OP, the one you thought "got it all wrong.", you're actually > agree with me ... which is a

[PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Nigel Green
Hi all, This is my first post to the list. Have been observing for a few weeks and have learnt a lot. I am having an issue in one of my scripts where using the mysql_real_escape_string function is stripping content out of my input data. All is working well on my local installation, but when t

Re: [PHP] PHP script lag (5 secs) when declaring mime type.

2009-03-05 Thread Jsbeginner
Hello, Just to say that I've got a bit further in my search : (Content-Length line removed) Has no lag... My guess is there is a problem with gzip or something that corrupts the content-length. So I'm still not sure if this is a PHP problem or an apache problem but any help would be great

Re: [PHP] PHP script lag (5 secs) when declaring mime type.

2009-03-05 Thread haliphax
On Thu, Mar 5, 2009 at 10:27 AM, Jsbeginner wrote: > Hello, Just to say that I've got a bit further in my search : > > header('Content-Type: application/x-javascript'); > //header('Content-Length: '.filesize('test.js')); > readfile('test.js'); > ?> > > (Content-Length line removed) Has no lag...

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 11:16 AM, Nigel Green wrote: > Hi all, > > This is my first post to the list. Have been observing for a few weeks and > have learnt a lot. > > I am having an issue in one of my scripts where using the > mysql_real_escape_string function is stripping content out of my input d

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread haliphax
On Thu, Mar 5, 2009 at 10:52 AM, Eric Butera wrote: > On Thu, Mar 5, 2009 at 11:16 AM, Nigel Green wrote: >> Hi all, >> >> This is my first post to the list. Have been observing for a few weeks and >> have learnt a lot. >> >> I am having an issue in one of my scripts where using the >> mysql_real

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 12:00 PM, haliphax wrote: > On Thu, Mar 5, 2009 at 10:52 AM, Eric Butera wrote: >> On Thu, Mar 5, 2009 at 11:16 AM, Nigel Green wrote: >>> Hi all, >>> >>> This is my first post to the list. Have been observing for a few weeks and >>> have learnt a lot. >>> >>> I am having

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread haliphax
On Thu, Mar 5, 2009 at 11:08 AM, Eric Butera wrote: > On Thu, Mar 5, 2009 at 12:00 PM, haliphax wrote: >> On Thu, Mar 5, 2009 at 10:52 AM, Eric Butera wrote: >>> On Thu, Mar 5, 2009 at 11:16 AM, Nigel Green wrote: Hi all, This is my first post to the list. Have been observing for

[PHP] Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Re: Problems with displaying results

2009-03-05 Thread Lex Braun
On Thu, Mar 5, 2009 at 10:30 AM, Terion Miller wrote: > Still having problems with getting this script to work, the first part of > the query does now work since I used the suggested JOIN, so my results are > there and I can echo them but now I can't seem to get them to display > neatly > somehow:

Re: [PHP] PHP script lag (5 secs) when declaring mime type.

2009-03-05 Thread Jsbeginner
Thankyou, I took "application/x-javascript" directly from the apache setup for my domain so this should be correct. However I've just deactivated gzip (zlib.output_compression OFF in php.ini) and that stopped the problem. I've given you a simplified version of the script that has the exact s

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 12:21 PM, haliphax wrote: > On Thu, Mar 5, 2009 at 11:08 AM, Eric Butera wrote: >> On Thu, Mar 5, 2009 at 12:00 PM, haliphax wrote: >>> On Thu, Mar 5, 2009 at 10:52 AM, Eric Butera wrote: On Thu, Mar 5, 2009 at 11:16 AM, Nigel Green wrote: > Hi all, > >

Re: [PHP] PHP script lag (5 secs) when declaring mime type.

2009-03-05 Thread 9el
On Thu, Mar 5, 2009 at 11:34 PM, Jsbeginner wrote: > Thankyou, > > I took "application/x-javascript" directly from the apache setup for my > domain so this should be correct. > > However I've just deactivated gzip (zlib.output_compression OFF in php.ini) > and that stopped the problem. > I've give

Re: [PHP] PHP script lag (5 secs) when declaring mime type.

2009-03-05 Thread Andrew Ballard
On Thu, Mar 5, 2009 at 12:34 PM, Jsbeginner wrote: > Thankyou, > > I took "application/x-javascript" directly from the apache setup for my > domain so this should be correct. > > However I've just deactivated gzip (zlib.output_compression OFF in php.ini) > and that stopped the problem. > I've give

[PHP] Re: PHP script lag (5 secs) when declaring mime type.

2009-03-05 Thread Nisse Engström
On Thu, 05 Mar 2009 15:45:35 +0100, Jsbeginner wrote: > header('Content-Type: application/x-javascript'); > header('Content-Length: '.filesize('test.js')); > readfile('test.js'); > ?> > > test.js is only a few lines long, and if I remove the header content > type the file loads instantaniously

Re: [PHP] PHP script lag (5 secs) when declaring mime type.

2009-03-05 Thread Andrew Ballard
On Thu, Mar 5, 2009 at 1:26 PM, Jsbeginner wrote: > Thankyou Andrew Ballard and 9Tel , You're welcome. However, you forgot to reply to the list. > You both suggest that it's not necessory to set the Content-Length except > for images etc ... well the problem is that I also need to use this scr

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread haliphax
On Thu, Mar 5, 2009 at 11:41 AM, Eric Butera wrote: > On Thu, Mar 5, 2009 at 12:21 PM, haliphax wrote: >> On Thu, Mar 5, 2009 at 11:08 AM, Eric Butera wrote: >>> On Thu, Mar 5, 2009 at 12:00 PM, haliphax wrote: On Thu, Mar 5, 2009 at 10:52 AM, Eric Butera wrote: > Make sure to always

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 1:47 PM, haliphax wrote: > On Thu, Mar 5, 2009 at 11:41 AM, Eric Butera wrote: >> On Thu, Mar 5, 2009 at 12:21 PM, haliphax wrote: >>> On Thu, Mar 5, 2009 at 11:08 AM, Eric Butera wrote: On Thu, Mar 5, 2009 at 12:00 PM, haliphax wrote: > On Thu, Mar 5, 2009 at 1

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread haliphax
On Thu, Mar 5, 2009 at 2:00 PM, Eric Butera wrote: > On Thu, Mar 5, 2009 at 1:47 PM, haliphax wrote: >> On Thu, Mar 5, 2009 at 11:41 AM, Eric Butera wrote: >>> On Thu, Mar 5, 2009 at 12:21 PM, haliphax wrote: On Thu, Mar 5, 2009 at 11:08 AM, Eric Butera wrote: > On Thu, Mar 5, 2009 at

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 3:07 PM, haliphax wrote: > Sadly, my company is throwing PHP out the window in favor of ASP.NET, > as they have an irrational fear of Open Source software. Don't get me > wrong--.NET is pretty darn cool--but I literally enjoy working in PHP. > The fact that I don't need an I

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Nigel Green
On 05/03/09, Eric Butera wrote: Make sure to always pass your active database connection into the second parameter of mysql_real_escape_string. There could be character set differences between your two servers too that might be causing issues for you. If at all possible I would recommend upgra

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 3:29 PM, Nigel Green wrote: > On 05/03/09, Eric Butera wrote: > >> Make sure to always pass your active database connection into the >> second parameter of mysql_real_escape_string.  There could be >> character set differences between your two servers too that might be >> ca

[PHP] (SOLVEDV) Re: Problems with displaying results

2009-03-05 Thread Terion Miller
Thanks everyone it was the WHILE I just moved the ending bracket and presto results show in tables... Thanks Terion Happy Freecycling Free the List !! www.freecycle.org Over Moderation of Freecycle List Prevents Post Timeliness. Twitter? http://twi

[PHP] trouble sending japanese to mysql database!

2009-03-05 Thread James
Right, I'm having some rather strange issues between mysql and php when it comes to inserting Japanese text. I have the table and fields set to utf8_unicode_ci, if I use phpmyAdmin to insert japanese text through the interface it works just fine. If I use phpmyadmin but type in the mysql insert

Re: [PHP] trouble sending japanese to mysql database!

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 2:06 PM, James wrote: > Right, I'm having some rather strange issues between mysql and php when it > comes to inserting Japanese text. I have the table and fields set to > utf8_unicode_ci, if I use phpmyAdmin to insert japanese text through the > interface it works just fine

[PHP] Re: PHP script lag (5 secs) when declaring mime type.

2009-03-05 Thread Nisse Engström
On Thu, 5 Mar 2009 19:14:20 +0100, Nisse Engström wrote: > On Thu, 05 Mar 2009 15:45:35 +0100, Jsbeginner wrote: > >> > header('Content-Type: application/x-javascript'); >> header('Content-Length: '.filesize('test.js')); >> readfile('test.js'); >> ?> >> >> test.js is only a few lines long, and i

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread haliphax
On Thu, Mar 5, 2009 at 2:11 PM, Eric Butera wrote: > On Thu, Mar 5, 2009 at 3:07 PM, haliphax wrote: >> Sadly, my company is throwing PHP out the window in favor of ASP.NET, >> as they have an irrational fear of Open Source software. Don't get me >> wrong--.NET is pretty darn cool--but I literall

[PHP] Long Execution Time - Safe Mode

2009-03-05 Thread דניאל דנון
Hello. I have a script which updates some database by loading information from external websites. For example, it has a table of website addresses, and it updates their HTML source on the database. I am using cronjobs to activate the script every 8 hours. The problem is the server I am running my

Re: [PHP] Long Execution Time - Safe Mode

2009-03-05 Thread Chris
? wrote: Hello. I have a script which updates some database by loading information from external websites. For example, it has a table of website addresses, and it updates their HTML source on the database. I am using cronjobs to activate the script every 8 hours. The problem is the ser

[PHP] PHP & Apache - Consuming Too much memory

2009-03-05 Thread Shota Gedenidze
Php and apache memory problem. I have apache and php, recently added APC module to php, and after that each apache process consumes 30-100 mb of resident memory. Operating System is Linux. Does anybody have Idea how to optimize php to consume less memory? Your help is greatly appreciated, Thank y

Re: [PHP] Long Execution Time - Safe Mode

2009-03-05 Thread Dotan Cohen
2009/3/5 דניאל דנון : > Hello. > I have a script which updates some database by loading information from > external websites. > For example, it has a table of website addresses, and it updates their HTML > source on the database. > I am using cronjobs to activate the script every 8 hours. > > The p

Re: [PHP] Long Execution Time - Safe Mode

2009-03-05 Thread Chris
Firstly always cc the mailing list so others can add their own suggestions. Also please don't put your reply at the top, it makes it very hard to follow what's going on. Put it underneath or inline (put comments after mine and put more later on). ? wrote: Several problems Firs

Re: [PHP] PHP & Apache - Consuming Too much memory

2009-03-05 Thread Chris
Shota Gedenidze wrote: Php and apache memory problem. I have apache and php, recently added APC module to php, and after that each apache process consumes 30-100 mb of resident memory. Operating System is Linux. Does anybody have Idea how to optimize php to consume less memory? ini_set('memory

Re: [PHP] trouble sending japanese to mysql database!

2009-03-05 Thread James
Ah, no I hadn't (*red face*), thanks very much, works beautifully now! James "Eric Butera" wrote in message news:6a8639eb0903051302s3b398a00m2287b15a33d3b...@mail.gmail.com... > On Thu, Mar 5, 2009 at 2:06 PM, James > wrote: >> Right, I'm having some rather strange issues between mysql and p

Re: [PHP] Long Execution Time - Safe Mode

2009-03-05 Thread haliphax
On Thu, Mar 5, 2009 at 4:14 PM, Chris wrote: > > Firstly always cc the mailing list so others can add their own suggestions. > > Also please don't put your reply at the top, it makes it very hard to follow > what's going on. Put it underneath or inline (put comments after mine and > put more later

[PHP] concat woes

2009-03-05 Thread PJ
Here we go again! I'm trying to do some form entry verification and am trying to figure out how to verify if there are 4 fields entered: f_nameIN, l_nameIN, f_name2IN, l_name2IN Verifying for each is ok, but somewhat tortured and long. I thought of using CONCAT_WS but it doesn't seem to listen to m

Re: [PHP] concat woes

2009-03-05 Thread haliphax
On Thu, Mar 5, 2009 at 4:34 PM, PJ wrote: > Here we go again! > I'm trying to do some form entry verification and am trying to figure > out how to verify if there are 4 fields entered: > f_nameIN, l_nameIN, f_name2IN, l_name2IN > Verifying for each is ok, but somewhat tortured and long. I thought

Re: [PHP] concat woes

2009-03-05 Thread Chris
PJ wrote: Here we go again! I'm trying to do some form entry verification and am trying to figure out how to verify if there are 4 fields entered: f_nameIN, l_nameIN, f_name2IN, l_name2IN Verifying for each is ok, but somewhat tortured and long. I thought of using CONCAT_WS but it doesn't seem to

[PHP] Re: if elseif elseif elseif....

2009-03-05 Thread Clancy
On Wed, 04 Mar 2009 17:51:11 -0500, af.gour...@videotron.ca (PJ) wrote: >This is probably a mysql question, but their list is rather dull - I >think they don't appreciate my humor. Beside this list is fun ... and >informative. >Anyway, I can't figure this out. I am trying to verify inputs on a for

[PHP] verify problem

2009-03-05 Thread PJ
And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) { $obligatoryFieldNotPresent = 1; ... this does not: if (strlen($_POST["first_nameIN"]) > 0 ) && (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ", $last_nameIN); else (echo "error";)} But, $first_nameIn an

Re: [PHP] Re: if elseif elseif elseif....

2009-03-05 Thread Chris
Rather than encoding all the variable names into one long unwieldy set of statements, I would put them all into an array, and then use a loop to process the array. This way all the variable names are together, and the next time you want to enter another set of variables you can use the same c

Re: [PHP] concat woes

2009-03-05 Thread PJ
haliphax wrote: > On Thu, Mar 5, 2009 at 4:34 PM, PJ wrote: > >> Here we go again! >> I'm trying to do some form entry verification and am trying to figure >> out how to verify if there are 4 fields entered: >> f_nameIN, l_nameIN, f_name2IN, l_name2IN >> Verifying for each is ok, but somewhat t

Re: [PHP] verify problem

2009-03-05 Thread Chris
PJ wrote: And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) { $obligatoryFieldNotPresent = 1; ... this does not: if (strlen($_POST["first_nameIN"]) > 0 ) && (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ", $last_nameIN); else (echo "error";)} But, $fir

Re: [PHP] verify problem

2009-03-05 Thread PJ
Chris wrote: > PJ wrote: >> And again, this works: >> if (strlen($_POST["first_nameIN"]) == 0 ) { >> $obligatoryFieldNotPresent = 1; ... >> >> this does not: >> >> if (strlen($_POST["first_nameIN"]) > 0 ) && >> (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ", >> $last_nam

Re: [PHP] verify problem

2009-03-05 Thread Nathan Rixham
Chris wrote: PJ wrote: And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) { $obligatoryFieldNotPresent = 1; ... this does not: if (strlen($_POST["first_nameIN"]) > 0 ) && (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ", $last_nameIN); else (echo "error"

Re: [PHP] verify problem

2009-03-05 Thread Chris
Are both first_nameIN AND last_nameIN longer than 0 chars? var_dump($_POST['first_nameIN']); var_dump($_POST['last_nameIN']); maybe you only filled in first_name or last_name but not both. Well, echo $first_nameIN, " ", $last_nameIN; Prints out the whole name - without the if clause; and I'v

Re: [PHP] verify problem

2009-03-05 Thread PJ
Nathan Rixham wrote: > Chris wrote: >> PJ wrote: >>> And again, this works: >>> if (strlen($_POST["first_nameIN"]) == 0 ) { >>> $obligatoryFieldNotPresent = 1; ... >>> >>> this does not: >>> >>> if (strlen($_POST["first_nameIN"]) > 0 ) && >>> (strlen($_POST["last_nameIN"]) > 0 ) { echo

Re: [PHP] verify problem

2009-03-05 Thread PJ
Chris wrote: > >>> Are both first_nameIN AND last_nameIN longer than 0 chars? >>> >>> var_dump($_POST['first_nameIN']); >>> var_dump($_POST['last_nameIN']); >>> >>> maybe you only filled in first_name or last_name but not both. >>> >> Well, >> echo $first_nameIN, " ", $last_nameIN; >> Prints out th

[PHP] Sending out large amounts of email

2009-03-05 Thread Brian Hansen
Hi. Our company is merging with another company and newsletter now needs to go out to more than 100.000 people. Before it was only a couple of thousands. I have developed a mail queue using a database and a cronjob, but I am not in doubt as to what particular solution I need to implement. I have

Re: [PHP] Sending out large amounts of email

2009-03-05 Thread Chris
I have been running some tests with PHP mail() function, PHPMailer and PEAR:Mail using 6000 mails at once. Here's a sumarry of some of the results: PHP mail() send out 6000 mails in 1.75 seconds. PHPMailer using PHP mail() send out 6000 mails in 1.87 seconds. PHPMailer using SMTP send out 6000

Re: [PHP] verify problem

2009-03-05 Thread Nathan Rixham
PJ wrote: Nathan Rixham wrote: Chris wrote: PJ wrote: And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) { $obligatoryFieldNotPresent = 1; ... this does not: if (strlen($_POST["first_nameIN"]) > 0 ) && (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ",

Re: [PHP] Sending out large amounts of email

2009-03-05 Thread Brian Hansen
> > What about 10,000? > I haven't been able to send out more than 6000 at most. It is proberly caused by a limit set in Postfix as you wrote.

Re: [PHP] Sending out large amounts of email

2009-03-05 Thread Chris
Brian Hansen wrote: 2009/3/6 Chris mailto:dmag...@gmail.com>> What about 10,000? I haven't been able to send out more than 6000 at most. It is proberly caused by a limit set in Postfix as you wrote. If you're sending emails one by one in a mail() call there is no limit (one email

[PHP] Re: Sending out large amounts of email

2009-03-05 Thread Nathan Rixham
Brian Hansen wrote: Hi. Our company is merging with another company and newsletter now needs to go out to more than 100.000 people. Before it was only a couple of thousands. I have developed a mail queue using a database and a cronjob, but I am not in doubt as to what particular solution I need

Re: [PHP] verify problem

2009-03-05 Thread Michael A. Peters
PJ wrote: Nathan Rixham wrote: Chris wrote: PJ wrote: And again, this works: if (strlen($_POST["first_nameIN"]) == 0 ) { $obligatoryFieldNotPresent = 1; ... this does not: if (strlen($_POST["first_nameIN"]) > 0 ) && (strlen($_POST["last_nameIN"]) > 0 ) { echo $first_nameIN, " ",

Re: [PHP] Sending out large amounts of email

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 6:20 PM, Brian Hansen wrote: > Hi. > > Our company is merging with another company and newsletter now needs to go > out to more than 100.000 people. Before it was only a couple of thousands. > > I have developed a mail queue using a database and a cronjob, but I am not > in

Re: [PHP] Re: if elseif elseif elseif....

2009-03-05 Thread Clancy
On Fri, 06 Mar 2009 10:16:47 +1100, dmag...@gmail.com (Chris) wrote: > >> Rather than encoding all the variable names into one long unwieldy set of >> statements, I >> would put them all into an array, and then use a loop to process the array. >> This way all >> the variable names are together,

[PHP] Website on a USB key?

2009-03-05 Thread Clancy
I bought some appliance recently, and found that they had thrown in a 2G USB key for good luck. I guess I ought to be able to put a PHP server plus a copy of my website on it for demonstration purposes, but has anyone actually tried it, and if so are there any traps to avoid? Thanks, -- PHP

Re: [PHP] Website on a USB key?

2009-03-05 Thread Paul M Foster
On Fri, Mar 06, 2009 at 04:24:24PM +1100, Clancy wrote: > I bought some appliance recently, and found that they had thrown in a 2G > USB key for good > luck. I guess I ought to be able to put a PHP server plus a copy of my > website on it for > demonstration purposes, but has anyone actually trie

[PHP] Re: Sending out large amounts of email

2009-03-05 Thread Manuel Lemos
Hello, on 03/05/2009 08:20 PM Brian Hansen said the following: > Everywhere on the net I read that sending out mail using PHP mail() is slow > and it is a bad idea and that using some mail class with SMTP directly would > be much better. I have tested the run my tests with Postfix as the SMTP. Th