Solved.... Sort of - HTMLArea + ImageManager problem

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Solved.... Sort of - HTMLArea + ImageManager problem

Post by balltongu »

Hi all,

After running phpmyfaq 1.4.1 on my personal workstation, I was able to get some space on a web accessible box with php to get the faq online. I started with moving everything over, then changing the data.php file in /inc to reflect the sql changes. Everything seemed alright, but when I went to add a new record, the image manager came up with an error parsing ImageManager.php at a line very close to the end. That was the beginning. Since then, I have tried a fresh install of 1.4.1, a fresh install of 1.4.3, an upgrade from 1.4.1 to 1.4.3. So, here is where I am at now. I've removed all of the tables (shouldn't matter, but whatever) and removed all of the files from that directory. Downloaded a fresh copy of 1.4.3 from the site, and placed all of those files in the directory on the server. Ran the install, all was good, go to add a record and here is what I get when I try and bring up the ImageManager:

read())) { if ($entry != '.' && $entry != '..') { $obj = Files::fixPath($folder).$entry; //var_dump($obj); if (is_file($obj)) { $deleted &= Files::delFile($obj); } else if(is_dir($obj)) { $deleted &= Files::delFolder($obj, $recursive); } } } $d->close(); } //$folder= $folder.'/thumbs'; //var_dump($folder); if(is_dir($folder)) $deleted &= rmdir($folder); else $deleted &= false; Return $deleted; } /** * Append a / to the path if required. * @param string $path the path * @return string path with trailing / */ function fixPath($path) { //append a slash to the path if it doesn't exists. if(!(substr($path,-1) == '/')) $path .= '/'; Return $path; } /** * Concat two paths together. Basically $pathA+$pathB * @param string $pathA path one * @param string $pathB path two * @return string a trailing slash combinded path. */ function makePath($pathA, $pathB) { $pathA = Files::fixPath($pathA); if(substr($pathB,0,1)=='/') $pathB = substr($pathB,1); Return Files::fixPath($pathA.$pathB); } /** * Similar to makePath, but the second parameter * is not only a path, it may contain say a file ending. * @param string $pathA the leading path * @param string $pathB the ending path with file * @return string combined file path. */ function makeFile($pathA, $pathB) { $pathA = Files::fixPath($pathA); if(substr($pathB,0,1)=='/') $pathB = substr($pathB,1); Return $pathA.$pathB; } /** * Format the file size, limits to Mb. * @param int $size the raw filesize * @return string formated file size. */ function formatSize($size) { if($size < 1024) return $size.' bytes'; else if($size >= 1024 && $size < 1024*1024) return sprintf('%01.2f',$size/1024.0).' Kb'; else return sprintf('%01.2f',$size/(1024.0*1024)).' Mb'; } } ?>
Fatal error: Undefined class name 'files' in /var/www/html/internet/faq/admin/editor/plugins/ImageManager/Classes/ImageManager.php on line 98

Here is the code surrounding line 98:

function _dirs($base, $path)
{
$base = Files::fixPath($base);
$dirs = array();

if($this->isValidBase() == false)
return $dirs;

$d = @dir($base);

while (false !== ($entry = $d->read()))
{
//If it is a directory, and it doesn't start with
// a dot, and if is it not the thumbnail directory
if(is_dir($base.$entry)
&& substr($entry,0,1) != '.'
&& $this->isThumbDir($entry) == false)
{
$relative = Files::fixPath($path.$entry);
$fullpath = Files::fixPath($base.$entry);
$dirs[$relative] = $fullpath;
$dirs = array_merge($dirs, $this->_dirs($fullpath, $relative));
}
}
$d->close();

Return $dirs;
}


The server is running some flavor of PHP 4 family, safe mode is off, all php files have been set with executable file permissions, not sure what else might be needed here. On another note, when I log into the admin area, three of the fields on the left aren't filled in with text, just a small blank space. I can click on them, and I goto the right place. I've checked my lang file to make sure the right words were there, and they were. For the time being, I've just manually entered the information into the index.php file in the admin directory.

Thank you in advance for reading my long message, and hopefully someone will be able to point me in the right direction.

P.S. After typing this out, I checked a few more things out. I saw that the requirements for phpmyfaq state a PHP version of 4.3.9, and that box is running 4.3.4. Also, the requirements say to have Register Globals off, and this box has them on. Could this possibly be why this imagemanager thing won't work? The htmlarea + imagemanager site appears to be down at this time, so I couldn't check to see if they had any min requirements.
Last edited by balltongu on Mon Nov 15, 2004 10:29 pm, edited 2 times in total.
Thorsten
Posts: 15741
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

which version of PHP do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

see above in my edit/ps section
Thorsten
Posts: 15741
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

did the Image Manager work on your workstation?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

It did, and of course I've since wiped this machine so I have no idea what version of php I had on it.
Thorsten
Posts: 15741
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I think your PHP is broken. :-(

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

LOL, I sure hope not. There is a lot of other php related stuff on that box in particular that is appearing to work quite fine. In particular, all of phpmyfaq works great except for this one stupid part with the imagemanager. I will see what I can do to get the php version upgraded and get Globals turned off and will let you know.
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

The problem is sort of solved. I installed phpmyFAQ on a different server with a different database, it worked perfectly fine there. So, I adjusted my original installs data.php file to use the new database server and I still have the same original problem. It appears to be down to one box is using apache2handler and the other is using CGI for a webserver interface. The CGI one is the one that works.

Balltongu
Thorsten
Posts: 15741
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I'm looking for a workaround to make it running with apache2handler, too.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

So, cool, there is an issue with apache2handler? That atleast gives me something to base my suggestions to the webserver admin upon.

Balltongu
Post Reply