|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 14 Aug 2005 11:24:44 -0000 Issue 3624
php-general-digest-help
lists.php.net
Date: Sun Aug 14 2005 - 06:24:44 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 14 Aug 2005 11:24:44 -0000 Issue 3624
Topics (messages 220569 through 220597):
Re: making checkbox's and radio buttons sticky
220569 by: Jochem Maas
220570 by: Jochem Maas
Re: one more mysql question
220571 by: Jochem Maas
220585 by: afan.afan.net
220586 by: Sebastian
Re: 'God' has spoken... :-)
220572 by: Sebastian
220579 by: Matthew Weier O'Phinney
220580 by: Robert Cummings
220581 by: Marco Tabini
220583 by: Sebastian
220589 by: Rasmus Lerdorf
220590 by: Esteamedpw.aol.com
220592 by: Lester Caine
220595 by: Michelle Konzack
PHP, MS Access & Transactions
220573 by: Pablo Gosse
PHP User Group in San Francisco
220574 by: Catenare LLC
wrapping text
220575 by: John Taylor-Johnston
220577 by: Jasper Bryant-Greene
220578 by: Matthew Weier O'Phinney
220588 by: John Taylor-Johnston
220597 by: David Dorward
Large forms to Mysql table...
220576 by: Andras Kende
220591 by: dino.php.co.ba
Re: array varible problems
220582 by: Dan Lowe
220584 by: Jasper Bryant-Greene
220593 by: edwardspl.ita.org.mo
220594 by: Jasper Bryant-Greene
220596 by: edwardspl.ita.org.mo
Re: PHP without php.ini
220587 by: Burhan Khalid
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Support wrote:
> ok....I got it!!
>
> not wanting to go down the path of the darkside...I inserted the
> superglobals..
>
> if (isset($_POST['gmev']) && in_array('September 9th', $_POST['gmev']))
>
> so did I get it right?
there are many roads to Rome. using isset() and in_array() is a
very good start indeed! (you'd be surprised at how many people don't check
vars at all) you might consider either casting $_POST['gmev']
as an array at some stage:
$myArr = (array)$_POST['gmev']
or also using is_array() to check that $_POST['gmev'] is actually an array.
another technique sometimes used is to suppress the error in cases when
you need speed AND you know the error is of no consequence:
if (
in_array('September 9th',
$_POST['gmev'])) {
// bla
}
notice 2
signs. the first suppresses the warning about possible in correct
2nd param to in_array() the second will suppress the notice if $_POST['gmev']
is not set.
be very wary of the
sign - don't use it lightly, most always using isset()
in combination with a is_*() function is much much better (and more correct.
also check out the ctype functions:
http://php.net/ctype
>
attached mail follows:
phile
43plc.com wrote:
> Sorry, I will be out of the office until Monday 15th August.
phil is risking being out of the office permanently ;-)
>
> Kind regards,
>
> Phil Ewington.
>
>
attached mail follows:
John Nichel wrote:
> Sebastian wrote:
while were not on the subject ....
John I have a question about your wife ...
oh shit wrong list ;-)
no no I meant to ask about sand - how do I make a CPU using the stuff?
>
>> take what other say with a grain of salt.. im sure you're using php to
>> pull info from mysql anyway..
>
>
> And he might be using Apache on Linux like the majority of PHP users.
> More than likely outputting some HTML and maybe some JavaScript.
> Probably using a PC too. So what?
>
>> the fact is without mysql php would be nowhere where it is today.. its
>> like peanut butter w/o the jelly..
>
>
> The fact is, without IBM, PHP would be nowhere it is today. Say, here's
> an idea, let's just make this the "IBM and anything which relates to it"
> list.
>
>> see my reply in the other email.. im sure it will work for you.
>
>
> I'll be sure to tell everyone on the MySQL list that they can shut it
> down, since you have it covered over here.
>
attached mail follows:
Hey! Stop it!
I put a question on wrong place. I was "nailed" for it by John. I
accepted I was wrong. I apologized.
What do you want now? Sebastian wanted to help – in difference to you
and John. Even it’s “wrong place”. I guess you would never stop and help
to car in trouble on highway because you are IT or “it’s not your
department”, ha?
C’mon… It’s really not place to be sarcastic…
-afan
Jochem Maas wrote:
> John Nichel wrote:
>
>> Sebastian wrote:
>
>
> while were not on the subject ....
> John I have a question about your wife ...
>
> oh shit wrong list ;-)
>
> no no I meant to ask about sand - how do I make a CPU using the stuff?
>
>>
>>> take what other say with a grain of salt.. im sure you're using php
>>> to pull info from mysql anyway..
>>
>>
>>
>> And he might be using Apache on Linux like the majority of PHP users.
>> More than likely outputting some HTML and maybe some JavaScript.
>> Probably using a PC too. So what?
>>
>>> the fact is without mysql php would be nowhere where it is today..
>>> its like peanut butter w/o the jelly..
>>
>>
>>
>> The fact is, without IBM, PHP would be nowhere it is today. Say,
>> here's an idea, let's just make this the "IBM and anything which
>> relates to it" list.
>>
>>> see my reply in the other email.. im sure it will work for you.
>>
>>
>>
>> I'll be sure to tell everyone on the MySQL list that they can shut it
>> down, since you have it covered over here.
>>
>
attached mail follows:
they are just grumpy old men i guess..
it is not like you asked a windows question on a linux list.. i've seen
stupid html questions here.. yet they get answered.
i always try to help when i can and if i cant offer help i dont say
anything because that wasnt the way i was raised. it is rude.
at least if it was too "offtopic" for the list someone could of just
nicely said "ask on the mysql list" but that wasn't case.
anyway, consider this a done deal as you already received help.
afan
afan.net wrote:
> Hey! Stop it!
> I put a question on wrong place. I was "nailed" for it by John. I
> accepted I was wrong. I apologized.
>
> What do you want now? Sebastian wanted to help – in difference to you
> and John. Even it’s “wrong place”. I guess you would never stop and
> help to car in trouble on highway because you are IT or “it’s not your
> department”, ha?
>
> C’mon… It’s really not place to be sarcastic…
>
> -afan
>
>
>
> Jochem Maas wrote:
>
>> John Nichel wrote:
>>
>>> Sebastian wrote:
>>
>>
>>
>> while were not on the subject ....
>> John I have a question about your wife ...
>>
>> oh shit wrong list ;-)
>>
>> no no I meant to ask about sand - how do I make a CPU using the stuff?
>>
>>>
>>>> take what other say with a grain of salt.. im sure you're using php
>>>> to pull info from mysql anyway..
>>>
>>>
>>>
>>>
>>> And he might be using Apache on Linux like the majority of PHP
>>> users. More than likely outputting some HTML and maybe some
>>> JavaScript. Probably using a PC too. So what?
>>>
>>>> the fact is without mysql php would be nowhere where it is today..
>>>> its like peanut butter w/o the jelly..
>>>
>>>
>>>
>>>
>>> The fact is, without IBM, PHP would be nowhere it is today. Say,
>>> here's an idea, let's just make this the "IBM and anything which
>>> relates to it" list.
>>>
>>>> see my reply in the other email.. im sure it will work for you.
>>>
>>>
>>>
>>>
>>> I'll be sure to tell everyone on the MySQL list that they can shut
>>> it down, since you have it covered over here.
>>>
>>
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.8/71 - Release Date: 8/12/2005
attached mail follows:
Jochem Maas wrote:
> if you haven't seen it yet and are interested in the future
> of php you might be interested in the _big_ thread on php-internals
> that starts with the message:
>
> http://www.manucorp.com/archives/internals/200508/msg00398.php
>
> IMHO every halfbaked php coder should read it ;-)
>
> to cut it short for those to busy, or what not, Rasmus offered his
> his vision of php6 (which seems will be the version that will first
> bring the awesome unicode [and date?] functionality to the masses
> - hey thats us! :-) ) and there seems to be pretty much unanimous
> agreement on his main points (lots of discussion on more issues/ideas
> other people have brung up in response)
>
> the future's bright, the future is green.
>
why php6 and not php5? look how long it took to get to php4 (with php5
just starting to rolling out) and people are already talking about php6?
sure it is just a 'versioning' thing, but right now huge numbers of php
users aren't using php5 (including me) on production environments, let
alone start talking about php 6.
anyway, i think i will be with php4 for a long time to come. kinda of
how apache2 hasn't been a real success over apache1.
i just hope php doesn't end up being bloat-filled with the not-so-useful
thing just taking up resources.
i only been coding in php for a couple(3) years so maybe i have no idea
what im talking about. maybe a 'php-lite' version ;)
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.8/71 - Release Date: 8/12/2005
attached mail follows:
* Sebastian <sebastian
broadbandgaming.net> :
> Jochem Maas wrote:
> > if you haven't seen it yet and are interested in the future
> > of php you might be interested in the _big_ thread on php-internals
> > that starts with the message:
> >
> > http://www.manucorp.com/archives/internals/200508/msg00398.php
> >
> > IMHO every halfbaked php coder should read it ;-)
> >
> > to cut it short for those to busy, or what not, Rasmus offered his
> > his vision of php6 (which seems will be the version that will first
> > bring the awesome unicode [and date?] functionality to the masses
> > - hey thats us! :-) ) and there seems to be pretty much unanimous
> > agreement on his main points (lots of discussion on more issues/ideas
> > other people have brung up in response)
> >
> > the future's bright, the future is green.
>
> why php6 and not php5? look how long it took to get to php4 (with php5
> just starting to rolling out) and people are already talking about php6?
My observation was that more people jumped to PHP4 from PHP3 than have
so far from PHP4 to PHP5. And PHP5 has hardly just started to roll out;
the official 5.0.0 release was over a year ago.
> sure it is just a 'versioning' thing, but right now huge numbers of php
> users aren't using php5 (including me) on production environments, let
> alone start talking about php 6.
And why aren't you using PHP5? Is there any specific reason? Is it
because your service provider doesn't offer it? If so, ask them why --
and report it here. As soon as PHP5 hit stable, I started using it, and
I've never looked back. Performance is better, and there are many
features -- exceptions, the new OOP model, autoload, iterators, etc. --
that simply have no analogs in PHP4.
> anyway, i think i will be with php4 for a long time to come.
Please tell the list why -- what does PHP4 offer over PHP5 for you? I
honestly want to know, and I'm sure there are others who would be
interested to see why people are not making the switch.
> kinda of how apache2 hasn't been a real success over apache1.
That's a completely different story. Apache2's internal structure adds
thread support, and since many loadable modules are not necessarily
threadsafe, using them with Apache2 often negatively impact performance
(PHP, for instance, must be run non-threaded because many of the
libraries against which it links are not threadsafe -- and thus running
PHP on Apache2 is much less efficient than on Apache1). The differences
between PHP4 and PH5 are much more trivial, and those people who choose
to use the features of PHP5 are not going to lose performance or
functionality -- actually, quite the opposite.
> i just hope php doesn't end up being bloat-filled with the not-so-useful
> thing just taking up resources.
I think one of the things I like most about PHP is that you can easily
compile it with *only* the features you need -- it only needs as much
bloat as you need to use it.
--
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/
attached mail follows:
On Sat, 2005-08-13 at 23:51, Matthew Weier O'Phinney wrote:
> * Sebastian <sebastian
broadbandgaming.net> :
> > Jochem Maas wrote:
> > > if you haven't seen it yet and are interested in the future
> > > of php you might be interested in the _big_ thread on php-internals
> > > that starts with the message:
> > >
> > > http://www.manucorp.com/archives/internals/200508/msg00398.php
> > >
> > > IMHO every halfbaked php coder should read it ;-)
> > >
> > > to cut it short for those to busy, or what not, Rasmus offered his
> > > his vision of php6 (which seems will be the version that will first
> > > bring the awesome unicode [and date?] functionality to the masses
> > > - hey thats us! :-) ) and there seems to be pretty much unanimous
> > > agreement on his main points (lots of discussion on more issues/ideas
> > > other people have brung up in response)
> > >
> > > the future's bright, the future is green.
> >
> > why php6 and not php5? look how long it took to get to php4 (with php5
> > just starting to rolling out) and people are already talking about php6?
>
> My observation was that more people jumped to PHP4 from PHP3 than have
> so far from PHP4 to PHP5. And PHP5 has hardly just started to roll out;
> the official 5.0.0 release was over a year ago.
>
> > sure it is just a 'versioning' thing, but right now huge numbers of php
> > users aren't using php5 (including me) on production environments, let
> > alone start talking about php 6.
>
> And why aren't you using PHP5? Is there any specific reason? Is it
> because your service provider doesn't offer it? If so, ask them why --
> and report it here. As soon as PHP5 hit stable, I started using it, and
> I've never looked back. Performance is better, and there are many
> features -- exceptions, the new OOP model, autoload, iterators, etc. --
> that simply have no analogs in PHP4.
>
> > anyway, i think i will be with php4 for a long time to come.
>
> Please tell the list why -- what does PHP4 offer over PHP5 for you? I
> honestly want to know, and I'm sure there are others who would be
> interested to see why people are not making the switch.
While I've dabbled with PHP5 and made my framework compatible with it I
haven't bothered to make a wholehearted leap into it. The following
reasons basicly sum up why, and are probably common amongst those that
aren't leaping into PHP5.
- Better the devil you know than the devil you don't. Many PHP
developers have spent years using PHP4 and know it inside and
out and have come to terms with all of it's deficiencies... as
few as those may be once you learn how to adapt to them.
- A multitude of code already exists that is known to work under
PHP4 but can be expected to have quirks when run under PHP5.
- Much of the code written in PHP4 works without the new features
of PHP5 and so there's no compelling reason to invest time and
resources for 0 ROI other than compatibility with PHP5.
- PHP5 had a large focus on bringing missing OOP features to PHP
that have little merit to those who write mostly procedural code.
- Accelerators for PHP5 are not particularly good at this time, so
unless you've got cash to shell out to Zend (which can be
expensive for the little guy) then why move from your trusty
PHP4 accelerators that already get the job done satisfactorily.
I'm sure there's more reasons I just haven't bothered to think long
enough about. These ones just came to the top of my head :) BTW I have
no problem with the fact Zend charges for their accelerator, they are a
business after all, I'm just arguing the case for those of limited
resources.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
attached mail follows:
On 8/13/05 5:31 PM, "Jochem Maas" <jochem
iamjochem.com> wrote:
> if you haven't seen it yet and are interested in the future
> of php you might be interested in the _big_ thread on php-internals
> that starts with the message:
>
> http://www.manucorp.com/archives/internals/200508/msg00398.php
>
Maybe even on a website that handles threads a bit more gracefully :)
http://groups-beta.google.com/group/mailing.www.php-dev/browse_frm/thread/26
8910860a3f8255/37654d19dafac8a9?lnk=st&q=rasmus+lerdorf+6.0&rnum=1&hl=en#376
54d19dafac8a9
Or
http://beeblex.com/lists/index.php/php.internals/17883
http://beeblex.com/lists/thread.php/363786 (RSS 2.0)
attached mail follows:
Matthew Weier O'Phinney wrote:
>* Sebastian <sebastian
broadbandgaming.net> :
>
>
>>why php6 and not php5? look how long it took to get to php4 (with php5
>>just starting to rolling out) and people are already talking about php6?
>>
>>
>
>My observation was that more people jumped to PHP4 from PHP3 than have
>so far from PHP4 to PHP5. And PHP5 has hardly just started to roll out;
>the official 5.0.0 release was over a year ago.
>
>
>
>>sure it is just a 'versioning' thing, but right now huge numbers of php
>>users aren't using php5 (including me) on production environments, let
>>alone start talking about php 6.
>>
>>
>
>And why aren't you using PHP5? Is there any specific reason? Is it
>because your service provider doesn't offer it? If so, ask them why --
>and report it here. As soon as PHP5 hit stable, I started using it, and
>I've never looked back. Performance is better, and there are many
>features -- exceptions, the new OOP model, autoload, iterators, etc. --
>that simply have no analogs in PHP4.
>
>
>
>>anyway, i think i will be with php4 for a long time to come.
>>
>>
>
>Please tell the list why -- what does PHP4 offer over PHP5 for you? I
>honestly want to know, and I'm sure there are others who would be
>interested to see why people are not making the switch
>
i spent hundreds of hours building my site on php4,
im not about to rewrite any of it to make it 'compatible' with php5.
maybe my impressions of php5 are wrong, but last i heard apps built on
php4 may or may not work right under php5
- meaning you would have to rewrite code. am i wrong?
so i am 'afraid' of going with php5 in fear it will break my website.
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.8/71 - Release Date: 8/12/2005
attached mail follows:
Sebastian wrote:
> so i am 'afraid' of going with php5 in fear it will break my website.
It's rather trivial to test it. Set up a second Apache server with php5
loaded that listens to port 81 or some other port and point it at the
same document_root. Then you can switch back and forth by just changing
the port number in the URL.
Or, if you, or your application, doesn't like having :81 in the url
everywhere, you can set up a VirtualHost on your port 80 server just
like you set up virtualhosts for anything else and in it add a ProxyPass
to port 81. Like this:
<VirtualHost *>
ServerName name1.yourdomain.com
DocumentRoot /var/www/html
... other standard config lines...
</VirtualHost>
<VirtualHost *>
ServerName name2.yourdomain.com
DocumentRoot /var/www/html
ProxyPass / http://name2.yourdomain.com:81/
</VirtualHost>
In your httpd81.conf or whatever you call it you have your regular
VirtualHost block for the name2.yourdomain.com. The only real
difference is that at the top you have a "Listen 81" line instead of
"Listen 80".
So now you can point your browser at http://name1.yourdomain.com and you
get the PHP4 version of your site and if you go to
http://name2.yourdomain.com you get the PHP5 version.
I typically run at least 2 versions of PHP on my main server, sometimes
more. You have to fiddle a bit with whatever mechanism you use to start
and stop your server so it will start and stop the different versions.
I tend to just cheat and copy my /etc/init.d/apache to
/etc/init.d/apache81 and edit it appropriately changing the name of the
conf file and the pid file. So I can start and stop the different
versions manually.
Building multiple versions of PHP isn't very hard either. The only real
trick is to use the --prefix configure flag. Something like
--prefix=/usr/local/php5. Then when you "make install" it will not
overwrite any of your PHP4 stuff, with the one exception that it will
try to modify your main httpd.conf by adding a LoadModule mod_php5.c
/usr/libexec/apache/libphp5.so (or some similar path). Just go abd get
rid of that line after your make install and move it to the httpd81.conf
file. Also remember to add something like:
--with-config-file-path=/etc/php5
So you can have separate php.ini files.
Someone also mentioned the lack of decent opcode acceleration for PHP5.
pecl/apc has come a long way over the last couple of months. Give it a
try. I'd love to get some more feedback on it. To install it:
pear install apc
Will work if you are lucky. I tend to prefer doing it a bit more manually:
cvs -d:pserver:cvsread
cvs.php.net:/repository login
password: phpfi
cvs -d:pserver:cvsread
cvs.php.net:/repository co pecl/apc
cd pecl/apc
phpize
./configure --enable-apc-mmap --with-apxs
--with-php-config=/usr/local/php5/bin/php-config
make install
Then add this to you /etc/php5/php.ini file:
extension=apc.so
apc.enabled=1
apc.shm_segments=1
apc.optimization=0
apc.shm_size=32
apc.num_files_hint=1000
apc.mmap_file_mask=/tmp/apc.XXXXXX
Obviously you can do a "make clean" and run ./configure again but this
time point it at your php4 php-config file and build yourself an apc.so
that you can use for your PHP 4 setup as well. Then copy the apc.php
script that is included to your document_root and point your browser at
it. You may want to password protect it. Or edit the top of the script
where you can set a password. You will end up with something that looks
like this: http://buzz.progphp.com/apc.php
I don't really do Windows, but most of this will work on Windows as well
(I think). You can find APC builds for Windows on http://snaps.php.net.
But save yourself some headaches and grab a spare PC and install Linux
(I prefer Debian, but it is a hassle to install for newcomers, the
Ubuntu installer makes life easier), FreeBSD, or heck even the newly
available OpenSolaris-x86 (I need to do that soon so I can play with the
ultra-cool DTrace they have).
Long rambling email, but hopefully it will inspire a few people to go
push the edges a bit. Don't forget to report any bugs you find. For
APC bugs, report them here: http://pecl.php.net/bugs/report.php?package=APC
For APC docs, see the INSTALL file in the source, or go to:
http://livedocs.phpdoc.info/index.php?l=en&q=ref.apc
Which is mostly the same thing webified.
-Rasmus
attached mail follows:
In a message dated 8/14/2005 2:42:49 A.M. Central Standard Time,
rasmus
lerdorf.com writes:
It's rather trivial to test it. Set up a second Apache server with php5
loaded that listens to port 81 or some other port and point it at the
same document_root. Then you can switch back and forth by just changing
the port number in the URL.
Or, if you, or your application, doesn't like having :81 in the url
everywhere, you can set up a VirtualHost on your port 80 server just
like you set up virtualhosts for anything else and in it add a ProxyPass
to port 81. Like this:
<VirtualHost *>
ServerName name1.yourdomain.com
DocumentRoot /var/www/html
... other standard config lines...
</VirtualHost>
<VirtualHost *>
ServerName name2.yourdomain.com
DocumentRoot /var/www/html
ProxyPass / http://name2.yourdomain.com:81/
</VirtualHost>
In your httpd81.conf or whatever you call it you have your regular
VirtualHost block for the name2.yourdomain.com. The only real
difference is that at the top you have a "Listen 81" line instead of
"Listen 80".
What about XAMPP? It has a "switch" button that you can switch from PHP 4 to
5 really easy?
Just a thought... It's what I use.
_http://apachefriends.org/en/_ (http://apachefriends.org/en/)
Features: "Apache HTTPD 2.0.54, MySQL 4.1.12, PHP 5.0.4 + 4.3.11 + PEAR +
Switch, MiniPerl 5.8.6, Openssl 0.9.7g, PHPMyAdmin 2.6.2-pl1, XAMPP Control
Panel 1.0, eAccelerator 0.9.3, Webalizer 2.01-10, Mercury Mail Transport System
für Win32 und NetWare Systems v4.01a, FileZilla FTP Server 0.9.8a, SQLite
2.8.15, ADODB 4.63, Zend Optimizer 2.5.7, XAMPP Security. For Windows 98, 2000,
XP."
- Clint
attached mail follows:
Rasmus Lerdorf wrote:
> I don't really do Windows, but most of this will work on Windows as well
> (I think). You can find APC builds for Windows on http://snaps.php.net.
> But save yourself some headaches and grab a spare PC and install Linux
> (I prefer Debian, but it is a hassle to install for newcomers, the
> Ubuntu installer makes life easier), FreeBSD, or heck even the newly
> available OpenSolaris-x86 (I need to do that soon so I can play with the
> ultra-cool DTrace they have).
I have the spare machine - but finding time to set it up and and
re-learn 15 year old unix is proving difficult :(
The main problem is windows runs Apache2/PHP5 out of the box, so I have
not had to worry. The new version just goes on the 'eng' machine, and
once I've had a few days clear operation all the other machines get
switched.
I've had to drop a PHP4 back on as well because of the problems 4.4.0
has created with working legacy sites - *THAT* should have been killed
at birth and the lessons should be passed on to PHP6. Lets not have
THREE version of PHP on the go at once !!!!! Kill 4 before pushing 6 -
but actually I see nothing in 6 that can't be properly added to 5 ?
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
attached mail follows:
Am 2005-08-14 00:48:23, schrieb Sebastian:
> i spent hundreds of hours building my site on php4,
> im not about to rewrite any of it to make it 'compatible' with php5.
You are not alone...
> maybe my impressions of php5 are wrong, but last i heard apps built on
> php4 may or may not work right under php5
> - meaning you would have to rewrite code. am i wrong?
Right, I have a Dual-Athlon MP1900 with 4 GByte of memory running
Apache 1.3, php4, ssh und courier.
This Server support curently around 4860 VHosts.
Now, since the System Disk was gone, I I have installed Debian
3.1/Sarge with apache2, php5 and latest build of courier.
Now ich more then 50 Clients connect to the website using php
appications are kicked out of the memory. :-/
It seems that php5 consums much more resources then php4. Swichting
back to the latest Debian 3.0/Woody Backup and all is working fine
Then another Server which controlls my whole network à la HP OpenView
but using a php4 webinterface... - It does not more work with php5.
Need to rewrite but do not know WHERE and HOW.
It is a production system, I admin more then 400 Computers and I have
not time and money to figture out, whats wrong with php5.
> so i am 'afraid' of going with php5 in fear it will break my website.
ACK
Greetings
Michelle
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSM LinuxMichi
0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFC/yNNC0FPBMSS+BIRAttRAJ9r/P0SW2TvNzLXQHPfOL5LZNsJwwCgxsaq
Uj/8QbLDXAYG0X7DDdgL0m0=
=4IFh
-----END PGP SIGNATURE-----
attached mail follows:
Hi, folks.
I have the unfortunate task of writing a PHP front-end for a
client-server application that is back-ended in MS Access.
I've tried using the transaction functionality in ADOdb (PHP
implementation of ADO) but it doesn't work seem to work correctly, even
though it says it does.
If I intentionally submit a malformed query as part of a series of
inserts, the ADOdb transaction supposedly rolls back, but when I look at
the database, the inserts carried out before the error occurs are still
there.
Does anyone know if it's possible to use transactions with Access via
PHP?
Cheers and TIA,
Pablo
attached mail follows:
Are there any PHP user groups currently meeting in San Francisco?
Johan Martin
Catenare LLC
534 Pacific Ave
San Francisco, CA. 94133
Phone: (415) 834-9802
Fax: (415) 294-4495
http://www.catenare.com
attached mail follows:
Folks are complaining mail arrives and text will not wrap. $message
comes directly from a textarea. Old mail readers, I guess?
How can I make their life better and make the text wrap?
mail("info
foo.ca", stripslashes($subject), stripslashes($message),
"Return-Path: <info
foo.ca>\r\nFrom: \"[foo] foo\" <info
foo.ca>\r\nbcc:
$bcc \r\nReply-To: info
foo.ca \r\n"."X-Mailer: PHP/" . phpversion());
attached mail follows:
John Taylor-Johnston wrote:
> Folks are complaining mail arrives and text will not wrap. $message
> comes directly from a textarea. Old mail readers, I guess?
> How can I make their life better and make the text wrap?
http://www.php.net/wordwrap
attached mail follows:
* John Taylor-Johnston <John.Taylor-Johnston
cegepsherbrooke.qc.ca>:
> Folks are complaining mail arrives and text will not wrap. $message
> comes directly from a textarea. Old mail readers, I guess?
Not necessarily old. Many of us use text-based mail readers, where
tradition and usability dictate line lengths of 72-80 characters. Also,
many mail user agents render text/plain without wrapping lines (or make
line wrapping optional).
> How can I make their life better and make the text wrap?
Yep. Investigate http://php.net/wordwrap:
> mail("info
foo.ca", stripslashes($subject), stripslashes($message),
> "Return-Path: <info
foo.ca>\r\nFrom: \"[foo] foo\" <info
foo.ca>\r\nbcc:
> $bcc \r\nReply-To: info
foo.ca \r\n"."X-Mailer: PHP/" . phpversion());
Make "stripslashes($message)" into
"wordwrap(stripslashes($message), 72)".
--
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/
attached mail follows:
>"wordwrap(stripslashes($message), 72)".
Thanks! Another reason why I gave up on Perl :) A fucntion made already
since 4.0.2.! :)
Matthew Weier O'Phinney wrote:
>> Folks are complaining mail arrives and text will not wrap. $message
>> comes directly from a textarea. Old mail readers, I guess?
>
>
> Yep. Investigate http://php.net/wordwrap:
>
>> mail("info
foo.ca", stripslashes($subject), stripslashes($message),
>> "Return-Path: <info
foo.ca>\r\nFrom: \"[foo] foo\" <info
foo.ca>\r\nbcc:
>> $bcc \r\nReply-To: info
foo.ca \r\n"."X-Mailer: PHP/" . phpversion());
>
>
> Make "stripslashes($message)" into
> "wordwrap(stripslashes($message), 72)".
>
attached mail follows:
John Taylor-Johnston wrote:
> >"wordwrap(stripslashes($message), 72)".
> Thanks! Another reason why I gave up on Perl :) A fucntion made already
> since 4.0.2.! :)
Oh look, Perl has something almost as old (possibly older, that's just what
I found in 30 seconds of searching).
http://search.cpan.org/~muir/Text-Tabs+Wrap-2001.0929/lib/Text/Wrap.pm
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
attached mail follows:
Hello,
I have a html page with 70+ form fields some like 40 fields are only used
for entering quantity numbers…
Is it a good idea to put this 50 fields of the form fields into a single
text mysql field?
Somehow process it with php before, put inside of some kind of xml
structure?
Just don’t want to do Mysql table with 70 fields…
Thanks,
Andras Kende
http://www.kende.com
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 0.0.338 / Virus Database: 267.10.8/71 - Release Date: 8/12/2005
attached mail follows:
Just use some text as "delimiter string". Merge all fields together with
delimiter and than insert it into db table.
Something like
<?php
$separator_string = '||__||';//or something else
//u can use foreach($_POST..) here or merge all one by one
$tekst=$separator_string.$_POST['field1'].$separator_string.$_POST['field1']....
//than insert it into db
?>
<?php
//mysql connect & select query
$separator_string = '||__||';
while ($a=mysql_fetch_row($query))
$myfields= split($separator_string,$a[2]);
?>
Hope this could help
attached mail follows:
On Aug 13, 2005, at 8:35 AM, edwardspl
ita.org.mo wrote:
> <table>
> <tr>
> for($i=1;$i<5;$i++)
This means:
* Start with $i = 1
* End loop if $i is less than 5
* Increment $i each time around
So your loop is ending at the first check because $i is less than 5.
You want $i > 4 instead, I think.
-dan
> {
> <td><input type=checkbox name='f<? echo $i;?>[]' value='1'></td>
> }
> </tr>
> </table>
>
> Only display the result of zero array, eg :
> f1[0]
> f2[0]
> f3[0]
> f4[0]
>
> So, how to write the source (Web page - when user click the submit
> button) by using loop ?
--
Hey, did you hear? They took "gullible" out of the dictionary!
attached mail follows:
Dan Lowe wrote:
>> for($i=1;$i<5;$i++)
>
> This means:
>
> * Start with $i = 1
> * End loop if $i is less than 5
> * Increment $i each time around
>
> So your loop is ending at the first check because $i is less than 5.
> You want $i > 4 instead, I think.
Umm, no, I don't think so... Your second point is wrong. The second part
of a "for" statement indicates a statement that *must be true for the
loop to continue*.
I think you need to read this:
http://www.php.net/for
"In the beginning of each iteration, expr2 is evaluated. If it evaluates
to TRUE, the loop continues and the nested statement(s) are executed. If
it evaluates to FALSE, the execution of the loop ends."
Jasper
attached mail follows:
Sorry, I don't quit understanding the site http://www.php.net/for...
So, would you mind to give me a example about it ?
Thank for your help !
Jasper Bryant-Greene wrote:
> Dan Lowe wrote:
> >> for($i=1;$i<5;$i++)
> >
> > This means:
> >
> > * Start with $i = 1
> > * End loop if $i is less than 5
> > * Increment $i each time around
> >
> > So your loop is ending at the first check because $i is less than 5.
> > You want $i > 4 instead, I think.
>
> Umm, no, I don't think so... Your second point is wrong. The second part
> of a "for" statement indicates a statement that *must be true for the
> loop to continue*.
>
> I think you need to read this:
>
> http://www.php.net/for
>
> "In the beginning of each iteration, expr2 is evaluated. If it evaluates
> to TRUE, the loop continues and the nested statement(s) are executed. If
> it evaluates to FALSE, the execution of the loop ends."
>
> Jasper
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
edwardspl
ita.org.mo wrote:
> Sorry, I don't quit understanding the site http://www.php.net/for...
> So, would you mind to give me a example about it ?
for($i=0; $i<3; $i++) {
print($i);
}
will print:
0
1
2
Basically in any expression like the following:
for(expr1; expr2; expr3) {
// some code
}
expr1 is evaluated first.
then for as long as expr2 is true, "some code" followed by expr3 will be
evaluated over and over.
So the example at the start of my message initially sets $i to 0, then
repeats the code, adding 1 to $i each time, for as long as $i is less
than 3.
Jasper
attached mail follows:
Hello Jasper,
Does your means :
I need to rewite the source / result page as the following ?
Result page:
<?
for($i=0;$i<4;$i++)
{
$f.$i=$_GET['$f.$i'];
}
?>
<table>
<tr>
<td><? echo $f0[0];?></td>
<td><? echo $f1[0];?></td>
<td><? echo $f2[0];?></td>
<td><? echo $f3[0];?></td>
</tr>
<tr>
<td><? echo $f0[1];?></td>
<td><? echo $f1[1];?></td>
<td><? echo $f2[1];?></td>
<td><? echo $f3[1];?></td>
</tr>
<tr>
<td><? echo $f0[2];?></td>
<td><? echo $f1[2];?></td>
<td><? echo $f2[2];?></td>
<td><? echo $f3[2];?></td>
</tr>
</table>
Source page:
<table>
<tr>
for($i=0;$i<4;$i++)
{
<td><input type=checkbox name='f<? echo $i;?>[]' value='1'></td>
}
</tr>
</table>
Thank for your help !
Edward.
Jasper Bryant-Greene wrote:
> edwardspl
ita.org.mo wrote:
> > Sorry, I don't quit understanding the site http://www.php.net/for...
> > So, would you mind to give me a example about it ?
>
> for($i=0; $i<3; $i++) {
> print($i);
> }
>
> will print:
>
> 0
> 1
> 2
>
> Basically in any expression like the following:
> for(expr1; expr2; expr3) {
> // some code
> }
>
> expr1 is evaluated first.
> then for as long as expr2 is true, "some code" followed by expr3 will be
> evaluated over and over.
>
> So the example at the start of my message initially sets $i to 0, then
> repeats the code, adding 1 to $i each time, for as long as $i is less
> than 3.
>
> Jasper
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Bagus Nugroho wrote:
> I was uncomment php_mysql.dll and added php_mysqli.dll, put edited php.ini as recommended, also added libmysql.dll on c:\winnt\system32. But it still doesn't work, it still generate "cannot load mysql extension, ...".
>
> Previously, I was edit system variables(edit Path variable by add ;c:\php;c:\php\ext and add PHPRC > value c:\php), also edit Registry as the following :
> [HKLM\SOFTWARE\PHP]
> "IniFilePath"="C:\PHP"
>
> PHP installed on C:\PHP
> Apache 2.0 on C:\Program Files\Apache Group\ ...
> MySQL on C:\Program Files\MySQL
>
> I hope, someone can help me to solve the problem before I'm return back to PHP4.
Did you add the following line to your Apache configuration?
# configure the path to php.ini
PHPIniDir "C:/php"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]