Is there a safe way/script to delete all images/files and article references to them (mysql).
The update to the latest version left many images corrupted (possibly an IM or GD problem on my machine, but strange that many images were also ok?).
It would now be more simple to just remove all images and references from everything. Then I could re-upload all images and re-reference them.
Thanks in advance.
Delete all images/files
Hi AndyInDE,
please have a look: http://faq.phpwcms-docu.de/content/2/6/ ... files.html
Regards Knut
please have a look: http://faq.phpwcms-docu.de/content/2/6/ ... files.html
Regards Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Thanks flip-flop,
That was ok for 'unused' images.
I took a chance and just ended up deleting from 'phpwcms_file' and 'phpwcms_imgcache', and then deleting all images from /content/images and /phpwcms_filestorage (less the image_placeholder.png). The site is now clean (i.e. no images, which is what I wanted).
All that remains is to get the ftp import to work (not generating previews), which I am working on now. It seems that the filename passed to imagick.convert.inc.php is incorrectly trimmed somewhere?
That was ok for 'unused' images.
I took a chance and just ended up deleting from 'phpwcms_file' and 'phpwcms_imgcache', and then deleting all images from /content/images and /phpwcms_filestorage (less the image_placeholder.png). The site is now clean (i.e. no images, which is what I wanted).
All that remains is to get the ftp import to work (not generating previews), which I am working on now. It seems that the filename passed to imagick.convert.inc.php is incorrectly trimmed somewhere?
Ok, found the image problem. It seems that many tables did not get updated correctly during the upgrade.
Many of the varchar columns have not been increased in capacity. At a glance it looks like nearly all varchar(85) columns should have been upgraded to 255 etc.
In particular the phpwcms_file.f_hash was varchar(16), so this was where the filename was getting trashed.
I am not sure where this occurred, but this was an upgrade from a really old version.
I am doing a table by table script check to get everything in order.
Many of the varchar columns have not been increased in capacity. At a glance it looks like nearly all varchar(85) columns should have been upgraded to 255 etc.
In particular the phpwcms_file.f_hash was varchar(16), so this was where the filename was getting trashed.
I am not sure where this occurred, but this was an upgrade from a really old version.
I am doing a table by table script check to get everything in order.
The varchar problem was definitely something to do with the DB upgrade from mysql 3.x to 4.x and charsets (the new mysqld was using an incorrect/old charset location). I think I'll leave the update to mysql 5.x till I'm sure I have a running system.
Everything appears to be correct at this stage, all that remains is to re-link the images.
Everything appears to be correct at this stage, all that remains is to re-link the images.