new2php76 Posted July 3, 2008 Share Posted July 3, 2008 Hello All, Complete newbie to PHP and programming in general I guess! I am however trying to learn this for a potential new role I am about to start which requires knowledge of PHP and Apache Web Servers. Anyway, I am using Mac OS X 10.5 (leapard) which has PHP 5.2.4 built in automatically. I have been following this useful guide from Foundation PHP Tutorials http://foundationphp.com/tutorials/php_leopard.php but find my self stuck on part 14. How on earth do I "create a page called test.php"? I have tried Terminal, a web text editor and typing it into the URL directly with no success. Any pointers please anyone? Can someone also recommend a really basic guide so that I can kinda get a crash course in PHP. (Impress those employers at a Job interview sort of thing! ) Thanks in Advance, Quote Link to comment Share on other sites More sharing options...
awpti Posted July 4, 2008 Share Posted July 4, 2008 If you can't figure that part out, you don't need a job working with PHP/Apache. Quote Link to comment Share on other sites More sharing options...
new2php76 Posted July 4, 2008 Author Share Posted July 4, 2008 If you can't figure that part out, you don't need a job working with PHP/Apache. If you can't offer some constructive advice awpti, you don't really need to post a reply? Everybody has to start somewhere and I'm disappointed by your smug attitude. Anyone please? Quote Link to comment Share on other sites More sharing options...
DarkerAngel Posted July 4, 2008 Share Posted July 4, 2008 If you can't figure that part out, you don't need a job working with PHP/Apache. If you can't offer some constructive advice awpti, you don't really need to post a reply? Everybody has to start somewhere and I'm disappointed by your smug attitude. Anyone please? He has a point though, if you don't know how to do something in which a job requires then you don't need that job. Epically since there is probably vary highly qualified PHP programmers that need work **cough**me** And I think that the page that you supplied did a fine job explaining how to start the server. Quote Link to comment Share on other sites More sharing options...
mmarif4u Posted July 4, 2008 Share Posted July 4, 2008 Some useful sites: http://www.w3schools.com/PHP/default.asp http://www.goodphptutorials.com/ http://www.tizag.com/phpT/ http://www.tutorialized.com/tutorials/PHP/1 http://www.php-mysql-tutorial.com/ Quote Link to comment Share on other sites More sharing options...
Wolphie Posted July 4, 2008 Share Posted July 4, 2008 Since you're running a mac, I would first suggest downloading and installing a useful IDE (intergrated development enviroment). For the mac I use either Xcode development tools (download from the apple developer connection website free, version 3.0 for OS X 10.5) or TextMate, which isn't free although it's better than Xcode in my opinion. With these you'll be able to create a range of different files. But back to your original question, it isn't difficult. For example, when you open say notepad on windows and type something and then save it. It'll ask you to enter a name to save it as, and it'll have a .txt extension. You just change this .txt file extension to .php. The best resource for learning PHP would be PHP.net He has a point though, if you don't know how to do something in which a job requires then you don't need that job. Epically since there is probably vary highly qualified PHP programmers that need work **cough**me** How is that relevant? If you're going to criticise people, at least offer a solution rather than just being an a** about it. At the end of the day, we were all beginners at some stage. None of us knew how to do any of this, until we put in the effort to learn and asked for guidance from more experienced people along the way. Quote Link to comment Share on other sites More sharing options...
new2php76 Posted July 4, 2008 Author Share Posted July 4, 2008 If you can't figure that part out, you don't need a job working with PHP/Apache. If you can't offer some constructive advice awpti, you don't really need to post a reply? Everybody has to start somewhere and I'm disappointed by your smug attitude. Anyone please? He has a point though, if you don't know how to do something in which a job requires then you don't need that job. Epically since there is probably vary highly qualified PHP programmers that need work **cough**me** And I think that the page that you supplied did a fine job explaining how to start the server. Well the job requires an understanding of PHP, and you're right the site does doa fine job of explaining how to start a sever. I am just stuck on part 14 and required some help. Thanks for the link mmarif4u. I was under the impression this was a beginners section for a beginner? If anyone can offer some quick advice then it would be appreciated Quote Link to comment Share on other sites More sharing options...
new2php76 Posted July 4, 2008 Author Share Posted July 4, 2008 Thanks wolf. What I wanted to know Quote Link to comment Share on other sites More sharing options...
mmarif4u Posted July 4, 2008 Share Posted July 4, 2008 14 Create a page called test.php, and type in the following code: <?php phpinfo(); ?> Save it in Macintosh HD:Library:WebServer:Documents. 15 Load the following URL into your browser: http://localhost/test.php If you see the PHP configuration screen, you're up and running! Its simple,just save that file with .php extension in the webserver directory,as i am not a user of Mac,so cant suggest you where it will be.Then open your browser and type as mentioned above: http://localhost/test.php If it works ,PHP is installed correctly will show a PHP cong page with complete details. So it mean PHP works with apache. Cheers Quote Link to comment Share on other sites More sharing options...
new2php76 Posted July 4, 2008 Author Share Posted July 4, 2008 Wolphie and mmarif, thanks a lot. I have enough resources to get stuck in now, and the PHP page came up. Just so you know, I had to create a php page in an apple programme called TextWrangler. Thanks again guys Quote Link to comment Share on other sites More sharing options...
DarkWater Posted July 4, 2008 Share Posted July 4, 2008 Any text editing program will work for that, actually....You could even do: cd /your/server/path echo '<?php phpinfo(); ?>' > test.php That would even do the trick. I didn't think that creating a file was that hard...no offense. You can use almost any program. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.