Problem with errors

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
Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Problem with errors

Post by Deemo »

For some reason, whenever my PHP code hits an error, my server refuses to send back anything! i check the php.ini file and error_reporting is set to E_ALL, so im kind of at a loss as to why this doesnt work. The way i test this is leaving out a semi color and it stops returning stuff. This is a standard PHP installation on a brand new Fedora Core 3 installation. the version is 4.3.9 (ill probably update to 11 soon)

any ideas as to what could be causing this?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Post by Deemo »

thanks alot, that helped a bit. i set display_errors and display_startup_errors both to On, however i am still having a problem with errors. certain things work now. for example, if i type in

Code: Select all

<?php
blah
?>
it says "Notice: Use of undefined constant blah - assumed 'blah' in /var/www/html/index.php on line 9" but if i type in something like

Code: Select all

<?php
$test = "blah"   //Missing semicolon
?>
it still gives me nothing

heres my phpinfo if it helps: http://69.138.202.36/
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

*scratches head*

Can you post a link to phpinfo() on your server (by PM if you don't want to post publicly)?

Also post a link to a file containing only:

Code: Select all

<?php

$var = 'String';
$var .= 'Foo' //Missing semi-colon

?>
Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Post by Deemo »

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Thats really weird...

Just out of morbid curiosity, what happens if you turn off log_errors?

Also (I know it's stupid but I'm stumped), what happens if you rewrite the line

error_reporting = E_ALL;

Underneath the one that's already there?
Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Post by Deemo »

did the changes, and no luck :(
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Did this just stop working or has it never worked?

Perhaps it's time to just do your upgrade :idea:
Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Post by Deemo »

i just recently reformatted so its a fresh install of PHP
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Take a backup of your existing php.ini and try this (Just temporarily for 5 mins for troubleshooting reasons). I hope I've removed all the extensions you won't have on *nix and and windows specific paths :?
Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Post by Deemo »

weird, it still doesnt work
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Something must have gone wrong with your install... thats not normal.

Just reinstall it. Shouldn't be much of a hassle if you've just set everything up anyways ;-)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

a "missing semicolon" for the last line of a block is valid php last I checked.. so it's working correctly.
Post Reply