php-general Digest 27 Nov 2004 16:17:31 -0000 Issue 3137

2004-11-27 Thread php-general-digest-help
php-general Digest 27 Nov 2004 16:17:31 - Issue 3137 Topics (messages 202928 through 202953): Re: Go Back Problem 202928 by: StDog just for test 202929 by: StDog Re: Running PHP as CGI 202930 by: Tim Traver Re: How does one get into programming? 202931 by:

Re: [PHP] How does one get into programming?

2004-11-27 Thread Rory Browne
Since this is a PHP list I'm assuming that you want to learn php programming. That being the case, I'd suggest that you first of all go to the PHP website and download the manual. You don't get better docs than the PHP docs, and they are an excellent learning resource for PHP. PHP is a good

Re: [PHP] How does one get into programming?

2004-11-27 Thread Jad Madi
Well said Rory Browne after that I recommend downloading some php scripts and start reading their codes and understanding the programming design style.. On Thu, 25 Nov 2004 15:18:16 +0200, Ewald [EMAIL PROTECTED] wrote: I've been in IT for about 12 years and is looking to change my direction to

Re: [PHP] mysql_connect vs mysql_pconnect

2004-11-27 Thread Jad Madi
http://www.google.com/search?lr=ie=UTF-8oe=UTF-8q=mysql_connect%20vs%20mysql_pconnect On Fri, 26 Nov 2004 19:55:29 +0100, fabien champel [EMAIL PROTECTED] wrote: hello, I do not know when I must use mysql_pconnect instead of the mysql_connect :( what are the real advantages of persistent

Re: [PHP] Reg Jpgraph...

2004-11-27 Thread Marek Kilimajer
Sagar C Nannapaneni wrote: Hi all, I think I shouldnt post this here...but i didnt find proper support at the jpgraph forums. I'm using PHP 4.3.9 with GDK precompiled on apache2 using win2k. When i open any of the jpgraph example files its giving me an error saying IE cannot find the site your

[PHP] Lazy anwsers (WAS: mysql_connect vs mysql_pconnect)

2004-11-27 Thread Bruno B B Magalhães
Hey Guys, I don´t know if anyone agrees with me, but I really dismiss this kind of comment: http://www.google.com/search?q=mysqlie=UTF-8oe=UTF-8 In fact, before I ask anything in this forum, I do search others sources (including google, phpbuilder, phpfreaks, sf.net, ,php.net,...) and I

Re: [PHP] mysql_connect vs mysql_pconnect

2004-11-27 Thread fabien champel
ok, i'm sorry, i was probably too tired. i've search the doc, but didn't found this page : http://www.php.net/manual/en/features.persistent-connections.php will me excuse me ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: automatic responder

2004-11-27 Thread [EMAIL PROTECTED]
Alessandro Rosa wrote: How about coding an automatic responder via PHP ? Anybody ever done that using qmail? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] identifying the country of the people who connect to web site / portal

2004-11-27 Thread [EMAIL PROTECTED]
We would like to identify the country of the people who connect to our website / portal using php. The idea is to provide them directly with the homepage in their language. Is that possible? Has anybody ever doen anything like that using php? We are using php 4.3.x on a Debian server (stable,

[PHP] automatic responder

2004-11-27 Thread Alessandro Rosa
Thank you for all responses about this topic. I would also solve a more practical doubt finally: if I use for example the PHP code 'POP3class', as suggested by Manuel Lemos, it's implicitly meant that it should run periodically on a web-server (for example, under a timer of a given number of

RE: [PHP] identifying the country of the people who connect to web site / portal

2004-11-27 Thread Adrian Portsmouth
Hi, I believe you can detect via the browser settings which language the user is using and then display the correct page depending on this. The PHP.net web site itself does this in some form whether or not by my suggested method I do not know, but it uses some form of detection to direct the user

Re: [PHP] automatic responder

2004-11-27 Thread Marek Kilimajer
Alessandro Rosa wrote: Thank you for all responses about this topic. I would also solve a more practical doubt finally: if I use for example the PHP code 'POP3class', as suggested by Manuel Lemos, it's implicitly meant that it should run periodically on a web-server (for example, under a timer of

[PHP] How to detect the prefered languages of Web-Clients?

2004-11-27 Thread Michelle Konzack
Hello, I was reading the book Programming PHP (O'Reilly) and searching the PHP docs but have not found the answer, how to get the Web-Clients prefered Languages. I was thinking it is in the $_SERVER Variable but nothing. Thanks Michelle -- Linux-User #280138 with the Linux Counter,

Re: [PHP] automatic responder

2004-11-27 Thread Octavian Rasnita
You just need to get the HTTP_ACCEPT_LANGUAGE environment variable and see the order of the prefered languages. After that, you see if you have a translation for the first language, if the site doesn't have it, try for the next language, and so on. Teddy - Original Message - From:

Re: [PHP] How to detect the prefered languages of Web-Clients?

2004-11-27 Thread Marek Kilimajer
Michelle Konzack wrote: Hello, I was reading the book Programming PHP (O'Reilly) and searching the PHP docs but have not found the answer, how to get the Web-Clients prefered Languages. I was thinking it is in the $_SERVER Variable but nothing. Thanks Michelle You were not looking well, or your

RE: [PHP] How to detect the prefered languages of Web-Clients?

2004-11-27 Thread Adrian Portsmouth
Hi Michelle, I believe you can detect it from the $_SERVER['HTTP_ACCEPT_LANGUAGE'] superglobal. There is a good thread on this topic at: http://forums.postnuke.com/index.php?name=PNphpBB2file=viewtopict=32841 Which might be of assistance to you.

[PHP] Re: How to detect the prefered languages of Web-Clients?

2004-11-27 Thread Michelle Konzack
Hello Marek, Am 2004-11-27 14:46:20, schrieb Marek Kilimajer: Michelle Konzack wrote: Hello, I was reading the book Programming PHP (O'Reilly) and searching the PHP docs but have not found the answer, how to get the Web-Clients prefered Languages. I was thinking it is in the $_SERVER

[PHP] Re: How to detect the prefered languages of Web-Clients?

2004-11-27 Thread Michelle Konzack
Hello Adrian, Am 2004-11-27 13:52:30, schrieb Adrian Portsmouth: Hi Michelle, I believe you can detect it from the $_SERVER['HTTP_ACCEPT_LANGUAGE'] superglobal. There is a good thread on this topic at: http://forums.postnuke.com/index.php?name=PNphpBB2file=viewtopict=32841 Curenly I

[PHP] Re: Re: How to detect the prefered languages of Web-Clients?

2004-11-27 Thread Michelle Konzack
Am 2004-11-27 15:27:29, schrieb Marek Kilimajer: Yes, I was using lynx as my main browser for about 2 years at my school :-) (windows machines were always taken). This makes you an Hard-Core Console $USER :-) I use lynx since DOS... Have you tried links? Yes, but not found the right

Re: [PHP] Re: Re: How to detect the prefered languages of Web-Clients?

2004-11-27 Thread Marek Kilimajer
Michelle Konzack wrote: Have you tried links? Yes, but not found the right answer... And then some links in the php.net site are broken... Have tried to download the php_manual_en.html.gz from a French mirror and gotten a Server Parse Error. fr.php.net is working... I meant links browser :-)

Re: [PHP] Re: How to detect the prefered languages of Web-Clients?

2004-11-27 Thread Marek Kilimajer
Michelle Konzack wrote: Hello Marek, Am 2004-11-27 14:46:20, schrieb Marek Kilimajer: Michelle Konzack wrote: Hello, I was reading the book Programming PHP (O'Reilly) and searching the PHP docs but have not found the answer, how to get the Web-Clients prefered Languages. I was thinking it is

Re: [PHP] identifying the country of the people who connect to web site / portal

2004-11-27 Thread Bruno B B Magalhães
Hi, course you can, you should search harder for it, but I will facilitate for you! :o) http://www.phpclasses.org/browse/package/1477.html Best Regards, Bruno B B Magalhães -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: How to detect the prefered languages of Web-Clients?

2004-11-27 Thread Gerhard Meier
On Sat, Nov 27, 2004 at 03:20:45PM +0100, Michelle Konzack wrote: Curenly I can only access the web with 'lynx' and do you have already tried it with ? - It is a nightmare... There is a lynx friendly version of the documentation at http://www.php.net/manual/en/print/index.php /GM

[PHP] Comment Speed

2004-11-27 Thread Bruno B B Magalhães
Does anyone has a solid benchmark about comments speed.. I mean, too many comments will decrease speed of the PHP scripts... I've tried without success using a class, and also a simple micro-time operation... Well, cause the file is evaluated before it is executed, I didn't had success. Any

[PHP] Random number generation and phpBB search IDs

2004-11-27 Thread Gordon Mckeown
Hi, I'm currently experiencing a problem with a phpBB board that appears to be due to the way random number generation works in PHP. I have posted on serveral phpBB boards and have received no answers, so I think I need to understand how PHP is dealing with this in order to resolve it. phpBB

Re: [PHP] Comment Speed

2004-11-27 Thread Marek Kilimajer
Bruno B B Magalhães wrote: Does anyone has a solid benchmark about comments speed.. I mean, too many comments will decrease speed of the PHP scripts... I've tried without success using a class, and also a simple micro-time operation... Well, cause the file is evaluated before it is executed, I

Re: [PHP] Comment Speed

2004-11-27 Thread Robert Cummings
On Sat, 2004-11-27 at 11:13, Bruno B B Magalhães wrote: Does anyone has a solid benchmark about comments speed.. I mean, too many comments will decrease speed of the PHP scripts... I've tried without success using a class, and also a simple micro-time operation... Well, cause the file is

[PHP] Re: Re: Re: How to detect the prefered languages of Web-Clients?

2004-11-27 Thread Michelle Konzack
Am 2004-11-27 16:50:21, schrieb Marek Kilimajer: I meant links browser :-) :-) http://links.sourceforge.net/ [EMAIL PROTECTED]:/~ su root -- apt-get install links-ssl [EMAIL PROTECTED]:/~ links http://www.php.net/ Mayby I should use links :-) TABLE support :-) Thanks and nice evening

Re: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread Gordon Mckeown
Apologies, my mail client was supposed to line-wrap that for me - Hi, I'm currently experiencing a problem with a phpBB board that appears to be due to the way random number generation works in PHP. I have posted on serveral phpBB boards and have received no answers, so I think I need to

Re: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread M. Sokolewicz
Gordon McKeown wrote: Apologies, my mail client was supposed to line-wrap that for me - Hi, I'm currently experiencing a problem with a phpBB board that appears to be due to the way random number generation works in PHP. I have posted on serveral phpBB boards and have received no answers,

RE: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread Thomas S. Crum - AAA Web Solution, Inc.
Use a database query to verify the random number has not been used before. $number_checker = 1; while ($number_checker != 0){ #insert your $random_number code $query = SELECT COUNT(*) AS total FROM some_table WHERE random_number_field = '$random_number'; $result =

Re: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread Gordon Mckeown
Many thanks Thomas and Maciek. I'll try removing mt_srand to start with, and if that doesn't work out I'll put in the uniqueness check. Cheers, Gordon. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHPmysqladmin

2004-11-27 Thread [EMAIL PROTECTED]
Where can you get PHPmysqladmin? I would like to load it on my test server to make updating and entering Mysql data easier. Thanks for your help! Tim

RE: [PHP] PHPmysqladmin

2004-11-27 Thread R. Van Tassel
http://www.phpmyadmin.net/home_page/downloads.php -R. Van Tassel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, November 27, 2004 1:27 PM To: PHP general Subject: [PHP] PHPmysqladmin Where can you get PHPmysqladmin? I would like to load it on my

RE: [PHP] PHPmysqladmin

2004-11-27 Thread Stefan
What about looking for yourself? http://www.google.com/search?hl=enlr=q=phpmyadmin -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 27. November 2004 19:27 An: PHP general Betreff: [PHP] PHPmysqladmin Where can you get PHPmysqladmin?

Re: [PHP] PHPmysqladmin

2004-11-27 Thread Jason Wong
On Sunday 28 November 2004 02:27, [EMAIL PROTECTED] wrote: Where can you get PHPmysqladmin? I would like to load it on my test server to make updating and entering Mysql data easier. I believe it's called phpMyAdmin now. google for it. -- Jason Wong - Gremlins Associates - www.gremlins.biz

[PHP] Bad PHP error

2004-11-27 Thread Octavian Rasnita
Hi all, I have tried the following script: $val = 100; if (is_int($val)) { echo $val; } else { echo $val is not an integer\n; } The answer is: 100 is not an integer. Why does this happen? I use PHP 5. Isn't PHP able to work with values like 10 billion? Do I need to use a

[PHP] Re: Bad PHP error

2004-11-27 Thread M. Sokolewicz
Octavian Rasnita wrote: Hi all, I have tried the following script: $val = 100; if (is_int($val)) { echo $val; } else { echo $val is not an integer\n; } The answer is: 100 is not an integer. Why does this happen? I use PHP 5. Isn't PHP able to work with values like 10 billion? Do I

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Marek Kilimajer
M. Sokolewicz wrote: Octavian Rasnita wrote: Hi all, I have tried the following script: $val = 100; if (is_int($val)) { echo $val; } else { echo $val is not an integer\n; } The answer is: 100 is not an integer. Why does this happen? I use PHP 5. Isn't PHP able to work with values

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Octavian Rasnita
Ok, I understand. But what can I do if I want to print big numbers like 123 billion? (but real numbers, not those written with the E letter in them? Is this possible with PHP or I need to do it with another language? Thank you. Teddy From: M. Sokolewicz [EMAIL PROTECTED] Octavian Rasnita

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread M. Sokolewicz
Marek Kilimajer wrote: This would be for unsigned integers. PHP knows only signed integers, however. So the limit is 2147483648 Good point :) When you're outputting it, PHP will convert it back to a string, using the normal integer representation (which is stored aswell). So that should be

Re: [PHP] fedora core 3 mail() not working from web

2004-11-27 Thread Minuk Choi
Thanks Curt. I decided after a while to chalk this up as incomplete installation of Fedora Core 3, and just removed the Apache-PHP-MySQL RPMs and replaced them with their sources. I compiled them and now everything works! NOTE: Since re-installing those three fixed the problem, there was no

Re: [PHP] fedora core 3 mail() not working from web

2004-11-27 Thread Minuk Choi
The weirdest thing was that there was NO error message. Even though in the php.ini, I set the error reporting to E_ALL, I got no warnings, notices, or failures. I removed the RPMs and compiled the sources and now they work... so I guess the problem was due to a incomplete installation of

[PHP] mysql query with exclude

2004-11-27 Thread Reinhart Viane
Hey all, Hope you all have fun this saturday evening :) I'm sure i'm having fun except i'm kinda stuck... Ok here goes... I have 2 tables, one with the people online (chat_online): session_id activity And a second one where i keep the conversations between people(chat): user1_sessionid

[PHP] get image dimensions

2004-11-27 Thread Dustin Krysak
Hi there - I was wondering if there was a way to get PHP to get the dimensions of an image? I want to be able to have PHP dynamically write the image size (of the IMG tag) so that my pages validate when displaying a dynamic image. Thanks in advance! d -- PHP General Mailing List

FW: [PHP] get image dimensions

2004-11-27 Thread Reinhart Viane
-Original Message- From: Reinhart Viane [mailto:[EMAIL PROTECTED] Sent: zaterdag 27 november 2004 23:24 To: 'Dustin Krysak' Subject: RE: [PHP] get image dimensions $dimensions=getimagesize($image_url); $dimensions[0]=width $dimensions[1]=height Hope this helps -Original

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Octavian Rasnita
Well, that big number is not converted as a string and printed this way, or I am missing something. Here is an example: ?php $var = 1; //Here I have also tried inserting $var = (string) $var; echo $var; ? This prints: 1E+012 and... not 1 as it should. I have first

Re: [PHP] get image dimensions

2004-11-27 Thread John Nichel
Dustin Krysak wrote: Hi there - I was wondering if there was a way to get PHP to get the dimensions of an image? I want to be able to have PHP dynamically write the image size (of the IMG tag) so that my pages validate when displaying a dynamic image. Thanks in advance! d It's all in the

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Marek Kilimajer
Octavian Rasnita wrote: Well, that big number is not converted as a string and printed this way, or I am missing something. Here is an example: ?php $var = 1; //Here I have also tried inserting $var = (string) $var; echo $var; ? This prints: 1E+012 and... not 1 as it

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Octavian Rasnita
Thank you. It seems that finally I will need to divide the numbers with 100, make the calculations that way, and specify that the numbers are in millions, because I can't find any solution with PHP. bcmath functions are not good, because they need a string to work for, and not a number, and

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Marek Kilimajer
Octavian Rasnita wrote: Thank you. It seems that finally I will need to divide the numbers with 100, make the calculations that way, and specify that the numbers are in millions, because I can't find any solution with PHP. Yes, this is also a solution. bcmath functions are not good, because

Re: [PHP] PHPmysqladmin

2004-11-27 Thread [EMAIL PROTECTED]
Thanks for your help! T on 11/27/04 12:31, R. Van Tassel at [EMAIL PROTECTED] wrote: http://www.phpmyadmin.net/home_page/downloads.php -R. Van Tassel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, November 27, 2004 1:27 PM To: PHP general

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread BAO RuiXian
Hello, Octavian Rasnita wrote: ?php $var = 1; //Here I have also tried inserting $var = (string) $var; echo $var; ? This prints: 1E+012 and... not 1 as it should. I tried the above example, and I got what you want, i.e. 1. My environment is Windows 2k, PHP

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread M. Sokolewicz
you might want to try using number_format() to change the format back to integer likeness Bao Ruixian wrote: Hello, Octavian Rasnita wrote: ?php $var = 1; //Here I have also tried inserting $var = (string) $var; echo $var; ? This prints: 1E+012 and... not 1 as it should.

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread BAO RuiXian
Hello, M. Sokolewicz wrote: you might want to try using number_format() to change the format back to integer likeness After I changed to echo number_format($var), I got 1,000,000,000,000:) Well, actually this is not my problem. I just tested this for fun. Best Bao Bao Ruixian wrote: Hello,

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Octavian Rasnita
Hi, I also use Win 2k with PHP 5 in command line mode. It is pretty strange that in an older version of Jaws it works better. Or... could I make some settings to make it work like in your case? Teddy - Original Message - From: BAO RuiXian [EMAIL PROTECTED] To: Octavian Rasnita [EMAIL

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Octavian Rasnita
Oh thanks, I hope I will find a good combination that migh help me finally. Teddy - Original Message - From: BAO RuiXian [EMAIL PROTECTED] To: M. Sokolewicz [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, November 28, 2004 2:23 AM Subject: Re: [PHP] Re: Bad PHP error Hello, M.

Re: [PHP] Comment Speed

2004-11-27 Thread Raditha Dissanayake
Bruno B B Magalhães wrote: Does anyone has a solid benchmark about comments speed.. I mean, too many comments will decrease speed of the PHP scripts... I've tried without success using a class, and also a simple micro-time operation... Well, cause the file is evaluated before it is executed, I

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread BAO RuiXian
Hello, Octavian Rasnita wrote: Hi, I also use Win 2k with PHP 5 in command line mode. This is the result I got when run from the command line: C:\Program Files\Apache Group\Apache2\htdocs\php Content-type: text/html X-Powered-By: PHP/4.3.3 1,000,000,000,000 C:\Program Files\Apache

Re: [PHP] mysql query with exclude

2004-11-27 Thread Ligaya Turmelle
Sounds like you need a join. Maybe something like: select * from chat c1, chat_online c2 where UNIX_TIMESTAMP(c2.activity)=$limit_time and c2.session_id = $thisuser and ((c1.user1_sessionid = $thisuser) or c1.user2_sessionid = $thisuser));

Re: [PHP] Getting static member for a class which name is stored in a variable

2004-11-27 Thread Jake Press
Simas Toleikis wrote: Jake Press wrote: Hi Francisco, Your not alone, a number of other users have enountered this bug. string get_class ( object obj ) Its not a bug... You are getting class name as a string for output purposes etc.. Doing something like TestClass::some_static is ofcourse illegal