DJCheezy Posted June 3, 2007 Report Share Posted June 3, 2007 Tried to add a vitural host in the Admin panel Using windows 2003 server BTWI 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 Quote 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 More sharing options...
olajideolaolorun Posted June 3, 2007 Report Share Posted June 3, 2007 You can post this into our Bug System at SourceForge. Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
Ric Posted June 5, 2007 Report Share Posted June 5, 2007 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.phpLocated in folder: *\Uniform Server\udrive\home\admin\wwwLocate 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 Sorry for the long post Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted June 5, 2007 Report Share Posted June 5, 2007 I still have to solve that problem of what seems to be causing it.. Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
PabloVeliz Posted June 15, 2007 Report Share Posted June 15, 2007 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 Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted June 16, 2007 Report Share Posted June 16, 2007 Thanks a lot PabloVeliz!!!! Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
DJCheezy Posted June 16, 2007 Author Report Share Posted June 16, 2007 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 Quote 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 More sharing options...
Ric Posted June 16, 2007 Report Share Posted June 16, 2007 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. Quote Link to comment Share on other sites More sharing options...
DJCheezy Posted June 16, 2007 Author Report Share Posted June 16, 2007 I am using it to host my website.Is there a password protect script that I can password protect my mysql directory's etc. ? Quote 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 More sharing options...
metaltailz Posted June 16, 2007 Report Share Posted June 16, 2007 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 server2. Start MySQL3. Browse to phpMyAdmin4. Click on privleges5. Edit the user root6. Find where it asks to change the password7. Click radio box use password, type in your new password8. Go to the server Admin Panel9. Click on MySQL Server Configuration10. Type in the same password you typed in step 711. Stop the server using Stop.bat12. 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. Quote Link to comment Share on other sites More sharing options...
Ric Posted June 16, 2007 Report Share Posted June 16, 2007 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 server2. Start MySQL3. Browse to phpMyAdmin4. Click on privleges5. Edit the user root6. Find where it asks to change the password7. Click radio box use password, type in your new password8. Go to the server Admin Panel9. Click on MySQL Server Configuration10. Type in the same password you typed in step 711. Stop the server using Stop.bat12. 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! http://center.uniformserver.com/new_users/...#mysql_security I do apologise but could not resist it, seriously do not be complacent with security. Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted June 16, 2007 Report Share Posted June 16, 2007 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 Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
DJCheezy Posted June 17, 2007 Author Report Share Posted June 17, 2007 Alright I will update to 3.4 then gotta backup my website stuff first lol. Quote 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 More sharing options...
DJCheezy Posted June 17, 2007 Author Report Share Posted June 17, 2007 It wont let me drop tables O_o Wtf lol or databases... Quote 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 More sharing options...
DJCheezy Posted June 17, 2007 Author Report Share Posted June 17, 2007 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. Quote 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 More sharing options...
olajideolaolorun Posted June 17, 2007 Report Share Posted June 17, 2007 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 Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
DJCheezy Posted June 17, 2007 Author Report Share Posted June 17, 2007 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 Quote 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 More sharing options...
olajideolaolorun Posted June 17, 2007 Report Share Posted June 17, 2007 Ok Ok... Next version will be out soon, dont worry Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
DJCheezy Posted June 17, 2007 Author Report Share Posted June 17, 2007 Sweet cant wait. You should also look into seeing what control panel would be best for uniserver ^^ Quote 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 More sharing options...
metaltailz Posted June 17, 2007 Report Share Posted June 17, 2007 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. Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted June 17, 2007 Report Share Posted June 17, 2007 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. Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.