Hello World! (no response)

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Redsox3
-


Joined: 04 May 2004
Posts: 2
Location: Hudson Valley NY

PostPosted: Tue May 11, 2004 11:08 pm    Post subject: Hello World! (no response) Reply with quote

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 View user's profile Send private message Visit poster's website AIM Address
Redsox3
-


Joined: 04 May 2004
Posts: 2
Location: Hudson Valley NY

PostPosted: Tue May 11, 2004 11:19 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website AIM Address
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue May 11, 2004 11:36 pm    Post subject: Reply with quote

the cgi Path does not start with C:\*.php
its supposed to be /*.php , we recommend
the PHP installer instead of the zip file !

A Good Tutorial is:

http://os17fan.cjb.net

http://aprelium.com/abyssws/php.html
Back to top View user's profile Send private message Visit poster's website
XvObiVx
-


Joined: 01 May 2004
Posts: 9

PostPosted: Wed May 12, 2004 1:56 am    Post subject: Reply with quote

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 View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed May 12, 2004 1:26 pm    Post subject: Re: Hello World! (no response) Reply with quote

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 View user's profile Send private message Send e-mail
b0b
-


Joined: 01 Jun 2004
Posts: 24

PostPosted: Tue Jun 01, 2004 8:29 pm    Post subject: Reply with quote

make a file called phpinfo.php and paste this into it:
Code:
<?
phpinfo();
?>

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 View user's profile Send private message
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Tue Jun 01, 2004 11:39 pm    Post subject: Reply with quote

b0b wrote:
make a file called phpinfo.php and paste this into it:
Code:
<?
phpinfo();
?>

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 View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Jun 01, 2004 11:44 pm    Post subject: Reply with quote

Yeah , you have to use <?php ?> as the
PHP tags because this isn't ASP scripting!
Back to top View user's profile Send private message Visit poster's website
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Tue Jun 01, 2004 11:53 pm    Post subject: Reply with quote

ASP uses percent signs (<% %>). If you just put <? ?>, then nothing will happen.
_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Wed Jun 02, 2004 12:44 am    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Wed Jun 02, 2004 1:01 am    Post subject: Reply with quote

<?
phpinfo();
?>

works absolutely fine for me with no additional tweaking.
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Wed Jun 02, 2004 1:40 am    Post subject: Reply with quote

Oh , I could have sworn you had to
tweak it for it to use those tags.
Back to top View user's profile Send private message Visit poster's website
scorpion_-x-
-


Joined: 20 May 2004
Posts: 2

PostPosted: Wed Jun 02, 2004 2:46 am    Post subject: Reply with quote

nope u dont need to...
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group