Avatar billede pepsiman Juniormester
29. december 2008 - 13:58 Der er 27 kommentarer og
1 løsning

fckedtor - C:\\Mysite\\userfiles\\

hej alle.

// SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
//        authenticated users can access this file or use some kind of session checking.
$Config['Enabled'] = true ;
--------------------------------------------------------------

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = 'C:\\MySite\\userfiles\\' ;
--------------------------------


jeg har skrevet begge true og C:\\Mysite\\userfiles\\ i config.php.

så kom en bedsked-fejl:

Error creating folder "C:\Mysite\userfiles\image/" (can't create C: directory


jeg forstår ikke det.. jeg bruger jo C:

hvad nu??

På forhånden tak

ole
Avatar billede zips Juniormester
29. december 2008 - 14:14 #1
Her $Config['UserFilesAbsolutePath'] = 'C:\\MySite\\userfiles\\' ; har du jo skrevet den sti du vil bruge og så vil den oprette en mappe images her under, men det kan den ikke, så du har fået en fejl :)

Hvis det kun skal være c: skal du bruge $Config['UserFilesAbsolutePath'] = 'C:\\' ;
Avatar billede pepsiman Juniormester
29. december 2008 - 14:24 #2
ny fejl:

Error creating folder "C:\image/" (can't create C: directory)
Avatar billede zips Juniormester
29. december 2008 - 14:30 #3
Da dit script ikke kan få lov til at oprette den mapper, må du have nogle sikkeheds regler som ikke giver dig lov til at oprette den mappe, du kan jo prøve at oprette den mappe selv og se om du så kan komme vidre.
Avatar billede pepsiman Juniormester
29. december 2008 - 14:38 #4
jeg har oprettet sti c:\Mysite\userfiles\image

samme fejl
Avatar billede pepsiman Juniormester
29. december 2008 - 14:45 #5
jeg spørger selv hvor er mappe 'image' fra?
Avatar billede pepsiman Juniormester
29. december 2008 - 14:57 #6
han har samme problem som mig:

http://www.eksperten.dk/spm/729456



jeg gik ind i config.php via editor/filemanager/connectors/php/config.php

<?php
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
*  - GNU General Public License Version 2 or later (the "GPL")
*    http://www.gnu.org/licenses/gpl.html
*
*  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
*    http://www.gnu.org/licenses/lgpl.html
*
*  - Mozilla Public License Version 1.1 or later (the "MPL")
*    http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Configuration file for the File Manager Connector for PHP.
*/

global $Config ;

// SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
//        authenticated users can access this file or use some kind of session checking.
$Config['Enabled'] = true ;


// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/userfiles/' ;

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = 'C:\\Mysite\\userfiles\\' ;

// Due to security issues with Apache modules, it is recommended to leave the
// following setting enabled.
$Config['ForceSingleExtension'] = true ;

// Perform additional checks for image files
// if set to true, validate image size (using getimagesize)
$Config['SecureImageUploads'] = true;

// What the user can do with this connector
$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;

// Allowed Resource Types
$Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;

// For security, HTML is allowed in the first Kb of data for files having the
// following extensions only.
$Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;

/*
    Configuration settings for each Resource Type

    - AllowedExtensions: the possible extensions that can be allowed.
        If it is empty then any file type can be uploaded.
    - DeniedExtensions: The extensions that won't be allowed.
        If it is empty then no restrictions are done here.

    For a file to be uploaded it has to fulfill both the AllowedExtensions
    and DeniedExtensions (that's it: not being denied) conditions.

    - FileTypesPath: the virtual folder relative to the document root where
        these resources will be located.
        Attention: It must start and end with a slash: '/'

    - FileTypesAbsolutePath: the physical path to the above folder. It must be
        an absolute path.
        If it's an empty string then it will be autocalculated.
        Useful if you are using a virtual directory, symbolic link or alias.
        Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
        Attention: The above 'FileTypesPath' must point to the same directory.
        Attention: It must end with a slash: '/'

    - QuickUploadPath: the virtual folder relative to the document root where
        these resources will be uploaded using the Upload tab in the resources
        dialogs.
        Attention: It must start and end with a slash: '/'

    - QuickUploadAbsolutePath: the physical path to the above folder. It must be
        an absolute path.
        If it's an empty string then it will be autocalculated.
        Useful if you are using a virtual directory, symbolic link or alias.
        Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
        Attention: The above 'QuickUploadPath' must point to the same directory.
        Attention: It must end with a slash: '/'

        NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to
        "userfiles" directory to maintain backwards compatibility with older versions of FCKeditor.
        This is fine, but you in some cases you will be not able to browse uploaded files using file browser.
        Example: if you click on "image button", select "Upload" tab and send image
        to the server, image will appear in FCKeditor correctly, but because it is placed
        directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
        The more expected behaviour would be to send images directly to "image" subfolder.
        To achieve that, simply change
            $Config['QuickUploadPath']['Image']            = $Config['UserFilesPath'] ;
            $Config['QuickUploadAbsolutePath']['Image']    = $Config['UserFilesAbsolutePath'] ;
        into:   
            $Config['QuickUploadPath']['Image']            = $Config['FileTypesPath']['Image'] ;
            $Config['QuickUploadAbsolutePath']['Image']     = $Config['FileTypesAbsolutePath']['Image'] ;           
       
*/

$Config['AllowedExtensions']['File']    = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ;
$Config['DeniedExtensions']['File']        = array() ;
$Config['FileTypesPath']['File']        = $Config['UserFilesPath'] . 'file/' ;
$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;
$Config['QuickUploadPath']['File']        = $Config['UserFilesPath'] ;
$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;

$Config['AllowedExtensions']['Image']    = array('bmp','gif','jpeg','jpg','png') ;
$Config['DeniedExtensions']['Image']    = array() ;
$Config['FileTypesPath']['Image']        = $Config['UserFilesPath'] . 'image/' ;
$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;
$Config['QuickUploadPath']['Image']        = $Config['UserFilesPath'] ;
$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;

$Config['AllowedExtensions']['Flash']    = array('swf','flv') ;
$Config['DeniedExtensions']['Flash']    = array() ;
$Config['FileTypesPath']['Flash']        = $Config['UserFilesPath'] . 'flash/' ;
$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ;
$Config['QuickUploadPath']['Flash']        = $Config['UserFilesPath'] ;
$Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ;

$Config['AllowedExtensions']['Media']    = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ;
$Config['DeniedExtensions']['Media']    = array() ;
$Config['FileTypesPath']['Media']        = $Config['UserFilesPath'] . 'media/' ;
$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ;
$Config['QuickUploadPath']['Media']        = $Config['UserFilesPath'] ;
$Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ;

?>
Avatar billede zips Juniormester
29. december 2008 - 15:46 #7
Jeg har nu installeret FCKeditor og det virker fint for mig gennem localhost at få oprette mappen image og lægge billeder i med denne indstilling.

// SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
//        authenticated users can access this file or use some kind of session checking.
$Config['Enabled'] = true ;


// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/userfiles/' ;

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = 'C:\\Inetpub\\wwwroot\\userfiles\\' ;
Avatar billede pepsiman Juniormester
29. december 2008 - 19:58 #8
jeg har prøvet med localhost. det virker fint og det overrasker mig!

C:\\wamp\\www\\userfiles\\


så bruger jeg mit hjemmesiders navn  'C:\\xxxx\\userfiles\\' Det virker ikke :(

har du prøvet med dit privat hjemmesider? fungere det da?
Avatar billede pepsiman Juniormester
29. december 2008 - 20:15 #9
jeg har fundet ude af det..

mit mappe 'xxxx' har ingen userfiles... wamp har da.. underligt.
Avatar billede pepsiman Juniormester
29. december 2008 - 20:21 #10
jeg har prøvet at oprette 2 mappe under xxxx - www,userfiles

Det gik ikke :(
Avatar billede zips Juniormester
29. december 2008 - 20:22 #11
Jeg har lige lagt det på nettet som test, min config.php kom til at se sådan her ud.

// Path to user files relative to the document root.
$Config['UserFilesPath'] = 'httpdocs/fcktest/' ;

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '/srv/www/vhosts/prebendahl.dk/httpdocs/fcktest/' ;

Husk at mappen skal være Chmod 777 for at den kan oprette mappen image
Avatar billede pepsiman Juniormester
29. december 2008 - 20:31 #12
hvad står httpdocs for?
Avatar billede zips Juniormester
29. december 2008 - 20:35 #13
httpdocs er den mappe på min server som alle mine filer og mapper er public.

Her er test siden http://prebendahl.dk/fckeditor/_samples/default.html
Avatar billede pepsiman Juniormester
29. december 2008 - 20:50 #14
jeg kan ikke ser noget hos mig i ftp.. public.

hjemmesider ligger hos one.com.

jeg ved ikke hvordan...
Avatar billede zips Juniormester
29. december 2008 - 20:56 #15
Opret en php fil med dette og åben den i din browser, så vil det stå der.

<?php
echo "<html>" . $_SERVER["DOCUMENT_ROOT"] . "</html>";
?>

Her er min test http://prebendahl.dk/rod.php
Avatar billede pepsiman Juniormester
29. december 2008 - 20:57 #16
2 sek
Avatar billede pepsiman Juniormester
29. december 2008 - 21:05 #17
customers/xxxx.dk/xxxx.dk/httpd.www fra rod.php

// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/xxxx.dk/httpd.www/' ;

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = 'customers/xxxx.dk/xxxx.dk/httpd.www ' ;

måske jeg skrive forkert
Avatar billede zips Juniormester
29. december 2008 - 21:09 #18
Måske skal denne $Config['UserFilesPath'] = '/xxxx.dk/httpd.www/' ; ikke have xxxx.dk med, altså sådan her $Config['UserFilesPath'] = '/httpd.www/' ;

Jeg går ud fra at din root er httpd.www
Avatar billede pepsiman Juniormester
29. december 2008 - 21:10 #19
jeg har glemte at skrive / på.. nu kan jeg henter billeder, men desværre viser billeder ikke sig..
Avatar billede pepsiman Juniormester
29. december 2008 - 21:16 #20
jeg kan ser noget billede i image,der sætter til 777..
Avatar billede zips Juniormester
29. december 2008 - 21:25 #21
I din root har du nu en mappe som hedder image?

I min config.php er der en fejl i det jeg har skrevet, det skal være sådan her $Config['UserFilesPath'] = '/fcktest/' ; ellers vises billedet ikke.

Som du kan se har jeg selv lavet en mappe fcktest som er sat til 777 og her efter opretter den fint mappen image i den mappe.
Avatar billede pepsiman Juniormester
29. december 2008 - 21:31 #22
ja mappe hedder image

$Config['UserFilesPath'] = '/text/'


jeg har henter billedet og url viser: text/image/test.jpg..

det viser alligevel ikke sig..
Avatar billede pepsiman Juniormester
29. december 2008 - 21:36 #23
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/image/' ;

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '/customers/xxxx.dk/xxxx.dk/httpd.www/' ;
Avatar billede zips Juniormester
29. december 2008 - 21:41 #24
Prøv at oprette en mappe som jeg har gjort og chomod den til 777 og sæt den ind i din config.php som her

    // Path to user files relative to the document root.
$Config['UserFilesPath'] = '/test/' ;

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '/customers/xxxx.dk/xxxx.dk/httpd.www/test/' ;

Slut mappen skal hedde det samme , her er det test.
Avatar billede pepsiman Juniormester
29. december 2008 - 21:55 #25
Nu virker det,fordi jeg klikke på forkert knap - genererelt står for url,hehe

det skulle være upload..mit øjne må være træt..-_-

jeg beklager at splide din tid :/

tak for din tid. svar.
Avatar billede zips Juniormester
29. december 2008 - 21:58 #26
Her er et svar :)
Avatar billede pepsiman Juniormester
29. december 2008 - 22:01 #27
lukket
Avatar billede zips Juniormester
29. december 2008 - 22:07 #28
Tak for point :)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester



IT-JOB