You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dieter Vyncke <di...@hotmail.com> on 2004/01/30 11:24:51 UTC

[users@httpd] Problem installing Apache2 on XP

I'm trying to install Apache2 on XP. The installation works just fine and 
I'm able to start the service without a problem.

error-logs don't contain errors.
no other errors are visible.

But here's my problem: When I'm trying to connect using my webbrowser 
(IE6)using http://localhost or http://127.0.0.1, it makes a connection with 
the apache service (checked this with netstat) and waits .... and waits..... 
I don't get the 'page not found' error or some other error, it just waits 
.... (when I stop the service, I immediately get the 'page not found' 
error).

additional info: standard binary installation, no other websevices, no 
firewall, nothing that seems special to me...

Does anybody have a clue about the problem here?

Thnx in advance

_________________________________________________________________
Hotmail: your free e-mail ! http://www.msn.be/hotmail


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Setting PHP Include Links in htaccess file

Posted by David Blomstrom <da...@yahoo.com>.
I've been using PHP includes on my website. This is
what some of the links looks like:

<?php include ("includes/top.php"); ?>
<?php include ("../includes/top.php"); ?>
<?php include ("../../includes/top.php"); ?>
<?php include ("../../includes/top.php"); ?>

I wanted to replace the ../ sequences with a variable,
so that I could post the exact same link on every
page, and it will work. I received these instructions:

put this in the .htaccess:
PHP:

php_value include_path .;C:/sites/freedomware/includes

You wont even need to use "includes" in the include
call:
PHP:

include ("top.php");

On a *nix based host you'd want to use a colon instead
of a semi-colon after the period wich comes after
"include_path" in the .htaccess file.


So I tried it. I found the htaccess file at
C:/xampp/webdav/htaccess. I opened it with Notepad,
and this is all it said:

AuthType Basic
AuthName "XAMPP with WEBDAV for DREAMWEAVER"
C:/xampprequire valid-user
AuthUserfile C:/xampp/webdav/.htpasswd

I added the line I was given, changing it to this:

AuthType Basic
AuthName "XAMPP with WEBDAV for DREAMWEAVER"
C:/xampprequire valid-user
AuthUserfile C:/xampp/webdav/.htpasswd
php_value include_path .;C:/sites/freedomware/includes

Then I restarted my computer, opened one of my pages
and replaced...

<?php include ("../includes/top.php"); ?>

with...

include ("top.php");

But that didn't work. (When I preview my page, I see
"include ("top.php");" at the top.)

I also tried this:

<?php include ("top.php"); ?>

When I do that, I get this error message:

Warning: main(top.php): failed to open stream: No such
file or directory in
C:\sites\freedomware\world\index.php on line 21

Warning: main(): Failed opening 'top.php' for
inclusion (include_path='.;C:\xampp\php\pear\') in
C:\sites\freedomware\world\index.php on line 21

However, the rest of the page previews fine. But when
I change it to this...
PHP:

<?php includes ("top.php"); ?>

...the entire page goes blank, except for this error
message:

Fatal error: Call to undefined function: includes() in
C:\sites\freedomware\world\index.php on line 21

Can anyone tell me if I'm on the right track, and what
I have to do to make this work?

I also have a question regarding these instructions:

"On a *nix based host you'd want to use a colon
instead of a semi-colon after the period wich comes
after "include_path" in the .htaccess file."

If I'm working on Windows, but my websites are hosted
on a Linux server, can I make TWO htaccess files - one
that lets me preview my pages on my computer, and a
second htaccess that replaces...

php_value include_path .;C:/sites/freedomware/includes

with...

php_value include_path .:C:/sites/freedomware/includes

Then can I publish this second htaccess file to the
Internet so my online websites will work?

Finally, if I want to do this with several websites,
would I just add multiple lines to my htaccess file,
like this?:

AuthType Basic
AuthName "XAMPP with WEBDAV for DREAMWEAVER"
C:/xampprequire valid-user
AuthUserfile C:/xampp/webdav/.htpasswd
php_value include_path .;C:/sites/freedomware/includes
php_value include_path .;C:/sites/animals/includes
php_value include_path .;C:/sites/geobop/includes
php_value include_path .;C:/sites/geoworld/includes 

Thanks.


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] include_path in .htaccess file

Posted by David Blomstrom <da...@yahoo.com>.
I installed Apache, MySQL and PHP a few weeks ago,
made one change to my Apache conf file and haven't
touched it since. I've just been working with MySQL
and PHP.

Today, I asked a question on a forum regarding PHP
includes. Below are some include links from my home
page (C:/sites/freedomware/index.php/) and the next
level (C:/sites/freedomware/world/index.php):

<?php include ("includes/top.php"); ?>
<?php include ("../includes/top.php"); ?>

I was trying to figure out a way to replace ../ with a
variable, so I could link every page to the same
include, whether the URL is preceded by ../ or
../../../../

Someone told me I'm doing it the wrong way. They
suggested several other ways...

"After you've placed all your include files into one
directory, you can easily set the include_path in one
of three ways (providing you don't have access to the
php.ini file):

    * Via the ini_set() function.
    * In PHP > v4.3, the set_include_path() function.
    * With an .htaccess file

"Obviously if you have access to the php.ini file, you
can set it permanently there."

I haven't yet figured out how to do any of these.
Someone said the best way is to modify the php.ini
file, but modifying the .htaccess file is recommended
on a tutorial at
http://www.phpfreaks.com/tutorials/110/0.php

So I wondered if you recommend that route and, if so,
can you give me some pointers? I typed "include_path"
into the search function at
http://httpd.apache.org/docs-2.0/ and didn't get any
hits at all.

Here's how my projects are set up:

All my websites are in a folder named sites, and my
Apache, MySQL and PHP folders are in a folder named
xampp.

C:/sites
C:/xampp/apache
C:/xampp/htdocs
C:/xampp/webdav/htaccess

I modified my httpd conf file so that when I type
http://localhost/ into a browser, it brings up
C:/sites/index.php.

The site I'm working on right now is located at
C:/sites/freedomware/ and the includes are located in
a folder named includes:
C:/sites/freedomware/includes/

One thing I wondered is if I have to make a separate
htaccess file for each of my websites. Also, do I have
to publish my modified htaccess files online?

Please let me know if you're aware of a good tutorial.

Thanks.

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Problem installing Apache2 on XP

Posted by David Blomstrom <da...@yahoo.com>.
--- Dieter Vyncke <di...@hotmail.com> wrote:
> I'm trying to install Apache2 on XP. The
> installation works just fine and 
> I'm able to start the service without a problem.

I'm still new to Apache, so I really can't help you.

However, I thought I might mention that I downloaded a
preconfigured package that includes Apache 2.0, PHP
and MySQL, and everything seems to work just fine. To
find it, do a search for "Apache Friends" or "XAMPP."

You'll obviously learn more by doing what you're
doing, but I thought I'd mention it in case you're
just looking for a quick fix, as I was.


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org