|
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 1 Aug 2006 23:50:13 -0000 Issue 4269
php-general-digest-help
lists.php.net
Date: Tue Aug 01 2006 - 18:50:13 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 1 Aug 2006 23:50:13 -0000 Issue 4269
Topics (messages 239943 through 239966):
Re: All active variables?
239943 by: Stut
239944 by: Peter Lauri
Re: Books: PHP and WAP
239945 by: Angelo Zanetti
Re: memory leak - how to find it?
239946 by: Adam Zey
Re: non blocking fsockopen
239947 by: Adam Zey
PHP Frameworks - Opinion
239948 by: Gabe
239949 by: Kevin Waterson
239950 by: Paul Scott
239951 by: Kilbride, James P.
239952 by: Satyam
239961 by: Colin Guthrie
239962 by: tedd
239964 by: Michael B Allen
239965 by: Steve Turnbull
239966 by: Adam Zey
PEAR::DB and PDO
239953 by: Yannick Warnier
239955 by: Lester Caine
239956 by: Ezra Nugroho
Dynamically assigning var namesi
239954 by: bob pilly
239957 by: Brad Bonkoski
239958 by: dpgirago.mdanderson.org
239959 by: João Cândido de Souza Neto
239963 by: Miles Thompson
Re: Retrieving response headers from an off-site page
239960 by: John Gunther
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:
Peter Lauri wrote:
> Is it possible to print out all variables that are active within a script
> without doing it manually? This is what I would like to do:
>
> $a = 12;
> $b = 'Peter';
> $c = 'Lauri';
>
> echo '<pre>';
> print_r( get_all_variables() );
> echo '</pre>';
30 seconds of searching the PHP site later...
http://php.net/get_defined_vars
-Stut
attached mail follows:
Great stuff, I probably just searched the wrong words.
-----Original Message-----
From: Stut [mailto:stuttle
gmail.com]
Sent: Tuesday, August 01, 2006 6:22 PM
To: Peter Lauri
Cc: php-general
lists.php.net
Subject: Re: [PHP] All active variables?
Peter Lauri wrote:
> Is it possible to print out all variables that are active within a script
> without doing it manually? This is what I would like to do:
>
> $a = 12;
> $b = 'Peter';
> $c = 'Lauri';
>
> echo '<pre>';
> print_r( get_all_variables() );
> echo '</pre>';
30 seconds of searching the PHP site later...
http://php.net/get_defined_vars
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Austin Denyer wrote:
>Angelo Zanetti wrote:
>
>
>>Hi all,
>>
>>I need some recommendations for books:
>>are there any good books on PHP and WAP/WML? Also (OT) a recommendation
>>regarding books for CSS2 and XHTML.
>>
>>
>
>http://www.hudzilla.org/phpbook/
>
>Regards,
>Austin.
>
>
>
Thanks to all those who replied, much appreciated!
-
------------------------------------------------------------------------
Angelo Zanetti
Systems developer
------------------------------------------------------------------------
*Telephone:* +27 (021) 469 1052
*Mobile:* +27 (0) 72 441 3355
*Fax:* +27 (0) 86 681 5885
*
Web:* http://www.zlogic.co.za
*E-Mail:* angelo
zlogic.co.za <mailto:jerry
zlogic.co.za>
attached mail follows:
Robin Getz wrote:
> I am trying to debug a php script that I downloaded, which has a memory
> leak in it.
>
> I was looking for a way to find what variables were in php's memory, and
> what size, they were, but I couldn't find anything?
>
> The script is a off-line wiki conversion tool (walks through a wiki to
> create a bunch of html files for off line viewing). As the tools walks
> the files, and does the conversion, I can see the memory consumption go
> up and up as it walks the files, until it hits the mem limit, and crashes.
>
> Any suggestions appreciated.
>
> Thanks
> -Robin
Place get_memory_usage() at various points in your script to see where
it's being used up.
Regards, Adam.
attached mail follows:
clive wrote:
> I know in PHP 5 you can use stream_socket_client() and set the flag to
> STREAM_CLIENT_ASYNC_CONNECT|STREAM_CLIENT_CONNECT which opens the socket
> in a non blocking mode.
>
> in php 4 you can use fsockopen and then set the socket to non blocking.
> The problem with this is that the fsockopen blocks until it creates the
> socket or times out.
>
> I want to know if there is a replacement for fsockopen that attempts to
> open a socket, but returns immediately instead of blocking or is there
> another way to open a socket in a non blocking mode in PHP 4
>
> thanks
>
> Clive.
Perhaps the socket plugins for PHP4, which should allow similar
flexibility to stream_socket_client()? The downside is you'll need the
socket module enabled/compiled.
Regards, Adam Zey.
attached mail follows:
What's the common consensus as to a solid PHP framework to use for
application development? There seems to be a number of them out there,
but I'm not sure which one's are the most robust, actively developed,
secure, etc etc.
Thoughts?
attached mail follows:
This one time, at band camp, Gabe <ydnahg-news4432
mailblocks.com> wrote:
> What's the common consensus as to a solid PHP framework to use for
> application development? There seems to be a number of them out there,
> but I'm not sure which one's are the most robust, actively developed,
> secure, etc etc.
If you want something solid and mature, you cant go past ezPublish and ezComponents
http://www.ez.no
Kevin
--
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote."
attached mail follows:
On Tue, 2006-08-01 at 12:35 -0400, Gabe wrote:
> What's the common consensus as to a solid PHP framework to use for
> application development? There seems to be a number of them out there,
> but I'm not sure which one's are the most robust, actively developed,
> secure, etc etc.
>
OK, from my side, we have 2 frameworks, one more mature than the other.
Both are pretty much the same architecture (MVC everything abstracted,
multilingual etc) but one is specifically geared for php4 and the other
php5.1.2 and above.
Both are GPL licenced and make heavy use of pear objects.
You can download the KEWL.NextGen application, built on the PHP4
framework, KINKY (Yes its a recursive acronym), or go for the less
mature, but much more fun PHP5 framework (Chisimba - A Chechewu word for
the wooden pole framework used to build a traditional African house).
Both are products of Africa, made in Africa as part of a collaborative
network of over 16 African Universities and 60 developers all over the
continent. If you contribute to this project, you are not only sharing
code, but building skills in Africa! :)
Both projects can be downloaded from http://avoir.uwc.ac.za (CMS module
on KINKY) and the PHP5 stuff can be accessed at
http://5ive.uwc.ac.za/app/ . We will be making a first public
pre-release of this in the next couple of days...
Both projects have very active developer and user mailing lists.
Let me know if you need some more information!
--Paul
All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm
attached mail follows:
I like what I've been seeing from Solar at solarphp.com. And Paul Jones,
the maintainer, is extremely active on the project and the community
seems to be very much in love with the framework. Community is a little
small but going pretty strong.
James Kilbride
> -----Original Message-----
> From: Gabe [mailto:ydnahg-news4432
mailblocks.com]
> Sent: Tuesday, August 01, 2006 12:36 PM
> To: php-general
lists.php.net
> Subject: [PHP] PHP Frameworks - Opinion
>
> What's the common consensus as to a solid PHP framework to
> use for application development? There seems to be a number
> of them out there, but I'm not sure which one's are the most
> robust, actively developed, secure, etc etc.
>
> Thoughts?
>
> --
> PHP General Mailing List (http://www.php.net/) To
> unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
There is no 'common consensus' but I am sure you'll be getting lots and
lots, I would even say LOTS, of sugestions.
Satyam
----- Original Message -----
From: "Gabe" <ydnahg-news4432
mailblocks.com>
To: <php-general
lists.php.net>
Sent: Tuesday, August 01, 2006 6:35 PM
Subject: [PHP] PHP Frameworks - Opinion
> What's the common consensus as to a solid PHP framework to use for
> application development? There seems to be a number of them out there,
> but I'm not sure which one's are the most robust, actively developed,
> secure, etc etc.
>
> Thoughts?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
attached mail follows:
Satyam wrote:
> There is no 'common consensus' but I am sure you'll be getting lots and
> lots, I would even say LOTS, of sugestions.
I'm surprised no-one has mentioned the Zend Framework yet.....
I'm looking to do a bit of a rewrite of a large PHP application in the
near future and would like to think Zend would be a good horse to back,
but the fact no-one here has mentioned it yet makes me doubt this tactic!
Anyone got opinions (good or bad) on Zend that would be helpful for me
(and others)?
Col.
attached mail follows:
At 10:46 PM +0100 8/1/06, Colin Guthrie wrote:
>I'm surprised no-one has mentioned the Zend Framework yet.....
>
>I'm looking to do a bit of a rewrite of a large PHP application in
>the near future and would like to think Zend would be a good horse
>to back, but the fact no-one here has mentioned it yet makes me
>doubt this tactic!
>
>Anyone got opinions (good or bad) on Zend that would be helpful for
>me (and others)?
>
>Col.
Col:
I own Zend Professional, but don't use it (not good or bad).
I find that Macintosh GoLive CS (although not designed as a php
development platform) meets most of my needs, which are a mixture of
html, css, php, mysql, and javascript editing. Additionally, GoLive
works as a my-side/server-side file organizational and
synchronization system.
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Tue, 1 Aug 2006 19:44:28 +0200
"Satyam" <Satyam
satyam.com.ar> wrote:
> There is no 'common consensus' but I am sure you'll be getting lots and
> lots, I would even say LOTS, of sugestions.
I would be very skeptical of any "suggestions" because only someone
who tried multiple frameworks would be in a position to say with any
authority that one is better than another. And even then I would still
be skeptical. Compounded by the fact that most fall into the "almost
what I need but not quite" category (don't they all?) I see no other
option but to try each. Also, reasoning that you will eventually need to
modify it you might as well pick something that is relatively simple and
extensible. Meaning, it doesn't need to be "mature". It just needs to be
clearly organized and well thought out. After looking at the source for
a few it should become apparent what techniques are superior to others.
Mike
--
Michael B Allen
PHP Extension for SSO w/ Windows Group Authorization
http://www.ioplex.com/
attached mail follows:
On Tue, 2006-08-01 at 12:35 -0400, Gabe wrote:
> What's the common consensus as to a solid PHP framework to use for
> application development? There seems to be a number of them out there,
> but I'm not sure which one's are the most robust, actively developed,
> secure, etc etc.
>
> Thoughts?
>
I use Zend Pro - it makes for very effective development, especially
when developing in a team. It supports Subversion and CVS version
control, has excellent predictive typing, PHPDoc support, syntax
highlighting, ftp and sftp support, the list goes on...
Also, for about $80 (off the top of my head), there is a great course
run by PHP Architect on getting the most from it - it really is a
powerful tool.
Downside is it's more costly than others, but well worth it in my
opinion.
Just my thoughts...
Cheers
Steve
--
Steve Turnbull
Digital Content Developer
YHGfL Foundation
e steve.turnbull
yhgfl.net
t 01724 275030
The YHGfL Foundation Disclaimer can be found at:
http://www.yhgfl.net/foundation-services/yhgfl-email-disclaimer/
attached mail follows:
Steve Turnbull wrote:
> On Tue, 2006-08-01 at 12:35 -0400, Gabe wrote:
>> What's the common consensus as to a solid PHP framework to use for
>> application development? There seems to be a number of them out there,
>> but I'm not sure which one's are the most robust, actively developed,
>> secure, etc etc.
>>
>> Thoughts?
>>
> I use Zend Pro - it makes for very effective development, especially
> when developing in a team. It supports Subversion and CVS version
> control, has excellent predictive typing, PHPDoc support, syntax
> highlighting, ftp and sftp support, the list goes on...
>
> Also, for about $80 (off the top of my head), there is a great course
> run by PHP Architect on getting the most from it - it really is a
> powerful tool.
>
> Downside is it's more costly than others, but well worth it in my
> opinion.
>
> Just my thoughts...
>
> Cheers
> Steve
>
Zend Studio Pro isn't a PHP framework. It's a PHP IDE. Zend has multiple
products.
Regards, Adam.
attached mail follows:
Hi there,
I will soon need to include a database abstraction layer in my company's
software and I am looking for the best choice to make.
The software is promoted as working with PHP4, so I wouldn't use PDO,
although I see that a PHP4 implementation of PDO exists [1] and I could
use this one (any comments on that are appreciated).
So basically I'm left with PEAR::DB (or PEAR::MDB2) [2] and ADOdb [3]. I
have found a comparison [4] but it doesn't sound too objective.
What I'd really like to know is:
- does PDO come from PEAR::DB?
- does ADOdb really add value in comparison with PEAR::DB?
Any suggestion welcome, thank you so much,
Yannick
[1] http://www.phpclasses.org/browse/package/2572.html
[2] http://pear.php.net/package/MDB2
[3] http://adodb.sourceforge.net/
[4] http://phplens.com/phpeverywhere/node/view/39
attached mail follows:
Yannick Warnier wrote:
> Hi there,
>
> I will soon need to include a database abstraction layer in my company's
> software and I am looking for the best choice to make.
>
> The software is promoted as working with PHP4, so I wouldn't use PDO,
> although I see that a PHP4 implementation of PDO exists [1] and I could
> use this one (any comments on that are appreciated).
>
> So basically I'm left with PEAR::DB (or PEAR::MDB2) [2] and ADOdb [3]. I
> have found a comparison [4] but it doesn't sound too objective.
>
> What I'd really like to know is:
> - does PDO come from PEAR::DB?
> - does ADOdb really add value in comparison with PEAR::DB?
>
> Any suggestion welcome, thank you so much,
The answer depends on why you need the abstraction layer. If you plan to
switch transparently between engines, then the SQL will need to be
managed to provide computable queries. I use ADOdb since it does a lo of
that management internally. All that PDO will do is give you compatible
function names, you will still need to change things FIRST/SKIP/LIMIT
manually for each engine.
Since ADOdb has always provided the cross engine compatibility I've not
looked at PEAR::DB recently, other than the 'compatible' functions
provided in ADOdb ;)
--
Lester Caine - G8HFL
-----------------------------
L.S.Caine Electronic Services - http://home.lsces.co.uk
Model Engineers Digital Workshop -
http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php
attached mail follows:
I've used PDO, PEAR::DB, and ADOdb. I like ADOdb the most. You'd love
it's new Active Record extension.
On Tue, 2006-08-01 at 18:47 +0100, Yannick Warnier wrote:
> Hi there,
>
> I will soon need to include a database abstraction layer in my company's
> software and I am looking for the best choice to make.
>
> The software is promoted as working with PHP4, so I wouldn't use PDO,
> although I see that a PHP4 implementation of PDO exists [1] and I could
> use this one (any comments on that are appreciated).
>
> So basically I'm left with PEAR::DB (or PEAR::MDB2) [2] and ADOdb [3]. I
> have found a comparison [4] but it doesn't sound too objective.
>
> What I'd really like to know is:
> - does PDO come from PEAR::DB?
> - does ADOdb really add value in comparison with PEAR::DB?
>
> Any suggestion welcome, thank you so much,
>
> Yannick
>
> [1] http://www.phpclasses.org/browse/package/2572.html
> [2] http://pear.php.net/package/MDB2
> [3] http://adodb.sourceforge.net/
> [4] http://phplens.com/phpeverywhere/node/view/39
>
attached mail follows:
Hi all
Does anyone know if you can assign a new variable name based on the contents of another variable in PHP? If so whats the syntax to do this?
I am parsing a text file that has tens of preset attributes and some of these have hundreds of sub attributes. For example the text file contains flight details, on every flight there can be up to 500 passengers but there are generally only 50 so i dont want to have declare 500 vars when i hardly ever use them. What i am trying to do is count the amount of pasengers present and dynamically create the variables based on this.$surname1,$surname2 etc...
Im not sure whether this is a sane way to approach this problem or not. Any advice or pointing to relevant documentation about either syntax for this or ways of tackling this sort of problem (im sure it must be a regular occurance in the coding world??) would be greatly appreciated!!
Thanks in advance for any help or advice.
Cheers
Bob
---------------------------------
All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
attached mail follows:
Hi Bob,
Based on what you said, I would say the normal coding way of handling
this is with an array.
If you are unfamiliar with them, www.php.net/array would be a good place
to start.
-Brad
bob pilly wrote:
> Hi all
>
> Does anyone know if you can assign a new variable name based on the contents of another variable in PHP? If so whats the syntax to do this?
>
> I am parsing a text file that has tens of preset attributes and some of these have hundreds of sub attributes. For example the text file contains flight details, on every flight there can be up to 500 passengers but there are generally only 50 so i dont want to have declare 500 vars when i hardly ever use them. What i am trying to do is count the amount of pasengers present and dynamically create the variables based on this.$surname1,$surname2 etc...
>
> Im not sure whether this is a sane way to approach this problem or not. Any advice or pointing to relevant documentation about either syntax for this or ways of tackling this sort of problem (im sure it must be a regular occurance in the coding world??) would be greatly appreciated!!
>
> Thanks in advance for any help or advice.
>
> Cheers
>
> Bob
>
>
> ---------------------------------
> All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
>
attached mail follows:
Bob Pilly asked earlier today:
> Does anyone know if you can assign a new variable name based on the
contents of another variable in PHP? If so whats the syntax to do this?
$counter = 1;
for ($i == 0; $i < 6; $i++) {
${'newVar_' . $counter} = $counter;
$counter++;
}
echo $newVar_1 . "<br />";
echo $newVar_2 . "<br />";
echo $newVar_3 . "<br />";
echo $newVar_4 . "<br />";
echo $newVar_5 . "<br />";
echo $newVar_6 . "<br />";
This displays:
1
2
3
4
5
6
Something like this maybe?
David
attached mail follows:
I would like to help, but i need some mor details.
each line of the text file is a flight?
If so, how are separeted each passenger?
It would be important to help me in thinkin somethink to help you.
"bob pilly" <bobpilly
yahoo.co.uk> escreveu na mensagem
news:20060801174905.79517.qmail
web26212.mail.ukl.yahoo.com...
> Hi all
>
> Does anyone know if you can assign a new variable name based on the
> contents of another variable in PHP? If so whats the syntax to do this?
>
> I am parsing a text file that has tens of preset attributes and some of
> these have hundreds of sub attributes. For example the text file contains
> flight details, on every flight there can be up to 500 passengers but
> there are generally only 50 so i dont want to have declare 500 vars when i
> hardly ever use them. What i am trying to do is count the amount of
> pasengers present and dynamically create the variables based on
> this.$surname1,$surname2 etc...
>
> Im not sure whether this is a sane way to approach this problem or not.
> Any advice or pointing to relevant documentation about either syntax for
> this or ways of tackling this sort of problem (im sure it must be a
> regular occurance in the coding world??) would be greatly appreciated!!
>
> Thanks in advance for any help or advice.
>
> Cheers
>
> Bob
>
>
> ---------------------------------
> All new Yahoo! Mail "The new Interface is stunning in its simplicity and
> ease of use." - PC Magazine
attached mail follows:
At 02:49 PM 8/1/2006, bob pilly wrote:
>Hi all
>
>Does anyone know if you can assign a new variable name based on the
>contents of another variable in PHP? If so whats the syntax to do this?
>
> I am parsing a text file that has tens of preset attributes and some of
> these have hundreds of sub attributes. For example the text file contains
> flight details, on every flight there can be up to 500 passengers but
> there are generally only 50 so i dont want to have declare 500 vars when
> i hardly ever use them. What i am trying to do is count the amount of
> pasengers present and dynamically create the variables based on
> this.$surname1,$surname2 etc...
>
> Im not sure whether this is a sane way to approach this problem or not.
> Any advice or pointing to relevant documentation about either syntax for
> this or ways of tackling this sort of problem (im sure it must be a
> regular occurance in the coding world??) would be greatly appreciated!!
>
>Thanks in advance for any help or advice.
>
>Cheers
>
>Bob
Use arrays - check the array_push() function.
Or - and I'm winging it here - an array of objects, assuming PHP will let
you do so.
Then with all of the other wonderful functions PHP has for managing arrays
you're away to the races.
Alternately, if PHP will not allow arrays of objects, use parallel arrays.
Either method will be much easier than trying to create $var1, $var2, ...
$var9999
Regards - Miles Thompson
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.10.5/404 - Release Date: 7/31/2006
attached mail follows:
Thank you! It sure looks like cURL is exactly the tool I need. As soon
as I get it installed, I'll start playing with it.
Ray Hauge wrote:
>I deal with screen-scraping a lot at work. I would suggest using cURL to
>store the cookie data, and then subsequently get the data you need.
>
>HTH
>
>
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]