473,887 Members | 2,327 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is PHP still slower than Perl?

@
A benchmark in 2002 showed PHP is much slower in shell or when Apache has
Mod_Perl.

With the new PHP kissing Java's ass, Perl is once again the #1 CGI choice.

Java is for a big team in short time to develope something slow.

ASP is a joke.

PHP is a kid.

Perl is around.

C. I don't know why it is not popular. It should be. Maybe those Web
inventors always thought in Linux so they never wanted to push something
binary so they selected Perl, a slower scripting.
Jul 17 '05
58 4543
"Tony Marston" <to**@NOSPAM.de mon.co.uk> wrote in
news:cj******** ***********@new s.demon.co.uk:

"John Bokma" <po********@cas tleamber.com> wrote in message
news:Xn******** *************** **@130.133.1.4. ..
"@" <as**@asdfsadf. com> wrote in
news:hO******** ************@ro gers.com:
A benchmark in 2002 showed PHP is much slower in shell or when
Apache has Mod_Perl.

With the new PHP kissing Java's ass, Perl is once again the #1 CGI
choice.


For me Perl is #1 (if possible) because PHP is probably the worst
designed language ever. I am not sure if you can already prepare
statements (MySQL),


Yes you CAN use prepare statemetnts with MySQL.
You should be aware
that this is a MySQL feature, not a PHP feature.


How can I use it from PHP?
something I used in Perl ages ago, or still have to use all those
whatsamacalled_ quote_shebang garbage.


If you don't like PHP then why are you posting to the PHP newsgroup?


Look at the headers, this has been crossed to a Perl group. Besides, I
hope the PHP group isn't only there for people who say it's a great
language? (which it isn't).

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
Jul 17 '05 #11
@
> >>
If you want to troll, please put a little more effort in it.

Like make up some benchmarks to support your facts.


google with PHP PERL BENCHMARK, you will see the results.


That is not how it works: you make a claim, so you supply your proof. And
I'm more interested in perl/php vs. java.
That is the one
back from 2002.


2002 is so 2 years ago, that like ancient man.


I personally did my own benchmark in late 2003. I am not an expert at
benchmarking softwares, but it is true Perl is much faster than PHP from my
result. I used PHP/Perl in web enviroment for printing one line per hit.
Jul 17 '05 #12


@ wrote:
C. I don't know why it is not popular. It should be. Maybe those Web
inventors always thought in Linux so they never wanted to push something
binary so they selected Perl, a slower scripting.


Why don't you try assembly!!!! I bet you can get that to be running even
faster than C!!!

good luck,
-d
Jul 17 '05 #13
In article <Xn************ *************@1 30.133.1.4>,
John Bokma <po********@cas tleamber.com> wrote:
"Tony Marston" <to**@NOSPAM.de mon.co.uk> wrote in
news:cj******** ***********@new s.demon.co.uk:

"John Bokma" <po********@cas tleamber.com> wrote in message
news:Xn******** *************** **@130.133.1.4. ..
"@" <as**@asdfsadf. com> wrote in
news:hO******** ************@ro gers.com:

A benchmark in 2002 showed PHP is much slower in shell or when
Apache has Mod_Perl.

With the new PHP kissing Java's ass, Perl is once again the #1 CGI
choice.

For me Perl is #1 (if possible) because PHP is probably the worst
designed language ever. I am not sure if you can already prepare
statements (MySQL),
Yes you CAN use prepare statemetnts with MySQL.
You should be aware
that this is a MySQL feature, not a PHP feature.


How can I use it from PHP?


Buy one of the many PHP books that mentions building sites and using
MySQL. O'Reilly has PROGRAMMING PHP, which I used to develop my site.
There are others, which I leave to you to investigate.

If you're to strapped for funds to buy something, there's

http://www.php.net/manual/en/
something I used in Perl ages ago, or still have to use all those
whatsamacalled_ quote_shebang garbage.


If you don't like PHP then why are you posting to the PHP newsgroup?


Look at the headers, this has been crossed to a Perl group. Besides, I
hope the PHP group isn't only there for people who say it's a great
language? (which it isn't).


One thing I'm unconvinced of is security. With database applications, I
have to put passwords to the database inside php scripts and they have
to be readable by the web server which runs under the nobody UID.
Instead, I chose to do parts of my site with Perl CGI and CGIwrap. This
allows me to protect the files from group or other access as these
scripts run as my account's UID.

I found recently that you can put such files outside of the server's
DOCUMENT ROOT and get access through the php include_path global, but
the web server still needs access to the file.

One thing I like about php is that each script is stored in the usual
place in the user's document directory. The files are executed and the
output is displayed without having to put everything in the ScriptAlias
directory (usually cgi-bin).

While php has PEAR, a depository for additional libraries written by
others, perl has CPAN which is at least 2 orders of magnitude larger and
more diverse. There's also lots of network and system-level things you
can do with perl and usually someone's already done it in a CPAN module.

This thread is about as enlightening as "which car is better". It all
depends on where and how you're trying to get there.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #14
In article <vi************ **************@ comcast.dca.gig anews.com>, "Michael Vilain <vi****@spamcop .net>" wrote:
One thing I'm unconvinced of is security. With database applications, I
have to put passwords to the database inside php scripts and they have
to be readable by the web server which runs under the nobody UID.
Instead, I chose to do parts of my site with Perl CGI and CGIwrap. This
allows me to protect the files from group or other access as these
scripts run as my account's UID.
But you can use PHP in CGI too. And use suExec to run it under a
different uid.
I found recently that you can put such files outside of the server's
DOCUMENT ROOT and get access through the php include_path global, but
the web server still needs access to the file.
http://shiflett.org/articles/security-corner-mar2004
One thing I like about php is that each script is stored in the usual
place in the user's document directory. The files are executed and the
output is displayed without having to put everything in the ScriptAlias
directory (usually cgi-bin).


Once again, this is purely a webserver configuration issue.

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.info>
Jul 17 '05 #15
"Doug" <do*****@XXXXre movetheXearthli nk.net> wrote in message
news:eQ******** *********@newsr ead2.news.atl.e arthlink.net...


@ wrote:
C. I don't know why it is not popular. It should be. Maybe those Web
inventors always thought in Linux so they never wanted to push something
binary so they selected Perl, a slower scripting.


Why don't you try assembly!!!! I bet you can get that to be running even
faster than C!!!

good luck,
-d


And I heard that you can get great performance by designing your own
silicon.
Jul 17 '05 #16
@
> One thing I'm unconvinced of is security. With database applications, I
have to put passwords to the database inside php scripts and they have
to be readable by the web server which runs under the nobody UID.
Instead, I chose to do parts of my site with Perl CGI and CGIwrap. This
allows me to protect the files from group or other access as these
scripts run as my account's UID.


Could you tell me how others can read your files? If you set PHP as 604?

In perl's case, if I set it as 755, does it allow everyone to read the
script? Should I set it as 705?
Jul 17 '05 #17
@
> > One thing I'm unconvinced of is security. With database applications, I
have to put passwords to the database inside php scripts and they have
to be readable by the web server which runs under the nobody UID.
Instead, I chose to do parts of my site with Perl CGI and CGIwrap. This
allows me to protect the files from group or other access as these
scripts run as my account's UID.


Could you tell me how others can read your files? If you set PHP as 604?

In perl's case, if I set it as 755, does it allow everyone to read the
script? Should I set it as 705?


I think as long as the directory is set as 400 then nobody will be able to
get access to any of your files, regardless how they set mod on them
Jul 17 '05 #18
@ wrote:
Could you tell me how others can read your files? If you set PHP as 604?
What is "set PHP as 604" supposed to mean? Are you referring to setting
the permissions on *.php files?

If that's what you mean, please read any basic introduction to UNIX. 604
makes a file readable and writable by its owner, and readable by any
other user.
In perl's case
File permissions are language-independent. A file that's readable for
Perl is readable for PHP, is readable for Java, is readable for C, etc.

Michael is referring to a server configuration that will run CGIs with
the permissions of the CGI's owner, instead of running them as "nobody".
That way, you don't have to make anything world readable - you can make
sensitive files 0600, and the CGI will be able to read them.
Should I set it as 705?


No. You should read a good basic introduction to UNIX, concentrating on
the section(s) about file permissions and ownership. That way you'll
know what these numbers mean, and you won't have to throw them around at
random.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Jul 17 '05 #19
@ wrote:
In perl's case, if I set it as 755, does it allow everyone to read the
script? Should I set it as 705?

I think as long as the directory is set as 400 then nobody will be able to
get access to any of your files, regardless how they set mod on them


The files should be set to o=r,go= (400) or u=rw,go= (600). The
directory they are in should be u=rx,go= (500) or u=rwx,go= (700).
Directories must be executable to read the inode. The inode stores,
among other things, the sectors where the file contents are.

Perl modules should be placed in a directory not accessible by the
server. Perl can access them by using 'use lib' to add the path to the
library directory list (see perldoc lib). The permission on the modules
should be u=rx,go= (500) and the first line:

#!/

This means if the server accesses the file, it will try to execute it
and fail, making it impossible for it to display the code. This is
important if you are under the obligation of not exposing the code to
the public.

--- Shawn
Jul 17 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

114
9923
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
5
1461
by: Michael | last post by:
i experience slower compile times with VC++ 2003 compared to VC+6.0. Anyone experiencing the same? Should that be expected? This ineed matters, when total compilation time is > 1h and you have to wait 10-50% longer...
2
1770
by: jeffrey.bigham | last post by:
Hello, I'm writing a program that needs to read input line by line and analyze each, and it needs to be as efficient as possible. I wrote the following sample program that works, but is 10 times slower than a Perl equivalent on a large input (~212 Mb). There has to be something wrong - can anyone help me fix it? I've included both at the bottom of my post and I compile with g++ -03 cin_test.C Thanks!
47
3471
by: Henning_Thornblad | last post by:
What can be the cause of the large difference between re.search and grep? This script takes about 5 min to run on my computer: #!/usr/bin/env python import re row="" for a in range(156000): row+="a"
0
9957
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10770
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10875
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10432
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7988
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7141
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4632
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4238
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3245
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.