Moderator: General Moderators
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.
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?
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
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 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)
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
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
[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
That section of httpd.conf now reads
Code: Select all
#Options Indexes FollowSymLinks Options Indexes Includes Options +FollowSymLinks
But I feel we're making progress and I appreciate your help.
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
Now we get a little further:
I get a MySQL error saying
SQL ERROR [ mysqli ]
No connection could be made because the target machine actively refused it. 
An sql error occurred while fetching this page. Please contact an administrator if this problem persists.