Jump to content

New to PHP - What do I need to get started?


nubby

Recommended Posts

I know a fair amount of xHTML/CSS/Javascript but also want to move on to PHP. But I know PHP can't be ran like xhtml can through the browser, right? My hosting supports PHP, but it would be a pain to upload my files all the time testing to see if it worked right. So I did some searching around and found this: http://w3schools.com/php/php_install.asp

 

It says what I need, so should I install that on my computer (I am running Ubuntu Linux). I do not plan on hosting anything on my computer, but I would like a quick way to have the ability of seeing if everything checks out with my PHP pages instead of uploading to my hosting via cpanel or ftp. Anything suggestions would be greatly appreciated.

Link to comment
Share on other sites

hhttp://en.wikipedia.org/wiki/Php

 

Use your localhost for the time being, and when you're ready, upload them to a webserver via FTP.

 

phpMyAdmin is a nice little app for interacting with your SQL DB.

 

http://www.php.net

 

Good place to start. Go purchase/DL some e-books, and find a few online tutorials.

 

Good luck.

Link to comment
Share on other sites

hhttp://en.wikipedia.org/wiki/Php

 

Use your localhost for the time being, and when you're ready, upload them to a webserver via FTP.

 

phpMyAdmin is a nice little app for interacting with your SQL DB.

 

http://www.php.net

 

Good place to start. Go purchase/DL some e-books, and find a few online tutorials.

 

Good luck.

 

Do you mind helping me set up the localhost thing? I am sort of new to this topic and do not know much about it. I am also on Ubuntu Linux, so I am not sure if it is different.

Link to comment
Share on other sites

If you are using Ubuntu you should be able to use the synaptic package manager to install apache and php and mysql. You should just have to search for the names and install the packages accordingly. Usually it will set it up with a standard configuration to get things going.

 

 

To start learning PHP I just use the PHP Reference manual. The manual for PHP is written and structtured really well. For other problems or if I want a function to do someting specific (like say, recursively reading a directory into an array) I just search for functions on the internet and finally if I need help with some specific problem come and ask here or some other forum.

 

 

The only thing I will warn you about is if you're developing code on your local machine and upload it to your web host later, I would recommend doing some sample scripts first and upload and check that they don't throw warnings or do things that don't occur on your local machine.

I recently put my (1 year's worth) of coding work onto my cousin's Ubuntu machine and had to spend 2 days modifying my code because it would throw warnings about things like missing parameters when I call functions and things. On my setup, those warnings didn't even appear in the output but on my cousins they did.

Link to comment
Share on other sites

If you are using Ubuntu you should be able to use the synaptic package manager to install apache and php and mysql. You should just have to search for the names and install the packages accordingly. Usually it will set it up with a standard configuration to get things going.

 

 

To start learning PHP I just use the PHP Reference manual. The manual for PHP is written and structtured really well. For other problems or if I want a function to do someting specific (like say, recursively reading a directory into an array) I just search for functions on the internet and finally if I need help with some specific problem come and ask here or some other forum.

 

 

The only thing I will warn you about is if you're developing code on your local machine and upload it to your web host later, I would recommend doing some sample scripts first and upload and check that they don't throw warnings or do things that don't occur on your local machine.

I recently put my (1 year's worth) of coding work onto my cousin's Ubuntu machine and had to spend 2 days modifying my code because it would throw warnings about things like missing parameters when I call functions and things. On my setup, those warnings didn't even appear in the output but on my cousins they did.

 

Okay, I am about to install the following packages:

 

mysql-client-5.0

php5

apache2

 

Those packages also include other packages that are needed for them to run. But when I search php or mysql or apache there is tons of things to download, just hope I got the right ones.

Link to comment
Share on other sites

You simply create php files and place them within your document root. Usually /var/www, you can find out for sure by searching for the DocumentRoot directive of your httpd.conf file.

 

grep DocumentRoot /etc/apache2/httpd.conf

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.