1
eric235u
Include: How to View PHP Errors
  • 2007/4/9 14:59

  • eric235u

  • Not too shy to talk

  • Posts: 149

  • Since: 2004/12/19


hi. noob question here. i have an index.php and one of the things it does is display some data. but i want the data to be correct. so i made another page called scrape.php that updates MySQL. when a user views index.php i'd like scrape.php to update rows if needed. so i've been playing around with figuring out ways to do this.

if i use
include(XOOPS_ROOT_PATH.'/modules/xpstorrent/scrape.php');
at the top of index.php i think this will do the trick. but i'm quite sure i've made a couple of mistakes in scrape.php and would like to see those errors.

XOOPS can display SQL queries, PHP & Smarty errors but it seems to be only for the page displayed and not for my 'included' page.

how can i see those very helpful php errors?

2
eric235u
Re: Include: How to View PHP Errors
  • 2007/4/9 17:08

  • eric235u

  • Not too shy to talk

  • Posts: 149

  • Since: 2004/12/19


oh, i just realized that my web host has set log_errors to On. errors are being sent to my scripts.log file. that works. it's not neatly displaying errors in the usual XOOPS manner, but it helps. i can see the include file errors.

3
Dave_L
Re: Include: How to View PHP Errors
  • 2007/4/9 19:46

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


If you still want to see the errors displayed, you could try adding at the beginning of the include-file:

error_reporting(E_ALL);

You might also need to add:

ini_set('display_errors', '1');

But those settings are not recommended for a public site, since they could reveal information useful to hackers.

4
eric235u
Re: Include: How to View PHP Errors
  • 2007/4/10 15:13

  • eric235u

  • Not too shy to talk

  • Posts: 149

  • Since: 2004/12/19


awesome. thanks dave!

Login

Who's Online

206 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 206


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits