Re: Can PHP use Perl

2001-03-28 Thread Curt Russell Crandall

First of all, I'm not an expert on PHP.  But, I believe you
cpan has modules like Mason that  could give you what you want 
w/o messing with PHP.  Actually, I'm not real
big on mixing presentation layers with code and you might consider using
mod_perl or FastCGI instead.  That being said, why do you want to mix PHP
and Perl?  Is it in order to use Perl DBI?  If so, PHP, I believe, has a
similar db interface available (???I think)???.  I don't think you really
want
to mix PHP and Perl unless you have a really really good reason to do
so.  PHP alone probably has the capabilities you are already looking
for.  If not and you have the flexibility to pick which tools you are
going to use, write the whole thing in Perl.  If you know Java well, maybe
write a Java servlet.

I would try posting a question like this to a more general Perl mail list
(look at www.perl.org for a list) since this is a mailing list for DBI
issues.  You will probably find more help there.

Good Luck,
--Curt

On Wed, 28 Mar 2001, Dexter Coehlo wrote:

 
 
 Howdy dbi-users,
 
 I know  a lot of here use perl, How can if possible can I use Perlin PHP,
 I now  know PHP is another script language.
 
 But I believe I heard you can embed Perl into a PHP page. That PHP
 as I thought was a technology like ASPallowing embedding different 
 languages within PHP tags.
 
 Thanks for helping
 
 Dexter 
 
 
 




Re: Can PHP use Perl

2001-03-28 Thread Dexter Coehlo



The reason for using Perl I thought was because I thougt PHP was like ASP
which was a technology with some tags to put another language code like
perl into but I learned it is a language in itself.

Dexter


On Wed, 28 Mar 2001, Curt Russell Crandall wrote:

 First of all, I'm not an expert on PHP.  But, I believe you
 cpan has modules like Mason that  could give you what you want 
 w/o messing with PHP.  Actually, I'm not real
 big on mixing presentation layers with code and you might consider using
 mod_perl or FastCGI instead.  That being said, why do you want to mix PHP
 and Perl?  Is it in order to use Perl DBI?  If so, PHP, I believe, has a
 similar db interface available (???I think)???.  I don't think you really
 want
 to mix PHP and Perl unless you have a really really good reason to do
 so.  PHP alone probably has the capabilities you are already looking
 for.  If not and you have the flexibility to pick which tools you are
 going to use, write the whole thing in Perl.  If you know Java well, maybe
 write a Java servlet.
 
 I would try posting a question like this to a more general Perl mail list
 (look at www.perl.org for a list) since this is a mailing list for DBI
 issues.  You will probably find more help there.
 
 Good Luck,
 --Curt
 
 On Wed, 28 Mar 2001, Dexter Coehlo wrote:
 
  
  
  Howdy dbi-users,
  
  I know  a lot of here use perl, How can if possible can I use Perlin PHP,
  I now  know PHP is another script language.
  
  But I believe I heard you can embed Perl into a PHP page. That PHP
  as I thought was a technology like ASPallowing embedding different 
  languages within PHP tags.
  
  Thanks for helping
  
  Dexter 
  
  
  
 
 




Re: Can PHP use Perl

2001-03-28 Thread Brett W. McCoy

On Wed, 28 Mar 2001, Dexter Coehlo wrote:

 The reason for using Perl I thought was because I thougt PHP was like ASP
 which was a technology with some tags to put another language code like
 perl into but I learned it is a language in itself.

I thinking trying to embed PHP and and Perl (via Mason, embPerl, et al)
would be a bad idea, because a handler would need to parse the file for
each language (yes, PHP is a language), so each file would get parsed
twice.  This would be horribly inefficient.  I have done sites that had
separate pages as PHP and Perl CGI, but not on the same page.

At any rate, PHP and CGI stuff is really off-topic for this list.

-- Brett
   http://www.chapelperilous.net/btfwk/

It is a wise father that knows his own child.
-- William Shakespeare, "The Merchant of Venice"




Re: Can PHP use Perl

2001-03-28 Thread Brett W. McCoy

On Wed, 28 Mar 2001, Dexter Coehlo wrote:

 One  other question to educate myself,  mod_perl and Fast CGI. Is there
 much change in regualr Perl syntax or is it the same , just a different
 technology? I remeber considering mod_Perl to sustain db connection.

I can't speak for Fast CGI, but with mod_perl, there is a module called
Apache::DBI for establishing persistent database connections, and it works
invisibly with DBI.  The main issues with mod_perl is that you can't get
away with sloppy programming like you can using plain old CGI Perl
development.

-- Brett
   http://www.chapelperilous.net/btfwk/

It's no surprise that things are so screwed up: everyone that knows how
to run a government is either driving taxicabs or cutting hair.
-- George Burns