Page 1 of 1

strange php behavior

Posted: Mon Oct 24, 2005 5:28 am
by shiznatix
ok i fought through the installing and config of apache. i battled past the hordes of getting php 5 to work for it. i slayed the green mysql server dragon. i saved the princess from the evil prince of not letting mysql functions work with php 5. now im at a stand still. no errors at all. i mean i even take out a semi colon and nothing happens. error_reporting is set to E_ALL.

example:

Code: Select all

<?
echo 'test1';
echo 'test2'
//outputs nothing at all. no parse errors or anything.
?>
is this somthing new with php 5? any ideas?

Posted: Mon Oct 24, 2005 5:44 am
by Grim...
Is it logging the error rather than displaying it on-screen?

Posted: Mon Oct 24, 2005 6:06 am
by shiznatix
hummm yes they are showing up in my apache error log. how do i make them show up on screen? never mind got it

Posted: Mon Oct 24, 2005 6:50 am
by Maugrim_The_Reaper
Display errors on?

Does an error free statement echo to screen?

Posted: Mon Oct 24, 2005 7:07 am
by shiznatix
no no i turned on display_errors in my php.ini file and it worked perfectly.

Posted: Mon Oct 24, 2005 8:51 am
by Grim...
I have that problem with my hosting, they say they can't turn 'show_errors' on because it would effect everyone using that server.

Very, very annoying.

Posted: Mon Oct 24, 2005 9:11 am
by Jenk
Then just use:

Code: Select all

<?php
in_set('display_errors', 1);

//rest of page
?>

Posted: Mon Oct 24, 2005 9:15 am
by n00b Saibot
or use your own error handler 8)

Posted: Mon Oct 24, 2005 10:13 am
by Grim...
I do use

Code: Select all

<?php
ini_set('display_errors', 1); 
?>
But that's not much help if there's a parse error :(

Posted: Mon Oct 24, 2005 11:56 am
by timvw
I have in virtually every script the following:

Code: Select all

<?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);

...

?>