View previous topic :: View next topic |
Author |
Message |
Redsox3 -
Joined: 04 May 2004 Posts: 2 Location: Hudson Valley NY
|
Posted: Tue May 11, 2004 11:08 pm Post subject: Hello World! (no response) |
|
|
Running Windows XP, just starting out with Abyss Web Server and PHP, hoping to eventually make use of MySQL on a home network. I've got Abyss up and running, have downloaded php-4.3.4-Win32, unzipped into C:\php, copied dll files to C:\Windows\system and copied/renamed php.dll to C:\Windows. Have specified REDIRECT_STATUS=200 in the User CGI Environment Variables, also added C:\*.php to CGI Paths and specified C:\php\php.exe in CGI Interpreters. Have hit the restart button on Abyss Console, and rebooted machine to get the dll's into effect.
Wrote the introductory HTML "Hello World" page (hello.html) as follows:
<html>
<body>
<?php
$myvar = "Hello World";
echo $myvar;
?>
</body>
</html>
Stored that html file in C:\Program Files\Abyss Web Server\htdocs directory.
Loading html://localhost/hello.html or clicking on the file in Windows Explorer results in a blank display. Viewing the source code shows the HTML and PHP code in hello.html, and the PHP code fragment is shaded as if it's not even recognized.
Did I overlook anything really obvious?
My therapist says I'll be fine in a couple of years... :)
Thanks,
WMD |
|
Back to top |
|
|
Redsox3 -
Joined: 04 May 2004 Posts: 2 Location: Hudson Valley NY
|
Posted: Tue May 11, 2004 11:19 pm Post subject: |
|
|
One thing I suppose I could do is check around to see if anyone else has had the same problem, like two threads down the list (as of right now). I renamed hello.html to hello.php and I'm getting it to work. Man, I hate when I figure it out immediately after posting the question.
Thanx,
WMD |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
|
Back to top |
|
|
XvObiVx -
Joined: 01 May 2004 Posts: 9
|
Posted: Wed May 12, 2004 1:56 am Post subject: |
|
|
I'm kind of new to Abyss, but it might be the ".html" part of your file. Did you set your PHP parser to parse .html as .php? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed May 12, 2004 1:26 pm Post subject: Re: Hello World! (no response) |
|
|
Redsox3,
Your CGI Parameters are wrong. Eventhough you used the Zip installation package of PHP, you should follow the "Adding PHP support" instruction in http://www.aprelium.com/abyssws/php.html (so add /*.php to the CGI Paths and not c:\*.php).
Your file is a .html file. So it won't be processed by default by the PHP interpreter. Either change its extension to .php or add html to the list of the extensions associated with PHP. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
b0b -
Joined: 01 Jun 2004 Posts: 24
|
Posted: Tue Jun 01, 2004 8:29 pm Post subject: |
|
|
make a file called phpinfo.php and paste this into it:
Test it to see if you get a long page with PHP parameters. If you don't you have PHP configured wrong. |
|
Back to top |
|
|
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Tue Jun 01, 2004 11:39 pm Post subject: |
|
|
b0b wrote: | make a file called phpinfo.php and paste this into it:
Test it to see if you get a long page with PHP parameters. If you don't you have PHP configured wrong. |
Actually, the correct code is:
Code: | <?php
phpinfo();
?> |
_________________ Bienvenidos! |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Jun 01, 2004 11:44 pm Post subject: |
|
|
Yeah , you have to use <?php ?> as the
PHP tags because this isn't ASP scripting! |
|
Back to top |
|
|
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Tue Jun 01, 2004 11:53 pm Post subject: |
|
|
ASP uses percent signs (<% %>). If you just put <? ?>, then nothing will happen. _________________ Bienvenidos! |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed Jun 02, 2004 12:44 am Post subject: |
|
|
I know that but my point is that , PHP will only
use single tags similar to ASP if you set up the
php.ini to do that specific tag <? ?> |
|
Back to top |
|
|
Anonymoose -
Joined: 09 Sep 2003 Posts: 2192
|
Posted: Wed Jun 02, 2004 1:01 am Post subject: |
|
|
<?
phpinfo();
?>
works absolutely fine for me with no additional tweaking. |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed Jun 02, 2004 1:40 am Post subject: |
|
|
Oh , I could have sworn you had to
tweak it for it to use those tags. |
|
Back to top |
|
|
scorpion_-x- -
Joined: 20 May 2004 Posts: 2
|
Posted: Wed Jun 02, 2004 2:46 am Post subject: |
|
|
nope u dont need to... |
|
Back to top |
|
|
|