cancel
Showing results for 
Search instead for 
Did you mean: 

[PAYH] Moving phpBB and Coppermine from CGI to PAYH

decomplexity
Rising Star
Posts: 493
Thanks: 26
Registered: ‎30-07-2007

[PAYH] Moving phpBB and Coppermine from CGI to PAYH

Some hints from this recent transition of mine in the hope that others might avoid the pitfalls I encountered. They are probably typical of moving most PHP / MySQL packages, although both my phpBB (v2.0.21) and Coppermine (V1.4.8 ) are not standalone but called from pages within ‘Home pages’ webspace (which will not be moved yet). Others may have found better ways – perhaps they can add replies to this post.
a. allocate a new or spare domain name for the PAYH side (this allows the move to be tested without wholesale disruption to the operational system)
b. transfer the whole database, not just individual tables (this means that all the related applications are also moved). PAYH allows a database to be deleted and re-created very easily if the SQL import screws up, but DROPing and CREATEing individual tables is more awkward
c. I use the Coppermine / phpBB bridge in which Coppermine uses phpBB’s user registration. I initially amended the phpBB location setting within Coppermine’s the bridge configurator – and this caused endless trouble as it transpired I was updating the bridge setting on the CGI system even though I was accessing from the PAYH version. A better method follows:
d1. Download the database SQL as an Export using the CGI phpMyAdmin. The default settings appear to be fine
d2. Search for and amend Coppermine’s bridge phpBB location setting to the new URL
d3. Delete everything (except the SET SQL_MODE= .. ) before the first CREATE TABLE (you want to create the new database from Plesk, not via this SQL)
d4. Create the new database via Plesk
d5. Import the amended SQL into the new database via Plesk’s phpMyAdmin (from DBWebAdmin). Again, the Import defaults appear fine.   

e. remember that both phpBB and Coppermine have configuration settings which can be amended from their respective administration pages, but they also have settings for their databases – especially their location - which were set at installation time and are hard-wired. You need to edit:

coppermine/include/config.inc.php
phpbb2/config/php 
and amend dbhost/dbserver, dbname, dbuser and dbpasswd
(I also added a dbport - with ‘3306’ assigned - but it may well default correctly)
Forgetting to do this can be a source of endless ‘amusement’: I stupidly forgot to do the Coppermine code change, and was happily adding fresh photos to my new Coppermine gallery, little realising that although the photos themselves were being uploaded to the PAYH environment, the corresponding database updates were being made to the CGI system (which was still there). And it appears to be working flawlessly …..until I temporarily disabled the old CGI version….
phpBB also needs some items changing via its configuration panel:
- domain name
- script path
- cookie domain
- cookie path
- cookie name
and if you use Coppermine separately or with separate user registration, you need to amend similar items in Coppermine as well. If you find yourself needing to log on twice before logon is successful, this is a well-known symptom of wrong cookie settings.
The new settings may not be obvious but there is a phpBB gadget to work out what they should be (search phpBB's site for 'Auto Cookies')
f. Coppermine on PAYH needs directory permissions changing or photo uploads (and subsequent album updates) will fail with e.g. "error - impossible to move file" (when uploading) or "script error..." when updating the album with an uploaded photo.
To fix this, permissions need to be changed from 755 to 777 on the following directories:
/Albums
/Albums/Userpics
/Albums/Edit
/Albums/Userpics/1000n (where n is 1,2,3 ...)
g. Check that a WebStats icon appears when you select Report in Plesk. Mine didn’t and it needed a PN ticket to fix.
Zen from May 17. PN Business account from 2004 - 2017