View previous topic :: View next topic |
Author |
Message |
Frank -
Joined: 27 Oct 2002 Posts: 15 Location: The Netherlands
|
Posted: Sat Jan 10, 2004 10:09 am Post subject: error on virtual domain script |
|
|
Hello guys,
DWS1 wrote that he got an error using the script for multiple domains.
I have exactly the same error:
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Abyss Web Server\htdocs\index.php:2) in C:\Program Files\Abyss Web Server\htdocs\index.php on line 8
The script gets to be read, because I get the the same error on diffrent lines, contacting 3 test domins. I test all the activity on the same computer. (webserver/host file/browsing). I use www.test1.nl, etc, so there is no "http://" in the script.
Any ideas ? I think the script is o.k. I am just not good at scripting, what am i doing wrong ?
Frankie _________________ He who thinks to know little, knows much already. |
|
Back to top |
|
 |
b_tibor -
Joined: 11 Sep 2003 Posts: 6
|
Posted: Tue Jan 27, 2004 12:37 pm Post subject: Cannot modify header information - cause |
|
|
Hi there!
just passed by, and saw that nobody answered this question...
I think I know the answer why are you geting ths error.
The problem is that when using this comand:
header("Location : whatever.html");
You must be sure there is not information allready written out on the processing php file.
make sure you do not have anything before the
<?php
phpscripts here
?>
script.
Make your page start in the first line with the php script.
And you also should not use in the php script
"echo" or "print" before header("Location : whatever.html");
Hope this will help You.
If not U can send me the file to b_tibor@hotmail.com, and I will modify it for U to work. _________________ b_tibor |
|
Back to top |
|
 |
gsownsby -
Joined: 03 Jun 2003 Posts: 71 Location: Chattanooga, TN USA
|
Posted: Tue Jan 27, 2004 9:04 pm Post subject: Aprelium Forum Index -> Tutorials |
|
|
Aprelium,
With over 2,500 views of this thread, I hope it is apparent that your user community desperately wants multiple domain routing in Abyss. It would seem that this should be your number 1 priorty in the next release and that release should come very soon. I hope you issue an interim or beta release with this feature quickly. Thanks for a great product. |
|
Back to top |
|
 |
gsownsby -
Joined: 03 Jun 2003 Posts: 71 Location: Chattanooga, TN USA
|
Posted: Thu Jan 29, 2004 3:48 am Post subject: |
|
|
Versions: AWS 1.2.2.2 for Linux (Fedora) / PERL 5.8.1
Broadband: DSL (dynamic IP)
Firewall / Router: NAT-type
DNS Server: ZoneEdit
IP Updating: DynSite used on a separate Windows 98 PC to automatically update ZoneEdit
I found a PERL-based redirection script from http://www.utilmind.com/scripts/virtualhosting.html
It is a Shareware product and best of all it works perfectly with very, very little editing. It took me about 5 minutes to change the domain URLs referenced in the script. Place it in the HTDOCS directory and presto it redirects to whereever you like (your Abyss website or external). The correct URLs are shown in the URL address bar of the browser too.
I had tried all the others mentioned on this forum but could not get any to work (perhaps I didn't have something right) but this one does work for me. I now have two completely independent websites running on my single instance Abyss web server. One website is cgi-driven (Web-App in cgi-bin) and the other is a Microsoft FrontPage website complete with extensions (a subdirectory of HTDOCS).
Configuring this script was soooo easy!! You might find it useful too. |
|
Back to top |
|
 |
needforspeed -
Joined: 20 Oct 2003 Posts: 69 Location: Kansas
|
Posted: Sat Feb 21, 2004 7:14 am Post subject: Re: Aprelium Forum Index -> Tutorials |
|
|
gsownsby wrote: | Aprelium,
With over 2,500 views of this thread, I hope it is apparent that your user community desperately wants multiple domain routing in Abyss. It would seem that this should be your number 1 priorty in the next release and that release should come very soon. I hope you issue an interim or beta release with this feature quickly. Thanks for a great product. |
I agree. It seems as though Aprelium has been working on this next version for a long time, I really hope the release is less than a month away. _________________ My site and forums |
|
Back to top |
|
 |
transmission1 -
Joined: 04 Feb 2004 Posts: 2 Location: UK
|
Posted: Thu Mar 25, 2004 5:24 pm Post subject: |
|
|
Fully agree, Abyss is the best websever I've ever used but if it supported Host Headers that would be so cool. I don't really want to use IIS ever again so it would be great if this feature is included very soon! 8)
Thanks
Simon |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Thu Mar 25, 2004 5:42 pm Post subject: |
|
|
I predicted that the new preview version will be out between the
20 and 25th of March 2004 but its already the 25 and im hoping
the new preview version will be released today , please Aprelium
release the new preview version today , 5 more days and it will be
the last day of this month , I think today is a good time to release
the new preview version , let us see it please ! 8) |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Fri Mar 26, 2004 2:54 am Post subject: |
|
|
But if they release the preview, that will just make me want the working version even sooner! I bet it will take another couple of months for the new working version to be released. _________________ Bienvenidos! |
|
Back to top |
 |
 |
Dewbacca -
Joined: 27 Mar 2003 Posts: 8
|
Posted: Wed Mar 31, 2004 4:42 pm Post subject: |
|
|
Let it take as long as it takes. Great Product, and always look forward to STABLE improved releases, and would never rush a craftsman at work!! _________________ Where are we going, and why are we in this handbasket? |
|
Back to top |
 |
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Thu Apr 01, 2004 1:41 am Post subject: |
|
|
And right now, you can go check out the preview version under "Suggestions for the Future." _________________ Bienvenidos! |
|
Back to top |
 |
 |
stuntedheight -
Joined: 08 Nov 2003 Posts: 42
|
Posted: Tue May 11, 2004 2:13 am Post subject: |
|
|
Ive tried all the scripts on this post and they all failed to work. They all gave me a 404 error, but not my custom 404 error. For instance, I need the sub-domain music.200mg.net. It gives the usaual IE 404 error, not mine which means its not even getting to my webserver. So I pinged it and it came back as a non-existant address.
Code: |
C:\Documents and Settings\Crack Whore>ping music.200mg.net
Ping request could not find host music.200mg.net. Please check the name and try
again.
|
My domain redirects to my ip address. I used 123cheapdomains.com to register my domain (Check them out!). Any thoughts? _________________ http://www.200mg.net |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Tue May 11, 2004 2:21 am Post subject: |
|
|
Nice username...
Well if it can't find the server, then your domain isn't even set up. Log in to your account, and check for obvious mistakes. Also, make sure it is properly registered. _________________ Bienvenidos! |
|
Back to top |
 |
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue May 11, 2004 2:42 am Post subject: |
|
|
It can take up to 30 min for a domain
with 123cheapdomains.com , I have an
account with them so wait for the DNS !
Also its possible to take up to 1 day |
|
Back to top |
|
 |
vexir -
Joined: 11 May 2004 Posts: 6
|
Posted: Tue May 11, 2004 11:59 pm Post subject: |
|
|
Ok I am so confused I am not even going to try... can anyone just tell me what to do? I am not a PHP guy or whatever or anything, I used to use apache but someone configured PHP specially to work on that, something which I don't know how to do.
I have all my files in a separate folder than that of the Abyss WS Install folder ok? In it are things like folders:
www, forum, and schooldocs
When I had apache or whatever, something happened to make these subdomains. So, forum.<mydomain>.com would result in displaying the index.php in the "forum" folder. How do I make it so that forum.graphicslash.com will redirect to the contents of the "forum" folder?
Lol for some reason, when I put in forum.<mydomain>.com in the address bar, I see the index page of the www directory.
Of course this brings me to another problem. I have to set the folder "www" as the documents path, just so I can see my main page when i go to www.<mydomain>.com..
Anyone want to tackle my problem? LOL |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed May 12, 2004 12:23 am Post subject: |
|
|
Try ::Virtual Host Creator:: its based
on the same code and its easier.
http://www.multiple-sites.tk
You should understand how to work
this script now since you don't have
to configure the code. Later!
-------------------------------------------------------------------------------------
Note: More Programming Languages
will be added in the near future ! |
|
Back to top |
|
 |
vexir -
Joined: 11 May 2004 Posts: 6
|
Posted: Wed May 12, 2004 2:42 am Post subject: |
|
|
Wus that link for me? |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed May 12, 2004 3:31 am Post subject: |
|
|
Yes it was , now take a look
http://www.multiple-sites.tk
You need the PHP version , thats
what this code here is based on. |
|
Back to top |
|
 |
vexir -
Joined: 11 May 2004 Posts: 6
|
Posted: Wed May 12, 2004 3:40 am Post subject: |
|
|
thats still a little confusing lol, but can you explain wat it means by
"add the domain you want to forward" does that mean the domain i want my site to be, the subdomain, or waht? |
|
Back to top |
|
 |
vexir -
Joined: 11 May 2004 Posts: 6
|
Posted: Wed May 12, 2004 3:47 am Post subject: |
|
|
OK w/e, I put forum.<mydomain>.com in the domain box, and i put /forum in the path box and for the Main Page i put /index.php
it doesnt work.. wat did i do wrong? |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed May 12, 2004 5:28 am Post subject: |
|
|
The path has to exists either inside your htdocs or an aliases /forum has
to be a real web folder , you can't just make up folders and expect them to
redirect , this script works ok , what are you having trouble with ?
Do you know what your doing ?
I can't believe your having problems
with the most easiest to configure script |
|
Back to top |
|
 |
vexir -
Joined: 11 May 2004 Posts: 6
|
Posted: Wed May 12, 2004 5:47 am Post subject: |
|
|
Ok I think I'm having problems getting used to the sort of organizational... things... that Abyss does. What is htdocs? And why do my website files need to be inside that folder!? |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Wed May 12, 2004 6:40 am Post subject: |
|
|
When someone goes to www.yourdomain.com, Abyss Web Server looks up a file called "index.html" as the default page to feed to the user. However, there needs to be a specific directory where this file is stored. There is a directory on your system called /htdocs that is realitive to your domain name.
Still don't understand?
http://www.yourdomain.com = C:\Program Files\Abyss Web Server\htdocs
so therefore:
http://www.yourdomain.com/folder/file.html = C:\Program Files\Abyss Web Server\htdocs\folder\file.html
Your URL represents a location (/htdocs) on your hard drive. Therefore, putting "/forum" as a path (the shorter version of www.yourdomain.com/forum) is really C:\Program Files\Abyss Web Server\htdocs\forum. If there is no "forum" folder inside "htdocs," then www.yordomain.com/forum doesn't exist. HTDOCS is where you keep all your website files.
If you would like to keep /forum in a different location, then you set up "Aliases" in the Abyss console. You can set C:\Fourm to equal /forum on your website.
So instead:
www.yourwebsite.com/forum = C:\Forum
and not
www.yourwebsite.com/forum = C:\Program Files\Abyss Web Server\htdocs\forum
because an alias was added.
You get it now? _________________ Bienvenidos! |
|
Back to top |
 |
 |
vexir -
Joined: 11 May 2004 Posts: 6
|
Posted: Wed May 12, 2004 7:09 am Post subject: |
|
|
Hm I think so... all I basically have to really do is copy all the website files I have currently into the HTDOCs folder correct?
Then I don't have to muddle around with aliases. Then the script should run fine, right? |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed May 12, 2004 6:43 pm Post subject: |
|
|
Exactly but remeber to name the script with
index.php and then rename your original
index file to index2.html and it will run !
Enjoy the script ! |
|
Back to top |
|
 |
graydeth -
Joined: 22 Feb 2004 Posts: 16
|
Posted: Wed Jun 09, 2004 3:44 am Post subject: Multisite creator |
|
|
Ok, here's my problem, I'm sure I just haven't gotten the idea here, but take a look and call me dumb if need be...
here's what I have in index.php
<?php
/*
Bluedog's Multiple Domain PHP Script
This script was created to help Abyss Web Server users so that they could host more than one site using
different domains and so I made it easier to program this script for their domains by creating a easy to use
site creator that can insert new domains instantly after hitting Submit Me!. Enjoy the script!
System Requirements:
1. Abyss Web Server (PHP Installed)
2. Alot of free domains or paid
Now Installation!
Go to your main htdocs folder and rename your index.html to index2.html. At the top of your Internet Explorer
browser , click on Edit than Select All, click on Edit again and this time click on copy. Open up NotePad and
click on edit than paste , save the file as index.php and put that file in your htdocs folder. Your Done!
*/
//get domain entered in browser
if ($_SERVER['HTTP_HOST'] == "www.ParagonCityGuardians.com") {
//forward to appropriate page
header("Location : PCG/Index.html");
exit;
}
//get domain entered in browser
if ($_SERVER['HTTP_HOST'] == "www.michael-alicea.net") {
//forward to appropriate page
header("Location : Poetry/Index.html");
exit;
}
//end duplicating, insert below.
//else show Main Page
else {
header("Location : /index2.html");
exit;
}
?>
Now, first, do i need to put the original site I have hosted through Abyss in this script. Second, do I have the syntax for the locations correct? My directory structure is:
\htdocs = www.michaelsplayground.com files & main area
\htdocs\PCG = www.ParagonCityGuardians.com files
\htdocs\Poetry = www.michael-alicea.net files
Please help with this. Thanks. |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Wed Jun 09, 2004 4:49 am Post subject: |
|
|
You have it set up perfectly. Keep your original website in \htdocs, and just make an index.php file in \htdocs. That should take care of all the rest. _________________ Bienvenidos! |
|
Back to top |
 |
 |
stuntedheight -
Joined: 08 Nov 2003 Posts: 42
|
Posted: Wed Jun 09, 2004 11:55 pm Post subject: |
|
|
Thats the cool part, its not working. Im thinking Ive got something weird in my php.ini file, because Ive never been able to get the referer. Any thoughts? _________________ http://www.200mg.net |
|
Back to top |
|
 |
graydeth -
Joined: 22 Feb 2004 Posts: 16
|
Posted: Thu Jun 10, 2004 2:29 am Post subject: Error 200 |
|
|
I get
Error 200
When I try to go to my pages. Any idea why?
If I type in the path www.michaelsplayground.com/pcg
the page opens....
I'm so lost??? |
|
Back to top |
|
 |
stuntedheight -
Joined: 08 Nov 2003 Posts: 42
|
Posted: Thu Jun 10, 2004 2:41 am Post subject: |
|
|
My best guess is that youve got...
1. A php error (not ending commands; bad santax; ect...)
2. Theres no output in the scripts
Why dont you copy-paste your index page up for better help. _________________ http://www.200mg.net |
|
Back to top |
|
 |
graydeth -
Joined: 22 Feb 2004 Posts: 16
|
Posted: Thu Jun 10, 2004 2:43 am Post subject: Index.php |
|
|
It is just look up a few posts. |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Thu Jun 10, 2004 3:24 am Post subject: |
|
|
Just to try it (shouldn't be necessary, but we can try), turn "Register_globals" to "on" in your php.ini file. _________________ Bienvenidos! |
|
Back to top |
 |
 |
graydeth -
Joined: 22 Feb 2004 Posts: 16
|
Posted: Thu Jun 10, 2004 1:17 pm Post subject: Error 200 |
|
|
It was already set to on. I had removed the index.php file last night, so try it now to see what I am talking about. |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Fri Jun 11, 2004 1:22 am Post subject: |
|
|
Yes, I see it.
Remove the forward slash from "index.html" (the "catch-all" address). _________________ Bienvenidos! |
|
Back to top |
 |
 |
graydeth -
Joined: 22 Feb 2004 Posts: 16
|
Posted: Fri Jun 11, 2004 5:13 pm Post subject: Almost there.... |
|
|
First thanks again for the help...now on to the continuing saga...
I had to add an entry in the Index Files section of Abyss, so now I have:
index.html
index.php
index2.htm
Index.htm
being accepted. What this got me is, both www.michaelsplayground.com and www.paragoncityguardians.com going to the same page, the index page for www.michaelsplayground.com.
Here's what the index.php script looks like:
<?php
/*
Bluedog's Multiple Domain PHP Script
This script was created to help Abyss Web Server users so that they could host more than one site using
different domains and so I made it easier to program this script for their domains by creating a easy to use
site creator that can insert new domains instantly after hitting Submit Me!. Enjoy the script!
System Requirements:
1. Abyss Web Server (PHP Installed)
2. Alot of free domains or paid
Now Installation!
Go to your main htdocs folder and rename your index.html to index2.html. At the top of your Internet Explorer
browser , click on Edit than Select All, click on Edit again and this time click on copy. Open up NotePad and
click on edit than paste , save the file as index.php and put that file in your htdocs folder. Your Done!
*/
//get domain entered in browser
if ($_SERVER['HTTP_HOST'] == "www.paragoncityguardians.com") {
//forward to appropriate page
header("Location : PCG/Index.htm");
exit;
}
//get domain entered in browser
if ($_SERVER['HTTP_HOST'] == "www.michael-alicea.net") {
//forward to appropriate page
header("Location : Poetry/Index.htm");
exit;
}
//end duplicating, insert below.
//else show Main Page
else {
header("Location : index2.htm");
exit;
}
?>
Now if I am understanding it all correctly, I don't need an entry for www.michaelsplayground because thats the default page if it can't match the url coming in. It just seems to me that the index.php file isn't working the way its supposed to. |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Fri Jun 11, 2004 10:48 pm Post subject: |
|
|
Remove "index2.htm" from the list of Index Files. _________________ Bienvenidos! |
|
Back to top |
 |
 |
graydeth -
Joined: 22 Feb 2004 Posts: 16
|
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sat Jun 12, 2004 6:38 am Post subject: |
|
|
Do the other PHP scripts work ? Do you have REDIRECT_STATUS
in the server admin area , we need more info please ? Thank You! |
|
Back to top |
|
 |
graydeth -
Joined: 22 Feb 2004 Posts: 16
|
Posted: Sat Jun 12, 2004 6:51 am Post subject: |
|
|
TRUSTpunk wrote: | Do the other PHP scripts work ? Do you have REDIRECT_STATUS
in the server admin area , we need more info please ? Thank You! |
User CGI Environment Variables
Name Value
REDIRECT_STATUS 200
Yep its there. All the initial stuff from these forums has worked fine. I have the phpBB setup and everything. |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sat Jun 12, 2004 7:00 am Post subject: |
|
|
Maybe you should try the Perl instead
or just keep trying , you will get it !
Try this , after the <?php
insert the following code !
Code: | ini_set ('display_errors', 1); |
What are the errors reported ? |
|
Back to top |
|
 |
graydeth -
Joined: 22 Feb 2004 Posts: 16
|
Posted: Sat Jun 12, 2004 5:15 pm Post subject: |
|
|
TRUSTpunk wrote: | Maybe you should try the Perl instead
or just keep trying , you will get it !
Try this , after the <?php
insert the following code !
Code: | ini_set ('display_errors', 1); |
What are the errors reported ? |
Nothing, just Error 200 still. Is it supposed to post to a log file? |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Sat Jun 12, 2004 10:15 pm Post subject: |
|
|
It is supposed to (obviously) display more exact errors. _________________ Bienvenidos! |
|
Back to top |
 |
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sat Jun 12, 2004 10:17 pm Post subject: |
|
|
All I can say is that , you configured PHP wrong
post an exact screenshot of your configuration
for PHP and then we can decide if it works ! |
|
Back to top |
|
 |
00squeaky -
Joined: 11 May 2004 Posts: 60
|
Posted: Tue Jul 13, 2004 3:08 am Post subject: |
|
|
if you set up a web forwarding domain, you can do this without the script.
Quote: | Nothing, just Error 200 still. Is it supposed to post to a log file? |
all you need to to is put a "hi" after the endo of the php code, then look at the source. _________________ Languages mastered:
HTML,GML,C,PHP,MYSQL (not really a language, but wtf) |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Jul 13, 2004 5:23 am Post subject: |
|
|
00squeaky your not being funny what so ever so stop
trying to make jokes out of Bluedog's PHP script ! |
|
Back to top |
|
 |
sendit2kevin -
Joined: 05 Jun 2004 Posts: 5
|
Posted: Sun Jul 18, 2004 6:41 am Post subject: Response Time |
|
|
Using this script, it seems that my pages take about 6 or 7 seconds before they're sent. That's not too long, but does anyone have any suggestions for speeding it up? Once the first page is delivered, all subsequent pages come through real fast. It's just getting that first page served up.
I'm on a LAN, so I don't think it's DNS or network issue.
Thanks,
Kevin
_______________________
Research and advice on the author's favorite technology topics
http://www.complexdistress.com/cd/index.html
[/url] |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sun Jul 18, 2004 8:03 am Post subject: |
|
|
What script version are you using ?
PHP is the fastest ! |
|
Back to top |
|
 |
sendit2kevin -
Joined: 05 Jun 2004 Posts: 5
|
Posted: Sun Jul 18, 2004 1:44 pm Post subject: |
|
|
PHP version 4.3.8.8 My index.php file is identical in structure to the one at the beginning of this topic. Machine is new and fast. |
|
Back to top |
|
 |
gwmbox -
Joined: 21 Jul 2004 Posts: 3
|
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Wed Jul 21, 2004 9:19 pm Post subject: |
|
|
You could try a redirect in your hosts file, but that's about it. _________________ Bienvenidos! |
|
Back to top |
 |
 |
gwmbox -
Joined: 21 Jul 2004 Posts: 3
|
Posted: Thu Jul 22, 2004 3:17 am Post subject: |
|
|
Thx for the reply - could you give me an example of how to do that please.
Cheers
Greg |
|
Back to top |
|
 |
|