php-general Digest 8 Aug 2009 20:18:44 -0000 Issue 6274

Topics (messages 296457 through 296492):

Undefined symbol "ssl_onceonlyinit"
        296457 by: Ebbe Hjorth
        296459 by: Ebbe Hjorth
        296460 by: Adam Randall
        296461 by: Ebbe Hjorth

str_replace
        296458 by: Ron Piggott
        296462 by: Ralph Deffke
        296463 by: LinuxManMikeC
        296464 by: Ron Piggott

Re: "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
        296465 by: tedd

Re: PHP programming strategy
        296466 by: tedd
        296467 by: Ashley Sheridan

Re: dynamically naming PHP vars on the fly?
        296468 by: Nisse Engström
        296469 by: Ralph Deffke
        296471 by: Nisse Engström
        296473 by: Ralph Deffke
        296488 by: Nisse Engström

Re: does array_slice not work on multidimensional arrays?
        296470 by: Nisse Engström
        296474 by: John Butler
        296475 by: Nisse Engström
        296476 by: John Butler
        296477 by: Ashley Sheridan
        296483 by: John Butler
        296484 by: Robert Cummings
        296486 by: Ashley Sheridan
        296487 by: Nisse Engström

Re: Server change affecting ability to send downloaded files???
        296472 by: Brian Dunning
        296481 by: Jerry Wilborn

Re: Notification system
        296478 by: Jerry Wilborn

Re: Can php be cause a strain on a web server
        296479 by: Jerry Wilborn
        296480 by: Ashley Sheridan

php external interfaces
        296482 by: pete123456
        296485 by: Robert Cummings
        296489 by: Daniel Echalar

Convert File Sizes (16M => 16777216)
        296490 by: דניאל דנון
        296491 by: דניאל דנון

ZCE Question
        296492 by: Augusto Flavio

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hi,

I just installed FreeBSD 7.2, Apache 2.2, php5-5.2.10 and php5-extensions
1.3, all from the freebsd ports.

When i try to start apache with the imap.so extension enabled in
extensions.ini, i get the error
/libexec/ld-elf.so.1: /usr/local/lib/php/20060613/imap.so: Undefined symbol
"ssl_onceonlyinit"

I tried to google it, but all i get is an old bug from 2002.

Please help ;)

Thanks, Ebbe, Denmark

--- End Message ---
--- Begin Message ---
Hi,

Sounds like mac ports and freebsd ports i kinda the same.

I tried deinstalling the extensions ports, and reinstalling it, meaning it
all gets build from source once more, and it didnt help.


/ Ebbe

2009/8/8 Adam Randall <randa...@gmail.com>

> While I haven't used FreeBSD, the message you are getting basically
> means that when the imap.so was built it was against a different,
> incompatible version of PHP. I'm going to assume that the freebsd
> ports is related to my Mac Ports, which I think is based off it. If
> that's true, then ports is downloading and building PHP from source.
> If the imap.so was downloaded as a binary, or not rebuilt when php was
> last built, you will get this symbol mismatch. If possible, rebuild
> imap from source against your currently installed PHP and that should
> resolve it for you.
>
> Adam.
>
> On Sat, Aug 8, 2009 at 1:06 AM, Ebbe Hjorth<ebbe.hjo...@gmail.com> wrote:
> > Hi,
> >
> > I just installed FreeBSD 7.2, Apache 2.2, php5-5.2.10 and php5-extensions
> > 1.3, all from the freebsd ports.
> >
> > When i try to start apache with the imap.so extension enabled in
> > extensions.ini, i get the error
> > /libexec/ld-elf.so.1: /usr/local/lib/php/20060613/imap.so: Undefined
> symbol
> > "ssl_onceonlyinit"
> >
> > I tried to google it, but all i get is an old bug from 2002.
> >
> > Please help ;)
> >
> > Thanks, Ebbe, Denmark
> >
>
>
>
> --
> Adam Randall
> http://www.xaren.net
> AIM: blitz574
>

--- End Message ---
--- Begin Message ---
I wonder if it's downloading the imap.so as a binary instead of source
(or php as a binary instead of source). But this is the reason you are
getting the errors. It has to do with the shared libraries at build
time not matching the shared libraries at runtime (eg the symbol in
the shared library I'm expecting is not in the shared library I am
using).

You know, looking at the error messages that you posted again I now
realize that the incompatability is not between imap and php, but imap
and /libexec/ld-elf.so.1. That's where you need to look it seems.

Adam.

On Sat, Aug 8, 2009 at 1:34 AM, Ebbe Hjorth<ebbe.hjo...@gmail.com> wrote:
> Hi,
>
> Sounds like mac ports and freebsd ports i kinda the same.
>
> I tried deinstalling the extensions ports, and reinstalling it, meaning it
> all gets build from source once more, and it didnt help.
>
>
> / Ebbe
>
> 2009/8/8 Adam Randall <randa...@gmail.com>
>>
>> While I haven't used FreeBSD, the message you are getting basically
>> means that when the imap.so was built it was against a different,
>> incompatible version of PHP. I'm going to assume that the freebsd
>> ports is related to my Mac Ports, which I think is based off it. If
>> that's true, then ports is downloading and building PHP from source.
>> If the imap.so was downloaded as a binary, or not rebuilt when php was
>> last built, you will get this symbol mismatch. If possible, rebuild
>> imap from source against your currently installed PHP and that should
>> resolve it for you.
>>
>> Adam.
>>
>> On Sat, Aug 8, 2009 at 1:06 AM, Ebbe Hjorth<ebbe.hjo...@gmail.com> wrote:
>> > Hi,
>> >
>> > I just installed FreeBSD 7.2, Apache 2.2, php5-5.2.10 and
>> > php5-extensions
>> > 1.3, all from the freebsd ports.
>> >
>> > When i try to start apache with the imap.so extension enabled in
>> > extensions.ini, i get the error
>> > /libexec/ld-elf.so.1: /usr/local/lib/php/20060613/imap.so: Undefined
>> > symbol
>> > "ssl_onceonlyinit"
>> >
>> > I tried to google it, but all i get is an old bug from 2002.
>> >
>> > Please help ;)
>> >
>> > Thanks, Ebbe, Denmark
>> >
>>
>>
>>
>> --
>> Adam Randall
>> http://www.xaren.net
>> AIM: blitz574
>
>



-- 
Adam Randall
http://www.xaren.net
AIM: blitz574

--- End Message ---
--- Begin Message ---
2009/8/8 Adam Randall <randa...@gmail.com>

> I wonder if it's downloading the imap.so as a binary instead of source
> (or php as a binary instead of source). But this is the reason you are
> getting the errors. It has to do with the shared libraries at build
> time not matching the shared libraries at runtime (eg the symbol in
> the shared library I'm expecting is not in the shared library I am
> using).
>
> You know, looking at the error messages that you posted again I now
> realize that the incompatability is not between imap and php, but imap
> and /libexec/ld-elf.so.1. That's where you need to look it seems.
>


Im not that experienced that i know what do to with that!? :-(


>
> Adam.
>
> On Sat, Aug 8, 2009 at 1:34 AM, Ebbe Hjorth<ebbe.hjo...@gmail.com> wrote:
> > Hi,
> >
> > Sounds like mac ports and freebsd ports i kinda the same.
> >
> > I tried deinstalling the extensions ports, and reinstalling it, meaning
> it
> > all gets build from source once more, and it didnt help.
> >
> >
> > / Ebbe
> >
> > 2009/8/8 Adam Randall <randa...@gmail.com>
> >>
> >> While I haven't used FreeBSD, the message you are getting basically
> >> means that when the imap.so was built it was against a different,
> >> incompatible version of PHP. I'm going to assume that the freebsd
> >> ports is related to my Mac Ports, which I think is based off it. If
> >> that's true, then ports is downloading and building PHP from source.
> >> If the imap.so was downloaded as a binary, or not rebuilt when php was
> >> last built, you will get this symbol mismatch. If possible, rebuild
> >> imap from source against your currently installed PHP and that should
> >> resolve it for you.
> >>
> >> Adam.
> >>
> >> On Sat, Aug 8, 2009 at 1:06 AM, Ebbe Hjorth<ebbe.hjo...@gmail.com>
> wrote:
> >> > Hi,
> >> >
> >> > I just installed FreeBSD 7.2, Apache 2.2, php5-5.2.10 and
> >> > php5-extensions
> >> > 1.3, all from the freebsd ports.
> >> >
> >> > When i try to start apache with the imap.so extension enabled in
> >> > extensions.ini, i get the error
> >> > /libexec/ld-elf.so.1: /usr/local/lib/php/20060613/imap.so: Undefined
> >> > symbol
> >> > "ssl_onceonlyinit"
> >> >
> >> > I tried to google it, but all i get is an old bug from 2002.
> >> >
> >> > Please help ;)
> >> >
> >> > Thanks, Ebbe, Denmark
> >> >
> >>
> >>
> >>
> >> --
> >> Adam Randall
> >> http://www.xaren.net
> >> AIM: blitz574
> >
> >
>
>
>
> --
>  Adam Randall
> http://www.xaren.net
> AIM: blitz574
>

--- End Message ---
--- Begin Message ---
Am I understanding str_replace correctly?  Do I have this correct or are ' 
needed?

$bible_verse_ref is what I want to change to (AKA replace)
bible_verse_ref is what I change to change from (AKA search)
$text_message_template is the string I want to manipulate

$text_message = str_replace( $bible_verse_ref, 'bible_verse_ref', 
$text_message_template );

Ron

--- End Message ---
--- Begin Message ---
looks good,
u r searching for $bible_verse_ref in $text_message_template to be replaced
by the string "bible_verse_ref".

if that makes sence to u, yes its right.

ralph
ralph_def...@yahoo.de

""Ron Piggott"" <ron....@actsministries.org> wrote in message
news:83745b9e385a4402888ba5924c296...@computera1afe9...
Am I understanding str_replace correctly?  Do I have this correct or are '
needed?

$bible_verse_ref is what I want to change to (AKA replace)
bible_verse_ref is what I change to change from (AKA search)
$text_message_template is the string I want to manipulate

$text_message = str_replace( $bible_verse_ref, 'bible_verse_ref',
$text_message_template );

Ron



--- End Message ---
--- Begin Message ---
On Sat, Aug 8, 2009 at 2:08 AM, Ron Piggott<ron....@actsministries.org> wrote:
> Am I understanding str_replace correctly?  Do I have this correct or are ' 
> needed?
>
> $bible_verse_ref is what I want to change to (AKA replace)
> bible_verse_ref is what I change to change from (AKA search)
> $text_message_template is the string I want to manipulate
>
> $text_message = str_replace( $bible_verse_ref, 'bible_verse_ref', 
> $text_message_template );
>
> Ron

If I understand you right, I think you have the search and replace
arguments mixed up.  Your current code will look for all occurrences
of $bible_verse_ref in $text_message_template and replace it with
'bible_verse_ref'.

http://us.php.net/manual/en/function.str-replace.php

--- End Message ---
--- Begin Message ---

Yes I did.  Thank you for confirming this with me.  Ron

----- Original Message ----- From: "LinuxManMikeC" <linuxmanmi...@gmail.com>
To: "Ron Piggott" <ron....@actsministries.org>
Cc: <php-gene...@lists.php.net>; <phps...@gmail.com>
Sent: Saturday, August 08, 2009 6:19 AM
Subject: Re: [PHP] str_replace


On Sat, Aug 8, 2009 at 2:08 AM, Ron Piggott<ron....@actsministries.org> wrote:
Am I understanding str_replace correctly? Do I have this correct or are ' needed?

$bible_verse_ref is what I want to change to (AKA replace)
bible_verse_ref is what I change to change from (AKA search)
$text_message_template is the string I want to manipulate

$text_message = str_replace( $bible_verse_ref, 'bible_verse_ref', $text_message_template );

Ron

If I understand you right, I think you have the search and replace
arguments mixed up.  Your current code will look for all occurrences
of $bible_verse_ref in $text_message_template and replace it with
'bible_verse_ref'.

http://us.php.net/manual/en/function.str-replace.php


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.392 / Virus Database: 270.13.47/2289 - Release Date: 08/07/09 18:37:00


--- End Message ---
--- Begin Message ---
At 10:11 PM -0400 8/6/09, Larry Ullman wrote:
-snip-

Sorry for the length, but I hope that helps. And thanks again.
Larry

Larry:

No, thank you for your most excellent books -- I think I've purchased every one one you've written. They have helped me.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
At 6:32 AM +0100 8/7/09, Ashley Sheridan wrote:

 >    <table class="pfm">
       <tr>
         <td>
           <img src="Images/Nxxxxx.jpg" width="210" height="300">
           <p class="nrmltextn">Yanni Nxxxxx </p>
           <p class="notetextn">Sally Riordan Scholarship, 2007- </p>
           </td>
       </tr>
     </table>

(And the thing that really astounds me about CSS is that they never thought of putting in constants. Instead of being able to specify a set of colours, and then simply quote them in the CSS whenever they are needed, I have to specify them in PHP, and then encode them into the CSS every time I use them, which is a real pain in the XXXX. The total lack of
 diagnostics is another real pain.)


Well, your above example would just become:

<div class="pfm">
    <img src="Images/Nxxxxx.jpg" width="210" height="300">
    <p class="nrmltextn">Yanni Nxxxxx </p>
    <p class="notetextn">Sally Riordan Scholarship, 2007- </p>
</div>

Ash:

You don't need the width="210" height="300". For example, this works:

<div class="pfm">
    <img src="Images/Nxxxxx.jpg">
    <p class="nrmltextn">Yanni Nxxxxx </p>
    <p class="notetextn">Sally Riordan Scholarship, 2007- </p>
</div>

Also, if you use first-child, it could be taken down to:

<div class="pfm">
    <img src="Images/Nxxxxx.jpg">
    <p>Yanni Nxxxxx </p>
    <p>Sally Riordan Scholarship, 2007- </p>
</div>

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
On Sat, 2009-08-08 at 07:53 -0400, tedd wrote:
> At 6:32 AM +0100 8/7/09, Ashley Sheridan wrote:
> >
> >  >    <table class="pfm">
> >>        <tr>
> >>          <td>
> >>            <img src="Images/Nxxxxx.jpg" width="210" height="300">
> >>            <p class="nrmltextn">Yanni Nxxxxx </p>
> >>            <p class="notetextn">Sally Riordan Scholarship, 2007- </p>
> >>            </td>
> >>        </tr>
> >>      </table>
> >>
> >>  (And the thing that really astounds me about CSS is that they 
> >>never thought of putting in
> >>  constants. Instead of being able to specify a set of colours, and 
> >>then simply quote them
> >>  in the CSS whenever they are needed, I have to specify them in 
> >>PHP, and then encode them
> >>  into the CSS every time I use them, which is a real pain in the 
> >>XXXX. The total lack of
> >>  diagnostics is another real pain.)
> >>
> >>
> >Well, your above example would just become:
> >
> ><div class="pfm">
> >     <img src="Images/Nxxxxx.jpg" width="210" height="300">
> >     <p class="nrmltextn">Yanni Nxxxxx </p>
> >     <p class="notetextn">Sally Riordan Scholarship, 2007- </p>
> ></div>
> 
> Ash:
> 
> You don't need the width="210" height="300". For example, this works:
> 
> <div class="pfm">
>      <img src="Images/Nxxxxx.jpg">
>      <p class="nrmltextn">Yanni Nxxxxx </p>
>      <p class="notetextn">Sally Riordan Scholarship, 2007- </p>
> </div>
> 
> Also, if you use first-child, it could be taken down to:
> 
> <div class="pfm">
>      <img src="Images/Nxxxxx.jpg">
>      <p>Yanni Nxxxxx </p>
>      <p>Sally Riordan Scholarship, 2007- </p>
> </div>
> 
> Cheers,
> 
> tedd
> -- 
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
> 
FirstChild isn't as widely supported yet (IE again :( ), so I'm still
not using it, but yes, I could have got rid of the dimension attributes
too!

To Clancy, it was only a guess that put your title with the image. The
alt attribute is used to ensure that the text label is implicitly
associated with your image. What if your image was actually replacing
text as a stylised heading? Without the alt attribute, there is no way
to determine what the image is for.

Thanks,
Ash
http://www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
On Thu, 6 Aug 2009 12:42:49 -0600, Govinda wrote:

>> Others have mentioned variable variables. While I have
>> used those, I tend to prefer arrays:
> 
> ah, yes, I see that too, now.  Thanks for reminding me about arrays.
>   (You must be quite adept at arrays. )

I don't know, but I often stuff things into array,
such as the following snippet:

...   while ($r = mysql_fetch_row ($res)) {
        $news_paged[$page][$r[0]]['short_desc'] = $r[1];
        if (isset ($r[2]))
          $news_paged[$page][$r[0]]['long_desc'] = $r[2];
...


I wonder if there's a noticable difference in performance
between variable variables and arrays... I'm guessing it's
small enough to be of no concern.

> (And to give you credit Nisse, I ended up going with your solution  
> ('knock on wood'.. it is not all done yet) from the other php-db list  
> (building an array from data returned from the 3 union all selects-  
> query).)

I'm a total newbie when it comes to SQL beyond simple SELECTs.
If there's a noticable gain to be made from limiting the number
of rows returned from the database, then that is probably worth
persuing. Otherwise, I'd do it in PHP.


/Nisse

--- End Message ---
--- Begin Message ---
of course u can do this by sql.

see this
SELECT *
FROM `sometable`
LIMIT 0 , 30

gives u max 30 records if existstarting at record 0

on the next request u could say
SELECT *
FROM `sometable`
LIMIT 30 , 30

giving u max 30 recotds starting at record 30

ralph
ralph_def...@yahoo.de

"Nisse Engström" <news.nospam.0ixbt...@luden.se> wrote in message
news:eb.35.03345.5f47d...@pb1.pair.com...
> On Thu, 6 Aug 2009 12:42:49 -0600, Govinda wrote:
>
> >> Others have mentioned variable variables. While I have
> >> used those, I tend to prefer arrays:
> >
> > ah, yes, I see that too, now.  Thanks for reminding me about arrays.
> >   (You must be quite adept at arrays. )
>
> I don't know, but I often stuff things into array,
> such as the following snippet:
>
> ...   while ($r = mysql_fetch_row ($res)) {
>         $news_paged[$page][$r[0]]['short_desc'] = $r[1];
>         if (isset ($r[2]))
>           $news_paged[$page][$r[0]]['long_desc'] = $r[2];
> ...
>
>
> I wonder if there's a noticable difference in performance
> between variable variables and arrays... I'm guessing it's
> small enough to be of no concern.
>
> > (And to give you credit Nisse, I ended up going with your solution
> > ('knock on wood'.. it is not all done yet) from the other php-db list
> > (building an array from data returned from the 3 union all selects-
> > query).)
>
> I'm a total newbie when it comes to SQL beyond simple SELECTs.
> If there's a noticable gain to be made from limiting the number
> of rows returned from the database, then that is probably worth
> persuing. Otherwise, I'd do it in PHP.
>
>
> /Nisse



--- End Message ---
--- Begin Message ---
On Sat, 8 Aug 2009 15:01:42 +0200, "Ralph Deffke" wrote:

> of course u can do this by sql.
> 
> see this
> SELECT *
> FROM `sometable`
> LIMIT 0 , 30
> 
> gives u max 30 records if existstarting at record 0
> 
> on the next request u could say
> SELECT *
> FROM `sometable`
> LIMIT 30 , 30
> 
> giving u max 30 recotds starting at record 30

Yup. I do that a lot. But the original problem was
about a UNION of three tables. That's when my head
go dizzy. (And that's not because of the bottle of
Guinness I just had for lunch).


/Nisse

--- End Message ---
--- Begin Message ---
but then ur byond simple select, man, I do hate unions and try to avoid
those.

"Nisse Engström" <news.nospam.0ixbt...@luden.se> wrote in message
news:8b.50.40613.c518d...@pb1.pair.com...
> On Sat, 8 Aug 2009 15:01:42 +0200, "Ralph Deffke" wrote:
>
> > of course u can do this by sql.
> >
> > see this
> > SELECT *
> > FROM `sometable`
> > LIMIT 0 , 30
> >
> > gives u max 30 records if existstarting at record 0
> >
> > on the next request u could say
> > SELECT *
> > FROM `sometable`
> > LIMIT 30 , 30
> >
> > giving u max 30 recotds starting at record 30
>
> Yup. I do that a lot. But the original problem was
> about a UNION of three tables. That's when my head
> go dizzy. (And that's not because of the bottle of
> Guinness I just had for lunch).
>
>
> /Nisse



--- End Message ---
--- Begin Message ---
On Sat, 8 Aug 2009 16:25:24 +0200, "Ralph Deffke" wrote:

> but then ur byond simple select, man, I do hate unions
> and try to avoid those.

Hear, hear!

I'll look into that stuff in my next life, perhaps.


/Nisse

--- End Message ---
--- Begin Message ---
On Fri, 7 Aug 2009 17:06:45 -0600, John Butler wrote:

> does array_slice not work on multidimensional arrays?
> 
> I have one multidimensional array, and when I run it thru'    
> array_slice() nothing happens, that I can tell.
> 
> If it does not work on multidimensional arrays, what is the *simplest*  
> workaround?  (I am already working past what was budgeted for this  
> this script..  so I really want to avoid anything but the most newbie  
> of hacks to achieve this.)
> 
> //PHP Version 4.3.9

Works for me in PHP 5:

----
>cat a.php

<?php

  echo phpversion(), "\n";
  $a1 = array (array (1,2,3,4), array ('a','b','c'), array (true, false));
  $a2 = array_slice ($a1, 1, 2);
  var_dump ($a2);

>php5 a.php

5.2.5
array(2) {
  [0]=>
  array(3) {
    [0]=>
    string(1) "a"
    [1]=>
    string(1) "b"
    [2]=>
    string(1) "c"
  }
  [1]=>
  array(2) {
    [0]=>
    bool(true)
    [1]=>
    bool(false)
  }
}
----

When I first looked into array_slice, I was hoping that it
could be used to extract a "column" from a multi-dimensional
array, e.g.:

  array_slice ($a1, 1)

would result in:

  array (2, 'b', false)


This would be very useful at times, but doesn't seem
to be possible.


/Nisse

--- End Message ---
--- Begin Message ---
does array_slice not work on multidimensional arrays?

I have one multidimensional array, and when I run it thru'
array_slice() nothing happens, that I can tell.

If it does not work on multidimensional arrays, what is the *simplest*
workaround?  (I am already working past what was budgeted for this
this script..  so I really want to avoid anything but the most newbie
of hacks to achieve this.)

//PHP Version 4.3.9

Works for me in PHP 5:

----
cat a.php

<?php

 echo phpversion(), "\n";
$a1 = array (array (1,2,3,4), array ('a','b','c'), array (true, false));
 $a2 = array_slice ($a1, 1, 2);
 var_dump ($a2);

php5 a.php

5.2.5
array(2) {
 [0]=>
 array(3) {
   [0]=>
   string(1) "a"
   [1]=>
   string(1) "b"
   [2]=>
   string(1) "c"
 }
 [1]=>
 array(2) {
   [0]=>
   bool(true)
   [1]=>
   bool(false)
 }
}

It seems clear to me, but do you also agree that my evidence is that array_slice() does NOT work on multi-dimmed arrays on v.4.3.9?
Here is the evidence:

this:

var_dump($BuildPerUniqueDateArray);
echo"\n\n~~~~~~~~~~~~~\n\n";
array_slice($BuildPerUniqueDateArray, 1, 2);
var_dump($BuildPerUniqueDateArray);

returns:
array(12) {
  ["2009-08-08"]=>
  array(2) {
    ["t7solar_landing"]=>
    string(1) "2"
    ["aweber_7solar_aw"]=>
    string(1) "1"
  }
  ["2009-08-07"]=>
  array(3) {
    ["t7solar_landing"]=>
    string(1) "2"
    ["aweber_7solar_aw"]=>
    string(1) "1"
    ["aweber_7solar_confirm"]=>
    string(1) "1"
  }
  ["2009-08-06"]=>
  array(3) {
    ["aweber_7solar_confirm"]=>
    string(1) "5"
    ["t7solar_landing"]=>
    string(1) "6"
    ["aweber_7solar_aw"]=>
    string(1) "3"
  }
  ["2009-08-05"]=>
  array(3) {
    ["aweber_7solar_confirm"]=>
    string(1) "1"
    ["t7solar_landing"]=>
    string(1) "3"
    ["aweber_7solar_aw"]=>
    string(1) "4"
  }
...
~~~~~~~~~~~~~

array(12) {
  ["2009-08-08"]=>
  array(2) {
    ["t7solar_landing"]=>
    string(1) "2"
    ["aweber_7solar_aw"]=>
    string(1) "1"
  }
  ["2009-08-07"]=>
  array(3) {
    ["t7solar_landing"]=>
    string(1) "2"
    ["aweber_7solar_aw"]=>
    string(1) "1"
    ["aweber_7solar_confirm"]=>
    string(1) "1"
  }
  ["2009-08-06"]=>
  array(3) {
    ["aweber_7solar_confirm"]=>
    string(1) "5"
    ["t7solar_landing"]=>
    string(1) "6"
    ["aweber_7solar_aw"]=>
    string(1) "3"
  }
  ["2009-08-05"]=>
  array(3) {
    ["aweber_7solar_confirm"]=>
    string(1) "1"
    ["t7solar_landing"]=>
    string(1) "3"
    ["aweber_7solar_aw"]=>
    string(1) "4"
  }
...

------------
John Butler (Govinda)
govinda.webdnat...@gmail.com




--- End Message ---
--- Begin Message ---
On Sat, 8 Aug 2009 08:29:36 -0600, John Butler wrote:

> It seems clear to me, but do you also agree that my evidence is that  
> array_slice() does NOT work on multi-dimmed arrays on v.4.3.9?
> Here is the evidence:
> 
> this:
> 
> var_dump($BuildPerUniqueDateArray);
> echo"\n\n~~~~~~~~~~~~~\n\n";
> array_slice($BuildPerUniqueDateArray, 1, 2);
> var_dump($BuildPerUniqueDateArray);

It seems clear to me that you are dumping /the same/
array twice.


/Nisse

--- End Message ---
--- Begin Message ---
It seems clear to me, but do you also agree that my evidence is that
array_slice() does NOT work on multi-dimmed arrays on v.4.3.9?
Here is the evidence:

this:

var_dump($BuildPerUniqueDateArray);
echo"\n\n~~~~~~~~~~~~~\n\n";
array_slice($BuildPerUniqueDateArray, 1, 2);
var_dump($BuildPerUniqueDateArray);

It seems clear to me that you are dumping /the same/
array twice.


Aha. I see now. I had to *assign* the results of the array_slice to a [new] array and then use that ... (trying to do something and expecting the results to "stick" even without assigning them to a var, bites me every week or so. I'll get it through my old habits-from-other-languages skull eventually.)

Thank you Nisse,

-Govinda

--- End Message ---
--- Begin Message ---
On Sat, 2009-08-08 at 09:00 -0600, John Butler wrote:
> >> It seems clear to me, but do you also agree that my evidence is that
> >> array_slice() does NOT work on multi-dimmed arrays on v.4.3.9?
> >> Here is the evidence:
> >>
> >> this:
> >>
> >> var_dump($BuildPerUniqueDateArray);
> >> echo"\n\n~~~~~~~~~~~~~\n\n";
> >> array_slice($BuildPerUniqueDateArray, 1, 2);
> >> var_dump($BuildPerUniqueDateArray);
> >
> > It seems clear to me that you are dumping /the same/
> > array twice.
> 
> 
> Aha.  I see  now.   I had to *assign* the results of the array_slice  
> to a [new] array and then use that ...
> (trying to do something and expecting the results to "stick" even  
> without assigning them to a var,  bites me every week or so.  I'll get  
> it through my old habits-from-other-languages skull eventually.)
> 
> Thank you Nisse,
> 
> -Govinda
> 
It is annoying working with arrays sometimes, as some functions work on
the actual array, while others return the results of working on the
array without changing anything. Is there any particular reason for
that?

Thanks,
Ash
http://www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
It is annoying working with arrays sometimes, as some functions work on
the actual array, while others return the results of working on the
array without changing anything. Is there any particular reason for
that?

...you mean what are the reasons for the different ways the arrays work?

Then you must be asking the list in general (not me ;-))

--- End Message ---
--- Begin Message ---
John Butler wrote:
It is annoying working with arrays sometimes, as some functions work on
the actual array, while others return the results of working on the
array without changing anything. Is there any particular reason for
that?

...you mean what are the reasons for the different ways the arrays work?

Then you must be asking the list in general (not me ;-))

Efficiency is often one of the reasons. Do you really want the overhead incurred by returning a copy of a 50000 member. Most of the sort functions work on the array itself.

By working on the array itself, PHP offers you, the programmer, the choice of incurring the overhead since you can copy it before sorting.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--- End Message ---
--- Begin Message ---
On Sat, 2009-08-08 at 12:18 -0400, Robert Cummings wrote:

> John Butler wrote:
> >> It is annoying working with arrays sometimes, as some functions work  
> >> on
> >> the actual array, while others return the results of working on the
> >> array without changing anything. Is there any particular reason for
> >> that?
> > 
> > ...you mean what are the reasons for the different ways the arrays work?
> > 
> > Then you must be asking the list in general (not me ;-))
> 
> Efficiency is often one of the reasons. Do you really want the overhead 
> incurred by returning a copy of a 50000 member. Most of the sort 
> functions work on the array itself.
> 
> By working on the array itself, PHP offers you, the programmer, the 
> choice of incurring the overhead since you can copy it before sorting.
> 
> Cheers,
> Rob.
> -- 
> http://www.interjinn.com
> Application and Templating Framework for PHP
> 

That makes sense.

Thanks,
Ash
http://www.ashleysheridan.co.uk

--- End Message ---
--- Begin Message ---
On Sat, 08 Aug 2009 16:05:20 +0100, Ashley Sheridan wrote:

> It is annoying working with arrays sometimes, as some functions work on
> the actual array, while others return the results of working on the
> array without changing anything. Is there any particular reason for
> that?

Well in this case [array_slice()], I'd say you most probably
want to keep the original array intact. In other cases,
such as sort() or array_push(), you really want to modify
the array you pass to them.

The implementors have probably tried to pick the most
reasonable method for each function, and it seems to work
out well for me. But I'm only guessing.


/Nisse

--- End Message ---
--- Begin Message --- A Rackspace guy determined that php.ini was set to use 16MB of memory, and he upped it to 32MB, and now everything works. Some of my downloads are as large as 41MB so I asked him to up it to 48MB.

Maybe they upgraded the PHP version or something and wiped this setting. The 41MB files had always been downloading to customers before, without any problem -- is there some way that could have worked with php.ini set to 16MB, or does this mean for sure that the setting was changed somehow?


--- End Message ---
--- Begin Message ---
http://us2.php.net/readfile

Returns the number of bytes read from the file. If an error occurs, FALSE is
> returned and unless the function was called as @readfile(), an error message
> is printed.


Ah. So readfile() was generating some error and outputting before the
Content-Type was sent to the browser.  It might not hurt to move to a
fread($fh, 8096) + print() to prevent the bug in the future.

Jerry Wilborn
jerrywilb...@gmail.com


On Sat, Aug 8, 2009 at 9:00 AM, Brian Dunning <br...@briandunning.com>wrote:

> A Rackspace guy determined that php.ini was set to use 16MB of memory, and
> he upped it to 32MB, and now everything works. Some of my downloads are as
> large as 41MB so I asked him to up it to 48MB.
>
> Maybe they upgraded the PHP version or something and wiped this setting.
> The 41MB files had always been downloading to customers before, without any
> problem -- is there some way that could have worked with php.ini set to
> 16MB, or does this mean for sure that the setting was changed somehow?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
I highly recommend ExtJS (htp://www.extjs.com).

Jerry Wilborn
jerrywilb...@gmail.com


On Fri, Aug 7, 2009 at 10:22 PM, Bastien Koert <phps...@gmail.com> wrote:

> On Fri, Aug 7, 2009 at 10:25 PM, Jonathan Tapicer<tapi...@gmail.com>
> wrote:
> > Also, take a look at Comet Server:
> > http://en.wikipedia.org/wiki/Comet_(programming)
> >
> > I think that Facebook uses that and also Gmail, it tends to consume
> > less resources than periodical ajax calls, the hidden iframe method is
> > simple and works fine. To implement it in PHP you will need to use the
> > flush function to send data a continue processing/polling.
> >
> > Regards,
> >
> > Jonathan
> >
> > 2009/8/7 Phpster <phps...@gmail.com>:
> >>
> >>
> >>
> >>
> >> On Aug 2, 2009, at 7:59 AM, Dušan Novaković <ndu...@gmail.com> wrote:
> >>
> >>> Hi,
> >>>
> >>> Does anyone has any idea how to create notification system with
> >>> combination of php, mysql and javascript. It should be something
> >>> similar to facebook notification system (when someone make some action
> >>> it should be automatically reported to other people on system through
> >>> pop-up menu or something like that). I just need some basic idea how
> >>> to start or if someone has some example it would be perfect.
> >>>
> >>> Thanks,
> >>> Dusan
> >>>
> >>> -- made by Dusan
> >>>
> >>> -- PHP General Mailing List (http://www.php.net/)
> >>> To unsubscribe, visit: http://www.php.net/unsub.php
> >>>
> >>
> >> I think you could have some kind if Ajax polling of a php function. To
> keep
> >> the traffic down you could set it to poll once a minute or every 30
> seconds
> >> or so. Send a simple XML stream that could feed a defined JavaScript
> >> function or a bit of xslt for display.
> >>
> >>
> >> Bastien
> >>
> >> Sent from my iPod
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
>
> http://www.infoq.com/news/2008/05/facebookchatarchitecture is an
> interesting blog on how they do it
>
> --
>
> Bastien
>
> Cat, the other other white meat
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
You're going to have to be more
specific.  There are very few problems where this is absolutely no solution.

Jerry Wilborn
jerrywilb...@gmail.com


On Sat, Aug 8, 2009 at 2:51 AM, Per Jessen <p...@computer.org> wrote:

> Curious george wrote:
>
> > Is there a case where php can become unscalable for a web sever ? If
> > so can anyone please state to me how... Thanks
> > George
>
> Yes, any inappropriately designed application can be unscalable wherever
> it runs.
>
>
> /Per
>
> --
> Per Jessen, Zürich (21.6°C)
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
On Sat, 2009-08-08 at 10:08 -0500, Jerry Wilborn wrote:
> You're going to have to be more
> specific.  There are very few problems where this is absolutely no solution.
> 
> Jerry Wilborn
> jerrywilb...@gmail.com
> 
> 
> On Sat, Aug 8, 2009 at 2:51 AM, Per Jessen <p...@computer.org> wrote:
> 
> > Curious george wrote:
> >
> > > Is there a case where php can become unscalable for a web sever ? If
> > > so can anyone please state to me how... Thanks
> > > George
> >
> > Yes, any inappropriately designed application can be unscalable wherever
> > it runs.
> >
> >
> > /Per
> >
> > --
> > Per Jessen, Zürich (21.6°C)
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
He only said it 'can be' not 'is', so yeah, if you design an app so
badly, there is a chance you've designed it in such a way that you can't
scale it. Like you said yourself, there are few cases where this will
happen, but in those few cases, is it not likely that bad design was at
least part of why it can't be scaled?

Thanks,
Ash
http://www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
hi,
im running php on IIS and im trying to evaluate php's capabilities regarding
external interfaces.
elg. executing .exe, batch files, com objects. is that all possible? does
anyone have any good reference where i can find out more about this?

thanks

pete
-- 
View this message in context: 
http://www.nabble.com/php-external-interfaces-tp24877950p24877950.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---
--- Begin Message ---
pete123456 wrote:
hi,
im running php on IIS and im trying to evaluate php's capabilities regarding
external interfaces.
elg. executing .exe, batch files, com objects. is that all possible? does
anyone have any good reference where i can find out more about this?

.exe and .bat files should work fine, the do for me. Have you tried? I haven't really done anything with com objects.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--- End Message ---
--- Begin Message ---
well i know the command shell_exec(), that work like console, just put de
command as paramether. More info in php documentation.

For COM objects

for example,

        $word = new COM("word.application") or die("Unable to instantiate
application object");

        $wordDocument = new COM("word.document") or die("Unable to
instantiate document object");
        $word->Visible = 0;

        $wordDocument = $word->Documents->Open($DocumentPath);

        $HTMLPath = substr_replace($DocumentPath, 'txt', -3, 3);

        $wordDocument->SaveAs($HTMLPath, 3);


        $wordDocument = null;
        $word->Quit();
        $word = null;

this opens a word document and save it as  .txt document.  there should be
more info in the MSDN documentation.




2009/8/8 Robert Cummings <rob...@interjinn.com>

> pete123456 wrote:
>
>> hi,
>> im running php on IIS and im trying to evaluate php's capabilities
>> regarding
>> external interfaces.
>> elg. executing .exe, batch files, com objects. is that all possible? does
>> anyone have any good reference where i can find out more about this?
>>
>
> .exe and .bat files should work fine, the do for me. Have you tried? I
> haven't really done anything with com objects.
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hello all :)

I have a problem, so, Before I'll start building my own function - I was
wondering - is there any built-in function to convert 16M to 16777216
(Including all other types of letters)?
(16M = 16 * 1024 * 1024)


(Its from php.ini configurations)

-- 
Use ROT26 for best security

--- End Message ---
--- Begin Message ---
Never mind, my bad - Looked everywhere except in ini_get documentation.



Thanks anyway.

On Sat, Aug 8, 2009 at 9:24 PM, דניאל דנון <danondan...@gmail.com> wrote:

> Hello all :)
>
> I have a problem, so, Before I'll start building my own function - I was
> wondering - is there any built-in function to convert 16M to 16777216
> (Including all other types of letters)?
> (16M = 16 * 1024 * 1024)
>
>
> (Its from php.ini configurations)
>
> --
> Use ROT26 for best security
>



-- 
Use ROT26 for best security

--- End Message ---
--- Begin Message ---
Has someone an clue about this zce question:

The following is a common XML structure used in service oriented
architectures, what does it represent?


<?xml version="1.0"?>
<methodCall>
 <methodName>myMethod</methodName>
 <params>
  <param>
   <value><string>HI!</string></value>
  </param>
 </params>
</methodCall>


Answer...
    None of the above
    A fragment of a complete SOAP request
    XML-RPC
    REST
    SOAP


i think the answer is: SOAP


some idea?


thanks

Augusto Morais

--- End Message ---

Reply via email to