PHP not working all the time
Posted by: Zaman (---.019-109-73746f25.cust.bredbandsbolaget.se)
Date: February 20, 2006 01:33PM

some PHP commands won't work, not even a simple one like this one
<? php include('filename.php'); ?>

it shows nothing, just pure blank

and others won't even work, only giving away either MySQL error's or just reflecting back the content of the PHP file.

The only thing I could manage to properly install and make it work was a forum from MyBBboard.com

other then that everything is messed up.

Options: ReplyQuote
Re: PHP not working all the time
Posted by: Andrés (---.sion.net)
Date: February 20, 2006 02:32PM

The same for me, some PHP commands don't work, I've tested it in two different PC's with XP SP2 and firewall disabled for Apache, and neither worked.

Options: ReplyQuote
Re: PHP not working all the time
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 21, 2006 04:23AM

php is setup with default error reporting set to only show serious errors, not all errors. so, when some code does not work, you wont see an error, but you will have no idea of what the problem was. You can set error reporting to show all errors, which I recommend while you are writing your php scripts. But, for security concerns, it is recommended that you return back to the default error reporting level when you are running a production server.

How to enable all errors:

open your php.ini file, make sure you open it in NotePad, not WordPad or MS Word.

find this line:

error_reporting = E_ALL & ~E_NOTICE

change it to this:

error_reporting = E_ALL

save the file, restart apache, and all errors will be displayed now when you are developing your scripts.

Options: ReplyQuote
Re: PHP not working all the time
Posted by: Robert (---.pbn.com.au)
Date: February 21, 2006 05:42AM

Make sure you use the tag correctly.
<?php

No spaces

Options: ReplyQuote


Sorry, only registered users may post in this forum.