Nothing happens at all.....
Posted by: larshgf (---.k89.webspeed.dk)
Date: October 29, 2006 09:54PM

Hello,

If I place this code.....

<?
$var = "HI THERE";
Echo ("Velcome to my website"winking smiley;
Echo ("The variable contains $var"winking smiley;
?>

in a file called "test.php3" - and write this in my Webbrowsers adress-line.....

[localhost]

THEN NOTHING HAPPENS AT ALL!!!!!!
(that is: my wamp is not able to execute PHP-code, see my earlier topic this day)
And I have not got any real idea to what might be wrong...... :-(

/Lars


Options: ReplyQuote
Re: Nothing happens at all.....
Posted by: timtak (---.c-able.ne.jp)
Date: October 30, 2006 02:39AM

I am pretty *new* but just in case.

Assuming that the apache server is on (in the wampserver menu top right of the screen)

Sometimes the short php limiters are disabled, so you could try
<?php and.. ?>
<?php and <? are equivalent only if short_open_tag is set to 'on' in php.ini

and you could try using a filename test.php instead of test.php3 in case .php3 are not parsed for .php (there is sure to be a setting perhaps in the apache config, httpd.config, to stipulate which files are treated as php files.

Normally if the file is a php file then why are you putting <? around the php? Normally one puts the delimiters aroudn php in a html (.htm) file. Perhaps php3 is another way of saying .html?!

Also is the wampserver homepage inside wwww, index.php working?

Options: ReplyQuote
Re: Nothing happens at all.....
Posted by: sizzzzlerz (12.191.193.---)
Date: October 30, 2006 03:42PM

I think timtak nailed it with the short tags. In the php configuration file that was installed as part of the original distribution, the following lines appear:

; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.
short_open_tag = Off

If you want to use short tags, you need to changes this to On and restart the apache server.

Options: ReplyQuote
Re: Nothing happens at all.....
Posted by: larshgf (---.k89.webspeed.dk)
Date: October 30, 2006 10:34PM

Thank you - but I have tried the <?php ?> with no result.
I have uninstalled my wamp and have manually installed apache, php5 and mysql with good results.

Best Regards
Lars

Options: ReplyQuote
Re: Nothing happens at all.....
Posted by: CyberSpatium (71.237.217.---)
Date: October 30, 2006 10:35PM

no, this is not a short tag issue. Apache is not setup to parse php files with the extension .php3 change it to .php and it will work fine.


CyberSpatium
WAMP English Forum Administrator

Options: ReplyQuote


Sorry, only registered users may post in this forum.