logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: PHP scripts won't run
Author
okamieto



Joined: 18 Dec 2010
Posts: 2

PostPosted: Sat 18 Dec '10 10:29    Post subject: PHP scripts won't run Reply with quote

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. Shocked

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

PostPosted: Sat 18 Dec '10 11:23    Post subject: Reply with quote

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: 7294
Location: Germany, Next to Hamburg

PostPosted: Sat 18 Dec '10 23:09    Post subject: Reply with quote

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

PostPosted: Sun 19 Dec '10 5:44    Post subject: Reply with quote

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 Mr. Green

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. Crying or Very sad
Back to top
Virsacer



Joined: 16 Jan 2010
Posts: 108
Location: Germany, Darmstadt

PostPosted: Sun 19 Dec '10 10:42    Post subject: Reply with quote

These two lines have to be the FIRST THING in your file!
Back to top
zskinmedica33



Joined: 11 May 2011
Posts: 2

PostPosted: Wed 11 May '11 2:49    Post subject: Reply with quote

Kind of weird if they didn't output any error messages.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Wed 11 May '11 10:00    Post subject: Reply with quote

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 Wink
Back to top


Reply to topic   Topic: PHP scripts won't run View previous topic :: View next topic
Post new topic   Forum Index -> Other Software