Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
1
Erster Beitrag:
vor 1 Jahr, 5 Monaten
Beteiligte Autoren:
Ericus

[WB19]CKEditor and IIS on server [SOLVED]

Startbeitrag von Ericus am 22.06.2016 11: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.


Google explained how to get rid of the open_basedir restriction and then I added this line to config.php

$config['BaseDir'] = dirname(__FILE__).'\userfiles/'

F%#k I'm good.


Ericus Steyn

Antworten:

Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.