PHP5 on OsX 10.5

Hi,
I have just upgraded to 10.5.1. I have figured out where apache lives and it starts up okay. I cannot, however, figure out where php5 lives(what directory?) or even if the 10.5 installer installed it. This machine previously had Marc Livange's (SP?) version of php5 as a course required php5 last summer. Anyway, where can I look for php5. Also if it is not installed, where can I find the binary on the Apple site for installation.
Once I get this going, I will attach the httpd.conf file in /etc/apache2.
Thanks,
Bob

Here's what you should do:
1 . Open /private/etc/apache2/httpd.conf in your favorite text editor. I use TextWrangler (from Barebones Software).
http://www.barebones.com/products/textwrangler/index.shtml
2. Go to line number 114 and uncomment it (remove the "#" sign from the beginning of the line):
#LoadModule php5_module libexec/apache2/libphp5.so
3. Go to line number 225. It looks like the middle line below:
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
4. Add "index.php" to the end of the middle line, like this:
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
5. Save the file. You'll need administrator rights to do this.
6. Restart apache2 by going to Sharing Preferences and turning off Web Sharing, then turning it back on. (It if was off to begin with, just turn it on.)
7. Now, create a blank text file in your /Users/yourusername/Sites folder. Name it "test.php". Insert the following into that file:
<? phpinfo() ?>
8. Save the file.
9. Finally, open a browser window and point it to: http://localhost/~yourusername/test.php
You should see a nicely formatted table giving you all the gory details about your newly enabled PHP 5.2.4 module. I hope this helps.
Message was edited by: Curtis Tucker

Similar Messages

  • PHP 4 will not compile in PHP5 on OSX Server 10.5.5  Mac Mini

    I have been using a commercial server which does not give access to php.ini but bought a Mac Mini and OSX Server 10.5.5. My old PHP 4 program will not compile in PHP5. It gives weird compilation errors to do with curly brackets but as soon as I alter one bracket it jumps to another similar error somewhere else in the program. I think it may require tweeking the php.ini or httpd.conf files which I have opened using Terminal but I don't know what might need to be changed. I expected this to be a turn-key system ready to go. I knew there would be changed required to migrate from PHP4 to PHP 5 and read the official PHP site, searched many forums, and google searches, called AppleCare but none knows what to do. I used an editor and there are 276 open brackets and 276 close brackets. If you have made the same migration without difficulty please let me know. Maybe I just need to start again!

    evan-e-sent wrote:
    Well, I don't think the code is too messy except for the globals I use.
    It is. The point of this function is beyond elusive given the number of side effects it seems to induce. Everything in it could be reduced to one or two lines, but odds are good it shouldn't even exist in the first place.
    I just use the same set of globals for all functions so that these variables are readily available everywhere in the program without having to think about it.
    That's a very common beginner tactic which is unfortunately very prevalent in publicly distributed PHP projects due to the fact that many of them are written by beginners. I'd highly recommend you start thinking about it if you want to get anywhere.
    They are all constants once they have been set initially.
    http://us2.php.net/manual/en/function.define.php
    Like $query is set only once when the program picks it up from a $GET statement.
    And I'll bet you're not sanitizing that query string at all before passing it along to mySQL.
    This leaves two questions. Do you think I should treat every function as a separate file and have the mainline bring them in as "included code". There are 126 functions.
    Refactoring should improve the organization, performance and readability of your code according to some logical criteria. Simply putting each function in its own file accomplishes none of these things.
    (I have also written a 6000 line program as a MySQL data processor to make it easier for my wife to manipulate the data in dozens of tables without having to keep track of all the unique keys. So this will be quite a big job.) If so I would appreciate a quick tip about how to do that in PHP. Other pre-processing I do with Applescript.
    Why didn't you just install phpMyAdmin?
    Second, goes back to my initial question. This parsing problem only appeared after switching to PHP 5.2.2 with MySQL. Could this weird behavior be caused by some setting in the PHP.ini or httpd.conf or my.conf files and if so what would I change. The fact that this has not been suggested on this forum makes me think it is not a config. problem. That in itself is useful information.
    Probably not, but who knows what other nightmares might be lurking in this file. Did you use short tags like <? ?> or something?

  • Hidden files in mac?

    Hello, Id like to know where can i find hidden files in my mac, id like to see if i can erse some of them, i also would like to know where is the php 4.4.1, that which comes with mac by default, cause i want to update it to the 5th version inthe command line. 10x a lot

    php is included in OSX client. the binary for php is located in /usr/bin/php
    you can find this by typing in a terminal
    whereis php
    /usr/lib/php holds what it says, lib files for php. this is where you might put pear plugins at.
    as for upgrading php. Apple is currently supplying 4.4.1 in the latest software update. there are installers out there to ugprade to 5, although i can't gurantee this isn't going to break something else that might depend on 4.4.1, hopefuly the installer you choose DOES NOT remove 4.4.1. more than likely they can both be installed on your system and live happily side by side
    below is a link that has some info on packages of php5 for OSX
    http://forevergeek.com/apple/php5_installer_for_osx.php

  • .ink files in Mac

    Dear All,
    I have recently purchasd a mac mini which i basically use for media browsing.
    Well i have a hard drive which i carry it around. I used in various computers, media players etc.
    I had used this hard drive previously on my mac, some how, presently all the files started showing 
    its extension as .ink files, and un able to use in my mac. I have used same HD in media players
    and computers where it opens with no problem. How ever in windows computer all the files shows as short cut
    but opens with no problem.
    i have also gone thrrough the link which says " go to the icon right click and make it as Alias"
    But when i tried it, it says you dont have permission to do this.
    Please assist with your coments.

    php is included in OSX client. the binary for php is located in /usr/bin/php
    you can find this by typing in a terminal
    whereis php
    /usr/lib/php holds what it says, lib files for php. this is where you might put pear plugins at.
    as for upgrading php. Apple is currently supplying 4.4.1 in the latest software update. there are installers out there to ugprade to 5, although i can't gurantee this isn't going to break something else that might depend on 4.4.1, hopefuly the installer you choose DOES NOT remove 4.4.1. more than likely they can both be installed on your system and live happily side by side
    below is a link that has some info on packages of php5 for OSX
    http://forevergeek.com/apple/php5_installer_for_osx.php

  • Tiger and php 5

    I thought I'd be getting php5 when I installed Tiger. When I go to terminal and do a searcg, however, the only resul I get is :
    #LoadModule php4_module libexec/httpd/libphp4.so
    Is there any way I can get the latest PHP, or any PHP5 at all, to run on Tiger?

    Sure...
    http://www.entropy.ch/software/macosx/php/
    http://maclife.wordpress.com/2006/02/12/install-apache2-php5-and-mysql-in-osx/
    http://mike.hostetlerhome.com/2006/11/19/installing-php5-on-osx-many-paths-one-t rue-road/

  • Apache 2 PHP5 frustrations

    I'm attempting to install OS X Apache 2 and PHP 5.2.2 on my personal Mac with very frustrating results. Working with the terminal scares the devil out of me but I'm trying. Nevertheless, there doesn't seem to be any one logical place for Apache to be installed, let alone php5. Different sources say it should be installed in different directories. For example:
    /usr/local
    /opt/local
    /Library
    and probably two or three more.
    I do web design and need to test locally and all this is very confusing. The reason I'm in this mess is that recently I had to do an Archive and Restore from my iMac disk. Okay, but in checking via Terminal with: httpd -v, I'm told Apache 2 was installed...yet I've read that to use Apache 2, you have to have Personal Web Sharing turned off and launch it from the terminal or from a special Apache 2 PreferancePane.
    If there and idiot proof way to install Apache 2 and the latest PHP version? Some kind of easy networking-illiterate installer package? And if so, what do I need to do to clean out any preexisting incorrect installations? (I probably have about three Apache2 folders in the above named folders but don't know how to launch the correct one...also PHP folders all over...can't get anything to work properly).
    Any help will be greatly appreciated!
    iMac G5 20" Display   Mac OS X (10.4.9)  

    There is no such thing as an Apache2 Preference Pane. When you install Apache2, it breaks the Websharing button because the launching binary cannot find the httpd.pid file. If you want the websharing button to work you need to do something to the httpd launch binary file, like replace it with the new one manually. I don't remember what exactly fixes it
    Apache2 can go wherever you want, and the files are all consolidated. This script installs the package and has a few pointers:
    # Build and install Apache on Mac OSX (NOT server!).
    gnutar -xzf httpd.tar.gz
    cd httpd-2.2.4
    # The installer will ignore these folders if they already exist:
    # /usr/share/httpd/error/
    # /usr/share/httpd/icons/
    # /Library/WebServer/
    # These items are now in a new location:
    # /var/log/apache2/access_log
    # /var/log/apache2/error_log
    # /etc/apache2/httpd.conf
    # Note that subsequent runs of the installer moves previous configurations to subfolder "original"
    # Components are listed at http://httpd.apache.org/docs/2.2/programs/configure.html
    ./configure --enable-layout=Darwin --enable-rewrite --disable-userdir --enable-so
    make
    sudo make install
    #/usr/libexec/httpd/mod_bonjour.so ?
    #/usr/libexec/httpd/modhfsapple.so ?
    # Permissions at ls /usr/sbin/envvars* seem to be wrong
    Notice that I did not figure out hpw to install the bonjour module and the HFS module.
    As for PHP, I don't know. Read this page and you may get a clue:
    http://Gnarlodious.com/Computer/Apache

  • WEB server doesn't start after php5 install failed

    Hi,
    Running a PPC G4 with osx server 10.3.9
    I tried to install entropy php 5.1.6 on my server but it failed and said it could not complete the install.
    After that my web service stopped and I can't turn it on anymore.
    Please HELP !
    I can't reinstall the whole OS because I need ton keep my MySQL DB.
    When doing [sudo apachectl start]
    I get the error :
    dyld: /usr/sbin/httpd Undefined symbols:
    _untitled
    /usr/sbin/apachectl: line 193: 850 Trace/BPT trap $HTTPD
    /usr/sbin/apachectl start: httpd could not be started
    Thanks

    Just found the answer on Entropy
    php5.1.6 from entropy is for 10.4 only apparently
    Someone just gave me 5.1.2 and it worked fine after I completely reinstalled my Server...
    So remember OSX Server 10.3.9 loves 5.1.2 php package from entropy,
    Just install the package of php5 as your php4 module is off and the web service stopped
    Then add the module of php5 in your list
    Finally turn on web service and ENJOY !

  • PHP5, Apache2 & MySQL

    I am trying to install PHP5, Apache2 & MySQL5 on my computer so I can do some development/testing using localhost. This is a client machine and not a sever. I downloaded the source files for PHP5 & Apache2 from their official website. I downloaded a packaged installer for MySQL 5. The versions I have are as follows:
    PHP - 5.2.2
    Apache - 2.2.4
    MySQL - 5.0.41
    First I installed MySQL from the pacakaged installer, it all worked fine, I have gone to the command line and connected to it, created a table & have mysql administrator so I am confident that it is working 100% correctly.
    Next I installed Apache from the source. I followed the instructions on http://www.phpmac.com/articles.php?view=252 I have started up the localhost and have connected to the webserver on my local machine, have gone to http://localhost.... and loaded up a page that I put into the Sites so I am confident that it working 100% correctly.
    PHP is where I ran into issues. I compiled it from the source code downloaded from the official php website. I used the instructions on the website listed before, I used the following configuration settings.
    ./configure \
    --prefix=/apache2/php \
    --with-zlib \
    --with-xml \
    --with-ldap=/usr \
    --enable-cli \
    --with-zlib-dir=/usr \
    --enable-exif \
    --enable-ftp \
    --enable-mbstring \
    --enable-mbregex \
    --enable-dbx \
    --enable-sockets \
    --with-iodbc=/usr \
    --with-curl=/usr \
    --with-mysql=/usr/local/mysql \
    --with-apxs2=/apache2/bin/apxs
    I ran sudo make and it all seemed to create the makefile correctly. I ran sudo make install and I enconted an error, I can't remeber it exactly but it was saying something about the mysql image file or something.
    I then restarted the computer and recompiled the source file using the same instructions on that website except for the line: --with-mysql=/usr/local/mysql \ and it compiled correctly, I ran sudo make install and it installed PHP5 correctly. I made a phpinfo file and put it in the sites folder and it works fine. I made some configuration changes in the php.ini file so I would prefer not to recompile it all from scratch again. I've done it twice so far and it took a few hours.
    So my question is: Is there somewhere that I can get the just mysql library modules for php or is there a problem with how I did the source compile that could have caused the issues?
    I just need some help getting this final part of it working. If anyone can help I would be very appreciative

    What version of Apache are you in fact running? Because if you are using the "Web Sharing" preference panel button to start Apache then you are running Apache 1.3.3, because that button launches the file at
    /usr/sbin/httpd
    To properly integrate your new Apache into OSX, you need to take these steps:
    Delete or rename the old Apache executable:
    sudo mv /usr/sbin/httpd /usr/sbin/httpd_old
    If you use the Sharing Preference Pane at this point, it will actually start Apache2, but it won't come back from grey because it's looking for the PID (Process ID) file to acknowledge the start. So create a link from the new httpd executable to the old location:
    sudo ln -s /path/to/new/httpd /usr/sbin/httpd
    I don't know where you installed Apache2 so you will have to fill in your own path. Alternatively, you can copy the file rather than symlink it.
    This arrangement allows you to run the old Apache from the Terminal, but the sharing prefpanel launches the new Apache.
    Now change the httpd.conf to create it's PID file in the right location. Open up
    /path/to/Apache2/httpd.conf
    and look for the line:
    PidFile logs/httpd.pid
    Change the line to:
    PidFile /private/var/run/httpd.pid
    Now Apache2 will know where its process number is located. Use the Sharing Preference Pane and click on "Personal Web Sharing". Apache2 should start up so test it by asking for a bogus page:
    http://127.0.0.1/bogus
    The error page should say you are running Apache2.
    That may solve your PHP problems.

  • Adding PHP5 caused webserver to give Forbidden message

    Hello,
    When attempting to install PHP5 on to Mac OSX server, it has left the webserver giving users the:
    Forbidden
    You don't have permission to access / on this server.
    Apache/1.3.33 Server at 192.168.0.1 Port 80
    I have have double checked all the permissions on the folders/files that I am serving and everything seems correct. I am at a loss as to where to look next.
    Has a config file been modified?
    Also, when I try to add the PHP5 module, it crashes the webserver.
    Any thoughts would be appreciated.

    I finally found the answer to my own problem. Here is the solution for anyone else with the same experience.
    http://discussions.apple.com/thread.jspa?messageID=1900509&#1900509

  • Error:  "Could not complete your request because of a program error" (photoshop CS2 9.0.2 on MAC OSX

    Today I started my program (photoshop CS2 9.0.2) and opened a JPG file. When I went to print the file the program crashed and closed. When I restarted the program and went to open the file I got this error message, "Could not complete your request because of a program error".
    I have tried several different file types/sizes and all result in the same error message since the program crashed. It will not open any file I try to open. As I indicated above I am using Photoshop CS2 9.0.2 it is on a MAC with OSX 10.4.11.
    I called Adobe and the Rep directed me to Tech Note 331307 and told me to Re-create the Photoshop preferences files. Which I did and restarted the program, but when I tried to open a file (any file) I still get the same error message so it doesn't appear to be the preferences.
    Does anyone have any info as to what the problem may be and how to correct it.
    Thanks

    Thanks for the response. OK... This is the first day I have been able to get back to the problem.
    My system I am running Photoshop on is a Power Mac G4, AGP Graphics ATY Rage 128Pro chip set 16MB VRAM LCD 1280x1024 32-bit color, 500MHz, 1.75GB of memory, 1 MB L2 Cache, 100 MHz Bus Speed. I had installed the latest security update and repaired the permissions the day the problem started.
    Now to day I started the system and went in and created a Guest Account. I logged into the guest account and started Photoshop. Low and behold it worked just fine. So I logged out of guest and logged into my main user account And started Photoshop. Wouldn't you know it.... It works just fine. I can open any file I want with now problems.
    I got to thinking after I had done all of this that I wished I had tried to open a file in Photoshop today prior to creating the guest account to see if it still had the problem in my main user account.
    I did not change anything else on the system and all seems to work fine now. So at his point I am really not sure what the problem was.
    Again thanks for taking the time to respond to this issue.

  • Download error in (osx) adobe desktop app (corrupted download link).

    Here is a discription of the problem. Please consider that some of the wording might not be correct, as I do have to translate the error message from German into English.
    Using OSX 10.9.2, when clicking inside the adobe desktop app (top of the screen bar) on the tap "apps", the following screen (screenshot) appears, which states, translated from top to bottom:
    download error
    download error. Please contact support.
    (link) contact support
    (link/button) download creative cloud -> This button unfortunatly leads to the following error page "http://www.adobe.com/special/errorpages/404.html"
    All apps, like Bridge, Photoshop, Lightroom, etc. are installed and work just fine. So no problem here. I seem however unable to redownload the desktop app (in order to reinstall). As stated above the provided link inside the desktop app itself is coruppted and within the (online) web-based download centre (user logged in) I am only adviced to use the desktop app. This is a dead end and I do not know what to make of this error, let alone solving it. Please help!

    I am sorry Romsinha but this doesn't really help.
    I already restarted the desktop app and while I am obviously online and connected the problem (error message) remains the same. Information within the "home" tap is recieved/loaded  (little blue spinning wheel) stating that various apps recently have been updated. Yet the same loading wheel within the "apps" tap results in an error. My best guess is that some internal link within the app is corrupted, leading to a source on a server that can not be reached.
    UPDATE
    I clean uninstalled adobe creative cloud as discribed in the article you provided (using the cleaner tool) and even uninstalled the browser plugin. After downloading and reinstalling creative cloud the problem however remains the same. "Apps" tap still shows the same problem. "Home" tap now displays the following:

  • Adobe CC with OSX server

    We used the Adobe Creative Suite for a long time in a situation where users login through on open directory osx server.
    It worked fine until we started to use Adobe Creative Cloud. We use the Enterprise version.
    Computers are very slow now, especially Indesign crashes a lot and can sometimes not even be opened anymore.
    Has anybody experienced the same problems?
    Regards,
    Martin

    Martin,
    Have you made any progress on this issue or found out anymore about running CC in a server environment? I am researching the same thing now and can't find straight answers.
    Thanks,
    Thomas

  • When i login to my banks online access point a new browser is opened and it takes up the full 27" display. ca i restrict the size of web browser screen used by tme online banking service?  imac 27" OSX snow leopard 10.6.8

    Intel iMac OSX Snow Leopard 10.6.8
    I logon to bank via its internet portal and next screen takes up all 27" display.
    Can this be controlled in any way or do I just put up with it, it is really annoying.

    Thank you for your response. Whew...i omitted to say I use Firefox... tried to logon using Safari... same
    result Installed Chrome ...same thing Installed Opera... this browser actually has in its Preferences menu
    the capacity to set JavaScript Options under the Conent submenu... DISALLOWED  all of resizing of windows, 
    moving of windows and ability of script to hide menu bar ... this fixes the screen to available browser size...
    so my issue has at least this resolution. Thank you Flet Cheryl 

  • Mail app deleted and reinstall wont open, says not compatible with OSX

    i accindetally deleted my mail app and emptied the trash, when I tried to reinstall from the startup disk, it installs but wont open, saying that the version of mail is not compatible with the version of OSX (10.5.8)

    The Combo updater of Leopard 10.5.8 can be found here:
    http://support.apple.com/downloads/Mac_OS_X_10_5_8_Combo_Update
    There is no downloadable version of Mail.app - it comes with the operating system i.e. on your install disks.

  • Web-Disk on OSX 10.9 Give me this error: "Finder got an error: Network file permission error."

    Previously I was using OSX 10.8 and Web Disk was working great.
    Since I upgraded to OSX 10.9 Web Disk Dont Attach to my compputer and give me this ERROR:
    FInder got an error: Network file permission error.
    When I got this ERROR first time I searched GOOGLE and found this link: http://cammodude.blogspot.no/
    And I did:
    To force all connections to be SMB1:
    Open A terminal window
    paste in the following line followed by the return key(should be all on one line): 
    echo "[default]" >> ~/Library/Preferences/nsmb.conf; echo "smb_neg=smb1_only" >> ~/Library/Preferences/nsmb.conf
    What the command does:
    Creates a file called nsmb.conf  in your  home directory at the path ~/Library/Preferences/nsmb.conf.
    Adds directives to force SMB connections to use the SMB1 protocol.  This is slower but stable.
    Then I could use Web Disk on OSX 10.9 after executing this command in Terminal.
    But now I restarted my Macbook and now Im NOT able to connect to Web Disk and get the same ERROR.
    FInder got an error: Network file permission error
    After trying 100 times it attaches 1 time but then show this ERROR:
    Can't get <<class cdis>> "my.server.com/2078" of application "Finder".
    If this happen then I can see the files in Finder and see the Contents and Size of files but if I open a PHP file in BBEdit then it shows BLANK.. But actually it is NOT blank.
    Now Im stuck How can I solve this? All help is highly appericated..
    Thank you so much...

    Hi,
    Make sure to chmod the app, something like this :
    chmod -Rf 777  secure_site_WebDisk.app
    (in my case the CPanel provided the app for my OSx version.)

Maybe you are looking for

  • Install DVD in Chinese

    Hey everyone, I just installed SL last night without so much as a hiccup. Everything works and I got an astonishing 26gb back! My question is probably very easily answered so forgive me if it seems dumb. When I mounted the install disc, the user agre

  • This card cannot be used in iTunes store

    I recently tried to make a purchase on iTunes with the same credit card I've had for years. It took me to a screen to verify my payment info and after punching in the security code it said "this card cannot be used in the iTunes store". There isn't a

  • Win 32 appilication error while running Itunes 7 setup

    Does any one have a solution to the error "Itunessetup.exe is not a valid Win32 Application" while running the new Itunes setup.

  • Asset-Building legacy data

    Dear all There is scenario for Asset-Building in legacy data......for building there are many line items...for e.g. 1. Building is  purchased 2. then some addition in this asset(with other date) etc. Now how to upload this assets in the system..... r

  • APPLET tag missing CODE parameter

    We are planning to use WebStart for our swing_apps deployment. At the moment we use applets with Plug-In 1.3.1_04 I changed the html as follows: <OBJECT CODEBASE="http://java.sun.com/update/1.3.1/jinstall-1_3_1_04-win.cab" classid="clsid:8AD9C840-044