Passing Variable on PHP pages

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Re: Passing Variable on PHP pages

Postby dr-tbird » 21. October 2010 18:38

Reinstalled, rebooted...same problem. Nothing is showing in php.

Ironically it was working about two weeks ago and then stopped. I've made no other changes to my system between then and now. Not so much as installing a game or utility. Nothing.
dr-tbird
 
Posts: 13
Joined: 20. October 2010 20:55

Re: Passing Variable on PHP pages

Postby Altrea » 21. October 2010 18:40

One step after another.

Can you start your Apache in the control panel? is there a green running label?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Passing Variable on PHP pages

Postby dr-tbird » 21. October 2010 18:41

Both apache and mysql are running
dr-tbird
 
Posts: 13
Joined: 20. October 2010 20:55

Re: Passing Variable on PHP pages

Postby Altrea » 21. October 2010 18:44

Thats good.

Start your browser and type in http://localhost/
Does the XAMPP Administration Page start correctly? Can you use the XAMPP example scripts in there?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Passing Variable on PHP pages

Postby dr-tbird » 21. October 2010 18:49

I get the index page from XAMPP and can view the info pages easily. Sample scripts are running.
dr-tbird
 
Posts: 13
Joined: 20. October 2010 20:55

Re: Passing Variable on PHP pages

Postby Altrea » 21. October 2010 18:51

Okay.
That shows that PHP is running and get parsed without errors.

Where do you save your php files for your xampp?
And how do you open them in the browser?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Passing Variable on PHP pages

Postby dr-tbird » 21. October 2010 18:54

They are in subfolders in htdocs
All my files have a php extension
I tried one on the root of htdocs and cannot view the php. The html is fine:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> testing </title>
</head>
<body>
HTML here. No biggie.

<?php

echo "This is a test of php.";

?>


</body>
</html>
dr-tbird
 
Posts: 13
Joined: 20. October 2010 20:55

Re: Passing Variable on PHP pages

Postby Altrea » 21. October 2010 18:55

We are getting close.

Altrea wrote:how do you open them in the browser?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Passing Variable on PHP pages

Postby dr-tbird » 21. October 2010 18:56

Either dragging to the window (I use Firefox, btw) or right clicking them.
dr-tbird
 
Posts: 13
Joined: 20. October 2010 20:55

Re: Passing Variable on PHP pages

Postby Altrea » 21. October 2010 18:59

And exactly here is the problem :D

PHP had to be requested through the Webserver to get parsed by the php parser.
localhost is the alias for your own computer. And Apache knows, that requests goes directly to the htdocs folder.

So, if you have a file C:\xampp\htdocs\subfolder\test.php, the correct url is http://localhost/subfolder/test.php

You can't open your files directly in the Browser. That can't work with php
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Passing Variable on PHP pages

Postby dr-tbird » 21. October 2010 19:08

Thank you so much! I feel so silly. :oops:

I truly appreciate your help on this and promise to "pay it forward" when I am in the position of helping others.
dr-tbird
 
Posts: 13
Joined: 20. October 2010 20:55

Re: Passing Variable on PHP pages

Postby Altrea » 21. October 2010 19:09

I'm glad that your problem could be solved :D
Have fun with XAMPP and PHP and don't get too frustrated :wink:
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8286
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 31 guests