1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP or PERL CGI

Discussion in 'HTML, Graphics & Programming' started by dean_e_boy, 19 May 2006.

  1. dean_e_boy

    Associate

    Joined: 3 Oct 2004

    Posts: 64

    Location: Biggin Hill

    I want to have a go at building a website which will interact with a database, probably MYSQL. I have done a little Perl but it seems that most people would use PHP for this. What would I be better having a go with Perl or PHP? Any advice would be gratefully received. I have a lot of SQL and PL/SQL experience if that helps?
     
  2. Beansprout

    Man of Honour

    Joined: 31 Jan 2004

    Posts: 16,316

    Location: Plymouth

    Whichever you're more comfortable with - I personally prefer PHP, as I've not done much Perl.

    There's also the superb MySQL section on php.net to guide you :)
     
  3. robmiller

    Capodecina

    Joined: 26 Dec 2003

    Posts: 16,522

    Location: London

    If you know neither then Perl. Otherwise go with what you're most comfortable with.
     
  4. JustinW

    Associate

    Joined: 27 Dec 2005

    Posts: 97

    PHP is a more modern framework, you would probably find your knowlege more future proof if you learnt it.

    I've had problems running CGI on one particular server that ran out of memory- each time a script is called it spawns a new process. I don't think PHP has this problem as it runs as one process that can take many clients.

    Also there is going to be more built in functionality to help you with common tasks in PHP than Perl.

    Justin
     
  5. derfderfley

    Wise Guy

    Joined: 26 Oct 2002

    Posts: 1,714

    With Perl 6 coming with a proper OO framework, I'd say they are about equal there.

    The only time I've run a webserver out of memory was trying to parse a 80mb XML file for someone, which ended up been a problem with one of the Perl XML modules (since fixed). Had it working fine in the end by parsing the XML myself rather than relying on a third party module.

    You realy should look a CPAN as there seems to be a Perl module for any task you care to mention, and probably quite a few that you wouldn't ;)

    dean_e_boy, if you've done some Perl in the past, have a look at the DBI::MySQL on CPAN as it makes MYSQL access from within Perl a doddle.
     
    Last edited: 19 May 2006
  6. robmiller

    Capodecina

    Joined: 26 Dec 2003

    Posts: 16,522

    Location: London

    Nope.

    mod_perl is faster than you can possibly imagine.

    CPAN, boy!
     
  7. Beansprout

    Man of Honour

    Joined: 31 Jan 2004

    Posts: 16,316

    Location: Plymouth

    *Adds petrol to fire*

    (But seriously, that's not an issue :))