Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mfogel2002

macrumors newbie
Original poster
Hello

I am total newb to PHP, and Web site development as a whole. I just want to make sure I have everything I need to start to learn PHP. I have TacoEdit which I believe you can use PHP code in. I also have Apache. Do I need anything else to start using PHP?

If I create the command statment to connect to MySQL do I just save the file and open it in Apache? Sorry for the dumb questions like I said I am a total newb.

Thanks
 
If you want to run it on your computer, then no.
If you want to upload to your server, it'll work most definitely...

If you want to use PHP/MySQL with your Mac's built-in websharing use the steps highlighted here, minus the bit about using WordPress... unless that's what you want to do 😛

Hope that gets you started,
reality
 
Cool, thanks for the info. I guess Apache wasnt loaded with PHP. The fix worked, well atleast I think it did.
 
you can check by making a php page with this code in it...

Code:
<?php phpinfo(); ?>

Just put that file in /Library/WebServer/Documents and then open it in a browser. It should print out a list of all your PHP capabilities and more.
 
dornoforpyros said:
Do the standard!!!

<?php echo "hello world!" ?>

or everything will break hehe 😛

you better remember the semicolon... or everything will break.

Code:
<?php echo "hello world!"; ?>
 
I just "installed" PHP last night. I couldnt believe how easy it is - you just uncomment out 2 lines of code in your httpd.conf file. I did it all from within terminal (having never really looked at terminal at all), using these instructions. Then finally go into system preferences > sharing > tick Personal Web Sharing. :EDIT: Make sure when you are following Bill Stevensons instructions within Terminal that you press the ESCAPE button, and dont just type escape. You wouldnt believe how much that confused me! 😛

Now when you go to //localhost/ in safari it'll load up your site, WITH php if you need it. You store all your files in /library/webserver/documents/

I've only recently started working with php, and it amazes me daily (as sad as that is). Its one of the few things where I get an idea in my head, tell it to one of my php guru friends and they tell me its easily possible! Fantastic. CSS+PHP+MySQL makes me happy!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.