Discussion:
How Do I Run a PHP Program under XAMPP?
(too old to reply)
PHPBABY3
2012-01-25 11:45:28 UTC
Permalink
I am a programmer experienced in writing database applications. I
taught myself PHP and now I am trying to install it myself. My
operating system is windows 7. I downloaded XAMPP and need to:

1. Know where to put the PHP programs.
2. Tell XAMPP where they are.
3. Know how to use my browser to run them.
4. Get windows to let me set files instead of telling me I don’t have
permission. (I paid for the computer and the computer store gave me
permission to take it home and use it.)

I believe I know most of it but need to correct and complete it.

1: The PHP programs will be in c:/xampp/htdocs/LL starting with
index.php

2: There are two files used to tell XAMPP where the PHP programs are.

c:/xampp/apache/conf/extra/httpd-vhosts.conf will contain:

<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs/LL"
ServerName LL
</VirtualHost>

c:/windows/system32/drivers/etc/hosts will contain:

127.0.0.1 LL

3: I will start Internet Explorer and type http://LL.local into the
address field.

4: I have no idea how to make it stop saying ”You don’t have
permission.” when I try to change the files in (2).

Thanks for any help.

Charlie
crankypuss
2012-01-25 12:23:56 UTC
Permalink
Post by PHPBABY3
I am a programmer experienced in writing database applications. I
taught myself PHP and now I am trying to install it myself. My
1. Know where to put the PHP programs.
2. Tell XAMPP where they are.
3. Know how to use my browser to run them.
4. Get windows to let me set files instead of telling me I don’t have
permission. (I paid for the computer and the computer store gave me
permission to take it home and use it.)
I believe I know most of it but need to correct and complete it.
1: The PHP programs will be in c:/xampp/htdocs/LL starting with
index.php
2: There are two files used to tell XAMPP where the PHP programs are.
<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs/LL"
ServerName LL
</VirtualHost>
127.0.0.1 LL
3: I will start Internet Explorer and type http://LL.local into the
address field.
4: I have no idea how to make it stop saying ”You don’t have
permission.” when I try to change the files in (2).
Thanks for any help.
Charlie
When I was doing PHP server development on windows, I used this:
http://www.wampserver.com
it was a simple matter to download the install exe and run it,
everything was pretty much done by the install program.

However, I see that the website is now delivered in French. I see no
obvious "translate" link. Frankly I'd have been completely put off by
the current website, but unless something has changed drastically it's a
good setup. I had none of the problems you mention.
PHPBABY3
2012-01-25 21:47:11 UTC
Permalink
However, I see that the website is now delivered in French.  I see no
obvious "translate" link.  Frankly I'd have been completely put off by
the current website, but unless something has changed drastically it's a
good setup.  I had none of the problems you mention.
The only "problem" is that I'm not sure what to set the lines in the
files equal to, and windows won't let me change the files. I don't
have any problems with XAMPP.

Charlie
crankypuss
2012-01-25 22:48:57 UTC
Permalink
Post by PHPBABY3
Post by crankypuss
However, I see that the website is now delivered in French. I see no
obvious "translate" link. Frankly I'd have been completely put off by
the current website, but unless something has changed drastically it's a
good setup. I had none of the problems you mention.
The only "problem" is that I'm not sure what to set the lines in the
files equal to, and windows won't let me change the files. I don't
have any problems with XAMPP.
Charlie
To change the files log on as an administrator. If it won't let you
change them then, I think that's a pretty clear indication of bustedness.
Hot-Text
2012-01-25 22:13:54 UTC
Permalink
Post by PHPBABY3
I am a programmer experienced in writing database applications. I
taught myself PHP and now I am trying to install it myself. My
1. Know where to put the PHP programs.
2. Tell XAMPP where they are.
3. Know how to use my browser to run them.
4. Get windows to let me set files instead of telling me I don’t have
permission. (I paid for the computer and the computer store gave me
permission to take it home and use it.)
I believe I know most of it but need to correct and complete it.
1: The PHP programs will be in c:/xampp/htdocs/LL starting with
index.php
2: There are two files used to tell XAMPP where the PHP programs are.
<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs/LL"
ServerName LL
</VirtualHost>
If your Computer Name is LL
then your Server Name LL
Post by PHPBABY3
127.0.0.1 LL
3: I will start Internet Explorer and type http://LL.local into the
address field.
Not LL.local it's
http://LL
http://local
http://127.0.0.1
or you Computer IP address look like this

http://192.168.0.?
Post by PHPBABY3
4: I have no idea how to make it stop saying ”You don’t have
permission.” when I try to change the files in (2).
You may don’t have permission run too run XAMPP,
If you running a one of the Windows Server @ port: 80;
you my have to move XAMPP to Port 81 to get it to work,
if it works @ port: http://ll:81, or http://local:81

You need to fine which Windows Server is running on post 80,
and too disable it........
So you be able to run XAMPP on port: 80
--
User-agent: *
Disallow: /
Álvaro G. Vicario
2012-01-26 16:05:46 UTC
Permalink
Post by PHPBABY3
I am a programmer experienced in writing database applications. I
taught myself PHP and now I am trying to install it myself. My
operating system is windows 7. I downloaded XAMPP
I'm have no experience with XAMPP but I'll try to help. Please bear with
me if I omit any relevant XAMPP-specific detail.
Post by PHPBABY3
1. Know where to put the PHP programs.
2. Tell XAMPP where they are.
3. Know how to use my browser to run them.
4. Get windows to let me set files instead of telling me I don’t have
permission. (I paid for the computer and the computer store gave me
permission to take it home and use it.)
I believe I know most of it but need to correct and complete it.
1: The PHP programs will be in c:/xampp/htdocs/LL starting with
index.php
In fact, you can put your data wherever you want and my humble
suggestion is to keep them separate from programs. I normally create a
specific folder for web projects (typically in my data partition) with
this structure:

D:\Web\FooBar\htdocs

... where "htdocs" is the document root for project FooBar. This way I'm
able to keep information related to the project that does not need to be
public.

The default Apache layout is a remain from the early days of the WWW,
where you would normally host a single web site in your server.
Post by PHPBABY3
2: There are two files used to tell XAMPP where the PHP programs are.
<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs/LL"
ServerName LL
</VirtualHost>
Correct. In our hypotetical case, it'd be:

<VirtualHost *:80>
DocumentRoot "D:\Web\FooBar\htdocs"
ServerName LL
</VirtualHost>

Remember to omit the trailing slash.

Additionally, you need to make sure that:

1. The "httpd-vhosts.conf" line within "httpd.conf" is not commented out.

2. There's a "NameVirtualHost *:80" line somewhere.
Post by PHPBABY3
127.0.0.1 LL
Correct. Just two clarifications:

1. This file does not belong to Apache, PHP or XAMPP. It's provided by
Windows so you can "fake" a domain name (in this case, "LL").

2. Windows 7 has "User Account Control" so it won't allow you to edit
the file unless your editor is granted permission, and it won't complain
if your editor is not granted permission! Right click on your editor's
icon and select "Run as Administrator".
Post by PHPBABY3
3: I will start Internet Explorer and type http://LL.local into the
address field.
Almost all browsers are free. You don't have to cope with the
second-class one that came with your computer.
Post by PHPBABY3
4: I have no idea how to make it stop saying ”You don’t have
permission.” when I try to change the files in (2).
Oh, I was wrong: Windows 7 will actually complain :)
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
Álvaro G. Vicario
2012-01-26 16:12:46 UTC
Permalink
Post by PHPBABY3
127.0.0.1 LL
3: I will start Internet Explorer and typehttp://LL.local into the
address field.
BTW, I'd try http://LL instead. You haven't mentioned any ".local"
suffix anywhere else in your message.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
Hot-Text
2012-01-27 17:55:14 UTC
Permalink
Post by PHPBABY3
127.0.0.1 LL
3: I will start Internet Explorer and typehttp://LL.local into the
address field.
BTW, I'd try http://LL instead. You haven't mentioned any ".local" suffix anywhere else in your message.
I believe that Windows is see a Sup.local address being use..
http://LL.local
he don’t have permission for Sup. local address at this time.

he need to use
http://local/ or http://ll/


c:\xampp\Apache\conf
httpd.conf
xampp.conf

at xampp.conf you see.......

<Location /server-info>
</Location>
<Location /server-status>
</Location>
--
User-agent: *
Disallow: /
Loading...