php - apache start up

Discussion in 'Web Design and Development' started by sk3pt1c, Oct 11, 2006.

  1. sk3pt1c macrumors 6502a


    Nov 29, 2005
    a simulacrum
    right, i want to start using php for some websites i'm gonna make and i want to start apache up so i can test the php scripts.
    first question:
    how easy is it to open up, edit and test my scripts through dreamweaver?
    i'd like to do it in there cause my i make my websites with dreamweaver too.
    second and more important question:
    how do i start apache up?
    i know the simplest thing is to tick a box in the system preferences
    but that doesn't seem to do it. i'm on a powerpc powerbook by the way.
    someone said that you have to type two commands in terminal as well
    or something like that.
    anyone have any clues as to what they are?

    ps.this is irrelevant but it just mac started 'whistling' a few minutes ago, sounds like it's coming from under the keyboard.i will restart and see if it stops. any ideas anyone?
  2. crees! macrumors 68000


    Jun 14, 2003
    It's been a while but I needed to do just this. Unfortunately I don't remember all the steps but I do remember having problems with Apache not starting up properly. The solution was to reboot and then it worked fine after installing and configuring it. Sorry, but that's all I have.
  3. nightelf macrumors 6502

    Mar 25, 2003
    I do not use Dreamweaver for PHP, or HTML :p I think is better to hand code them. IMO, the main problem with Dreamweaver or any other WYSIWYG is that they cannot interpret the PHP code correctly and they usually place a "PHP" icon in the preview panel. This can break the preview and make it very difficult to work with.

    You could design the site in dreamweaver and then hand code the php parts.

    Never had a problem with turning on Apache, try to restart the PB. If you plan to use PHP in your PB you need to configure 2 things in the /etc/httpd/httpd.conf. There is a program called Headdress that let you activate PHP easily and configure up to 2 sites (virtual hosts) in your mac for free.

    If you need more help send me a PM.
  4. sk3pt1c thread starter macrumors 6502a


    Nov 29, 2005
    a simulacrum
    i started with hand coding too man, but if you have a big website or even more than one website to create you need the automation that dreamweaver gives you, plus all the extras and goodies that you have to read 5 books to learn how to hand code. anyway, that's an issue for another topic on the forum i suppose. i was going to hand code the php though and just preview it through dreamweaver so i don't leave the environment my website creation process would be in.
    /etc/httpd/httpd.conf is what i remember but there are two commands for the two things you said that i don't remember :)
    crees, apache is built into mac os X so all you have to do is activate it and type these two elusive commands
    i'd rather not download something rather than finding these two commands, i want to keep my computer clutter free
    does anyone know the command(ment)s ? :)
  5. yellow Moderator emeritus


    Oct 21, 2003
    Portland, OR
    man apachectl

    However, if the checkbox isn't working in the System Prefs, you need to find out why, because apachectl isn't going to work either.

    (BTW, it's only 1 command to start apache: apachectl start )
  6. sk3pt1c thread starter macrumors 6502a


    Nov 29, 2005
    a simulacrum
    dude i stand corrected, headdress looks really cool! :)
    i wish i had a serial to unlock it... ;)
  7. kgarner macrumors 68000


    Jan 28, 2004
    Usually if Apache won't start that means that there is an error in the httpd.conf file. Did you edit this already to enable PHP? You may have done something that it doesn't like.

    Usually all you have to do to enable PHP is open httpd.conf and uncomment two lines (maybe three) and then start Apache.
  8. Apple2Mac macrumors regular


    Sep 3, 2006
    There is a great program I like to use for PHP it is called Taco HTML
    It is a full-featured HTML editor and PHP editor distributed as freeware. As an HTML editor, Taco HTML Edit empowers its users to rapidly create their own web sites. It is designed exclusively for Mac OS X and has many advanced features including spell checking, live browser previewing, PHP previewing, syntax checking, and much more.
  9. ThunderLounge macrumors 6502


    Sep 20, 2006

    I'll drink to that.

    Not near the bloat of DW, and for the price... it can't be beat.

    As for DW for "large" sites?

    No problem with Php. You only need one layout, and let Php figure out what to spit out for each page. You could use MySQL for this, or have it read in a text file for the specific data for each page if a DB is overkill. If you're pages are like "index.php", "page2.php", "page3.php" etc., then you could skip the text file and just have the content in the main page file. Either way, make a header file, footer file, and if you have a left or right column a file for that too (or both). Then, for each individual page, all you need in it is a call to include the other files where they would fit in, and the actual content of the page.
  10. sk3pt1c thread starter macrumors 6502a


    Nov 29, 2005
    a simulacrum
    thanks guys
    what are the two-three lines that i need to uncomment?
    does anyone know?
  11. NoNameBrand macrumors 6502

    Nov 17, 2005
    Halifax, Canada
    Search for php in /etc/httpd/httpd.conf
    Uncomment these lines, perhaps?

    Line 240:
    #LoadModule php4_module libexec/httpd/

    Line 284:
    #AddModule mod_php4.c

    At a guess this is it; I have PHP 5 installed and so these are commented out on mine.

    As for this:

    That's utter nonsense.

Share This Page