Re: [PHP] Re: taking a one off payment

2006-12-06 Thread Lester Caine

Mark R. Cervarich wrote:

http://checkout.google.com -- Google's answer to PayPal.
Best part is, they are taking NO FEES from now through 12/31/2007.
So you can use them to receive credit card payments for just over a year 
for FREE.


At 2% + $20 per transaction they needed to do something to get take-up


I've used it, and once account was setup, I was paid within 2-3 days.

Best part is, you can, from inside the webpage, click "Send Invoice" and 
it will ask you for an email addy, and a description of what you are 
billing 'em for.  You don't have to create a full shopping cart system!!!


I'm assuming that this is US only?
An international alternative to Paypal would be nice if only to ensure 
that rates are kept competitive.


--
Lester Caine - G8HFL
-
L.S.Caine Electronic Services - http://home.lsces.co.uk
Model Engineers Digital Workshop - 
http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/

Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

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



[PHP] Re: [PHP-DEV] Making a method called "list" or other "language constructs" names.

2006-12-06 Thread Richard Lynch
If you want to write a new parser, or even just submit a patch to
"fix" this, you'll probably figure out why you can't use "list" as a
method name in your class...

Or you'll actually submit a useful patch. :-)

Either way, the problem will be solved, eh?
:-) :-) :-)

On Wed, December 6, 2006 12:22 am, Urbanose wrote:
>
> Yes, list() is a reservred word, but not instance->list(), nor
> className::list(), nor $string = 'This is a list()';, etc. It makes
> no sense.
>
>
> Le 5 déc. 06 à 19:24, Richard Lynch a écrit :
>
>>
>>
>> list is a reserved word.
>>
>> Don't do that.
>>
>> On Mon, December 4, 2006 8:22 am, Urbanose wrote:
>>> Hello there :]
>>>
>>> I wanted to build a method called "list". The problem is that once
>>> I
>>> do that, I get a
>>> "PHP Parse error:  syntax error, unexpected T_LIST, expecting
>>> T_STRING"
>>> error, because it's a "language construct".
>>>
>>> Here's the code that leads me to this error :
>>>
>>> >> class Foo {
>>> function __construct () {
>>>
>>> }
>>> function list () {
>>> echo "Hello";
>>> }
>>> }
>>> $bar = new Foo ();
>>> $bar->list();
>>> ?>
>>>
>>> So I made it working with a "__call" magic method, like this :
>>>
>>> >> class Foo {
>>> function __construct () {
>>>
>>> }
>>> function __call ($name, $arguments) {
>>> echo "Hello";
>>> }
>>> }
>>> $bar = new Foo ();
>>> $bar->list();
>>> ?>
>>>
>>> And it works. So there's my question : why can't we make methods
>>> with
>>> the same name as those used by "language constructs" ? I don't see
>>> the point. Even less if you can make it work with the __call magic
>>> method.
>>>
>>> Does someone have an explanation ? Is there a way to make this
>>> possible for future versions of PHP, so that the classes namespace
>>> is
>>> really independent ?
>>>
>>> Don't tell me to use another name. Writting code like :
>>> $books->list('all');
>>> or :
>>> class Books extends Controller {
>>> function list () {
>>> # Instructions to list all books
>>> }
>>> }
>>> makes things so much easier to read and self explanatory than
>>> putting, for example, a "_" in front of it (_list).
>>>
>>> Thanks :]
>>>
>>>  Urbanose
>>>
>>> --
>>> PHP Internals - PHP Runtime Development Mailing List
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>
>>
>> --
>> Some people have a "gift" link here.
>> Know what I want?
>> I want you to buy a CD from some starving artist.
>> http://cdbaby.com/browse/from/lynch
>> Yeah, I get a buck. So?
>>
>
>  Urbanose
>
>
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Fatal error: Call to a member function on a non-object

2006-12-06 Thread Ryan Creaser


XeRnOuS ThE wrote:


First, if a fatal error is occurring on line 24, why is it executing 
line 24 successfully and returning data?
Second, if there’s a fatal error on line 24, why is line 25 still 
processed?




Maybe because you're running it twice? Line 41 with the $this->Auth( ... 
seems to be running the constructor again, it might be failing there?


- rjc

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



Re: [PHP] PHP Installation question

2006-12-06 Thread Chris

Beauford wrote:

I have zlib-1.2.1.1-i486-1. Whether that is zlib-devel or zlib-dev I have no
idea, and not sure how to find out.


Zlib is different to zlib-dev/zlib-devel.

The zlib package only contains the binaries and man pages.

The zlib-devel package contains the header files (zlib.h for example) 
you need for compiling against it.


--
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] PHP Installation question

2006-12-06 Thread Beauford
I have zlib-1.2.1.1-i486-1. Whether that is zlib-devel or zlib-dev I have no
idea, and not sure how to find out.

Sort of figured out the MySQL problem, but now I get an error when I run
'make'. This is not a biggie, but the other problem I need to get resolved.

Thanks

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: December 6, 2006 7:35 PM
To: Beauford
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP Installation question

Beauford wrote:
> Hi,
> 
> I am trying to install vBulletin and keep getting this error: Fatal error:
> Call to undefined function: gzinflate().
> 
> The only thing I can find on this is that zlib needs to be configured 
> with PHP at compile time. So I reinstalled PHP using the following:
> 
> ./configure --with-mysql --with-apache=../apache_1.3.36 --with-zlib 
> --with-gd make make install
> 
> The above finishes with no error.
> 
> I rebooted, but still get same error, and zlib or gd doesn't show up 
> in my phpinfo output. zlib is installed, and from my understanding gd 
> is included with PHP, all the other libraries for gd are also 
> installed. So what am I doing wrong?

Check if you have zlib-devel or zlib-dev package installed. You need this to
be able to compile support into other applications.

No idea how you do this on slackware.

Also try specifying the path to zlib:

--with-zlib=/usr for example.

> Also, how do I find out where something is installed? i.e. zlib. If I 
> do a search on it I get hundreds of hits...

No idea about slackware. Do a search or ask a slackware list/forum.

> Last. In the above ./configure line I get a message from PHP saying I 
> am using the built in version of MySQL - if I point it to the actual 
> MySQL source directory I get the following error.
> 
> configure: error: Cannot find libmysqlclient library under 
> ../mysql-5.0.22

Install the mysql-dev/devel &/or mysql-client packages most likely.

Or point it to the right directory. You need to point it to the base of the
mysql package. Eg if mysql is installed in /usr/local/mysql (so binaries are
under /usr/local/mysql/bin & libs are in
/usr/local/mysql/lib) then

--with-mysql=/usr/local/mysql

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

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

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



[PHP] Fatal error: Call to a member function on a non-object

2006-12-06 Thread XeRnOuS ThE
I am working on a set of PHP framework so to speak, designed to create 
module based community & content management based scripts. I just started 
updating the authentication handlers, which are all PHP 4 classes, and 
reworking a long list of changes. The new version i am coding is near 
completely incompatible with the old version hence it is extremely hard for 
me to compare the new to the old for these errors.


The problem here is PHP is returning the error "Fatal error: Call to a 
member function on a non-object in 
/home/thenubs/public_html/nauth7b/classes/Auth.class.php on line 24"


Out of this I have two questions which are
First, if a fatal error is occurring on line 24, why is it executing line 24 
successfully and returning data?
And second, if there’s a fatal error on line 24, why is line 25 still 
processed?


If anyone sees an alternative way to do what I am doing that might work 
better to solve the script errors then I am more than welcome to it as well 
seeing how my goal is just to get the script to run right. It seems like 
this might just be an error in PHP anyways, but I haven’t found anything on 
the net about similar occurrences yet.


The explanation and all of the code that you should need in order to see 
what’s going in is below.


The output of the entire page is:

SELECT userid, username, password FROM users WHERE username='XeRnOuS' 
Resource id #15
stdClass Object ( [userid] => 1 [username] => XeRnOuS [password] => 
$1$684gXdqL$MwtGhJGa7WkEbQoXe/474. ) 55


Fatal error: Call to a member function on a non-object in 
/home/thenubs/public_html/nauth7b/classes/Auth.class.php on line 24


Finally here is the code for the first part of the Auth class that i am 
working on.



   //set realtive variables for the sql, err, and perms classes 
into the current class for easy access.

   $this->sql = &$sql;
   $this->err = &$err;
   $this->perms = &$perms;
   $this->config = &$GLOBALS['config'];

   $userdat = $sql->fetch_object($sql->query("SELECT userid, 
username, password FROM users WHERE username='XeRnOuS'"));

   echo '';print_r($userdat);  echo '55';

   $this->authSID = session_id();
   $this->userIP = $_SERVER['REMOTE_ADDR'];


   if(!is_object($this->sql)) echo '$sql IS NOT VALID 
OBJECT';
   if(!method_exists($this->sql, 'query')) echo 'QUERY IS 
NOT A VALID METHOD';
   //destroy timed-out login sessions. Standard users will stay 
logged for 1 hour before  session is destroyed
   $time = time() - 60 * 60; #60 minutes * 60 seconds per 
minute = 1 hour ago.


   //if user is logged into the website, update it in 
$this->loggedIN for quick access for class
   //also change $this->userperms from guest permissions to 
$this->userID's specific permissions.
   if($_SESSION['loggedIN'] === true && 
!is_null($_SESSION['userID']))

   {
   //check to see if user's session is still active in 
sql.auth_sessions
   if($this->Auth($_SESSION['userID'], session_id(), 
$_SESSION['userIP']))

   {
   $this->userID = $_SESSION['userID'];
   $this->userperms = 
$this->perms->getUserPerms($this->userID);


   //check to see if sql.auth_sessions.flogout 
is set, force user logout if is
   //otherwise update 
sql.auth_sessions.lastaccess to current unix time stamp


   $userdat = 
$this->sql->fetch_object($this->sql->query("SELECT flogout FROM 
auth_sessions WHERE userID=\"$this->userID\" AND authSID=\"$this->authSID\" 
AND userIP=\"$this->userIP\""));

   if($userdat->flogout === 1)
   {
   $this->Logout();
   }
   else
   {
   $this->sql->query("UPDATE 
auth_sessions SET lastaccess=\"".time()."\" WHERE userID=\"$this->userID\" 
AND authSID=\"$this->authSID\" AND userIP=\"$this->userIP\"");

   }
   }
   else
   {
   //users session has timed out, unset session 
information, for auth, set userperms to guest permissions

   $_SESSION['loggedIN'] = false;
   $_SESSION['userID'] = null;
   $this->userperms = $perms->getGuestPerms();
   }


   }
   else
   {
   //set user permissions file to guest permissions
   $this->userperms = $this->perms->getGuestPerms();
   }
   return true;

Re: [PHP] How to not be abused by mail form injectors?

2006-12-06 Thread Jochem Maas
bruce wrote:
> and what's the issue/problem with an out of office reply?

n*1000 people on this list don't care to recieve it.
basic list etiquette.

> 
> 
> -Original Message-
> From: Curt Zirzow [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 06, 2006 5:12 PM
> To: [EMAIL PROTECTED]
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] How to not be abused by mail form injectors?
> 
> 
> On 12/6/06, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
>> I will be out of the office until Monday 11th December. If you have any
> urgent enquiries, please direct them to Craig Mead on 1300 651 593 or
> [EMAIL PROTECTED]
> 
> how stupid people are, i hope mr fielding never needs help from me
> cause he has now been plopped into my spam box.
> 
> 
> Curt.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP] How to not be abused by mail form injectors?

2006-12-06 Thread bruce
and what's the issue/problem with an out of office reply?


-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 06, 2006 5:12 PM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] How to not be abused by mail form injectors?


On 12/6/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I will be out of the office until Monday 11th December. If you have any
urgent enquiries, please direct them to Craig Mead on 1300 651 593 or
[EMAIL PROTECTED]

how stupid people are, i hope mr fielding never needs help from me
cause he has now been plopped into my spam box.


Curt.

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

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



[PHP] Re: Newsgroup connect time has become very long

2006-12-06 Thread Chuck Anderson

Al wrote:
Anyone having problems connecting the last few days? Or, is there something 
wrong on my end. All other sites are working just fine.


Thanks.
  


Same here. The group has become nearly unusable. I've been ignoring it 
for days as most of the time I get a timeout - from Thunderbird - 
connecting to news.php.net.


--
*
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
*

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



[PHP] Re: Newsgroup connect time has become very long

2006-12-06 Thread Chuck Anderson

Al wrote:
Anyone having problems connecting the last few days? Or, is there something 
wrong on my end. All other sites are working just fine.


Thanks.
  


Same here. The group has become nearly unusable. I've been ignoring it 
for days as most of the time I get a timeout - from Thunderbird - 
connecting to news.php.net.


--
*
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
*

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



Re: [PHP] How to not be abused by mail form injectors?

2006-12-06 Thread Dotan Cohen

On 07/12/06, Curt Zirzow <[EMAIL PROTECTED]> wrote:

On 12/6/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I will be out of the office until Monday 11th December. If you have any 
urgent enquiries, please direct them to Craig Mead on 1300 651 593 or [EMAIL 
PROTECTED]

how stupid people are, i hope mr fielding never needs help from me
cause he has now been plopped into my spam box.



You obviously don't remember Peter Whalley.

http://what-is-what.com/what_is/spam.html

Dotan Cohen
http://lyricslist.com

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



Re: [PHP] How to not be abused by mail form injectors?

2006-12-06 Thread Curt Zirzow

On 12/6/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:

I will be out of the office until Monday 11th December. If you have any urgent 
enquiries, please direct them to Craig Mead on 1300 651 593 or [EMAIL PROTECTED]


how stupid people are, i hope mr fielding never needs help from me
cause he has now been plopped into my spam box.


Curt.

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



Re: [PHP] PHP Installation question

2006-12-06 Thread Chris

Beauford wrote:
Hi, 


I am trying to install vBulletin and keep getting this error: Fatal error:
Call to undefined function: gzinflate().

The only thing I can find on this is that zlib needs to be configured with
PHP at compile time. So I reinstalled PHP using the following:

./configure --with-mysql --with-apache=../apache_1.3.36 --with-zlib
--with-gd
make
make install

The above finishes with no error.

I rebooted, but still get same error, and zlib or gd doesn't show up in my
phpinfo output. zlib is installed, and from my understanding gd is included
with PHP, all the other libraries for gd are also installed. So what am I
doing wrong?


Check if you have zlib-devel or zlib-dev package installed. You need 
this to be able to compile support into other applications.


No idea how you do this on slackware.

Also try specifying the path to zlib:

--with-zlib=/usr for example.


Also, how do I find out where something is installed? i.e. zlib. If I do a
search on it I get hundreds of hits...


No idea about slackware. Do a search or ask a slackware list/forum.


Last. In the above ./configure line I get a message from PHP saying I am
using the built in version of MySQL - if I point it to the actual MySQL
source directory I get the following error.

configure: error: Cannot find libmysqlclient library under ../mysql-5.0.22


Install the mysql-dev/devel &/or mysql-client packages most likely.

Or point it to the right directory. You need to point it to the base of 
the mysql package. Eg if mysql is installed in /usr/local/mysql (so 
binaries are under /usr/local/mysql/bin & libs are in 
/usr/local/mysql/lib) then


--with-mysql=/usr/local/mysql

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

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



[PHP] Re: taking a one off payment

2006-12-06 Thread Mark R. Cervarich

http://checkout.google.com -- Google's answer to PayPal.
Best part is, they are taking NO FEES from now through 12/31/2007.
So you can use them to receive credit card payments for just over a 
year for FREE.


I've used it, and once account was setup, I was paid within 2-3 days.

Best part is, you can, from inside the webpage, click "Send Invoice" 
and it will ask you for an email addy, and a description of what you 
are billing 'em for.  You don't have to create a full shopping cart 
system!!!


mark


On Mon, 20 Nov 2006, Richard Lynch wrote:


On Thu, November 16, 2006 6:23 am, Jochem Maas wrote:
> Ross wrote:
>> Hi,
>>
>> What is the best way to take a one off payent (non-paypal).
>
> cash in a stable currency ;-)

Gold and Diamonds may also be worth considering. :-)

Sorry.

Now for some real suggestions:

If you really really do mean a one-off payment, Paypal may be the
simplest answer...

If you mean many one-off payments, any of the shopping carts should work.

You could also consider a MONEY ORDER or REGISTERED CHECK.

>>  I have used
>> oscommece but never attempted a one payment like a subscription
>> charge.

H.

Now it sounds like you want a recurring charge.

I dunno about oscommerce, but you should be able to set up a recurring
charge with the back-end just by flipping a button somewhere -- The
bank then hands you a "token" sort of deal which lets you cancel the
subscription payments, but not do much more with it, so you needn't
store the CC# to maintain state.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Mark R. Cervarich
Shelfspace.com

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



Re: [PHP] How to not be abused by mail form injectors?

2006-12-06 Thread Curt Zirzow

On 12/6/06, Peter Lauri <[EMAIL PROTECTED]> wrote:

Hi,



Are there any general protection methods to minimize the risk of robots
using your mailing forms as spam senders?



Yes, validate and escape data properly, the most important thing you
want to protect is anything that goes into the $headers or
$additional_headers.

in the headers field, you want to be sure that the values dont inject
others so if you'd do something like:

$my_cc = preg_replace('/(\r?\n)', '$1  ', $_POST['CC']);
$headers = ''Cc: $my_cc\r\n"

$my_header = preg_replace('/(\r?\n)', '$1  ', $POST['MyHeader']);
$headers = ''MyHeader: $my_header\r\n"

Which should protect any injection of headers.

I would never even consider any user input being put into $additional_headers.


Curt.

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



[PHP] PHP Installation question

2006-12-06 Thread Beauford
Hi, 

I am trying to install vBulletin and keep getting this error: Fatal error:
Call to undefined function: gzinflate().

The only thing I can find on this is that zlib needs to be configured with
PHP at compile time. So I reinstalled PHP using the following:

./configure --with-mysql --with-apache=../apache_1.3.36 --with-zlib
--with-gd
make
make install

The above finishes with no error.

I rebooted, but still get same error, and zlib or gd doesn't show up in my
phpinfo output. zlib is installed, and from my understanding gd is included
with PHP, all the other libraries for gd are also installed. So what am I
doing wrong?

Also, how do I find out where something is installed? i.e. zlib. If I do a
search on it I get hundreds of hits...

Last. In the above ./configure line I get a message from PHP saying I am
using the built in version of MySQL - if I point it to the actual MySQL
source directory I get the following error.

configure: error: Cannot find libmysqlclient library under ../mysql-5.0.22

Any help is appreciated.

I am using Slacware 10, PHP 4.4.4, MySQL5.0, and Apache 1.3.36

Thanks

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



RE: [PHP] How to not be abused by mail form injectors?

2006-12-06 Thread Peter Lauri
Except the check for \n and \r? I mean any class that you think is good
doing this? Is PHP Mailer doing any check of its variables?

/Peter

-Original Message-
From: Peter Lauri [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 06, 2006 11:10 PM
To: php-general@lists.php.net
Subject: [PHP] How to not be abused by mail form injectors?

Hi,

 

Are there any general protection methods to minimize the risk of robots
using your mailing forms as spam senders?

 

/Peter

 

 

 

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



Re: [PHP] Ensuring that variable contains a number

2006-12-06 Thread Dotan Cohen

On 06/12/06, Ray Hauge <[EMAIL PROTECTED]> wrote:

I think that will only check for a digit value of some kind.  It's not
going to check that $input is positive or if it is an integer.  For
instance, it could be a negative float value as long as $input is
interpreted as a float and not a string. The period would throw it off
it it's a string.  I'd have to test, but anyway you could do something
like this:



That should work.  There might be a bug in there, but I'll leave that up
to people to test it ;)

--
Ray Hauge
Application Development Lead
American Student Loan Services
www.americanstudentloan.com

-Original Message-
From: Brad Fuller [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 06, 2006 2:20 PM
To: 'php php'
Subject: RE: [PHP] Ensuring that variable contains a number

> How can I ensure that a variable contains a postive integer number?
> I'm currently using this code:
>
> $number=(1-$number);
> $number=(1-$number);
> if ( $number<1 ) { $number=1; }
>
> But I'm sure that there is a better way. What would that be?


this will check that $input is a positive integer.

if(preg_match("/^\d+$/", $input)) {
// OK
} else {
// NOT OK
}


Thanks. As the 'number' is used in a for loop, it actually is alright
if it is a float. I just added a check that the number is indeed >=1,
otherwise I set it to 1. Good enough for this project, anyway... :)

Dotan Cohen

http://what-is-what.com/what_is/ajax.html
http://english-lyrics.com/

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



[PHP] Re: Newsgroup connect time has become very long

2006-12-06 Thread Jonesy
On Wed, 06 Dec 2006 10:49:52 +, Colin Guthrie wrote:
> Al wrote:
>> Anyone having problems connecting the last few days? Or, is there
>> something wrong on my end. Al other sites are working just fine.
>
> Newsgroup? I presume you are using Gmane (as I am).

I can't determine by the OP's headers how he is reading the ng, but I am 
reading gmane.comp.php.general from the news.gmane.org server using 
slrn.  (I'll have to double check _my_ headers after posting -- lots of 
noise in those headers) 

It _may_ be a little less snappy' than in the past (but then, my 
broadband service (sic) provider is on and off snafu here.)
I would _not_ call it slow.

Similar results with about 8 other Gmane ng's I read.

> Seems fine for me.

I'm happy.  I don't see a problem.

Jonesy
-- 
  Marvin L Jones| jonz  | W3DHJ  | linux
   38.24N  104.55W  |  @ config.com | Jonesy |  OS/2
*** Killfiling google posts: 

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



RE: [PHP] Ensuring that variable contains a number

2006-12-06 Thread Ray Hauge
I think that will only check for a digit value of some kind.  It's not
going to check that $input is positive or if it is an integer.  For
instance, it could be a negative float value as long as $input is
interpreted as a float and not a string. The period would throw it off
it it's a string.  I'd have to test, but anyway you could do something
like this:



That should work.  There might be a bug in there, but I'll leave that up
to people to test it ;)

--
Ray Hauge
Application Development Lead
American Student Loan Services
www.americanstudentloan.com

-Original Message-
From: Brad Fuller [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 06, 2006 2:20 PM
To: 'php php'
Subject: RE: [PHP] Ensuring that variable contains a number

> How can I ensure that a variable contains a postive integer number?
> I'm currently using this code:
> 
> $number=(1-$number);
> $number=(1-$number);
> if ( $number<1 ) { $number=1; }
> 
> But I'm sure that there is a better way. What would that be?


this will check that $input is a positive integer.

if(preg_match("/^\d+$/", $input)) {
// OK
} else {
// NOT OK
}

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

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



RE: [PHP] Ensuring that variable contains a number

2006-12-06 Thread Brad Fuller
> How can I ensure that a variable contains a postive integer number?
> I'm currently using this code:
> 
> $number=(1-$number);
> $number=(1-$number);
> if ( $number<1 ) { $number=1; }
> 
> But I'm sure that there is a better way. What would that be?


this will check that $input is a positive integer.

if(preg_match("/^\d+$/", $input)) {
// OK
} else {
// NOT OK
}

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



Re: [PHP] Ensuring that variable contains a number

2006-12-06 Thread Dotan Cohen

On 06/12/06, Melanie Maddix <[EMAIL PROTECTED]> wrote:

[snip]
How can I ensure that a variable contains a postive integer number?
[/snip]

Hi Dotan,

Check the php manual for is_int() and is_numeric().



Thanks, Melanie. I completely forget- I already knew about those
functions! That's what happens when one scripts in a language
with 3000+ built-in functions... :)

Dotan Cohen

http://lyricslist.com/
http://what-is-what.com/what_is/bios.html

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



[PHP] Ensuring that variable contains a number

2006-12-06 Thread Dotan Cohen

How can I ensure that a variable contains a postive integer number?
I'm currently using this code:

$number=(1-$number);
$number=(1-$number);
if ( $number<1 ) { $number=1; }

But I'm sure that there is a better way. What would that be?

Dotan Cohen

http://what-is-what.com/what_is/internet.html
http://song-lirics.com/

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



Re: [PHP] PHP Accelerator

2006-12-06 Thread Robert Cummings
On Wed, 2006-12-06 at 11:30 -0800, Tim Traver wrote:
> Hi,
> 
> I've been happily using the Free PHP Accelerator for years now, and I 
> recently updated to php 4.4, and I get the following error :
> 
> the ionCube PHP Accelerator requires Zend Engine API version 20021010.
> The Zend Engine API version 20050606 which is installed, is newer.
> Contact Nick Lindridge at http://www.php-accelerator.co.uk for a later 
> version of the ionCube PHP Accelerator.
> 
> but when I go to that site, nothing has been updated for several years now.
> 
> Is this product still available in the same form??? or has it been 
> replaced ???

It's dead. Alternatives such as Eaccelerator and APC exist.

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



[PHP] PHP Accelerator

2006-12-06 Thread Tim Traver

Hi,

I've been happily using the Free PHP Accelerator for years now, and I 
recently updated to php 4.4, and I get the following error :


the ionCube PHP Accelerator requires Zend Engine API version 20021010.
The Zend Engine API version 20050606 which is installed, is newer.
Contact Nick Lindridge at http://www.php-accelerator.co.uk for a later 
version of the ionCube PHP Accelerator.


but when I go to that site, nothing has been updated for several years now.

Is this product still available in the same form??? or has it been 
replaced ???


Thanks,

Tim.

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



Re: [PHP] Byte order Mark (BOM, UTF-8, Header)

2006-12-06 Thread Jon Anderson

Bernhard Zwischenbrugger wrote:.

My Question:

Is PHP UTF-8 ready?
Is there an other reason to stick on iso-8859-1 or ascii beside the BOM?
Is it a PHP bug, or is it a bug of the editor software?
My opinion is that it is basically a code problem. You have data before 
the "supposed to know that you didn't intend to ouput a BOM? It could be an 
intentional thing, e.g. output of a UTF-8 text file:


In your case, it is an unwanted side-effect. The answer, I believe, 
should be to educate your student about the BOM and recommend the use of 
an editor that is a little smarter about UTF-8 output. When I use 
Windows (which is rarely), I use Notepad++, which gives you the option 
to save files as UTF-8 with or without the BOM.


jon

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



[PHP] Byte order Mark (BOM, UTF-8, Header)

2006-12-06 Thread Bernhard Zwischenbrugger
The Problem:

If I edit a php file with Microsoft Notepad and save with UTF-8 encoding
there is a problem with headers.

example:
";
?>

PHP tells me, that the header is already set, because of the (invisible)
BOM http://de.wikipedia.org/wiki/Byte_Order_Mark

I teach php and 50% of my students have this problems if they use UTF-8
encoding (depends on editor).

My Question:

Is PHP UTF-8 ready?
Is there an other reason to stick on iso-8859-1 or ascii beside the BOM?
Is it a PHP bug, or is it a bug of the editor software?
 
thanks

Bernhard

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



[PHP] Re: PHP5 Inheritance/method override problem

2006-12-06 Thread Richard Morris

Edward Kay wrote:

Hi Richard,

This is very strange. I can certainly reproduce the problem. Putting a
var_dump($this) in ClassA's save method shows that PHP sees $this as an
instance of ClassB - when it should be of ClassA.

what *you* think it should be and what php's developers decided
it should be
about 3+ years ago obviously differ.

if you have an instance of ClassB it is exactly that - refering to $this
in the parent class definition won't magically make the class of
the instance change.

$this is plain this and not something else.


Yes, you are indeed correct.

I was thinking that as B extends A, A wouldn't know anything about B thus
$this in A would refer to A. I can now see that my logic was flawed here.
Thanks for pointing it out Jochem!

Richard, replacing your

  if ($this->exists($value))

with

  if (self::exists($value))

will call A's exists method, as you require. As Brad pointed out however,
your defintion of B overrides A's exists method. If you need both, then you
should rename the method in class B.

Edward



Using the self::exists(...) call instead of $this->exists(...) worked 
perfectly.  It threw me for a loop to see ClassA call a method in ClassB 
even though ClassA has no reference to ClassB at design time.  It is 
probably why in other languages like C++ they use the virtual keyword to 
identify this behaviour.


Can self::method(...)/self::$variable replace 
$this->method(...)/$this->variable in all uses or are there cases where 
you would need to use $this instead of self?


In another post Roman said that all non-private method are virtual in 
PHP.  If this is the case, I am assuming that the PHP architects would 
want developers to use self:: in classes that could be subclassed with 
method names that are the same as the parent(s)?


Thanks all for the help.

--
Richard Morris
HDD Broker, Inc.

Toll-Free: +1 866 960-3331
International: +1 250 474-6022
  Fax: +1 250 474-6099
   E-Mail: [EMAIL PROTECTED]
 Web Site: www.hddbroker.com

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



[PHP] Re: Newsgroup connect time has become very long

2006-12-06 Thread Jo�o C�ndido de Souza Neto
I´m using outtlook express 6 as well and i´m facing the same trouble.

""Chris"" <[EMAIL PROTECTED]> escreveu na mensagem 
news:[EMAIL PROTECTED]
> I'm having terrible response times for connecting to the news server, 
> getting new headers and downloading messages.
>
> Can take minutes to do one task or times out.
>
> I'm using Outlook Express 6.
>
>
> "Al" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
>> Anyone having problems connecting the last few days? Or, is there 
>> something wrong on my end. Al other sites are working just fine.
>>
>> Thanks. 

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



Re: [PHP] PHP Grammar

2006-12-06 Thread Satyam

http://phpcompiler.org/

- Original Message - 
From: "yo plop" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, December 06, 2006 5:59 PM
Subject: [PHP] PHP Grammar



Hello

I have been asked to do a compiler from PHP5 to C code using Lex and Yacc

I don't think i can find it already done and open source, but if i could 
get
the PHP grammar (in Lex/Yacc would be awesome) it would be a great help 
for

me, as the one i begin to write is full of conflicts.

Does anyone have a clue or hint ?

Thanks a lot folks !
Fred



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



RE: [PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Edward Kay
> > Hi Richard,
> >
> > This is very strange. I can certainly reproduce the problem. Putting a
> > var_dump($this) in ClassA's save method shows that PHP sees $this as an
> > instance of ClassB - when it should be of ClassA.
>
> what *you* think it should be and what php's developers decided
> it should be
> about 3+ years ago obviously differ.
>
> if you have an instance of ClassB it is exactly that - refering to $this
> in the parent class definition won't magically make the class of
> the instance change.
>
> $this is plain this and not something else.

Yes, you are indeed correct.

I was thinking that as B extends A, A wouldn't know anything about B thus
$this in A would refer to A. I can now see that my logic was flawed here.
Thanks for pointing it out Jochem!

Richard, replacing your

  if ($this->exists($value))

with

  if (self::exists($value))

will call A's exists method, as you require. As Brad pointed out however,
your defintion of B overrides A's exists method. If you need both, then you
should rename the method in class B.

Edward

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



[PHP] PHP Grammar

2006-12-06 Thread yo plop

Hello

I have been asked to do a compiler from PHP5 to C code using Lex and Yacc

I don't think i can find it already done and open source, but if i could get
the PHP grammar (in Lex/Yacc would be awesome) it would be a great help for
me, as the one i begin to write is full of conflicts.

Does anyone have a clue or hint ?

Thanks a lot folks !
Fred


RE: [PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Brad Fuller
> -Original Message-
> From: Richard Morris [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 06, 2006 10:22 AM
> To: php-general@lists.php.net
> Subject: [PHP] PHP5 Inheritance/method override problem
> 
> Hi,
> 
> I came across this problem and I was wondering if someone might be able
> to explain to my why it is happening.  I put together a short example to
>   illustrate the problem that I am having.
> 
> Basically I have one class that performs a certain task.  I then have a
> second class which extends the first class and performs some tasks in
> addition to the first class.  Even though ClassA should know nothing
> about ClassB since ClassA is the parent, ClassA actually calls ClassB's
> exist method when it should be calling it's own.
>
> I know that description is really wordy and probably confusing which is
> why I provided below the example code that illustrates the problem.
> 
> Doesn't this break the idea of inheritance?  I can get it to work if I
> change ClassB::exists to some other name such as ClassB::exists2.
> 
> If anyone can enlighten me as to why this problem is occurring or
> suggest a fix I would really appreciate it.  Thank you.
> 
> 
> 
> expected output
> ---
> ClassB - save
> ClassA - save
> ClassA - exists
> ClassA - update
> 
> 
> 
> actual output
> -
> ClassB - save
> ClassA - save
> 
> 
> Warning:  Missing argument 2 for ClassB::exists(), called in
> /website/overridetest.php on line 6 and defined in
> /website/overridetest.php on line 33
> 
> ClassB - exists
> ClassA - update
> 
> 
> 
> overridetest.php
> 
> class ClassA {
>  public function save($value) {
>echo "ClassA - save\n";
> 
>if ($this->exists($value))
>  $this->update($value);
>else
>  $this->insert($value);
>  }
> 
>  protected function insert($value) {
>echo "ClassA - insert\n";
>  }
> 
>  protected function update($value) {
>echo "ClassA - update\n";
>  }
> 
>  public function exists($value) {
>echo "ClassA - exists\n";
>return true;
>  }
>}
> 
>class ClassB extends ClassA {
>  public function save($value, $classAValue) {
>echo "ClassB - save\n";
>  parent::save($classAValue);
>  // do some additional work...
>  }
> 
>  public function exists($value, $classAValue) {
>  // does a different search than ClassA
>echo "ClassB - exists\n";
>  return true;
>  }
>}
> 
>$c = new ClassB();
>$c->save('test', 'test2');
> ?>
> 
> --
> Richard Morris
> HDD Broker, Inc.
> 
>  Toll-Free: +1 866 960-3331
> International: +1 250 474-6022
>Fax: +1 250 474-6099
> E-Mail: [EMAIL PROTECTED]
>   Web Site: www.hddbroker.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

Here you have defined $c as a ClassB object.
ClassB has all the functions and variables of ClassA, plus those of ClassB.
If you define a function in ClassB which has the same name as a function in
ClassA, it will override it.

"$this" refers to the ClassB object (even inside the ClassA function), since
you defined $c as a ClassB object.  Therefore, the function exists() will be
the ClassB function.

I would suggest you rename the ClassB exists() function in order to do what
you want to do.

Here is a good example to play with that will help you understand
inheritance a bit better.

showInfo();
print "";
$myInstanceC = new c();
$myInstanceC->showInfo();

/*
output:
I am class b, my parent is a
I am class c, my parent is b
*/
?> 

Good luck and I hope that helps :)

-B

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



Re: [PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Jochem Maas
Edward Kay wrote:
> Hi Richard,
> 
> This is very strange. I can certainly reproduce the problem. Putting a
> var_dump($this) in ClassA's save method shows that PHP sees $this as an
> instance of ClassB - when it should be of ClassA.

what *you* think it should be and what php's developers decided it should be
about 3+ years ago obviously differ.

if you have an instance of ClassB it is exactly that - refering to $this
in the parent class definition won't magically make the class of the instance 
change.

$this is plain this and not something else.

here is a code snippet to chew on - hope it gives you a lightbulb moment:


class A {
function test()  { self::test2(); }
function test2() { echo "TEST: ",__CLASS__,"\n"; }
}
class B extends A {
function test2() { echo "TEST: ",__CLASS__,"\n"; }
}

$b = new B; $b->test(); $b->test2();


> 
> I'm afraid it's stumped me too! Does anyone else have any thoughts?

RTM - especially the php5 OO section(s)

> 
> Edward
> 
> 
>> Hi,
>>
>> I came across this problem and I was wondering if someone might be able
>> to explain to my why it is happening.  I put together a short example to
>>   illustrate the problem that I am having.
>>
>> Basically I have one class that performs a certain task.  I then have a
>> second class which extends the first class and performs some tasks in
>> addition to the first class.  Even though ClassA should know nothing
>> about ClassB since ClassA is the parent, ClassA actually calls ClassB's
>> exist method when it should be calling it's own.
>>
>> I know that description is really wordy and probably confusing which is
>> why I provided below the example code that illustrates the problem.
>>
>> Doesn't this break the idea of inheritance?  I can get it to work if I
>> change ClassB::exists to some other name such as ClassB::exists2.
>>
>> If anyone can enlighten me as to why this problem is occurring or
>> suggest a fix I would really appreciate it.  Thank you.
>>
>>
>>
>> expected output
>> ---
>> ClassB - save
>> ClassA - save
>> ClassA - exists
>> ClassA - update
>>
>>
>>
>> actual output
>> -
>> ClassB - save
>> ClassA - save
>>
>>
>> Warning:  Missing argument 2 for ClassB::exists(), called in
>> /website/overridetest.php on line 6 and defined in
>> /website/overridetest.php on line 33
>>
>> ClassB - exists
>> ClassA - update
>>
>>
>>
>> overridetest.php
>> 
>> >class ClassA {
>>  public function save($value) {
>>echo "ClassA - save\n";
>>
>>if ($this->exists($value))
>>  $this->update($value);
>>else
>>  $this->insert($value);
>>  }
>>
>>  protected function insert($value) {
>>echo "ClassA - insert\n";
>>  }
>>
>>  protected function update($value) {
>>echo "ClassA - update\n";
>>  }
>>
>>  public function exists($value) {
>>echo "ClassA - exists\n";
>>return true;
>>  }
>>}
>>
>>class ClassB extends ClassA {
>>  public function save($value, $classAValue) {
>>echo "ClassB - save\n";
>>  parent::save($classAValue);
>>  // do some additional work...
>>  }
>>
>>  public function exists($value, $classAValue) {
>>  // does a different search than ClassA
>>echo "ClassB - exists\n";
>>  return true;
>>  }
>>}
>>
>>$c = new ClassB();
>>$c->save('test', 'test2');
>> ?>
>>
>> --
>> Richard Morris
>> HDD Broker, Inc.
>>
>>  Toll-Free: +1 866 960-3331
>> International: +1 250 474-6022
>>Fax: +1 250 474-6099
>> E-Mail: [EMAIL PROTECTED]
>>   Web Site: www.hddbroker.com
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
> 

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



RE: [PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Edward Kay
Hi Richard,

This is very strange. I can certainly reproduce the problem. Putting a
var_dump($this) in ClassA's save method shows that PHP sees $this as an
instance of ClassB - when it should be of ClassA.

I'm afraid it's stumped me too! Does anyone else have any thoughts?

Edward


> Hi,
>
> I came across this problem and I was wondering if someone might be able
> to explain to my why it is happening.  I put together a short example to
>   illustrate the problem that I am having.
>
> Basically I have one class that performs a certain task.  I then have a
> second class which extends the first class and performs some tasks in
> addition to the first class.  Even though ClassA should know nothing
> about ClassB since ClassA is the parent, ClassA actually calls ClassB's
> exist method when it should be calling it's own.
>
> I know that description is really wordy and probably confusing which is
> why I provided below the example code that illustrates the problem.
>
> Doesn't this break the idea of inheritance?  I can get it to work if I
> change ClassB::exists to some other name such as ClassB::exists2.
>
> If anyone can enlighten me as to why this problem is occurring or
> suggest a fix I would really appreciate it.  Thank you.
>
>
>
> expected output
> ---
> ClassB - save
> ClassA - save
> ClassA - exists
> ClassA - update
>
>
>
> actual output
> -
> ClassB - save
> ClassA - save
>
>
> Warning:  Missing argument 2 for ClassB::exists(), called in
> /website/overridetest.php on line 6 and defined in
> /website/overridetest.php on line 33
>
> ClassB - exists
> ClassA - update
>
>
>
> overridetest.php
> 
> class ClassA {
>  public function save($value) {
>echo "ClassA - save\n";
>
>if ($this->exists($value))
>  $this->update($value);
>else
>  $this->insert($value);
>  }
>
>  protected function insert($value) {
>echo "ClassA - insert\n";
>  }
>
>  protected function update($value) {
>echo "ClassA - update\n";
>  }
>
>  public function exists($value) {
>echo "ClassA - exists\n";
>return true;
>  }
>}
>
>class ClassB extends ClassA {
>  public function save($value, $classAValue) {
>echo "ClassB - save\n";
>  parent::save($classAValue);
>  // do some additional work...
>  }
>
>  public function exists($value, $classAValue) {
>  // does a different search than ClassA
>echo "ClassB - exists\n";
>  return true;
>  }
>}
>
>$c = new ClassB();
>$c->save('test', 'test2');
> ?>
>
> --
> Richard Morris
> HDD Broker, Inc.
>
>  Toll-Free: +1 866 960-3331
> International: +1 250 474-6022
>Fax: +1 250 474-6099
> E-Mail: [EMAIL PROTECTED]
>   Web Site: www.hddbroker.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

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



Re: [PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-06 07:22:22 -0800:
> Basically I have one class that performs a certain task.  I then have a 
> second class which extends the first class and performs some tasks in 
> addition to the first class.  Even though ClassA should know nothing 
> about ClassB since ClassA is the parent, ClassA actually calls ClassB's 
> exist method when it should be calling it's own.

All non-private methods are "virtual" in PHP. Besides, this will work as well:

class A
{
function f()
{
$this->g();
}
}
class B extends A
{
function g() {}
}
$b = new B; $b->f();

As well as this:

class C extends A
{
function extension() {}
}
function f(A $a)
{
$a->extension();
}
 
> I know that description is really wordy and probably confusing which is 
> why I provided below the example code that illustrates the problem.
> 
> Doesn't this break the idea of inheritance?  I can get it to work if I 
> change ClassB::exists to some other name such as ClassB::exists2.
> 
> If anyone can enlighten me as to why this problem is occurring or 
> suggest a fix I would really appreciate it.  Thank you.
> 
> expected output
> ---
> ClassB - save
> ClassA - save
> ClassA - exists
> ClassA - update
> 
> actual output
> -
> ClassB - save
> ClassA - save

If I change the update() methods' accesses to "private", I get the
output you expect:

[EMAIL PROTECTED] ~ 1001:0 > php tmp/scratch04
ClassB - save
ClassA - save
ClassA - exists
ClassA - update

That might or might not help you in this case.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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



[PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Richard Morris

Hi,

I came across this problem and I was wondering if someone might be able 
to explain to my why it is happening.  I put together a short example to 
 illustrate the problem that I am having.


Basically I have one class that performs a certain task.  I then have a 
second class which extends the first class and performs some tasks in 
addition to the first class.  Even though ClassA should know nothing 
about ClassB since ClassA is the parent, ClassA actually calls ClassB's 
exist method when it should be calling it's own.


I know that description is really wordy and probably confusing which is 
why I provided below the example code that illustrates the problem.


Doesn't this break the idea of inheritance?  I can get it to work if I 
change ClassB::exists to some other name such as ClassB::exists2.


If anyone can enlighten me as to why this problem is occurring or 
suggest a fix I would really appreciate it.  Thank you.




expected output
---
ClassB - save
ClassA - save
ClassA - exists
ClassA - update



actual output
-
ClassB - save
ClassA - save


Warning:  Missing argument 2 for ClassB::exists(), called in 
/website/overridetest.php on line 6 and defined in 
/website/overridetest.php on line 33


ClassB - exists
ClassA - update



overridetest.php

exists($value))
$this->update($value);
  else
$this->insert($value);
}

protected function insert($value) {
  echo "ClassA - insert\n";
}

protected function update($value) {
  echo "ClassA - update\n";
}

public function exists($value) {
  echo "ClassA - exists\n";
  return true;
}
  }

  class ClassB extends ClassA {
public function save($value, $classAValue) {
  echo "ClassB - save\n";
parent::save($classAValue);
// do some additional work...
}

public function exists($value, $classAValue) {
// does a different search than ClassA
  echo "ClassB - exists\n";
return true;
}
  }

  $c = new ClassB();
  $c->save('test', 'test2');
?>

--
Richard Morris
HDD Broker, Inc.

Toll-Free: +1 866 960-3331
International: +1 250 474-6022
  Fax: +1 250 474-6099
   E-Mail: [EMAIL PROTECTED]
 Web Site: www.hddbroker.com

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



[PHP] Re: PHP analytics

2006-12-06 Thread Colin Guthrie
Rick. wrote:
> I am new to php and I would like some guidance from those who have a bit more 
> expereince with PHP
> 
> 
> I will be attempting to do a bit of tracking and web analytics. Basically, 
> the user will login 
> and from there everything that he clicked will be recorded in a database and 
> analyzed
> i.e user behaviour, patterns with different user groups. 
> 
> Is this possible with php and it is a major undertaking ? just trying not to 
> get ahead of myself here..
> 
> are there any tutorials or scripts or books that you know of ?

Yeah!

I just found out about this one the other day.

Not tried it yet, but would appear to be quite nice.

It basically requires you to insert a bit of Javascript code into the
site you want to analyse and then use the PHP application to interpret
these results.

Or you could just use Google Analytics.

Either way, the PHP Analytics I saw are at:
http://www.phpmyvisites.us/

GPL etc.

If someone uses it, could they post to the list as to how useful they
feel it is? That would be of benefit to everyone.

Col

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



[PHP] Re: Newsgroup connect time has become very long

2006-12-06 Thread Chris
I'm having terrible response times for connecting to the news server, 
getting new headers and downloading messages.

Can take minutes to do one task or times out.

I'm using Outlook Express 6.


"Al" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Anyone having problems connecting the last few days? Or, is there 
> something wrong on my end. Al other sites are working just fine.
>
> Thanks. 

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



[PHP] Re: firefox only problem

2006-12-06 Thread Al
First thing to do is to make your code W3C compliant. Both the html and css 
validators identify errors.


Ross wrote:
This is the head of my doc. It is supposed to change the page height based 
on the selection from the menu. It works in IE and validates ok but it is no 
go in firefox. Any ideas?? You can see it in action here...


http://suruchitoo.com/menu.php


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

http://www.w3.org/1999/xhtml";>


SuruchiToo - Menu


   ?>#side, #main, #holder, {height:  1400px;} 
#menu_insert {height:950px;}
   break;


case "veg":
   $selection = "veg.php";
 ?> ?>#side, #main, #holder, {height:  1000px;} 
#menu_insert {height:950px;}
   break;
case "drinks":
   $selection = "drinks.php";
 ?>#side, #main, #holder, {height:  1600px;} 
#menu_insert {height:950px;}

   break;
default:
 $selection = "starters.php";
   ?>#side, #main, #holder, {height:  1400px;} 
#menu_insert {height:950px;}
  break;

 }

?> 


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



[PHP] Re: firefox only problem

First thing to do is to make your code W3C compliant. Both the html and css 
validators identify errors.


Ross wrote:
This is the head of my doc. It is supposed to change the page height based 
on the selection from the menu. It works in IE and validates ok but it is no 
go in firefox. Any ideas?? You can see it in action here...


http://suruchitoo.com/menu.php


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

http://www.w3.org/1999/xhtml";>


SuruchiToo - Menu


   ?>#side, #main, #holder, {height:  1400px;} 
#menu_insert {height:950px;}
   break;


case "veg":
   $selection = "veg.php";
 ?> ?>#side, #main, #holder, {height:  1000px;} 
#menu_insert {height:950px;}
   break;
case "drinks":
   $selection = "drinks.php";
 ?>#side, #main, #holder, {height:  1600px;} 
#menu_insert {height:950px;}

   break;
default:
 $selection = "starters.php";
   ?>#side, #main, #holder, {height:  1400px;} 
#menu_insert {height:950px;}
  break;

 }

?> 


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



Re: [PHP] firefox only problem

Hi Ross,

you might want to look at the way you define your CSS ids

#side, #main, #holder, {height:  1400px;}
should probably be
#side, #main, #holder {height:  1400px;}

Now that's just a question of removing that extra trailing comma.

You might also want to look into the way Firefox handles the height
attribute of a div. I remember some sort of issue with floating or
relative-positioned divs in firefox.

Good luck !

Jochem Maas wrote:
> Ross wrote:
>> This is the head of my doc. It is supposed to change the page height based 
>> on the selection from the menu. It works in IE and validates ok but it is no 
>> go in firefox. Any ideas?? 
> 
> try a CSS list ; google for CSS-Discuss (Eric Meyers list)
> 
>> You can see it in action here...
>>
>> http://suruchitoo.com/menu.php
>>
>>
>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>> http://www.w3.org/1999/xhtml";>
>> 
>> 
>> SuruchiToo - Menu
>> 
>>
>> >
>>
>> $select = isset($_REQUEST['select']) ? $_REQUEST['select'] : '';
>>
>> switch ($select) {
>> case "starters":
>>   $selection = "starters.php";
>>
>>break;
>> case "mains":
>>$selection = "mains.php";
>>?>#side, #main, #holder, {height:  1400px;} 
>> #menu_insert {height:950px;}>break;
>>
>>
>> case "veg":
>>$selection = "veg.php";
>>  ?>>break;
>>
>> case "rice":
>>$selection = "rice.php";
>>  ?>#side, #main, #holder, {height:  1000px;} 
>> #menu_insert {height:950px;}>break;
>> case "drinks":
>>$selection = "drinks.php";
>>  ?>#side, #main, #holder, {height:  1600px;} 
>> #menu_insert {height:950px;}>
>>break;
>> default:
>>  $selection = "starters.php";
>>?>#side, #main, #holder, {height:  1400px;} 
>> #menu_insert {height:950px;}>   break;
>>
>>  }
>>
>> ?> 
>>
> 

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



Re: [PHP] Sending E-mail

Also, try to use a local email address first. Possibly it gets sent, but
the remote server blocks the email as spam. You can check that by having
the email sent to your local user, and check if it arrives there.

HTH


On Mon, 04 Dec 2006 16:53:19 +0100, Jochem Maas wrote:

> Janet Smith wrote:
>> I wasn't really sure where to start looking, but I think I have enough
>> information that I can go and look at how we have things set up. I will
>> try to provide more information as I find it. 
> 
> chances are that the following function is being used.
> 
> http://php.net/mail
> 
> you should really make sure sending email from the cmdline works before
> digging deeper into php - it maybe your sendmail (or alternative tool) itself
> is borked (in which case php won't be able to use it to send any email!).
> 
> smtp and smtp_port are ini settings that are only valid for windows,
> I have no idea if setting them in a *nix php installation will cause problems 
> or not.
>> 
>> Thanks
>> 
> Jochem Maas <[EMAIL PROTECTED]> 12/4/2006 10:42 AM >>>
>> Janet Smith wrote:
>>> We have an application using PHP. If users have forgotten their
>>> password, they click on the link 'Forgot Password' and enter this
>> e-mail
>>> address. This is suppose to send their new password to the e-mail
>>> address provided. We can not get the e-mail to be sent. I have
>> changed
>>> the php.ini file to include the SMTP, the sendmail_from and the
>>> sendmail_path. Does anyone have any suggestions as to what else I
>> need
>>> to look at?
>> 
>> what is the error?
>> what is the code that tries to send the email?
>> what are the relevant php.ini settings set to?
>> what is your OS, php version, etc?
>> do you have a net connection?
>> can you send email from the cmdline?
>> 
>> give us this info and maybe we can provide a solution.
>> 
>> other than that I can only suggest looking at the moon - it won't
>> solve
>> the problem, and I don't think the moon has a 'look at me'
>> requirement,
>> but it is nice to do.
>> 
>>> Thanks
>>>
>>> Jan Smith
>>> Programmer Analyst
>>> Indiana State University
>>> Terre Haute, Indiana
>>> Phone: (812) 237-8593
>>> Email: [EMAIL PROTECTED] 
>>>
>>>
>> ***
>>> This email, and any attachments, thereto, is intended only for use
>> by
>>> the addressee(s) named herein and may contain privileged and/or
>>> confidential information.  If you are not the intended recipient of
>> this
>>> email, you are hereby notified that any dissemination, distribution
>> or
>>> copying of this email, and any attachments thereto, is strictly
>>> prohibited.
>>>
>> ***
>>

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



[PHP] Re: Newsgroup connect time has become very long

On Wed, 06 Dec 2006 10:49:52 +, Colin Guthrie wrote:

> Al wrote:
>> Anyone having problems connecting the last few days? Or, is there
>> something wrong on my end. Al other sites are working just fine.
> 
> Newsgroup? I presume you are using Gmane (as I am).

I'm using Pan and it's taking ages for me to connect. It just queues
my tasks and then suddenly it connects and executes the tasks. Then after
a minute or so of inactivity it closes the connection again. It gets
really annoying and I seem to have lost a post of mine as well.

Ivo

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



Re: [PHP] PHP analytics


Do those log GET params?

On 12/6/06, Vincent DUPONT <[EMAIL PROTECTED]> wrote:


You could look for Apache logs analysers, too

vincent

-Original Message-
From: Rick. [mailto:[EMAIL PROTECTED]
Sent: Wed 6/12/2006 12:48
To: php-general@lists.php.net
Subject: [PHP] PHP analytics

Hello



I am new to php and I would like some guidance from those who have a bit more 
expereince with PHP


I will be attempting to do a bit of tracking and web analytics. Basically, the 
user will login
and from there everything that he clicked will be recorded in a database and 
analyzed
i.e user behaviour, patterns with different user groups.

Is this possible with php and it is a major undertaking ? just trying not to 
get ahead of myself here..

are there any tutorials or scripts or books that you know of ?



Thanks
Regards
Rick

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




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



RE: [PHP] PHP analytics


You could look for Apache logs analysers, too

vincent

-Original Message-
From: Rick. [mailto:[EMAIL PROTECTED]
Sent: Wed 6/12/2006 12:48
To: php-general@lists.php.net
Subject: [PHP] PHP analytics
 
Hello



I am new to php and I would like some guidance from those who have a bit more 
expereince with PHP


I will be attempting to do a bit of tracking and web analytics. Basically, the 
user will login 
and from there everything that he clicked will be recorded in a database and 
analyzed
i.e user behaviour, patterns with different user groups. 

Is this possible with php and it is a major undertaking ? just trying not to 
get ahead of myself here..

are there any tutorials or scripts or books that you know of ?



Thanks 
Regards
Rick

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



Re: [PHP] PHP analytics

Rick. wrote:
> Hello
> 
> 
> 
> I am new to php and I would like some guidance from those who have a bit more 
> expereince with PHP
> 
> 
> I will be attempting to do a bit of tracking and web analytics. Basically, 
> the user will login 
> and from there everything that he clicked will be recorded in a database and 
> analyzed
> i.e user behaviour, patterns with different user groups. 
> 
> Is this possible with php and it is a major undertaking ? just trying not to 
> get ahead of myself here..

yes and probably (depending on what and how much you want to log and
analyse). may be there is something out there that does what you want already.

the logging part is easy enough - it's a question of
performing an INSER on some database table!

> 
> are there any tutorials or scripts or books that you know of ?
> 
> 
> 
> Thanks 
> Regards
> Rick
> 
> 
> 
> 

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



Re: [PHP] PHP analytics


Not really, it's instant now. You just have to have a google account.

On 12/6/06, Edward Kay <[EMAIL PROTECTED]> wrote:

What you describe is certainly possible, and many sites have this
functionality.

If you're just starting out however, look into Google Analytics. It gives
you more info than you care to imagine and is free. It's also takes 2secs to
install (except I think there's a waiting list to get your account active).

Edward

> Hello
>
> I am new to php and I would like some guidance from those who
> have a bit more expereince with PHP
>
>
> I will be attempting to do a bit of tracking and web analytics.
> Basically, the user will login
> and from there everything that he clicked will be recorded in a
> database and analyzed
> i.e user behaviour, patterns with different user groups.
>
> Is this possible with php and it is a major undertaking ? just
> trying not to get ahead of myself here..
>
> are there any tutorials or scripts or books that you know of ?
>
>
>
> Thanks
> Regards
> Rick
>
>
>
>
>

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




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



RE: [PHP] PHP analytics

What you describe is certainly possible, and many sites have this
functionality.

If you're just starting out however, look into Google Analytics. It gives
you more info than you care to imagine and is free. It's also takes 2secs to
install (except I think there's a waiting list to get your account active).

Edward

> Hello
>
> I am new to php and I would like some guidance from those who
> have a bit more expereince with PHP
>
>
> I will be attempting to do a bit of tracking and web analytics.
> Basically, the user will login
> and from there everything that he clicked will be recorded in a
> database and analyzed
> i.e user behaviour, patterns with different user groups.
>
> Is this possible with php and it is a major undertaking ? just
> trying not to get ahead of myself here..
>
> are there any tutorials or scripts or books that you know of ?
>
>
>
> Thanks
> Regards
> Rick
>
>
>
>
>

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



Re: [PHP] PHP analytics


Storing the document that is being called and get paramaters on a DB
is very simple

You would have an include like

$doc = $_SERVER['PHP_SELF'];
$get_vars = serialize($_GET);
mysql_query('INSERT INTO logs (page, vars) VALUES ("' . $doc . '", "'
. addslashes($get_vars) . '")');

Of course you'd need extra info like user id and such, but the
principle is there.


On 12/6/06, Rick. <[EMAIL PROTECTED]> wrote:

Hello



I am new to php and I would like some guidance from those who have a bit more 
expereince with PHP


I will be attempting to do a bit of tracking and web analytics. Basically, the 
user will login
and from there everything that he clicked will be recorded in a database and 
analyzed
i.e user behaviour, patterns with different user groups.

Is this possible with php and it is a major undertaking ? just trying not to 
get ahead of myself here..

are there any tutorials or scripts or books that you know of ?



Thanks
Regards
Rick







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



[PHP] PHP analytics

Hello



I am new to php and I would like some guidance from those who have a bit more 
expereince with PHP


I will be attempting to do a bit of tracking and web analytics. Basically, the 
user will login 
and from there everything that he clicked will be recorded in a database and 
analyzed
i.e user behaviour, patterns with different user groups. 

Is this possible with php and it is a major undertaking ? just trying not to 
get ahead of myself here..

are there any tutorials or scripts or books that you know of ?



Thanks 
Regards
Rick





Re: [PHP] Explicit Stream Flush with fsockopen()


Hi Richard,

Thanks for the help, and I almost forgot to thank you for it. Reason for
the timeout to occur in the posts that I have mentioned before was a
simple End Of Transmission character (EOT, ASCII 4) that terminates
every message sent to and from the server.

And by the way, thank you. :)

O.J.

Richard Lynch wrote:

http://php.net/fflush


On Sun, June 4, 2006 9:51 pm, Oliver John V. Tibi wrote:

Hi Guys,

I know this may sound fundamental to some of you, but do you know any
way of explicitly flushing out stream buffers off to the socket using
fsockopen()/fputs() combos? Hope to hear from you soon.

Note: I'm not using http, and I'm connecting to some other arbitrary
port other than http, so I don't know if ob_flush() and its family of
functions will work.

Thanks! :)

--
Oliver John V. Tibi
Software Programmer/Web Application Developer
IAMD Software Solutions
[EMAIL PROTECTED]
"Live free() or die()."

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








--
Oliver John V. Tibi
Software Programmer/Web Application Developer
IAMD Software Solutions
[EMAIL PROTECTED]
"Live free() or die()."

Support PayPal Now for Philippines! (http://paypalnow.com.ph/)

-BEGIN GEEK CODE BLOCK-
Version: 3.1
GIT d- s: a-- C+++>$ UL$ P+ L++$ E W+++$ N++ o K w+$ O M V- PS !PE
Y+ PGP+ t+ 5 X+ R* tv-- b+ DI+++ D+ G++ e+ h r- y?
--END GEEK CODE BLOCK--

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



Re: [PHP] Include problem


Use ini_set or an .htaccess file - try the first, and if that doesn't work
use an .htaccess file if you have them enabled in the server (and it's
Apache of course!).

On 12/6/06, Ashley Hales <[EMAIL PROTECTED]> wrote:


I am trying to use includes on a free php server but I cannot set the
includes_path myself.  Consequently when I try to include common elements
or
library files I run into trouble as I am unable to store or gain acesss to
a
central includes folder for the entire of my website to access.  Is there
any way around this?

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





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


Re: [PHP] Help with strange include problem in PHP 5.2.0

Hi Richard,

I think I've identified the problem.  It appears to be a problem with 
PHPMyAdmin rather than PHP itself.

The directory permissions we have are the minimum we need, usually 710, file 
permissions are 640.  The group part of the permissions is how the apache 
gets to the files in the directories.  This time I did the installation of 
PMA and changed all the directory and file permissions according to the 
standards here.  As it turns out, PMA demands read permission on the 
directory in which it's distribution directory is installed.  That is:

/usr/local/htdocs# ls -la pma/
total 16
drwxr-x---   4 root webservd 512 Dec  6 10:48 .
drwxrwx---  17 rootwebservd 2048 Dec  6 10:22 ..
drwxr-xr-x   9 root webservd2048 Nov 30 14:06 phpMyAdmin-2.8.1
drwx--x---  10 root webservd2560 Dec  1 12:36 
phpMyAdmin-2.9.1.1-all-languages

If the permission of this directory listed above has 710 instead of 750, PMA 
falls over!

/usr/local/htdocs# ls -la pma/
total 16
drwx--x---   4 root webservd 512 Dec  6 10:48 .
drwxrwx---  17 rootwebservd 2048 Dec  6 10:22 ..
drwx--x---   9 root webservd2048 Nov 30 14:06 phpMyAdmin-2.8.1
drwx--x---  10 root webservd2560 Dec  1 12:36 
phpMyAdmin-2.9.1.1-all-languages

It took quite a bit of scratching my head until I found this out.  In 
particular, PMA 2.9.1.1 really falls over with the 710 permissions that are 
currently set.  I think now I need to file a PMA bug report.

thanks for the suggestions you made, they did help me find this problem.

regards
Markus

On Friday 01 December 2006 22:27, Richard Lynch wrote:
> Try running it under some kind of debugger and see if you can figure
> out what directories it's even checking when it doesn't find the
> file...
>
> I dunno if Zend IDE (or whatever it's called now) or Komodo or XDebug
> or whatnot will do that, but it's definitely sounding very odd if your
> include_path has "." in it...
>
> Oooh...
> What does PHP think your cwd is?
> echo 'cwd: ', cwd(), "\n";
> right before the include.
>
> On Fri, December 1, 2006 3:47 am, Markus Mayer wrote:
> > Hi Richard,
> > Hi all,
> >
> > The include path is correct.  That was one of the first things I
> > played around
> > with.  At the moment, it's  include_path = ".".  I also tried renaming
> > the
> > php.ini file to php.ini.off so that it wasn't found and took all the
> > defaults, but with no success.
> >
> > Last night I built PHP 5.1.6 and took the same php.ini file.
> > Everything
> > worked.  The build environment was the same, the configure arguments
> > were the
> > same, only the php version was different.
> >
> > I'm guessing that I've done something wrong somewhere because I
> > haven't found
> > any references to this problem from any one else.  I just have no idea
> > what
> > it could be.  I don't know if it's any help in locating the problem,
> > my build
> > environment is Solaris 10, Sun Studio 10 with the Sun C and C++
> > compilers.
> > # cc-V
> > Sun C 5.7 2005/01/07
> > # CC -V
> > CC: Sun C++ 5.7 2005/01/07
> >
> > LDFLAGS=-L/opt/sfw/lib -L/usr/sfw/lib -L/usr/lib
> > -R/opt/sfw/lib:/usr/sfw/lib:/usr/lib:/opt/oracle/instantclient_10_2
> > CPPFLAGS=-I/opt/sfw/include -I/usr/sfw/include/openssl
> > -I/usr/local/BerkeleyDB/include -I/usr/include
> > -I/opt/oracle/instantclient_10_2/sdk/include
> > CFLAGS=-I/opt/sfw/include -I/usr/sfw/include/openssl
> > -I/usr/local/BerkeleyDB/include -I/usr/include
> > -I/opt/oracle/instantclient_10_2/sdk/include
> >
> > And to your "rant" about the code developers make - I totally agree
> > with you.
> > As the administrator of a server with close to 600 users who all put
> > their
> > own applications in their own accounts up, then ask me why it "doesn't
> > work",
> > I get annoyed at such things too.
> >
> > regards
> > Markus
> >
> > On Thursday 30 November 2006 19:04, Richard Lynch wrote:
> >> On Thu, November 30, 2006 6:49 am, Markus Mayer wrote:
> >> > I have a strange problem including files in PHP 5.2.0 running on
> >>
> >> Unix.
> >>
> >> >  If I
> >> > try to include a file using include 'filename.inc';, everything is
> >> > fine.  As
> >> > soon as I try to put a "." in front of the file name, for example
> >> > include './filename.inc';, I get a "failed to open stream: No such
> >> > file or
> >> > directory" error.  Does anyone have any suggestions as to what is
> >> > going
> >> > wrong?` This all works with php 4.4.4 built with the same
> >>
> >> environment
> >>
> >> > and
> >> > compiler on the same system.
> >>
> >> What is your include path in PHP 5.2.0?
> >>
> >> I'm going to go out on a limb and bet a dollar that the PHP 4.4.4
> >> include_path has "." as one element within the list and that the PHP
> >> 5.2.0 include_path does NOT have "." within the list.
> >>
> >> I.e.:
> >> 4.4.4 include_path ".:include_test_dir"
> >> 5.2.0 include_path "include_test_dir"
> >>
> >> In the first case, 4.4.4, you've got . in there, so . combined with
> >> ./

[PHP] Include problem

I am trying to use includes on a free php server but I cannot set the 
includes_path myself.  Consequently when I try to include common elements or 
library files I run into trouble as I am unable to store or gain acesss to a 
central includes folder for the entire of my website to access.  Is there 
any way around this? 

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



[PHP] Re: Newsgroup connect time has become very long

Al wrote:
> Anyone having problems connecting the last few days? Or, is there
> something wrong on my end. Al other sites are working just fine.

Newsgroup? I presume you are using Gmane (as I am).

Seems fine for me.

Col.

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



Re: [PHP] Reading and changing XML

If you want to do some simple XML handeling you could go for simpleXML : 
http://nl3.php.net/manual/en/ref.simplexml.php
For the more advanced XML handeling i would go for DOM : 
http://nl3.php.net/manual/en/ref.dom.php

On Wed, 6 Dec 2006 12:47:01 +0200, "Rosen" <[EMAIL PROTECTED]> wrote:
> Hi,
> I need some help. Which is the best way to parse XML file ( reading some
> fields ) and change some of them ?
> 
> Thanks in advance,
> Rosen
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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



[PHP] Reading and changing XML

Hi,
I need some help. Which is the best way to parse XML file ( reading some 
fields ) and change some of them ?

Thanks in advance,
Rosen 

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



Re: [PHP] utf8 encoding £ to £ probl em

Hi,

Chris Dean wrote:
> Just the £ and in my case I need to use that symbol, can't really get round 
> it sensibly with £ 

I think Jochen is right about the double encoding.

The question I have to ask is where does your £ sign come from?

I can think of 3 places:

1) in the text.
2) from a DB.
3) from user input (e.g. via form).

If 1), then you can save your files as UTF8 encoded, and therefore you
just use a £ sign as normal and echo it to the user as normal, and it
will stay utf8 all the way (I presume you have utf8 charset configured
in your HTML output?)

If 2), again this can be stored either in a UTF8 charset table or in a
latin1 table and it shoudln't really matter provided your connection
charset is correct. Just use it as is.

If 3), if you pages are UTF8 encoded, the browsers /should/ (and in my
experience generally do), submit forms in utf8 encoding. Again I just
use it and don't have many problems.

So I guess the question I'm asking is why are you passing the £ symbol
through UTF8 encoding functions at all?

Col.

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



[PHP] PHP SQL Builder with JOIN support

Does anyone know of a PHP class/function(s) which will generate SQL with 
support for JOIN's to other tables.


I have used SQL Query Builder by David Regla Demaree, which is great for 
simple SQL but lacks support for JOIN's.


Many thanks in advance, Kris.

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