Enabling PHP is breaking Apache.

I am following the tutorial at, http://developer.apple.com/mac/articles/internet/phpeasyway.html, to enable apache/mysql. Where the tutorial is titled, "Enabling PHP in Apache", I copy and pasted the code to terminal. Osascript password prompted and I entered. When the script finished, I can't access "my computers website", as it just returns as busy/not found. For some reason the Mac HD: private: etc: apache2: httpd.conf file (the copy) is created, but is completely blank. When I replace it with the original, I can access "my com website" again.
Also. The httpd.conf file does not have a line "#LoadModule php5_module libexec/apache2/libphp5.so".... so there is nothing to toggle?
Can I just edit that file manually to enable Php?
Message was edited by: thejackkelly

Solved with new php install.

Similar Messages

  • How to enable php, mysql, and apache?

    Hi guys, I am sorry if I am not in the right forum, but I am really worried about my problem...
    According to this article("http://developer.apple.com/mac/articles/internet/phpeasyway.html") I already have php , apache, and SQlite installed on my mac. My problem is when I try to enable the apache, instead of coming a localhost ( like 128.1.2.1) comes my website " your computer's website: http://nunomedi-e14....lan/ ) I donn't know what is this, I replace the index.html with index.php in sites folder.
    Can somebody help me please.

    Please look at my second post. I corrected what I said:
    macwiz1220 wrote:
    O wow. I'm sorry. I have no idea where i got that from. The file you want is in /etc/apache2/httpd.conf and the line you are looking for is *#LoadModule php5_module*
    Take a look at this article on LAMP on Leopard.

  • Enable PHP and apache!

    Hello,
    Is there a simple way to enable php and apache on my new imac? So I can test my website locally. Hopefully its not a lot of steps. I have seen a lot of tutorials by using google. But they involve terminal and I don't know that well to be able to mess with it. I don't want to ruin my computer. So any help would be appreciated.
    Thanks,
    Kash_Money

    And to answer your first question, "how can I use a .html extension page" see http://discussions.apple.com/thread.jspa?messageID=5850167&#5850167
    which is, however, for Tiger. On Leopard, the relevant file is /etc/apache2/httpd.conf and it turns out that /etc/apache2/other/php5.conf is even more relevant for exactly what you want.
    Specifically, first read the first paragraph therein for why you should do something else instead. However, the hopefully not too crazy instructions (sorry, but the only way I know how uses the Terminal and emacs, so due to your Terminal-phobia I'll give detailed instructions and hope I'm not insulting you too much), will be for what you want, not for what I think you should do. The Terminal+emacs instructions are needed because /etc/ is a hidden directory owned by root, which makes it hard to use TextEdit to edit it.
    So open a Terminal , and type
    sudo emacs /etc/apache2/other
    emacs is a text editor that works inside the Terminal, and which, for the uninitiated, has weird key bindings. You'll probably see something like
    <pre style="background: #eee">
    <IfModule php5_module>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    <IfModule dir_module>
    DirectoryIndex index.html index.php
    </IfModule>
    </IfModule>
    </pre>
    Press the down arrow key, ctrl-e, and type " .html". The file contents should now look like
    <pre style="background: #eee">
    <IfModule php5_module>
    AddType application/x-httpd-php .php .html
    AddType application/x-httpd-php-source .phps
    <IfModule dir_module>
    DirectoryIndex index.html index.php
    </IfModule>
    </IfModule>
    </pre>
    Type ctrl-x ctrl-s to save, and then ctrl-x ctrl-c to exit.
    Restart the web server, either by typing
    sudo apachectl restart
    or by going into System Preferences and unchecking, then checking web sharing.

  • Enabling php

    Hi there, I am running into some serious issues with enabling the built-in PHP on Mountain Lion.
    I have followed the steps described in an article that I have found through google. Everything were fine until I hit to the steps to enabling PHP service. Unfortunately, I serached through google to see if I can find a solution to it, and it turns out unsuccessful. So, keeping up with a little hope to see if one of your smart techs can solve my issue with PHP:
    I have created a .conf file using my shortname as described in the article that I found on google. Everything went fine with localhost, but when I tried to access to http://localhost/~username then the headache message popped out stating that 403 forbidden. I tried to change access permission but turned out disappointed. Well, with no one can seek for help, my only hope is on you guys. Looking forward to get a good hand soon.

    Hi, I am assuming you are trying to configure the httpd.conf file on your computer.
    In OSX, by default when you enable Apache, the root folder is OSX HDD > Library > WebServer > Documents
    Place a test html file or php file (e.g. something that displays the message 'Hello World') in that folder and open up Safari or any web browser of your choice and just enter http ://localhost/(your test file) in the address bar.  Does the test open and display whatever message it is supposed to show?
    You can edit the httpd.conf file via terminal:
    sudo nano /etc/apache2/httpd.conf
    enter your administrator password
    Scroll down the file and uncomment (delete #) for the LoadModule lines to enable the modules you want.
    (The PHP module is near the end of that LodeModule list, just remove the # in front of the line to enable it.)
    Scroll down more to the line that begins with DocumentRoot "/Library....  and change the root directory path to whatever you want.
    (If you want to be able to open up http ://localhost/(your username) in a web browser, make sure that a folder with your username exists inside the root directory.)
    Save and exit httpd.conf file by entering the following keyboard commands:
    ctrl + o, press enter to save
    ctrl + x
    Don't forget to restart Apache after editing the httpd.conf file with this command in terminal:
    sudo /usr/sbin/apachectl restart

  • How do i enable php on my mac

    I would like to enable php on my mac (and apache if necessary).
    It needs to be simple.
    I can do this on a pc (with XAMP).
    I have some development with php to do?

    actually there are no cookies on mac's. only got CACHES:
    go to Finder
    choose Go (menu bar)
    hold OPTION Button (keyboard)
    choose Library
    choose Caches

  • Enable PHP on osX 10.4.10

    I'm a newbie so bear with me.
    I have an iMac osX 10.4.10
    I want to run Gallery 2 on the local server on my computer to set it up.
    I used MAMP. Easy. It shows green lights for Apache Server and MySQL server using PHP 5. Great!
    Now I need to Enable PHP. I found this:
    http://docs.info.apple.com/article.html?artnum=107292
    "For 10.3 or later
    Open Server Admin.
    Select the Web service from the desired server in the Computers & Services list.
    Click on Settings.
    Click Modules.
    Enable or disable the php4_module as desired.
    Save the changes.
    Restart the Web Service."
    I downloaded Server Admin and started it.
    My local address is http://myname.local/
    Server Admin says, "There is no server available at the address you entered.
    All services failed to access the address you provided for myname.local. Check the address and try to log on again or contact your network administrator.
    All I want to do is activate PHP...that's it!
    The directions in the above link are NOT for osX 10.4.10...So now what do I do?
    Thanks
    Tim

    Are you using Mac OS S Server?
    You posted in the Server forum. Server Admin is geared to managing Mac OS X Server and can't help you with the client version of the OS.
    To enable PHP on the client version of Mac OS X you're going to have to manually edit /etc/httpd/httpd.conf and uncomment the lines:
    LoadModule php4_module libexec/httpd/libphp4.so
    AddModule mod_php4.c

  • How to update PHP, MySQL or Apache

    The Mac OS X 10.6.2 system does not include the latest versions of PHP, MySQL or Apache.
    What is the recommended update procedure for PHP, MySQL or Apache:
    a) automatically by Mac OS X system (is this possible?) or
    b) manually by the administrator (are there any documentations?)
    Many thanks.
    Actual system versions:
    Mac OS X 10.6.2
    MySQL 5.0.82
    Apache 2.2

    Hi, Thanks for your answer.
    That sounds Apple do not seriously release updates of third party packages shipped with the system (like Apache, mySQL ...) very often.
    To use month or year old packages in a web environment is a big risk, e.g. mySQL actual official version is V5.50 / mySQL Version shipped and updated by Mac OS X 10.6.2 Server is V5.0.82).
    The same with Apache and PHP, both are packages included in Mac OS X Snow Leopard Server product by Apple and are included in a old version.
    And when manually updates by the administrator of the server system do not work well or are not supported by the OS X Server system (as I understand your posting), the administrator can not act to improve and secure the system.
    That can only lead to one conclusion: Apple's Mac OS X Snow Leopard Server should not be used in a productive, internet faced web environment.
    Is this true? I do not want to believe this!?
    Is there really no official supported or documented procedure by Apple to keep the integrated third party components updated?
    I'd like to prefer Mac OS X Server odd Linux distribution because it seems more handy to administrate and to use, e.g. tools like Server Admin. These tools are an advantage of Mac OS X Server.

  • When I publish projects with AICC reporting enabled the SWF "breaks" and does not load.

    When I publish projects with AICC reporting enabled the SWF "breaks" and does not load. If I change the publish method to SCORM the SWF works, and if I turn off reporting the SWF also works.

    OK.  That makes sense now.  Captivate 6 changed over to Rustici's LMS drivers.  Cp7 must have made even further changes that mean you must have an LMS present if you turn on reporting.
    I would suggest you just turn off reporting while you are testing other aspects of the course functionality during development, and only turn on reporting when you are ready to upload to your LMS.

  • How to enable php

    I am trying to enable php on my macbook with Lion 10.7.  I have found and changed the http.conf file, but I can't save the changes.  My computer tells me I don't have permission, but it doesn't give me any pop up to confirm my permission.  Can anyone help.

    Well, first make sure that you are accessing the PHP through the browser with an URL that begins with 'http' or 'https'. If you access it through Finder, or opening it directly in your browser, the web server (that would normally process the PHP script), is completely bypassed.
    If that's not the issue, open Terminal.app. Type
    grep -i php /etc/apache2/httpd.conf
    The result should be
    {quote}
    LoadModule php5_module libexec/apache2/libphp5.so
    {quote}
    If you see a '#' at the beginning of the line, the PHP module was disabled. You need to edit /etc/apache2/httpd.conf and remove the '#' (in the terminal, type 'sudo nano /etc/apache2/httpd.conf').
    While you are at it, also do
    grep -i apache2/other /etc/apache2/httpd.conf
    ... and if it doesn't look like this
    {quote}
    Include /private/etc/apache2/other/*.conf
    {quote}
    Edit the file and add that line.
    If that's OK, then type
    cat /etc/apache2/other/php5.conf
    That should look like this
    {quote}
    <IfModule php5_module>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    <IfModule dir_module>
    DirectoryIndex index.html index.php
    </IfModule>
    </IfModule>
    {quote}
    ... if not, edit that file and make it look like it is above. Once all that is done, go to System Preferences, click on the Sharing icon, and uncheck Web Sharing, then check it again a couple of seconds later (to restart the web server).

  • Enabling php on this Mac OS X 10.6.6

    PHP version 5.3.3 seems installed.  But when I attempt to open php pages the browser opens them as text.  It seems that I must edit the httpd.conf file to actually enable php.  I changed the permissions on the file with sudo chmod ug+rw for httpd.conf.  TextEdit still doesn't allow me to change it.  It's saying that I don't have permission to write to that folder.  I changed the permission the /etc/apache2 and that didn't  help.  What must I do to be able to modify httpd.conf and enable php support?

    Welcome to Apple Support Communities.
    , System Preferences, Internet & Wireless, Sharing
    You many need to click the padlock at the bottom and enter the admin password to unlock Sharing so you can make changes.

  • Enable PHP Imap Extension on Lion Server (I Willing to Pay for the Service)

    Can anyone teach me or know how to enable PHP Imap extension on my Lion 10.7 server?
    I willing to pay for the service fee for this.
    Kindly contact me asap [email protected], I need my server to have this feature as soon as possible.
    I found a several blogs for this but still can't get it work exactly.
    Thanks a millions!
    Jack

    I also want IMAP support in PHP on Lion Server.
    I found the tutorials below:
    http://www.september28.co.uk/blog/2011/11/24/php-imap-support-in-mac-os-x-lion-w ithout-recompiling-php/
    or
    http://blog.xeonxai.com/2009/12/03/160/
    but honestly, with my limited knowledge of the command line and php installation, it's almost like trying to read chinese. I could probably follow the instructions, but if anything went wrong I'd be completely lost and I wouldn't know how to get back to square one. Looking for a "dummies" guide...

  • Apache enable php

    Every time I upgrade my iMac with a new MacOS, I restart at the stone age.
    What a boring system.
    Every time my iMac loses the hostname, and apache on local files is unable to manage php files.
    What a boring system.
    In this community, if I select the Mountain Lion folder and then I search for apache anable php, the search engine show me articles related to 10.5, 5 years old, totally useless.
    What a boring system.
    Now, I have to solve a css problem in a web page and cannot even start to see the page locally, since my iMac is totally unable to do what I expect as assumption, seen that it worked for years.
    This system is really, really boring.
    Does someone give me a link to a useful page on how to configure these boring things?
    Thank you!

    Try Google:
    https://www.google.com/webhp?client=safari#hl=en&client=safari&sclient=psy-ab&q= mac+mountain+lion+configure+apache+php&oq=mac+mountain+lion+configure+apache+php
    That was so easy it's boring.

  • Enabling PHP In Apache

    Hi, I just got a macbook, and am trying to setup PHP on it. I have tried following all the tutorials on google where it says to uncomment all the lines regarding PHP, then press wq: or whatever to save and quit, but then every time I make a simple php script, it just echos back the text from the php script. for example when the php script says "<?php echo date(Y); ?>" it just prints "<?php echo date(Y); ?>" when I go to my IP. What am I doing wrong?

    Did you go to Marc Liyanage's site? He has made some great install packages, especially if you are going to use MySQL with PHP.
    http://www.entropy.ch/software/macosx/

  • I'm having trouble enabling php/apache.  The book I'm using may be out of date.  Where's instructions for OS 10.6?  Thanks.

    Specifically, after following the directions and checking them twice, when I tried to open a php file using firefox the browser would want to try to open it as a document, and when I tried to open it with safari it read the html but not the php portion of the file.  So I said open (the document) with firefox, and now it opens endless (until I quit the browser) empty windows when I try to open a php file (there are no loops in the file, and it does it even if I take the php out of it).  Changing the file to html opens fine.

    Ok, found some help in the answer to another question - thanks anyway!

  • PHP,MYSQL,ORACLE,APACHE issue?

    Hello All,
    In my oracle 10gr2 server that is build on rhel4, we have web based portal, now that web based portal connects to oracle and mysql, my problem is that, the developer told me that i have to install php4, apache2 with support of OCI8, i have tried every thing in google but unable to find, how can i do this, please help me out, thanks

    Some example guides show installing Apache as a non-root user just to avoid breaking production web servers when installing for the first time. A non-root user cannot start Apache on a privileged port like 80. Once you're familiar with the install process you can always install on the system default Apache or use 80 as the port number.
    The free, prebuilt PHP and Oracle-client stack called Zend Core for Oracle runs on x64. ZCO can be very easy to install. http://www.oracle.com/technology/tech/php/zendcore/index.html
    -- cj

Maybe you are looking for