Forum
Perch on a Windows server
I have a Perch site functioning well locally on MAMP and on a staging server but have a problem on the clients Windows hosting. The database is created and imported OK(ish) and I can log in to Perch but the personalising images for the Perch interface are not found. They are visible in the perch/resources
folder on the server but when I work in Perch there I'm getting messages that the Resources folder is not writeable.
If I get info on the Resources folder via an ftp app I can attempt to make the folder writeable but then get a failure message "530 Command SITE CHMOD is only available for Linux/Unix". I should contact the hosting provider I know but their tech support is terrible so I'm wondering if anyone here has a quick answer.
I only uploaded one Perch page and found that it didn't load it's content initially and when I looked in the Perch interface the region was duplicated - one set showing as NEW but with no content, and the other set showing the existing content but not displaying it on the live page. When I edited into the new regions the content did appear on the page.
You can't use CHMOD on a Windows server. You need to contact your host.
You should also check that the Compatibility test works on this server.
Thanks. I ran the perchtest on the client's server using the same names and user etc as in the
perch/config.php
file and all shown as OK. Have deleted the perchtest folder.I'm more used to using cPanel so I'm not at all familiar with the host's Windows control panel, but I did find that one can change permissions. Have given read/write permissions to perch/resources folders and was shown that result is correct. I log back in to Perch on the server but the customising images still don't appear though I no longer get the error message (that the Resources folder is not writeable) when editing there.
Will Perch eventually pick up the images or must I reload everything onto the server?
Do the images display within the Assets app?
It may be that Perch has flagged them as missing if it couldn't read the files.
No, the images don't show in Assets.
But nor do they show in Assets on my local mamp setup or on the staging server, which do draw correctly the personalised Perch login and side panel with client logo.
What do you mean by personalised here?
Have tried deleting, from the client's Windows server, Perch and the web page that uses it. Have reuploaded all, deleted the database and set up a new one and reimported the tables from my local version. Went to permissions in the Windows server control panel and made sure that the
perch/resources
folder is writeable, but the same problem persists.Just to recap. For the moment there is only one page using Perch. The most serious problem is that initially the browser shows the page without the Perch content. I can go to "domainname/perch and log in normally.
In the Perch panel the "Listing pages" list shows the page twice in the pages list. Then going in to Edit the first instance in the page list it shows the regions correctly and their content is in there, but the page on the server doesn't pick up that content.
Going in to Edit on the second instance of the page in the Listing, the Regions are there but are shown as "New" and are empty of content. If I then edit those regions and copy in the content the web page does then pick up that content and display it correctly.
Another problem, though less serious, is that the Perch interface doesn't pick up the client logo images that personalise the Login page and the side panel of the editing ui.
I've run the perchtest on the server and it completes correctly, showing no errors. What can be going on here?
If you go into the Page Options for the two pages, what are their paths?
Thanks v much Drew, your last question led me to understand what was going on. Because the site lives in a folder "clientfoldername" within my MAMP "htdocs" folder, and likewise on the staging server, perch paths created in those environments all begin with clientfoldername/ whereas on the client's server that level doesn't exist.
So if I delete 'clientfoldername/' from the beginning of the page path in Page Options (BEFORE opening the page in the browser) then the page content displays correctly on the client server, and also the page list in the perch editing panel is correct, without 'New' duplicates.
Also, because of the change of path between local and final environment, Perch is not finding the client logo images for the Login page or the side panel of the Perch admin area.
Is there a way to automatically get the correct paths for each different environment without having to edit all the page paths on the final server?
You should avoid developing in a subfolder, it's just going to cause you issues. Your dev environment should mirror your live environment.
Look into setting up VirtualHosts in MAMP. That way you can have root in the correct place for all of your sites.
OK, will do. For Mac would it mean using the paid version MAMP Pro instead of the free version? (It's not a problem, but could save a lot of time if I know beforehand)
Even if one sets up a virtual host locally, I don't see how to avoid using a subfolder on the staging server?
You can create your vhosts in MAMP but you'll need to edit the configuration files yourself. Mamp Pro has tools for that.
Again, you need to use a virtualhost on your server for staging - this is why we allow you to enter a different staging domain in your account. Paths and URL structure is a fundamental part of the web, if you change all your paths on going live you are going to have problems. Dev, Staging and Live should always follow the same URL structure.
OK, understood, thanks. Installing a virtual host on the staging server sounds a little daunting but I'll give it a whirl.