[PHP] gzip functions and error

2005-01-22 Thread Dmitry
Hello! How disable error messages when i send incorrect data into gzip* extract functions, such as gzinflate or gzuncompress? For example: function _pack($data) { $data = serialize($data); $data = gzdeflate($data,9); $data = base64_encode($data); $data = urlencode($data); return $data; } #

[PHP] Re: Classes and parents.

2005-01-22 Thread Dmitry
Thanks, but I think that this code more easy. class a { function say() { echo A; } function run() { $this-say(); } } class b { function say() { echo B; } function run() { $a = new a; $a-run(); } } $obj = new b; $obj-run(); -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: PHP.ini setup, config, installation recognition?

2005-01-22 Thread David Robley
On Saturday 22 January 2005 18:08, Joseph E. Maxwell wrote: Hello, I am setting up a program that requires allow_call_time_pass_reference to be enabled. I've set allow_call_time_pass_reference = ON in the /usr/local/etc/php.ini file grep -n allow_call_time_pass_reference

[PHP] Preg_match----------help

2005-01-22 Thread Chandana Bandara
hi , using preg_match , how can i match , _ , - such special characters in a sentence ??? Eg: Strings are like this, 1.Ahgrwgsgd dfjb yuhh dfh ABCD AFGHFDc GHJGKJ -- here i want to match ABCD 2.AFRYRGH vhGHJGB ASD_ASD_DER GHJGJ kjHGKJGK -- here i want to

[PHP] end of array

2005-01-22 Thread Jeffery Fernandez
Hi all, I have a foreach loop on an array and within that loop I need to find if the array has reached the last pointer. I have tried if (next($row)) { } but that advances the pointer. Any tips on finding out if the array pointer has reached the last element ? cheers, Jeffery -- PHP General

Re: [PHP] Preg_match----------help

2005-01-22 Thread RaTT
Hello, This regular expresion should help you on your way $regex = /[A-z_\-]+?/; HTH Jarratt On Sat, 22 Jan 2005 17:03:30 +0600, Chandana Bandara [EMAIL PROTECTED] wrote: hi , using preg_match , how can i match , _ , - such special characters in a sentence ??? Eg: Strings

[PHP] Re: end of array

2005-01-22 Thread Raj Shekhar
Jeffery Fernandez [EMAIL PROTECTED] writes: Hi all, I have a foreach loop on an array and within that loop I need to find if the array has reached the last pointer. I have tried if (next($row)) { } but that advances the pointer. Any tips on finding out if the array pointer has

[PHP] Re: end of array

2005-01-22 Thread M. Sokolewicz
Raj Shekhar wrote: Jeffery Fernandez [EMAIL PROTECTED] writes: Hi all, I have a foreach loop on an array and within that loop I need to find if the array has reached the last pointer. I have tried if (next($row)) { } but that advances the pointer. Any tips on finding out if the array pointer has

[PHP] Re: end of array

2005-01-22 Thread Raj Shekhar
M. Sokolewicz [EMAIL PROTECTED] writes: Raj Shekhar wrote: $n_elts = count($myarray); for ($i=0; $i $n_elts ; $i++) { if ($i = $n_elts -1) ^^^ Use of == required to make it work { echo On last element; break;

Re: [PHP] end of array

2005-01-22 Thread Rasmus Lerdorf
Jeffery Fernandez wrote: Hi all, I have a foreach loop on an array and within that loop I need to find if the array has reached the last pointer. I have tried if (next($row)) { } but that advances the pointer. Any tips on finding out if the array pointer has reached the last element ?

Re: [PHP] Re: Classes and parents.

2005-01-22 Thread Jochem Maas
Dmitry wrote: Thanks, but I think that this code more easy. class a { function say() { echo A; } function run() { $this-say(); } } class b { function say() { echo B; } function run() { $a = new a; $a-run(); for starters b doesn't even extend a and secondly the b::run() method is

Re: [PHP] Re: multiple sessions on same server/domain

2005-01-22 Thread Marek Kilimajer
Richard Lynch wrote: Marek Kilimajer wrote: COKIES, I'm talking about COOKIES. Anytime you talk about cookies or cookie files, you mean session and session files, respectively. These are completely different things, please don't intermingle them. session_set_cookie_params() ^^^ You're

[PHP] Re: end of array

2005-01-22 Thread M. Sokolewicz
Raj Shekhar wrote: M. Sokolewicz [EMAIL PROTECTED] writes: Raj Shekhar wrote: $n_elts = count($myarray); for ($i=0; $i $n_elts ; $i++) { if ($i = $n_elts -1) ^^^ Use of == required to make it work { echo On last element; break;

Re: [PHP] Re: Classes and parents.

2005-01-22 Thread M. Sokolewicz
Jochem Maas wrote: Dmitry wrote: Thanks, but I think that this code more easy. class a { function say() { echo A; } function run() { $this-say(); } } class b { function say() { echo B; } function run() { $a = new a; $a-run(); for starters b doesn't even extend a and secondly the

[PHP] looking for a combination contact application/social networking app

2005-01-22 Thread Bruce Douglas
hi... i'm in need of a glorified contact type application. i want/need to be able to allow users to enter their information into the system, specify what category(s) they belong to, be able to see others, rank others, etc... i also would like to be able to have some form of

[PHP] Loading all clases always

2005-01-22 Thread Ben Edwards (lists)
I have all my classes in a single directory. I was thinking of automatically loading them all at the beginning of every page. The logic being that the class definitions will get cached (I guess PHP uses filesize/date/time) so the overhead would not be that great. Also at any given time they

Re: [PHP] looking for a combination contact application/social networking app

2005-01-22 Thread trobi
Bruce Douglas napsal(a): hi... i'm in need of a glorified contact type application. i want/need to be able to allow users to enter their information into the system, specify what category(s) they belong to, be able to see others, rank others, etc... i also would like to be able to have some form

Re: [PHP] Loading all clases always

2005-01-22 Thread Chris
You may want to look at the PHP 5 __autoload function: http://www.php.net/oop5.autoload I know it's not the answer to your question, but it could be just as good, or better, than what you were looking for. Chris Ben Edwards (lists) wrote: I have all my classes in a single directory. I was

[PHP] Is this even possible?

2005-01-22 Thread Tony Di Croce
Is it even possible to connect to a postgres server (thats running on linux) from a windows CLI php script? I'm seeing a pg_connect() error... FATAL: no pg_hba.conf entry for host 192.168.1.100 Any ideas? -- td -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] end of array

2005-01-22 Thread Jeffery Fernandez
Rasmus Lerdorf wrote: Jeffery Fernandez wrote: Hi all, I have a foreach loop on an array and within that loop I need to find if the array has reached the last pointer. I have tried if (next($row)) { } but that advances the pointer. Any tips on finding out if the array pointer has reached the

Re: [PHP] Is this even possible?

2005-01-22 Thread Jason Wong
On Sunday 23 January 2005 07:20, Tony Di Croce wrote: Is it even possible to connect to a postgres server (thats running on linux) from a windows CLI php script? Yes. I'm seeing a pg_connect() error... FATAL: no pg_hba.conf entry for host 192.168.1.100 Exactly. So put the appropriate entry

[PHP] Why no type hints for built-in types?

2005-01-22 Thread Terje Slettebø
(I've posted this to the PHP newsgroups, as well, but as many here might not read them, I post here, as well. I hope that's not considered overboard, and if so, please let me know) Hi. I'm new here, and sorry if this has been discussed before; I didn't find it searching the PHP groups. (I've

[PHP] Why is access and visibility mixed up in PHP?

2005-01-22 Thread Terje Slettebø
(I've posted this to the PHP newsgroups, as well, but as many here might not read them, I post here, as well. I hope that's not considered overboard, and if so, please let me know) Well, as is customary when you're new to a group, you tend to post quite a bit, :) so here's one more. Some things

[PHP] Why no overloading in PHP5?

2005-01-22 Thread Terje Slettebø
(I've posted this to the PHP newsgroups, as well, but as many here might not read them, I post here, as well. I hope that's not considered overboard, and if so, please let me know) To round off my trilogy of why's about PHP... :) If this subject have been discussed before, I'd appreciate a

Re: [PHP] Why no type hints for built-in types?

2005-01-22 Thread Terje Slettebø
Ahem, in my posts, substitute static typing with explicit/manifest typing (specifying the type of variables/parameters). After all, these are checked at run-time, so a call that's not made won't be checked. Regards, Terje -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] php5 --enable-soap compile error

2005-01-22 Thread Marten Lehmann
Hello, if I'm compiling php5.0.3 with --enable-soap on a redhat enterprise linux 3 system I get an error almost at the end: gcc -Isapi/cgi/ -I/usr/src/redhat/BUILD/php-5.0.3/sapi/cgi/ -DPHP_ATOM_INC -I/usr/src/redhat/BUILD/php-5.0.3/include -I/usr/src/redhat/BUILD/php-5.0.3/main

Re: [PHP] php5 --enable-soap compile error

2005-01-22 Thread Marten Lehmann
Note: the problem seems to start a bit earlier: gcc -Iext/soap/ -I/usr/src/redhat/BUILD/php-5.0.3/ext/soap/ -DPHP_ATOM_INC -I/usr/src/redhat/BUILD/php-5.0.3/include -I/usr/src/redhat/BUILD/php-5.0.3/main -I/usr/src/redhat/BUILD/php-5.0.3 -I/usr/src/redhat/BUILD/php-5.0.3/Zend

Re: [PHP] Why no type hints for built-in types?

2005-01-22 Thread Rasmus Lerdorf
Terje Slettebø wrote: I don't find this answer satisfactory. Yes, PHP has loose/weak typing, but at any one time, a value or a variable has a distinct type. In the example in the quote above, you'd have to ensure that the value you pass is of the right type. Well, like it or not, that is the way

[PHP] Geographical tendancies with RemoteHost

2005-01-22 Thread John Taylor-Johnston
With my counter, I track RemoteHost and IPAddress and save it in a mysql table. One of my colleagues asked me these questions (below). I can track number of hits per month. Is there any OS code anywhere that I might implement to see geographical tendencies? John Is it possible to track this as

[PHP] wiki as php object?

2005-01-22 Thread Kurt Yoder
Hi folks I am creating a php site that will eventually include a wiki. The twist is that visitors to my site will each be able to create their own sections. Each section should have its own wiki, completely independent of all the other wikis. I could of course code up my own wiki from scratch,

[PHP] Re: wiki as php object?

2005-01-22 Thread Matthew Weier O'Phinney
* Kurt Yoder [EMAIL PROTECTED]: I am creating a php site that will eventually include a wiki. The twist is that visitors to my site will each be able to create their own sections. Each section should have its own wiki, completely independent of all the other wikis. I could of course code up

[PHP] Re: Why is access and visibility mixed up in PHP?

2005-01-22 Thread Matthew Weier O'Phinney
* Terje Slettebø [EMAIL PROTECTED]: (I've posted this to the PHP newsgroups, as well, but as many here might not read them, I post here, as well. I hope that's not considered overboard, and if so, please let me know) The newsgroups are simply an NNTP interface to the mailing lists -- use one

Re: [PHP] Loading all clases always

2005-01-22 Thread Matthew Weier O'Phinney
* Chris [EMAIL PROTECTED]: You may want to look at the PHP 5 __autoload function: http://www.php.net/oop5.autoload These are semi-available in PHP4 as well -- look up 'overload' in the function reference. I know it's not the answer to your question, but it could be just as good, or better,

[PHP] Re: Why no type hints for built-in types?

2005-01-22 Thread Matthew Weier O'Phinney
* Terje Slettebø [EMAIL PROTECTED]: In PHP5, you can provide type hints for functions, like this: class Person {...} function f(Person $p) { ... } Since this is optional static typing for objects, why not make the same capability available for all types, built-in types included? I

[PHP] Re: Procedural to OOP

2005-01-22 Thread Matthew Weier O'Phinney
* Mike Smith [EMAIL PROTECTED]: I am rewriting a project, and have decided to use/learn OOP. I am using ADODB to connect to a MS SQL 2000 box. This code works, but I'd like to know if I'm following good form or if I'm totally missing the boat. I'd also like to include things like the

Re: [PHP] Extending a Class

2005-01-22 Thread Matthew Weier O'Phinney
* Phillip S. Baker [EMAIL PROTECTED]: Thank you, This makes allot of sense. However one last question about this. If I access the overrided function from the child class do I access it by. $instanceofchildclass-parent::someMethod(); OR would I still simply just call it

[PHP] Session errors when uploaded to host

2005-01-22 Thread Tim Burgan
Hello, I've developed my site, and tested on a web host (Apache, PHP 4.3.9). Now I've uploaded to a different host (IIS, PHP 4.3.1) where I want to keep it, and I get session error messages like: Warning: session_start() [function.session-start http://www.php.net/function.session-start]:

[PHP] library manger ..

2005-01-22 Thread gowthaman ramasamy
Hi list, can any one suggest a good PHP/mysql based library manager to manage books,magazines, documents, cds etc . I tried libman .. but i am having problem with that . many thanks in advance ... with love gowtham -- PHP General Mailing List (http://www.php.net/) To unsubscribe,