Jump to content

creating PHP page in MAC OS X 10.5 (PHP 5.2.4)


new2php76

Recommended Posts

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!  ;D)

 

Thanks in Advance,

Link to comment
Share on other sites

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? 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

If it works ,PHP is installed correctly will show a PHP cong page with complete details.

So it mean PHP works with apache.

Cheers

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.