Hi all,
I am having some trouble with our wiki at http://ascendwiki.cheme.cmu.edu after a recent problem where a hard drive problem caused us to lose the images in our wiki. We managed to retrieve the database and I have reinstalled Mediawiki now (version 1.9.3) and some images I have put back into place in the wiki images folder (/var/www/wiki/images/X/XX/whatever.png), but it is becoming clear that all is not as it should be.
The first problem is that some of the images that I have replaced (from files from other sources pre-wiki) in the above folders do appear in the wiki, but do not appear to be thumbnailing correctly -- the image show with rough-looking resizing, not the usual nice smooth job that I take it is done by imagemagick.
The second problem is that I can't make uploading work any more. I have set everything up in LocalSettings.php and the folder permissions look right. I have set the $wgHashedUploadDirectory also. The funny thing is that when I use the upload page, the image appears to upload (the HTTP request takes a few moments) but then it fails silently: I am returned to the upload page again, with no error message, and no message shows up in the Apache error log either.
I tried to run management/rebuildImages using php5 CLI but it fails with a message about failing to connect to the database with user = root and no password. I couldn't see where to set the password (I tried modifying php.ini but that wasn't it). So I can't see how to run this script, either.
Any suggestions for all this would be much appreciated. I'm sure it must be something fairly simple I've failed to do.
Cheers JP
PS I notice that some upload issues have been addressed in the new 1.10 release. Could that be related?
John Pye wrote:
I tried to run management/rebuildImages using php5 CLI but it fails with a message about failing to connect to the database with user = root and no password. I couldn't see where to set the password (I tried modifying php.ini but that wasn't it). So I can't see how to run this script, either.
Set user and pwd in the AdminSettings.php file, or if never used before it's probably named "AdminSettings.sample" (same root folder as LocalSettings.php). This file should contain the following text:
/* * This data is used by all database maintenance scripts * (see directory maintenance/). The SQL user MUST BE * MANUALLY CREATED or set to an existing user with * necessary permissions. * * This is not to be confused with sysop accounts for the * wiki. */
$wgDBadminuser = '<fill in>'; $wgDBadminpassword = '<fill in>';
Regards,
// Rolf Lampa
Hi Rolf,
Rolf Lampa wrote:
John Pye wrote:
I tried to run management/rebuildImages using php5 CLI but it fails with a message about failing to connect to the database with user = root and no password. I couldn't see where to set the password (I tried modifying php.ini but that wasn't it). So I can't see how to run this script, either.
Set user and pwd in the AdminSettings.php file, or if never used before it's probably named "AdminSettings.sample" (same root folder as LocalSettings.php). This file should contain the following text:
Thanks that was exactly the problem. Somehow I missed setting up AdminSettings.php
My problem now is that the image database has all these files that it expects to be there, but they're not there. Is there anything I can do to make the mediawiki database keep only the images for which the uploaded files are still present, ie not lost?
I tried the 'importImages' script but it won't import lost images because they're still present in the database.
I tried the 'cleanupImages' script but it doesn't seem to clean up anything.
What seems to be required is a 'dropMissingImages' script or something like that. Depending on how the database is designed this might not be architecturally possible, I guess.
Any thoughts?
Cheers JP
John Pye wrote:
Hi Rolf,
Rolf Lampa wrote:
John Pye wrote:
I tried to run management/rebuildImages using php5 CLI but it fails with a message about failing to connect to the database with user = root and no password. I couldn't see where to set the password (I tried modifying php.ini but that wasn't it). So I can't see how to run this script, either.
Set user and pwd in the AdminSettings.php file, or if never used before it's probably named "AdminSettings.sample" (same root folder as LocalSettings.php). This file should contain the following text:
Thanks that was exactly the problem. Somehow I missed setting up AdminSettings.php
My problem now is that the image database has all these files that it expects to be there, but they're not there. Is there anything I can do to make the mediawiki database keep only the images for which the uploaded files are still present, ie not lost?
I tried the 'importImages' script but it won't import lost images because they're still present in the database.
I tried the 'cleanupImages' script but it doesn't seem to clean up anything.
What seems to be required is a 'dropMissingImages' script or something like that. Depending on how the database is designed this might not be architecturally possible, I guess.
Any thoughts?
I haven't tried this myself, but since the Image page titles should be the same ass the file names on disk you could arrange, somehow, a list of file names with the titles which are not there any longer. And then "wrap" the names in the list with appropriate SQL-script which drops those image pages.
But as said, I haven't dived into this problem any deeper than just typing this, right now. It's just what comes to mind.
// Rolf Lampa
Rolf Lampa wrote:
I haven't tried this myself, but since the Image page titles should be the same ass the file names on disk you could arrange, somehow, a list of file names with the titles which are not there any longer. And then "wrap" the names in the list with appropriate SQL-script which drops those image pages.
But as said, I haven't dived into this problem any deeper than just typing this, right now. It's just what comes to mind.
Arrrghhh... no the same a-- though... unbelievable, what a typo...! Sorry. :(
Regards,
// Rolf Lampa
mediawiki-l@lists.wikimedia.org