[PHP] Re: Protect PHP coding

2002-08-03 Thread lallous

any windows version of this product?


"Manuel Lemos" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> On 08/02/2002 11:06 AM, Lallous wrote:
> > So...
> > Is this equivalent to Zend Encoder?
>
> Not exactly, but in some aspects it is/will be better like the ability
> to generate executable standalone PHP programs that you can distribute
> independently. There is also the question of the price that for Zend
> Encoder is ridiculously expensive.
>
> Other than that, if you're main concerne is protecting your PHP code,
> you can do very well with bcompiler.
>
>
> > Elias
> > "Manuel Lemos" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> >>Hello,
> >>
> >>On 08/01/2002 01:58 PM, Yc Nyon wrote:
> >>
> >>>Is there any method to encrypt PHP files.
> >>
> >>Use bcompiler which is free and is part of PEAR/PECL official PHP
> >>extensions repository:
> >>
> >>http://pear.php.net/package-info.php?pacid=95
> >>
> >>--
> >>
> >>Regards,
> >>Manuel Lemos
> >>
> >
> >
> >
>
>
>
> --
>
> Regards,
> Manuel Lemos
>



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




Re: [PHP] isset($var) && !empty($var) same time!

2002-08-03 Thread Verdana Musone

I always set error_reporting(E_ALL) oR error_reporting(2047), but i have never got any 
errors when just use empty()  
to determine whether a variable is set.

If the variable is: 0, null, not set or an empty string.
Then the empty() will return true.

It's unnecessary to call isset() first.

- Original Message -
From: lallous
Sent: 2002Äê8ÔÂ3ÈÕ 15:01
To: [EMAIL PROTECTED]
Subject: Re: [PHP] isset($var) && !empty($var) same time!

Just use empty() ?!

With error_reporting(E_ALL) you'll get a bunch of warnings if you only use
empty() w/o the isset() !

use isset() first and then check wheter empty or not empty!

so there is not one function that tests for empty and isset same time!?

Elias
"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Fri, Aug 02, 2002 at 04:48:17PM +0200, lallous wrote:
> >
> > function issne($var)
> > {
> >return isset($var) && !empty($var) ? true : false;
> > }
> >
> > is there is any builtin function that does that? (one function call).
>
> Yes.  Just use empty().  It automatically checks if the variable is:
>not set
>null
>an empty string
>zero
>
> If any of them are true, the empty() function returns true.  You don't
> need your function at all.
>
> --Dan
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.phpGet more from the Web.  FREE MSN 
Explorer download : http://explorer.msn.com



Re: [PHP] PHP Hosting

2002-08-03 Thread Liam MacKenzie

File permissions.

Each user has their own username, but all are a member of the group
"hosting"
They can CHMOD their files to whatever they like, so security is really up
to them.

And PHP's Safe mode of course.



- Original Message -
From: "Matt Babineau" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 02, 2002 11:04 PM
Subject: [PHP] PHP Hosting


> If any PHP hosts are out there I have a question:
>
> How do you keep users from erasing / altering files out side of their
> web folder with PHP? Doesn't PHP run in the system user context? Is is
> possible to prevent a user from using PHP to alter anything but in their
> Web folder?
>
> Matt Babineau
> MCWD / CCFD
> -
> e:   [EMAIL PROTECTED]
> p: 603.943.4237
> w:   http://www.criticalcode.com
> PO BOX 601
> Manchester, NH 03105
>
>




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




Re: [PHP] isset($var) && !empty($var) same time!

2002-08-03 Thread lallous

because your variable is set already!

try doing this:

echo empty($asdadadadadadasd);
you will get a warning and have a FALSE value.


Elias
"Verdana Musone" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I always set error_reporting(E_ALL) oR error_reporting(2047), but i have
never got any errors when just use empty()
to determine whether a variable is set.

If the variable is: 0, null, not set or an empty string.
Then the empty() will return true.

It's unnecessary to call isset() first.

- Original Message -
From: lallous
Sent: 2002Äê8ÔÂ3ÈÕ 15:01
To: [EMAIL PROTECTED]
Subject: Re: [PHP] isset($var) && !empty($var) same time!

Just use empty() ?!

With error_reporting(E_ALL) you'll get a bunch of warnings if you only use
empty() w/o the isset() !

use isset() first and then check wheter empty or not empty!

so there is not one function that tests for empty and isset same time!?

Elias
"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Fri, Aug 02, 2002 at 04:48:17PM +0200, lallous wrote:
> >
> > function issne($var)
> > {
> >return isset($var) && !empty($var) ? true : false;
> > }
> >
> > is there is any builtin function that does that? (one function call).
>
> Yes.  Just use empty().  It automatically checks if the variable is:
>not set
>null
>an empty string
>zero
>
> If any of them are true, the empty() function returns true.  You don't
> need your function at all.
>
> --Dan
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.phpGet more from the Web.
FREE MSN Explorer download : http://explorer.msn.com




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




Re: [PHP] isset($var) && !empty($var) same time!

2002-08-03 Thread Verdana Musone

I had given a try on your code, But it really output "1", a true value.

I used "PHP 4.2.2+Apache 1.3.26" under Win2K. And u?



- Original Message -
From: lallous
Sent: 2002Äê8ÔÂ3ÈÕ 16:19
To: [EMAIL PROTECTED]
Subject: Re: [PHP] isset($var) && !empty($var) same time!

because your variable is set already!

try doing this:

echo empty($asdadadadadadasd);
you will get a warning and have a FALSE value.


Elias
"Verdana Musone" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I always set error_reporting(E_ALL) oR error_reporting(2047), but i have
never got any errors when just use empty()
to determine whether a variable is set.

If the variable is: 0, null, not set or an empty string.
Then the empty() will return true.

It's unnecessary to call isset() first.

- Original Message -
From: lallous
Sent: 2002Äê8ÔÂ3ÈÕ 15:01
To: [EMAIL PROTECTED]
Subject: Re: [PHP] isset($var) && !empty($var) same time!

Just use empty() ?!

With error_reporting(E_ALL) you'll get a bunch of warnings if you only use
empty() w/o the isset() !

use isset() first and then check wheter empty or not empty!

so there is not one function that tests for empty and isset same time!?

Elias
"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Fri, Aug 02, 2002 at 04:48:17PM +0200, lallous wrote:
> >
> > function issne($var)
> > {
> >return isset($var) && !empty($var) ? true : false;
> > }
> >
> > is there is any builtin function that does that? (one function call).
>
> Yes.  Just use empty().  It automatically checks if the variable is:
>not set
>null
>an empty string
>zero
>
> If any of them are true, the empty() function returns true.  You don't
> need your function at all.
>
> --Dan
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.phpGet more from the Web.
FREE MSN Explorer download : http://explorer.msn.com




--  
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.phpGet more from the Web.  FREE MSN 
Explorer download : http://explorer.msn.com



[PHP] Include php code as variable

2002-08-03 Thread Alawi

How can I Include my php code code as variable and excute it ? 


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




[PHP] Re: Protect PHP coding

2002-08-03 Thread Manuel Lemos

Hello,

On 08/03/2002 05:41 AM, Lallous wrote:
> any windows version of this product?

AFAIK, you compile it for Windows. I was also told that is a major headache.

Anyway, don't despair, it seems that some developers are working on 
providing already compiled PECL extensions that can be automatically 
downloaded.


> 
> 
> "Manuel Lemos" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 
>>Hello,
>>
>>On 08/02/2002 11:06 AM, Lallous wrote:
>>
>>>So...
>>>Is this equivalent to Zend Encoder?
>>
>>Not exactly, but in some aspects it is/will be better like the ability
>>to generate executable standalone PHP programs that you can distribute
>>independently. There is also the question of the price that for Zend
>>Encoder is ridiculously expensive.
>>
>>Other than that, if you're main concerne is protecting your PHP code,
>>you can do very well with bcompiler.
>>
>>
>>
>>>Elias
>>>"Manuel Lemos" <[EMAIL PROTECTED]> wrote in message
>>>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>>>
>>>
Hello,

On 08/01/2002 01:58 PM, Yc Nyon wrote:


>Is there any method to encrypt PHP files.

Use bcompiler which is free and is part of PEAR/PECL official PHP
extensions repository:

http://pear.php.net/package-info.php?pacid=95

-- 

Regards,
Manuel Lemos


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




Re: [PHP] Include php code as variable

2002-08-03 Thread Danny Shepherd

http://www.php.net/eval

- Original Message - 
From: "Alawi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 03, 2002 11:41 AM
Subject: [PHP] Include php code as variable


> How can I Include my php code code as variable and excute it ? 
> 
> 
> -- 
> 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] Re: Protect PHP coding

2002-08-03 Thread Andrey Hristov

> >>>So...
> >>>Is this equivalent to Zend Encoder?
> >>
> >>Not exactly, but in some aspects it is/will be better like the ability
> >>to generate executable standalone PHP programs that you can distribute
> >>independently. There is also the question of the price that for Zend
> >>Encoder is ridiculously expensive.
> >>
 The people for Zend have to eat to live.
People, if there is no Zend there is no core for PHP. This is the same as
with MySQL. MySQL is free under GPL
but has no subselects because the companies that has commercial licenses
didn't wanted that - Monty has
to eat and he codes other features.
IMO Zend must exist and this is only possible by selling its products.
If the company we work for has the money to buy Zend Accelerator licenses
why not do that instead of using
other Open Source accelerators. I just want the people from Zend to continue
their tremendous work and
we will have PHP5 and PHP6 and so on otherwise start learning ASP or JSP.


My 2 cents.

Regards,
Andrey


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




Re: [PHP] string questions

2002-08-03 Thread Danny Shepherd

Try, 

list($test)=explode(' ',$address);

HTH

Danny

- Original Message - 
From: "webmaster" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 02, 2002 5:35 PM
Subject: [PHP] string questions


> I know there has to be an easy way to do this, but I just can't find the
> answer.  I need to strip out the first part of a text string.  I've
> figured out out to strip out the last part of a string using the
> following:
> 
> $address = (4455 N. 45th St.);
> 
> $test = strstr($address, " ");
> echo $test;
> 
> The variable $test returns N. 45th St. without the 4455.  Is there a way
> to reverse this so I can just return 4455?


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




[PHP] virtual hosting using php as apache module

2002-08-03 Thread Ryan

Hi everybody,
   I would like to know how to make the directive user/group in
 working with php. I prefer to use php as modules but not
cgi, as it is more handy and easy for upgrade. How to do that ?
Thx !


Regards,
Ryan


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




Re: [PHP] Re: Protect PHP coding

2002-08-03 Thread Manuel Lemos

Hello,

On 08/03/2002 09:16 AM, Andrey Hristov wrote:
>So...
>Is this equivalent to Zend Encoder?

Not exactly, but in some aspects it is/will be better like the ability
to generate executable standalone PHP programs that you can distribute
independently. There is also the question of the price that for Zend
Encoder is ridiculously expensive.

>>>
>  The people for Zend have to eat to live.

And don't we all? That is the main problem. If we need to pay USD $3,000 
to be able to compile our PHP programs, doesn't that make not viable for 
most of us to sell our PHP programs as closed source?


> People, if there is no Zend there is no core for PHP. This is the same as
> with MySQL. MySQL is free under GPL
> but has no subselects because the companies that has commercial licenses
> didn't wanted that - Monty has
> to eat and he codes other features.

If there is something that Zend people do not have a problem that is to 
be able to eat from their work. Just recently they announced a USD 
$300,000 deal, which where I live lets many eat for many years.



> IMO Zend must exist and this is only possible by selling its products.

I only agree with the first part. It is not true that selling products 
is the only viable way for them to survive. Your MySQL example is good 
because they have been leaving from consulting, training and certification.


> If the company we work for has the money to buy Zend Accelerator licenses
> why not do that instead of using

That is your decision. Zend people have publically declared that they 
are targetting high-end customers. Their pricing obviously rules out the 
majority of us for which their prices are simply unaffordable, 
especially if you have to pay them over and over again if you want to 
use them every year.

Since we are not idiots, if we have Open Source solutions that solve our 
problem, why do you think that paying those fortunes to Zend would be a 
better idea?

I think their business model makes sense to make their company viable, 
but that should be at the expense of those that can't afford their 
prices. Let those that believe that expensive software is a better 
solution from them then Open Source, to make Zend company viable.

Also, Zend uses a subscription based licensing which is what Microsoft 
is shifting their licenses too. I am not saying that is wrong, I just 
say that it is not acceptable for most of us to stay in the dependence 
of Zend to keep our software running every year. If you agree with the 
licensing, it is your problem.


> other Open Source accelerators. I just want the people from Zend to continue
> their tremendous work and
> we will have PHP5 and PHP6 and so on otherwise start learning ASP or JSP.

If you ask me, I see very little point in what you say. You just made it 
sound as if Zend people are the only ones working on the development of PHP.

The way I see it PHP lacks mostly of extensions that address real world 
problems of many people like: interfacing with Web services via SOAP, 
compiling PHP scripts to protect so we can generate closed source 
standalone executables, multi-threading support, generating GUI 
applications, interfacing with the user management and authentication 
system, etc..

Zend people are not working on anything like this as they don't agree it 
is important for PHP or for their business that is all that matters to them.

As a matter of fact the only thing that Zend people have been working on 
PHP itself is Zend engine 2. Last time that I looked, Zend engine 2  is 
mostly a thing that was developed to make PHP more like Java. If I 
wanted that, I would probably be using Java instead. I am afraid that is 
only helping to remember more and more users to switch to Java.



> My 2 cents.

Actually that should be worth many times USD $3,000...  for Zend of 
course. :-)



-- 

Regards,
Manuel Lemos


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




Re: [PHP] ODBC

2002-08-03 Thread John Lim

Have a look at http://php.weblogs.com/adodb_csv


"Bob Lockie" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> >Can PHP be used on an Apache server (linux) to connect to a (remote)
MS
> >Access server (NT) through ODBC?
>
> Yes.
>
>
> > If so, does anyone have examples of how this
> >is done?
>
> Nope, never done it.
> It'll use the same PHP database commands probably.
> Read www.php.net
>
>
>



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




[PHP] alternative to phpadsnew?

2002-08-03 Thread Andy

Hi there,

I am searching for a way to track advertisment, clickrates on my site. So I
tryed out phpadsnew http://sourceforge.net/projects/phpadsnew/

Unfortunatelly the current beta 7 works only with register globals set to
on. I cant install it in this case, because my application requires this to
be off.

Has anybody a good recomendation on another software to track adds?

Thank you for any hint on that.

andy








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




[PHP] what is equivalent to Response.End ?

2002-08-03 Thread Ing. Rajesh Kumar

Hi everybody
Can someone tell me what is the PHP equivalent code to ASP's Response.End ?
I want to stop my code at a given position so i need this.

thanks in advance
Raja




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




Re: [PHP] Re: Protect PHP coding

2002-08-03 Thread Dennis Moore

Everyone understands that Zend has to eat, but so do most of us small
developers.  I have no problem with them charging for their products.  IMO
they would make more money if the pricing for the encoder would be less.
This is a fundamental feature that most of us need.   I would offer a Pro
version of the Zend Studio and bundle the encoder with it for abou $500.
This would enable Zend to capture a significant market share among PHP
developers withoug breaking the bank.

Just a thought...


- Original Message -
From: "Andrey Hristov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 03, 2002 8:16 AM
Subject: Re: [PHP] Re: Protect PHP coding


> > >>>So...
> > >>>Is this equivalent to Zend Encoder?
> > >>
> > >>Not exactly, but in some aspects it is/will be better like the ability
> > >>to generate executable standalone PHP programs that you can distribute
> > >>independently. There is also the question of the price that for Zend
> > >>Encoder is ridiculously expensive.
> > >>
>  The people for Zend have to eat to live.
> People, if there is no Zend there is no core for PHP. This is the same as
> with MySQL. MySQL is free under GPL
> but has no subselects because the companies that has commercial licenses
> didn't wanted that - Monty has
> to eat and he codes other features.
> IMO Zend must exist and this is only possible by selling its products.
> If the company we work for has the money to buy Zend Accelerator licenses
> why not do that instead of using
> other Open Source accelerators. I just want the people from Zend to
continue
> their tremendous work and
> we will have PHP5 and PHP6 and so on otherwise start learning ASP or JSP.
>
>
> My 2 cents.
>
> Regards,
> Andrey
>
>
> --
> 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] alternative to phpadsnew?

2002-08-03 Thread Maxim Maletsky


You can track ads with phpAdsNew also remotely, not necessarily via
view() function.


Maxim Maletsky

PHP Beginner
www.phpbeginner.com



-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, August 03, 2002 4:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] alternative to phpadsnew?

Hi there,

I am searching for a way to track advertisment, clickrates on my site.
So I
tryed out phpadsnew http://sourceforge.net/projects/phpadsnew/

Unfortunatelly the current beta 7 works only with register globals set
to
on. I cant install it in this case, because my application requires this
to
be off.

Has anybody a good recomendation on another software to track adds?

Thank you for any hint on that.

andy








-- 
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] alternative to phpadsnew?

2002-08-03 Thread Andy

what do u mean by that. I would like to install this software on the same
server. I guess you mean installing it on another server - remotly?

Andy


"Maxim Maletsky" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
001601c23afe$8e0df9e0$1113fe17@dominanta">news:001601c23afe$8e0df9e0$1113fe17@dominanta...
>
> You can track ads with phpAdsNew also remotely, not necessarily via
> view() function.
>
>
> Maxim Maletsky
>
> PHP Beginner
> www.phpbeginner.com
>
>
>
> -Original Message-
> From: Andy [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 03, 2002 4:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] alternative to phpadsnew?
>
> Hi there,
>
> I am searching for a way to track advertisment, clickrates on my site.
> So I
> tryed out phpadsnew http://sourceforge.net/projects/phpadsnew/
>
> Unfortunatelly the current beta 7 works only with register globals set
> to
> on. I cant install it in this case, because my application requires this
> to
> be off.
>
> Has anybody a good recomendation on another software to track adds?
>
> Thank you for any hint on that.
>
> andy
>
>
>
>
>
>
>
>
> --
> 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] what is equivalent to Response.End ?

2002-08-03 Thread Danny Shepherd

http://php.net/die
http://php.net/exit

Both will stop your code. Dead.

Danny.

- Original Message -
From: "Ing. Rajesh Kumar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 03, 2002 3:50 PM
Subject: [PHP] what is equivalent to Response.End ?


> Hi everybody
> Can someone tell me what is the PHP equivalent code to ASP's Response.End
?
> I want to stop my code at a given position so i need this.
>
> thanks in advance
> Raja
>
>
>
>
> --
> 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: what is equivalent to Response.End ?

2002-08-03 Thread Lars Olsson

Hi!

try exit() (http://www.php.net/exit) or die() (http://www.php.net/die)

Kindly

/lasso ([EMAIL PROTECTED])



Ing. Rajesh Kumar wrote:
> Hi everybody
> Can someone tell me what is the PHP equivalent code to ASP's Response.End ?
> I want to stop my code at a given position so i need this.
> 
> thanks in advance
> Raja
> 
> 
> 


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




[PHP] Install

2002-08-03 Thread Nick Niehoff

I have followed the instructions to install php4 on
both apache 1.3.x and 2.0.x, both fail.  I am running
RedHat 7.2, Apache 2.0.39.  I am trying to install
php4.2.2.  When I type 'make install' at the command
it goes through its little thing and then says:
./.libs/libphp4.a(zend_execute.lo): In function
`safe_free_zval_ptr':
/root/php-4.2.2/Zend/zend_execute.h:59: undefined
reference to `ts_resource_ex'
collect2: ld returned 1 exit status
make[1]: *** [php] Error 1
make[1]: Leaving directory `/root/php-4.2.2'
make: *** [install-recursive] Error 1

Can anyone help?
Nick Niehoff

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




[PHP] Re: Include php code as variable

2002-08-03 Thread CC Zona

In article <00d501c23ada$87050590$3404a8c0@alawi>,
 [EMAIL PROTECTED] (Alawi) wrote:

> How can I Include my php code code as variable and excute it ? 

include() can return a value, assignable to a variable.  Some other ways to 
get the content of a file (I assume that's why you're saying "include") 
into a variable: file(), fread().

eval() can execute the value of a variable as PHP code.

http://php.net/include
http://php.net/file
http://php.net/fread
http://php.net/eval

-- 
CC

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




[PHP] PHP and multiple page .tiffs

2002-08-03 Thread Joseph Szobody

Is there a way for PHP to look at a local multiple-page .tiff file and find out haw 
many page it has?

Thanks,

Joseph


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




[PHP] RegEx (back referencing)

2002-08-03 Thread Phil Ewington

Hi,

I am am writing a function to color code and indent JavaScript source using
regular expressions and cannot seem to get back referencing working. The
pattern match is successful but the output is a single unrecognised
character (a square).

$string = eregi_replace("<(/?)(scr[^>]*)>", "«font color=maroon»\1«/font»",
$string);

This results in opening and closing  tags being replaced
with a square being wrapped in font tags. I have this working in Cold Fusion
but cannot seem to convert my scripts to PHP. Can anyone help?

TIA

Phil Ewington.


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




Re: [PHP] Install

2002-08-03 Thread EdwardSPL

Try this site :
http://www.linuxguruz.org/z.php?id=32&h=php+mysql+apache

Nick Niehoff wrote:

> I have followed the instructions to install php4 on
> both apache 1.3.x and 2.0.x, both fail.  I am running
> RedHat 7.2, Apache 2.0.39.  I am trying to install
> php4.2.2.  When I type 'make install' at the command
> it goes through its little thing and then says:
> ./.libs/libphp4.a(zend_execute.lo): In function
> `safe_free_zval_ptr':
> /root/php-4.2.2/Zend/zend_execute.h:59: undefined
> reference to `ts_resource_ex'
> collect2: ld returned 1 exit status
> make[1]: *** [php] Error 1
> make[1]: Leaving directory `/root/php-4.2.2'
> make: *** [install-recursive] Error 1
>
> Can anyone help?
> Nick Niehoff
>
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.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] Install

2002-08-03 Thread Bob Lockie


What is your configure command?

>I have followed the instructions to install php4 on
>both apache 1.3.x and 2.0.x, both fail.  I am running
>RedHat 7.2, Apache 2.0.39.  I am trying to install
>php4.2.2.  When I type 'make install' at the command
>it goes through its little thing and then says:
>./.libs/libphp4.a(zend_execute.lo): In function
>`safe_free_zval_ptr':
>/root/php-4.2.2/Zend/zend_execute.h:59: undefined
>reference to `ts_resource_ex'
>collect2: ld returned 1 exit status
>make[1]: *** [php] Error 1
>make[1]: Leaving directory `/root/php-4.2.2'
>make: *** [install-recursive] Error 1
>
>Can anyone help?
>Nick Niehoff




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




Re: [PHP] RegEx (back referencing)

2002-08-03 Thread Danny Shepherd

try

\\1

- Original Message -
From: "Phil Ewington" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Saturday, August 03, 2002 5:03 PM
Subject: [PHP] RegEx (back referencing)


> Hi,
>
> I am am writing a function to color code and indent JavaScript source
using
> regular expressions and cannot seem to get back referencing working. The
> pattern match is successful but the output is a single unrecognised
> character (a square).
>
> $string = eregi_replace("<(/?)(scr[^>]*)>", "«font
color=maroon»\1«/font»",
> $string);
>
> This results in opening and closing  tags being replaced
> with a square being wrapped in font tags. I have this working in Cold
Fusion
> but cannot seem to convert my scripts to PHP. Can anyone help?
>
> TIA
>
> Phil Ewington.
>
>
> --
> 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] Re: Protect PHP coding

2002-08-03 Thread Acer

There is a free php accelerator so I don't know why you would pay for one.
www.php-accelerator.co.uk

The same guy (Nick) has also just made an encoder.  It is in beta testing
right now and there's no windows version yet but that should be coming soon.
I think it's like $0.50 to encode your program which is much more
affordable.
http://www.php-encoder.com

I think the problem with zend is that they have put up the guise that php is
an opensource project but to actually use it in production you had to pay
several thousands every year for the accelerator and the encoder.  It kinda
feels like a bait and switch to me which is why I personally think zend is
bad for php.  Just do a search for jobs for asp, cf or jsp.  There are a ton
of jobs for these languages and you would be lucky to find one for a php
developer.  So zend rakes in the money and does no real marketing with that
money for php is the way I see it.

You'll never hear anything from the core php group since they are a tight
click so it's business as usual.  Now that Nick has released the free
accelerator and an inexpensive ($0.50 per shot) encoder it might change but
I don't know if it's too late.







-Original Message-
From: Dennis Moore [mailto:[EMAIL PROTECTED]]
Sent: August 3, 2002 10:58 AM
To: Andrey Hristov; [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Protect PHP coding


Everyone understands that Zend has to eat, but so do most of us small
developers.  I have no problem with them charging for their products.  IMO
they would make more money if the pricing for the encoder would be less.
This is a fundamental feature that most of us need.   I would offer a Pro
version of the Zend Studio and bundle the encoder with it for abou $500.
This would enable Zend to capture a significant market share among PHP
developers withoug breaking the bank.

Just a thought...


- Original Message -
From: "Andrey Hristov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 03, 2002 8:16 AM
Subject: Re: [PHP] Re: Protect PHP coding


> > >>>So...
> > >>>Is this equivalent to Zend Encoder?
> > >>
> > >>Not exactly, but in some aspects it is/will be better like the ability
> > >>to generate executable standalone PHP programs that you can distribute
> > >>independently. There is also the question of the price that for Zend
> > >>Encoder is ridiculously expensive.
> > >>
>  The people for Zend have to eat to live.
> People, if there is no Zend there is no core for PHP. This is the same as
> with MySQL. MySQL is free under GPL
> but has no subselects because the companies that has commercial licenses
> didn't wanted that - Monty has
> to eat and he codes other features.
> IMO Zend must exist and this is only possible by selling its products.
> If the company we work for has the money to buy Zend Accelerator licenses
> why not do that instead of using
> other Open Source accelerators. I just want the people from Zend to
continue
> their tremendous work and
> we will have PHP5 and PHP6 and so on otherwise start learning ASP or JSP.
>
>
> My 2 cents.
>
> Regards,
> Andrey
>
>
> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Protect PHP coding

2002-08-03 Thread Rasmus Lerdorf

> You'll never hear anything from the core php group since they are a tight
> click so it's business as usual.

That's probably the most uninformed statement I have seen posted to this
list in a very long time.

-Rasmus


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




Re: [PHP] RegEx (back referencing)

2002-08-03 Thread Danny Shepherd

If you're trying to get Lots of javascript to look like
Lots of javascript then this will be a start

$string = eregi_replace('<(/?)(scr[^>]*)>', '<\\1font
color="maroon">',$string);

This will produce -  Lots of javascript - not perfect, but a start.

Danny.

- Original Message -
From: "Phil Ewington" <[EMAIL PROTECTED]>
To: "Danny Shepherd" <[EMAIL PROTECTED]>
Sent: Saturday, August 03, 2002 5:52 PM
Subject: RE: [PHP] RegEx (back referencing)


> \\1 outputs nothing at all wrapped in font tags and closing tags \ wrapped
> in font tags :o(
>
>
>
> > -Original Message-
> > From: Danny Shepherd [mailto:[EMAIL PROTECTED]]
> > Sent: 03 August 2002 17:47
> > To: [EMAIL PROTECTED]; PHP General
> > Subject: Re: [PHP] RegEx (back referencing)
> >
> >
> > try
> >
> > \\1
> >
> > - Original Message -
> > From: "Phil Ewington" <[EMAIL PROTECTED]>
> > To: "PHP General" <[EMAIL PROTECTED]>
> > Sent: Saturday, August 03, 2002 5:03 PM
> > Subject: [PHP] RegEx (back referencing)
> >
> >
> > > Hi,
> > >
> > > I am am writing a function to color code and indent JavaScript source
> > using
> > > regular expressions and cannot seem to get back referencing working.
The
> > > pattern match is successful but the output is a single unrecognised
> > > character (a square).
> > >
> > > $string = eregi_replace("<(/?)(scr[^>]*)>", "«font
> > color=maroon»\1«/font»",
> > > $string);
> > >
> > > This results in opening and closing  tags
> > being replaced
> > > with a square being wrapped in font tags. I have this working in Cold
> > Fusion
> > > but cannot seem to convert my scripts to PHP. Can anyone help?
> > >
> > > TIA
> > >
> > > Phil Ewington.
> > >
> > >
> > > --
> > > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] RegEx (back referencing)

2002-08-03 Thread Phil Ewington

What's strange is that doing an ord($string) returns 171, which is a '1/2'
char. So why does PHP convert the pattern match??


> -Original Message-
> From: Phil Ewington [mailto:[EMAIL PROTECTED]]
> Sent: 03 August 2002 17:04
> To: PHP General
> Subject: [PHP] RegEx (back referencing)
>
>
> Hi,
>
> I am am writing a function to color code and indent JavaScript
> source using
> regular expressions and cannot seem to get back referencing working. The
> pattern match is successful but the output is a single unrecognised
> character (a square).
>
> $string = eregi_replace("<(/?)(scr[^>]*)>", "«font
> color=maroon»\1«/font»",
> $string);
>
> This results in opening and closing  tags being replaced
> with a square being wrapped in font tags. I have this working in
> Cold Fusion
> but cannot seem to convert my scripts to PHP. Can anyone help?
>
> TIA
>
> Phil Ewington.
>
>
> --
> 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-general Digest 3 Aug 2002 17:16:33 -0000 Issue 1503

2002-08-03 Thread php-general-digest-help


php-general Digest 3 Aug 2002 17:16:33 - Issue 1503

Topics (messages 110933 through 110972):

Re: My SQL speed.
110933 by: Manuel Lemos
110934 by: Maxim Maletsky
110941 by: Ilia A.

Re: Need Help with register_globals OFF
110935 by: Monty
110937 by: Justin French
110939 by: Monty

Re: string questions
110936 by: Musone Verdana
110951 by: Danny Shepherd

Re: variables
110938 by: Jason Wong

Re: isset($var) && !empty($var) same time!
110940 by: lallous
110943 by: Musone Verdana
110945 by: lallous
110946 by: Musone Verdana

Re: Protect PHP coding
110942 by: lallous
110948 by: Manuel Lemos
110950 by: Andrey Hristov
110953 by: Manuel Lemos
110957 by: Dennis Moore
110969 by: Acer
110970 by: Rasmus Lerdorf

Re: PHP Hosting
110944 by: Liam MacKenzie

Include php code as variable
110947 by: Alawi
110949 by: Danny Shepherd
110963 by: CC Zona

virtual hosting using php as apache module
110952 by: Ryan

Re: ODBC
110954 by: John Lim

alternative to phpadsnew?
110955 by: Andy
110958 by: Maxim Maletsky
110959 by: Andy

what is equivalent to Response.End ?
110956 by: Ing. Rajesh Kumar
110960 by: Danny Shepherd
110961 by: Lars Olsson

Install
110962 by: Nick Niehoff
110966 by: EdwardSPL.ita.org.mo
110967 by: Bob Lockie

PHP and multiple page .tiffs
110964 by: Joseph Szobody

RegEx (back referencing)
110965 by: Phil Ewington
110968 by: Danny Shepherd
110971 by: Danny Shepherd
110972 by: Phil Ewington

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

--- Begin Message ---

Hello,

On 08/03/2002 01:54 AM, Jason Stechschulte wrote:
> On Sat, Aug 03, 2002 at 01:49:10AM -0300, Manuel Lemos wrote:
> 
>>>Google has 1 billion pages and qurys in a few milliseconds...
>>
>>Real search engines do not use SQL databases.
> 
> 
> What do search engines use?  Is there something out there that explains
> how they work?

They usually use read only DBM like databases that do not have the 
overhead or parsing SQL or doing joins to fetch the data.

-- 

Regards,
Manuel Lemos


--- End Message ---
--- Begin Message ---

Lord Loh. writes:
> How on earth does US Social Security dept. maintain so many records ?
> Google has 1 billion pages and qurys in a few milliseconds...
 


Weel, I work as a consultant on development of a similar system for Italian 
Government. (instead of Social Security numbers it handles all territoric 
matters and related payments, ownershipd to it... etc ...). BTW: software is 
interfaced via PHP. 

In this database, we have over a few billions of records in some few 
thousands databases hosted on some few hundreds servers physically located 
in some few dozens of regions of Italy. 

We use Oracle for it. And, neigher Oracle does magic here. The system is 
deeply thought and organized in all its details. Nothing is left for "a 
case" and everything is very well monitored and backed up. (not mentioning 
the synchronization methods). 

In my experience, mySQL has always failed performance-wise (when not crashed 
complitely) while trying to keep on a database consisting of 1.000.000+ 
records. 

For large DBs I would reccomend you PostgreSQL as it has, in my own opinion 
(and not to start a new thread here) a better ralational mechanism, which is 
crucial (as Manuel mentioned) to design the right logic within your 
application. 

TIP: look for repeating data in your DB, and try to "compress" it somehow. 
Try to see if you can split and reuse the records. Add more supporting 
tables and so on 


Maxim Maletsky
PHP Beginner (www.phpbeginner.com) 


--- End Message ---
--- Begin Message ---

On August 3, 2002 12:54 am, Jason Stechschulte wrote:
> On Sat, Aug 03, 2002 at 01:49:10AM -0300, Manuel Lemos wrote:
> > >Google has 1 billion pages and qurys in a few milliseconds...
> >
> > Real search engines do not use SQL databases.
>
> What do search engines use?  Is there something out there that explains
> how they work?

Generally search egines use various hash algorithms to store their data, such 
as B-trees, Hash Tables, etc... Even that, is not enough when dealing with an 
extremely large dataset, in which case expensive hardware is used to provide 
the necessary IO capacity to allow for fast look ups. If you are trully 
interested in how search engines do this, there are plenty of articles 
describing Google's setup in terms of hardware.

As far as fetching data from large MySQL databases it is not impossible or 
slow as some people claim. I have a 4 million record database in MyS

RE: [PHP] Re: Protect PHP coding

2002-08-03 Thread Acer

I made that statement because this subject has been brought up several times
and nothing has been said from the php gods.  I mean out of this whole
thread, your only comment is "That's probably the most uninformed statement
I have seen posted to this list in a very long time."


-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: August 3, 2002 1:04 PM
To: Acer
Cc: Dennis Moore; Andrey Hristov; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Protect PHP coding


> You'll never hear anything from the core php group since they are a tight
> click so it's business as usual.

That's probably the most uninformed statement I have seen posted to this
list in a very long time.

-Rasmus


--
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] RegEx (back referencing)

2002-08-03 Thread Phil Ewington

Danny,

It still doesn't work, could this be a problem in 4.0.4pl1 ??



> -Original Message-
> From: Danny Shepherd [mailto:[EMAIL PROTECTED]]
> Sent: 03 August 2002 18:11
> To: [EMAIL PROTECTED]; PHP-General
> Subject: Re: [PHP] RegEx (back referencing)
>
>
> If you're trying to get Lots of javascript to look like
> Lots of javascript then this will be a start
>
> $string = eregi_replace('<(/?)(scr[^>]*)>', '<\\1font
> color="maroon">',$string);
>
> This will produce -  Lots of javascript color="maroon"> - not perfect, but a start.
>
> Danny.
>
> - Original Message -
> From: "Phil Ewington" <[EMAIL PROTECTED]>
> To: "Danny Shepherd" <[EMAIL PROTECTED]>
> Sent: Saturday, August 03, 2002 5:52 PM
> Subject: RE: [PHP] RegEx (back referencing)
>
>
> > \\1 outputs nothing at all wrapped in font tags and closing
> tags \ wrapped
> > in font tags :o(
> >
> >
> >
> > > -Original Message-
> > > From: Danny Shepherd [mailto:[EMAIL PROTECTED]]
> > > Sent: 03 August 2002 17:47
> > > To: [EMAIL PROTECTED]; PHP General
> > > Subject: Re: [PHP] RegEx (back referencing)
> > >
> > >
> > > try
> > >
> > > \\1
> > >
> > > - Original Message -
> > > From: "Phil Ewington" <[EMAIL PROTECTED]>
> > > To: "PHP General" <[EMAIL PROTECTED]>
> > > Sent: Saturday, August 03, 2002 5:03 PM
> > > Subject: [PHP] RegEx (back referencing)
> > >
> > >
> > > > Hi,
> > > >
> > > > I am am writing a function to color code and indent
> JavaScript source
> > > using
> > > > regular expressions and cannot seem to get back referencing working.
> The
> > > > pattern match is successful but the output is a single unrecognised
> > > > character (a square).
> > > >
> > > > $string = eregi_replace("<(/?)(scr[^>]*)>", "«font
> > > color=maroon»\1«/font»",
> > > > $string);
> > > >
> > > > This results in opening and closing  tags
> > > being replaced
> > > > with a square being wrapped in font tags. I have this
> working in Cold
> > > Fusion
> > > > but cannot seem to convert my scripts to PHP. Can anyone help?
> > > >
> > > > TIA
> > > >
> > > > Phil Ewington.
> > > >
> > > >
> > > > --
> > > > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] RegEx (back referencing)

2002-08-03 Thread Danny Shepherd

What does the input string contain?

What does the output look like?

It might be a problem with php4.0.4 (I'm using 4.2.2) - why such an old
version?

Danny.

- Original Message -
From: "Phil Ewington" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Saturday, August 03, 2002 6:23 PM
Subject: RE: [PHP] RegEx (back referencing)


> Danny,
>
> It still doesn't work, could this be a problem in 4.0.4pl1 ??
>
>
>
> > -Original Message-
> > From: Danny Shepherd [mailto:[EMAIL PROTECTED]]
> > Sent: 03 August 2002 18:11
> > To: [EMAIL PROTECTED]; PHP-General
> > Subject: Re: [PHP] RegEx (back referencing)
> >
> >
> > If you're trying to get Lots of javascript to look like
> > Lots of javascript then this will be a start
> >
> > $string = eregi_replace('<(/?)(scr[^>]*)>', '<\\1font
> > color="maroon">',$string);
> >
> > This will produce -  Lots of javascript > color="maroon"> - not perfect, but a start.
> >
> > Danny.
> >
> > - Original Message -
> > From: "Phil Ewington" <[EMAIL PROTECTED]>
> > To: "Danny Shepherd" <[EMAIL PROTECTED]>
> > Sent: Saturday, August 03, 2002 5:52 PM
> > Subject: RE: [PHP] RegEx (back referencing)
> >
> >
> > > \\1 outputs nothing at all wrapped in font tags and closing
> > tags \ wrapped
> > > in font tags :o(
> > >
> > >
> > >
> > > > -Original Message-
> > > > From: Danny Shepherd [mailto:[EMAIL PROTECTED]]
> > > > Sent: 03 August 2002 17:47
> > > > To: [EMAIL PROTECTED]; PHP General
> > > > Subject: Re: [PHP] RegEx (back referencing)
> > > >
> > > >
> > > > try
> > > >
> > > > \\1
> > > >
> > > > - Original Message -
> > > > From: "Phil Ewington" <[EMAIL PROTECTED]>
> > > > To: "PHP General" <[EMAIL PROTECTED]>
> > > > Sent: Saturday, August 03, 2002 5:03 PM
> > > > Subject: [PHP] RegEx (back referencing)
> > > >
> > > >
> > > > > Hi,
> > > > >
> > > > > I am am writing a function to color code and indent
> > JavaScript source
> > > > using
> > > > > regular expressions and cannot seem to get back referencing
working.
> > The
> > > > > pattern match is successful but the output is a single
unrecognised
> > > > > character (a square).
> > > > >
> > > > > $string = eregi_replace("<(/?)(scr[^>]*)>", "«font
> > > > color=maroon»\1«/font»",
> > > > > $string);
> > > > >
> > > > > This results in opening and closing  tags
> > > > being replaced
> > > > > with a square being wrapped in font tags. I have this
> > working in Cold
> > > > Fusion
> > > > > but cannot seem to convert my scripts to PHP. Can anyone help?
> > > > >
> > > > > TIA
> > > > >
> > > > > Phil Ewington.
> > > > >
> > > > >
> > > > > --
> > > > > 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 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] Re: Protect PHP coding

2002-08-03 Thread Scott

On Sat, 3 Aug 2002, Acer wrote:
> You'll never hear anything from the core php group since they are a tight
> click so it's business as usual.

You're kidding, right?  When was the last time you saw one the creator of 
ASP on a mailing list personally answering code questions?  

For what it's worth, I just left a 50,000 employee company that would not 
let me use PHP in production until I showed them the Zend suite of 
products.  When I asked for the money to buy their IDE and it arrived I 
was allowed to move my PHP code to production.  Same deal as Sun now 
charging for Star Office, in corporate eyes they now see a company making 
money from a product which will give the company the ability to enhance 
the product and most important provide support.

So, while we all may not be able to afford some of the tools that Zend is 
creating they continue to have a dedication to the open source community.  
I view it as the better Zend does, the more developers they can hire and 
the better all of the products will be including their contributions to 
PHP.

-Scott


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




RE: [PHP] Re: Protect PHP coding

2002-08-03 Thread Acer

Don't get me wrong rasmus, I don't have any problems with you.  It's just
fishy when some guy in the UK was able to put together a php accelerator for
free and a php encoder for $0.50 a pop while zend is charging several
thousands.  You have to wonder how much work zend is actually putting into
their products to justify the price.  Plus, these guys are the ones building
php so something is not right.



-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: August 3, 2002 1:04 PM
To: Acer
Cc: Dennis Moore; Andrey Hristov; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Protect PHP coding


> You'll never hear anything from the core php group since they are a tight
> click so it's business as usual.

That's probably the most uninformed statement I have seen posted to this
list in a very long time.

-Rasmus


--
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] encoders

2002-08-03 Thread Bob Lockie

Can someone point me to some articles on PHP encoding?
It would seem to me that making an interpreted language impossible to read
an impossible task.
Hard to read would be possible.




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




[PHP] Regular Expressions (PCRE library)

2002-08-03 Thread Jürgen

Hello!

It´s driving me nuts, am in the middle of reading Mastering Regular
Expressions (O'Reilly), and because i like to learn whilst doing, well, you
can picture the rest.

Anybody please tell me why the following is not working

$test = "Hello, end why is not workin, END.";

//before
echo $test .  "";

//Finds beginning of a line, followed by e or E, and replaces it with A. At
least it should do it, but it doesn't ?
$tes = preg_replace("/^[eE]/", "A",  $test);

//after
echo $tes;

Now i know damn well that this is a real simple example, and thus failing
here already makes me feel quite frustrated.

Any help or explanations as to what is wrong in the above example along with
a little explanation would be greatly appreciated!

Thanks a lot in advance for your time reading.

Best regards from Vienna,
Jürgen



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




RE: [PHP] Re: Protect PHP coding

2002-08-03 Thread Rasmus Lerdorf

There are nearly 600 people with cvs commit access to cvs.php.net.  Saying
that Zend are the ones building PHP is a gross injustice to the majority
of the people working on PHP.  I have absolutely no relationship with Zend
and I have built big chunks of PHP as have countless others with nothing
to gain from Zend commercializing anything.

Commercial interest in the PHP market is simple fact that comes from PHP's
overwhelming success.  It is a sign of the project's maturity and there is
absolutely nothing wrong with it.  And if I had to choose between
commercial interests also contributing to PHP itself vs. not contributing,
I would much prefer them to contribute things.  There are plenty of
companies selling into the PHP space without contributing anything back to
PHP.  So, faulting Zend for having both commercial products and also
contributing to PHP itself makes very little sense to me.

Finally, you are arguing about commercial software pricing not matching
the effort that goes into making it?  C'mon, if all commercial software
was priced simply to recoup development costs, then Windows should cost
about 2 cents and Oracle about a dime.

The bottom line is that there is no conspiracy here.  The PHP Group is far
from a tightknit group that agrees on everything.  In fact we disagree on
just about everything you can imagine and we are certainly not a group of
people who sit around with nothing to do except help Zend make money.  You
will find if you poke around a little bit, several members, including
myself, have helped projects that make free alternatives to various
commercial products from Zend and other companies.

-Rasmus

On Sat, 3 Aug 2002, Acer wrote:

> Don't get me wrong rasmus, I don't have any problems with you.  It's just
> fishy when some guy in the UK was able to put together a php accelerator for
> free and a php encoder for $0.50 a pop while zend is charging several
> thousands.  You have to wonder how much work zend is actually putting into
> their products to justify the price.  Plus, these guys are the ones building
> php so something is not right.
>
>
>
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: August 3, 2002 1:04 PM
> To: Acer
> Cc: Dennis Moore; Andrey Hristov; [EMAIL PROTECTED]
> Subject: RE: [PHP] Re: Protect PHP coding
>
>
> > You'll never hear anything from the core php group since they are a tight
> > click so it's business as usual.
>
> That's probably the most uninformed statement I have seen posted to this
> list in a very long time.
>
> -Rasmus
>
>
> --
> 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] Re: Protect PHP coding

2002-08-03 Thread Rasmus Lerdorf

Because it is a silly thread and I shouldn't be replying at all.  Others
in the group either have more sense or have given up on answering
php-general questions.

My view on encoders is that they are unnecessary and rather evil.  I would
never ever purchase a php-based application that did not come with the php
source code.  If you want to restrict your code somehow, do it through a
license.  People who choose to violate that license are the same people
who will hack your encoded scripts anyway.  And this way the honest
customers will have the benefit of the code to customize, learn from,
build on top of.  Closed source stuff stifles innovation and I personally
refuse to work on a PHP encoder for this reason.  Imagine if I had never
released the source for PHP?  We would not be having this discussion
today.

I know plenty of people disagree with this view, but there you have it.

-Rasmus

On Sat, 3 Aug 2002, Acer wrote:

> I made that statement because this subject has been brought up several times
> and nothing has been said from the php gods.  I mean out of this whole
> thread, your only comment is "That's probably the most uninformed statement
> I have seen posted to this list in a very long time."
>
>
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: August 3, 2002 1:04 PM
> To: Acer
> Cc: Dennis Moore; Andrey Hristov; [EMAIL PROTECTED]
> Subject: RE: [PHP] Re: Protect PHP coding
>
>
> > You'll never hear anything from the core php group since they are a tight
> > click so it's business as usual.
>
> That's probably the most uninformed statement I have seen posted to this
> list in a very long time.
>
> -Rasmus
>
>
> --
> 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] Regular Expressions (PCRE library)

2002-08-03 Thread Jason Wong

On Sunday 04 August 2002 01:44, Jürgen wrote:

> Anybody please tell me why the following is not working
>
> $test = "Hello, end why is not workin, END.";
>
> //before
> echo $test .  "";
>
> //Finds beginning of a line, followed by e or E, and replaces it with A. At
> least it should do it, but it doesn't ?
> $tes = preg_replace("/^[eE]/", "A",  $test);

This should work. However if you're using $test as defined above it does not 
start with 'e' or 'E' so what output did you expect??


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Bershere's Formula for Failure:
There are only two kinds of people who fail: those who
listen to nobody... and those who listen to everybody.
*/


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




[PHP] Include problems

2002-08-03 Thread Scott

I have PHP4 on both a windows IIS server and a windows apache server.  The
include function only works in the same directory of the file I wish to
access.

ex.  www.include.com/default.php
all files in same directory (i guess the root)?


everything works fine.  Here's where I have the problem.

Now I want to store all my includes in one directory   www.include.com/inc


that doesn't work>>>
Warning: Failed opening 'test.inc' for inclusion (include_path='')

Can anyone help me with this???

Thanks
scott




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




[PHP] Re: Include problems

2002-08-03 Thread Peter

try using the absolute path to the file e.g.
include("C:/windows/webserver/httproot/inc/test.inc");


"Scott" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have PHP4 on both a windows IIS server and a windows apache server.  The
> include function only works in the same directory of the file I wish to
> access.
>
> ex.  www.include.com/default.php
> all files in same directory (i guess the root)?
>  include 'test.inc'
> ?>
>
> everything works fine.  Here's where I have the problem.
>
> Now I want to store all my includes in one directory   www.include.com/inc
>
>  include 'inc/test.inc'
> ?>
> that doesn't work>>>
> Warning: Failed opening 'test.inc' for inclusion (include_path='')
>
> Can anyone help me with this???
>
> Thanks
> scott
>
>
>



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




RE: [PHP] Include problems

2002-08-03 Thread Daniel Kushner

include 'inc/test.inc' will work fine if you add your root directory to your
include_path (in the c:\winnt\php.ini file).


Daniel Kushner
[EMAIL PROTECTED]

Need hosting? http://www.TheHostingCompany.us/

> -Original Message-
> From: Scott [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 03, 2002 3:11 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Include problems
>
>
> I have PHP4 on both a windows IIS server and a windows apache server.  The
> include function only works in the same directory of the file I wish to
> access.
>
> ex.  www.include.com/default.php
> all files in same directory (i guess the root)?
>  include 'test.inc'
> ?>
>
> everything works fine.  Here's where I have the problem.
>
> Now I want to store all my includes in one directory   www.include.com/inc
>
>  include 'inc/test.inc'
> ?>
> that doesn't work>>>
> Warning: Failed opening 'test.inc' for inclusion (include_path='')
>
> Can anyone help me with this???
>
> Thanks
> scott
>
>
>
>
> --
> 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] starting Apache

2002-08-03 Thread Nick Niehoff

I finally got php 4.2.2 installed with Apache 2.0.39
on RedHat 7.2.  However when I restart the httpd
service, I get the following error:

Starting httpd: Syntax error on line 230 of
/www/conf/httpd.conf:
Cannot load /www/modules/libphp4.so into server:
/www/modules/libphp4.so: undefined symbol:
ts_resource_ex

Can Anyone Help?
Nick

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




[PHP] User Authentication Problem

2002-08-03 Thread Tony Harrison

Hi, I need to authenticate users on an included page on my website, but the
problem is, I cant get it to work.
view it included at http://members.lycos.co.uk/ajohnh/ (Source at
http://members.lycos.co.uk/ajohnh/source/index.txt)
the actual file:
http://members.lycos.co.uk/ajohnh/templates/twoShea/head.php (source at
http://members.lycos.co.uk/ajohnh/source/head.txt)
the location of the script that sets the cookie (I hard-coded the user and
password combo for user ramonezrule into it):
http://members.lycos.co.uk/ajohnh/templates/twoShea/setcookie.php (source
at: http://members.lycos.co.uk/ajohnh/source/setcookie.txt)






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




RE: [PHP] Re: Protect PHP coding

2002-08-03 Thread Maxim Maletsky

Well said, Rasmus.

- Maxim Maletsky



-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, August 03, 2002 8:06 PM
To: Acer
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Protect PHP coding

Because it is a silly thread and I shouldn't be replying at all.  Others
in the group either have more sense or have given up on answering
php-general questions.

My view on encoders is that they are unnecessary and rather evil.  I
would
never ever purchase a php-based application that did not come with the
php
source code.  If you want to restrict your code somehow, do it through a
license.  People who choose to violate that license are the same people
who will hack your encoded scripts anyway.  And this way the honest
customers will have the benefit of the code to customize, learn from,
build on top of.  Closed source stuff stifles innovation and I
personally
refuse to work on a PHP encoder for this reason.  Imagine if I had never
released the source for PHP?  We would not be having this discussion
today.

I know plenty of people disagree with this view, but there you have it.

-Rasmus

On Sat, 3 Aug 2002, Acer wrote:

> I made that statement because this subject has been brought up several
times
> and nothing has been said from the php gods.  I mean out of this whole
> thread, your only comment is "That's probably the most uninformed
statement
> I have seen posted to this list in a very long time."
>
>
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: August 3, 2002 1:04 PM
> To: Acer
> Cc: Dennis Moore; Andrey Hristov; [EMAIL PROTECTED]
> Subject: RE: [PHP] Re: Protect PHP coding
>
>
> > You'll never hear anything from the core php group since they are a
tight
> > click so it's business as usual.
>
> That's probably the most uninformed statement I have seen posted to
this
> list in a very long time.
>
> -Rasmus
>
>
> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Regular Expressions (PCRE library)

2002-08-03 Thread Jürgen


Well, i know it should work, but it does not work.
Even if i Change the first letter into e or E it does not work.

This is so frustrating, this is prolly the most easiest regular expression i
could start with and yet i fail and nobody seems to know why it aint working
neither

> This should work. However if you're using $test as defined above it does
not
> start with 'e' or 'E' so what output did you expect??
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk




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




Re: [PHP] RegEx (back referencing)

2002-08-03 Thread Danny Shepherd

Ok, a very slightly modified version of your first attempt should work then

$fcontent = eregi_replace("<(/?)(scr[^>]*)>", "«font
color=maroon»\\0«/font»", $fcontent);

Note the \\0 instead of \\1

HTH

Danny.

- Original Message -
From: "Phil Ewington" <[EMAIL PROTECTED]>
To: "Danny Shepherd" <[EMAIL PROTECTED]>
Sent: Saturday, August 03, 2002 8:54 PM
Subject: RE: [PHP] RegEx (back referencing)


> Danny,
>
> OK, the input string is the contents of a file, the idea is to output
color
> coded and indented code in HTML. So searching for  and replace
with
>