Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

toddburch

macrumors 6502a
Original poster
Dec 4, 2006
748
0
Katy, Texas
I am so ignorant in this area of servers and networking, but I want to get up to speed leveraging a server from an application development perspective.

Did I read somewhere that Apache Server comes standard on a MacPro (or with OS X)?

Todd
 
I am so ignorant in this area of servers and networking, but I want to get up to speed leveraging a server from an application development perspective.

Did I read somewhere that Apache Server comes standard on a MacPro (or with OS X)?

Todd

It does come standard on Mac OS X. It can be enabled through System Preferences, by enabling web sharing.

Personally, I tend to build Apache from scratch, along with PHP.
 
OK, perfect. This is good.

Now, I would like to go through a good exercise to start getting familiar with using it.

I would like to write a web form that gathers data from the user, sends it to the web server, a script on the web server (preferably ruby) processes the data, and sends a new page to the user. Basic stuff.

If it's OK, I'll start on the HTML for the web page, and when I get the form like I like, I'll post it here and perhaps you all can help me get this going.

Thanks! Todd
 
As recommended above, I also think you'd be well-served to download, build (optional), and install the latest Apache version. The OS X one is a bit older and more limited than the latest, and you'll be more able to mess with configurations without worrying about messing up OS X in some way.
 
Activating Apache Web Server on OS X has got to be one of the easiest things I've ever done on a computer... duh. I see its only 1.3. I can upgrade that later.

I'm approaching this effort at a cross-platform perspective on my new MacBook. I've already installed Bootcamp Beta 1.3 and Win XP Pro (and Java SE 6u1, Ruby, MS Visual Express C++, Visual Basic Express)

On the Mac side, I started Personal Web Sharing. Going to the url specified in System Preferences in Safari, I get the "It works!" message.

On the Windows side, I downloaded and installed Apache httpd server 2.2.4. I can navigate to http://127.0.0.1:8080/ and I get the default page. I then installed PHP 5.2.3 on Windows as well.

A couple questions... does PHP come on the Mac? And, I'll probably use MySQL as my backend database. I figure I'll have to download it for Windows for sure. What about the Mac?

I realize there are other servers (like WEBrick), but I'll start with Apache first, get comfortable with it, and then perhaps investigate others. Also, I understand Perl is a great language, but it's just another syntax I don't want to learn right now, so if I can use Ruby for server-side scripting, which I think I can, I'll be a happy camper.

I've not used PHP before, nor MySQL (But I got a book!) PHP, as I understand it, is implemented an extension to HTML. As far as MySQL goes... I've been working with DB2 for 23 years, and I imagine I can figure it out ok enough. ;)

Y'all are great! Thanks. Todd
 
PHP 4.4.4 is built into OS X 10.4 by the way (it may be installed with the Developer Tools instead of the standard install though, I'm not sure since I installed the dev tools immediately). MySQL you'll have to install separately but it's not hard (although I had some issues trying to configure it and get the permissions set up right with the GRANT statements, etc., although this was some time ago).
 
As recommended above, I also think you'd be well-served to download, build (optional), and install the latest Apache version. The OS X one is a bit older and more limited than the latest, and you'll be more able to mess with configurations without worrying about messing up OS X in some way.

Without messing up Mac OSX? Either way it's exactly the same. Simply edit /etc/httpd/httpd.conf
For the stated purpose of handling simple HTML forms any version of Apache is as good as the next.

The default install on Mac OSX will run a low volume server even off a G4 Mac.
 
....As far as MySQL goes... I've been working with DB2 for 23 years, and I imagine I can figure it out ok enough.

You might be a bit disappointed with MySQL. By default transactions are not even atomic. Locks work the the table level and so on. Pretty primitive. You can configure it so it works like a "real" dbms. Take a look around there are some free dbms' that are comparable in features/quality to what you are used to with DB2.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.