wamp 2.0 . i cannot see my errors
Posted by: barantamer (88.243.238.---)
Date: February 16, 2008 08:35PM

hello ,
I just installed wamp 2.0 to my system . And put my already working website to the www folder .
However , it didnt work correctly , but php showed no errors . Then i made a file , and put lines with errors intentianally , and it didnt show any errors either. I guess my php setting ignores the error lines . How can i fix this ?

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: February 16, 2008 09:28PM

ok this is easy!

just open your php.ini file localed at

C:\wamp\bin\apache\apache2.2.6\bin


in it you will find this section


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; error_reporting is a bit-field. Or each number up to get desired error
; reporting level
; E_ALL - All errors and warnings (doesn't include E_STRICT)
; E_ERROR - fatal run-time errors
; E_RECOVERABLE_ERROR - almost fatal run-time errors
; E_WARNING - run-time warnings (non-fatal errors)
; E_PARSE - compile-time parse errors
; E_NOTICE - run-time notices (these are warnings which often result
; from a bug in your code, but it's possible that it was
; intentional (e.g., using an uninitialized variable and
; relying on the fact it's automatically initialized to an
; empty string)
; E_STRICT - run-time notices, enable to have PHP suggest changes
; to your code which will ensure the best interoperability
; and forward compatibility of your code
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
; initial startup
; E_COMPILE_ERROR - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated notice message
;
; Examples:
;
; - Show all errors, except for notices and coding standards warnings
;
;error_reporting = E_ALL & ~E_NOTICE
;
; - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE | E_STRICT
;
; - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
;
; - Show all errors, except coding standards warnings
;
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
;
; possible values for display_errors:
;
; Off - Do not display any errors
; stderr - Display errors to STDERR (affects only CGI/CLI binaries!)
; On or stdout - Display errors to STDOUT (default)
;
; To output errors to STDERR with CGI/CLI:
;display_errors = "stderr"
;
; Default
;
display_errors = On








this last line turns it on and off

and

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

this line decides which errors you see

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: barantamer (88.243.238.---)
Date: February 16, 2008 09:41PM

thanks for the fast answer , i have another question .
I guess my other problem is , i cannot include my function files
do you know why ?

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: February 16, 2008 09:45PM

want you mean?

paste your error here

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: barantamer (88.243.238.---)
Date: February 16, 2008 09:56PM

the thing is i still cant any errors from my statsconnect.php
which is



<?php



$link = mysql_connect($__SERVER__, 'root', '8143675');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully<br>';

$db_selected = mysql_select_db('futboltakip_com_stats', $link);

mysql_query("SET NAMES 'latin1'"winking smiley;
mysql_query("SET CHARACTER SET latin1"winking smiley;
mysql_query("SET COLLATION_CONNECTION = 'latin1_turkish_ci'"winking smiley;
if (!$db_selected) {
die ('Can\'t use : ' . mysql_error());
}


?>

when i run this file , it says "connected successfully "

but when i include this file to another one , and run the other file , it doesnt say anything
and load the html part , but doesnt take any information from my database

and my include line is

include('statsconnect.php');

both files are in the same folder
do you have any idea ?

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: yfastud (Moderator)
Date: February 16, 2008 10:06PM

Did you already setup the database and import all tables and data yet? If not, it can't retrieve any db info

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: barantamer (88.243.238.---)
Date: February 16, 2008 10:07PM

yes i did

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: February 16, 2008 10:08PM

i have tried ur code unmodified and it says it connects but i dont have a database called that?! this is a very messy way to write a connection code
please use this instead


<?
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass='8143675';
$dbname = 'futboltakip_com_stats';

mysql_connect($dbhost,$dbuser,$dbpass);
@mysql_select_db($dbname) or die( "Unable to select database"winking smiley;

mysql_query("SET NAMES 'latin1'"winking smiley;
mysql_query("SET CHARACTER SET latin1"winking smiley;
mysql_query("SET COLLATION_CONNECTION = 'latin1_turkish_ci'"winking smiley;

?>





please use this instead.




and as for you include -no brackets

include 'statsconnect.php';

is how i always write it and it works



Edited 1 time(s). Last edit at 02/16/2008 10:09PM by stevenmartin99.

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: barantamer (88.243.238.---)
Date: February 16, 2008 10:33PM

i did as you told me , still no progress unfortunately

but i realized something , i told you that i dont get any erros but , i realized its not the case.
Its just errors was in white color . I dont actually know how to say that english but i dragged my mouse while clicking the left mouse button , then i saw the error

my error is

Fatal error: Call to undefined function display_win_percent_world() in C:\wamp\www\futboltakip\europeyuzde.php on line 103



and my inlcude is

<?
include 'statsconnect.php';
include 'display_functions.php';
?>

display_win_percent_world() is in display_functions.php

i still think its an error about php`s include configuration .. Is there such configuration ?

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: February 16, 2008 10:38PM

<?
include 'statsconnect.php';
include 'display_functions.php';
?>

do you have php short tags enabled?

<? does not work with out it being on
so always use
<?php as it always works

maybe this why the function is not defined



Edited 1 time(s). Last edit at 02/16/2008 10:40PM by stevenmartin99.

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: barantamer (88.243.238.---)
Date: February 16, 2008 10:40PM

thats probably the case
How can i enable them ? because all my codes are like that sad smiley

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: February 16, 2008 10:42PM

just left click on the wamp icon

goto PHP

goto PHP SETTINGS

tick the second one from the top - SHORT OPEN TAG

Options: ReplyQuote
Re: wamp 2.0 . i cannot see my errors
Posted by: barantamer (88.243.238.---)
Date: February 16, 2008 10:52PM

thanks a lot man ,
it works now , the thing is i couldnt have found this problem for days ..
Thank u very much ..
Take care

Options: ReplyQuote


Sorry, only registered users may post in this forum.