Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 23, 2007, 03:23 PM   #1
toddburch
macrumors 6502a
 
Join Date: Dec 2006
Location: Katy, Texas
Send a message via AIM to toddburch Send a message via MSN to toddburch
Apache server?

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
toddburch is offline   0 Reply With Quote
Old Jun 23, 2007, 03:24 PM   #2
janey
macrumors 603
 
janey's Avatar
 
Join Date: Dec 2002
Location: sunny los angeles
apache comes with every version of osx.
__________________
iPad | 15" MacBook Pro | black (iPhone 3GS|MacBook) | Mac mini server
moof!

janey is offline   0 Reply With Quote
Old Jun 23, 2007, 03:25 PM   #3
CoreWeb
macrumors 6502
 
Join Date: Mar 2007
Location: Edge of reason
Quote:
Originally Posted by toddburch View Post
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.
__________________
flickr | Smeagol vs. PC Video
iMac G5 20"; MBP C2D 15" 2.33GHz 2GB RAM
30" ACD; FCS 2; Maya 7.0; CS4 Design Premium
CoreWeb is offline   0 Reply With Quote
Old Jun 23, 2007, 03:30 PM   #4
toddburch
Thread Starter
macrumors 6502a
 
Join Date: Dec 2006
Location: Katy, Texas
Send a message via AIM to toddburch Send a message via MSN to toddburch
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
toddburch is offline   0 Reply With Quote
Old Jun 23, 2007, 03:39 PM   #5
jsw
Moderator emeritus
 
jsw's Avatar
 
Join Date: Mar 2004
Location: Andover, MA
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.
__________________
You'll be the one moaning for me to give you some. - THC(taken out of context)
jsw is offline   0 Reply With Quote
Old Jun 23, 2007, 09:11 PM   #6
jeremy.king
macrumors 603
 
jeremy.king's Avatar
 
Join Date: Jul 2002
Location: Fox Lake, IL
Quote:
Originally Posted by toddburch View Post
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.
You don't need Apache for Ruby...You can run something like LightTPD or WEBrick.

See http://developer.apple.com/tools/rubyonrails.html

Of course you could run Perl or PHP
jeremy.king is offline   0 Reply With Quote
Old Jun 23, 2007, 10:08 PM   #7
toddburch
Thread Starter
macrumors 6502a
 
Join Date: Dec 2006
Location: Katy, Texas
Send a message via AIM to toddburch Send a message via MSN to toddburch
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
toddburch is offline   0 Reply With Quote
Old Jun 23, 2007, 10:10 PM   #8
janey
macrumors 603
 
janey's Avatar
 
Join Date: Dec 2002
Location: sunny los angeles
grab php and mysql from http://www.entropy.ch/software/macosx/
__________________
iPad | 15" MacBook Pro | black (iPhone 3GS|MacBook) | Mac mini server
moof!

janey is offline   0 Reply With Quote
Old Jun 23, 2007, 10:58 PM   #9
HiRez
macrumors 601
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
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).
__________________
Go outside, the graphics are amazing!
HiRez is offline   0 Reply With Quote
Old Jun 23, 2007, 11:08 PM   #10
ChrisA
macrumors G4
 
Join Date: Jan 2006
Location: Redondo Beach, California
Quote:
Originally Posted by jsw View Post
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.
ChrisA is offline   0 Reply With Quote
Old Jun 23, 2007, 11:20 PM   #11
ChrisA
macrumors G4
 
Join Date: Jan 2006
Location: Redondo Beach, California
Quote:
Originally Posted by toddburch View Post
....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.
ChrisA is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
apache virtual hosts breaking apache ddragas OS X Mavericks (10.9) 1 Nov 30, 2013 10:54 AM
How to have an Apache server host a Gopher site? Can PHP do it? blanka Web Design and Development 1 Sep 5, 2013 06:11 AM
Native Apache server or XAMPP? tytheblackcat Mac Programming 6 Jul 26, 2013 04:26 PM
Upgraded apache from 1.3 to 2.2 now server ignores site definitions max•• Mac OS X Server, Xserve, and Networking 2 Nov 30, 2012 10:56 AM
Apache will not run with Mountain Lion server? Tholian Mac OS X Server, Xserve, and Networking 3 Sep 19, 2012 01:29 PM

Forum Jump

All times are GMT -5. The time now is 10:39 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC