Re: Help!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, April 28, 2006 8:11 am, Dave Goodchild wrote:
> I am working on a viral marketing application that uses multipart
> emails to
> notify entrants of their progress in the 'game'. I have a demo version
> which
> works fine, and the current rebranded version was also fine until the
> client
> asked for some changes then POWWWWW!

Maybe your scripts have a viral infection? :-)

> I will try and define the issue as simply as I can. I am passing 11
> arguments to a function called sendSantaMail (don't ask) and as a
> sanity
> check I have called mail() to let me know the values just before they
> are
> passed in to the function. I get this result:
>
> "Values to be passed to sendSantaMail:
>
> Friend Name: Treyt
> Friend Email: wonder@xxxxxxx
> Sender Name: Bull Sykes
> Sender Email: chancer@xxxxxxxxx
> Prize ID: 1
> Nominator ID: 2555004452133557e4d
> Nominee ID: 851355445213355cc6f
> Chain ID: CHAIN824452133561a8d"
>
> - this is all good and correct. I also call mail from the receiving
> function
> to check the actual values received by the function and I get this:
>
> "Values sent into sendSantaMail function:
>
> Friend Name: chancer@xxxxxxx
> Friend Email: Look what you may have won!
> Sender Name: 8 Use of undefined constant prize - assumed 'prize'

I dunno how you managed to get this inte the $name variable, or
whatever, but in line 8 of *SOME* script somewhere, you have something
like:

$foo = prize;

PHP is complaining because prize isn't delimited by quotes or
apostrophes, so you're pretty much pushing PHP up against a wall and
forcing it to GUESS what the heck you meant.

And computers do NOT like to guess.  Nosireebob.

So put some quotes around prize and make it "prize" or 'prize'

> Sender Email: 158

I dunno where the 158 is coming from...

Or maybe it's line 158, and the 8 is the number corresponding to
E_NOTICE, and you have a custom error handler outputting E_NOTICE,
which is really 8...

> Sender Email: /home/friend/public_html/process1.php

I'm guessing that the error on line 8 (or maybe 158) is actually in
the file 'process1.php'

If your scripts are passing stuff around to each other, with ':' in
between, this would all make a lot of sense, as you've got one script
printing out an error about line 158 in process1.php, and you've got
another script reading that error output and assuming it's valid data.

> <chancer@xxxxxxx>Prize: 1
> Subject: 158
> Nominator ID: 33238744520f5235b85
> Nominee ID: 96658244520f524bb19
> Chain ID: CHAIN84644520f525a56f"
>
> What is happening? I have checked the order of values being passed in
> and
> the function prototype and they match in the correct order, there are
> no
> default values. I have been trying to solve this for two days and am
> particularly concerned that somewhere along the way the sender email
> value
> becomes the script name.
>
> Any ideas on this black Friday?

I don't even want to think about what your code must look like if my
theories are correct...

I just hope to [deity] that these are all opt-in lists or whatever and
I'm not helping some spammer. :-(

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux