php-general Digest 12 Dec 2011 11:49:49 -0000 Issue 7607

Topics (messages 315971 through 315980):

Virus warning
        315971 by: Ashley Sheridan
        315972 by: Jason Pruim
        315973 by: Daniel Brown
        315974 by: HallMarc Websites
        315975 by: Daniel Brown
        315976 by: HallMarc Websites
        315977 by: Daniel Brown
        315979 by: Ashley Sheridan

How to use a variable variable in an array walk?
        315978 by: Nils Leideck

Syntax problem PDO and bindvalue
        315980 by: Stephen

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 ---
Did anyone else receive an odd message today about a message to the list
bouncing back because of a virus warning? From the looks of it someone
spoofed an email to the list from my address, which meant I got the
warning email, but I wondered if anyone else was having the same issue?

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



--- End Message ---
--- Begin Message ---
Hey Ash,

I didn't get anything... I'm guessing the list did it's thing and blocked it 
unless someone else got it!


Jason Pruim
li...@pruimphotography.com



On Dec 11, 2011, at 10:03 AM, Ashley Sheridan wrote:

> Did anyone else receive an odd message today about a message to the list
> bouncing back because of a virus warning? From the looks of it someone
> spoofed an email to the list from my address, which meant I got the
> warning email, but I wondered if anyone else was having the same issue?
> 
> -- 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> 


--- End Message ---
--- Begin Message ---
On Sun, Dec 11, 2011 at 10:03, Ashley Sheridan <a...@ashleysheridan.co.uk> 
wrote:
> Did anyone else receive an odd message today about a message to the list
> bouncing back because of a virus warning? From the looks of it someone
> spoofed an email to the list from my address, which meant I got the
> warning email, but I wondered if anyone else was having the same issue?

    Ash;

    If you can, forward me the full message (off-list, of course),
headers and all.  I'll take a look at it and see what's up.

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
> Sent: Sunday, December 11, 2011 10:04 AM
> To: PHP General List
> Subject: [PHP] Virus warning
> 
> Did anyone else receive an odd message today about a message to the list
> bouncing back because of a virus warning? From the looks of it someone
> spoofed an email to the list from my address, which meant I got the warning
> email, but I wondered if anyone else was having the same issue?
> 
> --
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
[>] 
I got it too this morning. :\



--- End Message ---
--- Begin Message ---
On Sun, Dec 11, 2011 at 10:40, HallMarc Websites
<m...@hallmarcwebsites.com> wrote:
>>
> [>]
> I got it too this morning. :\

    Are you you guys referring to the ezmlm warning for 315869?

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

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


--- End Message ---
--- Begin Message ---
On Sun, Dec 11, 2011 at 10:52, HallMarc Websites
<m...@hallmarcwebsites.com> wrote:
> Yes

    That's normal.  That's nothing anyone did to spoof anyone else's
email address or anything, it's simply the list saying, "this was a
phishing email that some moron or bot tried to send, and your filters
blocked."

     If you read through the full text of the email, you'll see that
not only is there nothing about which to be concerned, but actually to
be admired: your email filters did their job.

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

--- End Message ---
--- Begin Message ---
On Sun, 2011-12-11 at 11:05 -0500, Daniel Brown wrote:

> On Sun, Dec 11, 2011 at 10:52, HallMarc Websites
> <m...@hallmarcwebsites.com> wrote:
> > Yes
> 
>     That's normal.  That's nothing anyone did to spoof anyone else's
> email address or anything, it's simply the list saying, "this was a
> phishing email that some moron or bot tried to send, and your filters
> blocked."
> 
>      If you read through the full text of the email, you'll see that
> not only is there nothing about which to be concerned, but actually to
> be admired: your email filters did their job.
> 
> -- 
> </Daniel P. Brown>
> Network Infrastructure Manager
> http://www.php.net/
> 


Ah OK, I never was very good at reading those email headers!

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



--- End Message ---
--- Begin Message ---
Dear list,

this is my first post to the PHP general list.

I have an issue with a variable variable 
(http://php.net/manual/en/language.variables.variable.php)

My use case:

I have an array called $myArray. The structure is as following:

array(1) {
  ["user_interface"]=>
  array(1) {
    ["design"]=>
    array(1) {
      [“my_colors"]=>
      array(5) {
        ["item_number_one"]=>
        string(6) "red"
        ["item_number_two"]=>
        string(40) 
'["user_interface"]["design"]["my_colors"]["item_number_one"]'
     }
    }
  }
}

As you can see, the item_number_one has no direct color value assigned but the 
structure of the path to item_number_one in the $myArray variable. I tried with 
array_wal_resursive. During this step (the array building is completed) I want 
to find these values (I use a static value in my example, in the real code I 
will use regular expressions) and assign the value of the virtually related 
item to the considered item.

So in my example above, I want to have the following values after the process 
is done:

$myArray[user_interface][design][my_colors][item_mumber_one] = red; // this is 
item number 1
$myArray[user_interface][design][my_colors][item_mumber_two] = red; // this 
should be item number 2

The second issue here is, how do I evaluate at which point the process is 
exactly, because the value and the key that is transferred to the function by 
array_walk_recursive has only the value itself but not array path to the 
current item.

Any idea how get this done? Or am I too complicated maybe?

I tried several combinations of ${$var}, $myArray{$var}, {$myArray}{$var} ... 
and many more.

Any help is much much appreciated!


Merry X-mas greeting from Indianapolis

Cheers, Nils
-- 
http://webint.cryptonode.de / a Fractal project


--- End Message ---
--- Begin Message ---
So I am getting this SQL error:

Error selecting photographs: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''4'' at line 2

My code is:

function updatephotos($dbh, $x) {

echo $x['number'] . "<br />"; <<<<< this echo is 4

  $sql = "SELECT * FROM photographs WHERE
              photo_filename LIKE '%2%' LIMIT 0, :q;";

  $stmt = $dbh->prepare($sql);

  try {

        $stmt->bindValue( ':q', $x['number'], PDO::PARAM_INT );
        $stmt->execute();

      } catch (PDOException $e) {
            return 'Error selecting photographs: ' . $e->getMessage();
    }

while ( list( $id, $name, $alt, $caption) = $stmt->fetch(PDO::FETCH_NUM)) {
echo $name . "<br />";
        }


  return "test worked" ;
}

If I hard code the SQL as:

$sql = "SELECT * FROM photographs WHERE
              photo_filename LIKE '%2%' LIMIT 0, 4";

all works well.

Can anyone see what is wrong?

How can I see the prepared SQL statement before it is executed?

Thanks
Stephen

--- End Message ---

Reply via email to