Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Hi, can you please provide me with an FTP login and Backlight admin login via email?
It would be very helpful if you could outline all the steps you’ve taken during the upgrade.
I've updated documentation for getting clean URLs going on Nginx: http://backlight.theturninggate.net/doc … web_server
This should work across the board, both through the main site and the Backlight admin.
I
4) When I started self hosting a few years ago Apache use had been in decline for a while and Nginx usage had been growing. Currently Nginx is the most used web server on the net according to Netcraft. https://news.netcraft.com/archives/2019/
Netcraft ranking are a moot point for our products. Nginx is not at all common on shared hosts, which many if not most of our customers are using. One of the main reasons behind that is the reason we're here in this thread: lack of .htaccess support, and no way of getting rewrites going without being the web server admin.
It's fixed in our latest version that's under testing.
Hi Bernard, we're working on Backlight updates. I'll look to put a fix in for this.
Any reason you're not using Apache?
Can you share details on your server setup? I'm assuming that you're running Nginx behind a proxy of some sort? The code that had a bug in it yesterday is using logic that doesn't make sense to me -- it detects that the outward-facing URL does not include a port, and then adds the port of the backend web server to any URLs. So if you were visiting a site on a URL like this:
http://yoursite.com
That in turn proxied to Nginx on something like this:
http://127.0.0.1:8888
The web site would end up using URLs like this:
http://yoursite.com:8888
Which is incorrect. The logic should be the other way around: if the back-end web server indicates that it's running on a non-standard port, to omit that port from any URLs sent back to the browser.
That's great to hear. Have you by chance followed the BL1 recommendation of forcing clean URLs? I haven't tested it, but I doubt that it would work, since the Backlight admin uses a more advanced URL scheme that would break without additional rules in the Nginx config. The work done on this to date is around removing the need for mod-rewrite rather than providing full support of clean URLs on servers that do not support mod-rewrite or have it enabled.
Something important for you to note.
Without mod-rewrite support, you'll need to add lines into your Nginx config to prevent access to the data files and digital purchases, if you're using those with the cart. To do that, see the Wiki documentation for Nginx, on Backlight 1:
http://backlight.theturninggate.net/doc … web_server
In particular, your server config should have these two entries:
# protect against direct downloads of data files
location /backlight/data/ {
return 404;
}
# protect against direct downloads of digital purchases
rewrite ^(.*)/(.*)/photos-for-purchase/* / last;
Ignore further URL-related entries in that document for now.
I can see the problem. Can you try doing the following and let me know if it solves it:
Edit the file on your server backlight/modules/module-framework/helpers/URLHelper.php and change line 220 from this:
if (!isset($_SERVER['HTTP_HOST']) || preg_match('/'.$_SERVER['SERVER_PORT'].'/'.$_SERVER['HTTP_HOST'])) {
to this:
if (!isset($_SERVER['HTTP_HOST']) || preg_match('/'.$_SERVER['SERVER_PORT'].'/', $_SERVER['HTTP_HOST'])) {
The only change is replacing the last period with a comma and space.
Further again, try visiting /backlight/ on your server. It may just be that the 'continue' link doesn't work.
Further to the above, if possible can you provide me with FTP access. This is in case I'm not able to reproduce it on my end.
What should I do?
Thanks for testing it. Wait for me to fix it. I'll look into this tonight.
Hi Michael, Backlight does check for PHP dependencies on every page load (perhaps overkill, but the overhead is very low) and report with an appropriate error message if the dependencies aren't met. The checks performed cover the PHP version (at least 5.4), database support and XML support. We'll add items to the check over time if they are features that we can look for. There are other fallback mechanism in the code when certain functionality isn't provided, such as when the latest password encryption function isn't available or multibyte characters aren't supported.
What we can't check for is issues in configuration, such as the mail server trying to write to a location that can't be written to An ongoing issue that users face is hosts moving the goal posts. A site may work perfectly well but then break over time due to hosts upgrading PHP versions without notice, and changing the supported feature set, or breaking configuration in the process. We do what we can.
Hi Perry, can you provide a link where we can see that error?
1. A combination of Javascript in PHPlugins should be able to achieve this.
2. Backlight 2 should provide the same or similar metadata options than CE4, and as you've suggested, PHPlugins is the way to go. This is the supported approach to customising functionality. There is no such thing as a free linch, so your options are to put a bit of effort to find the solution (with our help), or get yourself a bespoke solution.
The file phplugins-pangolin-sample.php includes code examples for pulling out various data under the commented-out album_top function.
Can you provide an example of a CE4 gallery or single image page? I can advise on what you'd put in a PHPlugins file.
Hi Michael, I meant to follow up on your post. I don't believe there is such a thing as a standard PHP environment. There are two aspects in which environments differ: feature support and configuration.
Upon seeing your post I downloaded the full PHP source code and compiled it from scratch to see what features vanilla, unadulterated PHP provides. The vast majority of functionality is compiled in by default, but some functionality that I would consider quite generic, is not compiled in unless explicitly configured. That includes features such as multibyte string and exif support. The list of optional features that ship with the PHP source code is not extensive, and since it comes from the PHP project itself so should be of pretty dependable quality, I can't see why hosts wouldn't compile in most, if not all, of them.
To see what has been built into the version of PHP on your server, click on the View PHP Info button on the Backlight landing page and look for the --enable flags in the Configure Command section.
Configuration is another kettle of fish. There are a myriad of settings available to system administrators through the php.ini file and huge scope for them to mess something up. PHP is unique in that the language features themselves are also configurable through the php.ini file.
All I can suggest is that you use a well-reputed host, and if you encounter configuration issues, that you hound the technical support to fix it. We have jumped through hoops over the years to make our code as portable across hosts as possible, but there are some misconfigurations that we can not code around. A host configuring the PHP mail log to a location that is not writable is something beyond our control. It is so far out of our control that even if we stripped out all emailing functionality from our code, the error would still exist.
I realise it's frustrating, but that's the state of the PHP world, which unfortunately is the only option we have for ubiquitous back-end language support. If I were deploying PHP code for a business (which I do for my day job), I would avoid shared hosts altogether. The only dependable way of running PHP in a state that doesn't break over time is to manage your own server. I'd love to offer a hosted solution for TTG, but we do not have the resources to do so, and it also goes against the grain of self-hosted sites that is the target of our software.
I guess it is also a setting to be done by the provider.
It's very likely an issue with the location for temporary files (the initial place that a server puts uploads before Backlight moves them to the right location). This will be something for your host to fix.
Can you provide me with a Backlight admin login via email so that I can see where the path is set, if it's set.
I can see it, thanks. Is this an example: Clicking from this page to "Afrique Sud 1": http://www.bleverd-photo.net/galleries/ … single.php
Can you provide links?
It's not advisable to run early betas such as Catalina on work machines.
There has been progress and we have a version that does not need Apache URL rewriting in our testing stream.
It would be helpful if you could use this version and provide any feedback on issues.
To use it:
* After uploading the extracted files from the installer, copy or rename the file backlight/env.php.skel to backlight/env.php
* Edit the file and change the value for STREAM from "release" to "testing"
* Continue setting up Backlight as usual
You should see a red "testing" icon in the footer of the Backlight admin page.
The only other thing to change is the format of the API URL set in Lightroom's Publisher. This needs to be in the format of
http://yoursite.com/backlight/?m=publisher
That format likely won't change, because the Publisher can't determine whether the server is using Backlight 1 or 2 and the new format won't work for Backlight 1.
Please give it a try and let me know how it goes. There are no known issues other than in handling search forms between Wordpress and Backlight. Once the changes are ready to go into the release stream, changing from testing is a matter of undoing the change to env.php and clicking 'reinstall all' in the Backlight Modules page.
Hi Perry, I've found the problem and fixed it on your site. The client info for editing clients was being drawn from the old clients table from the Client Response database. This needed updating to instead draw the client details from the clients table of the Admin database.
The location changed with the upgrade from BL1 to BL2, but this query had been missed.
I'll release an update to CR to address this in coming days.
Something has changed on your server.
See if the 'logs' directory exists in your FTP account (the location specified in the error: /srv/home/bonapicturanl/logs/ ). If it doesn't, create it. Make sure that it's writeable by PHP (the same permissions as the backlight/data/ directory should do).
Note that Backlight itself does not try to write to that directory. The mail server that your host has configured is trying to.
Hi Scott, please see my reply to your email. This should all be good now.