Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Images Will Not Load


Guest

Recommended Posts

This problem has been posted for weeks and no one seems to know anything about it. Vgar suggested I check to make sure file upload was turned on through the control panel which it is but no one else has had any suggestions.

 

PLEASE HELP!!!!!!!!!

 

 

 

When attempting to add new product (or catagory) images I receive the following warning

 

Warning: move_uploaded_file(C:/Accounts/icompres/wwwRoot/ecommerce/images/bar and plate air cooled aftercooler.jpg): failed to open stream: Permission denied in C:\Accounts\icompres\wwwRoot\ecommerce\admin\includes\classes\upload.php on line 94

 

Warning: move_uploaded_file(): Unable to move 'C:\PHP\uploadtemp\php6881.tmp' to 'C:/Accounts/icompres/wwwRoot/ecommerce/images/bar and plate air cooled aftercooler.jpg' in C:\Accounts\icompres\wwwRoot\ecommerce\admin\includes\classes\upload.php on line 94

 

Error: File upload not saved.

 

The product information and pricing all save fine but the image will not.

 

Since the warning seems to involve the file \admin\includes\classes\upload.php I checked the permissions on that file and it is set to "modify". I have also copied the content of that file as follows:

 

<?php

/*

$Id: upload.php,v 1.2 2003/06/20 00:18:30 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class upload {

var $file, $filename, $destination, $permissions, $extensions, $tmp_filename, $message_location;

 

function upload($file = '', $destination = '', $permissions = '777', $extensions = '') {

$this->set_file($file);

$this->set_destination($destination);

$this->set_permissions($permissions);

$this->set_extensions($extensions);

 

$this->set_output_messages('direct');

 

if (tep_not_null($this->file) && tep_not_null($this->destination)) {

$this->set_output_messages('session');

 

if ( ($this->parse() == true) && ($this->save() == true) ) {

return true;

} else {

// self destruct

$this = null;

 

return false;

}

}

}

 

function parse() {

global $messageStack;

 

if (isset($_FILES[$this->file])) {

$file = array('name' => $_FILES[$this->file]['name'],

'type' => $_FILES[$this->file]['type'],

'size' => $_FILES[$this->file]['size'],

'tmp_name' => $_FILES[$this->file]['tmp_name']);

} elseif (isset($GLOBALS['HTTP_POST_FILES'][$this->file])) {

global $HTTP_POST_FILES;

 

$file = array('name' => $HTTP_POST_FILES[$this->file]['name'],

'type' => $HTTP_POST_FILES[$this->file]['type'],

'size' => $HTTP_POST_FILES[$this->file]['size'],

'tmp_name' => $HTTP_POST_FILES[$this->file]['tmp_name']);

} else {

$file = array('name' => (isset($GLOBALS[$this->file . '_name']) ? $GLOBALS[$this->file . '_name'] : ''),

'type' => (isset($GLOBALS[$this->file . '_type']) ? $GLOBALS[$this->file . '_type'] : ''),

'size' => (isset($GLOBALS[$this->file . '_size']) ? $GLOBALS[$this->file . '_size'] : ''),

'tmp_name' => (isset($GLOBALS[$this->file]) ? $GLOBALS[$this->file] : ''));

}

 

if ( tep_not_null($file['tmp_name']) && ($file['tmp_name'] != 'none') && is_uploaded_file($file['tmp_name']) ) {

if (sizeof($this->extensions) > 0) {

if (!in_array(strtolower(substr($file['name'], strrpos($file['name'], '.')+1)), $this->extensions)) {

if ($this->message_location == 'direct') {

$messageStack->add(ERROR_FILETYPE_NOT_ALLOWED, 'error');

} else {

$messageStack->add_session(ERROR_FILETYPE_NOT_ALLOWED, 'error');

}

 

return false;

}

}

 

$this->set_file($file);

$this->set_filename($file['name']);

$this->set_tmp_filename($file['tmp_name']);

 

return $this->check_destination();

} else {

if ($this->message_location == 'direct') {

$messageStack->add(WARNING_NO_FILE_UPLOADED, 'warning');

} else {

$messageStack->add_session(WARNING_NO_FILE_UPLOADED, 'warning');

}

 

return false;

}

}

 

function save() {

global $messageStack;

 

if (substr($this->destination, -1) != '/') $this->destination .= '/';

 

if (move_uploaded_file($this->file['tmp_name'], $this->destination . $this->filename)) {

chmod($this->destination . $this->filename, $this->permissions);

 

if ($this->message_location == 'direct') {

$messageStack->add(SUCCESS_FILE_SAVED_SUCCESSFULLY, 'success');

} else {

$messageStack->add_session(SUCCESS_FILE_SAVED_SUCCESSFULLY, 'success');

}

 

return true;

} else {

if ($this->message_location == 'direct') {

$messageStack->add(ERROR_FILE_NOT_SAVED, 'error');

} else {

$messageStack->add_session(ERROR_FILE_NOT_SAVED, 'error');

}

 

return false;

}

}

 

function set_file($file) {

$this->file = $file;

}

 

function set_destination($destination) {

$this->destination = $destination;

}

 

function set_permissions($permissions) {

$this->permissions = octdec($permissions);

}

 

function set_filename($filename) {

$this->filename = $filename;

}

 

function set_tmp_filename($filename) {

$this->tmp_filename = $filename;

}

 

function set_extensions($extensions) {

if (tep_not_null($extensions)) {

if (is_array($extensions)) {

$this->extensions = $extensions;

} else {

$this->extensions = array($extensions);

}

} else {

$this->extensions = array();

}

}

 

function check_destination() {

global $messageStack;

 

if (!is_writeable($this->destination)) {

if (is_dir($this->destination)) {

if ($this->message_location == 'direct') {

$messageStack->add(sprintf(ERROR_DESTINATION_NOT_WRITEABLE, $this->destination), 'error');

} else {

$messageStack->add_session(sprintf(ERROR_DESTINATION_NOT_WRITEABLE, $this->destination), 'error');

}

} else {

if ($this->message_location == 'direct') {

$messageStack->add(sprintf(ERROR_DESTINATION_DOES_NOT_EXIST, $this->destination), 'error');

} else {

$messageStack->add_session(sprintf(ERROR_DESTINATION_DOES_NOT_EXIST, $this->destination), 'error');

}

}

 

return false;

} else {

return true;

}

}

 

function set_output_messages($location) {

switch ($location) {

case 'session':

$this->message_location = 'session';

break;

case 'direct':

default:

$this->message_location = 'direct';

break;

}

}

}

?>

 

 

I really need help on this issue. Thanks

Link to comment
Share on other sites

Go to your osCommerce admin panel --> Tools --> Server Info and check to see if File Uploads is set to 'On'

 

If it's not then you'll have to move hosts because you need this feature enabled to be able to run osCommerce.

 

Vger

Link to comment
Share on other sites

Go to your osCommerce admin panel --> Tools --> Server Info and check to see if File Uploads is set to 'On'

 

If it's not then you'll have to move hosts because you need this feature enabled to be able to run osCommerce.

 

Vger

 

 

I have checked and file uploads is set to ON

 

Gene

Link to comment
Share on other sites

I'm still trying to get some resolution to this issue. Can anyone offer some advice?

 

I did some further checking and assured that I can upload a picture file (change OSCommerce logo on main catalog page). The problem only occurs when I try to add the image to a new product. I have also checked the permissions on the upload.php file and they are all set to "modify"

 

HELP!!!!!!

Link to comment
Share on other sites

  • 2 months later...

SOLUTION: Since there was over 100 views on this topic I wanted to let others know what the solution was for my particular issue was.

 

Because of the particular PHP version on my server the following change had to be made. This one little change is all it took. Good luck to all

 

You can modify the upload.php and make the below changes using a text editor.

 

in upload.php line 31

 

change: $this = null;

 

to this: unset($this);

Link to comment
Share on other sites

SOLUTION: Since there was over 100 views on this topic I wanted to let others know what the solution was for my particular issue was.

 

Because of the particular PHP version on my server the following change had to be made. This one little change is all it took. Good luck to all

 

You can modify the upload.php and make the below changes using a text editor.

 

in upload.php line 31

 

change: $this = null;

 

to this: unset($this);

 

 

Godfrey,

 

the problem still persist.... :blink:

 

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/var/tmp/phpx1txhE) is not within the allowed path(s): (/home/betta4u:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/betta4u/public_html/stock/admin/includes/classes/upload.php on line 94

Warning: move_uploaded_file(/var/tmp/phpx1txhE) [function.move-uploaded-file]: failed to open stream: Operation not permitted in /home/betta4u/public_html/stock/admin/includes/classes/upload.php on line 94

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/var/tmp/phpx1txhE' to '/home/betta4u/public_html/stock/images/061006-2.jpg' in /home/betta4u/public_html/stock/admin/includes/classes/upload.php on line 94

 

my upload.php codes

 

<?php
/*
 $Id: upload.php,v 1.2 2003/06/20 00:18:30 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 class upload {
var $file, $filename, $destination, $permissions, $extensions, $tmp_filename, $message_location;

function upload($file = '', $destination = '', $permissions = '777', $extensions = '') {
  $this->set_file($file);
  $this->set_destination($destination);
  $this->set_permissions($permissions);
  $this->set_extensions($extensions);

  $this->set_output_messages('direct');

  if (tep_not_null($this->file) && tep_not_null($this->destination)) {
	$this->set_output_messages('session');

	if ( ($this->parse() == true) && ($this->save() == true) ) {
	  return true;
	} else {
// self destruct
	  unset($this);

	  return false;
	}
  }
}

function parse() {
  global $messageStack;

  if (isset($_FILES[$this->file])) {
	$file = array('name' => $_FILES[$this->file]['name'],
				  'type' => $_FILES[$this->file]['type'],
				  'size' => $_FILES[$this->file]['size'],
				  'tmp_name' => $_FILES[$this->file]['tmp_name']);
  } elseif (isset($GLOBALS['HTTP_POST_FILES'][$this->file])) {
	global $HTTP_POST_FILES;

	$file = array('name' => $HTTP_POST_FILES[$this->file]['name'],
				  'type' => $HTTP_POST_FILES[$this->file]['type'],
				  'size' => $HTTP_POST_FILES[$this->file]['size'],
				  'tmp_name' => $HTTP_POST_FILES[$this->file]['tmp_name']);
  } else {
	$file = array('name' => (isset($GLOBALS[$this->file . '_name']) ? $GLOBALS[$this->file . '_name'] : ''),
				  'type' => (isset($GLOBALS[$this->file . '_type']) ? $GLOBALS[$this->file . '_type'] : ''),
				  'size' => (isset($GLOBALS[$this->file . '_size']) ? $GLOBALS[$this->file . '_size'] : ''),
				  'tmp_name' => (isset($GLOBALS[$this->file]) ? $GLOBALS[$this->file] : ''));
  }

  if ( tep_not_null($file['tmp_name']) && ($file['tmp_name'] != 'none') && is_uploaded_file($file['tmp_name']) ) {
	if (sizeof($this->extensions) > 0) {
	  if (!in_array(strtolower(substr($file['name'], strrpos($file['name'], '.')+1)), $this->extensions)) {
		if ($this->message_location == 'direct') {
		  $messageStack->add(ERROR_FILETYPE_NOT_ALLOWED, 'error');
		} else {
		  $messageStack->add_session(ERROR_FILETYPE_NOT_ALLOWED, 'error');
		}

		return false;
	  }
	}

	$this->set_file($file);
	$this->set_filename($file['name']);
	$this->set_tmp_filename($file['tmp_name']);

	return $this->check_destination();
  } else {
	if ($this->message_location == 'direct') {
	  $messageStack->add(WARNING_NO_FILE_UPLOADED, 'warning');
	} else {
	  $messageStack->add_session(WARNING_NO_FILE_UPLOADED, 'warning');
	}

	return false;
  }
}

function save() {
  global $messageStack;

  if (substr($this->destination, -1) != '/') $this->destination .= '/';

  if (move_uploaded_file($this->file['tmp_name'], $this->destination . $this->filename)) {
	chmod($this->destination . $this->filename, $this->permissions);

	if ($this->message_location == 'direct') {
	  $messageStack->add(SUCCESS_FILE_SAVED_SUCCESSFULLY, 'success');
	} else {
	  $messageStack->add_session(SUCCESS_FILE_SAVED_SUCCESSFULLY, 'success');
	}

	return true;
  } else {
	if ($this->message_location == 'direct') {
	  $messageStack->add(ERROR_FILE_NOT_SAVED, 'error');
	} else {
	  $messageStack->add_session(ERROR_FILE_NOT_SAVED, 'error');
	}

	return false;
  }
}

function set_file($file) {
  $this->file = $file;
}

function set_destination($destination) {
  $this->destination = $destination;
}

function set_permissions($permissions) {
  $this->permissions = octdec($permissions);
}

function set_filename($filename) {
  $this->filename = $filename;
}

function set_tmp_filename($filename) {
  $this->tmp_filename = $filename;
}

function set_extensions($extensions) {
  if (tep_not_null($extensions)) {
	if (is_array($extensions)) {
	  $this->extensions = $extensions;
	} else {
	  $this->extensions = array($extensions);
	}
  } else {
	$this->extensions = array();
  }
}

function check_destination() {
  global $messageStack;

  if (!is_writeable($this->destination)) {
	if (is_dir($this->destination)) {
	  if ($this->message_location == 'direct') {
		$messageStack->add(sprintf(ERROR_DESTINATION_NOT_WRITEABLE, $this->destination), 'error');
	  } else {
		$messageStack->add_session(sprintf(ERROR_DESTINATION_NOT_WRITEABLE, $this->destination), 'error');
	  }
	} else {
	  if ($this->message_location == 'direct') {
		$messageStack->add(sprintf(ERROR_DESTINATION_DOES_NOT_EXIST, $this->destination), 'error');
	  } else {
		$messageStack->add_session(sprintf(ERROR_DESTINATION_DOES_NOT_EXIST, $this->destination), 'error');
	  }
	}

	return false;
  } else {
	return true;
  }
}

function set_output_messages($location) {
  switch ($location) {
	case 'session':
	  $this->message_location = 'session';
	  break;
	case 'direct':
	default:
	  $this->message_location = 'direct';
	  break;
  }
}
 }
?>

Link to comment
Share on other sites

Hi there,

 

I had the same problem after my hostingprovider installed a new server with new versions of php and such. Finally I found the solution, it might also work for you.

 

Check in your php.ini, or if you have your site hosted with a hostingprovider like me check it in your OSC-admin:

-browse to www.yousite.com/admin go to tools/server-info >PHP Core section

-check include_path, it must be filled. Mine says .:/usr/share/php/PEAR

It did not work for me when include_path was set to no value

 

The next thing is the 'document root' path. It should match the path in your 2 configure.php files.

-check the 'Apache Environment' Section for DOCUMENT_ROOT

make sure you got this same path set in your 2 config-files:

catalog/includes/configure.php

define('DIR_FS_CATALOG', '/var/www/vhosts/MYSITE.nl/httpdocs/');

 

catalog/admin/includes/configure.php

define('DIR_FS_DOCUMENT_ROOT', '/var/www/vhosts/MYSITE.nl/httpdocs/'); // where the pages are located on the server

 

define('DIR_FS_ADMIN', '/var/www/vhosts/MYSITE.nl/httpdocs/admin-secure/'); // absolute pate required

 

define('DIR_FS_CATALOG', '/var/www/vhosts/MYSITE.nl/httpdocs/'); // absolute path required

 

 

After my provider installed the new server the DOCUMENT_ROOT was changed from

/home/httpd/vhosts/MYSITE.nl/httpdocs

to

/var/www/vhosts/MYSITE.nl/httpdocs

after changing the 2 congif-files it finaly started working again.

 

hope this helps!

 

gr. LuluM

Link to comment
Share on other sites

hi Lulu

 

i have changed the document root..as per given :( too bad . the images can't still be saved..

 

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/var/tmp/phpQmlecL) is not within the allowed path(s): (/home/betta4u:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/betta4u/public_html/stock/admin/includes/classes/upload.php on line 91

Warning: move_uploaded_file(/var/tmp/phpQmlecL) [function.move-uploaded-file]: failed to open stream: Operation not permitted in /home/betta4u/public_html/stock/admin/includes/classes/upload.php on line 91

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/var/tmp/phpQmlecL' to '/home/betta4u/public_html/stock/images/061006-18.jpg' in /home/betta4u/public_html/stock/admin/includes/classes/upload.php on line 91

Error: File upload not saved.

 

 

 

help please....

 

 

 

Hi there,

 

I had the same problem after my hostingprovider installed a new server with new versions of php and such. Finally I found the solution, it might also work for you.

 

Check in your php.ini, or if you have your site hosted with a hostingprovider like me check it in your OSC-admin:

-browse to www.yousite.com/admin go to tools/server-info >PHP Core section

-check include_path, it must be filled. Mine says .:/usr/share/php/PEAR

It did not work for me when include_path was set to no value

 

The next thing is the 'document root' path. It should match the path in your 2 configure.php files.

-check the 'Apache Environment' Section for DOCUMENT_ROOT

make sure you got this same path set in your 2 config-files:

catalog/includes/configure.php

define('DIR_FS_CATALOG', '/var/www/vhosts/MYSITE.nl/httpdocs/');

 

catalog/admin/includes/configure.php

define('DIR_FS_DOCUMENT_ROOT', '/var/www/vhosts/MYSITE.nl/httpdocs/'); // where the pages are located on the server

 

define('DIR_FS_ADMIN', '/var/www/vhosts/MYSITE.nl/httpdocs/admin-secure/'); // absolute pate required

 

define('DIR_FS_CATALOG', '/var/www/vhosts/MYSITE.nl/httpdocs/'); // absolute path required

After my provider installed the new server the DOCUMENT_ROOT was changed from

/home/httpd/vhosts/MYSITE.nl/httpdocs

to

/var/www/vhosts/MYSITE.nl/httpdocs

after changing the 2 congif-files it finaly started working again.

 

hope this helps!

 

gr. LuluM

Link to comment
Share on other sites

Hi G, sounds like your "write" is not enabled on the images file. try this, in your file manager go through to your images file, click on the code towards the right of the screen. you will see three options, click the write permissions for admin, and group.

good luck.

 

 

 

 

 

 

 

 

 

 

This problem has been posted for weeks and no one seems to know anything about it. Vgar suggested I check to make sure file upload was turned on through the control panel which it is but no one else has had any suggestions.

 

PLEASE HELP!!!!!!!!!

When attempting to add new product (or catagory) images I receive the following warning

 

Warning: move_uploaded_file(C:/Accounts/icompres/wwwRoot/ecommerce/images/bar and plate air cooled aftercooler.jpg): failed to open stream: Permission denied in C:\Accounts\icompres\wwwRoot\ecommerce\admin\includes\classes\upload.php on line 94

 

Warning: move_uploaded_file(): Unable to move 'C:\PHP\uploadtemp\php6881.tmp' to 'C:/Accounts/icompres/wwwRoot/ecommerce/images/bar and plate air cooled aftercooler.jpg' in C:\Accounts\icompres\wwwRoot\ecommerce\admin\includes\classes\upload.php on line 94

 

Error: File upload not saved.

 

The product information and pricing all save fine but the image will not.

 

Since the warning seems to involve the file \admin\includes\classes\upload.php I checked the permissions on that file and it is set to "modify". I have also copied the content of that file as follows:

 

<?php

/*

$Id: upload.php,v 1.2 2003/06/20 00:18:30 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class upload {

var $file, $filename, $destination, $permissions, $extensions, $tmp_filename, $message_location;

 

function upload($file = '', $destination = '', $permissions = '777', $extensions = '') {

$this->set_file($file);

$this->set_destination($destination);

$this->set_permissions($permissions);

$this->set_extensions($extensions);

 

$this->set_output_messages('direct');

 

if (tep_not_null($this->file) && tep_not_null($this->destination)) {

$this->set_output_messages('session');

 

if ( ($this->parse() == true) && ($this->save() == true) ) {

return true;

} else {

// self destruct

$this = null;

 

return false;

}

}

}

 

function parse() {

global $messageStack;

 

if (isset($_FILES[$this->file])) {

$file = array('name' => $_FILES[$this->file]['name'],

'type' => $_FILES[$this->file]['type'],

'size' => $_FILES[$this->file]['size'],

'tmp_name' => $_FILES[$this->file]['tmp_name']);

} elseif (isset($GLOBALS['HTTP_POST_FILES'][$this->file])) {

global $HTTP_POST_FILES;

 

$file = array('name' => $HTTP_POST_FILES[$this->file]['name'],

'type' => $HTTP_POST_FILES[$this->file]['type'],

'size' => $HTTP_POST_FILES[$this->file]['size'],

'tmp_name' => $HTTP_POST_FILES[$this->file]['tmp_name']);

} else {

$file = array('name' => (isset($GLOBALS[$this->file . '_name']) ? $GLOBALS[$this->file . '_name'] : ''),

'type' => (isset($GLOBALS[$this->file . '_type']) ? $GLOBALS[$this->file . '_type'] : ''),

'size' => (isset($GLOBALS[$this->file . '_size']) ? $GLOBALS[$this->file . '_size'] : ''),

'tmp_name' => (isset($GLOBALS[$this->file]) ? $GLOBALS[$this->file] : ''));

}

 

if ( tep_not_null($file['tmp_name']) && ($file['tmp_name'] != 'none') && is_uploaded_file($file['tmp_name']) ) {

if (sizeof($this->extensions) > 0) {

if (!in_array(strtolower(substr($file['name'], strrpos($file['name'], '.')+1)), $this->extensions)) {

if ($this->message_location == 'direct') {

$messageStack->add(ERROR_FILETYPE_NOT_ALLOWED, 'error');

} else {

$messageStack->add_session(ERROR_FILETYPE_NOT_ALLOWED, 'error');

}

 

return false;

}

}

 

$this->set_file($file);

$this->set_filename($file['name']);

$this->set_tmp_filename($file['tmp_name']);

 

return $this->check_destination();

} else {

if ($this->message_location == 'direct') {

$messageStack->add(WARNING_NO_FILE_UPLOADED, 'warning');

} else {

$messageStack->add_session(WARNING_NO_FILE_UPLOADED, 'warning');

}

 

return false;

}

}

 

function save() {

global $messageStack;

 

if (substr($this->destination, -1) != '/') $this->destination .= '/';

 

if (move_uploaded_file($this->file['tmp_name'], $this->destination . $this->filename)) {

chmod($this->destination . $this->filename, $this->permissions);

 

if ($this->message_location == 'direct') {

$messageStack->add(SUCCESS_FILE_SAVED_SUCCESSFULLY, 'success');

} else {

$messageStack->add_session(SUCCESS_FILE_SAVED_SUCCESSFULLY, 'success');

}

 

return true;

} else {

if ($this->message_location == 'direct') {

$messageStack->add(ERROR_FILE_NOT_SAVED, 'error');

} else {

$messageStack->add_session(ERROR_FILE_NOT_SAVED, 'error');

}

 

return false;

}

}

 

function set_file($file) {

$this->file = $file;

}

 

function set_destination($destination) {

$this->destination = $destination;

}

 

function set_permissions($permissions) {

$this->permissions = octdec($permissions);

}

 

function set_filename($filename) {

$this->filename = $filename;

}

 

function set_tmp_filename($filename) {

$this->tmp_filename = $filename;

}

 

function set_extensions($extensions) {

if (tep_not_null($extensions)) {

if (is_array($extensions)) {

$this->extensions = $extensions;

} else {

$this->extensions = array($extensions);

}

} else {

$this->extensions = array();

}

}

 

function check_destination() {

global $messageStack;

 

if (!is_writeable($this->destination)) {

if (is_dir($this->destination)) {

if ($this->message_location == 'direct') {

$messageStack->add(sprintf(ERROR_DESTINATION_NOT_WRITEABLE, $this->destination), 'error');

} else {

$messageStack->add_session(sprintf(ERROR_DESTINATION_NOT_WRITEABLE, $this->destination), 'error');

}

} else {

if ($this->message_location == 'direct') {

$messageStack->add(sprintf(ERROR_DESTINATION_DOES_NOT_EXIST, $this->destination), 'error');

} else {

$messageStack->add_session(sprintf(ERROR_DESTINATION_DOES_NOT_EXIST, $this->destination), 'error');

}

}

 

return false;

} else {

return true;

}

}

 

function set_output_messages($location) {

switch ($location) {

case 'session':

$this->message_location = 'session';

break;

case 'direct':

default:

$this->message_location = 'direct';

break;

}

}

}

?>

I really need help on this issue. Thanks

Link to comment
Share on other sites

  • 2 weeks later...

betta4ucom,

sorry for my late reply :-"

 

hi Lulu

 

i have changed the document root..as per given :( too bad . the images can't still be saved..

 

 

 

How do you mean 'i have changed the document root..as per given '?

You didn't touch the php.ini did you? Please 'undo' if you did!

 

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/var/tmp/phpQmlecL' to '/home/betta4u/public_html/stock/images/061006-18.jpg' in /home/betta4u/public_html/stock/admin/includes/classes/upload.php on line 91

 

As I look at your error it seems your catalog-folder is in public_html/stock.

Try to change the configuration files like this:

catalog/includes/configure.php

define('DIR_FS_CATALOG', '/home/betta4u/public_html/stock/');

 

catalog/admin/includes/configure.php

define('DIR_FS_DOCUMENT_ROOT', '/home/betta4u/public_html/stock/'); // where the pages are located on the server

define('DIR_FS_ADMIN', '/home/betta4u/public_html/stock/admin-secure/'); // absolute pate required

define('DIR_FS_CATALOG', '/home/betta4u/public_html/stock/'); // absolute path required

Link to comment
Share on other sites

  • 3 years later...

Hi there,

 

I had the same problem after my hostingprovider installed a new server with new versions of php and such. Finally I found the solution, it might also work for you.

 

Check in your php.ini, or if you have your site hosted with a hostingprovider like me check it in your OSC-admin:

-browse to www.yousite.com/admin go to tools/server-info >PHP Core section

-check include_path, it must be filled. Mine says .:/usr/share/php/PEAR

It did not work for me when include_path was set to no value

 

The next thing is the 'document root' path. It should match the path in your 2 configure.php files.

-check the 'Apache Environment' Section for DOCUMENT_ROOT

make sure you got this same path set in your 2 config-files:

catalog/includes/configure.php

define('DIR_FS_CATALOG', '/var/www/vhosts/MYSITE.nl/httpdocs/');

 

catalog/admin/includes/configure.php

define('DIR_FS_DOCUMENT_ROOT', '/var/www/vhosts/MYSITE.nl/httpdocs/'); // where the pages are located on the server

 

define('DIR_FS_ADMIN', '/var/www/vhosts/MYSITE.nl/httpdocs/admin-secure/'); // absolute pate required

 

define('DIR_FS_CATALOG', '/var/www/vhosts/MYSITE.nl/httpdocs/'); // absolute path required

 

 

After my provider installed the new server the DOCUMENT_ROOT was changed from

/home/httpd/vhosts/MYSITE.nl/httpdocs

to

/var/www/vhosts/MYSITE.nl/httpdocs

after changing the 2 congif-files it finaly started working again.

 

hope this helps!

 

gr. LuluM

 

I have same problem. My include_path = ".:". But it doesn't work. Some help?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...