Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to debug with PHP?

Status
Not open for further replies.

Mateo1041

MIS
Joined
Aug 19, 2003
Messages
147
Location
US
Hi everyone,

I recently began working on a script that uses the mime_content_type function while listing a directory of files. However, whenever I try using this function, my script stops and it is hard to find the solution without an explanation of the error.

This is my line of code:

$type = mime_content_type($filepath . "/" . $file);

I've heard PHP does not have a debugging tool built in. Does anyone have any suggestions? I'd be looking for something that doesn't require a lot of installation work on every server I work with.

Thanks,
- Matt.
 
Does not have any built-in debugging facility. But then, it's a programming language, not a development suite.

I have a debugging FAQ: faq434-2999. It might help in generally debugging.

I assume that you have performed all the setup steps listed here:
I also assume that you have footprinted your code to determine that the line you've listed is where the code is failing.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Thank you sleipnir214!

I appreciate the excellent FAQ. I'm positive it is the mime_content_type line of code. I've used the phpinfo() function to determine that mod_mime_magic is not installed. Our host has been contacted and is installing it as I type.

- Matt.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top