MySQL Forums
Forum List  »  Perl

Re: Why This Code is Not working
Posted by: J Wyllie
Date: April 02, 2009 01:48PM

Well. If you want help with your college PHP project it would be a great start to post it in the PHP forum rather than the Perl one. (-:

If you want to know why its isn't working here are some things you can try:

use mysql_error at all mysql calls - at least while debugging, like you have for the connect

use error_reporting(E_ALL);
ini_set("display_errors","1"); at the top of your code. this will report php errors, though running in a web environment it won't catch parse errors.

you can also set these in the php.ini file but sometimes the script is easier if you don't have access to the ini file

to catch parse errors i tend to use comments to comment out blocks and see what works. if it still won't i open a new file and build up the script one bit at a time run it and see at what point it breaks

if you can run in it from the command line. (find your php binary and run php scriptname in that folder) that will give you the parse errors.

look in the web server error logs

Options: ReplyQuote


Subject
Written By
Posted
March 05, 2009 08:05AM
Re: Why This Code is Not working
April 02, 2009 01:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.