PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Jun 23, 2017 12:08 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Uni Server set-up
PostPosted: Mon Sep 07, 2015 10:58 pm 
Offline
Forum Newbie

Joined: Sun Nov 22, 2009 8:15 pm
Posts: 21
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.


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Tue Sep 08, 2015 2:06 am 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6438
Location: WA, USA
Did you fix it? The site looks fine to me.


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Tue Sep 08, 2015 3:40 am 
Offline
Forum Newbie

Joined: Sun Nov 22, 2009 8:15 pm
Posts: 21
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.


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Tue Sep 08, 2015 4:50 am 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6438
Location: WA, USA
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?


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Tue Sep 08, 2015 3:32 pm 
Offline
Forum Newbie

Joined: Sun Nov 22, 2009 8:15 pm
Posts: 21
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)


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Tue Sep 08, 2015 7:55 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6438
Location: WA, USA
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).


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Tue Sep 08, 2015 9:14 pm 
Offline
Forum Newbie

Joined: Sun Nov 22, 2009 8:15 pm
Posts: 21
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 :-)


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Tue Sep 08, 2015 9:32 pm 
Offline
Forum Newbie

Joined: Sun Nov 22, 2009 8:15 pm
Posts: 21
After a Google search I tried changing httpd.conf from having
Syntax: [ Download ] [ Hide ]
<Directory />
    AllowOverride none
    Require all denied
    # Allow from all
</Directory>
 

to read
Syntax: [ Download ] [ Hide ]
<Directory />
    AllowOverride none
    # Require all denied
   Allow from all
</Directory>
 
No difference.


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Tue Sep 08, 2015 11:51 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6438
Location: WA, USA
I assume you have files for NZMotorhomeForum? The phpBB files?


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Tue Sep 08, 2015 11:56 pm 
Offline
Forum Newbie

Joined: Sun Nov 22, 2009 8:15 pm
Posts: 21
Yep. They're all there.


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Wed Sep 09, 2015 4:20 am 
Offline
Forum Newbie

Joined: Sun Nov 22, 2009 8:15 pm
Posts: 21
This is the final line of the Apache error log.

Quote:
[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


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Wed Sep 09, 2015 12:33 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6438
Location: WA, USA
I've never seen that before...

Add an
Code:
Options +FollowSymLinks

to your site configuration (preferably not in the .htaccess).


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Wed Sep 09, 2015 3:53 pm 
Offline
Forum Newbie

Joined: Sun Nov 22, 2009 8:15 pm
Posts: 21
Thanks for your help, requinix.

That section of httpd.conf now reads
Syntax: [ Download ] [ Hide ]
    #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.


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Wed Sep 09, 2015 4:22 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6438
Location: WA, USA
Do you have the right database information for the forum?


Top
 Profile  
 
 Post subject: Re: Uni Server set-up
PostPosted: Wed Sep 09, 2015 4:35 pm 
Offline
Forum Newbie

Joined: Sun Nov 22, 2009 8:15 pm
Posts: 21
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
Quote:

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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group