Having installed PHPlist using Fantastico on 11 sites, I found that the Fantastico control files had gone AWOL from nine of them. This article describes how I reinstated them and then upgraded PHPlist from 2.10.5 to 2.10.7. There was an extra complication with the configuration file, which I also describe how to resolve.
Although this article relates to PHPlist analogous solutions may be possible for other packages installed via Fantastico. The information in this article is offered in good faith, but the responsibility if you decide to use it is yours.
- Fantastico keeps a record of the packages it has installed (and some more) inside a directory called .fantasticodata that is in your site's root directory, ie it is at the same level as public_html not below it. Within that directory are sub-directories, one per package, and the one for PHPlist is called PHPlist (with the capital letters). This contains one file with a name that is made up by concatenating (joining) the domain name (without the www.), a vertical bar | and the directory name where the package is installed. An example would be yourdomain.co.uk|lists
- However this is an invalid name for a PC file so we must create a file called yourdomain.co.uk-lists and rename it on the server. Suppose your domain is yourdomain.co.uk , with usename yourdom, database called yourdom_listname and your installation is in lists, then create a file with this content:
Code:
<?
$thisdb = "yourdom_listname"; $thisdomain = "yourdomain.co.uk"; $thisscriptpath = "/home/yourdom/public_html/lists";
?>
- Upload this file to .fantasticodata/PHPlist and rename it as yourdomain.co.uk|lists
- In order to tell Fantastico what level your package is currently at, you must create a file fantversion.php looking like this
PHP Code:
<?php
$version = '2.10.5' ;
?>
and put it in the directory PHPlist is installed in (eg /public_html/lists/)
- Fantastico doesn't correctly update the file config.php (in the config directory) so download it to your PC and rename it (I called it config0.php). You will use this later.
- Log on to cPanel. Backup the database by goingto phpMyAdmin and exporting it to a file.
- Go to Fantastico and check there's enough disk space to run the upgrade. If not, increase the quota via WHM.
- Run the upgrade. You may get an error message like
Quote:
|
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /tmp/cpanel_phpengine.1227818076.20251BqSLUo857x on line 2538
|
don't worry unduly but it means the next step is necessary.
- Download the new version of config.php and edit it so that the lines $installation_name, $table_prefix and $usertable_prefix match what they are in the config.php file you downloaded at step 5. Upload it back to the server.
- Log on to PHPlist and upgrade the database.