Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Admin Virtual Host - Parse error

Featured Replies

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

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:

  • Author

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

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...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.