Page 1 of 1

Is there any log file

PostPosted: 14. February 2008 16:57
by sliderman
Hay,

I'm developping an application in php mysql. My source code is a real mess. In order to debug more efficiently, I wonder know if tghere's any log files (for example for mysql).

Thanks for answers

PostPosted: 15. February 2008 03:18
by Izzy
Most of your previous post have been Linux related - are you saying now that this question is related to XAMPP for Windows?

PostPosted: 15. February 2008 09:12
by sliderman
yes, that's why I have posted this message on a windows related forum.
for a little explanaition, I'm runnin g under Windows at my job (unfortunately for me) and under unix systems (most of time linux) at my home

PostPosted: 15. February 2008 09:30
by Izzy
The reason I asked was that paths are different in Window to Linux.

In Windows the path would be something like this:
C:\xampp\mysql\data

Look for the log files in there, some will not have a file extension and so would need to be dragged into your text editor for reading.

Usually the file you want would be your Windows logged in user name followed by an err file extension - izzy.err for example - but I doubt that the error logs would help with debugging php.

For debugging php you would use stronger error reporting code in your script and these links may help:
http://us2.php.net/error-reporting
http://us2.php.net/manual/en/function.error-log.php
http://us2.php.net/manual/en/ref.errorfunc.php

These Google searches might have some helpful results for you:
mysql error reporting
mysql debugging

PostPosted: 15. February 2008 09:59
by sliderman
but there is no log file here

PostPosted: 15. February 2008 18:31
by LooseCannon
For your information, if it might assist, my log file is named by the PC's name, being "stws01.err". It is at the location Izzy referred to.

Also, it logs startup and shutdown, regardless of whether I make a connection.

PostPosted: 15. February 2008 19:37
by sari42
mysql:
http://doc.ddart.net/mysql/html/manual_Log_files.html

(never heard of google.com ?)

PostPosted: 18. February 2008 09:39
by sliderman

tanks, my log file is named as file.err (I don't know why 'err' as the extension)

but there is no log for queries, just error


LooseCannon wrote:For your information, if it might assist, my log file is named by the PC's name, being "stws01.err". It is at the location Izzy referred to.

Also, it logs startup and shutdown, regardless of whether I make a connection.
oki
but I fuind this stange. A log file is not commonly file.log, under linux (my production web server) the log file is named mysql.log.
sari42 wrote:(never heard of google.com ?)

such ironic is this remark !

PostPosted: 18. February 2008 11:21
by Wiedmann
my log file is named as file.err (I don't know why 'err' as the extension)

Because that's the default file extension for this file (also on *nix):
MySQL-Manual wrote:You can specify where mysqld writes the error log with the --log-error[=file_name] option. If no file_name value is given, mysqld uses the name host_name.err by default and writes the file in the data directory

http://dev.mysql.com/doc/refman/5.0/en/error-log.html

PostPosted: 18. February 2008 11:35
by sliderman
but it just the error log

PostPosted: 18. February 2008 11:41
by Wiedmann
but it just the error log

Right, I've answered only your question: Why is the name "*.err".

but there is no log for queries,

If you need the general query log during debugging your script, just add a line with "log" to your "my.cnf" (section "mysqld").
http://dev.mysql.com/doc/refman/5.0/en/query-log.html