Mac OS X Leopard and PHP

Posted in both the Dreamweaver and Dreamweaver Application
Development
forums.
Mac OS X 10.5 (Leopard) uses Apache 2.2.6. This is NOT
compatible with
the Mac PHP package recommended in all my books. Marc
Liyanage
(www.entropy.ch/home) is aware of the problem, but there is
no ETA for
an update.
If you have upgraded to Leopard and want to develop PHP pages
on your
Mac, you might want to try MAMP (www.mamp.info/en/mamp.html)
instead. I
haven't tested it myself yet, but it has a very good
reputation.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

For non nerds or starters like me:
To enable PHP and Apache in Leopard:
Apache is simple, go to the sharing panel in system
preferences, and enable “Web Sharing”.
PHP requires he use of Terminal (or a BBEdit/Textwrangler if
you prefer).
First check you have enabled Root in Leopard.
If not here’s how:
1. Open the Directory Utility: In the Finder, navigate to
the Utilities folder (tip: click on the desktop, hit Cmd+Shift+U).
2. Click on the padlock to allow edits.
3. Go Edit > Enable Root Password
4. Enter and re-enter your password.
Now, you are set to access protected areas of the system via
the terminal. Probably a good idea to back up any file before you
modify it, just in case.
Back to terminal...
when you first start terminal it will show your Admin name
followed by a colon,
eg johnsmith:
type “su” the press enter
terminal will the ask for a password,
type in your “password” and press enter.
Note your password doesn’t appear on the screen.
You have two files to alter briefly.
First file:
Type: sudo pico /private/etc/apache2/httpd.conf
and press enter (note the space after sudo and pico).
This opens the file: htpd.conf a hidden file.
Now if you haven’t used this before (I hadn’t and
learned on the job), the navigation symbols at the screen bottom
with an inverted “v” and a letter , mean to press
control and the letter, for example “control X” to
exit.
You need to alter 3 lines of code:
1....Use the arrow keys to move down the page...first find a
group of coded lines that start with:
LoadModule (there are many lines)..
near the end you’ll find a line:
#LoadModule php5_module modules/libphp5.so
you need to remove the “#” to uncomment and make
it active. Position the cursor to the right of the hash and press
delete.
2....Next find a line starting with
“DirectoryIndex” it probably looks like:
DirectoryIndex index.html
Alter it to this:
DirectoryIndex index.html index.html.var index.php
3....Next find a group of lines that have “ AddType
application/x ........”
I seem to remember there were 2 lines like that,
add a line straight after like this:
AddType application/x-httpd-php .php ( note the space between
php and .php)
To save your file press “control X” to exit, and
“Y” (yes) to save. It then asks if you want to save as
a name/different, I just pressed enter to accept the default name.
I went back to check all had been saved by re-opening the
file.
Second File:
Type: sudo pico /private/etc/php.ini.default
You only need to alter one line n this file.
Look for a series of lines beginning with a semi-colon like
this:
;error_reporting = etc etc etc
Find a line below without a semi colon like this:
error_reporting = E_ALL & -E_NOTICE
then edit out all after “E_ALL” so it looks like
this:
error_reporting = E_ALL
Save you work as before.
You can now test PHP works quickly by starting TextEdit and
type in:
<?php
phpinfo();
?>
Save the file as “test.php” to your root web
directory
on my Mac is” Macintosh HD/Library/WebServer/Documents
(Actually I also saved it to just the WebServer folder).
Start up your browser and enter a URL:
http://localhost/test.php
If all has been done as above you’ll get a ful listing
of php stuff you probably don’t need to know!

Similar Messages

  • I am unable to open my downloaded library books in ADE.  I have a Mac running Snow Leopard and want

    I am unable to open my downloaded library books in ADE.  I have a Mac running Snow Leopard and want to transfer the books to a Kobo reader.  Was able to load books perfectly until recently.  I have tried trashing ADE and re-installing but have received the message that the version of ADE will not run with my current operating system.  Tried resetting the Kobo reader and thought maybe it was not authorized but it appears in ADE when I plug it in.  Any help would be greatly appreciated - getting very frustrated!

    You nshould ask in the Digital Editions forum,
    http://forums.adobe.com/community/adobe_digital_editions

  • Hi, I have Mac with Snow Leopard and was trying to purchase Lion , so I can move to I cloud, when trying to buy the app I get a message that a minimum 2gb of memory is required. I went check the hard disck info and it says available memory 20gb :-(

    Hi, I have Mac with Snow Leopard and was trying to purchase Lion , so I can move to I cloud, when trying to buy the app I get a message that a minimum 2gb of memory is required. I went check the hard disck info and it says available memory 20gb :-(

    Apple Logo, left hand side of the menu bar, About this Mac. It should be right there. If not then More Info, Sys Info.
    But it would seem you don't have 2GBs installed and more then likely both RAM slots are already filed. So you just need to buy more RAM in a pair. That could be 2 1GBs chips or if your Mac can have more then that then 2 2 GB chips or 2 4GB chips.
    Get your model # and go to Crucial.com and use their memory search to find out how much your Mac can have installed and the price for it. I suggest you install as much as it can take. Cost is very low on RAM these days.

  • Best Router for both a Mac Pro with Leopard and a Dell

    I have posted this question in another forum, but maybe this discussion page is the better one for my question, especially in light of all the connectivity problems I'm reading about for people who have upgraded to Leopard -
    Can anyone suggest a good router to purchase that would work with no problems for a Mac Pro with Leopard?
    Or, the other side of the coin - what routers have you personally had problems with?
    I would be connecting to the router via an ethernet cable, but I'm looking specifically for a g and b router. I need to cover my roommate too - she has a Dell and she uses a wireless usb adapter to connect wirelessly. We have a modem (cable or DSL, I think?) and high-speed internet service.
    We were previously using a Netgear router, but suddenly it won't work for more than 10-15 min before it loses connection after we reset it. And this happened before I updated to the Leopard.

    Apple AirPort Extreme has served my mixed environment very well. You can buy a refurbished one from Apple and save some $.
    http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wa/RSLID?mco=AA9 C1548&nclm=CertifiedMac

  • Mac OS Snow Leopard and Windows XP Installation

    Recently I got Snow Leopard and I installed it successfully. Then I used Boot Camp Assistant to install Windows XP which also worked fine but when I restarted, by default it was starting in Windows rather than in Mac OS. Secondly, in Windows, I could not see any wireless or internet connections or options for that. Hence I thought of re-installing the OS. When I am trying to do it, first I wanted was to wipe out the Windows partition. To do this, when I wanted to use Boot Camp Assistant, it says, "Update your System Software before using this assistant". Whats this and how to do it? All I want is to just format the whole HDD and reinstall Snow Leopard and then Install Windows XP. But as I could not run Boot Camp Assistant, I cant wipe out the Windows Partition and hence cant move farther. Would one assist me on this?

    If you hold the option key down while starting up the machine, you should be able to choose which partition you want to boot from. But before erasing everything, you may just need to install the drivers for WindowsXP and everything will work. Boot into Windows and then insert your Snow Leopard disc into the drive. It should auto-run the installation of all your drivers and get everything running right for you. Post back if we can assist more!

  • Mac has snow leopard and does not boot has grey screen

    IMac has snow leopard and does not boot has grey screen

    Reinstall OS X without erasing the drive
    Do the following:
    1. Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Reinstall Snow Leopard
    If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
    Download and install the Combo Updater for the version you prefer from support.apple.com/downloads/.

  • MAC OS X Leopard and Ant

    It seems that MAC OS X Leopard ships with "Apache Ant version 1.7.0".
    How can I access the folders of ant, in other words, where is the location of the built in version, since I want to copy a JAR file to the "lib" directory?
    Thanks.

    GO READ SOME FRIGGIN' DOCUMENTATION!
    Every day, it's the same thing. "How do I do this thing I've decided I'm clever enough to do, without having to bother learning anything for myself? Please dig me out of the hole I've dug myself into". This isn't a Java question anyway, or even a programming question. It's a "how do I use basic functionality of my OS?" question. We're not your slaves

  • Mac Mini, Snow Leopard and 64bit ... problems.

    Hi,
    Hope you can help.
    My Mac Mini = 2Ghz Intel Core 2 Duo, 4GB RAM. I assumed that Snow Leopard would run fully 64bit when I upgraded ... I guess I assumed wrong?
    I checked my Mac Mini using a 3rd party app and got these results:
    64 bit processor
    64 bit EFI
    64 bit kernel boot mode
    32 bit kernel
    ... why is it using the 32 bit kernel?
    I also checked the System Profiler and '64-bit kernel and extensions' is set to 'No'.
    I finally checked the 'extensions' in System Profiler and all except the following 8 extensions are 64-bit ready:
    System6.0
    Mach6.0
    Libkern6.0
    IOKit6.0
    CHUDUtils
    CHUDProf
    CHUDKernlib
    BSDKernel6.0
    Since upgrading I can honestly say I have not noticed any difference what-so-ever, this could be because I previously upgraded the RAM from 1GB to 4GB and got a nice speed boost from that.
    So to sum up, should I be able ro run 64-bit? And if not, and I'm stuck with 'virtual' 64-bit with no noticeable difference, why did I bother buying the upgrade?
    It was definately not made clear anywhere that I would have a reduced version with no noticeable difference in computing power nor added/upgraded apps, everything works precisely how it did before.
    :S

    Yes I've tried that seceral times in several different ways to try and force the 64-bit kernel to load ... no joy.
    I've also used a 3rd party app to try and force 64-bit after a reboot ... no joy.
    Have you got Snow Leopard installed and using it in 64-bit mode? And secondly have you seen any real benefit of upgrading? Honestly?
    I don't mean to be funny about it but all I seem to have got out of the update is a lighter wallet :/

  • Resetting mac os x Leopard and Final cut pro

    My Boss has a Mac Rental company that rents out Macs with Final Cut Pro. Is there a way that we can reset the OS to remove the user information or user account with out reformatting each time? Also the same for final cut pro. Need to remove the registration information from the user when we get them back. Any info or help would be great. Thanks

    There is no registration required for OS X, so unless you mean returning to the Setup Assistant state Deep Freeze should work for you.
    To return to the Setup Assistant at startup do this:
    1. Boot to single-user mode by restarting and after the chime press and hold down the COMMAND-S keys until a black screen with white type appears.
    2. At the prompt, type the following commands pressing return after each command line:
    /sbin/fsck -yf
    If you do not receive a "Filesystem OK" message then repeat this command until you do. If after seven tries you still do not receive a "Filesystem OK" message, then the system is corrupted and needs to be reinstalled.
    mount -uw /
    cd /private/var/db/netinfo
    mv local.nidb local.old
    rm ../.AppleSetupDone
    shutdown -r now
    The second-to-last command above will cause OS X to think that the operating system is newly installed, and when the new owner starts up the computer it will send him/her to the startup wizard where he/she can start a new user without reinstalling.
    I believe this will not work in Leopard.

  • Can I use Synch to migrate (import) settings and preferences and history etc. from Firefox 4.0.1 on a PC to a new Mac running Snow Leopard, and if so, how?

    I love Firefox and have relied on it for years. But I'm now planning to move from PC to Mac and would like to keep as much of my Firefox personalization and customization as possible. I have never needed to use the Synch feature before, and I cannot find reliable instructions telling me how to do it in these circumstances. Does anyone have any helpful suggestions? Thanks very much.

    Ubuntu may have moved those three button as well to that control bar.

  • How do I reinstall Lion if I get a new hard drive?  My mac came with Leopard and I cannot find my upgrade disk for Snow Leopard

    My MacBook Pro originally came with Leopard.  I have the OS and Applications disks for Leopard but I cannot find my upgrade disk for Snow Leopard.  I would like to perform a clean install of Lion on the new hard drive and restore some data from my Time Machine backup.  I am not looking to restore the current image to my new hard drive.  I have not yet removed the exisiting hard drive nor have I wiped my data.

    The only way to do that is to buy a New SL Retail DVD. Or you could buy the Lion Install USB thumb drive from Apple for $69.
    You must have SL installed to then install Lion or have a thumb drive with the Lion installer.
    You could also create a Lion USB Recovery thumb drive using Lion Disk Assistant. But you need to have Lion already installed and the Lion RecoveryHD Partition on your drive to make the Recovery thumb drive.
    Lion Recovery Disk Assistant

  • Mac OS X Leopard and eMac G4 hotkeys

    Hi! I have eMac G4 1.25gHz with OS X 10.5.8 installed.
    It is with PC wireless keyboard and I want to turn screen off from the keyboard. The combination is cmd+shift+eject, right? On my keyboard short press on F12 opens a dashboard and long press works like eject. But cmd+shift+eject reboots eMac instead of turning screen off.
    How can I fix it?
    P.S. I'm sorry for my english, but my native language forums were not helpful.

    On a standard Mac keyboard, the shutdown/sleep/restart screen is control + eject--no shift involved. Some third-party boards may not support the more esoteric Mac KB shortcuts.

  • MAC OS X Leopard and Google SketchUp

    Hello everyone,
    I was wondering if anyone has run into any Google SketchUp issues, once they have installed Leopard? I have noticed that after I installed it that SketchUp is slower then before, and that while I am using the program, I will frequently get the Beach Ball icon when doing a simple task like clicking a grouped object. If anyone else has had this problem or has heard of any fixes, please let me know! Thank you very much!
    Daniel

    Please go to http://groups.google.com/group/Sketchup-Pro/topics and we'll hunt this down for you and post back results (the noise of what's happening probably not that helpful here). Please note computer model (memory, graphics card, etc...), OS version (e.g. 10.5 / 9A581) and we'll test the appropriate configuration. Apple has been VERY good to work with on these issues. The only issues we've posted thus far are at http://sketchup.google.com/support/bin/answer.py?answer=79634
    Thanks.
    Barry

  • Mac OSX server leopard and timemachine

    I get an error when trying to use timemachine on the server, it says that there is not enough space to make an backup, but there is plenty of space on the backupdrive.
    i think that the problem is size, i have 6 TB of data on my server, so the question is, are the a size limet on how big a disk that timemachine can backup?

    Have you run Software Update several times to ensure you've picked up all available updates after upgrading to Snow Leopard?

  • Mac Pro Dual Core (pre 2009) - Leopard to Snow Leopard and Final Cut Pro 7

    I have a pre 2009 Mac Pro running Leopard and Final Cut Pro 6. My question is should I upgrade to Snow Leopard, and Final Cut Pro 7? Both, neither, just one of them... and in what order?
    I am afraid of some of the issues people have been discussing (one website even said with a non intel based system neither updates can be done, but I have Intel Xeon processor)
    Any help is highly appreciated. Thanks kindly

    Your macpro will run Snow Leopard and FCut 7 just fine. There are plenty of "whats new in Final Cut Pro" tutorials out there to research and learn whether the new things are useful to you. Snow Leopard...plenty have had issues with it. As always, it's best to have a full mirror backup before you update to Snow Leopard so if you do have problems you can go back easily. I'd definitely move to 10.5.8 if not SLeopard. I have a PCIe card that won't work with SL so I'm holding off till I install a new card. There are still some incompatibilties known so you may want to check Apple's list.

Maybe you are looking for