RE: Test.php loads, but nothing in Browser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, the closing tag is optional and PHP tends to ignore additional
whitespace.  HOWEVER, if you put white space in the middle of a token
(i.e. "? >" or "phpin fo();"), PHP will die. 

-jim

-----Original Message-----
From: M. Sokolewicz [mailto:tularis@xxxxxxx] 
Sent: Friday, January 27, 2006 3:06 AM
To: Howard
Cc: php-windows@xxxxxxxxxxxxx
Subject: Re: Test.php loads, but nothing in Browser

actually, the closing tag is optional in php; it's not required(!) and
PHP also doesn't mind a ton of whitespaces, it ignores them

I would also suggest checking your display_errors value in your php.ini,
make sure it's On.

- tul

Howard wrote:

> Error Reporting is set as you show.
> 
> I changed the script to what you show, and it still doesn't work.
> 
> Apache recognizes PHP but for some reason doesn't run scripts. I even 
> tried the "Hello World" script in an html file.
> 
> 
> More likely than not you have notices/warnings turned off in your 
> php.ini file.  Check
> 
> error_reporting = E_ALL
> 
> set.  The problem with your test.php script is probably that you do 
> not have a proper closing tag.  You said your script is:
> 
> <? phpinfo( ) ; ? >
> 
> when it should look more like:
> 
> <? phpinfo(); ?>
> 
> The main difference here is the "? >" vs. the correct tag of "?>".
> 
> -jim
> 
> -----Original Message-----
> From: Howard [mailto:howard1291@xxxxxxxxxxx]
> Sent: Thursday, January 26, 2006 2:54 PM
> To: php-windows@xxxxxxxxxxxxx
> Subject: Test.php loads, but nothing in Browser
> 
> Here is the setup. MS XP Pro. Apache 2.0.55, PHP 5.1.2.
> 
> I downloaded the zipped archive and extracted to c:\php.
> 
> Using Manual Installation Method.
> 
> Apache Monitor is running and going to localhost does show the Apache 
> Logo and information. Also in Apache montior at the bottom here is 
> what is displayed
> 
> Apache/2.0.55(Win32) PHP/5.1.2.
> 
> I wrote in Notepad the script <? phpinfo( ) ; ? >, and saved the page 
> as test.php. I placed it in the Apache/htdocs directory as instructed.

> When loaded througha Browser it is my understanding that I should be 
> able to see info on my version on PHP.
> 
> Well it loads with no error. But there is nothing in the Browser
Window.
> MS IE 6.
> 
> Any ideas?? Or can someone help going over the settings.
> 
> Thanks
> 
> Howard

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux