Fog Creek Software
g
Discussion Board




I promised I would never do this

Guys, I promised I would never use JoS to ask a tech question.

But...

I just wrote some registration scripts for ASP in VB Script, I have set up a mini system at home, with an ASP server running on a networked machine for testing. All works fine.

I sent the scripts to the guy designing the website, he has said no can do (actually he is the middle man for the guy who is hosting the webpage). The server runs linux, the scripts need be written in Perl.

Anyone up on this stuff. Why would this make a difference?

Aussie Chick
Wednesday, March 3, 2004

tell him to install ASP support for Apache.  See http://www.apache-asp.org/

Seun Osewa
Wednesday, March 3, 2004

You have to be on the Windows platform to run ASP pages. You *could* run ASP pages on Linux using Chilisoft ASP but it's compatability is not guaranteed. See http://wwws.sun.com/software/chilisoft/ for more information.

In a Linux (and Windows) environment, you should be able to program, debug & use PHP or Perl fine.

kl
Wednesday, March 3, 2004

you know I was going to write this in PHP, but was told that I didn't need it, that ASP would be fine.

I had no idea what either was, but figured ASP out, now I find I figured out the wrong one and have to go rewrite me scripts in PHP? IS PHP written in perl? awwhh man.

Aussie Chick
Wednesday, March 3, 2004

if you were told ASP was fine, then it's not a tech problem--it's the problem of whoever told you that to fix it.

mb
Wednesday, March 3, 2004


Server side scripting works by registering a file extension with the server, telling it where to send files with that extension that have been requested.

So you install a php module or asp or jsp or perl or whatever and tell your http server "send files with this extension to that progam then pass the results back to user".*

Since ASP is a m$ technology they encorperate it with their IIS web server. 

No doubt some Danish guy (its alway a Danish guy) somewhere has a piece of free software that can run some asp scripts on apache/linux but the vast majority of asps are run on windows with iis.

The guy is telling you "I dont have the module installed on my webserver to process asp scripts, I do have the module to process perl scripts".

PHP is another pervasive linux/apache server side scripting option, very similar to asp, much easier to learn than perl.

Ask about php.  And do you need database access ? If so you better ask about what he has.


* there are a few options as to how to marry the script processor and the http server, but thats by the by.

braid_ged
Wednesday, March 3, 2004


Threads build quickly round here.

braid_ged
Wednesday, March 3, 2004

Braid, top notch response. I have absolutely no idea about server side scripting, and finding a concise explanation like that is impossible. So you have cleared up alot of things.

So PHP is like ASP is like Perl etc. He just has to have it installed.

Well I will check out PHP if it is easier then perl and start rewriting I guess.

As for databases, he has MySQL installed, and my original scripts were designed to work with this.

I asked most of my questions on a VB tech site, and I checked with the website designer who said it would be okay....No big deal, I get to learn a new language, learn some new stuff. The designer is a very talented friend of a friend who is not even charging me for anything until I make a profit out of my program, and even then he is charging me very little, so I harbor nothing against him for his part in my need for a rewrite.

Aussie Chick
Wednesday, March 3, 2004

BTW, Aussie Chick, as someone who's written a small but decent chunk of ASP, I found PHP very easy to pick up.  The idiom is virtually identical; only the look of the language is different (PHP's syntax is modeled after C).  If you can't get ASP support installed, PHP won't be too bad.

(Actually, that's not quite true; having to use arrays instead of ADO is kind of a bummer.  But it's mostly equivalent.)

For some sample PHP code, check out the PHP clone of this very forum:
http://www.johnsadventures.com/backend/DiscussionForum/APHPDiscussionForum.html

Also, if you don't have an editor that does syntax coloring, ConTEXT is a good free text editor.  (Interdev would of course be useless for PHP, but if you have Dreamweaver, I think it's pretty good.)

Sam Livingston-Gray
Wednesday, March 3, 2004

I will check those links out thanks.

Someone once tried to convince me that syntax highlighting was unnessecary, his sole argument being that things were better if they were more difficult. I, on the other hand, cannot code without syntax highlighting (okay well I could, but I wouldn't like it)....

Aussie Chick
Wednesday, March 3, 2004

This isn't indirectly related to your Word Auto format plugin is it?

Justin
Wednesday, March 3, 2004

broken promise.


Wednesday, March 3, 2004

Aussie Chick - you might try jed as your editor. I believe someone has written a php mode for it to provide syntax colouring. Anyyeah, naturally there are also modes available for C, C++, java, html...


Wednesday, March 3, 2004

Crimson Editor is my PHP editor of choice.

Afaik, if you use perl you have to use CGI, which is trickier since you have to manage the request-response mechanics yourself. No doubt extensive libs already exist for this purpose, but still, its trickier.

PHP, like ASP, allows you to inline code that is executed upon request of the document. I bet PHP is already installed on his server, because its in the default install of most server distros.

By the way. Ive done a fair bit of work in both ASP and PHP and if you have technical questions feel free to drop me a line.

Eric Debois
Wednesday, March 3, 2004

Aussie Chick,

Likewise, you can drop a line here.  I've been writing CGI programs in C and PHP for quite a while now.  You'll find the transition from ASP to PHP very simple.  On the real upside, you can get PHP installed on your IIS server, so you won't need to do huge amounts of sysadmin to get your dev platform up to speed.

If you go with perl and you're not familiar, you might check out the O'Rielly book "Writing CGI Scripts in Perl".  I don't do a lot of perl work out of a personal bias against the language (and the first edition of Learning Perl), but it's very capable and some really great software has been written with it.

Clay Dowling
Wednesday, March 3, 2004

Seriously, let me say what the first person should have said had you not had a name like "Aussie Chick", which to many a geek who read JoS is the closest they get to a "female".

RTFM, you braindead twit! How could you not know? "Would this make a difference"? Sheeya!

Anon-y-mous Cow-ard
Wednesday, March 3, 2004

Listen to Anon-y-mous Cow-ard. Get some requirements before you write code. I can deliver a mapping application to someone who doesn't need it.

Tom Vu
Wednesday, March 3, 2004

Eric,
On an Apache server you can run mod perl ( a perl interpter in the apache server) http://perl.apache.org/ that is easer then doing cgi in perl, also the CGI CPAN modules  http://search.cpan.org/search?query=CGI&mode=all make it somewhat easer.  Also if you wrote your ASP in Perl to start with (yes it can be done with ActiveState's Free PerlScript system) You can convert to Apache dircetly using Apache::ASP at http://www.apache-asp.org/ .   

A Software Build Guy
Wednesday, March 3, 2004

Ausie Chick,
Lot of people claim that Apache (or other Linux/Unix http deamon) is more secure then IIS (If lockdown correctly and patched this is not necessary true) .  As I noted above activestate has a win32 Perl ( http://www.activestate.com ) that can be downloaded for free.  That said there are security issues that go along with perl cgi ( goto the Perl Monks web site at http://www.perlmonks.org and search there threads for CGI and security as well as looking at their tutorials esp. Ovid's CGI Tutorial) .  Question is does the site use CGI or does he want mod_perl (there is enough dfference to cause major issues) also will he install mod_php if you want to go that route.  If you need to go Perl then Perl Monks site has been known to be newbe friendly and has tutorials and links that are helpful.

A Software Build Guy
Wednesday, March 3, 2004

How about this:

http://search.cpan.org/search?query=asp&mode=all

Or this...

http://search.cpan.org/author/TIMMY/ASP-1.07/ASP.pm

Or this...

http://search.cpan.org/author/CHAMAS/Apache-ASP-2.57/ASP.pm

Andrew Burton
Wednesday, March 3, 2004

If you are going the PHP route, I highly recommend Eclipse (http://www.eclipse.org) with the PHPEclipse plugin (http://phpeclipse.sourceforge.net).  It does both syntax highlighting and previews your pages within the editor.  As a general rule, Eclipse also has several other plugins to handle any other facet of your development, such as DB access, CSS editing, source control integration, etc.

Also, if you are planning on getting serious with PHP development, be sure to check out:

- Smarty(http://smarty.php.net) : a templating engine.
- PEAR(http://pear.php.net): A repository for a ton of useful modules, such as database abstraction (Pear/DB), HTML form handling (Html_QuickForm), etc.

For an excellent web-based installer for PEAR modules, go to http://go-pear.com/ and follow the instructions.

Good Luck,
---Seeker

Seeker
Wednesday, March 3, 2004

>RTFM, you braindead twit! How could you not know? "Would this make a difference"? Sheeya!

*grin* what can I say, my bad.

Aussie Chick
Wednesday, March 3, 2004

"We can run ASP scripts, they just need to be written in something other than VB, because VB is a proprietary MS product and won't run on our RedHat server. "

The latest comment he has given me. So I guess I will be writing PHP. Thanks for all your help (and offers of text editors!).

Aussie Chick
Wednesday, March 3, 2004

your screwed...the admin is a dolt

Yo
Wednesday, March 3, 2004

I have to second that.

RP
Wednesday, March 3, 2004

Okay, second what?

Are you trying to say VB should work on ASP regardless of the platform?

I know that I know very little about this sort of stuff, but I am trying very hard to learn. So be nice to me.

Aussie Chick
Wednesday, March 3, 2004

Just use PHP, if you've already learned ASP then PHP is just as easy to pickup.  Honestly if ASP.NET hadn't come along, I probably would have ditched ASP in favor of PHP.

Pickup PHP for IIS here: http://www.php.net/downloads.php (you probably want the "PHP 4.3.4 installer" download)

Start learning about PHP here: http://us2.php.net/manual/en/introduction.php

If you need reference the manual, go here: http://us2.php.net/manual/en/

If all else fails, go here:
http://www.altgeek.org/methuselah/rtfm/

GuyIncogito
Wednesday, March 3, 2004

> Listen to Anon-y-mous Cow-ard. Get some requirements before you write code

Problem is that in this case the boot was on the other foot. If the hosting co. wanted AC's business then they should have tailored their product to her requirements (which in this case was that she should be able to run ASP in VB Script). Should AC have checked? Probably, but I have to say that I have no idea what my hosting company runs either.


Thursday, March 4, 2004

See I did check (sort of), I asked whether ASP would work. They said yes, so I wrote it in ASP.

The problem was my limited knowledge of Web-based technologies.

I have written this one off to 'living and learning', and all in all I have come out with a much greater understanding of some stuff I always declared that I hated (namely, PHP, ASP, ie any web-based technologies).

Aussie Chick
Thursday, March 4, 2004

AC, if you don't mind being confrontational, I'd mention to the hosting guy that when talking about ASP, 98 times out of 100, it has to do with VB on ASP. Thus, the sysadmin must be either really smart, or really stupid. (Really smart because he knows that ASP stands for Active Server Pages which is just a framework that any language can plug in to, and even though MS developed it for VB & JScript, Apache::ASP allows perl to plug into a similar framework. Or really stupid, because he thinks ASP means web programming, which is not the case)

Ziktar
Thursday, March 4, 2004

Ziktar thanks,

On a normal occasion I would probably take a deep breath and have something to say to the sys admin, but these guys are all doing me a huge favour, and the fault was at least partly mine for saying I would write the scripts myself even though I had zero idea about any of the different technologies (I am serious, I think the majority of what I have learnt I have learnt from this post).

now all this sounds like a bad bad thing for me to have done (should have had more experience, should have researched more etc). But in truth if I had to make the decision over again I hope I would make the same one. For, although on a large commercial project this could be considered suicicde, on my small project it as allowed me to learn alot about web-based technologies, and for what? For the cost of a few hundred lines of script.

So as long as I am absolutely clear on the next step (ie I this was a good learning curve once, but twice is kind of bad), I am happy just to rewrite, and learn from it why I am still a small fry.

Aussie Chick
Thursday, March 4, 2004

>If you are going the PHP route, I highly recommend >Eclipse (http://www.eclipse.org) with the PHPEclipse >plugin (http://phpeclipse.sourceforge.net).  It does both >syntax highlighting and previews your pages within the >editor.  As a general rule, Eclipse also has several other >plugins to handle any other facet of your development, >such as DB access, CSS editing, source control >integration, etc.

Another great Eclipse plugin for PHP development is xored's TruStudio, www.xored.com/download.php
Their 1.0 is yet at the stafe of development, but nightly builds show the great potential of these guys.

Miguello Anderson
Sunday, August 1, 2004

*  Recent Topics

*  Fog Creek Home