473,836 Members | 1,518 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 4528
Sherm Pendley wrote:
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.


Not so, users in the same group cannot read, write or execute the files.
UNIX check only the user's permissions if you are the user, only the
group's permissions if you are in that group and only the other's
permissions if you are not the user or in the group. No cross sharing of
permissions.

--- Shawn
Jul 17 '05 #21

"John Bokma" <po********@cas tleamber.com> wrote in message
news:Xn******** *************** **@130.133.1.4. ..
"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?


http://dev.mysql.com/tech-resources/...tatements.html
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).


I don't waste my time posting to a Microsoft newsgroup saying that all MS
products suck (otherwise I'd never get anything done), so what makes you (or
anyone else) think that you can post such comments to this group without
getting an animated response.

You may think that Perl is better than PHP (what is your justification?) and
as it is still a free country (that is until President Blair finishes
screwing up the constitution) it is your God-given right to hold that
opinion. I think you are wrong, but it is still your right.

--
Tony Marston

http://www.tonymarston.net

Jul 17 '05 #22
Shawn Corey wrote:
Not so, users in the same group cannot read, write or execute the files.
UNIX check only the user's permissions if you are the user, only the
group's permissions if you are in that group and only the other's
permissions if you are not the user or in the group.


That's not a safe assumption to make. My Debian Linux machine behaves as
you describe - if I disable group access for my group, but leave world
access enabled, I cannot read the file.

But My Mac OS X machine behaves differently. On that, access to a file
is granted if you have *any* means of doing so, whether it's by virtue
of owning the file, belonging to the correct group, or by way of the
"other user" permissions.

I don't know if what I'm seeing here is specific to Mac OS X, to HFS+,
or shared with any other BSD* variants. Although to me, it makes more
sense than what I'm seeing on Linux.

The traditional security mindset is to deny access by default (other),
and grant access only to specific users (group). This is what's enforced
on my Mac - if you want to deny anyone access to a file, you first have
to deny *everyone* access via other permissions, and then decide what
specific users to allow via group permissions.

Linux file permissions allow the opposite mindset as well - granting
access by default (other), while denying specific users (group). An
"allow by default" security mindset is not, in my opinion, a Good Thing.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Jul 17 '05 #23
Tony Marston wrote:
I don't waste my time posting to a Microsoft newsgroup saying that all MS
products suck (otherwise I'd never get anything done), so what makes you (or
anyone else) think that you can post such comments to this group without
getting an animated response.

You may think that Perl is better than PHP (what is your justification?) and
as it is still a free country (that is until President Blair finishes
screwing up the constitution) it is your God-given right to hold that
opinion. I think you are wrong, but it is still your right.


What good is having a debate on the merits of two languages if you
solicit opinions from only one side? If this thread was only posted to
one newsgroup, I would have 'Ignore Thread' a long time ago.

--- Shawn
Jul 17 '05 #24
In article <2s************ *@uni-berlin.de>,
Tim Van Wassenhove <eu**@pi.be> wrote:
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.


I think I'm more constrained by how my web hosting company has
configured their web host. Their Apache is compiled without suExec (a
Good Thing[tm], I think) and can I can only run php from Apache as
there's no php command line installed. The mechanism they offer for
running code under my UID is CGIwrap and perl.

I suppose if I wanted to spend the money, I could co-locate a system in
their datacenter and get any hosting environment. But what they offer
is "good enough", only costs $25/month, and the support guy answers the
phone on the 2nd ring, usually. Their security constraints don't get in
the way of me doing web development and I don't have to admin any
machine but my desktop.

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

Jul 17 '05 #25
>>>>> "Chung" == Chung Leong <ch***********@ hotmail.com> writes:

Chung> And I heard that you can get great performance by designing your own
Chung> silicon.

Or booting your own universe.

"Yes, in my new universe, CGI will be the 47th element!"

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<me****@stonehe nge.com> <URL:http://www.stonehenge. com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.St onehenge.com for onsite and open-enrollment Perl training!
Jul 17 '05 #26
In comp.lang.php John Bokma <po********@cas tleamber.com> wrote or quoted:
For me Perl is #1 (if possible) because PHP is probably the worst designed
language ever.


PHP was never designed. It evolved.
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #27
In comp.lang.php @ <as**@asdfsadf. com> wrote or quoted:
C. I don't know why it is not popular. It should be. [...]


Safety. Security. Imports as includes. Header files.
Lack of binary portability. The preprocessor. The fact that C++ sucks.
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #28

"Tim Tyler" <ti*@tt1lock.or g> wrote in message news:I5*******@ bath.ac.uk...
In comp.lang.php John Bokma <po********@cas tleamber.com> wrote or quoted:
For me Perl is #1 (if possible) because PHP is probably the worst
designed
language ever.


PHP was never designed. It evolved.


Most languages evolve for the simple reason that nobody ever gets it right
the very first time. Ideas change over time, so languages must change to
keep up with the times.

--
Tony Marston

http://www.tonymarston.net

Jul 17 '05 #29
Tim Tyler <ti*@tt1lock.or g> wrote:
In comp.lang.php @ <as**@asdfsadf. com> wrote or quoted:
C. I don't know why it is not popular. It should be. [...]


Safety. Security. Imports as includes. Header files.
Lack of binary portability. The preprocessor. The fact that C++ sucks.


Please explain the difference between safety and security.
If you've done this:
*What* is bad about header files and the preprocessor?
WTF has C++ to do with C?
Why do you expect binary portability from C, while there is binary
portability for neither PHP, nor Perl, nor Java. (You won't get a binary
for the first two and Java wants to be portable but isn't as it proofed
with the 6809-emulator we wrote in school last year.)

By now, your whole post shouts:
"I don't have a clue about C, so it *has* to be bad."
Do something against this first expression.
--
Simon Stienen <http://dangerouscat.ne t> <http://slashlife.de>
»What you do in this world is a matter of no consequence,
The question is, what can you make people believe that you have done.«
-- Sherlock Holmes in "A Study in Scarlet" by Sir Arthur Conan Doyle
Jul 17 '05 #30

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

Similar topics

114
9907
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
1459
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
1765
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
3466
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
9674
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10860
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10560
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
10604
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
9389
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7796
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
5659
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5831
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3116
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.