Solved

how can I create an error calling this config file

Posted on 2014-03-06
15
570 Views
Last Modified: 2014-03-09
<?php # Script 2.1 - config.inc.php

/* 
 *  File name: config.inc.php
 *  Created by: Larry E. Ullman
 *  Contact: Larry@LarryUllman.com, LarryUllman.com
 *  Last modified: June 5, 2012
 *  
 *  Configuration file does the following things:
 *  - Has site settings in one location.
 *  - Stores URLs and URIs as constants.
 *  - Sets how errors will be handled.
 */

# ******************** #
# ***** SETTINGS ***** #

// Errors are emailed here:
$contact_email = 'myemail@gmail.com'; 

// Determine whether we're working on a local server
// or on the real server:
$host = substr($_SERVER['HTTP_HOST'], 0, 5);
if (in_array($host, array('local', '127.0', '192.1'))) {
    $local = TRUE;
    echo '<h1>Local is True</h1>';
} else {
    //local = FALSE;
    $local = TRUE;
}

// Determine location of files and the URL of the site:
// Allow for development on different servers.
if ($local) {

    // Always debug when running locally:
    $debug = TRUE;
    
    // Define the constants:
    define('BASE_URI', '/path/to/html/folder/');
    define('BASE_URL', 'http://localhost/directory/');
    define('DB', '/path/to/mysql.inc.php');
    
} else {

    define('BASE_URI', '/path/to/live/html/folder/');
    define('BASE_URL', 'http://www.example.com/');
    define('DB', '/path/to/live/mysql.inc.php');
    
}
    
/* 
 *  Most important setting!
 *  The $debug variable is used to set error management.
 *  To debug a specific page, add this to the index.php page:

if ($p == 'thismodule') $debug = TRUE;
require('./includes/config.inc.php');

 *  To debug the entire site, do

$debug = TRUE;

 *  before this next conditional.
 */

// Assume debugging is off. 
if (!isset($debug)) {
    $debug = FALSE;
}

# ***** SETTINGS ***** #
# ******************** #


# **************************** #
# ***** ERROR MANAGEMENT ***** #

// Create the error handler:
function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {

    global $debug, $contact_email;
    
    // Build the error message:
    $message = "An error occurred in script '$e_file' on line $e_line: $e_message";
    
    // Append $e_vars to the $message:
    $message .= print_r($e_vars, 1);
    
    if ($debug) { // Show the error.
    
        echo '<div class="error">' . $message . '</div>';
        debug_print_backtrace();
        
    } else { 

        // Log the error:
        error_log ($message, 1, $contact_email); // Send email.

        // Only print an error message if the error isn't a notice or strict.
        if ( ($e_number != E_NOTICE) && ($e_number < 2048)) {
            echo '<div class="error">A system error occurred. We apologize for the inconvenience.</div>';
        }

    } // End of $debug IF.

} // End of my_error_handler() definition.

// Use my error handler:
set_error_handler('my_error_handler');

# ***** ERROR MANAGEMENT ***** #
# **************************** #

Open in new window



From the Larry Ulman php tutorial
I have my email set and used different servers to test.  

Ideally I want just an error log file which is easier to view than an email.

I do not know how create an error.

http://localhost/phpvqp3_scripts/ch02/in

http://localhost/phpvqp3_scripts/ch02/in
http://localhost/phpvqp3_scripts/ch02/index.php?p=fake
0
Comment
Question by:rgb192
  • 7
  • 5
  • 3
15 Comments
 
LVL 11

Expert Comment

by:Amar Bardoliwala
Comment Utility
Hello rgb192,

You can use error_log function as following

// another way to call error_log():
error_log("You messed up!", 3, "/var/tmp/my-errors.log");

In above you can see last parameter is path to file in which you want to log error messages.

you will find more help on error_log function from following link of php manual

http://www.php.net/manual/en/function.error-log.php

Hope this will help you.

Thank you.

Amar Bardoliwala
0
 

Author Comment

by:rgb192
Comment Utility
which line do I put this
// another way to call error_log():
error_log("You messed up!", 3, "/var/tmp/my-errors.log");

Open in new window

and how can I call and test.
Do I just enter an incorrect url?
0
 
LVL 11

Assisted Solution

by:Amar Bardoliwala
Amar Bardoliwala earned 200 total points
Comment Utility
Hello rgb192,

In your code above, you have following on line 97,98

// Log the error:
        error_log ($message, 1, $contact_email); // Send email.

Open in new window


so you can replace those lines with what I gave. You need to give proper path of error log file and proper permissions to write in the file.

so now your errors will be appended to the file, instead of email.

To produce, you can go with something like wrong syntax or wrong db connection.

Hope this will help you.

Thank you.

Amar Bardoliwala
0
 

Author Comment

by:rgb192
Comment Utility
logging the error did not work:
on wamp
error_log("You messed up!", 3, "C:/wamp/www/phpvqp3_scripts/ch02/my-errors.log");
and
error_log("You messed up!", 3, "my-errors.log");

did not generate output to existing my-errors.log

creating the error worked:
I added
require('file that does not exist') and I did see $message on browser screen
0
 
LVL 11

Accepted Solution

by:
Amar Bardoliwala earned 200 total points
Comment Utility
Hello rgb192,

put following on top of your file to test.

error_log("You messed up!", 3, "my-errors.log");

if that works fine it should work fine on you error handler.

Also please make sure you have errors enabled on your wamp server.

Hope this will help you.

Thank you.

Amar Bardoliwala.
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 300 total points
Comment Utility
Start by reading these pages with care, for full understanding of all of the functions:
http://php.net/manual/en/ref.errorfunc.php

Add error_reporting(E_ALL) to the top of all of your PHP scripts.

Next, check your php.ini to be sure you have an error_log file defined.  If your PHP installation is set up correctly, the file will probably be named error_log.  You can verify this in the output from phpinfo().  Look in the Core for things starting with error_...

Create and run a test script that triggers an error, like this:

<?php trigger_error('Test Error', E_USER_ERROR);

Open in new window

Then look in the directory where that script was run and you should find the error_log.

Install this script in the web root directory.  When you run it you will be able to see if any error logs have been created.  You might consider modifying the script to also send you an email if it finds any error_log files.  You could trigger it via a CRON job every five minutes.  If you get an email, you'll know that something went wrong in a deployed application.

<?php // find_error_log.php
error_reporting(E_ALL);
ob_start();

// PUT THIS SCRIPT IN THE WEB ROOT DIRECTORY
$path = realpath(getcwd());
$plen = strlen($path);

// THE ERROR LOG FILE NAME
$signal = strrev('error_log');


// IF THERE IS A POST-METHOD REQUEST TO DELETE THE ERROR LOG
if (!empty($_POST['log']))
{
    // MAKE SURE WE ONLY UNLINK THE ERROR LOG FILE
    $test = strrev($_POST['log']);
    if (strpos($test, $signal) === 0)
    {
        unlink($path . $_POST['log']);
        echo '<h3>' . $_POST['log'] . ' Discarded</h3>';
    }
}


// SEE http://php.net/manual/en/class.recursivedirectoryiterator.php#85805
$objs = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
foreach($objs as $name => $obj)
{
    // PROCESS THE ERROR LOG ONLY
    $test = strrev($name);
    if (strpos($test, $signal) === 0)
    {
        $name = substr($name, $plen);
        $form = <<<EOD
<form method="post" style="margin:0; padding:0; display:inline;!important">
<b>$name</b>
<input type="submit" value="Discard?" />
<input type="hidden" name="log" value="$name" />
</form>
EOD;
        echo $form;

        // SHOW THE CONTENTS OF THE ERROR LOG
        echo '<pre>';
        print_r(file_get_contents($path . $name));
        echo "</pre>";
    }
}

$out = ob_get_contents();
if (empty($out)) echo '<h3>Good News! No error_log found.</h3>';

Open in new window

HTH, ~Ray
0
 

Author Comment

by:rgb192
Comment Utility
But if i do error log or trigger error on top of script, then i will only see one error and script will not run.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
error_log() will write to the log and the script will continue to run.

trigger_error() can terminate the script, but it does not have to terminate the script.  Please see the man page: http://php.net/trigger_error then try your own experiment with different error types, testing E_USER_NOTICE, E_USER_WARNING, E_USER_ERROR.
0
 

Author Comment

by:rgb192
Comment Utility
<?php # Script 2.1 - config.inc.php

/* 
 *  File name: config.inc.php
 *  Created by: Larry E. Ullman
 *  Contact: Larry@LarryUllman.com, LarryUllman.com
 *  Last modified: June 5, 2012
 *  
 *  Configuration file does the following things:
 *  - Has site settings in one location.
 *  - Stores URLs and URIs as constants.
 *  - Sets how errors will be handled.
 */

# ******************** #
# ***** SETTINGS ***** #

// Errors are emailed here:
error_log("You messed up!", 3, "my-errors.log"); 
trigger_error('Test Error', E_USER_ERROR);
$contact_email = 'myemail@gmail.com'; 

// Determine whether we're working on a local server
// or on the real server:
$host = substr($_SERVER['HTTP_HOST'], 0, 5);
if (in_array($host, array('local', '127.0', '192.1'))) {
    $local = TRUE;
    echo '<h1>Local is True</h1>';
} else {
    //local = FALSE;
    $local = TRUE;
}

// Determine location of files and the URL of the site:
// Allow for development on different servers.
if ($local) {

    // Always debug when running locally:
    $debug = TRUE;
    
    // Define the constants:
    define('BASE_URI', '/path/to/html/folder/');
    define('BASE_URL', 'http://localhost/directory/');
    define('DB', '/path/to/mysql.inc.php');
    
} else {

    define('BASE_URI', '/path/to/live/html/folder/');
    define('BASE_URL', 'http://www.example.com/');
    define('DB', '/path/to/live/mysql.inc.php');
    
}
    
/* 
 *  Most important setting!
 *  The $debug variable is used to set error management.
 *  To debug a specific page, add this to the index.php page:

if ($p == 'thismodule') $debug = TRUE;
require('./includes/config.inc.php');

 *  To debug the entire site, do

$debug = TRUE;

 *  before this next conditional.
 */

// Assume debugging is off. 
if (!isset($debug)) {
    $debug = FALSE;
}

# ***** SETTINGS ***** #
# ******************** #


# **************************** #
# ***** ERROR MANAGEMENT ***** #

// Create the error handler:
function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {

    global $debug, $contact_email;
    
    // Build the error message:
    $message = "An error occurred in this script '$e_file' on line $e_line: $e_message";
    
    // Append $e_vars to the $message:
    $message .= print_r($e_vars, 1);
    
    if ($debug) { // Show the error.
    
        echo '<div class="error">' . $message . '</div>';
        debug_print_backtrace();
        
    } else { 

        // Log the error:
        //error_log ($message, 1, $contact_email); // Send email.
error_log("You messed up!", 3, "C:/wamp/www/phpvqp3_scripts/ch02/my-errors.log");
        // Only print an error message if the error isn't a notice or strict.
        if ( ($e_number != E_NOTICE) && ($e_number < 2048)) {
            echo '<div class="error">A system error occurred. We apologize for the inconvenience.</div>';
        }

    } // End of $debug IF.

} // End of my_error_handler() definition.

// Use my error handler:
set_error_handler('my_error_handler');

# ***** ERROR MANAGEMENT ***** #
# **************************** #

Open in new window


adding lines 19,20
error_log("You messed up!", 3, "my-errors.log");
trigger_error('Test Error', E_USER_ERROR);


my errrors.log got written
You messed up!

and output of index.php

Fatal error: Test Error in C:\wamp\www\phpvqp3_scripts\ch02\config.inc.php on line 20
which stopped output


What I think I am asking is that line 62 of index.php (before modifying config.php.inc
 lines 19,20
error_log("You messed up!", 3, "my-errors.log");
trigger_error('Test Error', E_USER_ERROR);

require('does not exist');
I did see $message on browser screen
but no output to my-errors.log
<?php # Script 2.4 - index.php

/* 
 *  This is the main page.
 *  This page includes the configuration file, 
 *  the templates, and any content-specific modules.
 */

// Require the configuration file before any PHP code:
require('config.inc.php');

// Validate what page to show:
if (isset($_GET['p'])) {
    $p = $_GET['p'];
} elseif (isset($_POST['p'])) { // Forms
    $p = $_POST['p'];
} else {
    $p = NULL;
}

// Determine what page to display:
switch ($p) {

    case 'about':
        $page = 'about.inc.php';
        $page_title = 'About This Site';
        break;
    
    case 'contact':
        $page = 'contact.inc.php';
        $page_title = 'Contact Us';
        break;
    
    case 'search':
        $page = 'search.inc.php';
        $page_title = 'Search Results';
        break;
    
    // Default is to include the main page.
    default:
        $page = 'main.inc.php';
        $page_title = 'Site Home Page';
        break;
        
} // End of main switch.

// Make sure the file exists:
if (!file_exists($page)) {
    $page = 'main.inc.php';
    $page_title = 'Site Home Page';
}

// Include the header file:
include('header.html');

// Include the content-specific module:
// $page is determined from the above switch.
include($page);

// Include the footer file to complete the template:
include('footer.html');
require('does not exist');
?>

Open in new window

0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
I have never used any file other than error_log for my error log file.  I do not know what other file names might be workable with PHP error logging.  Whatever you might choose, it would have to be writable by PHP.  In my experience, error_log does not have to exist; if PHP needs to log an error it will create the file.

I think that when you use the error_log() function you can tell PHP where to log the error. But if the error is "organic" such as require('does.not.exist') PHP has no way of knowing that you wanted to use "my-errors.log" instead of the standard PHP settings.

I recommend that you run phpinfo() and look in the Core settings area.  Find the following values, copy them (copy/paste) and post them here.

error_log
error_reporting
log_errors
log_errors_max_len
0
 

Author Comment

by:rgb192
Comment Utility
PHP Logo
PHP Version 5.3.13


System	Windows NT ACER-PC 6.1 build 7601 (Windows 7 Home Premium Edition Service Pack 1) AMD64
Build Date	May 14 2012 02:46:11
Compiler	MSVC9 (Visual C++ 2008)
Architecture	x64
Configure Command	cscript /nologo configure.js "--enable-snapshot-build" "--with-pdo-oci=C:\php-sdk\php53dev\vc9\x64\deps\instantclient_10_2\sdk,shared" "--with-oci8=C:\php-sdk\php53dev\vc9\x64\deps\instantclient_10_2\sdk,shared" "--with-oci8-11g=C:\php-sdk\php53dev\vc9\x64\deps\instantclient_11_2\sdk,shared" "--disable-debug-pack" "--disable-static-analyze"
Server API	Apache 2.0 Handler
Virtual Directory Support	enabled
Configuration File (php.ini) Path	C:\Windows
Loaded Configuration File	C:\wamp\bin\php\php5.3.13\php.ini
Scan this dir for additional .ini files	(none)
Additional .ini files parsed	(none)
PHP API	20090626
PHP Extension	20090626
Zend Extension	220090626
Zend Extension Build	API220090626,TS,VC9
PHP Extension Build	API20090626,TS,VC9
Debug Build	no
Thread Safety	enabled
Zend Memory Manager	enabled
Zend Multibyte Support	disabled
IPv6 Support	enabled
Registered PHP Streams	php, file, glob, data, http, ftp, zip, compress.zlib, phar
Registered Stream Socket Transports	tcp, udp
Registered Stream Filters	convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

PHP Credits

Configuration

apache2handler

Apache Version	Apache/2.2.22 (Win64) PHP/5.3.13
Apache API Version	20051115
Server Administrator	admin@localhost
Hostname:Port	localhost:80
Max Requests	Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts	Connection: 300 - Keep-Alive: 5
Virtual Server	No
Server Root	C:/wamp/bin/apache/apache2.2.22
Loaded Modules	core mod_win32 mpm_winnt http_core mod_so mod_actions mod_alias mod_asis mod_auth_basic mod_authn_default mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_php5

Directive	Local Value	Master Value
engine	1	1
last_modified	0	0
xbithack	0	0

Apache Environment

Variable	Value
HTTP_HOST	localhost
HTTP_CONNECTION	keep-alive
HTTP_ACCEPT	text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT	Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
HTTP_REFERER	http://localhost/
HTTP_ACCEPT_ENCODING	gzip,deflate,sdch
HTTP_ACCEPT_LANGUAGE	en-US,en;q=0.8
HTTP_COOKIE	__qca=P0-2004678363-1389558149020; PHPSESSID=lgjcej7osg69dcusjphbc1knk7
PATH	C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x86;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x64;C:\Program Files (x86)\Windows Live\Shared;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\DTS\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\WinSCP;C:\svn\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Smart Projects\IsoBuster;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files (x86)\Zend\ZendServer\bin;C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\bin;C:\Program Files (x86)\Bitvise Tunnelier;C:\Program Files (x86)\Common Files\SYSTEM\MSMAPI\1033;C:\Program Files (x86)\WinSCP\;C:\Program Files\Microsoft\Web Platform Installer\;
SystemRoot	C:\Windows
COMSPEC	C:\Windows\system32\cmd.exe
PATHEXT	.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR	C:\Windows
SERVER_SIGNATURE	no value
SERVER_SOFTWARE	Apache/2.2.22 (Win64) PHP/5.3.13
SERVER_NAME	localhost
SERVER_ADDR	127.0.0.1
SERVER_PORT	80
REMOTE_ADDR	127.0.0.1
DOCUMENT_ROOT	C:/wamp/www/
SERVER_ADMIN	admin@localhost
SCRIPT_FILENAME	C:/wamp/www/index.php
REMOTE_PORT	47081
GATEWAY_INTERFACE	CGI/1.1
SERVER_PROTOCOL	HTTP/1.1
REQUEST_METHOD	GET
QUERY_STRING	phpinfo=1
REQUEST_URI	/?phpinfo=1
SCRIPT_NAME	/index.php

HTTP Headers Information

HTTP Request Headers
HTTP Request	GET /?phpinfo=1 HTTP/1.1
Host	localhost
Connection	keep-alive
Accept	text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent	Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
Referer	http://localhost/
Accept-Encoding	gzip,deflate,sdch
Accept-Language	en-US,en;q=0.8
Cookie	__qca=P0-2004678363-1389558149020; PHPSESSID=lgjcej7osg69dcusjphbc1knk7
HTTP Response Headers
X-Powered-By	PHP/5.3.13

bcmath

BCMath support	enabled

Directive	Local Value	Master Value
bcmath.scale	0	0

calendar

Calendar support	enabled

com_dotnet

COM support	enabled
DCOM support	disabled
.Net support	enabled

Directive	Local Value	Master Value
com.allow_dcom	0	0
com.autoregister_casesensitive	1	1
com.autoregister_typelib	0	0
com.autoregister_verbose	0	0
com.code_page	no value	no value
com.typelib_file	no value	no value

Core

PHP Version	5.3.13

Directive	Local Value	Master Value
allow_call_time_pass_reference	Off	Off
allow_url_fopen	On	On
allow_url_include	Off	Off
always_populate_raw_post_data	Off	Off
arg_separator.input	&	&
arg_separator.output	&	&
asp_tags	Off	Off
auto_append_file	no value	no value
auto_globals_jit	On	On
auto_prepend_file	no value	no value
browscap	no value	no value
default_charset	no value	no value
default_mimetype	text/html	text/html
define_syslog_variables	Off	Off
disable_classes	no value	no value
disable_functions	no value	no value
display_errors	On	On
display_startup_errors	On	On
doc_root	no value	no value
docref_ext	no value	no value
docref_root	no value	no value
enable_dl	Off	Off
error_append_string	no value	no value
error_log	no value	no value
error_prepend_string	no value	no value
error_reporting	30719	30719
exit_on_timeout	Off	Off
expose_php	On	On
extension_dir	c:/wamp/bin/php/php5.3.13/ext/	c:/wamp/bin/php/php5.3.13/ext/
file_uploads	On	On
highlight.bg	#FFFFFF	#FFFFFF
highlight.comment	#FF8000	#FF8000
highlight.default	#0000BB	#0000BB
highlight.html	#000000	#000000
highlight.keyword	#007700	#007700
highlight.string	#DD0000	#DD0000
html_errors	On	On
ignore_repeated_errors	Off	Off
ignore_repeated_source	Off	Off
ignore_user_abort	Off	Off
implicit_flush	Off	Off
include_path	.;C:\php\pear	.;C:\php\pear
log_errors	On	On
log_errors_max_len	1024	1024
magic_quotes_gpc	Off	Off
magic_quotes_runtime	Off	Off
magic_quotes_sybase	Off	Off
mail.add_x_header	On	On
mail.force_extra_parameters	no value	no value
mail.log	no value	no value
max_execution_time	700	700
max_file_uploads	20	20
max_input_nesting_level	64	64
max_input_time	60	60
max_input_vars	1000	1000
memory_limit	128M	128M
open_basedir	no value	no value
output_buffering	1	1
output_handler	no value	no value
post_max_size	8M	8M
precision	14	14
realpath_cache_size	16K	16K
realpath_cache_ttl	120	120
register_argc_argv	Off	Off
register_globals	Off	Off
register_long_arrays	Off	Off
report_memleaks	On	On
report_zend_debug	On	On
request_order	GP	GP
safe_mode	Off	Off
safe_mode_exec_dir	no value	no value
safe_mode_gid	Off	Off
safe_mode_include_dir	no value	no value
sendmail_from	you@yourdomain	you@yourdomain
sendmail_path	no value	no value
serialize_precision	100	100
short_open_tag	Off	Off
SMTP	localhost	localhost
smtp_port	25	25
sql.safe_mode	Off	Off
track_errors	On	On
unserialize_callback_func	no value	no value
upload_max_filesize	2M	2M
upload_tmp_dir	c:/wamp/tmp	c:/wamp/tmp
user_dir	no value	no value
user_ini.cache_ttl	300	300
user_ini.filename	.user.ini	.user.ini
variables_order	GPCS	GPCS
windows.show_crt_warning	Off	Off
xmlrpc_error_number	0	0
xmlrpc_errors	Off	Off
y2k_compliance	On	On
zend.enable_gc	On	On

ctype

ctype functions	enabled

curl

cURL support	enabled
cURL Information	7.25.0
Age	3
Features
AsynchDNS	Yes
Debug	No
GSS-Negotiate	No
IDN	Yes
IPv6	Yes
Largefile	Yes
NTLM	Yes
SPNEGO	No
SSL	Yes
SSPI	No
krb4	No
libz	Yes
CharConv	No
Protocols	dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
Host	x86_64-pc-win32
SSL Version	OpenSSL/1.0.1c
ZLib Version	1.2.7
libSSH Version	libssh2/1.3.0

date

date/time support	enabled
"Olson" Timezone Database Version	2012.3
Timezone Database	internal
Default timezone	UTC

Directive	Local Value	Master Value
date.default_latitude	31.7667	31.7667
date.default_longitude	35.2333	35.2333
date.sunrise_zenith	90.583333	90.583333
date.sunset_zenith	90.583333	90.583333
date.timezone	UTC	UTC

dom

DOM/XML	enabled
DOM/XML API Version	20031129
libxml Version	2.7.8
HTML Support	enabled
XPath Support	enabled
XPointer Support	enabled
Schema Support	enabled
RelaxNG Support	enabled

ereg

Regex Library	Bundled library enabled

filter

Input Validation and Filtering	enabled
Revision	$Id: 2b8c730d7dfaa8485d07cd792f0c82852ffe4113 $

Directive	Local Value	Master Value
filter.default	unsafe_raw	unsafe_raw
filter.default_flags	no value	no value

ftp

FTP support	enabled

gd

GD Support	enabled
GD Version	bundled (2.0.34 compatible)
FreeType Support	enabled
FreeType Linkage	with freetype
FreeType Version	2.4.6
T1Lib Support	enabled
GIF Read Support	enabled
GIF Create Support	enabled
JPEG Support	enabled
libJPEG Version	6b
PNG Support	enabled
libPNG Version	1.2.46
WBMP Support	enabled
XBM Support	enabled

Directive	Local Value	Master Value
gd.jpeg_ignore_warning	0	0

hash

hash support	enabled
Hashing Engines	md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b salsa10 salsa20 haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

iconv

iconv support	enabled
iconv implementation	"libiconv"
iconv library version	1.11

Directive	Local Value	Master Value
iconv.input_encoding	ISO-8859-1	ISO-8859-1
iconv.internal_encoding	ISO-8859-1	ISO-8859-1
iconv.output_encoding	ISO-8859-1	ISO-8859-1

json

json support	enabled
json version	1.2.1

libxml

libXML support	active
libXML Compiled Version	2.7.8
libXML Loaded Version	20708
libXML streams	enabled

mbstring

Multibyte Support	enabled
Multibyte string engine	libmbfl
HTTP input encoding translation	disabled

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Multibyte (japanese) regex support	enabled
Multibyte regex (oniguruma) version	4.7.1

Directive	Local Value	Master Value
mbstring.detect_order	no value	no value
mbstring.encoding_translation	Off	Off
mbstring.func_overload	0	0
mbstring.http_input	pass	pass
mbstring.http_output	pass	pass
mbstring.http_output_conv_mimetypes	^(text/|application/xhtml\+xml)	^(text/|application/xhtml\+xml)
mbstring.internal_encoding	no value	no value
mbstring.language	neutral	neutral
mbstring.strict_detection	Off	Off
mbstring.substitute_character	no value	no value

mcrypt

mcrypt support	enabled
mcrypt_filter support	enabled
Version	2.5.8
Api No	20021217
Supported ciphers	cast-128 gost rijndael-128 twofish cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes arcfour
Supported modes	cbc cfb ctr ecb ncfb nofb ofb stream

Directive	Local Value	Master Value
mcrypt.algorithms_dir	no value	no value
mcrypt.modes_dir	no value	no value

mhash

MHASH support	Enabled
MHASH API Version	Emulated Support

mysql

MySQL Support	enabled
Active Persistent Links	0
Active Links	0
Client API version	mysqlnd 5.0.8-dev - 20102224 - $Id: 65fe78e70ce53d27a6cd578597722950e490b0d0 $

Directive	Local Value	Master Value
mysql.allow_local_infile	On	On
mysql.allow_persistent	On	On
mysql.connect_timeout	60	60
mysql.default_host	no value	no value
mysql.default_password	no value	no value
mysql.default_port	no value	no value
mysql.default_socket	no value	no value
mysql.default_user	no value	no value
mysql.max_links	Unlimited	Unlimited
mysql.max_persistent	Unlimited	Unlimited
mysql.trace_mode	Off	Off

mysqli

MysqlI Support	enabled
Client API library version	mysqlnd 5.0.8-dev - 20102224 - $Id: 65fe78e70ce53d27a6cd578597722950e490b0d0 $
Active Persistent Links	0
Inactive Persistent Links	0
Active Links	0

Directive	Local Value	Master Value
mysqli.allow_local_infile	On	On
mysqli.allow_persistent	On	On
mysqli.default_host	no value	no value
mysqli.default_port	3306	3306
mysqli.default_pw	no value	no value
mysqli.default_socket	no value	no value
mysqli.default_user	no value	no value
mysqli.max_links	Unlimited	Unlimited
mysqli.max_persistent	Unlimited	Unlimited
mysqli.reconnect	Off	Off

mysqlnd

mysqlnd	enabled
Version	mysqlnd 5.0.8-dev - 20102224 - $Id: 65fe78e70ce53d27a6cd578597722950e490b0d0 $
Compression	supported
SSL	supported
Command buffer size	4096
Read buffer size	32768
Read timeout	31536000
Collecting statistics	Yes
Collecting memory statistics	Yes
Tracing	n/a

Client statistics	
bytes_sent	513731
bytes_received	1320010
packets_sent	4794
packets_received	16556
protocol_overhead_in	66224
protocol_overhead_out	19176
bytes_received_ok_packet	4279
bytes_received_eof_packet	11736
bytes_received_rset_header_packet	22367
bytes_received_rset_field_meta_packet	890884
bytes_received_rset_row_packet	360554
bytes_received_prepare_response_packet	0
bytes_received_change_user_packet	0
packets_sent_command	2008
packets_received_ok	389
packets_received_eof	1304
packets_received_rset_header	1619
packets_received_rset_field_meta	10285
packets_received_rset_row	2570
packets_received_prepare_response	0
packets_received_change_user	0
result_set_queries	1304
non_result_set_queries	315
no_index_used	1226
bad_index_used	0
slow_queries	0
buffered_sets	1304
unbuffered_sets	0
ps_buffered_sets	0
ps_unbuffered_sets	0
flushed_normal_sets	0
flushed_ps_sets	0
ps_prepared_never_executed	0
ps_prepared_once_executed	0
rows_fetched_from_server_normal	1266
rows_fetched_from_server_ps	0
rows_buffered_from_client_normal	1266
rows_buffered_from_client_ps	0
rows_fetched_from_client_normal_buffered	1266
rows_fetched_from_client_normal_unbuffered	0
rows_fetched_from_client_ps_buffered	0
rows_fetched_from_client_ps_unbuffered	0
rows_fetched_from_client_ps_cursor	0
rows_affected_normal	320
rows_affected_ps	0
rows_skipped_normal	1266
rows_skipped_ps	0
copy_on_write_saved	10116
copy_on_write_performed	128
command_buffer_too_small	0
connect_success	389
connect_failure	0
connection_reused	0
reconnect	0
pconnect_success	0
active_connections	0
active_persistent_connections	0
explicit_close	389
implicit_close	0
disconnect_close	0
in_middle_of_command_close	0
explicit_free_result	1304
implicit_free_result	0
explicit_stmt_close	0
implicit_stmt_close	0
mem_emalloc_count	13902
mem_emalloc_amount	2421929
mem_ecalloc_count	17698
mem_ecalloc_amount	5816032
mem_erealloc_count	95
mem_erealloc_amount	936
mem_efree_count	34625
mem_efree_amount	8321294
mem_malloc_count	5094
mem_malloc_amount	21088848
mem_calloc_count	1304
mem_calloc_amount	41728
mem_realloc_count	0
mem_realloc_amount	0
mem_free_count	6398
mem_free_amount	21130576
mem_estrndup_count	1469
mem_strndup_count	0
mem_estndup_count	1556
mem_strdup_count	0
proto_text_fetched_null	0
proto_text_fetched_bit	0
proto_text_fetched_tinyint	0
proto_text_fetched_short	0
proto_text_fetched_int24	0
proto_text_fetched_int	3822
proto_text_fetched_bigint	610
proto_text_fetched_decimal	0
proto_text_fetched_float	0
proto_text_fetched_double	0
proto_text_fetched_date	0
proto_text_fetched_year	0
proto_text_fetched_time	0
proto_text_fetched_datetime	1358
proto_text_fetched_timestamp	0
proto_text_fetched_string	3839
proto_text_fetched_blob	615
proto_text_fetched_enum	0
proto_text_fetched_set	0
proto_text_fetched_geometry	0
proto_text_fetched_other	0
proto_binary_fetched_null	0
proto_binary_fetched_bit	0
proto_binary_fetched_tinyint	0
proto_binary_fetched_short	0
proto_binary_fetched_int24	0
proto_binary_fetched_int	0
proto_binary_fetched_bigint	0
proto_binary_fetched_decimal	0
proto_binary_fetched_float	0
proto_binary_fetched_double	0
proto_binary_fetched_date	0
proto_binary_fetched_year	0
proto_binary_fetched_time	0
proto_binary_fetched_datetime	0
proto_binary_fetched_timestamp	0
proto_binary_fetched_string	0
proto_binary_fetched_blob	0
proto_binary_fetched_enum	0
proto_binary_fetched_set	0
proto_binary_fetched_geometry	0
proto_binary_fetched_other	0
init_command_executed_count	0
init_command_failed_count	0
com_quit	388
com_init_db	0
com_query	1620
com_field_list	0
com_create_db	0
com_drop_db	0
com_refresh	0
com_shutdown	0
com_statistics	0
com_process_info	0
com_connect	0
com_process_kill	0
com_debug	0
com_ping	0
com_time	0
com_delayed_insert	0
com_change_user	0
com_binlog_dump	0
com_table_dump	0
com_connect_out	0
com_register_slave	0
com_stmt_prepare	0
com_stmt_execute	0
com_stmt_send_long_data	0
com_stmt_close	0
com_stmt_reset	0
com_stmt_set_option	0
com_stmt_fetch	0
com_deamon	0
bytes_received_real_data_normal	339018
bytes_received_real_data_ps	0

odbc

ODBC Support	enabled
Active Persistent Links	0
Active Links	0
ODBC library	Win32

Directive	Local Value	Master Value
odbc.allow_persistent	On	On
odbc.check_persistent	On	On
odbc.default_cursortype	Static cursor	Static cursor
odbc.default_db	no value	no value
odbc.default_pw	no value	no value
odbc.default_user	no value	no value
odbc.defaultbinmode	return as is	return as is
odbc.defaultlrl	return up to 4096 bytes	return up to 4096 bytes
odbc.max_links	Unlimited	Unlimited
odbc.max_persistent	Unlimited	Unlimited

pcre

PCRE (Perl Compatible Regular Expressions) Support	enabled
PCRE Library Version	8.12 2011-01-15

Directive	Local Value	Master Value
pcre.backtrack_limit	1000000	1000000
pcre.recursion_limit	100000	100000

PDO

PDO support	enabled
PDO drivers	mysql, sqlite, sqlite2

pdo_mysql

PDO Driver for MySQL	enabled
Client API version	mysqlnd 5.0.8-dev - 20102224 - $Id: 65fe78e70ce53d27a6cd578597722950e490b0d0 $

pdo_sqlite

PDO Driver for SQLite 3.x	enabled
SQLite Library	3.7.7.1

Phar

Phar: PHP Archive support	enabled
Phar EXT version	2.0.1
Phar API version	1.1.1
SVN revision	$Id: d8eaad1a2452af8d7f8ea9e3944e43add43e1890 $
Phar-based phar archives	enabled
Tar-based phar archives	enabled
ZIP-based phar archives	enabled
gzip compression	enabled
bzip2 compression	disabled (install pecl/bz2)
Native OpenSSL support	enabled

Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.

Directive	Local Value	Master Value
phar.cache_list	no value	no value
phar.readonly	On	On
phar.require_hash	On	On

Reflection

Reflection	enabled
Version	$Id: 522fef1e5100f848a5e2059d98b3a880a3143e9a $

session

Session Support	enabled
Registered save handlers	files user sqlite
Registered serializer handlers	php php_binary wddx

Directive	Local Value	Master Value
session.auto_start	Off	Off
session.bug_compat_42	On	On
session.bug_compat_warn	On	On
session.cache_expire	180	180
session.cache_limiter	nocache	nocache
session.cookie_domain	no value	no value
session.cookie_httponly	Off	Off
session.cookie_lifetime	0	0
session.cookie_path	/	/
session.cookie_secure	Off	Off
session.entropy_file	no value	no value
session.entropy_length	0	0
session.gc_divisor	1000	1000
session.gc_maxlifetime	1440	1440
session.gc_probability	1	1
session.hash_bits_per_character	5	5
session.hash_function	0	0
session.name	PHPSESSID	PHPSESSID
session.referer_check	no value	no value
session.save_handler	files	files
session.save_path	c:/wamp/tmp	c:/wamp/tmp
session.serialize_handler	php	php
session.use_cookies	On	On
session.use_only_cookies	On	On
session.use_trans_sid	0	0

SimpleXML

Simplexml support	enabled
Revision	$Id: a379111021e24ef020a2eefd8ca830cb1ab5b280 $
Schema support	enabled

SPL

SPL support	enabled
Interfaces	Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes	AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

SQLite

SQLite support	enabled
PECL Module version	2.0-dev $Id$
SQLite Library	2.8.17
SQLite Encoding	iso8859

Directive	Local Value	Master Value
sqlite.assoc_case	0	0

sqlite3

SQLite3 support	enabled
SQLite3 module version	0.7-dev
SQLite Library	3.7.7.1

Directive	Local Value	Master Value
sqlite3.extension_dir	no value	no value

standard

Dynamic Library Support	enabled
Internal Sendmail Support for Windows	enabled

Directive	Local Value	Master Value
assert.active	1	1
assert.bail	0	0
assert.callback	no value	no value
assert.quiet_eval	0	0
assert.warning	1	1
auto_detect_line_endings	0	0
default_socket_timeout	60	60
from	no value	no value
safe_mode_allowed_env_vars	PHP_	PHP_
safe_mode_protected_env_vars	LD_LIBRARY_PATH	LD_LIBRARY_PATH
url_rewriter.tags	a=href,area=href,frame=src,input=src,form=fakeentry	a=href,area=href,frame=src,input=src,form=fakeentry
user_agent	no value	no value

tidy

Tidy support	enabled
libTidy Release	25 March 2009
Extension Version	2.0 ($Id$)

Directive	Local Value	Master Value
tidy.clean_output	no value	no value
tidy.default_config	no value	no value

tokenizer

Tokenizer Support	enabled

wddx

WDDX Support	enabled
WDDX Session Serializer	enabled

xml

XML Support	active
XML Namespace Support	active
libxml2 Version	2.7.8

xmlreader

XMLReader	enabled

xmlwriter

XMLWriter	enabled

zip

Zip	enabled
Extension Version	$Id$
Zip version	1.9.1
Libzip version	0.9.0

zlib

ZLib Support	enabled
Stream Wrapper support	compress.zlib://
Stream Filter support	zlib.inflate, zlib.deflate
Compiled Version	1.2.7
Linked Version	1.2.7

Directive	Local Value	Master Value
zlib.output_compression	Off	Off
zlib.output_compression_level	-1	-1
zlib.output_handler	no value	no value

Additional Modules

Module Name

Environment

Variable	Value
ALLUSERSPROFILE	C:\ProgramData
APPDATA	C:\Windows\system32\config\systemprofile\AppData\Roaming
asl.log	Destination=file
CLASSPATH	.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip
CommonProgramFiles	C:\Program Files\Common Files
CommonProgramFiles(x86)	C:\Program Files (x86)\Common Files
CommonProgramW6432	C:\Program Files\Common Files
COMPUTERNAME	ACER-PC
ComSpec	C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK	NO
LOCALAPPDATA	C:\Windows\system32\config\systemprofile\AppData\Local
NTIPath	C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NewTech Infosystems\NTI Backup Now 5\;
NUMBER_OF_PROCESSORS	4
OS	Windows_NT
Path	C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x86;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x64;C:\Program Files (x86)\Windows Live\Shared;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\DTS\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\WinSCP;C:\svn\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Smart Projects\IsoBuster;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files (x86)\Zend\ZendServer\bin;C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\bin;C:\Program Files (x86)\Bitvise Tunnelier;C:\Program Files (x86)\Common Files\SYSTEM\MSMAPI\1033;C:\Program Files (x86)\WinSCP\;C:\Program Files\Microsoft\Web Platform Installer\;
PATHEXT	.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Pathtem	C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\
PHPRC	C:\PHP5\
PHPRC~	C:\PHP5\
PROCESSOR_ARCHITECTURE	AMD64
PROCESSOR_IDENTIFIER	Intel64 Family 6 Model 37 Stepping 2, GenuineIntel
PROCESSOR_LEVEL	6
PROCESSOR_REVISION	2502
ProgramData	C:\ProgramData
ProgramFiles	C:\Program Files
ProgramFiles(x86)	C:\Program Files (x86)
ProgramW6432	C:\Program Files
PSModulePath	C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC	C:\Users\Public
QTJAVA	C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip
SystemDrive	C:
SystemRoot	C:\Windows
TEMP	C:\Windows\TEMP
TMP	C:\Windows\TEMP
USERDOMAIN	WORKGROUP
USERNAME	ACER-PC$
USERPROFILE	C:\Windows\system32\config\systemprofile
windir	C:\Windows
AP_PARENT_PID	8208

PHP Variables

Variable	Value
_REQUEST["phpinfo"]	1
_GET["phpinfo"]	1
_COOKIE["__qca"]	P0-2004678363-1389558149020
_COOKIE["PHPSESSID"]	lgjcej7osg69dcusjphbc1knk7
_SERVER["HTTP_HOST"]	localhost
_SERVER["HTTP_CONNECTION"]	keep-alive
_SERVER["HTTP_ACCEPT"]	text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
_SERVER["HTTP_USER_AGENT"]	Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
_SERVER["HTTP_REFERER"]	http://localhost/
_SERVER["HTTP_ACCEPT_ENCODING"]	gzip,deflate,sdch
_SERVER["HTTP_ACCEPT_LANGUAGE"]	en-US,en;q=0.8
_SERVER["HTTP_COOKIE"]	__qca=P0-2004678363-1389558149020; PHPSESSID=lgjcej7osg69dcusjphbc1knk7
_SERVER["PATH"]	C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x86;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x64;C:\Program Files (x86)\Windows Live\Shared;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\DTS\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\WinSCP;C:\svn\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Smart Projects\IsoBuster;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files (x86)\Zend\ZendServer\bin;C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\bin;C:\Program Files (x86)\Bitvise Tunnelier;C:\Program Files (x86)\Common Files\SYSTEM\MSMAPI\1033;C:\Program Files (x86)\WinSCP\;C:\Program Files\Microsoft\Web Platform Installer\;
_SERVER["SystemRoot"]	C:\Windows
_SERVER["COMSPEC"]	C:\Windows\system32\cmd.exe
_SERVER["PATHEXT"]	.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
_SERVER["WINDIR"]	C:\Windows
_SERVER["SERVER_SIGNATURE"]	no value
_SERVER["SERVER_SOFTWARE"]	Apache/2.2.22 (Win64) PHP/5.3.13
_SERVER["SERVER_NAME"]	localhost
_SERVER["SERVER_ADDR"]	127.0.0.1
_SERVER["SERVER_PORT"]	80
_SERVER["REMOTE_ADDR"]	127.0.0.1
_SERVER["DOCUMENT_ROOT"]	C:/wamp/www/
_SERVER["SERVER_ADMIN"]	admin@localhost
_SERVER["SCRIPT_FILENAME"]	C:/wamp/www/index.php
_SERVER["REMOTE_PORT"]	47081
_SERVER["GATEWAY_INTERFACE"]	CGI/1.1
_SERVER["SERVER_PROTOCOL"]	HTTP/1.1
_SERVER["REQUEST_METHOD"]	GET
_SERVER["QUERY_STRING"]	phpinfo=1
_SERVER["REQUEST_URI"]	/?phpinfo=1
_SERVER["SCRIPT_NAME"]	/index.php
_SERVER["PHP_SELF"]	/index.php
_SERVER["REQUEST_TIME"]	1394316875

PHP License

This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.

Open in new window

0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 300 total points
Comment Utility
Here are the parts that are important:

PHP Version 5.3.13
Your PHP Version is out of date; you should probably be using at least PHP 5.4+ so you might want to upgrade.  The upgrade will give you better error_reporting().

error_log no value
You need to tell PHP what file to use for the error_log.  With no value, there will be no log.

error_reporting 30719
Not sure exactly what that means, but it's probably the default value.  You will find that the best error_reporting value is 32767, indicated by error_reporting(E_ALL) in PHP 5.4+

log_errors On
See error_log, where there is no value.  The configuration is telling PHP to log the errors, but not telling PHP where to log the errors.  A good thing to try might be to tell PHP that the value for error_log would be error_log.  Then you could trigger an error and look for the appearance of a file named error_log.  If that shows up, you've got a valuable new diagnostic tool.

log_errors_max_len 1024
That looks fine to me.
0
 

Author Comment

by:rgb192
Comment Utility
error_log no value
You need to tell PHP what file to use for the error_log.  With no value, there will be no log.

so I need to set a default value for all error logs to appear in the same file
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 300 total points
Comment Utility
The error_log files will appear on a per-directory basis.  

If you have www/ for your web root, all errors in the www/ scripts will get logged in:
www/error_log  

If you have www/demo/ for your test directory, all errors in the www/demo/ scripts will get logged in:
www/demo/error_log
0
 

Author Closing Comment

by:rgb192
Comment Utility
short term answer to question is
error_log("You messed up!", 3, "my-errors.log");

long term is setting error log for a folder

Thanks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now