I get the problem with CB 1.1 on WAMP too. And I find out what is wrong for us whom file size and permission is not the problem.
Turns out it is not WAMP problem. It's CB problem on Windows.
Simple solution:
1. Open administrator/components/com_comprofiler/admin.comprofiler.controller.php
2. Search for the function name "move_uploaded_file", in my version it is line 3206 in uploadFile()
3. Replace the function name with "rename", so that it now reads:
if (rename( $filename, $baseDir . $userfile_name )) {
or, to add more lines,
if (file_exists( $baseDir )) {
if (is_writable( $baseDir )) {
if (rename( $filename, $baseDir . $userfile_name )) {
if ((!is_callable("mosChmod")) or mosChmod( $baseDir . $userfile_name )) { // mambo 4.5.1 support
return true;
4. Save. Try to upload install again.
Cause of problem:
The problem is that, under windows, tmp_name of uploaded file is in backslashes. Error trace:
1. uploadFile() is called by installPluginUpload() [admin.comprofiler.controller.php:3176]
2. installPluginUpload() calls cbGetParam() to get uploaded file's location [admin.comprofiler.controller.php:3166]
3. cbGetParam() either cast parameters to int or addslashes() them [comprofiler.class.php:1740]
4. uploadFile()'s $filename becomes double-slashed on Windows. Thus it fails is_uploaded_file(). Thus move_uploaded_file() fails.
There are a number of ways this can be properly fixed. Be warned that technically my solution is not that safest one.
EDIT: Backslash also have problem in post rendering. I initially used backslashs for file path but the slashes won't show. Reaaly got some slash problems, uh?
Post edited by: Sheepy, at: 2008/07/18 13:38
Post edited by: Sheepy, at: 2008/07/18 13:43