Ive been trying to get into PHP by doing tutorials.
I need to be able to do this on a Mac and a PC. First the Mac.
Figured out how to get Apache to work and it says its installed if I
go to the local host page on my mac.

I also tried installing some form of PHP after failing to get the root password
for my mac to edit the httpd.conf file.
After trying entropy and macport which both wouldnt install i got Fink to install.

Now what?
I figured out that I need to put my .php files in my users/name/site folder although it doesnt display correctly. I dont see the message coded on the "my first PHP page" lesson.

I am trying to download Xampp as we speak.

I am completely clueless and ive been googling for about 4 hours today just to get to the point where I can start to learn. Any advice or ways to solve my problem?

Thanx

    xampp is a good choice for mac and http://www.wampserver.com is good for windows. Those are great places to start as it sounds like you either don't have php installed, or set up correctly. These programs will get it all working together for you in an easy install method. Just dbl click the installer and follow the directions and you should be good to go.

    You might need to uninstall everything you have done to this point though, meaning if you have installed php or apache by itself, uninstall those first then install wamp or xampp.

    Warmaster

      If you're willing to buy me a mac, I'll video-record my installation of Apache on OS X 😉 But windows is easy. Heck, I've even got a sticky in the installation forum on installing Apache 2 with PHP 5 on Windows (including Vista).

        Thanx for the response.
        I dont think I can uninstall what I did so far since on mac these programs didnt leave any program icons in the applications folder and macs are a bit screwy when it comes to figuring out how to uninstall.

        Someone please tell me the context of these appz... if I was only posting on a server what would I need... I dont get why I cant upload to a php enabled server directly (which I have access to) and jsut view the script there... that doesnt work either. Because normal users can view php so Im confused. Can anyone please explain the roles and contexts of the php, apache and database software like mysql?
        Im completely new at this...

          apache is the literal file server for a webserver. PHP is just an interpreter language for your php scripts. MySQL or whatever RDBMS is just a database.

          When you run a php script, usually it's run as the user "nobody" or whatever user the apache server is running as. This happens because in Apache's config it spawns a php process as that Apache user (just like your username on a Windows machines opens programs, that's essentially what Apache is doing). So you want to make sure that Apache has the ability to read the php files. Also double-check that the Apache user has the ability to read the directory. Many times a <Directory> configuration is missing and requests are denied.

          As for being able to upload to a server, you should just be able to upload a php file to the document root of the site and then browse to it. you can't upload it to just anywhere, it has to be where Apache can read it, and has permission to read it (i.e. the document root of a website).

            the document root is typically htdoc or www (www for sure for wampserver) but those are the normal document roots on a local setup but as bpat1434 mentioned, you may need to checp your apache configuration file to see for sure what the directory is.

            Warmaster

              Spoke to the dude who runs the company servers. He has to enable PHP on the server. Its a server that he isnt running but he pays for the service and runs it as a middle-man for our company since he is infinitely more adept at code etc than I am.

              Also i will try to download Xampp completely. The download keep crashing.

              Whoops. my mistake. Downloaded the wrong version from another site. my mistake

                Write a Reply...