strange php behavior

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

strange php behavior

Post 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?
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Is it logging the error rather than displaying it on-screen?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post 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
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Display errors on?

Does an error free statement echo to screen?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

no no i turned on display_errors in my php.ini file and it worked perfectly.
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post 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.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Then just use:

Code: Select all

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

//rest of page
?>
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

or use your own error handler 8)
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post 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 :(
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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);

...

?>
Post Reply