I followed the instructions in the readme.txt and something went horribly wrong. I saved the file include/mysql.inc.php and backed up my database. I uploaded all of the files for 1.7.x (minus the galleries directory) and went to the url http://www.domain/gallery/upgrade.php and i got the message:
"PhpWebGallery is not in upgrade mode. In include/mysql.inc.php, insert line
define('PHPWG_IN_UPGRADE', true);
if you want to upgrade"
So i added this line and refreshed the page. It then said it upgraded so i navigated to the gallery (http://www.domain.com/gallery) and now it redirects me to the install.php and wants me to enter in all of the information like i'm doing a fresh install.
What is going on? Why won't it perform the upgrade? Am i missing something?
I have a backup of my SQL database just before i performed the upgrade and also the original musql.inc.php file.
Last edited by krickett (2007-05-05 22:36:51)
Offline
Check to have
define('PHPWG_INSTALLED', true);
you must have both
define('PHPWG_IN_UPGRADE', true);
define('PHPWG_INSTALLED', true);
Offline
I made that change and it helped, but it also created a new problem. When i go to the gallery i get:
SELECT
id, name, permalink, nb_images, global_rank,
date_last, max_date_last, count_images, count_categories
FROM phpwebgallery_categories INNER JOIN phpwebgallery_user_cache_categories
ON id = cat_id and user_id = 2
WHERE
(id_uppercat is NULL)
;
[mysql error 1054] Unknown column 'permalink' in 'field list'
SELECT
id, name, permalink, representative_picture_id, comment, nb_images,
date_last, max_date_last, count_images, count_categories
FROM phpwebgallery_categories INNER JOIN phpwebgallery_user_cache_categories
ON id = cat_id and user_id = 2
WHERE id_uppercat is NULL
ORDER BY rank
;
[mysql error 1054] Unknown column 'permalink' in 'field list'
I can then see some of my web gallery but all of the pictures are missing.
Here is the link to my site:
http://4wdtoyota.com/gallery/
Any ideas on how to fix this?
Last edited by krickett (2007-05-06 07:40:37)
Offline
When we run upgrade.php
the first step is adding the permalink column to the categories table.
Please run upgrade.php and do requested actions.
8-)
Offline
I tried re running the upgrade and the message i get is:
"No upgrade required, the database structure is up to date"
The first time i ran it, it said it detected that i was running 1.6.x and that it would upgrade to 1.7. It presented me with a hyperlink to click so i did and it said that the upgrade was finished.
Is there something i need to change so that i can re run the upgrade? It looks like something wasn't added to the database and if i can go through the upgrade process again i would imagine it would fix it.
Thanks for the help.
Offline
Could you give us the list of your tables?
Connect to phpMyAdmin and copy/paste your left column.
Offline
I had exactly the same problem has above, after upgrading from 1.7.rc2 to 1.7.0 ...
Aptempting to run run upgrade, I also got a message saying that no upgrade were needed ...
I have put back the previous 1.7.rc2 files that I saved just before the updates, and all works again (with the old version) ...
Here is a list of my files :
mcardon (30)
phpwebgallery_caddie
phpwebgallery_categories
phpwebgallery_comments
phpwebgallery_config
phpwebgallery_favorites
phpwebgallery_groups
phpwebgallery_group_access
phpwebgallery_history
phpwebgallery_history_summary
phpwebgallery_images
phpwebgallery_images_1169388365849524
phpwebgallery_image_category
phpwebgallery_image_tag
phpwebgallery_plugins
phpwebgallery_rate
phpwebgallery_search
phpwebgallery_sessions
phpwebgallery_sites
phpwebgallery_tags
phpwebgallery_upgrade
phpwebgallery_users
phpwebgallery_user_access
phpwebgallery_user_cache
phpwebgallery_user_cache_categories
phpwebgallery_user_feed
phpwebgallery_user_group
phpwebgallery_user_infos
phpwebgallery_user_mail_notification
phpwebgallery_waiting
phpwebgallery_ws_access
Here are the fields of the phpwebgallery_categories table:
phpwebgallery_categories
Champ Type Null Défaut
id smallint(5) Oui NULL
date_last datetime Oui NULL
nb_images mediumint(8) Oui 0
name varchar(255) Oui
id_uppercat smallint(5) Oui NULL
comment text Oui NULL
dir varchar(255) Oui NULL
rank smallint(5) Oui NULL
status enum('public', 'private') Oui public
site_id tinyint(4) Oui 1
visible enum('true', 'false') Oui true
uploadable enum('true', 'false') Oui false
representative_picture_id mediumint(8) Oui NULL
uppercats varchar(255) Oui
commentable enum('true', 'false') Oui true
global_rank varchar(255) Oui NULL
image_order varchar(128) Oui NULL
and
phpwebgallery_user_cache_categories
Champ Type Null Défaut
user_id smallint(5) Oui 0
cat_id smallint(5) Oui 0
max_date_last datetime Oui NULL
count_images mediumint(8) Oui 0
count_categories mediumint(8) Oui 0
pascal CARDON wrote:
I had exactly the same problem has above, after upgrading from 1.7.rc2 to 1.7.0 ...
Aptempting to run run upgrade, I also got a message saying that no upgrade were needed ...
I have put back the previous 1.7.rc2 files that I saved just before the updates, and all works again (with the old version) ...
You can't upgrade from an 1.7.0RCx! The 1.7.0RCx isn't a version of PWG. It's just a pre-release.
You must drop anything from 1.7.0RCx at the end of your tests.
Offline
rio wrote:
pascal CARDON wrote:
I had exactly the same problem has above, after upgrading from 1.7.rc2 to 1.7.0 ...
Aptempting to run run upgrade, I also got a message saying that no upgrade were needed ...
I have put back the previous 1.7.rc2 files that I saved just before the updates, and all works again (with the old version) ...You can't upgrade from an 1.7.0RCx! The 1.7.0RCx isn't a version of PWG. It's just a pre-release.
You must drop anything from 1.7.0RCx at the end of your tests.
I understand what you say, and I take this lesson for the next time ...
I didn't know that I will not bbe able to go to the final relase ... and it's a hard recall of the fact that a prerelease should never be used for real work
I Think, I will live for ever with this RC2 version, and it's the last time I test a prerelease ... because I will not be to put in the trash 4500+ pictures, with all tags, virtual categories I have made so long time to build ... I'm disapointed as I'm pretty sure there is probably a technical solution, as it seems there is at a first look only some missing fields in the existing tables ...
Stop we can solve your problem.
8-)
Offline
Pascal CARDON and krickett,
We can give you all change one by one if you need them.
But we need to know your RCx was-it 1.7.0RC1 or 1.7.0RC2?
Usualy we didn't want.
Long to do and not easy except for us.
Which RC did you have?
8-)
Offline
Here is the list of tables that i have from phpmyadmin:
phpwebgallery_caddie
phpwebgallery_categories
phpwebgallery_comments
phpwebgallery_config
phpwebgallery_favorites
phpwebgallery_groups
phpwebgallery_group_access
phpwebgallery_history
phpwebgallery_history_backup
phpwebgallery_history_summary
phpwebgallery_images
phpwebgallery_image_category
phpwebgallery_image_tag
phpwebgallery_old_permalinks
phpwebgallery_plugins
phpwebgallery_rate
phpwebgallery_search
phpwebgallery_sessions
phpwebgallery_sites
phpwebgallery_tags
phpwebgallery_upgrade
phpwebgallery_users
phpwebgallery_user_access
phpwebgallery_user_cache
phpwebgallery_user_cache_categories
phpwebgallery_user_feed
phpwebgallery_user_group
phpwebgallery_user_infos
phpwebgallery_user_mail_notification
phpwebgallery_waiting
phpwebgallery_ws_access
I did not upgrade from an RC as Pascal CARDON did. I was trying to upgrade from 1.6, i believe it was 1.6.1
Offline
krickett,
I know... and list are different.
It will be helpful if you know:
Which table did you change? (your own change in previous tables structure).
To go head.
Connect to phpMyAdmin and first sql icon in your left column:
ALTER TABLE phpwebgallery_categories
ADD COLUMN `permalink` varchar(64) default NULL;
ALTER TABLE phpwebgallery_categories
ADD COLUMN `image_order` varchar(128) default NULL;
ALTER TABLE phpwebgallery_categories
ADD UNIQUE `categories_i3` (`permalink`);
ALTER TABLE phpwebgallery_groups
ADD COLUMN `is_default` enum('true','false') NOT NULL default 'false';
Tell us.
8-)
Offline