Stop Microsoft
Miscellaneous => The Lounge => Topic started by: reactosguy on 6 October 2010, 21:01
-
Which one should I go with?
My PHP scripts have been screwing up lately.
Perl is a bit insecure due to its CGI nature.
I need DB features.
PHP or Perl?
-
JSP ;)
You'd be amazed at how many webhosters support it. It's also very stable and secure.
Also on PHP, it's kind of a hacked together language, so it's up to the coder to find a way to structure all the code, or fuck up completely (which is easy with PHP if you're just fucking around).
Perl is a bit more structured, and a lot of good websites are built on it. I'm sure most of the CGI exploits have been fixed over the years, since Perl as webscript is older than PHP and ASP.
-
JSP ;)
Why don't you use a JSP-based forum if JSP works?
I need something that's not Java, because I heard Oracle is taking it over and making it proprietary. I also asked, PHP or Perl?
Also on PHP, it's kind of a hacked together language, so it's up to the coder to find a way to structure all the code, or fuck up completely (which is easy with PHP if you're just fucking around).
True. PHP does take some concepts from other languages.
Perl is a bit more structured, and a lot of good websites are built on it. I'm sure most of the CGI exploits have been fixed over the years, since Perl as webscript is older than PHP and ASP.
I agree. I'd rather use Perl over PHP because Perl gets CGI.pm, which makes CGI on Perl heck a lot easier!
I wonder, how do you connect to a MySQL database in Perl? I know part of it, but how do I slam the MySQL username and password in there?
-
Like this:
#!/usr/bin/perl
# PERL MODULE WE WILL BE USING
use Mysql;
# MySQL CONFIG VARIABLES
$host = "localhost";
$database = "store";
$tablename = "inventory";
$user = "username";
$pw = "password";
You need the MySQL module installed obviously.
-
Like this:
#!/usr/bin/perl
# PERL MODULE WE WILL BE USING
use Mysql;
# MySQL CONFIG VARIABLES
$host = "localhost";
$database = "store";
$tablename = "inventory";
$user = "username";
$pw = "password";
You need the MySQL module installed obviously.
I was thinking like this:
$db_handle = DBI->connect(dbi:mysql:database, undef, undef);
Page 368 of Perl In A Nutshell (1999, O'Reilly Media, ISBN 1-56592-286-7) taught me that, if you have it.
I could use your reply as well! It looks more up to date.
-
Why aren't you considering Python I'd like to know?
-
Why aren't you considering Python I'd like to know?
Perl already has CGI.pm, amplifying forms. It makes CGI form processing simple. In addition, I am familiar with Perl, like my father.
Pyhton, on the other hand, is something I never want to get bitten by. My dad says that Python is another sub-par language used by fools.
PHP is easy to use and includes a lot of functions, but the "used more than max RAM" error is annoying me.
I should check into Python though. I've used Plone (another Python product), and it works great when you modify the Zope Database. In addition, Python doesn't require semicolons (Wikipedia said that) and it's growing.
-
Python is used by Google and by NASA.
-
My dad says that Python is outclassed. In reality, it's not; it's popular with corporations. Heck, even an MMORPG is made from Python. Sadly, I tried it, but my inexperience and failure with mod_python led me to ditch it.
In the end, I'm happier with PHP or Perl. Python was a great suggestion, but I need more experience on it.
-
forget mod_python and learn how to use Pylons or Django. Python+mod_python is hardly comparable to PHP: that's a very low-level interface. Pylons provides a much MUCH simpler, and better envirnment
but yeah its up to you. if you're used to php, python will be a little bit different.