1

I have a php script that reads a csv file that contains URLs, follows the URLs, parses them and save some data into a database. The csv is around 1000 lines. However, my php script seems to stop after parsing some URLs (between 2 and 15 - never less, never more, but always different) neither showing any error in the browser nor writing it to php_errors.php.

I have also placed enabled php server logging via .htaccess:

# enable PHP error logging
php_flag  log_errors on
php_value error_log "home/user/public_html/path/php_errors.log"

Also did I set the logging parameters in the php script with:

error_reporting(E_ALL); 
ini_set('display_errors', 1); 

I have no idea how to catch the reason why the script breaks. It really works perfect until it stops.

Before adding this question I run into another question on stackoverflow and addressed all the resolutions. I set display_errors = on in php.ini. My script has no syntax errors and it parses well to a point.

Catalin Marcu
  • 634
  • 1
  • 7
  • 20

1 Answers1

0

Try this:

    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

How do I get PHP errors to display?

you can also check the /var/log/apache/ folder and try to locate error.log - it should contain error message independent of error show settings

Community
  • 1
  • 1
  • It's not working. I asked the administrator to get the var/log/apache/error.log - hopefully it will contain something. – Catalin Marcu May 11 '16 at 19:32
  • The admin just told me that the error logs are empty! Have any other idea? – Catalin Marcu May 11 '16 at 19:47
  • if there is nothing in logs, your script is not ending with a error. Check logic in your script, there need to be something that causes script to be finished – Krzysztof Kułaj May 13 '16 at 21:03
  • It cannot be! Some times ends after 2 records, some times ends after 15 records. There's no pattern, though, and I'm running the same script... – Catalin Marcu May 15 '16 at 20:35