Delving into PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

TheHappyPeanut
Forum Commoner
Posts: 50
Joined: Wed Apr 11, 2012 8:54 am
Location: United States

Delving into PHP

Post by TheHappyPeanut »

Hi guys,

My name is John and I have been interested in learning PHP for quite some time. I currently specialize in HTML/CSS and I would really like to learn PHP so that I could begin working on a new personal project. I was wondering if you guys could lend me some advice! :)

1. What software do you use? I've read Notepad++ works well and Zend Studio. Personally, I've always used Notepad++ for coding, but I'm not sure how much it limits a person who is going to attempt a larger-scale project in the future.

2. What were your favorite sites for learning PHP in the beginning?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Delving into PHP

Post by Celauran »

1. You'll do better with a proper IDE than with a simple editor. I like NetBeans. Others prefer Eclipse or PHPStorm. Try them out, see which works best for you.

2. Read this, then this. The PHP Manual is, of course, an invaluable resource. I'm sure you're already aware as you have a background in HTML/CSS, but stay the hell away from w3schools.
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Delving into PHP

Post by social_experiment »

TheHappyPeanut wrote:. What software do you use? I've read Notepad++ works well and Zend Studio. Personally, I've always used Notepad++ for coding, but I'm not sure how much it limits a person who is going to attempt a larger-scale project in the future.
I use Notepad++ and i haven't had any problems with it; i'm not sure i understand the second part of your question, could you clarify?
TheHappyPeanut wrote:2. What were your favorite sites for learning PHP in the beginning?
If you are just starting out you could have a look at this url
http://devzone.zend.com/6/php-101-php-f ... -beginner/
I haven't used it myself so i cannot testify to it's value.

The php.net site is also worth visiting (and book-marking) as it is useful to refer back to if you don't understand something php like a specific function.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
TheHappyPeanut
Forum Commoner
Posts: 50
Joined: Wed Apr 11, 2012 8:54 am
Location: United States

Re: Delving into PHP

Post by TheHappyPeanut »

social_experiment wrote:
TheHappyPeanut wrote:. What software do you use? I've read Notepad++ works well and Zend Studio. Personally, I've always used Notepad++ for coding, but I'm not sure how much it limits a person who is going to attempt a larger-scale project in the future.
I use Notepad++ and i haven't had any problems with it; i'm not sure i understand the second part of your question, could you clarify?
TheHappyPeanut wrote:2. What were your favorite sites for learning PHP in the beginning?
If you are just starting out you could have a look at this url
http://devzone.zend.com/6/php-101-php-f ... -beginner/
I haven't used it myself so i cannot testify to it's value.

The php.net site is also worth visiting (and book-marking) as it is useful to refer back to if you don't understand something php like a specific function.
When I said I wasn't sure how well Notepad++ would scale for larger projects, I was considering its simplicity. You don't have the ability to create projects and it doesn't keep track of your file structures (unless I missed that feature, which is possible because I've only used it for PSD to HTML).
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Delving into PHP

Post by social_experiment »

TheHappyPeanut wrote:When I said I wasn't sure how well Notepad++ would scale for larger projects, I was considering its simplicity. You don't have the ability to create projects and it doesn't keep track of your file structures (unless I missed that feature, which is possible because I've only used it for PSD to HTML).
i see; i've used dreamweaver before and one of it's biggest issues for me was the fact that it uses too much resources, possibly due to all the additional feature it offers, it also lets you create projects and manage file structures

Edit
Accidently quoted myself instead of TheHappyPeanut :oops:
Last edited by social_experiment on Wed Apr 11, 2012 4:47 pm, edited 1 time in total.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: Delving into PHP

Post by greyhoundcode »

I'm not a Notepad++ user - at least I haven't used it for quite a while now - but I gather it can be extended through various plugins to bolt on all sorts of capabilities. Personally, I use a mix of Sublime and PhpEd according to my mood and what I'm working on.

I know a lot of people shun IDEs as sluggish beasts but I find many of the time saving features they offer, from intelligent code completion through to well integrated debugging, are simply invaluable.
TheHappyPeanut
Forum Commoner
Posts: 50
Joined: Wed Apr 11, 2012 8:54 am
Location: United States

Re: Delving into PHP

Post by TheHappyPeanut »

I believe I am going to use Eclipse. Once I install Eclipse, I believe I need to install things such as phpMyAdmin, MySQL, PHP, and Apache. Are there any good programs that do all of this?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Delving into PHP

Post by Celauran »

TheHappyPeanut wrote:I believe I am going to use Eclipse. Once I install Eclipse, I believe I need to install things such as phpMyAdmin, MySQL, PHP, and Apache. Are there any good programs that do all of this?
They should all be in your distribution's repositories, so use your regular package manager. If you're not using Linux, do yourself a favour and install a distro inside a virtual machine to act as your test server.
TheHappyPeanut
Forum Commoner
Posts: 50
Joined: Wed Apr 11, 2012 8:54 am
Location: United States

Re: Delving into PHP

Post by TheHappyPeanut »

Do you know where I can learn to install a virtual machine on my system? I am running Windows 7.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Delving into PHP

Post by Celauran »

It's just a piece of software like any other. There's really nothing to learn. Take a look at VirtualBox.
TheHappyPeanut
Forum Commoner
Posts: 50
Joined: Wed Apr 11, 2012 8:54 am
Location: United States

Re: Delving into PHP

Post by TheHappyPeanut »

I installed NetBeans + WAMP and localhost/phpMyAdmin are both working. However, when I attempted to run an example PHP script, it said this:

Not Found

The requested URL /Example-1/index.php was not found on this server.


Any idea what I did wrong? It was attempting to access http://localhost/Example-1/index.php
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Delving into PHP

Post by Celauran »

TheHappyPeanut wrote:Any idea what I did wrong?
You installed WAMP.
TheHappyPeanut
Forum Commoner
Posts: 50
Joined: Wed Apr 11, 2012 8:54 am
Location: United States

Re: Delving into PHP

Post by TheHappyPeanut »

That's rather vague.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Delving into PHP

Post by Celauran »

Windows + PHP = endless headaches. It's not for nothing I recommended using LAMP in a virtual machine. Admittedly, this sounds more like an Apache misconfiguration than a PHP error per se.
TheHappyPeanut
Forum Commoner
Posts: 50
Joined: Wed Apr 11, 2012 8:54 am
Location: United States

Re: Delving into PHP

Post by TheHappyPeanut »

It's weird because localhost shows up fine, but when I try to run my project it says the file cannot be found.
Post Reply