PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WB19]CKEditor and IIS on server
[WB19]CKEditor and IIS on server
Iniciado por guest, 22,jun. 2016 13:26 - No hay respuesta
Publicado el 22,junio 2016 - 13:26
Hi

I am struggling to upload an image from my web page to the Win2012 server running IIS.

I have installed PHP on that server and the PHP seems to be working.

In my Config.php file I have this:

$config['BaseUrl'] = 'http://plumaccounting.biz/ckeditor/plugins/jsplus_uploader/userfiles/';
$config['BaseDir'] = "/ckeditor/plugins/jsplus_uploader/userfiles/";
if (substr($config['BaseUrl'], -1) !== '/')
$config['BaseUrl'] .= '/';
if (substr($config['BaseDir'], -1) !== '/' && substr($config['BaseDir'], -1) !== '\\')
$config['BaseDir'] .= '/';


However when I try and upload an image I get this error: "Error while uploading. Check folder permissions."

The folder permissions I think is fine. I can copy and paste images into the folder.

My PHP error log gives this:

[22-Jun-2016 14:10:18 Europe/Minsk] PHP Warning: is_file(): open_basedir restriction in effect. File(/ckeditor/plugins/jsplus_uploader/userfiles/logomobile.png) is not within the allowed path(s): (http://php.net/open-basedir) in D:\WebDev\Sites\PlumAccounting\PLUMACCOUNTING_WEB\ckeditor\plugins\jsplus_uploader\uploader.php on line 106
[22-Jun-2016 14:10:18 Europe/Minsk] PHP Warning: move_uploaded_file(): open_basedir restriction in effect. File(/ckeditor/plugins/jsplus_uploader/userfiles/logomobile.png) is not within the allowed path(s): (http://php.net/open-basedir) in D:\WebDev\Sites\PlumAccounting\PLUMACCOUNTING_WEB\ckeditor\plugins\jsplus_uploader\uploader.php on line 115

I think the error has to do with the path and the / vs \.

Maybe because it's PHP it's looking for / but because it's running on windows it's getting \.

I have not changed anything in Webdev with regards to the upload path.

Any assistance appreciated.




Ericus Steyn