Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re^4: Preaching Perl gospel to PHP converts...

by Anonymous Monk
on Feb 05, 2003 at 19:15 UTC ( [id://232896]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Preaching Perl gospel to PHP converts...
in thread Preaching Perl gospel to PHP converts...

The way I understand it, I have to pick which "modules" I want PHP to use before compiling it. If I want to change those, add new modules or upgrade some then I have to do the ./configure (with scads of options); make; make test; make install dance. At least with perl if I want to upgrade or add DBD::Pg it is separate from the perl core so I'm not forced to do the equivalent of recompiling perl and mod_perl.

You are very confused. PHP offers native support for such things as imap and mysql. This is considered a *good* thing, but you have the choice of compiling php with or without such support. You don't compile PHP with "modules". PHP offers PEAR, which is similar in some respects to CPAN. You should read the FAQs on php.net.

Replies are listed 'Best First'.
Re^6: Preaching Perl gospel to PHP converts...
by diotalevi (Canon) on Feb 05, 2003 at 19:23 UTC

    PHP offers native support for such things as imap and mysql. This is considered a *good* thing, but you have the choice of compiling php with or without such support. You don't compile PHP with "modules". PHP offers PEAR, which is similar in some respects to CPAN. You should read the FAQs on php.net.
    Yes, and that's what I'm wondering about. So if I compile PHP with a particular version of gd built in or don't include it at all, how do you upgrade that later? My inexperienced interpretation is that I'd have to recompile PHP to upgrade or add gd.

    Added Oh yeah, and it's that going-back and recompiling PHP that I categorized as 'torture'.


    Seeking Green geeks in Minnesota

      If you want native support and you installed PHP as a DSO, you would just type "make clean" (to get rid of previous configuration settings and makefiles), add the new configuration option to your configuration command, then type "make" and "make install" to build a new module. This new PHP module will be dumped in the proper location for Apache, and all you have to do is restart Apache for the proper module to be loaded, not recompile it. What is so difficult about this?

      PEAR is PHP's answer to CPAN. It is in its infancy, but it already offers many useful PHP classes. Many popular Perl modules have been (and are being) ported. You wouldn't have to recompile PHP to use one of the PEAR packages.

        So then to complete the question - if I wanted to add gd to PHP post-installation then everything is always available through PEAR? If so then that's alright. That means the post-installation reconfigure/recompile dance doesn't have to happen (and I'd exepect that doing so is deprecated) and all is well.

        If you told a perl programmer they'd have to recompile perl to add Digest::SHA1 they'd look at you funny. That's a moral equivalent of what I was originally thinking. Or maybe the closer analogue is recompile perl and mod_perl. Anyhow, that'd be daft and you've just said that PHP handles it well so my original question is answered. Thanks.


        Seeking Green geeks in Minnesota

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://232896]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-03-29 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found