[PHP] Online Membership Script

2001-08-29 Thread monfort


Hello all,

I'm working on an online membership system, for a pay-per-view website. 
I'm looking for a user authentication system that does the following:

-implements 'members only' pages
-process membership registration (backed by mysql)
-online credit card processing(using authorize.net)
-reocuring billing (monthly, quarterly, etc.)
-activate/deactivate members accounts
-mass mailling  to registered members
-etc.

Please help.
-john


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Need info-reg Memory leakage tool

2001-08-29 Thread senthilvellan

Hello techies,
 In Java automatic garbage collection is there.How abt
PHP?. Is there any tool(open source/free ware)  to test the memory
leakage.If it so where i can get that tool?Any suggestions will be
appreciated.
Thanks in advance.
SenthilVellan.






[PHP] Crashing IIS?

2001-08-29 Thread Jason Murray

Hi folks,

I had the ... dubious ... pleasure of running some PHP code on an 
IIS system recently and noticed a peculiar occurrence... 

I called setCookie(), and something in it caused IIS to crash. Dead.
Gone. Shuffled off this mortal coil. Stuffed. Like a parrot. :)

As an alternative, I instered manual Header() commands to get the
same effect as setCookie(). Same thing. Dead. Stuffed. Etc.

Has anyone encountered this kind of muckup...? And if so, what
did you do about it?

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"Work now, freak later!"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Server Setup

2001-08-29 Thread Ralph Guzman

I am working on setting up a Red Hat Linux Web Server. Is there a benefit to
installing PHP/MySQL/Apache by compiling them from source vs. installing
these using RedHat's Binary/RPM distributions?

What are the pro's and con's of these two methods? Can anybody suggest any
pointers considering stability, efficiency, and easy upgrades?

Thanks in advance.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] pdflib + pdf_findfont

2001-08-29 Thread Matthew Loff


I got the same error message, and couldn't figure out why...

In the example for pdf_findfont(), it has:

$font = pdf_findfont($pdf, "Times New Roman", "winansi", 1);

Try changing your embed parameter to 0...

$font = pdf_findfont($pdf, "Times New Roman", "winansi", 0);

... That fixed it for me.  Give it a try.

--Matt


-Original Message-
From: Adam Oliver [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 29, 2001 9:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] pdflib + pdf_findfont


I can't get pdf_findfont to work in Linux.  I keep getting a message
that the font metrics are not found.  It works fine in windows.  Anybody
have any ides what I need to have set?

--
--
Adam Oliver
http://www.meyedev.com/people/aoliver.htm
[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Server Setup

2001-08-29 Thread Dan Harrington


In the short run, its faster to install packages, and allows for easy upgrades.
In the long run, if you compile from scratch you will get to know the system,
you'll know more how it works, and it is (in my experience) MUCH more stable
to compile it from source.  I've installed PHP/MySQL/Apache combo on maybe
200 machines, and the numbers are for compiling everything from scratch.

Dan


> -Original Message-
> From: Ralph Guzman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 29, 2001 11:23 PM
> To: PHP General Mailing List
> Subject: [PHP] Server Setup
> 
> 
> I am working on setting up a Red Hat Linux Web Server. Is there a benefit to
> installing PHP/MySQL/Apache by compiling them from source vs. installing
> these using RedHat's Binary/RPM distributions?
> 
> What are the pro's and con's of these two methods? Can anybody suggest any
> pointers considering stability, efficiency, and easy upgrades?
> 
> Thanks in advance.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Posting to oneself

2001-08-29 Thread Alexander Skwar

So sprach »Johnson, Kirk« am 2001-08-29 um 17:37:27 -0600 :
> Check if register_globals is off in php.ini. If it is, you will need to

Easiest to check this (and a load of other settings), is to create a
small PHP file, which contains nothing but:



Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 17 hours 20 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Server Setup

2001-08-29 Thread N. Pari Purna Chand


I have never used a binary version (rpm or tar)
as I use slackware. Both PHP and Mysql have been recently added
to the distribution.So I have been using src all the time.

U'll certainly have some performance gain by
compiling the src.
But the default Redhat 7.1's php distribution is very good.
It is ready out of box for every thing.
GD, Mysql, IMAP etc. You don't just have to configure anything.

/Chandu


> I am working on setting up a Red Hat Linux Web Server. Is there a
> benefit to installing PHP/MySQL/Apache by compiling them from source
> vs. installing these using RedHat's Binary/RPM distributions?
> 
> What are the pro's and con's of these two methods? Can anybody suggest
> any pointers considering stability, efficiency, and easy upgrades?
> 
> Thanks in advance.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] The future of PHP or my 2 cents

2001-08-29 Thread Matthew A. Schneider

Although Fred's comments appear rhetorical, the suggestion has some merit.
Anyone have a feel for how many PHP devotees are out there? How many people
subscribe to this list? Do these numbers make it feasible to ask for a $1-10
contribution? How about $0.02 from each of the 7 million domains running
PHP?

There, that was my 2 cents worth. Or was that a 2 bit opinion? (I'll leave
the next joke to the group)

Also, I'll be proactive. Send all monies to me ;)

Matthew A. Schneider

- Original Message -
From: "Frederick L. Steinkopf" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 29, 2001 5:55 AM
Subject: Re: [PHP] The future of PHP


> Manuel,
> Rather than whining about the future of PHP, why don't you be proactive
and
> take on the goal of raising the $100,000 for the project?
> Fred Steinkopf



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Checksum Question

2001-08-29 Thread _lallous

no idea! try using md5() instead,

"Rm" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> In php cr32 will create a checksum number, 10 digits,
> in linux cksum will create one of 9 digits and sum
> linux will generate a 5 digit number. We use these
> numbers in a db field to determine if a file has
> changed and needs to be reviewed, redone,
> whatever...rather than keep the orginal file on hand.
> Given the task at hand and given I'm confused about
> why there are different length numbers, is there one
> particular option that allows for better change
> checking..or is it simply a matter of longer is
> better...I mean the longer the checksum number the
> better.
>
> rm
>
> __
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo!
Messenger
> http://im.yahoo.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: install error

2001-08-29 Thread _lallous

from this line, i guess that Apache is not installed?

> apxs:Warning: /usr/bin/httpd not found or not executable


"Joseph Bannon" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> What does this mean?
>
>
>
> make[1]: Entering directory `/home/php-4.0.6'
> /home/php-4.0.6/build/shtool mkdir -p "/usr/lib/apache" &&
/usr/sbin/apxs -S
> LIBEXECDIR="/usr/lib/apache" -i -a -n php4 libs/libphp4.so
> apxs:Warning: /usr/bin/httpd not found or not executable
> apxs:Warning: Continuing anyway...
> apxs:Warning: No shared object support for Apache
> apxs:Warning: available under your platform. Make sure
> apxs:Warning: the Apache module mod_so is compiled into
> apxs:Warning: your server binary `/usr/bin/httpd'.
> apsx:Warning: Continuing anyway...
> apxs:Error: Unknown option: S
> Usage: apxs -g -n 
>apxs -q  ...
>apxs -c [-o ] [-D [=]] [-I ]
>[-L ] [-l ] [-Wc,] [-Wl,]
> ...
>apxs -i [-a] [-A] [-n ]  ...
> make[1]: *** [install-sapi] Error 1
> make[1]: Leaving directory `/home/php-4.0.6'
> make: *** [install-recursive] Error 1



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Send mail via exact account

2001-08-29 Thread Rosen

Hi,
I want to send mail via exact account ( i.e. [EMAIL PROTECTED] ).

can I do it with php ?

Thanks
Rosen



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Send mail via exact account

2001-08-29 Thread Jason Murray

> I want to send mail via exact account ( i.e. [EMAIL PROTECTED] ).
> can I do it with php ?

Yes, in future please check the PHP manual before asking, as the manual
entry for mail() specifically mentions this purpose.

mail("[EMAIL PROTECTED]", "subject", "mail",
 "From: [EMAIL PROTECTED]\nReply-to: [EMAIL PROTECTED]\n");

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"Work now, freak later!"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Database Preference?

2001-08-29 Thread Michael

James wrote:
> 
> We have several GUI applications that we are preparing to convert to
> web-based applications, based primarily on PHP.  The applications are based
> on Informix On-Line (on a SCO Unix server) and MS SQL (on NT).  Since we
> will be doing a port, in any case, I am wondering your thoughts on whether
> MySQL may be a better database solution.  This is particularly important
> from a price-performance point of view since the other two databases are
> quite pricy on a per-seat basis.
> 
> TIA,
> James

Postgresql - www.postgresql.org is opensource and is probably a better
choice than MYsql, MYsql lacks sub slects, foreign keys and all sorts of
things you would be used to.
You can even look at firebird http://firebird.sourcefoge.net or SAPDB
www.sapdb.org which are both open source.
Database abstraction layers are fine but they can't properly replicate
functionality that doesn't exist in a database.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: The future of PHP - object model

2001-08-29 Thread Geoff Caplan

Hi folks

While we are on the subject of strategic issues for PHP, a quick question on
the OOP functionality.

As many on this list will know, there is a peculiarity with the PHP object
model - in many situations it creates a copy of an instance when you would
expect a reference. This means that you have to constantly remember to
create references with &, adding an extra source of hard-to-find bugs.

Are there any plans to sort this out? It rather disfigures the language.

Yes, I know PHP was conceived as a functional language, but a high
percentage of the more sophisticated applications make use of its object
functionality - you just have to look at the script download sites to see
that this is true. Both Perl and C/C++ are examples of successful hybrid
languages. With just a little extra work, PHP could join this list...

Geoff Caplan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: The future of PHP -- accessory libraries

2001-08-29 Thread Geoff Caplan

Hi folks

I asked my ISP to flesh out their negative comments about adding libraries
to PHP.

This is their reply - is there anything in this, or are they
misunderstanding the situation?

>
We run servers. We want to compile stuff from source, for obvious reasons!
As such, the question is simple and obvious: why does so much in PHP rely
on the core's compile-time. Why can't there be run-time or DSO inclusion
later on, as with Perl. Basically, PHP has really screwed up in this
monolythic design which was all very well when it was a simple templating
system, but now it's grown to a full-grown language, the scalability,
flexibility and namespace issues are becoming untennable. I note that
something called "Pear" appears in later compilations of the PHP core. I
assume this is some attempt at including Perl's library system and,
eventually, a CPAN-a-like?
>>>

I'm not so sure why they prefer to compile from source - why wouldn't they
trust a professional distro?

Geoff Caplan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: The future of PHP - accessory libraries

2001-08-29 Thread Geoff Caplan

Rasmus

>
> That's a pretty good list.  And the Mandrake and Debian packages are every
> bit as complete.  I am not as familiar with SuSE nor the fbsd port, but I
> would be very surprised if they were not very close to, if not better
> than, the current RedHat rpms.
>

Thanks for the education - I have an ancient version of RedHat and didn't
realise that things have moved on so much. When I upgrade I just compile the
distro from the php.net. Now I know better... Perhaps there could be
some notes about what the commercial distros can offer in the
download area of the site - I suspect there are many who
are not aware of this...

> What exactly
> is the ISP having trouble with?  What is the error message?  What sort of
> setup do they have?  Or, is the problem really that they are just more
> familiar with other technologies and are just feeding you a line to get
> you to go away?
>

I will pass on your post to them and ask them precisely that. I know they
are using SuSE, but that has the reputation of being the best distro for
integrating other applications, so I will try to get a better handle on
what the problem is.

Thanks again

Geoff Caplan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] fix my query please

2001-08-29 Thread Papp Gyozo

Well,

T1 INNER JOIN T2
For each row R1 of T1, the joined table has a row for each row in T2 that
satisfies the join condition with R1.

T1 LEFT OUTER JOIN T2
First, an INNER JOIN is performed. Then, for each row in T1 that does not
satisfy the join condition with any row in T2, a joined row is returned with
NULL values in columns of T2. Thus, the joined table unconditionally has at
least one row for each row in T1.

and as you can see join condition is nothing to do with equality of
respective columns, which means you can state any kind of join condition
(non-equal as well as equal join)

- Original Message -
From: ERISEN, Mehmet Kamil <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 28, 2001 10:46 PM
Subject: Re: [PHP] fix my query please


> Hello Jeremy,
> Two things:
> FROM users LEFT OUTER JOIN picks using(id)
> > Where  users.uid <> picks.user_id
> 1- when you do OUTER join, you do NOT have to use the <>.
> That's what outher join means.
> 2- what is id? Is it a column?  shouldn't it be uid?
> Maybe that's your problem.
>
> --- Jeremy Morano <[EMAIL PROTECTED]> wrote:
> > an somebody please fix up my query.
> >
> >
> >
> >
> > $connection = @mysql_connect("l", "c", "c") or
> > die("Couldn't connect.");
> >
> > $db = @mysql_select_db($db_name, $connection) or
> > die("Couldn't select
> > database.");
> >
> >
> >
> > $sql = "SELECT distinct users.uid , users.username
> > FROM users LEFT OUTER JOIN picks using(id)
> > Where  users.uid <> picks.user_id
> > ";
> >
> >
> >
> > $result = @mysql_query($sql,$connection) or die("Couldn't
> > execute query.");
> >
> >
> > while ($row = mysql_fetch_array($result)) {
> > $usersleft = $row['username'];
> > $uid = $row['uid'];
> >
> > $my_string="$usersleft";
> >
> > echo $my_string;
> > }
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> =
> Mehmet Erisen
> http://www.erisen.com
>
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: The future of PHP - accessory libraries

2001-08-29 Thread Rasmus Lerdorf

> Being practical, the vast majority of serious PHP applications will be
> running on Linux. If you were to cover RedHat, and .rpm compatible distros
> such as SuSE, you would cover the requirements of perhaps the majority of
> users.

But RedHat, SuSE, Mandrake, Debian and FreeBSD already have designated
people who do exactly this.  For example, have a look here:

http://rpmfind.net/linux/RPM/rawhide/1.0/i386/PByName.html

Note the php-* rpms:

php-4.0.6-6
php-devel-4.0.6-6
php-imap-4.0.6-6
php-ldap-4.0.6-6
php-manual-4.0.6-6
php-mysql-4.0.6-6
php-odbc-4.0.6-6
php-pgsql-4.0.6-6

And before you go off and complain about all the missing ones, take a look
at all the dependencies for the base php rpm:

  libbz2.so.1
  libcrypto.so.2
  libcrypt.so.1
  libc.so.6
  libcurl.so.1
  libdb-3.2.so
  libdl.so.2
  libfreetype.so.6
  libgdbm.so.2
  libgd.so.1.8
  libjpeg.so.62
  libltdl.so.3
  libmm.so.11
  libm.so.6
  libnsl.so.1
  libpam.so.0
  libpng.so.2
  libpspell-modules.so.1
  libpspell.so.4
  libresolv.so.2
  libssl.so.2
  libstdc++-libc6.2-2.so.3
  libttf.so.2
  libxml2.so.2
  libz.so.1

That's a pretty good list.  And the Mandrake and Debian packages are every
bit as complete.  I am not as familiar with SuSE nor the fbsd port, but I
would be very surprised if they were not very close to, if not better
than, the current RedHat rpms.

I don't agree that we should take away the responsibility of creating
these binary distributions of PHP from the distribution maintainers out
there.  If they are not doing a good job, or if there are specific
problems with their packaging of PHP, submit a bug report to them.  If
they determine that something in PHP itself it preventing them from
packaging it nicely, they will hopefully let us know and we can address
it.

> What do you think? Does any of this suggest a practical way forward?

Not really no, since I still don't have anything concrete to go on.  "I
have heard that ...", "someone said that it didn't work..."  Stuff like
this doesn't really give us anything to sink out teeth into.  What exactly
is the ISP having trouble with?  What is the error message?  What sort of
setup do they have?  Or, is the problem really that they are just more
familiar with other technologies and are just feeding you a line to get
you to go away?

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] real optional parameters

2001-08-29 Thread Papp Gyozo

yes, you just declare the default value of the arguments such as :

my_function ($first = 'no-value', $second = 0, $third = null )

Note that the default value must be a constant expression and any defaults
should be on the right side of any non-default arguments

or you can achieve the very pretty function-overloading using the funtion
handling function. Check it out:

http://www.php.net/manual/en/function.func-get-arg.php
http://www.php.net/manual/en/function.func-get-args.php
http://www.php.net/manual/en/function.func-num-args.php

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 29, 2001 2:22 PM
Subject: [PHP] real optional parameters


>
>   How can I declare optional parameters as used by strpos, substr, etc.
>   to specify the offset? I do not want to have to preceed some functions
>   with the @-operator, and preceeding all for consistency wouldn't be an
>   option, I think. Is it possible at with user-defined functions?
>
>  quick help is appreciated. thanks.
>
>   D. Alvarez Arribas <[EMAIL PROTECTED]>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: The future of PHP -- accessory libraries

2001-08-29 Thread Rasmus Lerdorf

> Hi folks
>
> I asked my ISP to flesh out their negative comments about adding libraries
> to PHP.
>
> This is their reply - is there anything in this, or are they
> misunderstanding the situation?
>
> >
> We run servers. We want to compile stuff from source, for obvious reasons!
> As such, the question is simple and obvious: why does so much in PHP rely
> on the core's compile-time. Why can't there be run-time or DSO inclusion
> later on, as with Perl. Basically, PHP has really screwed up in this
> monolythic design which was all very well when it was a simple templating
> system, but now it's grown to a full-grown language, the scalability,
> flexibility and namespace issues are becoming untennable. I note that
> something called "Pear" appears in later compilations of the PHP core. I
> assume this is some attempt at including Perl's library system and,
> eventually, a CPAN-a-like?
> >>>
>
> I'm not so sure why they prefer to compile from source - why wouldn't they
> trust a professional distro?

Well, I tend to prefer compile from source as well.  I guess they simply
don't realize that you can compile most of the extensions as shared
libraries and configure what should be loaded at runtime in the php.ini
file.

So it looks like this is mostly a documentation issue.  We have not done a
good job educating the ISPs out there.  But they should have been able to
figure this out by looking at how PHP is packaged by the various
distribution vendours.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Embedding PHP in C

2001-08-29 Thread Bopolissimus Platypus

On Tue, 28 Aug 2001 11:19:01 -0500, [EMAIL PROTECTED] (Chris Wilson)
wrote:

>I'm doing a project for which I want to have a C/C++ act as a process proxy
>for which can pass information and retrieve information from a called PHP
>script. I think that can be done in perl however perl I don't take is the
>best langauge. I've fell in love with PHP and would love use it and avoid
>have to call PHP from the commandline and parsing the outputs.
>
>Any suggestion on if this can be done or any other langauge that do the
>trick besides PERL..

i can think of several:

  1. write an extension.  it'd probably have to be C though, or you'd
  have to figure out the name-mangling if you wanted C++ in there.
 *while this is powerful, i would avoid it, myself because i

  prefer to work in C++ and the linking problems would take
  too much effort and time to deal with.

  2. use pipes (popen) on the C/C++ process.  
A.  this is an easy way to do things if the C/C++ thing is 
 a one-shot deal (set command line params, read 
 answer in stdout or return value).  

B.  it's also a reasonable solution if you have half-duplex
 pipes and you only need to send data once (on command
 line) and read many lines of answer (use read mode, so
 "r").  or you need to send a lot of data to the program
 and you only need it to return a status code (use "w"
 mode and encode reply in return value from main(...)).

   C.  this can be a general solution if your system supports
full-duplex pipes (popen mode is "rw") since you can
then set up as much interactivity as you want between
PHP and your external program.

  using pipes and exec can be expensive.  think about usage
  patterns before committing to this approach.  it's a nice 
  thing for quick and dirty solutions though.

  3.  write an application server.  there are two types, both
   types have some common features.  in general, you ask
   the application server to perform a service for you, you
   give it parameters, and it returns the answer.

   A.  socket based server.  the server sits on a socket,
PHP opens connections to that socket and the
server returns the answer back through the socket.

  B.  exec or CGI based server.  if the server is an external
   program that conforms to CGI, it could just be
   invoked via something like fopen("http://","r";);
   you pass it parameters through GET (urlencoded 
   on the command line) and you read lines from the
   program.

a socket based server (either fork-style, like apache, or
using select so single-daemon style, or perhaps using
threads, on OSs that support them) is probably the least
CPU intensive, but it's also harder to write.

i've done all of the above, but with another language and
C/C++, not PHP.  with PHP i've used the popen thing
with good success (it's the most convenient solution),
but you really need to think about usage patterns there
because spawning off processes like that is expensive
and will affect server responsiveness when you start
getting a lot of hits.  my applications were only hit
once every 15 to 30 minutes or so, so efficiency of
resource use wasn't a big deal :).
  
hth,

tiger   


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




<    1   2   3