php-general Digest 28 Apr 2006 09:34:56 -0000 Issue 4097

2006-04-28 Thread php-general-digest-help

php-general Digest 28 Apr 2006 09:34:56 - Issue 4097

Topics (messages 234961 through 234980):

credit card purchase and downloads
234961 by: siavash1979.telus.net
234962 by: Stut
234963 by: siavash1979.telus.net
234964 by: Stut
234965 by: Stut
234967 by: siavash1979.telus.net

Re: php - js (was Javascript Navigation)
234966 by: Paul Novitski
234968 by: tedd
234969 by: Robert Cummings
234970 by: Paul Novitski
234976 by: Barry
234977 by: Barry

Re: Recommended PHP frameworks
234971 by: Jochem Maas

we are looking for experienced php programmers full time freelance...
234972 by: Sumeet
234973 by: Robert Cummings
234974 by: Sumeet

Re: Need help in identifying a PHP application.
234975 by: Ananth Kesari

converting nested hash to xml
234978 by: Anthony Ettinger

Includes and paths confusion
234979 by: Nick Wilson
234980 by: Jochem Maas

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:
php-general@lists.php.net


--
---BeginMessage---
hi guys,

I'm planning to add paid downloads of some speech files on one of my customers
website. Basically I want people to be able to pay for a speech and then be able
to download it.

it's the first time I wanna do anything like this, so I was thinking to myself
to do it this way:



when they pay for a file, I generate a session, that includes file name and
username and is in md5 format. then I store this session to a mysql database.

anytime the customer wants to click on a file to download it, I'll make the same
session again and check the mysql table to see if it exists. if it does, then he
can download it.



the problem that I can think might happen is that the file names are not
changable. you can't rename a file, and if you delete it, and add another file
with the same name later, it'll give access to everyone.

Any idea if this is a good way to do this or not? any better suggestions? is
this secured?


thanks a lot,
Siavash Miri
---End Message---
---BeginMessage---

[EMAIL PROTECTED] wrote:
snipped a confusing idea

Any idea if this is a good way to do this or not? any better suggestions? is
this secured?


I'm confused. What's wrong with having a table containing a row per 
file, then having another table containing the users. Add a third table 
containing two fields, username and fileid, which contains one row per 
user per file they've purchased. When they try to download a file you 
check against that table.


Maybe I'm missing the point of all the md5 crap. If so, please enlighten me.

-Stut
---End Message---
---BeginMessage---
is that really secure?

I just thought if for any reason, someone can get into my database, they can't
just add usernames and file ids to my table and have access.

I thought if I md5 it, then it'll be more secured.

would 1 table for username-fileid really be fine?

thanks,
Sia





Quoting Stut [EMAIL PROTECTED]:

 [EMAIL PROTECTED] wrote:
 snipped a confusing idea
  Any idea if this is a good way to do this or not? any better suggestions?
 is
  this secured?
 
 I'm confused. What's wrong with having a table containing a row per 
 file, then having another table containing the users. Add a third table 
 containing two fields, username and fileid, which contains one row per 
 user per file they've purchased. When they try to download a file you 
 check against that table.
 
 Maybe I'm missing the point of all the md5 crap. If so, please enlighten me.
 
 -Stut
 
---End Message---
---BeginMessage---

[EMAIL PROTECTED] wrote:

well is that a secure way? I thought if I use md5 and so on it'll make it more
secure and harder to hack.

would a table for user-fileid be good enough?

I don't really know why I thought it had to be secured, I just don't want it to
be eaily hacked.


Unless I'm not understanding your intended flow of data, it's no more or 
less secure than your way, just a hell of a lot simpler. Everything 
you're doing is happening on the server-side, as is everything I'm 
doing. All that comes from the client-side is the username and the file 
ID. Both methods have the same uncontrollable inputs and are therefore 
basically the same from a security point of view.


-Stut


Quoting Stut [EMAIL PROTECTED]:


[EMAIL PROTECTED] wrote:
snipped a confusing idea

Any idea if this is a good way to do this or not? any better suggestions?

is

this secured?
I'm confused. What's wrong with having a table containing a row per 
file, then having another table containing the users. Add a third table 
containing two fields, username and fileid, which contains one row per 
user per file they've purchased. When they try to download a file you 
check against that table.


Maybe I'm 

Re: [PHP] we are looking for experienced php programmers full time freelance...

2006-04-28 Thread Sumeet

Robert Cummings wrote:
quote your charges and the time that you will be available. also mention 
msn or yahoo ids. skype id is more welcome.


What about a MUD? I'm usually logged into a mud. It's a great place for




telnet wocmud.org 4000



hi robert,

thanks for the info... but a MUD? ...for doing business?

anyway i used the MUDand remembered the time on the BBS...(Bulletin 
Board Service)


thanks...

--
Thanking You

Sumeet Shroff
http://www.prateeksha.com
Web Designers and PHP / Mysql Ecommerce Development, Mumbai India

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



Re: [PHP] Need help in identifying a PHP application.

2006-04-28 Thread Ananth Kesari
Hi,

Thanks a lot for all the inputs. I will take it further from here.

Thanks,
Ananth.

 Richard Lynch [EMAIL PROTECTED] 4/27/2006 4:06:03 pm 
On Thu, April 27, 2006 4:21 am, Ananth Kesari wrote:
 I have a need for an idea management PHP application that gives me
an
 UI with multiple fields (text boxes, radio buttons etc.) which
 correspond to different columns of a MySQL database. An user
initiates
 this by clicking on an URL, fills in certain fields and submits the
 form. This then creates the tables and should send out a mail to
 certain
 mail ids that there is a new entry. At a later point of time someone
 else can enter info into certain fields (columns of the tables)
giving
 the same id as it was created. He should not be able to meddle with
 the
 original fields that user1 had entered. Another user can come at
even
 later stage and enter info into a few more fields (columns of the
 tables). All these fields are created at the first stage itself
since
 we
 will be fixing the number of fields.

 Can you let me know of any application that does all these? If this
is
 a wrong forum to ask this type of question, can you tell me where I
 can
 post this query?

phpMyAdmin does a whole lot of this kind of stuff, and has a huge
install-base...

Seems to me that if you rig your database so that later users can't
use ALTER TABLE (nor DROP TABLE) then you're pretty much done.

It's not a real pretty front-end, though, in terms of clueless users,
as it was designed for people who had some idea about how databases
worked.

Other than that, I got nothing in mind that sounds like what you want,
though I suspect most of the CMSes are kind of sort of like that, to
some degree...

You can give a BUNCH of CMS thingies a trial run here:
http://opensourcecms.com/ 

And I suspect that their forums would be a better place to ask the
original question, as their experts on a plethora of CMSes would know
what most closely matches your needs.

-- 
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



Re: [PHP] Re: php - js (was Javascript Navigation)

2006-04-28 Thread Barry

Robert Cummings schrieb:

On Thu, 2006-04-27 at 11:09, Barry wrote:

tedd schrieb:

Hi gang:

Gang?


You know... Scooby, Shaggy, and Mary-Jane.

ah, ic.



1. A way to send information from js to php and have php act upon it.

Java

... Sucks.

Because?



2. A way to send information from php to js and have js act upon it.

Java

... Sucks :)

Because?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



Re: [PHP] Re: php - js (was Javascript Navigation)

2006-04-28 Thread Barry

tedd schrieb:

At 5:09 PM +0200 4/27/06, Barry wrote:

tedd schrieb:

Hi gang:

Gang?


Gang, group, clan, community, organization, hive, pod, assembly, 
biocenosis -- what do you want to be called?


By my name normally. And if you adress everyone i prefer everyone


Show me.


function jstojava()
  {
 // sending stuff to the applet
  }

html
Javaapplet containing Java that gives infos to PHP through an openened 
PHP socket. PHP giving stuff back

/html

Java executes a JS with the vars given by php




--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



[PHP] converting nested hash to xml

2006-04-28 Thread Anthony Ettinger

Is there a standard way of converting a nested hash/multidimensional
array to an xml tree?

My hash looks like:

$foo = array(
  bar1 = array(
 baz1 = array(
title = Some Title,
text = Some Text,
),
bazN = array(...),
  ),
  bar2 = array (...),
  barN = array(...),
);

would want the output to be something like:

foo
bar1
  baz1
titleSome Title/title
   textSome Text/text
  /baz1
  baz2
titleSome Title2/title
   textSome Text2/text
  /baz2
/bar1
barN.../barN
/foo



--
Anthony Ettinger
Signature: http://chovy.dyndns.org/hcard.html

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



[PHP] Includes and paths confusion

2006-04-28 Thread Nick Wilson
Hello all, 

Im having some problems understanding why some requires() are failing.
Let me see if i can describe what's going on clearly...

I have this:

[EMAIL PROTECTED]  ls
ads/  config.inc  db.inc  funcs.inc  init.inc

where ads/ is a whole huge set of scripts from an existing setup. ads/
was originally placed on its own domain as it's a version of phpadsnew
and runs as a server all by itself.

I moved ads/ to this directory to try to troubleshoot and make things
clearer. 

db.inc has these lines:


require_once(ads/admin/config.php);
require_once(lib-statistics.inc.php);
require_once(lib-zones.inc.php);
require_once(config.inc.php);
require_once(lib-db.inc.php);
require_once(lib-dbconfig.inc.php);

warning: main(../config.inc.php): failed to open stream: No such file or
directory in
/var/www/localhost/vhosts/payment.communicontent.com/modules/partners/inc/ads/admin/config.php
on line 33.


Fatal error: main(): Failed opening required '../config.inc.php'
(include_path='.:/usr/lib/php') in
/var/www/localhost/vhosts/payment.communicontent.com/modules/partners/inc/ads/admin/config.php
on line 33


So, why does this not happen when ads/ is on its own domain? I can see
it has something to do with relative paths, but even when i try to work
with chdir() i still get no joy. 

I just can't figure out what the issue may be, so any pointers in the
right direction would be hugely appreciated. 

thankyou!


-- 
Nick Wilson
Tel:+45 3311 2250

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



Re: [PHP] Includes and paths confusion

2006-04-28 Thread Jochem Maas

Nick Wilson wrote:
Hello all, 


Im having some problems understanding why some requires() are failing.
Let me see if i can describe what's going on clearly...

I have this:

[EMAIL PROTECTED]  ls
ads/  config.inc  db.inc  funcs.inc  init.inc

where ads/ is a whole huge set of scripts from an existing setup. ads/
was originally placed on its own domain as it's a version of phpadsnew
and runs as a server all by itself.

I moved ads/ to this directory to try to troubleshoot and make things
clearer. 


db.inc has these lines:



use something *like* the following:

$oldincpath = ini_get('include_path');
ini_set('include_path', 'path/to/ads/stuff:etc');

// do your 'ads' requires

ini_set('include_path', $oldincpath);

also look into the magic constant __FILE__ and the functions dirname()
and realpath(). read the manual regard how to use 'include_path'

have fun.



require_once(ads/admin/config.php);
require_once(lib-statistics.inc.php);
require_once(lib-zones.inc.php);
require_once(config.inc.php);
require_once(lib-db.inc.php);
require_once(lib-dbconfig.inc.php);

warning: main(../config.inc.php): failed to open stream: No such file or
directory in
/var/www/localhost/vhosts/payment.communicontent.com/modules/partners/inc/ads/admin/config.php
on line 33.


Fatal error: main(): Failed opening required '../config.inc.php'
(include_path='.:/usr/lib/php') in
/var/www/localhost/vhosts/payment.communicontent.com/modules/partners/inc/ads/admin/config.php
on line 33


So, why does this not happen when ads/ is on its own domain? I can see
it has something to do with relative paths, but even when i try to work
with chdir() i still get no joy. 


I just can't figure out what the issue may be, so any pointers in the
right direction would be hugely appreciated. 


thankyou!




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



Re: [PHP] converting nested hash to xml

2006-04-28 Thread chris smith
On 4/28/06, Anthony Ettinger [EMAIL PROTECTED] wrote:
 Is there a standard way of converting a nested hash/multidimensional
 array to an xml tree?

http://www.php.net/manual/en/ref.dom.php would be a good start, or
http://www.php.net/manual/en/ref.simplexml.php (I think this is more
for reading rather than creating an xml tree).

PHPClasses may have something too (www.phpclasses.org).

--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP] Includes and paths confusion

2006-04-28 Thread Nick Wilson

* and then Jochem Maas declared
 Nick Wilson wrote:
 Hello all, Im having some problems understanding why some requires() are 
 failing.
 Let me see if i can describe what's going on clearly...
 I have this:
 [EMAIL PROTECTED]  ls
 ads/  config.inc  db.inc  funcs.inc  init.inc
 where ads/ is a whole huge set of scripts from an existing setup. ads/
 was originally placed on its own domain as it's a version of phpadsnew
 and runs as a server all by itself.
 I moved ads/ to this directory to try to troubleshoot and make things
 clearer. db.inc has these lines:
 
 use something *like* the following:
 
 $oldincpath = ini_get('include_path');
 ini_set('include_path', 'path/to/ads/stuff:etc');
 
 // do your 'ads' requires
 
 ini_set('include_path', $oldincpath);

Unfortunately that's pretty much the same thing we tried first on this.
Even with the include path set to include every directory that contains
a script we need to access, the same error happens. 

 also look into the magic constant __FILE__ and the functions dirname()
 and realpath(). read the manual regard how to use 'include_path'

No, the ideal is to not touch the config.php file or any of the other
required files (otherwise we may just aswell write our own) so those
functions and the __FILE__ constant are not usable. 

Unless i miss your point?

thanks

-- 
Nick Wilson
Tel:+45 3311 2250

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



Re: [PHP] Includes and paths confusion

2006-04-28 Thread Jochem Maas

Nick Wilson wrote:

* and then Jochem Maas declared


Nick Wilson wrote:



...



use something *like* the following:

$oldincpath = ini_get('include_path');
ini_set('include_path', 'path/to/ads/stuff:etc');

// do your 'ads' requires

ini_set('include_path', $oldincpath);



Unfortunately that's pretty much the same thing we tried first on this.
Even with the include path set to include every directory that contains
a script we need to access, the same error happens. 


check directory permission, check the include_path is being set,
check the include path is actually correct (I take it you have a good
understanding how include_path works).





also look into the magic constant __FILE__ and the functions dirname()
and realpath(). read the manual regard how to use 'include_path'



No, the ideal is to not touch the config.php file or any of the other


I would say fix the config file so that it can figure out where everything
is regardless of whether your using a vhost or stuck in subdir of some other
vhost. but thats just me :-)


required files (otherwise we may just aswell write our own) so those
functions and the __FILE__ constant are not usable. 


maybe set a 'auto_prepend' directive via an .htaccess declaration in the
relevant dir?



Unless i miss your point?

thanks



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



[PHP] getting current page url

2006-04-28 Thread Schalk

Greetings All,

Possibly a very simple question but here goes. How would I code the 
following in PHP?


if(window.location == ((http://www.epda.cc/index.php;) || 
(http://www.epda.cc/;))) {

   $current_nav = includes/home_nav.php;
   } else {
   $current_nav = includes/inside_nav.php;
   }

What I am trying to accomplish is something like this:

?php   
   if(window.location == ((http://www.epda.cc/index.php;) || 
(http://www.epda.cc/;))) {

   $current_nav = includes/home_nav.php;
   } else {
   $current_nav = includes/inside_nav.php;
   }
   ?
   ?php include($current_nav); ?

Thanks!

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers

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



Re: [PHP] getting current page url

2006-04-28 Thread Jochem Maas

do a search $_SERVER['PHP_SELF'] - it should answer all your question.

if in doubt a var_dump() can do wonders (in this finding out what kind of
info is generally available, e.g.:

?php

echo 'pre';
var_dump($_SERVER, $_REQUEST, $_ENV, $_POST, $_GET);


Schalk wrote:

Greetings All,

Possibly a very simple question but here goes. How would I code the 
following in PHP?


if(window.location == ((http://www.epda.cc/index.php;) || 


php doesn't know what the location url of a window is - it's doesn't
even know a browser windwo exists (to php it doesn't actually exist)

it does (often) know which url referred it to the current script and
it knows which url was requested.


(http://www.epda.cc/;))) {
   $current_nav = includes/home_nav.php;
   } else {
   $current_nav = includes/inside_nav.php;
   }

What I am trying to accomplish is something like this:

?php  if(window.location == ((http://www.epda.cc/index.php;) || 
(http://www.epda.cc/;))) {

   $current_nav = includes/home_nav.php;
   } else {
   $current_nav = includes/inside_nav.php;
   }
   ?
   ?php include($current_nav); ?


conceptually those 2 bits of pseudocode are identical - at least to me.



Thanks!



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



Re: [PHP] Includes and paths confusion

2006-04-28 Thread Nick Wilson

* and then Jochem Maas declared
 check directory permission, check the include_path is being set,
 check the include path is actually correct (I take it you have a good
 understanding how include_path works).

Good call on dir perms, but yes, they appear to be fine. I *think* i
have a good understanding of include_path but here's the error which
quotes the include path so you/others can tell me for sure:

Fatal error: main(): Failed opening required '../config.inc.php'
(include_path='/var/www/localhost/vhosts/ads.communicontent.com/:/var/www/localhost/vhosts/ads.communicontent.com/admin:/var/www/localhost/vhosts/ads.communicontent.com/libraries:/var/www/localhost/vhosts/ads.communicontent.com/libraries/resources')
in /var/www/localhost/vhosts/ads.communicontent.com/admin/config.php on
line 34

and here's the line that sets it:

ini_set('include_path',
PARTNERS_MAX_PATH.':'.PARTNERS_MAX_PATH.'admin'.':'.PARTNERS_MAX_PATH.'libraries'.':'.PARTNERS_MAX_PATH.'libraries/resources');

and the definition of the constant in there:

// where max is installed (include / )
define(PARTNERS_MAX_PATH,/var/www/localhost/vhosts/ads.communicontent.com/);



 also look into the magic constant __FILE__ and the functions dirname()
 and realpath(). read the manual regard how to use 'include_path'
 No, the ideal is to not touch the config.php file or any of the other
 
 I would say fix the config file so that it can figure out where everything
 is regardless of whether your using a vhost or stuck in subdir of some other
 vhost. but thats just me :-)

Ordinarily i'd agree. We want to be able to update this set of third
party maintained scripts easily though, hence writing a layer to
interact with it rather than hack the core code. 

Hope that all makes sense!

thanks

-- 
Nick Wilson
Tel:+45 3311 2250

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



Re: [PHP] Includes and paths confusion

2006-04-28 Thread Jochem Maas

dirs named in include_path should not have a slash at the end. and don't forget 
to
include the DOT as one of your include pathes e.g.

ini_set('include_path', '.:/the/rest');

can you send the list of requires you do [again] (and state where the files
are actually living on disk)  - I'm on 3 hours of sleep here so help me to help 
you kind of thing.

also try doing it with an 'include' iso a 'require' - might give you a
different [more helpful] error.

Nick Wilson wrote:

* and then Jochem Maas declared


check directory permission, check the include_path is being set,
check the include path is actually correct (I take it you have a good
understanding how include_path works).




I often think along those lines - 5 seconds later I often get a bite in the ass 
;-)



Good call on dir perms, but yes, they appear to be fine. I *think* i
have a good understanding of include_path but here's the error which
quotes the include path so you/others can tell me for sure:

Fatal error: main(): Failed opening required '../config.inc.php'
(include_path='/var/www/localhost/vhosts/ads.communicontent.com/:/var/www/localhost/vhosts/ads.communicontent.com/admin:/var/www/localhost/vhosts/ads.communicontent.com/libraries:/var/www/localhost/vhosts/ads.communicontent.com/libraries/resources')
in /var/www/localhost/vhosts/ads.communicontent.com/admin/config.php on
line 34

and here's the line that sets it:

ini_set('include_path',
PARTNERS_MAX_PATH.':'.PARTNERS_MAX_PATH.'admin'.':'.PARTNERS_MAX_PATH.'libraries'.':'.PARTNERS_MAX_PATH.'libraries/resources');

and the definition of the constant in there:

// where max is installed (include / )
define(PARTNERS_MAX_PATH,/var/www/localhost/vhosts/ads.communicontent.com/);





also look into the magic constant __FILE__ and the functions dirname()
and realpath(). read the manual regard how to use 'include_path'


No, the ideal is to not touch the config.php file or any of the other


I would say fix the config file so that it can figure out where everything
is regardless of whether your using a vhost or stuck in subdir of some other
vhost. but thats just me :-)



Ordinarily i'd agree. We want to be able to update this set of third
party maintained scripts easily though, hence writing a layer to
interact with it rather than hack the core code. 


Hope that all makes sense!

thanks



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



Re: [PHP] getting current page url [RESOLVED]

2006-04-28 Thread Schalk



Jochem Maas wrote:

do a search $_SERVER['PHP_SELF'] - it should answer all your question.

if in doubt a var_dump() can do wonders (in this finding out what kind of
info is generally available, e.g.:

?php

echo 'pre';
var_dump($_SERVER, $_REQUEST, $_ENV, $_POST, $_GET);


Thanks Jochem,

A combination $_SERVER['PHP_SELF'] and $_SERVER['QUERY_STRING'] did the 
trick:


?php   
   if(($_SERVER['PHP_SELF'])  (!$_SERVER['QUERY_STRING'])) {

   $current_nav = includes/home_nav.php;
   } else {
   $current_nav = includes/inside_nav.php;
   }
   ?
   ?php include($current_nav); ?

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers

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



Re: [PHP] New Help with Javascript Navigation

2006-04-28 Thread Jochem Maas

Robert Cummings wrote:

On Thu, 2006-04-27 at 12:36, Weber Sites LTD wrote:

I know I'm going to get heat for this example 
So cool down, it's just an example :)


Do you mean something like : 
http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20060119AtlasN
K/manifest.xml 
Only for PHP?



I didn't learn much:

We're sorry, the page you are viewing requires a media player plug-in
that is not available for this browser. Plug-ins are available for
Netscape 4.7x and the latest version of Microsoft(R) Internet
Explorer.Internet Explorer


not that this has much to do with the thread (I think ;-)

funny (as in 'not very' or 'very not') that they don't offer a mediaplayer
plugin for firefox but they do offer a 'Microsoft Genuine Advantage' plugin
for firefox.

I found this out yesterday because I needed a javascript debugger for IE
and used firefox to find/download it - which I could only do after installing
the plugin. (IE seems to choak, in some instances, if you use a variable named
'parent' in your javascript as it turns out - nice)

bunch of ass-munchers.


Cheers,
Rob.


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



[PHP] Help!

2006-04-28 Thread Dave Goodchild

Hi all - I am attempting to solve some maddening behaviour that has me
totally stumped and before I take a blade to my throat I thought I would
pick the brains of the group/hive/gang.

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 POW!

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: [EMAIL PROTECTED]
Sender Name: Bull Sykes
Sender Email: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
Friend Email: Look what you may have won!
Sender Name: 8 Use of undefined constant prize - assumed 'prize'
Sender Email: 158
Sender Email: /home/friend/public_html/process1.php
[EMAIL PROTECTED]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?







--
http://www.web-buddha.co.uk

dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

look out for project karma, our new venture, coming soon!


[PHP] Re: Help!

2006-04-28 Thread Barry

Dave Goodchild schrieb:

Hi all - I am attempting to solve some maddening behaviour that has me
totally stumped and before I take a blade to my throat I thought I would
pick the brains of the group/hive/gang.

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 POW!

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: [EMAIL PROTECTED]
Sender Name: Bull Sykes
Sender Email: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
Friend Email: Look what you may have won!
Sender Name: 8 Use of undefined constant prize - assumed 'prize'
Sender Email: 158
Sender Email: /home/friend/public_html/process1.php
[EMAIL PROTECTED]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?



Vardumping the array / object which the function gets is allright?

Vardumping it inside the function gives you the right entries?


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



[PHP] Help!

2006-04-28 Thread Dave Goodchild

Hi all - I am attempting to solve some maddening behaviour that has me
totally stumped and before I take a blade to my throat I thought I would
pick the brains of the group/hive/gang.

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 POW!

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: [EMAIL PROTECTED]
Sender Name: Bull Sykes
Sender Email: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
Friend Email: Look what you may have won!
Sender Name: 8 Use of undefined constant prize - assumed 'prize'
Sender Email: 158
Sender Email: /home/friend/public_html/process1.php
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?

--
http://www.web-buddha.co.uk

dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

look out for project karma, our new venture, coming soon!


Re: [PHP] Help!

2006-04-28 Thread T.Lensselink
A blade? come on :)

Seems to me it's just an error in : /home/friend/public_html/process1.php
line 158 that mangles up your email output. Try and fix this undefined
constant.

 Hi all - I am attempting to solve some maddening behaviour that has me
 totally stumped and before I take a blade to my throat I thought I would
 pick the brains of the group/hive/gang.

 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 POW!

 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: [EMAIL PROTECTED]
 Sender Name: Bull Sykes
 Sender Email: [EMAIL PROTECTED]
 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: [EMAIL PROTECTED]
 Friend Email: Look what you may have won!
 Sender Name: 8 Use of undefined constant prize - assumed 'prize'
 Sender Email: 158
 Sender Email: /home/friend/public_html/process1.php
 [EMAIL PROTECTED]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?







 --
 http://www.web-buddha.co.uk

 dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

 look out for project karma, our new venture, coming soon!


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



Re: [PHP] Help!

2006-04-28 Thread T.Lensselink
Well there is an undefined constant prize somewhere.. well it's just a
notice but it really looks like the problem.. Try setting
error_reporting(0) and see if it runs...

 process1.php only has 64 lines.

 On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:

 A blade? come on :)

 Seems to me it's just an error in :
 /home/friend/public_html/process1.php
 line 158 that mangles up your email output. Try and fix this undefined
 constant.

  Hi all - I am attempting to solve some maddening behaviour that has me
  totally stumped and before I take a blade to my throat I thought I
 would
  pick the brains of the group/hive/gang.
 
  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 POW!
 
  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: [EMAIL PROTECTED]
  Sender Name: Bull Sykes
  Sender Email: [EMAIL PROTECTED]
  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: [EMAIL PROTECTED]
  Friend Email: Look what you may have won!
  Sender Name: 8 Use of undefined constant prize - assumed 'prize'
  Sender Email: 158
  Sender Email: /home/friend/public_html/process1.php
  [EMAIL PROTECTED]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?
 
 
 
 
 
 
 
  --
  http://www.web-buddha.co.uk
 
  dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml,
 css)
 
  look out for project karma, our new venture, coming soon!
 





 --
 http://www.web-buddha.co.uk

 dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

 look out for project karma, our new venture, coming soon!


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



Re: [PHP] we are looking for experienced php programmers full time freelance...

2006-04-28 Thread John Nichel

Sumeet wrote:

we are looking for experienced php/mysql programmers full time freelance...

should be at least 1 year experienced, knowing pear libraries and having 
worked on several projects.


please contact me at [EMAIL PROTECTED]

quote your charges and the time that you will be available. also mention 
msn or yahoo ids. skype id is more welcome.




$300 / hr
8 hr minimum per day
available 0800 - 0900EST

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Help!

2006-04-28 Thread T.Lensselink
Hey Dave,

Besides from example two being the correct way to call array elements. I
think it has something todo with error reporting. It's the only thing that
comes to mind right now. Maybe you demo server doesn't echo notices...
Maybe i'm wrong .. it's friday and my brain don't work that good :)

p.s.
plz reply to the list :)

 Hmmm...

 In the demo version the script accesses the $_GET array - an example
 value:

 $data[email]

 ..which works fine in the demo app. If I quote all the values thus in the
 new version:

 $data['email']

 ..the arguments appear in the correct order. I understand the second
 format
 is better to disambiguate constants but the former format works fine for
 the
 demo version. Any reason for the discrepancy?

 On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:

 Well there is an undefined constant prize somewhere.. well it's just a
 notice but it really looks like the problem.. Try setting
 error_reporting(0) and see if it runs...

  process1.php only has 64 lines.
 
  On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:
 
  A blade? come on :)
 
  Seems to me it's just an error in :
  /home/friend/public_html/process1.php
  line 158 that mangles up your email output. Try and fix this
 undefined
  constant.
 
   Hi all - I am attempting to solve some maddening behaviour that has
 me
   totally stumped and before I take a blade to my throat I thought I
  would
   pick the brains of the group/hive/gang.
  
   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 POW!
  
   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: [EMAIL PROTECTED]
   Sender Name: Bull Sykes
   Sender Email: [EMAIL PROTECTED]
   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: [EMAIL PROTECTED]
   Friend Email: Look what you may have won!
   Sender Name: 8 Use of undefined constant prize - assumed 'prize'
   Sender Email: 158
   Sender Email: /home/friend/public_html/process1.php
   [EMAIL PROTECTED]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?
  
  
  
  
  
  
  
   --
   http://www.web-buddha.co.uk
  
   dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml,
  css)
  
   look out for project karma, our new venture, coming soon!
  
 
 
 
 
 
  --
  http://www.web-buddha.co.uk
 
  dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml,
 css)
 
  look out for project karma, our new venture, coming soon!
 

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




 --
 http://www.web-buddha.co.uk

 dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

 look out for project karma, our new venture, coming soon!


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



Re: [PHP] Help!

2006-04-28 Thread Dave Goodchild

Thanks - now the parameters reach the function intact but the mailer still
does not work. Basically, the form is a self-reloader. If the form has been
submitted and the data validated (including emails sent) it displays a thank
you message. Otherwise it shows the starter form.

All that happens when I submit is a white page - no errors (display_errors
is on and error reporting set to the default level) and no html. Nada. When
I try and view source I am given the browser re-post warning.

On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:


Hey Dave,

Besides from example two being the correct way to call array elements. I
think it has something todo with error reporting. It's the only thing that
comes to mind right now. Maybe you demo server doesn't echo notices...
Maybe i'm wrong .. it's friday and my brain don't work that good :)

p.s.
plz reply to the list :)

 Hmmm...

 In the demo version the script accesses the $_GET array - an example
 value:

 $data[email]

 ..which works fine in the demo app. If I quote all the values thus in
the
 new version:

 $data['email']

 ..the arguments appear in the correct order. I understand the second
 format
 is better to disambiguate constants but the former format works fine for
 the
 demo version. Any reason for the discrepancy?

 On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:

 Well there is an undefined constant prize somewhere.. well it's just a
 notice but it really looks like the problem.. Try setting
 error_reporting(0) and see if it runs...

  process1.php only has 64 lines.
 
  On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:
 
  A blade? come on :)
 
  Seems to me it's just an error in :
  /home/friend/public_html/process1.php
  line 158 that mangles up your email output. Try and fix this
 undefined
  constant.
 
   Hi all - I am attempting to solve some maddening behaviour that
has
 me
   totally stumped and before I take a blade to my throat I thought I
  would
   pick the brains of the group/hive/gang.
  
   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 POW!
  
   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: [EMAIL PROTECTED]
   Sender Name: Bull Sykes
   Sender Email: [EMAIL PROTECTED]
   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: [EMAIL PROTECTED]
   Friend Email: Look what you may have won!
   Sender Name: 8 Use of undefined constant prize - assumed 'prize'
   Sender Email: 158
   Sender Email: /home/friend/public_html/process1.php
   [EMAIL PROTECTED]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?
  
  
  
  
  
  
  
   --
   http://www.web-buddha.co.uk
  
   dynamic web programming from Reigate, Surrey UK (php, mysql,
xhtml,
  css)
  
   look out for project karma, our new venture, coming soon!
  
 
 
 
 
 
  --
  http://www.web-buddha.co.uk
 
  dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml,
 css)
 
  look out for project karma, our new venture, coming soon!
 

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




 --
 http://www.web-buddha.co.uk

 dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

 look out for project karma, our new venture, coming soon!


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





--
http://www.web-buddha.co.uk

dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

look out for project karma, our new venture, coming soon!


[PHP] cgi.fix_pathinfo and iis 5

2006-04-28 Thread Mariano Guadagnini

Hi people,
I have the following issue: I´m using PHP 5 on IIS 5 and Windows XP Pro, 
and when trying to pass values through the path to my scripts, iis 
rejects them.  After some googling, I found an advice to set 
AllowPathInfoForScriptMappings variable in iis, but it didn't work 
either. Finally, I ended up with a solution i found somewhere else, 
enabling cgi.fix_pathinfo in php.ini . The thing is, that when i restart 
the server, it seems that php doesn't recognize such variable, as it 
doesn't apper on phpinfo or ini_get() neither. That looks weird, because 
in documentation is clearly stated that this variable is  available 
since  PHP 4.3.0 .

What can I do to have that setting enabled?

Thanks in advance,

Mariano Guadagnini.


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.1/326 - Release Date: 27/04/2006

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



Re: [PHP] Help!

2006-04-28 Thread T.Lensselink
Maybe show some code... Think some error inside a class / function causes
that no output is send...

 Thanks - now the parameters reach the function intact but the mailer still
 does not work. Basically, the form is a self-reloader. If the form has
 been
 submitted and the data validated (including emails sent) it displays a
 thank
 you message. Otherwise it shows the starter form.

 All that happens when I submit is a white page - no errors (display_errors
 is on and error reporting set to the default level) and no html. Nada.
 When
 I try and view source I am given the browser re-post warning.

 On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:

 Hey Dave,

 Besides from example two being the correct way to call array elements. I
 think it has something todo with error reporting. It's the only thing
 that
 comes to mind right now. Maybe you demo server doesn't echo notices...
 Maybe i'm wrong .. it's friday and my brain don't work that good :)

 p.s.
 plz reply to the list :)

  Hmmm...
 
  In the demo version the script accesses the $_GET array - an example
  value:
 
  $data[email]
 
  ..which works fine in the demo app. If I quote all the values thus in
 the
  new version:
 
  $data['email']
 
  ..the arguments appear in the correct order. I understand the second
  format
  is better to disambiguate constants but the former format works fine
 for
  the
  demo version. Any reason for the discrepancy?
 
  On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:
 
  Well there is an undefined constant prize somewhere.. well it's just
 a
  notice but it really looks like the problem.. Try setting
  error_reporting(0) and see if it runs...
 
   process1.php only has 64 lines.
  
   On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:
  
   A blade? come on :)
  
   Seems to me it's just an error in :
   /home/friend/public_html/process1.php
   line 158 that mangles up your email output. Try and fix this
  undefined
   constant.
  
Hi all - I am attempting to solve some maddening behaviour that
 has
  me
totally stumped and before I take a blade to my throat I thought
 I
   would
pick the brains of the group/hive/gang.
   
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 POW!
   
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: [EMAIL PROTECTED]
Sender Name: Bull Sykes
Sender Email: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
Friend Email: Look what you may have won!
Sender Name: 8 Use of undefined constant prize - assumed 'prize'
Sender Email: 158
Sender Email: /home/friend/public_html/process1.php
[EMAIL PROTECTED]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?
   
   
   
   
   
   
   
--
http://www.web-buddha.co.uk
   
dynamic web programming from Reigate, Surrey UK (php, mysql,
 xhtml,
   css)
   
look out for project karma, our new venture, coming soon!
   
  
  
  
  
  
   --
   http://www.web-buddha.co.uk
  
   dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml,
  css)
  
   look out for project karma, our new venture, coming soon!
  
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
  --
  http://www.web-buddha.co.uk
 
  dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml,
 css)
 
  look out for project karma, our new venture, coming soon!
 

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




 --
 http://www.web-buddha.co.uk

 dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

 

Re: [PHP] Help!

2006-04-28 Thread Dave Goodchild

I would do but there are 5000+ lines and no indication of where the error is
occurring. I have just copied the demo version into the same dir and it
works fine - and that version calls the same classes (includes).

On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:


Maybe show some code... Think some error inside a class / function causes
that no output is send...

 Thanks - now the parameters reach the function intact but the mailer
still
 does not work. Basically, the form is a self-reloader. If the form has
 been
 submitted and the data validated (including emails sent) it displays a
 thank
 you message. Otherwise it shows the starter form.

 All that happens when I submit is a white page - no errors
(display_errors
 is on and error reporting set to the default level) and no html. Nada.
 When
 I try and view source I am given the browser re-post warning.

 On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:

 Hey Dave,

 Besides from example two being the correct way to call array elements.
I
 think it has something todo with error reporting. It's the only thing
 that
 comes to mind right now. Maybe you demo server doesn't echo notices...
 Maybe i'm wrong .. it's friday and my brain don't work that good :)

 p.s.
 plz reply to the list :)

  Hmmm...
 
  In the demo version the script accesses the $_GET array - an example
  value:
 
  $data[email]
 
  ..which works fine in the demo app. If I quote all the values thus in
 the
  new version:
 
  $data['email']
 
  ..the arguments appear in the correct order. I understand the second
  format
  is better to disambiguate constants but the former format works fine
 for
  the
  demo version. Any reason for the discrepancy?
 
  On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:
 
  Well there is an undefined constant prize somewhere.. well it's just
 a
  notice but it really looks like the problem.. Try setting
  error_reporting(0) and see if it runs...
 
   process1.php only has 64 lines.
  
   On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:
  
   A blade? come on :)
  
   Seems to me it's just an error in :
   /home/friend/public_html/process1.php
   line 158 that mangles up your email output. Try and fix this
  undefined
   constant.
  
Hi all - I am attempting to solve some maddening behaviour that
 has
  me
totally stumped and before I take a blade to my throat I
thought
 I
   would
pick the brains of the group/hive/gang.
   
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 POW!
   
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: [EMAIL PROTECTED]
Sender Name: Bull Sykes
Sender Email: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
Friend Email: Look what you may have won!
Sender Name: 8 Use of undefined constant prize - assumed
'prize'
Sender Email: 158
Sender Email: /home/friend/public_html/process1.php
[EMAIL PROTECTED]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?
   
   
   
   
   
   
   
--
http://www.web-buddha.co.uk
   
dynamic web programming from Reigate, Surrey UK (php, mysql,
 xhtml,
   css)
   
look out for project karma, our new venture, coming soon!
   
  
  
  
  
  
   --
   http://www.web-buddha.co.uk
  
   dynamic web programming from Reigate, Surrey UK (php, mysql,
xhtml,
  css)
  
   look out for project karma, our new venture, coming soon!
  
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
  --
  http://www.web-buddha.co.uk
 
  dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml,
 css)
 
  look out for 

Re: [PHP] getting current page url [RESOLVED]

2006-04-28 Thread Jochem Maas

Schalk wrote:



Jochem Maas wrote:


do a search $_SERVER['PHP_SELF'] - it should answer all your question.

if in doubt a var_dump() can do wonders (in this finding out what kind of
info is generally available, e.g.:

?php

echo 'pre';
var_dump($_SERVER, $_REQUEST, $_ENV, $_POST, $_GET);


Thanks Jochem,


no probs - only by looking at your code I suspect your not all that clear as to
what it does *exactly* and/or why it works (I may be wrong).

what it does is check if $_SERVER['PHP_SELF'] equate to true (i.e. not empty - 
which it
never is) and then check whether $_SERVER['QUERY_STRING'] equates to false,
which it might or might not but is probably not a basis on which to decide
which menu to show.

also breaking in and out of php with ?php ??php ? is a bad idea - it sucks 
to
look at and is a waste of cpu cyles - minimal gains, but good habits should be 
encouraged
early.



A combination $_SERVER['PHP_SELF'] and $_SERVER['QUERY_STRING'] did the 
trick:


?php  if(($_SERVER['PHP_SELF'])  (!$_SERVER['QUERY_STRING'])) {
   $current_nav = includes/home_nav.php;
   } else {
   $current_nav = includes/inside_nav.php;
   }
   ?
   ?php include($current_nav); ?



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



Re: [PHP] Help!

2006-04-28 Thread Barry

Dave Goodchild schrieb:
I would do but there are 5000+ lines and no indication of where the 
error is

occurring. I have just copied the demo version into the same dir and it
works fine - and that version calls the same classes (includes).


The problem is without code we neither can give any hints.

Checking the vars going inside the function, and checking the imside 
thefunction again and then again before the mail is sent.


Checking checking debugging. That's in this cases the onyl thing you can 
do. And we cant give any more hints because we actually don't see 
anything ^^



--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



Re: [PHP] Help!

2006-04-28 Thread T.Lensselink
Without code it is hard to give an indication... Try and match php.ini's..
Anyway i go home now. Maybe in the evening have some time to think.. Or
maybe some other bright mind on the list has an idea..

goodluck,

Thijs

 I would do but there are 5000+ lines and no indication of where the error
 is
 occurring. I have just copied the demo version into the same dir and it
 works fine - and that version calls the same classes (includes).

 On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:

 Maybe show some code... Think some error inside a class / function
 causes
 that no output is send...

  Thanks - now the parameters reach the function intact but the mailer
 still
  does not work. Basically, the form is a self-reloader. If the form has
  been
  submitted and the data validated (including emails sent) it displays a
  thank
  you message. Otherwise it shows the starter form.
 
  All that happens when I submit is a white page - no errors
 (display_errors
  is on and error reporting set to the default level) and no html. Nada.
  When
  I try and view source I am given the browser re-post warning.
 
  On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:
 
  Hey Dave,
 
  Besides from example two being the correct way to call array
 elements.
 I
  think it has something todo with error reporting. It's the only thing
  that
  comes to mind right now. Maybe you demo server doesn't echo
 notices...
  Maybe i'm wrong .. it's friday and my brain don't work that good :)
 
  p.s.
  plz reply to the list :)
 
   Hmmm...
  
   In the demo version the script accesses the $_GET array - an
 example
   value:
  
   $data[email]
  
   ..which works fine in the demo app. If I quote all the values thus
 in
  the
   new version:
  
   $data['email']
  
   ..the arguments appear in the correct order. I understand the
 second
   format
   is better to disambiguate constants but the former format works
 fine
  for
   the
   demo version. Any reason for the discrepancy?
  
   On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:
  
   Well there is an undefined constant prize somewhere.. well it's
 just
  a
   notice but it really looks like the problem.. Try setting
   error_reporting(0) and see if it runs...
  
process1.php only has 64 lines.
   
On 28/04/06, T.Lensselink [EMAIL PROTECTED] wrote:
   
A blade? come on :)
   
Seems to me it's just an error in :
/home/friend/public_html/process1.php
line 158 that mangles up your email output. Try and fix this
   undefined
constant.
   
 Hi all - I am attempting to solve some maddening behaviour
 that
  has
   me
 totally stumped and before I take a blade to my throat I
 thought
  I
would
 pick the brains of the group/hive/gang.

 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 POW!

 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: [EMAIL PROTECTED]
 Sender Name: Bull Sykes
 Sender Email: [EMAIL PROTECTED]
 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: [EMAIL PROTECTED]
 Friend Email: Look what you may have won!
 Sender Name: 8 Use of undefined constant prize - assumed
 'prize'
 Sender Email: 158
 Sender Email: /home/friend/public_html/process1.php
 [EMAIL PROTECTED]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?







 --
 http://www.web-buddha.co.uk

 dynamic web programming from Reigate, Surrey UK (php, mysql,
  xhtml,
css)

 look out for project karma, our new venture, coming soon!

   
   
   
   
   
--

Re: [PHP] Help!

2006-04-28 Thread Dave Goodchild

Thanks all. Worst case scenario I can rebuild from the demo as it works
(really don't want to do that). Was loathe to plaster your screens with
miles of code but understand it's hard to assit without it. Just wanted to
know I wasn't alone! Have a great weekend!

On 28/04/06, Barry [EMAIL PROTECTED] wrote:


Dave Goodchild schrieb:
 I would do but there are 5000+ lines and no indication of where the
 error is
 occurring. I have just copied the demo version into the same dir and it
 works fine - and that version calls the same classes (includes).

The problem is without code we neither can give any hints.

Checking the vars going inside the function, and checking the imside
thefunction again and then again before the mail is sent.

Checking checking debugging. That's in this cases the onyl thing you can
do. And we cant give any more hints because we actually don't see
anything ^^


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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





--
http://www.web-buddha.co.uk

dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

look out for project karma, our new venture, coming soon!


Re: [PHP] getting current page url

2006-04-28 Thread Wolf
You could also use

$self =explode(/, $_SERVER['PHP_SELF']);

and then parse along those lines.

Wolf


Schalk wrote:
 Greetings All,
 
 Possibly a very simple question but here goes. How would I code the
 following in PHP?
 
 if(window.location == ((http://www.epda.cc/index.php;) ||
 (http://www.epda.cc/;))) {
$current_nav = includes/home_nav.php;
} else {
$current_nav = includes/inside_nav.php;
}
 
 What I am trying to accomplish is something like this:
 
 ?php  if(window.location == ((http://www.epda.cc/index.php;) ||
 (http://www.epda.cc/;))) {
$current_nav = includes/home_nav.php;
} else {
$current_nav = includes/inside_nav.php;
}
?
?php include($current_nav); ?
 
 Thanks!
 

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



Re: [PHP] Help!

2006-04-28 Thread Wolf
Dump some code to the list, just the inside function in and of itself
SHOULD give enough to find the bug.  It is PROBABLY how you are snagging
your data inside from out, or you left out a  somewhere and it is
catching it.  Believe me, I have had a heck of a time due to a single 
missing somewhere that just throws everything off.

Wolf

Dave Goodchild wrote:
 Hi all - I am attempting to solve some maddening behaviour that has me
 totally stumped and before I take a blade to my throat I thought I would
 pick the brains of the group/hive/gang.
-- SNIP --

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



Re: [PHP] Re: php - js (was Javascript Navigation)

2006-04-28 Thread tedd

At 9:03 AM +0200 4/28/06, Barry wrote:

tedd schrieb:

At 5:09 PM +0200 4/27/06, Barry wrote:

tedd schrieb:

Hi gang:

Gang?


Gang, group, clan, community, organization, hive, pod, assembly, 
biocenosis -- what do you want to be called?


By my name normally. And if you adress everyone i prefer everyone


Two things:

1. My post wasn't by name, but to the list.

2. And, in doing so, I prefer gang. After all, this is an informal 
group and everyone is permitted their preferences, right?



Show me.


function jstojava()
  {
 // sending stuff to the applet
  }

html
Javaapplet containing Java that gives infos to PHP through an 
openened PHP socket. PHP giving stuff back

/html

Java executes a JS with the vars given by php


Interesting -- and yet another thing for me to learn.

Thanks -- I'll consider.

tedd

PS: I've learned something new every day of my life, and I'm getting 
damn tired of it.

--

http://sperling.com

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



Re: [PHP] Help!

2006-04-28 Thread Martin Alterisio

2006/4/28, Dave Goodchild [EMAIL PROTECTED]:


Hi all - I am attempting to solve some maddening behaviour that has me
totally stumped and before I take a blade to my throat I thought I would
pick the brains of the group/hive/gang.

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 POW!

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:



sendSantaMail That's just not a *declarative* way of naming a function.
Then, 11 arguments Errr, passing an associative array with the email
parameters wouldn't have been a cleaner and better option?

Values to be passed to sendSantaMail:


Friend Name: Treyt
Friend Email: [EMAIL PROTECTED]
Sender Name: Bull Sykes
Sender Email: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
Friend Email: Look what you may have won!
Sender Name: 8 Use of undefined constant prize - assumed 'prize'
Sender Email: 158
Sender Email: /home/friend/public_html/process1.php
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.



One idea, you messed up somewhere. Use debug_print_backtrace() on the
function to get a dump of function call stack. Use it with an if to catch
the moment where the wrong values appear. The first entry of the backtrace
should point the file and line where the function was called.

If you're using php4 you'll have to use var_dump(debug_backtrace()) instead
of debug_print_backtrace().

Also check the error Use of undefined constant prize - assumed 'prize'.
Please tell me your are not doing something like this:
$arr[prize]

Any ideas on this black Friday?


--
http://www.web-buddha.co.uk

dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

look out for project karma, our new venture, coming soon!




Re: [PHP] we are looking for experienced php programmers full time freelance...

2006-04-28 Thread cajbecu



 
 $300 / hr
 8 hr minimum per day
 available 0800 - 0900EST
 


it`s a joke, right?

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



Re: [PHP] Help!

2006-04-28 Thread Barry

Martin Alterisio schrieb:

2006/4/28, Dave Goodchild [EMAIL PROTECTED]:


Hi all - I am attempting to solve some maddening behaviour that has me
totally stumped and before I take a blade to my throat I thought I would
pick the brains of the group/hive/gang.

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 POW!

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:



sendSantaMail That's just not a *declarative* way of naming a function.
Do you know what santa means? No? so how can you tell it's not 
declarative.
Santa could be a coded Mailer and that functions uses that specific 
Mailer Deamon called santa to send mails.

Then, 11 arguments Errr, passing an associative array with the email
parameters wouldn't have been a cleaner and better option?


He just told he passes 11 arguments, never told how he does that.


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



Re: [PHP] php - js (was Javascript Navigation)

2006-04-28 Thread tedd

At 5:54 PM -0700 4/27/06, Paul Novitski wrote:

At 04:39 PM 4/27/2006, tedd wrote:
What I don't get is how php can pass variables to js and cause it 
to run at will.


Do you mean the way one function can call another function within 
the same program?


No, I realize that php are two different language on two different 
computers sharing one event.


It sounds like you're picturing PHP  JavaScript executing 
continuously  simultaneously.  You aren't, are you?


Not simultaneously and/or continuously but an easy way to communicate 
with each other.


JavaScript can execute a PHP program at will simply by requesting 
a PHP page from the server.  PHP can execute a JavaScript function 
at will simply by downloading it (with at least minimal HTML 
markup) to a browser.


That seems pretty simple  direct to me, considering that they're 
running in different computers.


What's simple and direct to you may not be to others -- and I fully 
realize that both environments are running on different computers at 
different times -- it's the your perspective of at will I need to 
come to terms with.


I can see how php can, and have used php to, generate a web page 
which has body onload=js() tag, which can pass a variable to js 
and will cause js to execute. But, isn't there anything else? Is 
that all there is?

...
I also understand that php can generate html (have done it) and 
echo out javascript that may, or may not, run if js is present -- 
like Robert suggested in his WAHOOEY (LOL) example. But, that 
appears messy to me. If php wants to say something to js, then a 
page must be created -- it seems like a lot foreplay to get at the 
goodies.


Without a downloaded page, what goodies are there?

You know, you can download pure JavaScript, dressed only in a script 
tag, to a browser and have it execute without carrying with it a 
whole HTML page.  Is that what you're looking for?  What would such 
a script accomplish that a PHP program couldn't?  I suppose it could 
interact with the human user with prompts, alerts, and confirms; 
gather information about the client such as monitor  window size; 
grab local time to compare to server time.  What else?  If it has to 
create DOM nodes to interact with the user, haven't you come full 
circle and shouldn't you just download an HTML page to be 
JavaScript's environment?




I guess what I'm looking for is something simpler -- is there?


Paint me a picture of a hypothetical simpler situation; I'm intrigued.


I think you have provided me with a clearer picture of what's going 
on and some things for me to consider. I need to pound some code.


Thanks for your time and insight.

tedd
--

http://sperling.com

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



Re: [PHP] we are looking for experienced php programmers full time freelance...

2006-04-28 Thread John Nichel

cajbecu wrote:



$300 / hr
8 hr minimum per day
available 0800 - 0900EST




it`s a joke, right?



Not at all.  Ready to sign the contract?

Oh yeah, my available time is only on the second and fourth Monday of 
the month.


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



[PHP] RegExp for preg_split()

2006-04-28 Thread Weber Sites LTD
Hi
 
I'm looking for the RegExp that will split a search string into search
keywords.
while taking   into account.
 
From what I managed to find I can get all of the words into an array but I
would 
like all of the words inside   to be in the same array cell.
 
NE1?
 
thanks
 
berber


[PHP] Re: we are looking for experienced php programmers full time freelance...

2006-04-28 Thread Barry

Sumeet schrieb:

we are looking for experienced php/mysql programmers full time freelance...


What the hell is a full time freelance? Why don't you just give 
aprogrammer the job? I dont' get it. Please enlight me/us :)


should be at least 1 year experienced, knowing pear libraries and having 
worked on several projects.

Knowing? Like: Oh pear? Yeah i know it www.php.net/pear


please contact me at [EMAIL PROTECTED]


quote your charges and the time that you will be available. also mention 
msn or yahoo ids. skype id is more welcome.


Why don't you offer something?

Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



[PHP] Beginner's php/mysql connection probs

2006-04-28 Thread sathyashrayan
 Dear group,

(I am a very beginner so please bear with me for a simple question)

  I am a self thought php beginner. I wrote my first toy 
code for database connection in php/mysql. The connection
is successful but iam getting a warning and my rows/columns
are not showing. I am getting a warning:

Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, 
boolean given in c:\webs\test\dbs\one.php on line 13

I went through the php manual for the above mentioned function where
I get no clue. Pls guide me.

code:

html
  head
 title my first data base page /title
  /head
 body
   pre
 ?php
$conn = mysqli_connect(localhost,root,passwd,temp)
or die(conn failed);
$temp1 = select *from grape_varity; 
$result = mysqli_query($conn,$temp);

while($row=mysqli_fetch_row($result))
{
  for($i =0;$i  mysqli_num_fields($result);$i++)
echo $row[i]. ;
echo \n;
}
   
 mysqli_close($conn);

 ?
/pre
/body
/html

[OT]
And one more thing is if I want to replay to a msg in this mail list
do I have to hit replay button or replay-all button for posting
in the mail list. I use microsoft outlook 2000

[/OT]

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



[PHP] Re: Beginner's php/mysql connection probs

2006-04-28 Thread Barry

sathyashrayan schrieb:

 Dear group,

(I am a very beginner so please bear with me for a simple question)


I read that sentence somewhere before *mmh*



  I am a self thought php beginner. I wrote my first toy 
code for database connection in php/mysql. The connection

is successful but iam getting a warning and my rows/columns
are not showing. I am getting a warning:

Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, 
boolean given in c:\webs\test\dbs\one.php on line 13


I went through the php manual for the above mentioned function where
I get no clue. Pls guide me.

code:

html
  head
 title my first data base page /title
  /head
 body
   pre
 ?php
$conn = mysqli_connect(localhost,root,passwd,temp)
or die(conn failed);
$temp1 = select *from grape_varity; 
$result = mysqli_query($conn,$temp);

This is right:
$result = mysqli_query($temp1,$conn);



[OT]
And one more thing is if I want to replay to a msg in this mail list
do I have to hit replay button or replay-all button for posting
in the mail list. I use microsoft outlook 2000

Reply all is ok.

Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



[PHP] Question for PHP Arrays

2006-04-28 Thread Saul Rennison
Hi,
I'm making a PHP Installer that is customizable by using plugins, I haven't
used PHP for a while and which I have forgotten some things about PHP *eek*..

Anyway, I want to know how to add things to an array. Like this:

$foobar = array()

$foobar['rar']['miaw']

Would that output come out (for the array) as:

array(
'rar' = 'miaw'
)

Please correct me if wrong. Also I need to ask one more question, would this
work:

$foobar = array()

function addToArray($int, $value) {
$foobar[$int][$value]
}

And with a function call addToArray(1, meow) output as the array looking
like:

array(
'1' = 'meow'
)

--
Thanks,
dphiance (Saul Rennison)


Re: [PHP] Question for PHP Arrays

2006-04-28 Thread Richard Davey

On 27 Apr 2006, at 20:51, Saul Rennison wrote:


Anyway, I want to know how to add things to an array. Like this:

$foobar = array()

$foobar['rar']['miaw']

Would that output come out (for the array) as:

array(
'rar' = 'miaw'
)


No, it would create a multi-dimensional array that contains nothing.  
You want:


$foobar['rar'] = 'miaw';

Please correct me if wrong. Also I need to ask one more question,  
would this

work:

$foobar = array()

function addToArray($int, $value) {
$foobar[$int][$value]
}

And with a function call addToArray(1, meow) output as the array  
looking

like:

array(
'1' = 'meow'
)


No (because of the mistake commented on above). However another issue  
at play here is scope. $foobar the array will not be visible to the  
function addToArray unless you make it global.


Cheers,

Rich
--
http://www.corephp.co.uk
Zend Certified Engineer
PHP Development Services

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



Re: [PHP] Beginner's php/mysql connection probs

2006-04-28 Thread John Nichel

sathyashrayan wrote:

 Dear group,

(I am a very beginner so please bear with me for a simple question)

  I am a self thought php beginner. I wrote my first toy 
code for database connection in php/mysql. The connection

is successful but iam getting a warning and my rows/columns
are not showing. I am getting a warning:

Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, 
boolean given in c:\webs\test\dbs\one.php on line 13


I went through the php manual for the above mentioned function where
I get no clue. Pls guide me.

code:

html
  head
 title my first data base page /title
  /head
 body
   pre
 ?php
$conn = mysqli_connect(localhost,root,passwd,temp)
or die(conn failed);
$temp1 = select *from grape_varity; 
$result = mysqli_query($conn,$temp);


Your query is failing.  I'm guessing that it's because you don't have a 
space between '*' and 'from'


Better if you check to make sure the query was successful before trying 
to get the data


if ( ! $result = mysqli_query ( $conn, $temp ) ) {
echo ( mysqli_error ( $conn ) );
} else {
while ( $row = mysqli_fetch_row ( $result ) ) {
///  more code

Simple error handling...you'll want to do more than that, but that will 
give you the gist of it



while($row=mysqli_fetch_row($result))
{
  for($i =0;$i  mysqli_num_fields($result);$i++)
echo $row[i]. ;
echo \n;
}
   
 mysqli_close($conn);


 ?
/pre
/body
/html

[OT]
And one more thing is if I want to replay to a msg in this mail list
do I have to hit replay button or replay-all button for posting
in the mail list. I use microsoft outlook 2000

[/OT]



Reply to all (and preferably remove all the addresses save 
php-general@lists.php.net from the to/cc fields)


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



RE: [PHP] Beginner's php/mysql connection probs

2006-04-28 Thread sathyashrayan

-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: Friday, April 28, 2006 9:11 PM
To: Php-General
Subject: Re: [PHP] Beginner's php/mysql connection probs


sathyashrayan wrote:
  Dear group,

 (I am a very beginner so please bear with me for a simple question)

   I am a self thought php beginner. I wrote my first toy
 code for database connection in php/mysql. The connection
 is successful but iam getting a warning and my rows/columns
 are not showing. I am getting a warning:

 Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result,
 boolean given in c:\webs\test\dbs\one.php on line 13

 I went through the php manual for the above mentioned function where
 I get no clue. Pls guide me.

 code:

 html
   head
  title my first data base page /title
   /head
  body
pre
  ?php
 $conn = mysqli_connect(localhost,root,passwd,temp)
 or die(conn failed);
 $temp1 = select *from grape_varity;
 $result = mysqli_query($conn,$temp);

Your query is failing.  I'm guessing that it's because you don't have a
space between '*' and 'from'

Better if you check to make sure the query was successful before trying
to get the data

if ( ! $result = mysqli_query ( $conn, $temp ) ) {
echo ( mysqli_error ( $conn ) );
} else {
while ( $row = mysqli_fetch_row ( $result ) ) {
///  more code

Thanks for the quick help. I changed the code as you sugested and get

Query was empty as the result of the line echo (mysqli_error($conn)). So
does that mean the table is empty? But I did filled the table with some
value and mysql query displays the tables.

Simple error handling...you'll want to do more than that, but that will
give you the gist of it

 while($row=mysqli_fetch_row($result))
 {
   for($i =0;$i  mysqli_num_fields($result);$i++)
 echo $row[i]. ;
 echo \n;
 }

  mysqli_close($conn);

  ?
 /pre
 /body
 /html

 [OT]
 And one more thing is if I want to replay to a msg in this mail list
 do I have to hit replay button or replay-all button for posting
 in the mail list. I use microsoft outlook 2000

 [/OT]


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



Re: [PHP] RegExp for preg_split()

2006-04-28 Thread tedd

At 6:16 PM +0200 4/28/06, Weber Sites LTD wrote:

Hi

I'm looking for the RegExp that will split a search string into search
keywords.
while taking   into account.

From what I managed to find I can get all of the words into an array but I
would
like all of the words inside   to be in the same array cell.

NE1?

thanks

berber


berber:

In other words, you want phrases as well as keywords, is that correct?

What's the string look like?

tedd


--

http://sperling.com

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



Re: [PHP] Beginner's php/mysql connection probs

2006-04-28 Thread John Nichel

sathyashrayan wrote:

-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: Friday, April 28, 2006 9:11 PM
To: Php-General
Subject: Re: [PHP] Beginner's php/mysql connection probs


sathyashrayan wrote:

 Dear group,

(I am a very beginner so please bear with me for a simple question)

  I am a self thought php beginner. I wrote my first toy
code for database connection in php/mysql. The connection
is successful but iam getting a warning and my rows/columns
are not showing. I am getting a warning:

Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result,
boolean given in c:\webs\test\dbs\one.php on line 13

I went through the php manual for the above mentioned function where
I get no clue. Pls guide me.

code:

html
  head
 title my first data base page /title
  /head
 body
   pre
 ?php
$conn = mysqli_connect(localhost,root,passwd,temp)
or die(conn failed);
$temp1 = select *from grape_varity;
$result = mysqli_query($conn,$temp);


Your query is failing.  I'm guessing that it's because you don't have a
space between '*' and 'from'

Better if you check to make sure the query was successful before trying
to get the data

if ( ! $result = mysqli_query ( $conn, $temp ) ) {
echo ( mysqli_error ( $conn ) );
} else {
while ( $row = mysqli_fetch_row ( $result ) ) {
///  more code

Thanks for the quick help. I changed the code as you sugested and get

Query was empty as the result of the line echo (mysqli_error($conn)). So
does that mean the table is empty? But I did filled the table with some
value and mysql query displays the tables.


You assigned your query to the variable $temp1, but pass $temp to 
mysqli_query()


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] RegExp for preg_split()

2006-04-28 Thread tedd

At 6:16 PM +0200 4/28/06, Weber Sites LTD wrote:

Hi

I'm looking for the RegExp that will split a search string into search
keywords.
while taking   into account.

From what I managed to find I can get all of the words into an array but I
would
like all of the words inside   to be in the same array cell.

NE1?

thanks

berber


berber:

Not knowing exactly what you want, this will sort out the phrase strings.

$string = 'Medaillons, Listels, custom stuff, more things, 
entryway, accents, showplace';

echo($string br/);
preg_match_all ('/.*?/', $string, $matchs);
foreach($matchs[0] as $matchs)
   {
   echo($matchs br/);
   }

HTH's

tedd
--

http://sperling.com

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



[PHP] display_errors off and custom error pages

2006-04-28 Thread IG

I've spent the last couple of hours trying to work this out to no avail.

I have recently moved over to a managed dedi server and no can ask my 
host to change my php.ini.


I have found out that the 'display_errors' in the php.ini is set to off 
and error file logging is off.


I would like to be able log to file which is easy to do from the ini 
file but also to show a custom error page if there is an error on one of 
the pages.


I thought I would be able to use a custom error handler such as -

ob_start();
// custom error handler
function e($type, $msg, $file, $line) {
blah blah
ob_end_clean();

   // display error page
exit();
}

set_error_handler(e);



But all I get is a blank page. Does having display_errors off mean that 
I can't use a custom error handler? I have also tried adding 
*set_ini*('*display_errors*','1') but this keeps giving me a blank page.


Can someone tell me the best (and most secure way) of having custom 
error pages in php. Ideally I would like it all set from a central place 
so that i only need to change one file for all the websites on our 
server. I didn't really want to change display_errors to on as I was 
told this wasn't very secure- i don't want error messages on any of my 
pages, I just want a simple error 500 server error page.


Many thanks,

Ian


RE: [PHP] RegExp for preg_split()

2006-04-28 Thread Weber Sites LTD
This is part of what I need.
You found all of the phrases (e.g. all of the strings inside  )
But I also need all of the words that are not inside  .

thanks 

-Original Message-
From: tedd [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 6:46 PM
To: Weber Sites LTD; php-general@lists.php.net
Subject: Re: [PHP] RegExp for preg_split()

At 6:16 PM +0200 4/28/06, Weber Sites LTD wrote:
Hi

I'm looking for the RegExp that will split a search string into search 
keywords.
while taking   into account.

From what I managed to find I can get all of the words into an array 
but I would like all of the words inside   to be in the same array 
cell.

NE1?

thanks

berber

berber:

Not knowing exactly what you want, this will sort out the phrase strings.

$string = 'Medaillons, Listels, custom stuff, more things, entryway,
accents, showplace'; echo($string br/); preg_match_all ('/.*?/',
$string, $matchs); foreach($matchs[0] as $matchs)
{
echo($matchs br/);
}

HTH's

tedd
--


http://sperling.com

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



Re: [PHP] how to get the absolute path of an included file?

2006-04-28 Thread Bing Du
Thanks all who replied. So the include path used in file2.php should be
relative to the working directory where file2.php is located.  Yes, I have
error_reporting=E_ALL in my php.ini.  The log shows include_path=.|. 
But in my situation, it took me a while to figure out what that '.' really
means because file2.php is not an actual file on the filesystem. 
file2.php is a PHP content element in a web application.  Anyway, I've
figured out.

Bing

 2006/4/27, Bing Du [EMAIL PROTECTED]:

 Hello,

 Here are the two scripts.  The result is 'var is' rather than 'var is
 foo'.  My suspect is I did not set the file path right in 'include'.  So
 in file2.php, how should I get the actual absolute path it really gets
 for
 file1.php?  Is it stored in some environment variable or something?  I'd
 appreciate any help.

 file1.php

 = ?php
 $var = 'foo';
 ?
 =
 file2.php

 = ?php

 include '/some/path/file1.php';
 echo var is $var;
 ?
 =
 Thanks,

 Bing

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


 Activate reporting of all errors either through php.ini or
 error_reporting(E_ALL);
 Use include_once instead of include. That way the program will stop if it
 couldn't include the file.
 Try using a relative path to the file.


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



Re: [PHP] we are looking for experienced php programmers full time freelance...

2006-04-28 Thread Robert Cummings
On Fri, 2006-04-28 at 02:18, Sumeet wrote:
 Robert Cummings wrote:
  quote your charges and the time that you will be available. also mention 
  msn or yahoo ids. skype id is more welcome.
  
  What about a MUD? I'm usually logged into a mud. It's a great place for
 
  
  telnet wocmud.org 4000
  
 
 hi robert,
 
 thanks for the info... but a MUD? ...for doing business?

Why not? What's so great about IM versus a MUD? IM's are so bland. If
you can do business while playing golf, drinking beer, sitting at a
hockey game, there's pretty much no reason why you can't do it almost
anywhere.

 anyway i used the MUDand remembered the time on the BBS...(Bulletin 
 Board Service)

Yep, I'm old enough to remember BBSes also. The the Internet came along
and they pretty much died off.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Re: php - js (was Javascript Navigation)

2006-04-28 Thread Robert Cummings
On Fri, 2006-04-28 at 02:59, Barry wrote:
 Robert Cummings schrieb:
  On Thu, 2006-04-27 at 11:09, Barry wrote:
  tedd schrieb:
  Hi gang:
  Gang?
  
  You know... Scooby, Shaggy, and Mary-Jane.
 ah, ic.

Are you sure?

  
  1. A way to send information from js to php and have php act upon it.
  Java
  ... Sucks.
 Because?

You know why!

  2. A way to send information from php to js and have js act upon it.
  Java
  ... Sucks :)
 Because?

See last comment.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] Beginner's php/mysql connection probs

2006-04-28 Thread sathyashrayan


-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: Friday, April 28, 2006 10:14 PM
To: Php-General
Subject: Re: [PHP] Beginner's php/mysql connection probs


sathyashrayan wrote:
 -Original Message-
 From: John Nichel [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 28, 2006 9:11 PM
 To: Php-General
 Subject: Re: [PHP] Beginner's php/mysql connection probs


 sathyashrayan wrote:
  Dear group,

 (I am a very beginner so please bear with me for a simple question)

   I am a self thought php beginner. I wrote my first toy
 code for database connection in php/mysql. The connection
 is successful but iam getting a warning and my rows/columns
 are not showing. I am getting a warning:

 Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result,
 boolean given in c:\webs\test\dbs\one.php on line 13

 I went through the php manual for the above mentioned function where
 I get no clue. Pls guide me.

 code:

 html
   head
  title my first data base page /title
   /head
  body
pre
  ?php
 $conn = mysqli_connect(localhost,root,passwd,temp)
 or die(conn failed);
 $temp1 = select *from grape_varity;
 $result = mysqli_query($conn,$temp);

 Your query is failing.  I'm guessing that it's because you don't have a
 space between '*' and 'from'

 Better if you check to make sure the query was successful before trying
 to get the data

 if ( ! $result = mysqli_query ( $conn, $temp ) ) {
   echo ( mysqli_error ( $conn ) );
 } else {
   while ( $row = mysqli_fetch_row ( $result ) ) {
   ///  more code

 Thanks for the quick help. I changed the code as you sugested and get

 Query was empty as the result of the line echo (mysqli_error($conn)). So
 does that mean the table is empty? But I did filled the table with some
 value and mysql query displays the tables.

You assigned your query to the variable $temp1, but pass $temp to
mysqli_query()


Yes, now it works, thanks.

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



[PHP] encoding problem when inserting into database

2006-04-28 Thread Zouari Fourat

Hello,
Am having days trying to solve my problem :
Using PostgreSQL database with server and client encoding set to utf8.
I can enter any accentuated data on PHPPgAdmin interface and can see it
stored like i entered it.
The problem that when using a php script, it throw an error when trying to
insert the same data entered over PHPPgAdmin, i can enter the data if u
utf8_encode it but i'll see the stored data as converted one, 'à' will be
written as 'agrave' and so ...
how PHPPgAdmin is doing to store this kind of data-strings ?
thanks


Re: [PHP] Re: we are looking for experienced php programmers full time freelance...

2006-04-28 Thread Sumeet

Barry wrote:

Sumeet schrieb:

What the hell is a full time freelance? Why don't you just give 
aprogrammer the job? I dont' get it. Please enlight me/us :)


most freelancers are working and hence not available during office hours...

a full time freelance is a person who does not have a regular job but is 
working mainly on freelance...and is available most of the time.




Knowing? Like: Oh pear? Yeah i know it www.php.net/pear


lol...

maybe you know java too.. www.java.com or maybe oracle too 
www.oracle.com or maybe mysql too... www.mysql.com ...


maybe if you go through a directory...you will know all the people by 
just saying their name once.




quote your charges and the time that you will be available. also 
mention msn or yahoo ids. skype id is more welcome.


Why don't you offer something?


i have just offeredsome php freelance work...people will get in touch

and thanks for your email


--
Thanking You

Sumeet Shroff
http://www.prateeksha.com
Web Designers and PHP / Mysql Ecommerce Development, Mumbai India

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



Re: [PHP] we are looking for experienced php programmers full time freelance...

2006-04-28 Thread Sumeet

John Nichel wrote:

cajbecu wrote:



$300 / hr
8 hr minimum per day
available 0800 - 0900EST




it`s a joke, right?



Not at all.  Ready to sign the contract?



hmm...$300

sorry my budget is only $299 per hour.


--
Thanking You

Sumeet Shroff
http://www.prateeksha.com
Web Designers and PHP / Mysql Ecommerce Development, Mumbai India

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



Re: [PHP] we are looking for experienced php programmers full time freelance...

2006-04-28 Thread John Nichel

Sumeet wrote:

John Nichel wrote:

cajbecu wrote:



$300 / hr
8 hr minimum per day
available 0800 - 0900EST




it`s a joke, right?



Not at all.  Ready to sign the contract?



hmm...$300

sorry my budget is only $299 per hour.




That's an insult to an ÜberGeek.

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Question for PHP Arrays

2006-04-28 Thread Jochem Maas

Saul Rennison wrote:

Hi,
I'm making a PHP Installer that is customizable by using plugins, I haven't
used PHP for a while and which I have forgotten some things about PHP *eek*..


$hiddenKnowledge = unforgetPHP();


Anyway, I want to know how to add things to an array. Like this:

$foobar = array()

$foobar['rar']['miaw']

Would that output come out (for the array) as:

array(
'rar' = 'miaw'
)

Please correct me if wrong. Also I need to ask one more question, would this
work:

$foobar = array()

function addToArray($int, $value) {
$foobar[$int][$value]
}

And with a function call addToArray(1, meow) output as the array looking
like:


I think you have been eating too much Ruby (or something like that) because
that function won't return or output anything. you need to always specify
a value to return.

just out of interest; what is stopping you from cut/pasting those 3-4 lines
into a file and running it? (it would take less time than it did for you to
write your post and the answer you get back from the php binary/module would
have been alot less sarcastic than mine)



array(
'1' = 'meow'
)

--
Thanks,
dphiance (Saul Rennison)



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



RE: [PHP] Re: php - js (was Javascript Navigation)

2006-04-28 Thread Chrome
snip
  Java
  ... Sucks.
 Because?

You know why!
/snip

Um I don't... Would you mind explaining for the hard of thinking please?
(that's me by the way :) )

Cheers

Dan

-- 
http://chrome.me.uk

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



Re: [PHP] cgi.fix_pathinfo and iis 5

2006-04-28 Thread Mariano Guadagnini

Mariano Guadagnini wrote:


Hi people,
I have the following issue: I´m using PHP 5 on IIS 5 and Windows XP 
Pro, and when trying to pass values through the path to my scripts, 
iis rejects them.  After some googling, I found an advice to set 
AllowPathInfoForScriptMappings variable in iis, but it didn't work 
either. Finally, I ended up with a solution i found somewhere else, 
enabling cgi.fix_pathinfo in php.ini . The thing is, that when i 
restart the server, it seems that php doesn't recognize such variable, 
as it doesn't apper on phpinfo or ini_get() neither. That looks weird, 
because in documentation is clearly stated that this variable is  
available since  PHP 4.3.0 .

What can I do to have that setting enabled?

Thanks in advance,

Mariano Guadagnini.



Any ideas?


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.1/326 - Release Date: 27/04/2006

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



RE: [PHP] Re: php - js (was Javascript Navigation)

2006-04-28 Thread Robert Cummings
On Fri, 2006-04-28 at 13:58, Chrome wrote:
 snip
   Java
   ... Sucks.
  Because?
 
 You know why!
 /snip
 
 Um I don't... Would you mind explaining for the hard of thinking please?
 (that's me by the way :) )

I'm too busy :P

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] we are looking for experienced php programmers full time freelance...

2006-04-28 Thread tg-php
Damn.. tough crowd here.. hah..  glad everyone has a sense of humor at least. 
hah..

-TG

= = = Original message = = =

Sumeet wrote:
 John Nichel wrote:
 cajbecu wrote:

 $300 / hr
 8 hr minimum per day
 available 0800 - 0900EST



 it`s a joke, right?


 Not at all.  Ready to sign the contract?

 
 hmm...$300
 
 sorry my budget is only $299 per hour.
 
 

That's an insult to an ~berGeek.

-- 
John C. Nichel IV
Programmer/System Admin (~berGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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



[PHP] [JOB] PHP developered needed in Largo, MD

2006-04-28 Thread tg-php
Ok.. my turn for the $300/hr jokes (no, we're not paying that.. nor are we 
paying $299/hr.. sorry John)

Here's the skinny.. more details available upon request.

Should have a more-than-decent grasp on the following:
PHP4
MySql4
Javascript (AJAX experience is nice but not necessary)
HTML and CSS is always good

Basically this is an inherited system that started out as a single page to 
track some stuff and has grown into a giant web application.  We need to 
support the existing application and fix bugs while planning to rebuild the 
whole thing in hopefully a better planned way and not Single plage + massive 
scope creep.

The atmosphere here is really laid back, but we need people who can self 
motivate so the laid back atmosphere doesn't turn into a big slack-fest.

Someone for in-house work is a definite.  There are too many little things and 
issues that need to be dealt with and discussed in person to handle remotely 
all the time.

Send an email with a copy of your resume attached and any links to or samples 
of your work if available to [EMAIL PROTECTED].  (just tried to end that 
sentence with a semi-colon..  PHP has taught me that semi-colons come after 
double-quotes apparently)

Hey Jay!  We run linux here... you could leave your Windows world again!  :)

-TG

___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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



Re: [PHP] we are looking for experienced php programmers full time freelance...

2006-04-28 Thread Jochem Maas

RANTING SEASON HAS OPENED - lets shoot some wabbits.

has anyone else noticed?? all our jobs go to India and now they are starting
to hire us back. (because they don't have the skills? and probably at rates
that equate to being able to buy 1 cheese sandwich a month with change leftover
to play a song on the jukebox - not that they'd let you into the bar seeing as
you can't afford to buy a drink) go figure.

Sumeet wrote:

we are looking for experienced php/mysql programmers full time freelance...


so they have no rights/protection what so ever? I have never met anyone of
the people on this list in person so I can't tell you if any of them happen
have 'let me be your slave' tattooed on their forehead.

should be at least 1 year experienced, knowing pear libraries and having 
worked on several projects.


WTF - 1 year of experience != experienced. I have projects that run for longer
than that.

BTW - the core of PEAR sucks, it has its gems but you have dig deep - and then
extract the PEAR::Error crap et al in order to appreciate the beauty.
also might note how php5 has been on the market - using PEAR with php5 is like
winning John Carmack's Ferrari and then promptly filling it full of concrete.



please contact me at [EMAIL PROTECTED]


please goto a freaking recruitment site like normal people.



quote your charges and the time that you will be available. also mention 
msn or yahoo ids. skype id is more welcome.


so you can call him 24/7? - that's exactly the way to destroy a programmers
moral and quality of work - have some 'manager' constantly being two clicks
(or a dial) away from an interactive moaning session.

which ever poor bstd you hire is atleast safe in the knowledge that you can't
speak/.write in full sentences - on average the moaning sessions will be over 
quicker.

btw when you offer a job your the one who is supposed to name the level of 
renumeration,
if you had it would have saved John Nichel some of valuable time (time he could
have spent making great jokes on this list - oh wait, he was :-)

cynical me? sometimes.

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



[PHP] Multi-threaded port listener

2006-04-28 Thread René Fournier
Anyone find any good tutorials, code samples, etc. on such a thing?  
Basically, I want to write server (in PHP) that listeners on a  
particular port, and spins off a thread/process (essentially, execute  
a separate script) for each incoming connection. There won't be a lot  
of data to process, but there will be many simultaneous connections— 
upwards of 1000s of connections (each spun off as seperate threads).


...Rene





Re: [PHP] cgi.fix_pathinfo and iis 5

2006-04-28 Thread John Wells

On 4/28/06, Mariano Guadagnini [EMAIL PROTECTED] wrote:

Mariano Guadagnini wrote:

 Hi people,
 I have the following issue: I´m using PHP 5 on IIS 5 and Windows XP
 Pro, and when trying to pass values through the path to my scripts,
 iis rejects them.  After some googling, I found an advice to set


So... without some code examples or something a bit more substantial
than iis rejects them it's difficult to help out.  I have no
experience with the cgi.fix_pathinfo, but I'm _guessing_ that you're
trying to do something like this:

http://www.mariano.com/script.php/var1/var2

And get var1 and var2 out of the path?

If so, you've likely tried getting at them with:

$_SERVER['PATH_INFO']

or even

getenv('PATH_INFO');

?  And if so, what exactly does iis do?  Run phpinfo() and see what
environment variables your server is setting (VERY_HELPFUL).  For
example, on the 3rd party hosting server I use, PATH_INFO is empty,
but an ORIG_PATH_INFO contains the value I need.

As I said at the start, please give us some more information, and
perhaps we can be a bit more helpful...and I can stop asking you more
questions than you asked us.

Cheers,
John

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



Re: [PHP] Multi-threaded port listener

2006-04-28 Thread Alister Bulman

On 28/04/06, René Fournier [EMAIL PROTECTED] wrote:

Anyone find any good tutorials, code samples, etc. on such a thing?
Basically, I want to write server (in PHP) that listeners on a
particular port, and spins off a thread/process (essentially, execute
a separate script) for each incoming connection. There won't be a lot
of data to process, but there will be many simultaneous connections—
upwards of 1000s of connections (each spun off as seperate threads).


it's possible in PHP - but you'll unlikely want to do it as seperate
processes, even as threads (besides, PHP doesn't have threads?)

Check out  http://php.net/stream_select and
http://netevil.org/node.php?uuid=427d6d12-c107-9816-7428-27d6d128f5e5

With stream_select and the other stream handling software, there are
some guys writing a mail server in PHP. I've got a script opening a
dozen outbound connections to an external website to push it data
myself, and that saves a lot of time rather than waiting for a
connection to come back from fopen/fsockopen

Alister

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



[PHP] GD text proc via php OK for local strings, but NOT for SESSION-passed strings. why?

2006-04-28 Thread OpenMacNews
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160


hi all,

php-5.1.2 built from src on OSX 10.4.6.

GD-2.0.33 + libpng-1.2.10 are built/enabled.

GD is working fine ... locally.

in a given php file, this returns an image as expected:

...
$word=blah;
imagefttext($im, ... other params ... , $word);
...
header (Content-type: image/png);
imagepng($im);
...

however, if rather than defining $word locally in the script, i

$_SESSION['test']=blah;

elsewhere, then:

$word=$_SESSION['test']=blah;
imagefttext($im, ... other params ... , $word);
imagepng($im);

i simply get a blank image.  NO error in either the browser or my apache
logs.

a simple test with:

echo $word;

outputs

blah

as expected; i.e, the _SESSION var *is* passed.

QUESTION: what's different about the string passed via SESSION?

thx!

richard

- --

/\
\ /  ASCII Ribbon Campaign
 X   against HTML email, vCards
/ \   micro$oft attachments

[GPG] OpenMacNews at gmail dot com
fingerprint: 50C9 1C46 2F8F DE42 2EDB  D460 95F7 DDBD 3671 08C6
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (Darwin)

iEYEAREDAAYFAkRSjyEACgkQlffdvTZxCMZz/ACgvI60Zm6JfUDnczpOl3gpNLjj
ObMAoLOobf7h7CGuD6dX7Rz2KRV/9vsf
=Znuf
-END PGP SIGNATURE-

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



RE: [PHP] PHP Standard style of writing your code

2006-04-28 Thread Chris W. Parker
Richard Lynch mailto:[EMAIL PROTECTED]
on Monday, April 24, 2006 11:50 PM said:

 So no matter what was actually typed, *I* would see:
 
 function foo ($x) {
   //body
 }
 
 but some heretic who doesn't know any better would see:
 function foo($x)
 {
   //body
 }
 
 Now *THAT* would be a feature worth paying for in an IDE! :-)

Setting aside the fact that you're completely wrong about your preference... ;)

What, in your mind, is the advantage to putting the opening brace on the same 
line as the function call, logic statement, etc.? (Btw, this is a serious 
question!)



Chris.

p.s. Yes I'm still alive. Just haven't been able to work on any web related 
stuff for a long time here are work. :( The downside of being the IT department.

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



Re: [PHP] Multi-threaded port listener

2006-04-28 Thread Edwin Barrios

Hi.

If you want a separate script execution, you can use inetd o xinetd to
listen for you that port.
When inetd got a connection execute your php script, one execution by
connection.

I think that it is more usefull to create your  own responser server with
php using forks !. But using inetd has the advantage that you can use
tcpwrappers.

On 4/28/06, René Fournier [EMAIL PROTECTED] wrote:


Anyone find any good tutorials, code samples, etc. on such a thing?
Basically, I want to write server (in PHP) that listeners on a
particular port, and spins off a thread/process (essentially, execute
a separate script) for each incoming connection. There won't be a lot
of data to process, but there will be many simultaneous connections—
upwards of 1000s of connections (each spun off as seperate threads).

...Rene







[PHP] Possible?

2006-04-28 Thread René Fournier

Simple problem: Many client apps need to send data to a server.

By default each client will open a persistent TCP socket connection  
to a common IP address:port (10.10.10.10:1234) and write to it (which  
the server will save/log, etc.).


My question is, what should be ready to listen at the IP:port? I was  
thinking of writing a PHP command-line socket server that listens at  
that port. But there will be a potentially huge number of clients  
connecting simultaneously (1000s), not transmitting a lot of data per  
se, but a lot of connections... Anyway, instead I thought writing a  
simple PHP script—say, listener.php—that gets executed by the web  
server and enters a socket_read loop until the client terminates the  
connection (set_time_limit(0)).


Does this sound like a good way to do it? This way, Apache handles  
all the connections, and PHP is instantiated each time, but without  
having to fork processes, etc, and without having to do PHP CLI.


Anyway, I've started looking at this, but I'm not quite sure if it's  
even possible. I mean, can something send a request to Apache, and  
continue to write data along that TCP socket? Normally, HTTP requests  
include GET or POST for such data, but this is not a a web browser  
that's opening the connection.


Hope I'm somewhat clear. Just struggling through some options  
here Anyway, thanks in advance for any suggestions.


...Rene





Re: [PHP] strange php url (CORRECTION)

2006-04-28 Thread Kevin Kinsey

Kevin Kinsey wrote:



Pretty good thoughts, there.  Some years ago, Tim Perdue
(of PHPBuilder and SourceForge fame) had a popular
article on Search Engine Friendly URL's (or some such),
in which he described use of the Apache ForceLocal
directive to make a site just One Big Script, parsing
the slashed portions of the query string as variables
(instead of GET, a la ?section=manterm=foo) so that
the browser appears to be accessing documents in subfolders,
but it's really just telling the server to grab a page with certain
values defined in the URI.

It sure looks like a possibility of this or similar magic in
this case.  Of course, I could be way off my tree...


And it appears I was at least *slightly* off my tree.  In looking for 
more info on this, my post (archived in 2 places), was the only 
reference to a ForceLocal directive in Apache that Google could find ;-)


I meant ForceType, and here's how it works in httpd.conf:

VirtualHost *
  ServerName test.foo.com
  DocumentRoot /var/www/data/footest
  ServerAdmin [EMAIL PROTECTED]
  Location /manual
ForceType application/x-httpd-php
  /Location
/VirtualHost

Now, you write manual in PHP, (no file extension), and anything 
directed to manual is parsed by said script.


Since I used the wrong terminology, I may have distracted any *real* 
gurus from recognizing what I was talking about.  Sorry for any confusion.


Kevin Kinsey
--
It's hard to think of you as the end
result of millions of years of evolution.

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



RE: [PHP] PHP Standard style of writing your code

2006-04-28 Thread Robert Cummings
On Fri, 2006-04-28 at 18:18, Chris W. Parker wrote:
 Richard Lynch mailto:[EMAIL PROTECTED]
 on Monday, April 24, 2006 11:50 PM said:
 
  So no matter what was actually typed, *I* would see:
  
  function foo ($x) {
//body
  }
  
  but some heretic who doesn't know any better would see:
  function foo($x)
  {
//body
  }
  
  Now *THAT* would be a feature worth paying for in an IDE! :-)
 
 Setting aside the fact that you're completely wrong about your preference... 
 ;)
 
 What, in your mind, is the advantage to putting the opening brace on the
 same line as the function call, logic statement, etc.? (Btw, this is a
 serious question!)

You know what they say...

Job security through code obscurity!

And no, I don't know who they are :) I'm in the vertically aligned
brace camp. It's just cleaner when the braces line up because you can
pick out the beginning and end of the block easier... doubly so when you
have a long conditional that wraps... KISS baby!

 p.s. Yes I'm still alive. Just haven't been able to work on any web related
 stuff for a long time here are work. :( The downside of being the IT
 department.

Good to see you again! :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Possible?

2006-04-28 Thread René Fournier
Anyway, I've started looking at this, but I'm not quite sure if  
it's even possible. I mean, can something send a request to  
Apache, and continue to write data along that TCP socket?  
Normally, HTTP requests include GET or POST for such data, but  
this is not a a web browser that's opening the connection.
Hope I'm somewhat clear. Just struggling through some options  
here Anyway, thanks in advance for any suggestions.

...Rene


 each client will open a persistent TCP socket connection to a
 common IP address:port (10.10.10.10:1234)

(If you want simultaneous connections, each TCP connection will be  
to a different port.)


Well, not if the client (actually, it's a pre-programmed physical  
device) is set to always open a socket connection to  
10.10.10.10:1234... right?


But rather than write a client and a server application from  
scratch, why not just use HTTP POSTs?


I'm not writing the client, I just need to make a server that can  
accept numerous simultaneous incoming socket connections, and  
maintain them.


Maybe stream_select() as someone suggested? I suppose my question  
would be, can a single PHP socket server script, executed from the  
command-line, maintain 1000s of concurrent connections (there is not  
a lot of data incoming, btw)?


...Rene



Re: [PHP] Possible?

2006-04-28 Thread John Hicks

René Fournier wrote:

Simple problem: Many client apps need to send data to a server.

By default each client will open a persistent TCP socket connection to a 
common IP address:port (10.10.10.10:1234) and write to it (which the 
server will save/log, etc.).


My question is, what should be ready to listen at the IP:port? I was 
thinking of writing a PHP command-line socket server that listens at 
that port. But there will be a potentially huge number of clients 
connecting simultaneously (1000s), not transmitting a lot of data per 
se, but a lot of connections... Anyway, instead I thought writing a 
simple PHP script—say, listener.php—that gets executed by the web server 
and enters a socket_read loop until the client terminates the connection 
(set_time_limit(0)).


Does this sound like a good way to do it? This way, Apache handles all 
the connections, and PHP is instantiated each time, but without having 
to fork processes, etc, and without having to do PHP CLI.


Anyway, I've started looking at this, but I'm not quite sure if it's 
even possible. I mean, can something send a request to Apache, and 
continue to write data along that TCP socket? Normally, HTTP requests 
include GET or POST for such data, but this is not a a web browser 
that's opening the connection.


Hope I'm somewhat clear. Just struggling through some options here 
Anyway, thanks in advance for any suggestions.


...Rene



each client will open a persistent TCP socket connection to a
common IP address:port (10.10.10.10:1234)


(If you want simultaneous connections, each TCP connection will be to a
different port.)

But rather than write a client and a server application from scratch,
why not just use HTTP POSTs?

Keep It Simple, Stewart.

--John

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



Re: [PHP] display_errors off and custom error pages

2006-04-28 Thread chris smith

On 4/29/06, IG [EMAIL PROTECTED] wrote:

I've spent the last couple of hours trying to work this out to no avail.

I have recently moved over to a managed dedi server and no can ask my
host to change my php.ini.

I have found out that the 'display_errors' in the php.ini is set to off
and error file logging is off.

I would like to be able log to file which is easy to do from the ini
file but also to show a custom error page if there is an error on one of
the pages.

I thought I would be able to use a custom error handler such as -

ob_start();
// custom error handler
function e($type, $msg, $file, $line) {
blah blah
ob_end_clean();

// display error page
exit();
}

set_error_handler(e);



But all I get is a blank page. Does having display_errors off mean that
I can't use a custom error handler? I have also tried adding
*set_ini*('*display_errors*','1') but this keeps giving me a blank page.


Sounds like a parse error (using the code above will give you that).

Try it in a htaccess file:

php_flag display_errors 1

(I think).

You can't use ini_set because a parse error breaks the whole script
and it's not executed, so you need to change this value before the
script.

--
Postgresql  php tutorials
http://www.designmagick.com/

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



RE: [PHP] Possible?

2006-04-28 Thread Warren Vail
Have you considered implementing a http service?

http://www.php.net/manual/en/ref.wddx.php

I believe this will relieve you of all the connection management stuff and
use the apache server to handle thread management.  All your clients would
perform something very similar to a post with their information, and each
server thread does it's insert.  If you design your tables with an auto
increment primary key, you should avoid problems with multiple concurrent
inserts coliding on the same table.

I found the following information helpful in evaluating the use of wddx;

http://www.openwddx.org/faq/

Good luck,

Warren Vail

-Original Message-
From: René Fournier [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 4:50 PM
To: PHP-General; John Hicks
Subject: Re: [PHP] Possible?

 Anyway, I've started looking at this, but I'm not quite sure if it's 
 even possible. I mean, can something send a request to Apache, and 
 continue to write data along that TCP socket?
 Normally, HTTP requests include GET or POST for such data, but this 
 is not a a web browser that's opening the connection.
 Hope I'm somewhat clear. Just struggling through some options 
 here Anyway, thanks in advance for any suggestions.
 ...Rene

  each client will open a persistent TCP socket connection to a common 
  IP address:port (10.10.10.10:1234)

 (If you want simultaneous connections, each TCP connection will be to 
 a different port.)

Well, not if the client (actually, it's a pre-programmed physical
device) is set to always open a socket connection to 10.10.10.10:1234...
right?

 But rather than write a client and a server application from scratch, 
 why not just use HTTP POSTs?

I'm not writing the client, I just need to make a server that can accept
numerous simultaneous incoming socket connections, and maintain them.

Maybe stream_select() as someone suggested? I suppose my question would be,
can a single PHP socket server script, executed from the command-line,
maintain 1000s of concurrent connections (there is not a lot of data
incoming, btw)?

...Rene

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



Re: [PHP] RegExp for preg_split()

2006-04-28 Thread John Hicks

Weber Sites LTD wrote:

Hi
 
I'm looking for the RegExp that will split a search string into search

keywords.
while taking   into account.
 

From what I managed to find I can get all of the words into an array but I
would 
like all of the words inside   to be in the same array cell.


You want to use preg_match_all, not preg_split:

$String = 'Medaillons, Listels, custom stuff, more things, entryway, 
accents, showplace';

$MyRegEx = '/[^]+|[^\s,]+/';
preg_match_all($MyRegEx, $String, $Tokens);
echo 'pre';
var_dump($Tokens);

produces:

array(1) {
  [0]=
  array(7) {
[0]=
string(10) Medaillons
[1]=
string(7) Listels
[2]=
string(14) custom stuff
[3]=
string(13) more things
[4]=
string(8) entryway
[5]=
string(7) accents
[6]=
string(9) showplace
  }
}

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



RE: [PHP] we are looking for experienced php programmers full timefreelance...

2006-04-28 Thread Nicolas Verhaeghe

Sumeet wrote:
 we are looking for experienced php/mysql programmers full time 
 freelance...
 
 should be at least 1 year experienced, knowing pear libraries and 
 having
 worked on several projects.
 
 please contact me at [EMAIL PROTECTED]
 
 quote your charges and the time that you will be available. also 
 mention
 msn or yahoo ids. skype id is more welcome.
 

$300 / hr
8 hr minimum per day
available 0800 - 0900EST



You want a Beemer? 

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



Re: [PHP] PHP Standard style of writing your code

2006-04-28 Thread Rafael

IMHO, vertical aligned brackets can be messy when nesting
relatively-small blocks (and seems to me like a lot of wasted space)
A couple of facts of my codding style:
- I tend to always use brakets, so I ignore the fact that single
  lines/actions can be written without brackets,
- I try not to let lines grow larger than about 100 cols (cannot
  be really done with strings and other thingies, and maybe that
  should remain in the old 80 cols, but it's too litle space), and
- I use a 4 space indentation, and that alone suffices for making
  a block stand clear enough

So, in my case, the code would be something like
  function foo( $x ) {
  // body...
  }
  ···
  $a = foo($b);

Chris W. Parker wrote:

So no matter what was actually typed, *I* would see:

function foo ($x) {
 //body
}

but some heretic who doesn't know any better would see:
function foo($x)
{
 //body
}

[···]

Setting aside the fact that you're completely wrong about your
preference... ;)

What, in your mind, is the advantage to putting the opening brace on
the same line as the function call, logic statement, etc.? (Btw, this
is a serious question!)

[···]
P.S.	What, in your mind, is the advantage of replying after quoting the 
original message and not before? :)

--
Atentamente,
J. Rafael Salazar Magaña
Innox - Innovación Inteligente
Tel: +52 (33) 3615 5348 ext. 205 / 01 800 2-SOFTWARE
http://www.innox.com.mx

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



Re: [PHP] Help!

2006-04-28 Thread Martin Alterisio

2006/4/28, Barry [EMAIL PROTECTED]:


Martin Alterisio schrieb:
 2006/4/28, Dave Goodchild [EMAIL PROTECTED]:

 Hi all - I am attempting to solve some maddening behaviour that has me
 totally stumped and before I take a blade to my throat I thought I
would
 pick the brains of the group/hive/gang.

 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 POW!

 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:


 sendSantaMail That's just not a *declarative* way of naming a
function.
Do you know what santa means? No? so how can you tell it's not
declarative.
Santa could be a coded Mailer and that functions uses that specific
Mailer Deamon called santa to send mails.



Yeah you're right, I was thinking the exact same thing a while after I
posted that. Maybe it was a correct name in the context used, but, I still
think Santa is a really misleading name for a mailer, and not to mention
that a mass mailer identifying itself as Santa mailer in the headers is
asking to be send directly to spam. Anyway, I was wrong.


Then, 11 arguments Errr, passing an associative array with the email
 parameters wouldn't have been a cleaner and better option?

He just told he passes 11 arguments, never told how he does that.



Well, if somebody tells you a function has 11 arguments what would you
think?