php-general Digest 12 Oct 2006 16:23:58 - Issue 4397
Topics (messages 243015 through 243028):
Re: PHP Mailer and SMTP = SPAM?
243015 by: Peter Lauri
243028 by: Richard Lynch
Re: OOP slow -- am I an idiot?
243016 by: Stut
243017 by: Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-12 06:49:22 +0100:
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2006-10-11 21:28:36 +0100:
Richard Lynch wrote:
This is a classic example of the obvious OOP solution being wildly
inappropriate.
Ok, so I now find myself in the unusual position of disagreeing with
Roman Neuhauser [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
# [EMAIL PROTECTED] / 2006-10-11 21:28:36 +0100:
Richard Lynch wrote:
On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote:
I want to create a customer class which fetches its attributes from
a MySQL database.
No,
Hi guys,
I'm attempting to run a SugarCRM variant that uses SOAP to access
information from the database. The code is causing a seg fault when
executing a particular line of code. The code executes properly until it
calls a generic function in the parent class that causes a seg fault on
the
take look
www.site5.com
On Thursday 12 October 2006 00:59, Ed Lazor wrote:
Anyone ever use A2Hosting.com? Or better yet, any recommendations on
a PHP 5 web hosting company that you're happy with - measured in
terms of quality support, they know what they're doing, and they have
good prices?
John Taylor-Johnston wrote:
How can I use if to see an array contains something?
if (sizeof($array)) ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
João Cândido de Souza Neto wrote:
Hello.
In the follow code:
$numbers=array(1,2,3,4,5);
foreach ($numbers as number) {
...
}
Inside foreach, could i know if i am in the last element of the array
$numbers?
you've already had a few alternatives; how about this:
foreach ($numbers
By the way, about myself. I'm primarily a system administrator. Most of the
time I USE code, NOT
write it. But I also dabble, and right now we need to improve our old custom
PHP revenue
application which has sat stagnant for a few years. We can't afford a
full-time programmer and I
know
Why does this send multiple times. I want it to loop through and send it
once.
-
?php
session_start();
include check_login.php;
global $PHP_SELF, $mail_text, $search_string;
-Original Message-
From: Glenn Richmond [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 12, 2006 4:45 AM
To: php-general@lists.php.net
Subject: [PHP] PHP causing seg fault
Hi guys,
I'm attempting to run a SugarCRM variant that uses SOAP to access
information from the
Move the -Send outside the loop?
And fix your indentation to something sane, so you know what's going
on in your script.
[Apologies if mail transport messed it up...]
On Thu, October 12, 2006 8:30 am, Ross wrote:
Why does this send multiple times. I want it to loop through and send
it
once.
On Thu, October 12, 2006 3:44 am, Glenn Richmond wrote:
I'm attempting to run a SugarCRM variant that uses SOAP to access
information from the database. The code is causing a seg fault when
executing a particular line of code. The code executes properly until
it
calls a generic function in
On Wed, October 11, 2006 11:28 pm, Peter Lauri wrote:
[snip]
Unless the email is coming from somebody the recipient knows/trusts,
then you're going to get marked by them as a spammer -- which will
report back to some of the lists marking you as a spammer.
[/snip]
But is it not a problem
On Wed, October 11, 2006 3:42 pm, Bauer, Jay W wrote:
From our testing of multiple connections we could easily create 50
of
these persistent connections and would have to hit the apache web
server
pretty hard with a 1000 requests at 50 at a time to get these to
terminate after the timeout.
Hi gang,
I have a problem. I am using readfile() to send files to the browser. The
code is below. I had is working on another server before, but now my client
have moved to a new server and we have started to experience problems with
bigger files.
I have three different files that I am sending.
Thanks for your answer. I better think about this one more time, read some
more about it, and then execute :) I will let you know if it flops...
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 12, 2006 11:24 PM
To: Peter Lauri
Cc:
Hi,
Is there any way to set so that the IE File Download dialog box can
understand UTF-8? I have some Thai named files that just end up like
nonsense :-)
/Peter
www.lauri.se http://www.lauri.se/ - personal website
www.dwsasia.com http://www.dwsasia.com/ - company website
On Wed, October 11, 2006 3:28 pm, Stut wrote:
Richard Lynch wrote:
On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote:
I want to create a customer class which fetches its attributes
from
a MySQL database.
No, you don't. :-)
This is a classic example of the obvious OOP solution being
On Thu, October 12, 2006 12:49 am, Stut wrote:
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2006-10-11 21:28:36 +0100:
Richard Lynch wrote:
On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote:
I want to create a customer class which fetches its attributes
from
a MySQL database.
No, you
On Thu, October 12, 2006 3:11 am, Tony Marston wrote:
I have to disagree as well. There is absolutely nothing wrong which
the
approach of creating one class for each table in the database. It
cannot be
wrong for the simple reason THAT IT WORKS!
Only problem is that then you often end up
Hi Roman,
As our customers see this, they think if they set a timeout of 10
seconds, that when these connections aren't used for hours they should
go away. And I can understand that. As I understand the current
workings, I can see an argument for keeping things as they are, but if
that is
On Thu, October 12, 2006 8:24 am, Chris de Vidal wrote:
[use the archives]
I can't architect a good OOP solution to a problem that hasn't been
fully defined, any more than one can architect a house without knowing
all the rooms that are needed...
I agree that all the code samples you provided
On Wed, October 11, 2006 9:14 pm, Google Kreme wrote:
On 10 Oct 2006, at 19:57 , Dave M G wrote:
It took me a little while to realize that the Spamassassin always
says that an email is possible scam if it has any score above zero,
but it takes a score of 5.0 to actually be deleted as spam.
On Thu, October 12, 2006 12:10 pm, Bauer, Jay W wrote:
Again if someone is using this oci8.persistent_timeout they are using
it because they want a way of controlling how long these connections
stay around.
Actually, that's an over-simplification of the purpose of persistent
and timeout
The
Thanks for the feedback Kyle, much appreciated. DreamHost does look
pretty good price-wise. Two others I was referred to are
HostBaby.com and OCSSolutions.com.
Have a good one :)
-Ed
On Oct 11, 2006, at 10:12 PM, Kyle wrote:
Hello,
I would suggest dreamhost at www.dreamhost.com.
Their
On Thu, October 12, 2006 11:43 am, Peter Lauri wrote:
I have a problem. I am using readfile() to send files to the browser.
I have three different files that I am sending. They are 3MB, 15MB and
59MB
Is there any limitations or settings of how large the files can be
when
using readfile()?
Hi Richard,
That seems excessive...
Are you saying you have 1000 Apache children and 50 different OCI
logins, for 50,000 persistent connections?
That would indeed be excessive. No there are only a max during the
running of ab maybe a 100 apache children and some 50 persistent
connections.
hi...
I'm looking to create a webapp. I'd rather not spend my wheels spinning on
creating functionality from scratch when it already exists in other apps.
so, I'm trying to find out if there are good 'starting' templates/shells
that I might be able to use as a starting point. I've seen various
On Oct 12, 2006, at 10:18 AM, Richard Lynch wrote:
I can't architect a good OOP solution to a problem that hasn't been
fully defined, any more than one can architect a house without knowing
all the rooms that are needed...
Sorry to jump into the middle of the conversation, but I thought this
On Thu, 2006-10-12 at 10:58 -0700, bruce wrote:
I'm looking to create a webapp. I'd rather not spend my wheels spinning on
creating functionality from scratch when it already exists in other apps.
so, I'm trying to find out if there are good 'starting' templates/shells
that I might be able to
Hi again Richard,
Excellent points about the purpose of persistent connections and
timeout. But let's get to your concluding statement:
Each active persistent connection ties up valuable resources. The
cost/benefit ratio has to be examined carefully and tweaked under
real-world load in dev
Richard Lynch wrote:
I *still* don't see OOP as a Right Answer for spitting out HTML web
pages in optimized minimalist time frames...
Maybe my brain just got warped by all that AI/Lisp work I did for a
couple decades, but it feels to me like a bad selection of weapons for
the task at hand, most
Ed Lazor wrote:
On Oct 12, 2006, at 10:18 AM, Richard Lynch wrote:
I can't architect a good OOP solution to a problem that hasn't been
fully defined, any more than one can architect a house without knowing
all the rooms that are needed...
Sorry to jump into the middle of the conversation,
I'm running out of memory even though I upped it to
memory_limit = 500M in php.ini.
Error messages and script are below. Thanks in advance for any tips.
$ php -c /usr/local/php5/lib/php.ini createPseudoIDs.php crosswalk.txt
php(780) malloc: *** vm_allocate(size=1069056) failed (error code=3)
Maybe I'm doing my math wrong here, but for 1 to 9, make a
string 9 bytes long, 10 including terminating null. (And PHP probably
includes a little extra for overhead)...
9 * 10 bytes = 90 bytes - that's about 9 and a half gigs...
jon
Doug Fulton wrote:
I'm running out
Hi,
It did help, but not perfectly. Sometimes I have to refresh a few times
before it will be pushed.
Best regards,
Peter
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Friday, October 13, 2006 12:52 AM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re:
I'm running php 5.1.1 configured with openssl 0.9.7i which was installed in
/opt/local/. Everything was working fine. Then suddenly the SSL
environment variables disappeared. The https variable displays on, but no
SSL_ variables are displayed via phpinfo. I just installed another version
of
On Thu, October 12, 2006 4:03 pm, gaw wrote:
I'm running php 5.1.1 configured with openssl 0.9.7i which was
installed in
/opt/local/. Everything was working fine. Then suddenly the SSL
environment variables disappeared. The https variable displays on,
but no
SSL_ variables are displayed
The SSL_ variables are available in the environment. If I run a cgi script
and display env they are there. But they do not show in phpinfo();
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 12, 2006 2:22 PM
To: gaw
Cc: php-general@lists.php.net
# [EMAIL PROTECTED] / 2006-10-12 11:23:52 -0500:
On Wed, October 11, 2006 11:28 pm, Peter Lauri wrote:
[snip]
Unless the email is coming from somebody the recipient knows/trusts,
then you're going to get marked by them as a spammer -- which will
report back to some of the lists marking
On Thu, October 12, 2006 1:03 pm, Ed Lazor wrote:
On Oct 12, 2006, at 10:18 AM, Richard Lynch wrote:
I can't architect a good OOP solution to a problem that hasn't been
fully defined, any more than one can architect a house without
knowing
all the rooms that are needed...
Sorry to jump into
On Thu, October 12, 2006 12:52 pm, Bauer, Jay W wrote:
Under the current situation these won't go away, unless there is a
lot
of other traffic for the webserver and the httpd servers need to free
up
these idle connections to handle other requests.
But if there's no traffic, then does it
# [EMAIL PROTECTED] / 2006-10-12 16:29:09 -0500:
On Thu, October 12, 2006 1:03 pm, Ed Lazor wrote:
On Oct 12, 2006, at 10:18 AM, Richard Lynch wrote:
I can't architect a good OOP solution to a problem that hasn't been
fully defined, any more than one can architect a house without
knowing
On Thu, October 12, 2006 1:21 pm, Bauer, Jay W wrote:
I agree and right now all there is in the way of tools for an
administrator to use within the PHP configuration is the number of
persistent connections per server and the timeout interval. These are
a
bit crude as tools, but as the
On Thu, October 12, 2006 3:26 pm, Peter Lauri wrote:
It did help, but not perfectly. Sometimes I have to refresh a few
times
before it will be pushed.
Is output_buffering defaulted to on?...
Cuz then you're putting a whole SECOND copy of the output into PHP's
output buffer.
That's bad. :-)
On Thu, October 12, 2006 2:23 pm, Doug Fulton wrote:
I'm running out of memory even though I upped it to
memory_limit = 500M in php.ini.
Error messages and script are below. Thanks in advance for any tips.
$ php -c /usr/local/php5/lib/php.ini createPseudoIDs.php
crosswalk.txt
php(780)
On 12 Oct 2006, at 11:10 , Bauer, Jay W wrote:
Again if someone is using this oci8.persistent_timeout they are using
it because they want a way of controlling how long these connections
stay around.
Well, are they really?
I would think they are using it to free up idle connections for use
On Thu, October 12, 2006 4:27 pm, gaw wrote:
The SSL_ variables are available in the environment. If I run a cgi
script
and display env they are there. But they do not show in phpinfo();
Which USER runs the CGI script?...
You have to 'su' to the User defined in httpd.conf, or it doesn't
It is the same user. I am running the cgi script from my browser through
the web server.
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 12, 2006 3:08 PM
To: gaw
Cc: php-general@lists.php.net
Subject: RE: [PHP] no SSL environment vaiables
On
Comments / Questions below.
On Oct 12, 2006, at 12:15 PM, Stut wrote:
Except that is the attitude that leads to painful OOP in PHP. PHP
is not the same environment as C++.
The environment (classes, objects, etc) needs to be created and
destroyed with each request.
I definitely agree that
Richard Lynch [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Thu, October 12, 2006 3:11 am, Tony Marston wrote:
I have to disagree as well. There is absolutely nothing wrong which
the
approach of creating one class for each table in the database. It
cannot be
wrong for the
Ed Lazor wrote:
On Oct 12, 2006, at 12:15 PM, Stut wrote:
As such you cannot start designing a solution unless you know how the
data/entities are going to be used.
Doesn't this mean that your design breaks when the behavior or use of
the data/entities changes?
You may end up refactoring
Hi!
I'm trying to make thumbnails of uploaded jpegs via GD. It works fine on
most jpegs but doesn't seem to work on canon jpegs (tried both a
consumer canon and one of the finer DSLRs). When I resaved the canon
jpeg in my imaging application GD could handle it.
Any ideas of how to solve
On Oct 12, 2006, at 4:36 PM, Stut wrote:
You may end up refactoring code if your application changes that
much, but a good OO design should also mean that when changes of
that magnitude occur the changes required are limited to relatively
small sections of code.
Ok, I think we're using
Until someone has more specific information, my first thought was to
wonder which version of PHP and GD you're using in case they aren't
the latest and greatest. If you're aren't, then I'd upgrade, retest,
and go from there. I'd also check to see if you run into the problem
with images
G'day,
I'm converting an app to use AD groups users using the php LDAP
functions, now everything is working 99%. I just noticed then that 1
user is coming back via the ldap_get_entries function with a BLANK
objectguid, I've confirmed using an LDAP browser they do have a
objectGUID field and
Thanks, that was very clear :)
-Original Message-
From: Roman Neuhauser [mailto:[EMAIL PROTECTED]
Sent: Friday, October 13, 2006 6:32 AM
To: Richard Lynch
Cc: Peter Lauri; php-general@lists.php.net
Subject: Re: [PHP] PHP Mailer and SMTP = SPAM?
# [EMAIL PROTECTED] / 2006-10-12 11:23:52
Doug Fulton wrote:
function padToNine($num) {
Apart from the other suggestions I'd remove the padToNine function and use
$padded_num = sprintf('%09d', $number);
I think that returns the same ;)
--
Postgresql php tutorials
http://www.designmagick.com/
--
PHP General Mailing List
58 matches
Mail list logo