php-general Digest 9 Feb 2008 23:53:29 -0000 Issue 5284

Topics (messages 269003 through 269013):

Re: Posting Summary for Week Ending 8 February, 2008: [EMAIL PROTECTED]
        269003 by: Børge Holen

PHP debugger recommendations, anyone?
        269004 by: Mary Anderson
        269005 by: Nathan Nobbe
        269006 by: Nathan Rixham
        269011 by: Nathan Rixham
        269012 by: Nathan Nobbe

Re: issues with calling methods twice in a row
        269007 by: Nathan Rixham

Re: php 4.x + mysql 5
        269008 by: Nathan Rixham

Re: php file extension
        269009 by: Nathan Rixham
        269010 by: Nathan Nobbe

Re: Order directory output
        269013 by: Børge Holen

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
OI, I'm topposting in irritation herer ;)
I've actuallly sent a couple of sarcasting mails and their not even counted. 
damn you dan. damn you

btw, how did you build the sarcasms detect script? ;D
my oh my I'm in good mood this morning.


On Friday 08 February 2008 22:00:40 PostTrack [Dan Brown] wrote:
>       Posting Summary for PHP-General List
>       Week Ending: Friday, 8 February, 2008
>
>       Messages            | Bytes              | Sender
>       --------------------+--------------------+------------------
>       391 (100%)          581347 (100%)       EVERYONE
>       32     (8.2%)      41862   (7.2%)      Daniel Brown <parasane at gmail 
> dot
> com> 27     (6.9%)      29259   (5%)        Nathan Nobbe <quickshiftin at
> gmail dot com> 21     (5.4%)      23274   (4%)        Paul Scott <pscott at
> uwc dot ac dot za> 17     (4.3%)      26180   (4.5%)      Jochem Maas
> <jochem at iamjochem dot com> 15     (3.8%)      23318   (4%)       
> Richard Lynch <ceo at l-i-e dot com> 15     (3.8%)      9331    (1.6%)     
> Per Jessen <per at computer dot org> 14     (3.6%)      15963   (2.7%)     
> Eric Butera <eric dot butera at gmail dot com> 14     (3.6%)      11187  
> (1.9%)      Richard Heyes <richardh at phpguru dot org> 12     (3.1%)     
> 52246   (9%)        szalinski <barneytramble at gmail dot com> 11    
> (2.8%)      27715   (4.8%)      Shawn McKenzie <nospam at mckenzies dot
> net> 11     (2.8%)      9530    (1.6%)      Greg Donald <gdonald at gmail
> dot com> 9      (2.3%)      14608   (2.5%)      Jim Lucas <lists at cmsws
> dot com> 9      (2.3%)      15210   (2.6%)      Casey <heavyccasey at gmail
> dot com> 8      (2%)        12953   (2.2%)      Andrew Ballard <aballard at
> gmail dot com> 7      (1.8%)      11631   (2%)        Robert Cummings
> <robert at interjinn dot com> 7      (1.8%)      21742   (3.7%)      Manuel
> Lemos <mlemos at acm dot org> 6      (1.5%)      14733   (2.5%)      Mad
> Unix <madunix at gmail dot com> 6      (1.5%)      10924   (1.9%)     
> Zoltán Németh <znemeth at alterationx dot hu> 6      (1.5%)      11225  
> (1.9%)      Wolf <LoneWolf at nc dot rr dot com> 6      (1.5%)      8139   
> (1.4%)      Jason Pruim <japruim at raoset dot com> 6      (1.5%)      4308
>    (0.7%)      js <ebgssth at gmail dot com> 5      (1.3%)      14543  
> (2.5%)      Robbert van Andel <robbert at vafam dot com> 5      (1.3%)     
> 5272    (0.9%)      Chris <dmagick at gmail dot com> 5      (1.3%)     
> 4450    (0.8%)      Martin Marques <martin at marquesminen dot com dot ar>
> 4      (1%)        4817    (0.8%)      Prabath Kumarasinghe <prabath321 at
> yahoo dot com> 4      (1%)        11452   (2%)        Nathan Rixham
> <nrixham at gmail dot com> 4      (1%)        7322    (1.3%)      Warren
> Vail <warren at vailtech dot net> 4      (1%)        4249    (0.7%)     
> Bastien Koert <bastien_k at hotmail dot com> 3      (0.8%)      2577   
> (0.4%)      clive <clive_lists at immigrationunit dot com> 3      (0.8%)   
>   3088    (0.5%)      jeffry s <paragasu at gmail dot com> 3      (0.8%)   
>   4269    (0.7%)      Larry Garfield <larry at garfieldtech dot com> 3     
> (0.8%)      2680    (0.5%)      Pieter du Toit <pieter at lpwebdesign dot
> co dot za> 3      (0.8%)      3762    (0.6%)      John Taylor-Johnston
> <John dot Taylor-Johnston at cegepsherbrooke dot qc dot ca> 3      (0.8%)  
>    9312    (1.6%)      Louie Miranda <lmiranda at gmail dot com> 3     
> (0.8%)      14240   (2.4%)      McNaught, Scott <scott dot mcnaught at
> synergy8 dot com> 3      (0.8%)      1511    (0.3%)      Ron Piggott <ron
> dot php at actsministries dot org> 2      (0.5%)      1786    (0.3%)     
> John Taylor-Johnston <jt dot johnston at USherbrooke dot ca> 2      (0.5%) 
>     839     (0.1%)      AmirBehzad Eslami <behzad dot eslami at gmail dot
> com> 2      (0.5%)      1561    (0.3%)      blackwater dev <blackwaterdev
> at gmail dot com> 2      (0.5%)      841     (0.1%)      nihilism machine
> <nihilismmachine at gmail dot com> 2      (0.5%)      2058    (0.4%)     
> Michael Moyle <mmoyle at gaba dot co dot jp> 2      (0.5%)      1147   
> (0.2%)      ehl lhe <ehl22_12 at hotmail dot com> 2      (0.5%)      13541 
>  (2.3%)      Andrés Robinet <agrobinet at bestplace dot biz> 2      (0.5%) 
>     2559    (0.4%)      Nikolay Ananiev <ananiev at thegdb dot com> 2     
> (0.5%)      2226    (0.4%)      VamVan <vamseevan at gmail dot com> 2     
> (0.5%)      1784    (0.3%)      Alain Roger <raf dot news at gmail dot com>
> 2      (0.5%)      3927    (0.7%)      Mr Webber <captain_webber at hotmail
> dot com> 2      (0.5%)      2935    (0.5%)      David Giragosian
> <dgiragosian at gmail dot com> 2      (0.5%)      1548    (0.3%)      pobox
> at verysmall dot org <pobox at verysmall dot org> 2      (0.5%)      1661  
>  (0.3%)      Feris Thia C dot  <feris dot thia at gmail dot com> 2     
> (0.5%)      1244    (0.2%)      LKSunny <ad at pc86 dot com> 2      (0.5%) 
>     1662    (0.3%)      Robert Fitzpatrick <lists at webtent dot net> 1    
>  (0.3%)      365     (0.1%)      Brian Dunning <brian at briandunning dot
> com> 1      (0.3%)      991     (0.2%)      Richard <php_list at ghz dot
> fr> 1      (0.3%)      2940    (0.5%)      Fnutt <trond at fnutt dot org> 1
>      (0.3%)      383     (0.1%)      Bruce Cowin <bdc at topenergy dot co
> dot nz> 1      (0.3%)      1327    (0.2%)      Rob Gould <gouldimg at mac
> dot com> 1      (0.3%)      1041    (0.2%)      zerof <zerof at terra dot
> com dot br> 1      (0.3%)      860     (0.1%)      Fahad javed <fahadedupk
> at gmail dot com> 1      (0.3%)      586     (0.1%)      David Robley
> <robleyd at aapt dot net dot au> 1      (0.3%)      845     (0.1%)     
> Leonard Burton <leonardburton at gmail dot com> 1      (0.3%)      1258   
> (0.2%)      Legolas wood <legolas dot w at gmail dot com> 1      (0.3%)    
>  866     (0.1%)      Dare Williams <darrenwilly at yahoo dot com> 1     
> (0.3%)      1043    (0.2%)      Louie Henry <louiehenry at brktel dot on
> dot ca> 1      (0.3%)      1623    (0.3%)      Colin Guthrie <gmane at
> colin dot guthr dot ie> 1      (0.3%)      437     (0.1%)      Steve
> Marquez <smarquez at marquez-design dot com> 1      (0.3%)      1124   
> (0.2%)      Rob G <robg at areyouserved dot com> 1      (0.3%)      1019   
> (0.2%)      puneetjain <puneet dot jain1 at wipro dot com> 1      (0.3%)   
>   269     (0%)        MaryAnn Woodall <mawoodall at earthlink dot net> 1   
>   (0.3%)      1280    (0.2%)      Floor Terra <floort at gmail dot com> 1  
>    (0.3%)      1218    (0.2%)      C dot R dot Vegelin <cr dot vegelin at
> hetnet dot nl> 1      (0.3%)      802     (0.1%)      mike <mike503 at
> gmail dot com> 1      (0.3%)      698     (0.1%)      Michael Fischer
> <michi dot fischer at gmx dot net> 1      (0.3%)      2838    (0.5%)     
> bruce <bedouglas at earthlink dot net> 1      (0.3%)      1115    (0.2%)   
>   chetan rane <chetan dot d dot rane at gmail dot com> 1      (0.3%)     
> 721     (0.1%)      Siegfried Gipp <siegfried at rorkvell dot de> 1     
> (0.3%)      265     (0%)        doc <dingus_76 at hotmail dot com> 1     
> (0.3%)      742     (0.1%)      j dot vanhooren at e2ma dot nl 1     
> (0.3%)      368     (0.1%)      Jonesy <gmane at jonz dot net> 1     
> (0.3%)      496     (0.1%)      dg <daneane at bluerodeo dot com> 1     
> (0.3%)      266     (0%)        RandMan <ad at pc86 dot com> 1      (0.3%) 
>     556     (0.1%)      Daevid Vincent <daevid at daevid dot com> 1     
> (0.3%)      136     (0%)        <salon at andersonsturgess dot com> 1     
> (0.3%)      1237    (0.2%)      tedd <tedd dot sperling at gmail dot com> 1
>      (0.3%)      3357    (0.6%)      venkatk at aol dot in
>       1      (0.3%)      1482    (0.3%)      Michelle Konzack <linux4michelle 
> at
> freenet dot de> 1      (0.3%)      1114    (0.2%)      Edward Kay <edward
> at labhut dot com> 1      (0.3%)      567     (0.1%)      Aschwin Wesselius
> <get at illuminated dot nl> 1      (0.3%)      506     (0.1%)      Zoran
> Bogdanov <test1 dot test1 at hi dot t-com dot hr> 1      (0.3%)      1215  
>  (0.2%)      Ford, Mike <M dot Ford at leedsmet dot ac dot uk> 1     
> (0.3%)      2707    (0.5%)      Richard <richi_8 at hotmail dot com> 1     
> (0.3%)      1424    (0.2%)      Peter Ford <pete at justcroft dot com> 1   
>   (0.3%)      237     (0%)        Cameron Just <c dot just at
> phoenixdigital dot com> 1      (0.3%)      352     (0.1%)      Hiep Nguyen
> <hiep at ee dot ucr dot edu> 1      (0.3%)      401     (0.1%)      George
> Pitcher <george dot pitcher at ingenta dot com> 1      (0.3%)      1244   
> (0.2%)      Adam Williams <awilliam at mdah dot state dot ms dot us> 1     
> (0.3%)      6825    (1.2%)      PostTrack [Dan Brown]
> <listwatch-php-general at pilotpig dot net>
>
>
> NOTE: Numbers may not add up to 100% due to protection of names and
> addresses upon request.
>
> DISCLAIMER: If you want your email address omitted from future weekly
> reports, please email me privately at [EMAIL PROTECTED] and it will be
> removed.



-- 
---
Børge Holen
http://www.arivene.net

--- End Message ---
--- Begin Message ---
Hi all,
I am getting tired of writing echo statements for almost every parameter, then deleting them while I am writing code. I would really like a debugger which would work with my browser. I have run across an open source one, Xdebug, and would like to hear of other's experience with it. 2.0.2 is, I believe, the latest release.

Mary Anderson

--- End Message ---
--- Begin Message ---
On Feb 9, 2008 11:48 AM, Mary Anderson <[EMAIL PROTECTED]> wrote:

> Hi all,
>    I am getting tired of writing echo statements for almost every
> parameter, then deleting them while I am writing code.   I would really
> like a debugger which would work with my browser.  I have run across an
> open source one, Xdebug, and would like to hear of other's experience
> with it.  2.0.2 is, I believe, the latest release.


hi mary,
using xdebug for debugging involves the selection of a debugging client
besides
just the debugger itself.  with xdebug ive used Eclipse PDT, and
Protoeditor.
PDT was really smooth because if i did something in the browser like,
navigate
away from the current page for example; PDT seemed to capture that.  The
downside of PDT was a lack of directory mapping support (they may have it by
now).  what this is, is a way to tell your xdebug client where the files on
the
remote server are, that are on your local system (the ones youre debugging).
since PDT lacked this feature, i was unable to set breakpoints, which was
very
limiting.
protoeditor is cool, but i had some problems with it as well; in all it
didnt seem
nearly as smooth as PDT and it didnt seem to be able to capture navigation
away from the current page in the browser, also quite limiting.
one issue i had w/ PDT was personal confusion with the controls in the ui.
sometimes i would have to close down eclipse just to sort of reset things.
in general, i think youll find these tools neat to experiment with, but when
i was
using them several months back they didnt seem ready for prime time.
perhaps i should give them another look..

-nathan

--- End Message ---
--- Begin Message ---
zend studio with zend debugger?

Nathan Nobbe wrote:
On Feb 9, 2008 11:48 AM, Mary Anderson <[EMAIL PROTECTED]> wrote:

Hi all,
   I am getting tired of writing echo statements for almost every
parameter, then deleting them while I am writing code.   I would really
like a debugger which would work with my browser.  I have run across an
open source one, Xdebug, and would like to hear of other's experience
with it.  2.0.2 is, I believe, the latest release.


hi mary,
using xdebug for debugging involves the selection of a debugging client
besides
just the debugger itself.  with xdebug ive used Eclipse PDT, and
Protoeditor.
PDT was really smooth because if i did something in the browser like,
navigate
away from the current page for example; PDT seemed to capture that.  The
downside of PDT was a lack of directory mapping support (they may have it by
now).  what this is, is a way to tell your xdebug client where the files on
the
remote server are, that are on your local system (the ones youre debugging).
since PDT lacked this feature, i was unable to set breakpoints, which was
very
limiting.
protoeditor is cool, but i had some problems with it as well; in all it
didnt seem
nearly as smooth as PDT and it didnt seem to be able to capture navigation
away from the current page in the browser, also quite limiting.
one issue i had w/ PDT was personal confusion with the controls in the ui.
sometimes i would have to close down eclipse just to sort of reset things.
in general, i think youll find these tools neat to experiment with, but when
i was
using them several months back they didnt seem ready for prime time.
perhaps i should give them another look..

-nathan


--- End Message ---
--- Begin Message --- It suddenly dawned on me that you are doing an echo for every paremeter, a debugger will never completely alleviate the need for this, however try using:
print_r(get_defined_vars());
instead, that way you get everything output that you could need, it's often also worth putting an exit(); after prining out so you can see where the script is failing; if indeed it is.

Nathan

Nathan Rixham wrote:
zend studio with zend debugger?

Nathan Nobbe wrote:
On Feb 9, 2008 11:48 AM, Mary Anderson <[EMAIL PROTECTED]> wrote:

Hi all,
   I am getting tired of writing echo statements for almost every
parameter, then deleting them while I am writing code.   I would really
like a debugger which would work with my browser.  I have run across an
open source one, Xdebug, and would like to hear of other's experience
with it.  2.0.2 is, I believe, the latest release.


hi mary,
using xdebug for debugging involves the selection of a debugging client
besides
just the debugger itself.  with xdebug ive used Eclipse PDT, and
Protoeditor.
PDT was really smooth because if i did something in the browser like,
navigate
away from the current page for example; PDT seemed to capture that.  The
downside of PDT was a lack of directory mapping support (they may have it by now). what this is, is a way to tell your xdebug client where the files on
the
remote server are, that are on your local system (the ones youre debugging).
since PDT lacked this feature, i was unable to set breakpoints, which was
very
limiting.
protoeditor is cool, but i had some problems with it as well; in all it
didnt seem
nearly as smooth as PDT and it didnt seem to be able to capture navigation
away from the current page in the browser, also quite limiting.
one issue i had w/ PDT was personal confusion with the controls in the ui. sometimes i would have to close down eclipse just to sort of reset things. in general, i think youll find these tools neat to experiment with, but when
i was
using them several months back they didnt seem ready for prime time.
perhaps i should give them another look..

-nathan


--- End Message ---
--- Begin Message ---
On Feb 9, 2008 3:02 PM, Nathan Rixham <[EMAIL PROTECTED]> wrote:

> It suddenly dawned on me that you are doing an echo for every paremeter,
> a debugger will never completely alleviate the need for this, however
> try using:
> print_r(get_defined_vars());
> instead, that way you get everything output that you could need, it's
> often also worth putting an exit(); after prining out so you can see
> where the script is failing; if indeed it is.
>

get_defined_vars() can be a real hassle to sift through, mainly because it
spits out a bunch of data you dont usually want to see.  if you want to see
the values of a given functions parameters w/o an echo statement for each
on the best way is to use, func_get_args();
eg.
die(var_dump(func_get_args()));

also, xdebug has something called function traces; which you dont need to
configure a client for.  it will simply log all function calls to a file and
its
configurable, so you can have it log the values of actual parameters if you
like.  and it also ships w/ a special highlighter for vim, which is quite
nice.
http://xdebug.org/docs/execution_trace

-nathan

--- End Message ---
--- Begin Message ---
Evening,

with a great deal of assuming, I would assume that you are saving all these new users to database, in that database you have a unique key on the email address (as you should) and because you're using the same email address, the insert's are getting ignored. ie function runs, but no data is saved due to key conflicts.

that is with a hell of a lot of assuming though! try the ol' echo "here"; in your function and see if you get five "here"'s on screen!

Nathan

nihilism machine wrote:
i have a method called CreateUser() which is public and takes 5 variables as its data, then adds them to a db. it only executes the first method not the other although its all the same but the variable.

ex:

$auth = new auth();
$auth->CreateUser("fake email", 1, "fake name", 4);
$auth->CreateUser("fake email", 2, "fake name", 4);
$auth->CreateUser("fake email", 3, "fake name", 4);
$auth->CreateUser("fake email", 4, "fake name", 4);
$auth->CreateUser("fake email", 5, "fake name", 4);

any ideas? only the first method gets executed?

--- End Message ---
--- Begin Message ---
save passwords as sha2 or such like instead?

further, it would appear that since the "old password" "new password" is set mysql server side, then php will have no bearing what so ever on how passwords are saved, seeing as it's mysql which will run the password() function and not php :)

ps too bad on the ol php 4 job

Nathan

ahlist wrote:
On Feb 8, 2008 4:16 PM, Jim Lucas <[EMAIL PROTECTED]> wrote:
ahlist wrote:
Hi,


I have a clean php 4.4.7 compile but it still shows the old mysql lib
version. I can't find where it is picking that up at. Is it just built
into the php sources that way?
Yes, it is included with the php source.  If you want it to use newer libs, then
download the devel packages for the newer mysql version and at compile time,
point the configure script for php use the newer devel libs instead.  That
should be all that is needed.


Good idea! I may end up doing that.

My goal is to position this so that a move to php5 would work and not
be stuck with a bunch of old-style mysql passwords that need updated
by users (since the original passwords are not retrievable of course
for conversion unless I store plain text copies, which I do not want
to do).

Thanks for your input.

--- End Message ---
--- Begin Message --- Often people install php4 and 5 on the same server, then configure .php to use the latest version of php(5) and anything with extension php4 to use the old`e php4.

Thus, the file contents remain the same, however the way they are executed depends entirely on the server(s) config.

Nathan

MaryAnn Woodall wrote:
Just starting to use php on my webpages. If I save a file as .php or .php4 are they the same file. For example is index.php the same as index.php4?

MaryAnn

--- End Message ---
--- Begin Message ---
and if you want even more superfluous information
windows, more specifically, ntfs, doest support files
with only capitalization differences in the file names.
eg.
WindowsSucks.txt
windowssucks.txt

-nathan

--- End Message ---
--- Begin Message ---
On Saturday 09 February 2008 17:47:24 you wrote:
> The output is:
>
> 04.txt
> 01.txt
> 03.txt
> 02.txt
> 05.txt
>
>
> When the files are named:
>
> 01.txt
> 02.txt
> 03.txt
> 04.txt
> 05.txt


jup fifo. first on the filesystem first out.




>
> Thanks,
>
> --
> Steve M.
>
> on 2/9/08 5:36 AM Børge Holen ([EMAIL PROTECTED]) wrote:
> > On Saturday 09 February 2008 02:22:28 Shawn McKenzie wrote:
> >> > Pastor Steve wrote:
> >>> > > Hi, thanks for all your help today.
> >>> > >
> >>> > > I have the following code and I am trying to order the output.
> >>> > > Currently it seems really random. Can anyone point me in the right
> >>> > > direction?
> >>> > >
> >>> > > <?php
> >>> > >
> >>> > > $dir = "content/current/breaking_news/";
> >>> > >
> >>> > > // set pattern
> >>> > > $pattern = ".txt*|.TXT*";
> >>> > >
> >>> > > // open directory and parse file list
> >>> > > if (is_dir($dir))
> >>> > > {
> >>> > > if ($dh = opendir($dir))
> >>> > > {
> >>> > >
> >>> > > //This is the div that contains the wrap around for the breaking
> >>> > > news section.
> >>> > > echo "
> >>> > >     <div class=\"spstory\" style=\"font-family: Times New Roman,
> >>> > > Times, serif; font-size: 12px; width: 290px;\">
> >>> > >         <div style=\"width: 285px; background-color: #FFFFCC;
> >>> > > padding: 3px;\">
> >>> > >             <span class=\"NormalHeadRed\">Breaking News</span>
> >>> > >             <br />Please check here often for breaking news
> >>> > > stories. </div>
> >>> > >             <p />
> >>> > >         <span class=\"NomalText\">
> >>> > >
> >>> > >         <ul>";
> >>> > >
> >>> > > // iterate over file list
> >>> > > while (($filename = readdir($dh)) !== false)
> >>> > >
> >>> > > {
> >>> > >
> >>> > > // if filename matches search pattern, print it
> >>> > > if (ereg($pattern, $filename))
> >>> > >    if(strpos($filename,'.')>0)
> >>> > >
> >>> > > {
> >>> > > $fh = fopen("$dir" . "$filename", "r");
> >>> > >
> >>> > >     $filehead = fgets($fh);
> >>> > >
> >>> > > fclose($fh);
> >>> > > echo "
> >>> > >         <li class=\"bn_bullet\">
> >>> > >             <a href=\"/breaking_news/$filename\">$filehead</a>
> >>> > >         </li>";
> >>> > > }
> >>> > > }
> >>> > > echo "
> >>> > >         </ul><p />
> >>> > >         </span>
> >>> > >     </div>";
> >>> > >
> >>> > > // close directory
> >>> > > closedir($dh);
> >>> > > }
> >>> > > }
> >>> > >
> >>> > > ?>
> >>> > >
> >>> > > Thank you,
> >>> > >
> >>> > > --
> >>> > > Steve Marquez
> >> >
> >> > How is the output random?  The text from the file, or the order the
> >> > files are read?
> >
> > I recon its the same problem I faced where files are read in the fifo
> > order instead of alphabetical. or did I miss out on this thread
> > completly?



-- 
---
Børge Holen
http://www.arivene.net

--- End Message ---

Reply via email to