php-general Digest 20 Mar 2005 22:12:42 -0000 Issue 3349

2005-03-20 Thread php-general-digest-help
php-general Digest 20 Mar 2005 22:12:42 - Issue 3349 Topics (messages 211130 through 211152): Re: Session IDs - How are they generated? 211130 by: zini10 211133 by: Yannick Warnier Re: Ensure only one instance of a script is running 211131 by: zini10 Re: class and

Re: [PHP] send email sample

2005-03-20 Thread Burhan Khalid
John Taylor-Johnston wrote: Burhan Khalid wrote: Can you give me a send email sample? RTFM : http://www.php.net/manual/en/function.mail.php Burhan, That's awfully polite. RTFM. How are people supposed to get started? Take that attitude back over to the Perl newsgroup. One of the joys

[PHP] Re: Session IDs - How are they generated?

2005-03-20 Thread zini10
Im Pretty sure it's using Uniqid , its the simplest solution possible , about the second question, php doesnot mind if he is being run from apahce,iis or command line. Dont count on my answers coz im not really sure. Yannick Warnier [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi

[PHP] Re: Ensure only one instance of a script is running

2005-03-20 Thread zini10
a more reliable solution: Write a lock file and update timestamp each minute or so ,(at varous places around the script) then in order to check if the script is already runninh, check the timestamp. Jeremiah Fisher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Test for a lock file

Re: [PHP] class and global

2005-03-20 Thread Mister Jack
Ok, I've tried with a dummy class : class dummy { var $yank; Function dummy() { $this-yank = test dummy; } } and the problem is exactly the same. i've done print_r($dummy); is works ok outside the function, but inside print_r($dummy) doesn't

Re: [PHP] Re: Session IDs - How are they generated?

2005-03-20 Thread Yannick Warnier
Le dimanche 20 mars 2005 13:02 +0200, zini10 a crit : Im Pretty sure it's using Uniqid , its the simplest solution possible , about the second question, php doesnot mind if he is being run from apahce,iis or command line. Dont count on my answers coz im not really sure. Thank you. The ID

[PHP] http authentication with safe mode enabled?!

2005-03-20 Thread Roman Stckl-Schmidt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi to you all. I've been pulling my hair out over this issue and I really hope YOU can help me. A part of the website that I'm having the problems with should be password protected (nothing much, just to have a slight notion of it not being publicly

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] detecting a leading hyphen from post data

2005-03-20 Thread Larry Brown
I know this is pretty petty, but it is a sunday and I'm missing this for some reason... I'm trying to detect a leading hyphen in an element of an array. I've been using strpos to find strings and if getting 1 as the result, I know it was at the beginning of the string. However, -, \-, nor /^-/

[PHP] pache_request_headers() does not return HTTP Authorization headers

2005-03-20 Thread LacaK
if safe_mode=on so there is no possibilty to validate HTTP Digest Authorization ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: [suspicious - maybe spam] detecting a leading hyphen from post data

2005-03-20 Thread LacaK
try use : if (strpos($string,-)==0) //first char is index 0 not 1 ! or if (strpos($string,-)!==false) //find anywhere in string -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: detecting a leading hyphen from post data

2005-03-20 Thread LacaK
sorry correct is : if (strpos($string,-)===0) //3*= exact match, first char is index 0 not 1 ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] apache_request_headers() does not return HTTP Authorization headers

2005-03-20 Thread LacaK
if safe_mode=on so there is no possibilty to validate HTTP Digest Authorization ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: http authentication with safe mode enabled?!

2005-03-20 Thread LacaK
Hello Roman, yes if safe_mode=on then Authorization header is hidden from phpinfo() and apache_request_headers(), but variables $_SERVER[PHP_AUTH_USER] and PHP_AUTH_PW are set , when Basic authorization is used ! (it works in my configuration of Apache and PHP) Problem may be in Apache . When

Re: [PHP] Memory exhausted message wrong

2005-03-20 Thread LacaK
Only try -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: execute methods dynamically

2005-03-20 Thread Rainer Hahnekamp
Sorry my fault. It's working of course. Am Sun, 20 Mar 2005 18:47:20 +0100 schrieb Rainer Hahnekamp: Hello everybody, I want to write a method in version 4 that executes a method of an object. As parameter the classname and the methodname is passed: function executeMethod($classname,

[PHP] execute methods dynamically

2005-03-20 Thread Rainer Hahnekamp
Hello everybody, I want to write a method in version 4 that executes a method of an object. As parameter the classname and the methodname is passed: function executeMethod($classname, $methodname) { $object = new $classname(); $object-$methodname(); } This does not work. What am

[PHP] mod_ssl + php4-curl interaction problem ... ?

2005-03-20 Thread Marc G. Fournier
Just upgraded curl on our FreeBSD servers to curl-7.13.1_1, and now whenever I try and enable both curl.so in extensions.php *and* mod_ssl, the apache server crashes ... disable one or the other fixes the issue ... I've rebuilt php4-curl itself, as well as the apache, and nothing seems to

[PHP] carriage returns using error_log?

2005-03-20 Thread Kurt Yoder
Is there any way to tell error_log to keep the newline characters? I am outputting error messages to the error log so I can look at detailed status information at the time of the error. However, if I put \n in the error message, it is treated literally by error_log and I see \n in the log

[PHP] Authorization header is missing from apache_request_headers() array

2005-03-20 Thread LacaK
Hello, When I try to use HTTP Digest Authorization using code like : Header( HTTP/1.0 401 Unauthorized); Header( WWW-Authenticate: Digest realm=\www.myrealm.com\, opaque=\opaque\, nonce=\nonce\, stale=\false\, qop=\auth\); browser returns in HTTP request Authorization header like this one :

[PHP] Re: http authentication with safe mode enabled?!

2005-03-20 Thread Roman Stckl-Schmidt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 LacaK wrote on 20.03.2005 19:13: | Hello Roman, | yes if safe_mode=on then | Authorization header is hidden from phpinfo() and apache_request_headers(), | | but variables $_SERVER[PHP_AUTH_USER] and PHP_AUTH_PW | are set , when Basic authorization is

[PHP] Re: is_a() against instanceof

2005-03-20 Thread Christian Stadler
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jason Barnett schrieb: Nice suggestion! But I wonder... would it perhaps be better to use the operator instead of the AND operator? That way in case you are trying to do an assignment PHP won't bother to check instanceof if the class_exists()

Re: [PHP] carriage returns using error_log?

2005-03-20 Thread Chris Shiflett
Kurt Yoder wrote: Is there any way to tell error_log to keep the newline characters? I am outputting error messages to the error log so I can look at detailed status information at the time of the error. However, if I put \n in the error message, it is treated literally by error_log and I see \n

Re: [PHP] mod_ssl + php4-curl interaction problem ... ?

2005-03-20 Thread Marc G. Fournier
As a follow up to this, I just installed curl 7.12.3_2, to see if going back a version would fix the problem, and it does ... apache with curl enabled now works again beside SSL ... Not sure where the bug is, but the newer version of curl appears to have a problem with php4-curl ... On Sun,

[PHP] see anything wrong (xhtml validator)

2005-03-20 Thread Sebastian
it seems the xhtml validator is throwing an error with: -- Line 530, column 12: value of attribute id invalid: 1 cannot start a name div id= 1 79 style=display: none; -- Here is the code:

[PHP] php-not-executing-in-html-file-help

2005-03-20 Thread vijayaraj nagarajan
hi friends i am struggling to solve this problem for the past one week...kindly help me.. my apache runs perfectly... this code gives a perfect output in the browser... file name: hi.html htmlbody hihihi /body/html but this code doesnot give any output in the browser... file name: hi.html

Re: [PHP] php-not-executing-in-html-file-help

2005-03-20 Thread Ian Firla
You need to tell apache to run html files through the php interpreter: ie. AddType application/x-httpd-php .php .php3 .html then restart apache Ian On Sun, 2005-03-20 at 14:12 -0800, vijayaraj nagarajan wrote: hi friends i am struggling to solve this problem for the past one week...kindly

Re: [PHP] php-not-executing-in-html-file-help

2005-03-20 Thread Stephen Johnson
You need to setup your apache server to accept and parse .html files as PHP. Add this line or modify it to look like this in your httpd.conf file. AddType application/x-httpd-php .php .html .shtml HTH ?php /* Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com [EMAIL PROTECTED]

[PHP] Regex

2005-03-20 Thread Colin Ross
I'm trying to compress down a php-powered javascript file. In the file i have php run a bunch of loops and foreaches to build huge nested arrays for use in the javascript. Since this will be an often loaded page with ALOT of backend processing, I've decided to compress the file as much as I can

Re: [PHP] see anything wrong (xhtml validator)

2005-03-20 Thread Chris Shiflett
Sebastian wrote: it seems the xhtml validator is throwing an error with: -- Line 530, column 12: value of attribute id invalid: 1 cannot start a name div id=179 style=display: none; -- Do you

Re: [PHP] php-not-executing-in-html-file-help

2005-03-20 Thread Chris Shiflett
vijayaraj nagarajan wrote: but this code doesnot give any output in the browser... file name: hi.html htmlbody ?php echo hihihi; ? /body/html but, the same file with the php code in it...could be executed in the command line, using php... where i am getting the expected output... i tested to c if

Re: [PHP] Re: is_a() against instanceof

2005-03-20 Thread Marek Kilimajer
Jason Barnett wrote: Christian Stadler wrote: Eli schrieb: - ($cls instanceof ClassName) *requires* from ClassName to be declared, and generates a fatal error when ClassName is not declared. How about if (class_exists('ClassName') AND $cls instanceof ClassName) { ... } Regards, Christian

Re: [PHP] Help with dates

2005-03-20 Thread Kevin
Dear Jochem and all the others who have offered help, Thank you all for your assistance! Thanks to all of you I have been able to reach the next step in the design process! Thanks ever so much! Most sincerely, Kevin Jochem Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Kevin

Re: [PHP] php-not-executing-in-html-file-help-----its working----thanks

2005-03-20 Thread vijayaraj nagarajan
hi ian, chris , stephan and others its working..now... i dont know how come...but its working... thank you somuch... vijay --- Ian Firla [EMAIL PROTECTED] wrote: You need to tell apache to run html files through the php interpreter: ie. AddType application/x-httpd-php .php .php3

Re: [PHP] php-not-executing-in-html-file-help-----its working----thanks

2005-03-20 Thread Forest Liu
Two ways to resolve it: 1,simplest, rename your file as xxx.php, in order to let php interpreter to process the script. 2, as just now others saying, add file type 'html' to the list which interpreter would process. On Sun, 20 Mar 2005 17:43:52 -0800 (PST), vijayaraj nagarajan [EMAIL PROTECTED]

[PHP] multiple words search query advise

2005-03-20 Thread Ryan A
Hi, We have an a auction like site, now we have to add a search feature to the site, the searching will be done for 2 fields: subject and description (ad_sub, ad_text). Since i have never done this before, I would appreciate some advise on how to do it. I was thinking of getting the search

Re: [PHP] carriage returns using error_log?

2005-03-20 Thread Kurt Yoder
On Mar 20, 2005, at 4:15 PM, Chris Shiflett wrote: Kurt Yoder wrote: Is there any way to tell error_log to keep the newline characters? I am outputting error messages to the error log so I can look at detailed status information at the time of the error. However, if I put \n in the error

Re: [PHP] carriage returns using error_log?

2005-03-20 Thread Forest Liu
I prefer purpose it's the design concept in PHP error log. If I would design a system containing error msg displaying. I would also just simplly ignore the carriage returns character which the programer passes to my system, in order to keep graceful in sight. On Sun, 20 Mar 2005 21:50:09 -0500,

Re: [PHP] carriage returns using error_log?

2005-03-20 Thread Chris Shiflett
Kurt Yoder wrote: Heh... no, I was already using double quotes. I also tried using actual carriage returns in the string, that didn't work either. Is error_log simply incapable of obeying carriage returns within the error string? No, I've used error_log() plenty, and I've never had a problem. Can

[PHP] Re: http authentication with safe mode enabled?!

2005-03-20 Thread LacaK
Yes, documentation says : If safe mode is enabled, the uid of the script is added to the realm part of the WWW-Authenticate header. and second : The HTTP Authentication hooks in PHP are only available when it is running as an Apache module and is hence not available in the CGI version and also :

[PHP] php.ini file

2005-03-20 Thread Ruel Cima
hi, i'm experimenting with php on mandrake 10 and i'm not sure about a few things. first, where should the php.ini file go? i mean in which folder. next, i need to upload files to a database and i dont know what folder to specify as the temp folder under the file uploads section in the php.ini

RE: [PHP] php.ini file

2005-03-20 Thread Kim Madsen
-Original Message- From: Ruel Cima [mailto:[EMAIL PROTECTED] Sent: Monday, March 21, 2005 9:12 AM i'm experimenting with php on mandrake 10 and i'm not sure about a few things. first, where should the php.ini file go? If You compile PHP thereĀ“s a parameter to use:

[PHP] Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] detecting a leading hyphen from post data

2005-03-20 Thread Burhan Khalid
Larry Brown wrote: I know this is pretty petty, but it is a sunday and I'm missing this for some reason... I'm trying to detect a leading hyphen in an element of an array. I've been using strpos to find strings and if getting 1 as the result, I know it was at the beginning of the string.

RE: [PHP] fopen

2005-03-20 Thread Kim Madsen
-Original Message- From: John Taylor-Johnston [mailto:[EMAIL PROTECTED] Sent: Saturday, March 19, 2005 7:03 AM To: php-general@lists.php.net Subject: [PHP] fopen What can I add to get more info from the die? Do I have to specify a pathname in $defaultfile? Start by _removing_ @ to

Re: [PHP] see anything wrong (xhtml validator)

2005-03-20 Thread Burhan Khalid
Sebastian wrote: it seems the xhtml validator is throwing an error with: -- Line 530, column 12: value of attribute id invalid: 1 cannot start a name div id= 1 79 style=display: none; -- From :

Re: [PHP] php.ini file

2005-03-20 Thread Burhan Khalid
Ruel Cima wrote: hi, i'm experimenting with php on mandrake 10 and i'm not sure about a few things. first, where should the php.ini file go? Check the output of phpinfo(); to see where it is expecting the file to be. i mean in which folder. next, i need to upload files to a database and i dont