re:php debugging skills
am 26.09.2008 17:22:09 von muhsin
Could you guys share your development setup, like what kinds of software
(IDE's/Editors) you are using for developing php scripts?
It might sound silly but I am just curios, as I just got started in php
programming en i have firefox + kate/bluefish + LAMP built with gentoo.
Im mostly thinking that with only firefox and some logs left /var/log or
so, its not enough for me..Im looking for something like an IDE which
can allow me to debug code in steps in central manner approach (ide),
simplicity and efficiency...u know what i mean? :-D
Just kiddin bout simplicity ;-)
Thanks guys...
regards,
muhsin
--
Extra details:
OSS:Gentoo Linux-2.6.24
profile:amd64
Hardware:x86-64 msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,basic,VHDL,bash
Typo:40WPM
server(s) owned:
ftp://muhsinzubeir.homeftp.net
http://muhsinzubeir.homeftp.net
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: re:php debugging skills
am 26.09.2008 18:06:25 von Bastien Koert
------=_Part_28534_7106292.1222445185557
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Fri, Sep 26, 2008 at 11:22 AM, muhsin wrote:
> Could you guys share your development setup, like what kinds of software
> (IDE's/Editors) you are using for developing php scripts?
> It might sound silly but I am just curios, as I just got started in php
> programming en i have firefox + kate/bluefish + LAMP built with gentoo.
> Im mostly thinking that with only firefox and some logs left /var/log or
> so, its not enough for me..Im looking for something like an IDE which can
> allow me to debug code in steps in central manner approach (ide), simplicity
> and efficiency...u know what i mean? :-D
>
> Just kiddin bout simplicity ;-)
>
>
> Thanks guys...
> regards,
> muhsin
>
> --
> Extra details:
> OSS:Gentoo Linux-2.6.24
> profile:amd64
> Hardware:x86-64 msi geforce 8600GT asus p5k-se
> location:/home/muhsin
> language(s):C/C++,basic,VHDL,bash
> Typo:40WPM
> server(s) owned:
> ftp://muhsinzubeir.homeftp.net
> http://muhsinzubeir.homeftp.net
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
been discussed ad nauseum...check the archives
--
Bastien
Cat, the other other white meat
------=_Part_28534_7106292.1222445185557--
Re: re:php debugging skills
am 26.09.2008 18:14:14 von Jason Pruim
On Sep 26, 2008, at 11:22 AM, muhsin wrote:
> Could you guys share your development setup, like what kinds of
> software (IDE's/Editors) you are using for developing php scripts?
> It might sound silly but I am just curios, as I just got started in
> php programming en i have firefox + kate/bluefish + LAMP built with
> gentoo.
> Im mostly thinking that with only firefox and some logs left /var/
> log or so, its not enough for me..Im looking for something like an
> IDE which can allow me to debug code in steps in central manner
> approach (ide), simplicity and efficiency...u know what i mean? :-D
>
> Just kiddin bout simplicity ;-)
>
this has been discussed quite a bit over the years, but I just thought
I'd pipe up since I was in your spot a little over a year ago... What
I did then, and still do when I can't figure it out from the error log
is just a lot of echo "N"; through the application. That way, when I
see it makes it to 5 but not 6 I check the code between 5 and 6 and I
can usually spot the problem now.
If nothing else, it'll help you narrow down the problem before asking
questions here which most people are more then happy to do :)
Also... If you are dealing with databases (Since this is the DB
list :)) I'd recommend to echo out your db statements to make sure you
are doing what you think you are doing... Can't tell you how many
times that screwed me up...
Just my experience, take it or leave it :)
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruim@raoset.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: re:php debugging skills
am 26.09.2008 19:17:08 von muhsin
--------------070205090506070805020405
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Jason Pruim wrote:
>
> On Sep 26, 2008, at 11:22 AM, muhsin wrote:
>
>> Could you guys share your development setup, like what kinds of
>> software (IDE's/Editors) you are using for developing php scripts?
>> It might sound silly but I am just curios, as I just got started in
>> php programming en i have firefox + kate/bluefish + LAMP built with
>> gentoo.
>> Im mostly thinking that with only firefox and some logs left /var/log
>> or so, its not enough for me..Im looking for something like an IDE
>> which can allow me to debug code in steps in central manner approach
>> (ide), simplicity and efficiency...u know what i mean? :-D
>>
>> Just kiddin bout simplicity ;-)
>>
>
>
> this has been discussed quite a bit over the years, but I just thought
> I'd pipe up since I was in your spot a little over a year ago... What
> I did then, and still do when I can't figure it out from the error log
> is just a lot of echo "N"; through the application. That way, when I
> see it makes it to 5 but not 6 I check the code between 5 and 6 and I
> can usually spot the problem now.
>
> If nothing else, it'll help you narrow down the problem before asking
> questions here which most people are more then happy to do :)
>
> Also... If you are dealing with databases (Since this is the DB list
> :)) I'd recommend to echo out your db statements to make sure you are
> doing what you think you are doing... Can't tell you how many times
> that screwed me up...
>
> Just my experience, take it or leave it :)
>
>
> --
>
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 11287 James St
> Holland, MI 49424
> www.raoset.com
> japruim@raoset.com
>
>
>
>
>
Thanks Jason,
Actually its a Db/mysql-5.0.60-r1 issue which makes me wonder about
debugging techniques php.
Im stuck with this on my early scripts that im experimenting.These are
the echo of the SQL part:
INSERT INTO movietype (movietype_id, movietype_label) VALUE (1, 'Sci
Fi'), (2, 'Drama'), (3, 'Adventure'), (4, 'Comedy'), (5, 'Horror'), (6,
'Action'), (7, 'Kids')
INSTERT INTO people (people_id, people_fullname, people_isactor,
people_isdirector) VALUE (1, 'Jim Carrey', 1, 0), (2, 'Tom Shadyac', 0,
1), (3, 'Lawrence Kasdan', 0,1), (4, 'Kevin Kline', 1, 0), (5, 'Ron
Livingston', 1, 0), (6, 'Mike Judge', 0, 1)
You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near 'INSTERT
INTO people (people_id, people_fullname, people_isactor,
people_isdirect' at line 1
Followed by:
Duplicate entry '1' for key 1
And i just can narrow down whats hapenning on that part, which one of my
early scripts ...any idea?
The error is probably related the 2nd dB statement , but i cant figure
out whats making it throwing error :-
Cheers
--
Extra details:
OSS:Gentoo Linux-2.6.24
profile:amd64
Hardware:x86-64 msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,basic,VHDL,bash
Typo:40WPM
server(s) owned:
ftp://muhsinzubeir.homeftp.net
http://muhsinzubeir.homeftp.net
--------------070205090506070805020405--
Re: re:php debugging skills
am 26.09.2008 19:39:20 von Jason Pruim
On Sep 26, 2008, at 1:17 PM, muhsin wrote:
> Jason Pruim wrote:
>>
>> On Sep 26, 2008, at 11:22 AM, muhsin wrote:
>>
>>> Could you guys share your development setup, like what kinds of
>>> software (IDE's/Editors) you are using for developing php scripts?
>>> It might sound silly but I am just curios, as I just got started
>>> in php programming en i have firefox + kate/bluefish + LAMP built
>>> with gentoo.
>>> Im mostly thinking that with only firefox and some logs left /var/
>>> log or so, its not enough for me..Im looking for something like an
>>> IDE which can allow me to debug code in steps in central manner
>>> approach (ide), simplicity and efficiency...u know what i mean? :-D
>>>
>>> Just kiddin bout simplicity ;-)
>>>
>>
>>
>> this has been discussed quite a bit over the years, but I just
>> thought I'd pipe up since I was in your spot a little over a year
>> ago... What I did then, and still do when I can't figure it out
>> from the error log is just a lot of echo "N"; through the
>> application. That way, when I see it makes it to 5 but not 6 I
>> check the code between 5 and 6 and I can usually spot the problem
>> now.
>>
>> If nothing else, it'll help you narrow down the problem before
>> asking questions here which most people are more then happy to do :)
>>
>> Also... If you are dealing with databases (Since this is the DB
>> list :)) I'd recommend to echo out your db statements to make sure
>> you are doing what you think you are doing... Can't tell you how
>> many times that screwed me up...
>>
>> Just my experience, take it or leave it :)
>>
>>
>> --
>>
>> Jason Pruim
>> Raoset Inc.
>> Technology Manager
>> MQC Specialist
>> 11287 James St
>> Holland, MI 49424
>> www.raoset.com
>> japruim@raoset.com
>>
>>
>>
>>
>>
> Thanks Jason,
>
> Actually its a Db/mysql-5.0.60-r1 issue which makes me wonder about
> debugging techniques php.
> Im stuck with this on my early scripts that im experimenting.These
> are the echo of the SQL part:
>
> INSERT INTO movietype (movietype_id, movietype_label) VALUE (1, 'Sci
> Fi'), (2, 'Drama'), (3, 'Adventure'), (4, 'Comedy'), (5, 'Horror'),
> (6, 'Action'), (7, 'Kids')
>
> INSTERT INTO people (people_id, people_fullname, people_isactor,
> people_isdirector) VALUE (1, 'Jim Carrey', 1, 0), (2, 'Tom Shadyac',
> 0, 1), (3, 'Lawrence Kasdan', 0,1), (4, 'Kevin Kline', 1, 0), (5,
> 'Ron Livingston', 1, 0), (6, 'Mike Judge', 0, 1)
> You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use
> near 'INSTERT INTO people (people_id, people_fullname,
> people_isactor, people_isdirect' at line 1
>
> Followed by:
> Duplicate entry '1' for key 1
>
> And i just can narrow down whats hapenning on that part, which one
> of my early scripts ...any idea?
> The error is probably related the 2nd dB statement , but i cant
> figure out whats making it throwing error :-
>
Looking at it the first thing that stands out to me is the way you are
breaking up the values... If I was doing it, my insert would look
like: INSERT INTO people (people_id, people_fullname, people_isactor,
people_isdirector) VALUES ("1", "Jim Carrey", "1", "0");
Notice also that I used the keyword VALUES (The S on the end) and a
semi colon on the end of the line, it may be there, but it didn't come
through :)
One other thing to try is to try and submit that directly to the
database... See if that gives you any other errors which occasionally
happens.
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruim@raoset.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: re:php debugging skills
am 26.09.2008 20:10:26 von Richard Dunne
Though I do not profess to be a MySQL expert, INSTERT will definitely mess things up for you as will the s at the end of values, given that you are inserting multiple values :)
Richard.
----- Original Message -----
From: Jason Pruim
Date: Friday, September 26, 2008 6:39 pm
Subject: Re: [PHP-DB] re:php debugging skills
>
> On Sep 26, 2008, at 1:17 PM, muhsin wrote:
>
> > Jason Pruim wrote:
> >>
> >> On Sep 26, 2008, at 11:22 AM, muhsin wrote:
> >>
> >>> Could you guys share your development setup, like what kinds
> of
> >>> software (IDE's/Editors) you are using for developing php scripts?
> >>> It might sound silly but I am just curios, as I just got
> started
> >>> in php programming en i have firefox + kate/bluefish + LAMP
> built
> >>> with gentoo.
> >>> Im mostly thinking that with only firefox and some logs left
> /var/
> >>> log or so, its not enough for me..Im looking for something
> like an
> >>> IDE which can allow me to debug code in steps in central
> manner
> >>> approach (ide), simplicity and efficiency...u know what i
> mean? :-D
> >>>
> >>> Just kiddin bout simplicity ;-)
> >>>
> >>
> >>
> >> this has been discussed quite a bit over the years, but I just
> >> thought I'd pipe up since I was in your spot a little over a
> year
> >> ago... What I did then, and still do when I can't figure it
> out
> >> from the error log is just a lot of echo "N"; through the
> >> application. That way, when I see it makes it to 5 but not 6 I
> >> check the code between 5 and 6 and I can usually spot the
> problem
> >> now.
> >>
> >> If nothing else, it'll help you narrow down the problem before
> >> asking questions here which most people are more then happy to
> do :)
> >>
> >> Also... If you are dealing with databases (Since this is the DB
>
> >> list :)) I'd recommend to echo out your db statements to make
> sure
> >> you are doing what you think you are doing... Can't tell you
> how
> >> many times that screwed me up...
> >>
> >> Just my experience, take it or leave it :)
> >>
> >>
> >> --
> >>
> >> Jason Pruim
> >> Raoset Inc.
> >> Technology Manager
> >> MQC Specialist
> >> 11287 James St
> >> Holland, MI 49424
> >> www.raoset.com
> >> japruim@raoset.com
> >>
> >>
> >>
> >>
> >>
> > Thanks Jason,
> >
> > Actually its a Db/mysql-5.0.60-r1 issue which makes me wonder
> about
> > debugging techniques php.
> > Im stuck with this on my early scripts that im
> experimenting.These
> > are the echo of the SQL part:
> >
> > INSERT INTO movietype (movietype_id, movietype_label) VALUE (1,
> 'Sci
> > Fi'), (2, 'Drama'), (3, 'Adventure'), (4, 'Comedy'), (5,
> 'Horror'),
> > (6, 'Action'), (7, 'Kids')
> >
> > INSTERT INTO people (people_id, people_fullname, people_isactor,
>
> > people_isdirector) VALUE (1, 'Jim Carrey', 1, 0), (2, 'Tom
> Shadyac',
> > 0, 1), (3, 'Lawrence Kasdan', 0,1), (4, 'Kevin Kline', 1, 0),
> (5,
> > 'Ron Livingston', 1, 0), (6, 'Mike Judge', 0, 1)
> > You have an error in your SQL syntax; check the manual that
> > corresponds to your MySQL server version for the right syntax to
> use
> > near 'INSTERT INTO people (people_id, people_fullname,
> > people_isactor, people_isdirect' at line 1
> >
> > Followed by:
> > Duplicate entry '1' for key 1
> >
> > And i just can narrow down whats hapenning on that part, which
> one
> > of my early scripts ...any idea?
> > The error is probably related the 2nd dB statement , but i cant
> > figure out whats making it throwing error :-
> >
>
> Looking at it the first thing that stands out to me is the way you
> are
> breaking up the values... If I was doing it, my insert would look
> like: INSERT INTO people (people_id, people_fullname,
> people_isactor,
> people_isdirector) VALUES ("1", "Jim Carrey", "1", "0");
>
> Notice also that I used the keyword VALUES (The S on the end) and
> a
> semi colon on the end of the line, it may be there, but it didn't
> come
> through :)
>
> One other thing to try is to try and submit that directly to the
> database... See if that gives you any other errors which
> occasionally
> happens.
>
>
> --
>
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 11287 James St
> Holland, MI 49424
> www.raoset.com
> japruim@raoset.com
>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: re:php debugging skills
am 27.09.2008 08:12:08 von muhsin
--------------040801040607090803070000
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Fergus Gibson wrote:
> On Fri, Sep 26, 2008 at 10:17 AM, muhsin wrote:
>
>> Im stuck with this on my early scripts that im experimenting.These are the
>> echo of the SQL part:
>>
>> INSERT INTO movietype (movietype_id, movietype_label) VALUE (1, 'Sci Fi'),
>> (2, 'Drama'), (3, 'Adventure'), (4, 'Comedy'), (5, 'Horror'), (6, 'Action'),
>> (7, 'Kids')
>>
>
> The "INSTERT" error has already been addressed. This statement has a
> typo. MySQL has no idea what "INSTERT" means. The "Duplicate entry"
> error is referring to the fact that you are attempting to add a
> duplicate volume into a column that can contain only unique values.
> The column in question is your primary key or has a UNIQUE index set
> on it. If you run either query twice without clearing the data in the
> table, this is the response you will get.
>
> You could use an ENUM column in the people table to set the movie
> types and do away with the movie table entirely.
>
> You could use REPLACE instead of INSERT. REPLACE will act like INSERT
> if there key isn't found, or it will replace the row if the key is
> found. In many cases, you will be able to use AUTO_INCREMENT and
> DEFAULT when constructing a table with a unique integer primary key
> column.
>
> The documentation at mysql.com is your friend.
>
>
bingo thanks alot for spotting that, a life saver :-)
....i actually decided to go to sleep after that error.So now im fresh to
start again my mission.
Thanks for the tips, really appreciated guys
regards,
muhsin
--
Extra details:
OSS:Gentoo Linux-2.6.24
profile:amd64
Hardware:x86-64 msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,basic,VHDL,bash
Typo:40WPM
server(s) owned:
ftp://muhsinzubeir.homeftp.net
http://muhsinzubeir.homeftp.net
--------------040801040607090803070000--