Uni Server set-up

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

MarkHoward
Forum Newbie
Posts: 21
Joined: Sun Nov 22, 2009 7:15 pm

Uni Server set-up

Post by MarkHoward »

Newbie question.
I have a website working fine on a webserver. http://www.nzmotorhome.co.nz
It comprises two static webpages plus a phpBB3 forum.

I want to get this working on my local machine so the I can implement some updates and test them before loading the changed files back up to the webserver.

I have installed a WAMP system called UniServer Zero and tested it with the supplied test files. They work fine.

I then copied the entire contents of my webserver's http_html folder the UniServer's www folder.

It doesn't work but my gut feeling is that there is one critical thing that I have got wrong and, if I fix that, all will be well: after all it works on the webserver.

What is not right?
On the two static (HTML) pages,
- none of the graphics show
- none of the CSS code is rendered
- the div controlling a right-hand side panel is not rendered
- some links work, others do not.

On the initial forum (php) page, I just get a white page with a bunch of unformatted code on it.

Can anyone suggest how I might start to track down where my problem is?

All suggestions will be rigorously followed up, but remember that all this is working fine on the web - so I don't want to start making wholesale changes to the code: the problem is most likely something simple in the set-up.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Uni Server set-up

Post by requinix »

Did you fix it? The site looks fine to me.
MarkHoward
Forum Newbie
Posts: 21
Joined: Sun Nov 22, 2009 7:15 pm

Re: Uni Server set-up

Post by MarkHoward »

Ha! Yes it DOES work on the web.
I want to get it working on my local machine.
That is where my problem lies. It's all detailed in my original post.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Uni Server set-up

Post by requinix »

Oh, I thought you were saying you copied from the UniServer to the online server. Had me thinking backwards.

Are you running this from the root of the localhost URL? As in http://localhost (and http://localhost/NZMotorhomeForum/) and not http://localhost/some_directory/ (and http://localhost/some_directory/NZMotorhomeForum/). Because some (not all) of the various links and such will only work if you have everything starting from the root.

The white page with code sounds like you don't have PHP set up. You sure you got that right?
MarkHoward
Forum Newbie
Posts: 21
Joined: Sun Nov 22, 2009 7:15 pm

Re: Uni Server set-up

Post by MarkHoward »

OK, thanks.

On my local computer the Forum/UniServerZ/www/ folder contains an exact copy of my online server's home/public_html folder.

PHP does seem to be set up because the UniServer splash screen renders OK from
http://localhost:81/us_splash/index.php

Do you know if there is a way to set a debug option (or something) so I can see where the links on the HTML pages (initially) are trying to link to? (mainly to give us some clues as to what settings may be wrong)
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Uni Server set-up

Post by requinix »

So if you go to http://localhost:81/NZMotorhomeForum/ you see the right text and actual content, but the layout and images and CSS and whatnot are messed up? When you click one of the broken links, what URL does it take you to?
MarkHoward wrote:Do you know if there is a way to set a debug option (or something) so I can see where the links on the HTML pages (initially) are trying to link to? (mainly to give us some clues as to what settings may be wrong)
There's no debugging thing for that - you just use your browser. For example, you can hover over a link to see where it goes (eg, Chrome shows a little tooltip at the bottom-left corner of the window). The browser's error console may also help you see assorted 404s, like if the URL to a CSS file or image is wrong then you may get an error about it (Chrome does that).
MarkHoward
Forum Newbie
Posts: 21
Joined: Sun Nov 22, 2009 7:15 pm

Re: Uni Server set-up

Post by MarkHoward »

Ahh! Progress, Thank you.

If I click on "www" in the UniServer dashboard, it takes me to http://localhost/NZMotorhome/index.html and I get a blank screen.
If I insert ":81" so that we have http://localhost:81/NZMotorhome/index.html then it displays the home screen with everything rendered correctly.
If I click the link to the other HTML page "Links.html", that also is loaded and rendered correctly.
That is much better than I had before and it just seems that UniServer does not completely implement the change that I made to it's default use of port 80 - changing it to 81.

However, if I click the link, on either of these two pages, to the PHP forum page "localhost:81/NZMotorhomeForum/, then I get a message saying
"Forbidden

You don't have permission to access /NZMotorhomeForum/ on this server."

Do you have any idea where I should set this access up?
I appreciate your help :-)
MarkHoward
Forum Newbie
Posts: 21
Joined: Sun Nov 22, 2009 7:15 pm

Re: Uni Server set-up

Post by MarkHoward »

After a Google search I tried changing httpd.conf from having

Code: Select all

<Directory />
    AllowOverride none
    Require all denied
    # Allow from all 
</Directory>
to read

Code: Select all

<Directory />
    AllowOverride none
    # Require all denied
    Allow from all 
</Directory>
No difference.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Uni Server set-up

Post by requinix »

I assume you have files for NZMotorhomeForum? The phpBB files?
MarkHoward
Forum Newbie
Posts: 21
Joined: Sun Nov 22, 2009 7:15 pm

Re: Uni Server set-up

Post by MarkHoward »

Yep. They're all there.
MarkHoward
Forum Newbie
Posts: 21
Joined: Sun Nov 22, 2009 7:15 pm

Re: Uni Server set-up

Post by MarkHoward »

This is the final line of the Apache error log.
[rewrite:error] [pid 5088:tid 1948] [client ::1:49263] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : D:/Forum/UniServerZ/www/NZMotorhomeForum/, referer: http://localhost:81/NZMotorhome/index.html
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Uni Server set-up

Post by requinix »

I've never seen that before...

Add an

Code: Select all

Options +FollowSymLinks
to your site configuration (preferably not in the .htaccess).
MarkHoward
Forum Newbie
Posts: 21
Joined: Sun Nov 22, 2009 7:15 pm

Re: Uni Server set-up

Post by MarkHoward »

Thanks for your help, requinix.

That section of httpd.conf now reads

Code: Select all

    #Options Indexes FollowSymLinks
    Options Indexes Includes
	Options +FollowSymLinks
When I click on the Forum link (localhost:81/NZMotorhomeForum) instead of getting the "Forbidden" message the browser goes into "Connecting" mode for exactly 1 minute and then comes up with a blank screen.

But I feel we're making progress and I appreciate your help.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Uni Server set-up

Post by requinix »

Do you have the right database information for the forum?
MarkHoward
Forum Newbie
Posts: 21
Joined: Sun Nov 22, 2009 7:15 pm

Re: Uni Server set-up

Post by MarkHoward »

Ahh!
I had changed the config.php to read $dbhost = 'localhost:81' (instead of just 'localhost') in case that was the problem.
Then forgot to change it back :oops:

Now we get a little further:
I get a MySQL error saying

General Error
SQL ERROR [ mysqli ]

No connection could be made because the target machine actively refused it. [2002]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
Post Reply