I have successfully updated to EE2 and ran the SQL query to fix all of my file paths.
However I’m having trouble with the last step, running the php script to generate thumbnails. I’ve added the script to a template, with php enabled on output. And I’d double checked the server_path:
<?php
/* WARNING */
//if you have a large number of files here
//you may run into PHP max_execution_time or memory_limit errors
//change this to the full server path to your upload directory WITH trailing slash
$server_path = '/home/username/mydomain.com/images/products/';
$this->EE->load->helper('file');
$this->EE->load->library('filemanager');
foreach (get_filenames($server_path) as $name)
{
if ( ! file_exists($server_path.'_thumbs/thumb_'.$name))
{
$this->EE->filemanager->create_thumb(
array('server_path' => $server_path),
array('name' => $name)
);
}
}
echo 'FINISHED THUMB CREATION';
?>However, I’m getting a page full of errors, and no thumbnails :(
A PHP Error was encountered
Severity: Notice
Message: Undefined index: server_path
Filename: libraries/Filemanager.php
Line Number: 1173
A PHP Error was encountered
Severity: Notice
Message: Array to string conversion
Filename: helpers/file_helper.php
Line Number: 328
Any insight?