Community @ The Turning Gate

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.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2018-09-12 21:08:26

Pfredd
Member
Registered: 2014-04-16
Posts: 189

Missing PHP modules?

After upgrading to Backligfht 2, I get the following error message when I go to my site {pfredd.com}:

Unableto find the SQLite module. Backlight 2 requires the PDO, SQLite and XML modules. Make sure that these modules are installed and enabled.

If I have Backlight list the PHP modules, it appears that the "missing" modules are actually installed:

Installed PHP Modules:
Core
date
ereg
libxml
openssl
pcre
sqlite3
zlib
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
hash
fileinfo
filter
ftp
gd
gettext
SPL
iconv
session
intl
json
mbstring
mcrypt
standard
mysql
mysqli
odbc
mysqlnd
PDO
pdo_dblib
PDO_ODBC
pgsql
Phar
posix
pspell
Reflection
imap
SimpleXML
snmp
soap
sockets
exif
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
cgi-fcgi
imagick
pdo_mysql
pdo_sqlite
pdo_pgsql
magickwand
mailparse
OAuth
oci8
uploadprogress
mhash
ionCube Loader
SourceGuardian
Zend Guard Loader

If I go directly to an Allbum or Almum Set page, it appears to work fine.

I am running PHP 5.6

Offline

#2 2018-09-12 21:19:58

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Missing PHP modules?

The only thing I can think of is that your site has different PHP versions configured via the .htaccess files at the top of your site and under backlight/ respectively.  Are you able to look at those files via FTP and see if there are AddHandler entries in either or both, and if so what they are?

Offline

#3 2018-09-12 21:29:36

Pfredd
Member
Registered: 2014-04-16
Posts: 189

Re: Missing PHP modules?

Here is the .htaccess that is in my site's home directory:

# Use PHP56 as default
AddHandler application/x-httpd-php56 .php
<IfModule mod_headers.c>
    <FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
</IfModule>

<IfModule mod_rewrite.c>
        RewriteEngine On

        #RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$
        #RewriteRule ^(.*)$ - [E=BASE:%1]
        ##RewriteRule ^(.*)$ - [E=BASE:]

        RewriteBase /
        RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
        RewriteRule ^.*$ - [E=BASE:%2]

        RewriteRule ^(.*)$ - [E=QS:mod_rewrite=on]

        RewriteRule ^([^\/.]*)-single.php$ %{ENV:BASE}single.php?%{ENV:QS}&id=$1 [QSA,L]

        RewriteRule ^([^\/.]*).css$ %{ENV:BASE}index.php?%{ENV:QS}&extension=css&name=$1 [QSA,L]
        RewriteRule ^([^\/.]*).js$ %{ENV:BASE}index.php?%{ENV:QS}&extension=js&name=$1 [QSA,L]
        RewriteRule ^([^\/.]*).gif$ %{ENV:BASE}index.php?%{ENV:QS}&extension=gif&name=$1 [QSA,L]
        RewriteRule ^([^\/.]*).png$ %{ENV:BASE}index.php?%{ENV:QS}&extension=png&name=$1 [QSA,L]
        RewriteRule ^([^\/.]*).jpg$ %{ENV:BASE}index.php?%{ENV:QS}&extension=jpg&name=$1 [QSA,L]

        #RewriteCond %{QUERY_STRING} !mod_rewrite=on
        #RewriteRule ^index.php$ %{ENV:BASE}index.php?%{ENV:QS} [QSA,L]

        RewriteCond %{QUERY_STRING} !mod_rewrite=on
        RewriteRule ^mobile.php$ %{ENV:BASE}mobile.php?%{ENV:QS} [QSA,L]

        RewriteCond %{QUERY_STRING} !mod_rewrite=on
        RewriteRule ^(.*)download.php %{ENV:BASE}download.php?%{ENV:QS} [QSA,L]

        #RewriteRule ^/?$ index.php [QSA,L]

        RewriteRule ^$ %{ENV:BASE}index.php?%{ENV:QS} [QSA,L]

        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d

        RewriteRule ^(.*)$ %{ENV:BASE}index.php?%{ENV:QS}&page=$1 [QSA,L]

And here is the one in backlight:

<IfModule mod_headers.c>
    <FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
</IfModule>

<IfModule mod_rewrite.c>
        RewriteEngine On

        RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$
        RewriteRule ^(.*)$ - [E=BASE:%1]
        #RewriteRule ^(.*)$ - [E=BASE:]

#       RewriteBase /backlight/
#       RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
#       RewriteRule ^.*$ - [E=BASE:%2]

        RewriteRule ^(.*)$ - [E=QS:mod_rewrite=on]

        RewriteRule ^/?search\/?$ %{ENV:BASE}index.php?%{ENV:QS}&m=publisher&c=gallery&a=search [QSA,L]

        RewriteRule ^/?([a-zA-Z_\-]+)/([a-zA-Z_\-]+)/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+)\/?$ %{ENV:BASE}index.php?%{ENV:QS}&m=$1&c=$2&a=$3&p1=$4&p2=$5&p3=$6&htline=1 [QSA,L]
        RewriteRule ^/?([a-zA-Z_\-]+)/([a-zA-Z_\-]+)/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+)\/?$ %{ENV:BASE}index.php?%{ENV:QS}&m=$1&c=$2&a=$3&p1=$4&p2=$5&htline=2 [QSA,L]
        RewriteRule ^/?([a-zA-Z_\-]+)/([a-zA-Z_\-]+)/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+)\/?$ %{ENV:BASE}index.php?%{ENV:QS}&m=$1&c=$2&a=$3&p1=$4&htline=3 [QSA,L]
        RewriteRule ^/?([a-zA-Z_\-]+)/([a-zA-Z_\-]+)/([a-zA-Z0-9_\-]+)\/?$ %{ENV:BASE}index.php?%{ENV:QS}&m=$1&c=$2&a=$3&htline=4 [QSA,L]
        RewriteRule ^/?([a-zA-Z_\-]+)/([a-zA-Z_\-]+)\/?$ %{ENV:BASE}index.php?%{ENV:QS}&m=$1&c=$2&htline=5 [QSA,L]
        RewriteRule ^/?([a-zA-Z_\-]+)\/?$ %{ENV:BASE}index.php?%{ENV:QS}&m=$1&htline=6 [QSA,L]
        # Enable passing of mod_rewrite for /backlight/ site root
        RewriteRule ^$ %{ENV:BASE}index.php?%{ENV:QS}&htline=7 [QSA,L]

        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^.*$ %{ENV:BASE}index.php?%{ENV:QS}&htline=8 [QSA,L]
</IfModule>

Offline

#4 2018-09-12 21:32:27

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Missing PHP modules?

That doesn't look like it would cause the problem.  Can you try disabling the line in the first one, so that the start looks like the below and report back on what happens when you visit both the top of your site and the backlight/ URL?

# Use PHP56 as default
#AddHandler application/x-httpd-php56 .php

Offline

#5 2018-09-12 21:39:29

Pfredd
Member
Registered: 2014-04-16
Posts: 189

Re: Missing PHP modules?

Commented out the AddHandler and Backlight threw up because PHP wasn't at the right release level:

Your server is running PHP Version 5.2.17. Backlight 2 requires a minimum of PHP Version 5.4. We recommend PHP Version 5.6 or above.
Change your PHP version via your site's Control Panel or contact your host to enable a newer vesion of PHP .

The really weird thing is that I an 99% certain that everything was working OK last night when I first did the conversion from Backlight 1 to 2.

Today I started messing around with mt pages and temlates, including uploading a new album, and that is when I noticed the error.

I may revert my site back to before the upgrade and try again.

Offline

#6 2018-09-12 21:47:44

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Missing PHP modules?

Something else to try:

1. Undo that previous commenting out.
2. Edit the file index.php at the top of your site, by adding one line so that the top of it looks like the below.
3. See how that PHP Info displayed differs from the PHP Info within Backlight.  Most important is the version.  Other things to check for are to see how the occurrences of XML, PDO and SQLite differ between the two PHPInfo pages.

<?php

phpinfo(); die();

define('BACKLIGHT_DIRECTORY', 'backlight');

Offline

#7 2018-09-13 03:04:08

Pfredd
Member
Registered: 2014-04-16
Posts: 189

Re: Missing PHP modules?

I restored my web site to pre-Backlight 2.

I then re-did the upgrade from Backlight 1 to Backlight 2.

It appears to be working correctly.

I published a new album with no problem from Lightroom.

So, I guess I had done something wrong previously.

Will let you know if I run into the issue again....

Offline

Board footer

Powered by FluxBB