Jump to content
The Uniform Server Community

3.4 Sluger Error


DJCheezy
 Share

Recommended Posts

Tried to add a vitural host in the Admin panel Using windows 2003 server BTW

I got this error.

 

Warning: Cannot modify header information - headers already sent by (output started at W:\home\admin\www\includes\header.php:19) in W:\home\admin\www\vhost.php on line 64

My Website

http://www.djcheezy.com/

 

My Live Radio/Shoutcast Stream (Only active when I have the Shuotcast Server Online)

http://www.djcheezy.com:8000/

Link to comment
Share on other sites

I apologise for not being active on the forum but I am bogged down generating material for UniCenter I do intend to publish this weekend honest! :(

 

This may help anyone wishing to use Virtual hosting they are notes at the end of a section I am writing but are pertinent to this post.

 

Note 1: Strange as this may seem the program does not actually enable virtual hosting you need to edit the configuration file:

 

1. Open file: httpd.conf

2. Located in folder: *\Uniform Server\udrive\usr\local\apache2\conf

3. Towards the end of the file locate the line: #NameVirtualHost *

4. Uncomment the line to look like this: NameVirtualHost *

5. Save file and restart server

 

Note 2:Not running as a service.

 

The above explains how Admin Virtual Host should work however I believe it was tested with Apache installed as a service, which allows a programmer to transparently restart the server. This forces Apache to re-read the configuration file and update apanel; hence the configured virtual host link list will work. This occurs every time a new host is added. However the default installation of UniServer is not installed as a service and the transparent re-start does not function. The script inherently works so it’s not a major problem a side effect is that a new header is created producing this error message.

 

Warning: Cannot modify header information - headers already sent by (output started at W:\home\admin\www\includes\header.php:19) in W:\home\admin\www\vhost.php on line 64

 

An interim fix is to comment out the offending lines a consequence of this is to loose the real time update feature (virtual hosts become immediately available) all that means is you must restart the sever to activate your newly added virtual hosts.

 

To apply this fix open file: vhost.php

Located in folder: *\Uniform Server\udrive\home\admin\www

Locate these lines (starting at line 59)

 

// Restarts apache. Only works if safe_mode is Off in php.ini

$exe_sti = explode("/usr/local/apache2/conf/httpd.conf", $httpd_conf_sti);

$true_exesti = str_replace("/", "\\", $exe_sti[0]);

exec($true_exesti ."Apache.exe -k restart");

 

header("Location:". $_SERVER["PHP_SELF"] ."");

exit();

 

Comment them out using // make sure the closing curly brace is not commented out. It will look like this:

 

// Restarts apache. Only works if safe_mode is Off in php.ini

//$exe_sti = explode("/usr/local/apache2/conf/httpd.conf", $httpd_conf_sti);

//$true_exesti = str_replace("/", "\\", $exe_sti[0]);

//exec($true_exesti ."Apache.exe -k restart");

 

//header("Location:". $_SERVER["PHP_SELF"] ."");

//exit();

}

 

Save the file and just remember to restart the server every time you add a new host.

 

Note 3: Not transportable

 

When you have created your virtual hosts view your sites by typing the real web-site name into you browser address bar for example www.mpgautos.com will serve pages from the site1 folder. If you copy UniServer and your sites to a memory stick do not be surprised if they no longer work when run on a different machine. You need to copy the Windows hosts entries shown above to the machine you are running on however if this is incontinent then this link may help Virtual Hosting & PAC.

 

Hope that helps someone :D

Sorry for the long post :D

Link to comment
Share on other sites

  • 2 weeks later...

:unsure: The problem is that vhost is sending a header.php before the http redirection, also I have my windows on drive E so this script doesn't work right, also you need to modify the http.conf uncommenting the virstual host part AND ALSO adding a default one, here are my fixes:

 

in \udrive\home\admin\www\vhost.php:

change line 21:

$hosts_sti = "C:/WINDOWS/system32/drivers/etc/hosts";

to this:

$hosts_sti = $_ENV["windir"]."/system32/drivers/etc/hosts";

move line 14:

include "includes/header.php";

to line after 66 like this:

exit();

}

include "includes/header.php";

 

in \udrive\usr\local\apache2\conf\httpd.conf:

change line 954:

#NameVirtualHost *

for this 3 lines:

NameVirtualHost *

<VirtualHost localhost:80>

</VirtualHost>

Now, Admin Virtual Host works OK and also my host file gets updated correctly.

 

I also created a bat file that restarts the server, the pause in the middle is for to give time to the server to shutdown, then restart it.

warning! it uses drive W and mysql by default. Here is the code:

@echo off
udrive\home\admin\program\pskill.exe Apache.exe c
pause
Server_Start.bat W mysql

 

All the changes are on the attached zip file

 

--

uniserver3_4_fix_virtualhosts.zip

Link to comment
Share on other sites

lol confused (Still using 3.3 since it is more stable at the moment)

I will use 3.4 when an update and all glitches are fixed.

 

I don't like having to change the root password and crap like in 3.4

My Website

http://www.djcheezy.com/

 

My Live Radio/Shoutcast Stream (Only active when I have the Shuotcast Server Online)

http://www.djcheezy.com:8000/

Link to comment
Share on other sites

Are you using 3.3 as a production server if so please make sure you have changed the root password for your MySQL server? Otherwise kiss you server goodbye any one online has access they know the default name and password.

 

However when used, as development servers both 3.3 and 3.4 are secure, no need to change any of the defaults.

Link to comment
Share on other sites

The easiest way to protect your MySQL is to change the root password, here is a step-by-step way to ensure the password is changed with no problems. This is using a newly downloaded copy of Uniform Server.

 

1. Start server

2. Start MySQL

3. Browse to phpMyAdmin

4. Click on privleges

5. Edit the user root

6. Find where it asks to change the password

7. Click radio box use password, type in your new password

8. Go to the server Admin Panel

9. Click on MySQL Server Configuration

10. Type in the same password you typed in step 7

11. Stop the server using Stop.bat

12. Close your browser

 

You have to close your browser because phpMyAdmin stores a cookie of your session when you last logged in. Closing your browser removes this cookie allowing you to log in without the #1045 error(I think that is the number).

 

For the Virtual Host problem PabloVeliz had good instructions on fixing that.

IPB Image

 

Link to comment
Share on other sites

The easiest way to protect your MySQL is to change the root password, here is a step-by-step way to ensure the password is changed with no problems. This is using a newly downloaded copy of Uniform Server.

 

1. Start server

2. Start MySQL

3. Browse to phpMyAdmin

4. Click on privleges

5. Edit the user root

6. Find where it asks to change the password

7. Click radio box use password, type in your new password

8. Go to the server Admin Panel

9. Click on MySQL Server Configuration

10. Type in the same password you typed in step 7

11. Stop the server using Stop.bat

12. Close your browser

 

You have to close your browser because phpMyAdmin stores a cookie of your session when you last logged . Closing your browser removes this cookie allowing you to log in without the #1045 error(I think that is the number).

 

For the Virtual Host problem PabloVeliz had good instructions on fixing that.

 

Ace I like that, :) here are some pretty pics to as well! :unsure:

 

http://center.uniformserver.com/new_users/...#mysql_security

 

I do apologise but could not resist it, seriously do not be complacent with security. :(

Link to comment
Share on other sites

:unsure:

 

Nice one, and please DJCheezy, i think i would better for you to have 3.4. Its much better even though it has some little problems, but they are not hard core nor do they deal with security. They are just minor bugs that can even be fixed by you :(

Link to comment
Share on other sites

I give up. I am just gonna wait for a stable update release.

Cause 3.4 may be fast. But I would rather have a working one right now lol.

My Website

http://www.djcheezy.com/

 

My Live Radio/Shoutcast Stream (Only active when I have the Shuotcast Server Online)

http://www.djcheezy.com:8000/

Link to comment
Share on other sites

Why doen't you follow the instructions we gave you on here? Its as easy as ABC. Problems happen when admins are lazy... and this is an example... lol :unsure:

Link to comment
Share on other sites

lol I did it wast not much help. Cause the MYSQL still has errors.

Anyway Back to using 3.3 changed my passwords to secure the site etc works fine on 3.3 but 3.4 still screwy a bit XD

My Website

http://www.djcheezy.com/

 

My Live Radio/Shoutcast Stream (Only active when I have the Shuotcast Server Online)

http://www.djcheezy.com:8000/

Link to comment
Share on other sites

Ya with 3.4 by default you can't drop tables, that was just a mistake that no one fixed before this release. You can find a quick fix here http://forum.uniformserver.com/index.php?s...entry5154

 

I give up. I am just gonna wait for a stable update release.

Cause 3.4 may be fast. But I would rather have a working one right now lol.

Version 3.4 works perfectly, it's just a little temperamental; for me I was quite ticked off at the server not working properly and I couldn't find any fixes here so I just went looking for them myself. Once I found out how to properly change the MySQL password and add drop privilege everything worked fine.

 

What I did is download a new copy of US secure it and add drop to root then I re-zipped it so all I needed to do was unzip a copy of it if something went wrong with the copy I was using. Then I wouldn't have a need to re-secure it if something went wrong.

IPB Image

 

Link to comment
Share on other sites

DJCheezy, you can use ZPanel or nay control panel on the server, but we prefer ours... :-) Whats in a control panel thats not in ours... and you can always use ZPanel if you want, but you gotta configure it yourself... You can learn more in the process of setting it up.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...