Hi all,

Just installed PHP 5.2.6 on SLES11. I have editted php.ini to try and turn error reporting on, but it's not turning on (I have restarted apache2). At the moment, I'm using php in cli to debug which is getting a bit stale...

Here's a section of my php.ini config:

error_reporting = E_STRICT
display_errors = On
display_startup_errors = On
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off

Any ideas? Could something else (i.e. Apache) be preventing the errors from displaying?

Recommended Answers

All 4 Replies

I have found a temporary fix by putting this line of code in each of my scripts, but it's not ideal.

ini_set("display_errors","2");

Thanks

Member Avatar for nevvermind

You sure you didn't want this?

error_reporting = E_ALL | E_STRICT

Hi, I have tried what nevvermind posted still without success. It's really puzzling me :S Any ideas?

Ah-ha! Previously I was using the cli to locate the php.ini file: (I assumed there would only be one)

# php --ini
Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File:         /etc/php5/cli/php.ini
Scan for additional .ini files in: /etc/php5/conf.d
Additional .ini files parsed:      /etc/php5/conf.d/ctype.ini,
/etc/php5/conf.d/dom.ini,
/etc/php5/conf.d/gd.ini,
/etc/php5/conf.d/hash.ini,
/etc/php5/conf.d/iconv.ini,
/etc/php5/conf.d/json.ini,
/etc/php5/conf.d/mysql.ini,
/etc/php5/conf.d/mysqli.ini,
/etc/php5/conf.d/pdo.ini,
/etc/php5/conf.d/pdo_mysql.ini,
/etc/php5/conf.d/pdo_sqlite.ini,
/etc/php5/conf.d/sqlite.ini,
/etc/php5/conf.d/tokenizer.ini,
/etc/php5/conf.d/xmlreader.ini,
/etc/php5/conf.d/xmlwriter.ini

However, after issuing:

# locate php.ini
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini

There was a dupe config file. One must control the cli config, and the other controls apaches config.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.