what do i do!!

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

gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Post by gaogier »

how do you debug?

iv uploaded and installed a topsites list and all im getting is bugs

so if someone is willing to give me a hand debuging please pm me asap
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Post by gaogier »

i need a lot of help with debugging!!
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

PHP errors help alot with debugging. They give you the line number the error is on and they also tell you what the problem is (and sometimes even what it was expecting).

Without code and errors nobody can help you anyway.
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

See all your errors by putting:

Code: Select all

error_reporting(E_ALL);
At the top of your PHP code.
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Gagoier: you are wasting people's time here. You are on a programming forum here and we exepct you to know at least the basics such as FTP, hosts, browsers, debugging etc. etc.

My advise: buy a book on PHP and learn the fundamental stuff. Don't try running before you can walk.
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Post by gaogier »

are you going to find all my past topics and critise them?
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

gaogier wrote:are you going to find all my past topics and critise them?
If you're unwilling to learn, yes. If you believe I do it out of pleasure: no, not really. I'm doing so you can ask more precise questions. Once that's achieved, you will contribute to the quality of the questions asked on this board. And that's my main concern.
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Post by gaogier »

one thing, i have tryed to learn php, i have a book and i dont understand half of it, i and the stuff i do i forget lol

sorry
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Can I suggest trying some of the basic php tutorials at Spoono here:

http://www.spoono.com/php/tutorials/

They actually have some that cover things you are struggling with too. They have some great little beginners scripts to play with and all you need is http://www.php.net/ to look at alongside it - no books, just basics ;)
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Post by gaogier »

thats what i was using in the first place, i got it from your sig :D
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I tell you what... when I started out writing PHP I kept forgetting things too, and some things totally confused me (arrays - multidimensional ones :?). I just kept grabbing little bits of code, writing little snippets all hours and constantly referring to the manual. (yeah ok, I kinda got hooked :P).

After a while, not doing anything particularly productive, just playing around, it started to sink in. I still constantly refer to the manual - that's nothing to be ashamed of, that's why it's there. Essentially... if you try doing little things until you understand them... and don't move on until you grasp the basics it all falls into place, just enough to start on something a little bigger.

You'll probably get what you want done faster if you put it down, play around and learn the basics, then come back to it, rather than halting at every error message you hit ;)
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Post by gaogier »

thanks for the tips

ill try and refer to the manuals and do what you said
Post Reply