Author |
|
okamieto
Joined: 18 Dec 2010 Posts: 2
|
Posted: Sat 18 Dec '10 10:29 Post subject: PHP scripts won't run |
|
|
Hi guys,
My browser can open php page. The function php_info() works fine. But, when I open my website pages, the include() files won't show. Please, help.
BTW, I'm running Apache2.2 and PHP 5.3.4.0 |
|
Back to top |
|
Virsacer
Joined: 16 Jan 2010 Posts: 108 Location: Germany, Darmstadt
|
Posted: Sat 18 Dec '10 11:23 Post subject: |
|
|
When you use require() instead of include() you might get an errormessage wich could help you.
Perhaps thers a spelling error (i.e. capitalization)
Are you sure that the included files are actualy generating output? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 18 Dec '10 23:09 Post subject: |
|
|
Turn on error reporting at the very top of your scripts
Code: |
ini_set("display_errors",1);
error_reporting(E_ALL);
|
|
|
Back to top |
|
okamieto
Joined: 18 Dec 2010 Posts: 2
|
Posted: Sun 19 Dec '10 5:44 Post subject: |
|
|
Quote: | Perhaps thers a spelling error (i.e. capitalization)
Are you sure that the included files are actualy generating output? |
These are actual files that I used on my website. They work just find on my host server. So, I am sure that there are no spelling errors and they can generate output
Quote: | Turn on error reporting at the very top of your scripts
Code: | ini_set("display_errors",1);
error_reporting(E_ALL); |
|
I put these code at the beginning of my script inside the <body> tag. No error messages shown. |
|
Back to top |
|
Virsacer
Joined: 16 Jan 2010 Posts: 108 Location: Germany, Darmstadt
|
Posted: Sun 19 Dec '10 10:42 Post subject: |
|
|
These two lines have to be the FIRST THING in your file! |
|
Back to top |
|
zskinmedica33
Joined: 11 May 2011 Posts: 2
|
Posted: Wed 11 May '11 2:49 Post subject: |
|
|
Kind of weird if they didn't output any error messages. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 11 May '11 10:00 Post subject: |
|
|
zskinmedica33 wrote: | Kind of weird if they didn't output any error messages. |
Please open the page in your browser e.g. http://localhost/test.php than try to view the source code (right click --> View source code) Can you see something?
In your php.ini turn on all warnings
Code: |
error_reporting = E_ALL | E_STRICT
display_errors = On
display_startup_errors = On
|
if you wanna go productive turn it off again |
|
Back to top |
|