Jump to content
The Uniform Server Community

Admin Virtual Host - Parse error


Recommended Posts

Posted

Hi all!

 

I have installed US 3.3 on a W2k and everything works except the Admin Virtual Host.

 

I did search the forum, but could not find a solution.

 

When I click Admin Virtual Host in apanel I get this error message:

Parse error: parse error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in W:\home\admin\www\vhost.php on line 25

 

The only line I've edited in vhost.php is the path to hosts file.

 

Here is some of the contents of vhost.php :

<?
/*
####################################################
# Name: The Uniform Server Admin Panel 2.0
# Developed By: The Uniform Server Development Team
# Modified Last By: Olajide Olaolorun (empirex) 
# Web: http://www.uniformserver.com
####################################################
*/

// Includes
include "includes/config.inc.php";
include "$apanel_path/includes/lang/".file_get_contents("includes/.lang").".php"; 
include "includes/header.php"; 

// Path to httpd.conf
$httpd_conf_sti = "/usr/local/apache2/conf/httpd.conf";

// Path to hosts file
$hosts_sti = "C:\WINNT\system32\drivers\etc\";

// path to all hosts
$default_path = "/www/";

if(isset($_POST["host_navn"])) {	<-------- Line 25

if(!is_dir($_POST["host_path"])) {
mkdir($_POST["host_path"]);
}

$conf_str = "\n##########VIRTUAL HOST SETUP##########";
$conf_str .= "\n# ". strtoupper($_POST["host_navn"]) ."\n";
$conf_str .= "<VirtualHost *>\n";
$conf_str .= "ServerName ". $_POST["host_navn"] ."\n";
$conf_str .= "DocumentRoot ". $_POST["host_path"] ."\n";

 

Any ideas?

Nanoo Nanoo

NoGood@This Bork

Posted

I think the problem is with the forward and back slash use in addition may require hosts on the end.

 

Hence the line should look like this:

 

 

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

 

 

:rolleyes:

Posted

Problem solved :) it was the wrong slashes ( \ ) that was the culprit. :D

Or should I say : The blind noob at the keyboard, i.e. me... :rolleyes: ;)

 

Thank You so much Ric ! :)

Nanoo Nanoo

NoGood@This Bork

Posted

I have been down that road so may times nice to know we are not the only ones. All the best :rolleyes:

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...
×
×
  • Create New...