php-general Digest 28 Jul 2005 08:37:38 -0000 Issue 3592

2005-07-28 Thread php-general-digest-help
php-general Digest 28 Jul 2005 08:37:38 - Issue 3592 Topics (messages 219457 through 219469): Re: snapshot 219457 by: Philip Hallstrom Re: Multipage form redux 219458 by: Jim Moseby define (true/false) 219459 by: Sebastian 219460 by: comex 219468

Re: [PHP] application-wide shared data/object

2005-07-28 Thread Rasmus Lerdorf
This is the sort of thing we call a scalability killer. Loading everything into memory on one machine and then adding locks presumably for writing to this memory means you are limiting any sort of horizontal scalability and you are slowing down the one machine you do have with lock contention.

Re: [PHP] define (true/false)

2005-07-28 Thread Jochem Maas
Sebastian wrote: i never really used constants before so this may sound stupid.. you could use constants and still sound stupid. - that would be 'constantly sounding stupid' ;-) when you define a constant using define() and want to return true/false is this logical: yes, if a little

[PHP] Re: Has anybody used amfphp? (open flash remoting + php)

2005-07-28 Thread Mark Rees
Taksam [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Anybody used OpenAMF+PHP? ( http://www.amfphp.org/ ) It is an open-source Flash Remoting gateway. I already used it with Java and works OK. Just wanted to know if somebody here used it with PHP and would like to know if they

Re: [PHP] Multipage form redux

2005-07-28 Thread Marcus Bointon
On 27 Jul 2005, at 21:22, Jack Jackson wrote: Right. Except I would rather have it working in a session because I specifically do not want to have the form sending $_POST data back and forth to the browser six times for several reasons. SO I'd like to Page1 // User enters first batch of

Re: [PHP] Re: Has anybody used amfphp? (open flash remoting + php)

2005-07-28 Thread Jochem Maas
Mark Rees wrote: Taksam [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Anybody used OpenAMF+PHP? ( http://www.amfphp.org/ ) It is an open-source Flash Remoting gateway. I already used it with Java and works OK. Just wanted to know if somebody here used it with PHP and would like

[PHP] function with argument of type array

2005-07-28 Thread marc serra
Hi, i want to know if it is possible to create a function and declare that one of its arguments is array type. In fact i want to do something like this function test(String $litteral, array $foo){ . } I got an error when i do something like this. Can you help me please? Thx, Marc --

RE: [PHP] safe mode

2005-07-28 Thread Kim Madsen
-Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 26, 2005 6:29 PM I presently require hosting with a company that has their servers in Sweden, and I need a shared hosting account, any recommendations are welcome, the server is for a client. I have

Re: [PHP] function with argument of type array

2005-07-28 Thread André Medeiros
On Thu, 2005-07-28 at 11:08 +0200, marc serra wrote: Hi, i want to know if it is possible to create a function and declare that one of its arguments is array type. In fact i want to do something like this function test(String $litteral, array $foo){ . } I got an error when i

Re: [PHP] define (true/false)

2005-07-28 Thread André Medeiros
On Wed, 2005-07-27 at 17:17 -0400, Sebastian wrote: i never really used constants before so this may sound stupid.. when you define a constant using define() and want to return true/false is this logical: if($bars == 3) { define('BAR', 1); } then: if(BAR) { // bars is

[PHP] Class constants

2005-07-28 Thread Marcus Bointon
I'm not sure if this is a bug or a feature, but it seems you can't use class constants to set default values for class properties. You can, however, use them for default values for method params, e.g.: class foo {} const BAR = 100; private $thing = self::BAR; function wibble($a =

[PHP] FAQ: replace first instance (couldn't find in archive)

2005-07-28 Thread Dotan Cohen
I've seen this discussed before, but no solution seems to have ever been suggested. I'd like to replace the first instance of a substring in a string. So if we were to replace the first 'the' with 'a' in the sentance Then the big bear ate the little cat in the north of the woods. we would have:

RE: [PHP] safe mode

2005-07-28 Thread Kim Madsen
Ahem! -Original Message- From: Kim Madsen [mailto:[EMAIL PROTECTED] Sent: Thursday, July 28, 2005 12:01 PM I would *never* host anything on a server with safe_mode on! s/safe_mode on/safe_mode off/ /Kim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] safe mode

2005-07-28 Thread Ryan A
Hey Kim, I would *never* host anything on a server with safe_mode on! Just 1 day late :-( just bought hosting for a year with b-one.se :-( Whats the main reasons you would never host with safe mode on? and whats this: s/safe_mode on/safe_mode off/ ?? Thanks, Ryan -- PHP General Mailing

Re: [PHP] looking for program/script to diff directories and show dates

2005-07-28 Thread Jason Wong
On Thursday 28 July 2005 01:48, Chris W. Parker wrote: I was just expirementing with the diff command and was wondering if there was anything out there that does the same thing but with a more intuitive interface? The problem I want to avoid is a basic one. Which file did I update last week

Re: [PHP] safe mode

2005-07-28 Thread Bostjan Skufca @ domenca.com
-Original Message- From: Kim Madsen [mailto:[EMAIL PROTECTED] Sent: Thursday, July 28, 2005 12:01 PM I would *never* host anything on a server with safe_mode on! What are your reasons for this decision? regards, Bostjan -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] function with argument of type array

2005-07-28 Thread Marcus Bointon
On 28 Jul 2005, at 12:07, André Medeiros wrote: On Thu, 2005-07-28 at 11:08 +0200, marc serra wrote: Hi, i want to know if it is possible to create a function and declare that one of its arguments is array type. In fact i want to do something like this function test(String $litteral, array

Re: [PHP] preg_match - help please

2005-07-28 Thread Jason Wong
On Thursday 28 July 2005 01:50, André Medeiros wrote: You can have four words to describe a first and last name... you can have other alphabets, like arabian, chinese, etc... inserting accented characters alone would make that a big, nasty regex, let alone predicting ways you can describe

Re: [PHP] function with argument of type array

2005-07-28 Thread André Medeiros
On Thu, 2005-07-28 at 12:45 +0100, Marcus Bointon wrote: On 28 Jul 2005, at 12:07, André Medeiros wrote: On Thu, 2005-07-28 at 11:08 +0200, marc serra wrote: Hi, i want to know if it is possible to create a function and declare that one of its arguments is array type. In fact i want

Re: [PHP] preg_match - help please

2005-07-28 Thread André Medeiros
On Thu, 2005-07-28 at 19:45 +0800, Jason Wong wrote: On Thursday 28 July 2005 01:50, André Medeiros wrote: You can have four words to describe a first and last name... you can have other alphabets, like arabian, chinese, etc... inserting accented characters alone would make that a big,

[PHP] VPS - Any suggestions

2005-07-28 Thread Yves Arsenault
Hello, I was wondering if anyone here has or is currently buying VPS systems. Anyone have any general performance comments, favorite vendors etc Thanks, -- Yves Arsenault This year, or this month, or, more likely, this very day, we have failed to practise ourselves the kind of behaviour

Re: [PHP] Class constants

2005-07-28 Thread Jochem Maas
Marcus Bointon wrote: I'm not sure if this is a bug or a feature, but it seems you can't use class constants to set default values for class properties. You can, however, use them for default values for method params, e.g.: class foo {} ^--- er. const BAR = 100; private

Re: [PHP] Multipage form redux

2005-07-28 Thread Jack Jackson
Somehow my intent has been turned around here and I apologise. I do not want to use *any* client side validation. I only want to do server side validation and server side storage. My intent was to remove the client from as much as possible of this - if I didn't need their information I

Re: [PHP] FAQ: replace first instance (couldn't find in archive)

2005-07-28 Thread Jochem Maas
Dotan, now _I'm_ sending _you_ multiple copies (last one didn't go to the list by mistake!) Dotan Cohen wrote: I've seen this discussed before, but no solution seems to have ever been suggested. I'd like to replace the first instance of a substring in a string. So if we were to replace the

Re: [PHP] define (true/false)

2005-07-28 Thread Jochem Maas
André Medeiros wrote: On Wed, 2005-07-27 at 17:17 -0400, Sebastian wrote: i never really used constants before so this may sound stupid.. when you define a constant using define() and want to return true/false is this logical: if($bars == 3) { define('BAR', 1); } then: if(BAR) { ...

RE: [PHP] define (true/false)

2005-07-28 Thread Jay Blanchard
[snip] if($bars == 3) { define('BAR', 1); } then: if(BAR) { That's an incorrect use for constants. Use variables for that =] WHY? [/snip] Because the constant can be variable in this case. Consider (this is old school, and we all know that I am the definition of old school) the definition

Re: [PHP] define (true/false)

2005-07-28 Thread André Medeiros
On Thu, 2005-07-28 at 14:41 +0200, Jochem Maas wrote: André Medeiros wrote: On Wed, 2005-07-27 at 17:17 -0400, Sebastian wrote: i never really used constants before so this may sound stupid.. when you define a constant using define() and want to return true/false is this logical:

Re: [PHP] Multipage form redux

2005-07-28 Thread André Medeiros
The point of sessions is that when you close your browser, you loose it. I'm affraid that if you want sessions that last two weeks, you'll have to make your own session handler :) but yeah, it's possible, and it beats the crap out of the fill form, store in db, fill form, store in db method. --

Re: [PHP] Multipage form redux

2005-07-28 Thread Mark Rees
Jack Jackson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Somehow my intent has been turned around here and I apologise. I do not want to use *any* client side validation. I only want to do server side validation and server side storage. My intent was to remove the client from

Re: [PHP] define (true/false)

2005-07-28 Thread Vidyut Luther
Exactly, CONSTANTS are ... eternal truths to the program, they shouldn't change, constants should not be changing based on arguments being passed, or other variables. by definition, it's no longer a constant, and a misuse of the define () function. On Jul 28, 2005, at 8:46 AM, Jay

Re: [PHP] Multipage form redux

2005-07-28 Thread Mark Rees
Jack Jackson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Somehow my intent has been turned around here and I apologise. I do not want to use *any* client side validation. I only want to do server side validation and server side storage. My intent was to remove the client from

Re: [PHP] Multipage form redux

2005-07-28 Thread Jack Jackson
The light dawns. Thank you everyone for this explanation, and the help JJ Mark Rees wrote: Jack Jackson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Somehow my intent has been turned around here and I apologise. I do not want to use *any* client side validation. I only want

Re: [PHP] define (true/false)

2005-07-28 Thread John Nichel
Sebastian wrote: i never really used constants before so this may sound stupid.. when you define a constant using define() and want to return true/false is this logical: if($bars == 3) { define('BAR', 1); } then: if(BAR) { // bars is true } or should i need to do an else statement as

Re: [PHP] Multipage form redux

2005-07-28 Thread Mark Rees
Jack Jackson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Somehow my intent has been turned around here and I apologise. I do not want to use *any* client side validation. I only want to do server side validation and server side storage. My intent was to remove the client from

RE: [PHP] Multipage form redux

2005-07-28 Thread Jim Moseby
Somehow my intent has been turned around here and I apologise. I do not want to use *any* client side validation. I only want to do server side validation and server side storage. My intent was to remove the client from as much as possible of this - if I didn't need their

RE: [PHP] Multipage form redux

2005-07-28 Thread Ford, Mike
On 28 July 2005 13:39, Jack Jackson wrote: What I wanted to do was this: p. 1 : I send client page one, they send answers. SUBMIT sends to page 2 script. p 2. Before displaying anything to the client, Page 2 script validates input from page 1. If there are problems, page 2 script

Re: [PHP] Multipage form redux

2005-07-28 Thread Mark Rees
André Medeiros [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The point of sessions is that when you close your browser, you loose it. I'm affraid that if you want sessions that last two weeks, you'll have to make your own session handler :) but yeah, it's possible, and it beats the

[PHP] PDFs are blank in e-mail sent via PHP

2005-07-28 Thread Jay Blanchard
Using the following code; $fileRead = fopen($fileAtt,'rb'); $fileData = fread($fileRead,filesize($fileAtt)); fclose($fileRead); $mimeBoundary = CCALCBoundary; $headers = From:

RE: [PHP] Multipage form redux

2005-07-28 Thread Jim Moseby
André Medeiros [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The point of sessions is that when you close your browser, you loose it. I'm affraid that if you want sessions that last two weeks, you'll have to make your own session handler :) but yeah, it's possible, and it

Re: [PHP] define (true/false)

2005-07-28 Thread John Nichel
Jay Blanchard wrote: [snip] if($bars == 3) { define('BAR', 1); } then: if(BAR) { That's an incorrect use for constants. Use variables for that =] WHY? [/snip] Because the constant can be variable in this case. Consider (this is old school, and we all know that I am the definition of

Re: [PHP] Multipage form redux

2005-07-28 Thread Jack Jackson
Mark Rees wrote: André Medeiros [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The point of sessions is that when you close your browser, you loose it. I'm affraid that if you want sessions that last two weeks, you'll have to make your own session handler :) but yeah, it's

Re: [PHP] define (true/false)

2005-07-28 Thread Jochem Maas
John Nichel wrote: Jay Blanchard wrote: [snip] if($bars == 3) { define('BAR', 1); } then: if(BAR) { That's an incorrect use for constants. Use variables for that =] WHY? [/snip] Because the constant can be variable in this case. Consider (this is old school, and we all know that

Re: [PHP] define (true/false)

2005-07-28 Thread Edward Vermillion
John Nichel wrote: Jay Blanchard wrote: [snip] never want to use a variable to determine a constant because the variable is not likely to be the same (that is why we call them variables) on any iteration. Using constants in expressions is OK, for instance if(BAR == $foo){ ...stuff... }

Re: [PHP] define (true/false)

2005-07-28 Thread John Nichel
Jochem Maas wrote: now that was exactly my reasoning ... but I very much appriciate the input of the more experienced/older/classically-trained (as apposed to my completely -self-taught-not-backed-up-with-any-solid-computer-science-theory-skills) guys out there (hey Jay it's a compliment ;-)

Re: [PHP] Multipage form redux

2005-07-28 Thread Marcus Bointon
On 28 Jul 2005, at 14:13, Mark Rees wrote: Rolling your own session management tool, whilst undoubtedly fun and satisfying, is hardly an appropriate solution to this type of enquiry, which is apparently from someone taking their first steps in web development. Unsurprisingly, this is a

RE: [PHP] PDFs are blank in e-mail sent via PHP - SOLVED

2005-07-28 Thread Jay Blanchard
[snip] Using the following code; $fileRead = fopen($fileAtt,'rb'); $fileData = fread($fileRead,filesize($fileAtt)); fclose($fileRead); [/snip] PHP had been recompiled on the production server and in the course of doing so magic quotes was set to

Re: [PHP] FAQ: replace first instance (couldn't find in archive)

2005-07-28 Thread Dotan Cohen
On 7/28/05, Jochem Maas [EMAIL PROTECTED] wrote: Dotan, now _I'm_ sending _you_ multiple copies (last one didn't go to the list by mistake!) php -r ' echo preg_replace(#the#,a,Then the big bear ate the little cat in the north of the woods.,1), \n; ' Wow! It was those hash signs. They

Re: [PHP] define (true/false)

2005-07-28 Thread Vidyut Luther
On Jul 28, 2005, at 9:41 AM, Edward Vermillion wrote: [snip] I may be misunderstanding you here, but I don't see why you would not want to use a variable to define a constant. I do it from time to time, most common would be in a config document where I'll check if the page is being

RE: [PHP] define (true/false)

2005-07-28 Thread Jay Blanchard
[snip] I may be misunderstanding you here, but I don't see why you would not want to use a variable to define a constant. I do it from time to time, most common would be in a config document where I'll check if the page is being accessed via http or https, and define a constant based on

RE: [PHP] define (true/false)

2005-07-28 Thread Jay Blanchard
[snip] now that was exactly my reasoning ... but I very much appriciate the input of the more experienced/older/classically-trained (as apposed to my completely -self-taught-not-backed-up-with-any-solid-computer-science-theory-skills ) guys out there (hey Jay it's a compliment ;-) Jay's

Re: [PHP] FAQ: replace first instance (couldn't find in archive)

2005-07-28 Thread Jochem Maas
Dotan Cohen wrote: On 7/28/05, Jochem Maas [EMAIL PROTECTED] wrote: Dotan, now _I'm_ sending _you_ multiple copies (last one didn't go to the list by mistake!) php -r ' echo preg_replace(#the#,a,Then the big bear ate the little cat in the north of the woods.,1), \n; ' Wow! It was those

Re: [PHP] FAQ: replace first instance (couldn't find in archive)

2005-07-28 Thread Dotan Cohen
On 7/28/05, Jochem Maas [EMAIL PROTECTED] wrote: the hash signs are regexp delimiters - you don't ness. need to use hash signs, normally I either use # or / . some of the examples here http://nl2.php.net/preg_replace use @ in short read this (like 10 times :-):

[PHP] PHP error on form

2005-07-28 Thread Bruce Gilbert
Hello, I am trying to get a form to work integrating html with PHP. the code I have is: ? $form_block = FORM METHOD=\POST\ ACTION=\$PHP_SELF\ pstrongYour Name:/strong /br INPUT type=\text\ NAME=\senders_name\ SIZE=30/p pstrongpYour E-mail Address:/strong /br INPUT type=\text\

RE: [PHP] PHP error on form

2005-07-28 Thread Jay Blanchard
[snip] Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form_test.php on line 58 [/snip] Send us the first 60 or so lines of the code and we'll see what we can see. I

RE: [PHP] PHP error on form

2005-07-28 Thread Jay Blanchard
[snip] and the error I get is: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form_test.php on line 58 [/snip] I forgot to say that the code you sent does not include 58

RE: [PHP] PHP error on form

2005-07-28 Thread Mike Johnson
From: Bruce Gilbert [mailto:[EMAIL PROTECTED] Hello, I am trying to get a form to work integrating html with PHP. the code I have is: ? $form_block = FORM METHOD=\POST\ ACTION=\$PHP_SELF\ pstrongYour Name:/strong /br INPUT type=\text\ NAME=\senders_name\ SIZE=30/p pstrongpYour

[PHP] php_flag enable_dl

2005-07-28 Thread Justin Mazzi
Can anyone tell me why this adding that to a vhost in apache 1 series does not work? The docs says you can use enable_dl per vhost. -Justin Mazzi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Calendar program like on php.net

2005-07-28 Thread Reuben D. Budiardja
Hello, Anyone knows a simple calendar program that will let people to add event, and then after the event is approved by webmaster / moderator, the event would be added to the calendar ? Just like the calendar for Upcoming Events on www.php.net. What program is that ? I've looked at

[PHP] php://input (multipart support)

2005-07-28 Thread Sonia
Hi Will HTTP_RAW_POST_DATA (php://input) multipart ever be supported? I have asked this question a few times and was told it would not happen until around php 4.3 release. Although I do appreciate the PHP teams added support for all the other (PUT/POST) methods when dealing with the input

Re: [PHP] Calendar program like on php.net

2005-07-28 Thread Rasmus Lerdorf
Reuben D. Budiardja wrote: Hello, Anyone knows a simple calendar program that will let people to add event, and then after the event is approved by webmaster / moderator, the event would be added to the calendar ? Just like the calendar for Upcoming Events on www.php.net. What program is

[PHP] How Can I send mail in php in HTML format?

2005-07-28 Thread Tomás Rodriguez Orta
Hello friends. How Can I send mail from php in HTML format?. I use the mail() function, but I dont know doing.somebody can I help me? Best regards TOMAS - Este correo fue escaneado en busca de virus con el MDaemon

Re: [PHP] install or interference problem

2005-07-28 Thread Fam Ruijters-Verberne
Thanks for the response ... skype was the problem. took it out autostartup restarted XAMPP.no problems anymore -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP error on form

2005-07-28 Thread -k.
--- Bruce Gilbert [EMAIL PROTECTED] wrote: Hello, I am trying to get a form to work integrating html with PHP. I see a couple problems... This line: if ($POST['sender_email'] ==) { Should probably be: if ($_POST['sender_email'] ==) { Note the underscore in $_POST Same

[PHP] does PHP have a configuration setting for linefeed?

2005-07-28 Thread Chris W. Parker
Hi everyone, As you will read below I've got a strange problem happening with some files after being rsync'd from one machine (FC3) to another (RH9). Someone in the RedHat mailing list suggested that maybe the difference was in the configuration files for PHP. I didn't find anything in php.ini

Re: [PHP] How Can I send mail in php in HTML format?

2005-07-28 Thread Philip Hallstrom
How Can I send mail from php in HTML format?. I use the mail() function, but I dont know doing.somebody can I help me? Pear has a package: http://pear.php.net/package/Mail_Mime Here's an example: http://pear.php.net/manual/en/package.mail.mail-mime.example.php -philip -- PHP General

[PHP] Re: PHP error on form

2005-07-28 Thread Sonia
Hi First some of your $_POST array variables are written like $POST['var'], you need to change them to $_POST['var']. Then because you are not using the dot operator in your string variables and you are using a associative array you must enclose the array variable in {$arr['var']} tags! //

Re: [PHP] How Can I send mail in php in HTML format?

2005-07-28 Thread John Nichel
Tomás Rodriguez Orta wrote: Hello friends. How Can I send mail from php in HTML format?. I use the mail() function, but I dont know doing.somebody can I help me? http://www.google.com/search?hl=enq=php+send+html+emailbtnG=Google+Search -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675

[PHP] Re: How Can I send mail in php in HTML format?

2005-07-28 Thread Sonia
Also Richard Heyes has a updated his class to work with PHP 5, you can also get updated version of the PHP 4 class! http://www.phpguru.org/static/htmlMimeMail5.html Sonia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php://input (multipart support)

2005-07-28 Thread Tom Cruickshank
What are you trying to accomplish? Tom On 7/28/05, Sonia [EMAIL PROTECTED] wrote: Hi Will HTTP_RAW_POST_DATA (php://input) multipart ever be supported? I have asked this question a few times and was told it would not happen until around php 4.3 release. Although I do appreciate the

Re: [PHP] application-wide shared data/object

2005-07-28 Thread Aiguo Fei
Thanks your insightful comments. Clearly scalability is a concern for large scale applications. One has to be discreet with it if such a facility is available. For the dictionary example, I feel it definitely can use such a facility and DB approach is much slower; and scalability/load balancing

Re: [PHP] application-wide shared data/object

2005-07-28 Thread Aiguo Fei
In the example I gave, I mean the whole thing is loaded once, then every session can use it. Basically it is like a cache, only it is available cross sessions. Clearly one can use DB to store data to do that, however, (1)there are things that are not suitable to store in a DB; (2)DB is

[PHP] Re: PDFs are blank in e-mail sent via PHP

2005-07-28 Thread Sonia
Hi Without seeing the clients resulting email it is very hard to see what is wrong. It could be line endings or a host of other things. Maintaining RFC 2049 standards is important because even though your server might support one method the client may not support what you are using! RFC 2049

Re: [PHP] application-wide shared data/object

2005-07-28 Thread Justin Mazzi
http://eaccelerator.net/HomeUk Will keep scripts cached in memory etc. Maybe this is along the lines of what you are looking for. Aiguo Fei wrote: Thanks your insightful comments. Clearly scalability is a concern for large scale applications. One has to be discreet with it if such a facility

[PHP] Re: application-wide shared data/object

2005-07-28 Thread Al
Aiguo Fei wrote: In ASP.Net there is the concept of application which is a virtual directory on a Web server. An application can have application-wide shared data/objects, which can be accessed by any script of that application (i.e., scripts under the virtual directory). I have gone through

Re: [PHP] FAQ: replace first instance (couldn't find in archive)

2005-07-28 Thread Al
Dotan Cohen wrote: On 7/28/05, Jochem Maas [EMAIL PROTECTED] wrote: Dotan, now _I'm_ sending _you_ multiple copies (last one didn't go to the list by mistake!) php -r ' echo preg_replace(#the#,a,Then the big bear ate the little cat in the north of the woods.,1), \n; ' Wow! It was those

Re: [PHP] How Can I send mail in php in HTML format?

2005-07-28 Thread André Medeiros
On Thu, 2005-07-28 at 12:30 -0700, Tomás Rodriguez Orta wrote: Hello friends. How Can I send mail from php in HTML format?. I use the mail() function, but I dont know doing.somebody can I help me? Best regards TOMAS

Re: [PHP] application-wide shared data/object

2005-07-28 Thread Rasmus Lerdorf
Aiguo Fei wrote: Thanks your insightful comments. Clearly scalability is a concern for large scale applications. One has to be discreet with it if such a facility is available. For the dictionary example, I feel it definitely can use such a facility and DB approach is much slower; and

[PHP] How to turn on session.trans.sid?

2005-07-28 Thread Brian Dunning
If an ISP does not give you access to php.ini, is there a way to turn on session.use_trans_sid in the code, maybe at the same time you say session_start()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to turn on session.trans.sid?

2005-07-28 Thread John Nichel
Brian Dunning wrote: If an ISP does not give you access to php.ini, is there a way to turn on session.use_trans_sid in the code, maybe at the same time you say session_start()? http://us2.php.net/ini_set -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP

[PHP] New installation of PHP 5.0.4 on Windows 2003 server

2005-07-28 Thread Harris, Walter
Hi to all: I have manually installed PHP 5.0.4 on a Windows 2003 server with IIS 6 installed, using ISAPI. Working with the systems administrator, we set up web site named phptest. This points to the directory c:\php\www where the .php and .html pages are stored. I am wanting to use PHP to

[PHP] Still not holding sessions when cookies off.

2005-07-28 Thread Brian Dunning
I'm starting my sessions like this: ini_set('session.use_trans_sid','1'); session_start(); Works fine when cookies are on. Sessions are not being preserved when cookies are off. Is there something else I need to do? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] How Can I send mail in php in HTML format?

2005-07-28 Thread Programmer
You can use mail() to send html, but you need to set the headers first. I hope this helps. Jeremy Schreckhise $email_addr = [EMAIL PROTECTED]; $email_from = [EMAIL PROTECTED]; $email_subj = About What; // Set Content-type header $headers = 'MIME-Version: 1.0' . \r\n; $headers .=

Re: [PHP] php_flag enable_dl

2005-07-28 Thread Jochem Maas
Justin Mazzi wrote: Can anyone tell me why this adding that to a vhost in apache 1 series does not work? The docs says you can use enable_dl per vhost. kinda guesswork, try one of: php_flag enable_dl 1 php_value enable_dl 1 php_admin_flag enable_dl 1 php_admin_value enable_dl 1 note that,

Re: [PHP] New installation of PHP 5.0.4 on Windows 2003 server

2005-07-28 Thread André Medeiros
Try looking into IIS's error log. There might be something useful there. When, for some reason, this happens in apache, for instance, the error log tells you what went wrong (missing simbol, missing lib, whatever). Good luck! -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] gethostbyname() time issues

2005-07-28 Thread Kristen G. Thorson
The following script: ?php $url_array = array( 'http://www.imakenews.com/progresspsdn/e_rss.aspx', 'http://rssnewsapps.ziffdavis.com/eweekdeveloper.xml', 'http://itpapers.zdnet.com/xml/RSS-239.xml',

[PHP] form reload with php as cgi ?

2005-07-28 Thread Gorm
Hi, I am trying to use a php/mysql based project system (achievo.org), but when I enter data via the forms, I get a reply entry has to be unique even though it has been written to the db. Someone said it might be because I have php as cgi rather than a isapi module and therefore the form

Re: [PHP] gethostbyname() time issues

2005-07-28 Thread Philip Hallstrom
The following script: ?php $url_array = array( 'http://www.imakenews.com/progresspsdn/e_rss.aspx', 'http://rssnewsapps.ziffdavis.com/eweekdeveloper.xml', 'http://itpapers.zdnet.com/xml/RSS-239.xml',

[PHP] Question about exec() call an CLI php script from Apache CGI/filter module PHP

2005-07-28 Thread Liang ZHONG
I call red.php through apache http request, and red.php make exec('./s.php') call, then I got bunch of s.php processes, and system locked me out any task due to no more processes available. Why this would happen? marvin:~/liang.ns2user.info/php less red.php ?php ignore_user_abort(true);

Re: [PHP] application-wide shared data/object

2005-07-28 Thread Evert | Rooftop
Rasmus Lerdorf wrote: Not much documentation is needed: if(!$dict = apc_fetch('dict')) { $dict = function_that_returns_a_dictionary_array_or_object(); apc_store('dict',$dict); } That's all. [snip] -Rasmus Wow, I should have tried harder to make it work.. thnx ! Evert -- PHP

RE: [PHP] Question about exec() call an CLI php script from Apache CGI/filter module PHP

2005-07-28 Thread Liang ZHONG
I forgot to mention that calling from shell directly s.php runs correctly. ~ marvin:~/liang.ns2user.info/php ./s.php This is a PHP-CLI Script!!0123456789 ~ The php configuration of this site is: http://liang.ns2user.info/php/info.php Thank you

Re: [PHP] php_flag enable_dl

2005-07-28 Thread Justin Mazzi
php_admin_value enable_dl 1 does the trick. Thanks! Jochem Maas wrote: Justin Mazzi wrote: Can anyone tell me why this adding that to a vhost in apache 1 series does not work? The docs says you can use enable_dl per vhost. kinda guesswork, try one of: php_flag enable_dl 1 php_value

[PHP] Re: PHP error on form

2005-07-28 Thread Bruce Gilbert
I made the suggestions mentioned by Mike and don't get any error, but the form doesn't work properly. Check it out at http://www.inspired-evolution.com/Contact_Form_test.php the PHP form CODE I now have is: ? $form_block = FORM METHOD=\POST\ ACTION=\$PHP_SELF\ pstrongYour Name:/strong/p INPUT

RE: [PHP] Re: PHP error on form

2005-07-28 Thread Jay Blanchard
[snip] I made the suggestions mentioned by Mike and don't get any error, but the form doesn't work properly. Check it out at http://www.inspired-evolution.com/Contact_Form_test.php [/snip] You never sent the first 60 lines of code or so, and your origianl post doesn't have 58 lines in it. Please

[PHP] Win32 COM help

2005-07-28 Thread awsewell
I am trying to use windows com objects to interact with the windows registry, here is my code: ?php $hostname = .; $keyPath = \\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall; $wshShell = new

[PHP] PHP form not working

2005-07-28 Thread Bruce Gilbert
Here is the entire code on the page. Now I am getting an error again... !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en-US lang=en-US dir=ltr head meta http-equiv=Content-type

Re: [PHP] gethostbyname() time issues

2005-07-28 Thread Kristen G. Thorson
Philip Hallstrom wrote: $diff = number_format(((substr($timeend,0,9)) + (substr($timeend,-10)) - (substr($timestart,0,9)) - (substr($timestart,-10))),4); This just looks wrong to me... at the very least shouldn't it be: (x + x) - (x + x) (x + y) - (w + z) = (x + y) + (-w - z) = x + y -

[PHP] Debugging mail()

2005-07-28 Thread Todd Cary
I have the following code in my script and no errors are created, but I do not get any emails. It works on other servers. Are there some logs I can check to figure out why an email is not being sent/received? Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Debugging mail()

2005-07-28 Thread Todd Cary
Todd Cary wrote: I have the following code in my script and no errors are created, but I do not get any emails. It works on other servers. Are there some logs I can check to figure out why an email is not being sent/received? Todd I think I figured out the problem: the needed port is

Re: [PHP] Debugging mail()

2005-07-28 Thread Philip Hallstrom
I have the following code in my script and no errors are created, but I do not get any emails. It works on other servers. Are there some logs I can check to figure out why an email is not being sent/received? Depends on your setup, but /var/log/maillog in the unix world would be a good

[PHP] Re: Debugging mail()

2005-07-28 Thread Todd Cary
Todd Cary wrote: I have the following code in my script and no errors are created, but I do not get any emails. It works on other servers. Are there some logs I can check to figure out why an email is not being sent/received? Todd Whoops...forgot the code: if (mail([EMAIL PROTECTED],

  1   2   >