PDA

View Full Version : PHP over SSI



Noky
January 19th, 2002, 17:10
I was thinking...I read an article about PHP being faster than a CGI/SSI combo. So I was wondering how would I use PHP instead of SSI. I know I can probably find PHP scripts for things like polls and message boards. But I don't know anything about PHP and I don't really have to time to be learning a new language since I'm taking C++ right now. Can someone help me out?:confused:

Dusty
January 19th, 2002, 17:12
If you're worried that much about speed, ditch Perl, SSI, and PHP and keep going with your C++ class.

jw
January 19th, 2002, 17:34
PHP is very similar to C++ Actually, depending on how PHP is installed, it is faster than C++ under Apache. Though the actual runtime of C++ is much shorter, it takes longer to call the program.

niv
January 19th, 2002, 17:35
PHP is a variant of C++ and Perl, which is a variant of C, so they are very similar.

Noky
January 19th, 2002, 18:23
Well, I run 56k so website loading speed is a little important too me. I don't think I'm worried enough that I need to do it in C++ or the fastest option. I'm just wondering if there is a way just as easy as CGI/SSI combo that goes faster. I'm teaching myself C++ and I found out I can't take the class for 2 more years. Since I'm going to be running the site in a few weeks/months I don't really have the time to wait. Thanks for all those comments by the way.

niv
January 19th, 2002, 18:25
Parsing PHP/Perl code and SSI directives happen relatively at the same speed, and since you're on a 56K it wouldn't matter because the server would have already parsed the code by the time you start recieving the packets from it.

Noky
January 19th, 2002, 18:51
Thanks, I guess I'll stick with good old CGI and SSI.

megapuzik
January 20th, 2002, 00:34
PHP works faster with databases, (yea, like mySQL) and databases alot faster then dat files, this why its faster !!
(cgi also can work mySQL, but php is better for the, more conroll and options)

andyLee
January 20th, 2002, 03:13
PHP is easier to me.

niv
January 20th, 2002, 11:03
PHP also has everything included, which means that you can't select bits and pieces of what you want or want to use, which may be a new feature without having the system administrator install a new version of PHP.

Perl, on the other hand, requires one to use modules. For example, you have to use DBI.pm in order to be able to access the mySQL functions.

Noky
January 20th, 2002, 11:33
I guess you guys are saying: PHP is easier, but Perl has more flexibility and power. Kinda like a BASIC vs. C++ thing?

megapuzik
January 20th, 2002, 12:05
Originally posted by Noky
I guess you guys are saying: PHP is easier, but Perl has more flexibility and power. Kinda like a BASIC vs. C++ thing?
php and perl have the same "power" but php is faster, and work better with sql databases (mySQL)..

niv
January 20th, 2002, 12:10
Originally posted by megapuzik

php and perl have the same "power" but php is faster, and work better with sql databases (mySQL)..
No, that is absolutely false, depending on what you mean by power. Like I said, you can create your own modules, download modules and install your modules, rather than waiting for your system administrator to install a new version of PHP. Perl is by no means slow, if PHP were to use inefficient flatfile databases, it would be slow as heck. Perl works with databases just as well. If what you're looking for is a simple, easy to use, but limited language, then PHP is for you. If you're looking to expand to new horizons, use Perl.

Noky
January 20th, 2002, 15:13
Hmm, I think I'll just stick with Perl then. I don't want to burst my brain over learning more languages. I don't even really know Perl. I just use SSI and install Perl scripts. I think when I'm ready to redesign my site I'll find someone to redo my design in PHP after I do it in plain HTML/SSI/CGI combo. I don't know but right now it looks like the easiest way while still having good performance is sticking with what I know. Thanks for all your help guys.

megapuzik
January 20th, 2002, 15:46
"power" mean that what you can do with php, you can also do with perl....and this is true !

niv
January 20th, 2002, 15:53
Originally posted by megapuzik
"power" mean that what you can do with php, you can also do with perl....and this is true !

...and a lot of what you can do with Perl you can't do with PHP. ;)