Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
huntor
Regular
Regular



Joined: Jun 13, 2006
Posts: 54

PostPosted: Tue Oct 05, 2010 1:20 pm Reply with quote

Hi guys long time no post!!!!

I have recently changed over from apache to abyss web server. I also upgraded php version from 5.2 to 5.3.3 version. As of right now have not ran into any issues, atleast not anything big.
Version is 2.4.01

I went to use the FCKeditor to upload an image and got an error.

Sorry, can't map "UserFilesPath" to a physical path. You must set the
"UserFilesAbsolutePath" value in "editor/filemanager/connectors/php/config.php".

I did not mess with this file at all.

Any help on this would be great!!!!!

P.S. The preview box is not in english. Or default language.
 
View user's profile Send private message
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

PostPosted: Tue Oct 05, 2010 2:10 pm Reply with quote

I'm not familar with abyss but I am guessing the path in use is reletive to the webroot and for some reason its different now. I've never bothered to chase down that language issue but its been a long standing one.

If you open public_html/includes/fckeditor/editor/filemanager/connectors/php/config.php you can experiment with different pathes to find one that works.
// 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'] = '' ;

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
huntor







PostPosted: Tue Oct 05, 2010 4:04 pm Reply with quote

Quick question as I am trying to narrow this down. When using the

<?php
echo $_SERVER['PHP_SELF'];
?>

In the root directory should it just give me the answer of
/

Or

/phptest.php


phptest.php is the filename of the testing file im using.
 
huntor







PostPosted: Tue Oct 05, 2010 4:38 pm Reply with quote

Well After I upload the file I get this for location

C:\websites\jackiepope.com\image/primetech130by1305(3).png

As you can see the slashes change and the wrong image folder shows as it should be images
 
huntor







PostPosted: Tue Oct 05, 2010 5:14 pm Reply with quote

Well I managed to get it working with a few modifications.

Code:



<?php
/*
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2009 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'] = false;
// Get $uploadpath override and authorize (ability for unauthorized upload identified by S. Electric)
define('INSIDE_FCKCONFIG', true);
define('INCLUDE_PATH', '../../../../../../');
include_once(INCLUDE_PATH.'config.php');
require_once(INCLUDE_PATH.'db/db.php');
if (is_admin_connector($_COOKIE['admin'])) $Config['Enabled'] = true ;
else $Config['Enabled'] = false ;

// Path to user files relative to the document root.
$sBasePath = $_SERVER['PHP_SELF'] ;
$sBasePath = str_replace('\\/', '/', $sBasePath.'/');
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, 'includes' ) );
if ($uploadpath > '') $sBasePath = $uploadpath;
else $sBasePath .= 'uploads/';
//$Config['UserFilesPath'] = $sBasePath ;
//$Config['UserFilesPath'] = '/userfiles/' ;
[color=red]$Config['UserFilesPath'] = 'http://jackiepope.com/' ;[/color]

// 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'] = '' ; //Original
[color=red]$Config['UserFilesAbsolutePath'] = 'C:/websites/jackiepope.com/' ;[/color]

// 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") ;

// After file is uploaded, sometimes it is required to change its permissions
// so that it was possible to access it at the later time.
// If possible, it is recommended to set more restrictive permissions, like 0755.
// Set to 0 to disable this feature.
// Note: not needed on Windows-based servers.
$Config['ChmodOnUpload'] = 0777 ;

// See comments above.
// Used when creating folders that does not exist.
$Config['ChmodOnFolderCreate'] = 0777 ;

/*
   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'] . 'file/' ;
$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;

$Config['AllowedExtensions']['Image']   = array('bmp','gif','jpeg','jpg','png') ;
$Config['DeniedExtensions']['Image']   = array() ;
[color=red]$Config['FileTypesPath']['Image']      = $Config['UserFilesPath'] . 'images/' ;[/color]
$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : [color=red]$Config['UserFilesAbsolutePath'].'images/' ;[/color]
$Config['QuickUploadPath']['Image']      = $Config['UserFilesPath'] . 'images/' ;
$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'] . 'flash/' ;
$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'] . 'media/' ;
$Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ;

function is_admin_connector($admin) {
    static $adminSave;
    if (isset($adminSave)) return $adminSave;
    if (!is_array($admin)) {
        $admin = base64_decode($admin);
        $admin = addslashes($admin);
        $admin = explode(':', $admin);
    }
    $aid=$pwd='';
    if (isset($admin[0])) $aid = $admin[0];
    if (isset($admin[1])) $pwd = $admin[1];
    $aid = substr(addslashes($aid), 0, 25);
    if (!empty($aid) && !empty($pwd)) {
        global $prefix, $db;
        $sql = 'SELECT pwd FROM '.$prefix.'_authors WHERE aid=\''.$aid.'\'';
        $result = $db->sql_query($sql);
        $pass = $db->sql_fetchrow($result);
        if ($pass[0] == $pwd && !empty($pass[0])) {
            return $adminSave = 1;
        }
    }
    return $adminSave = 0;
}

?>
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Tue Oct 05, 2010 5:45 pm Reply with quote

Interesting. What is abyss and why did you choose it?

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
huntor







PostPosted: Tue Oct 05, 2010 6:20 pm Reply with quote

I actually made another change with how it works

//************ Edits to work with Abyss and other web servers **************
$gettheabsolutepath = $_SERVER['DOCUMENT_ROOT']. "/";
$getuserdomainname = "http://". $_SERVER['SERVER_NAME']. "/";

I used those for the according path.
I run windows 2008 server and there has been compatibility issues with apache 2.2x versions. I posted over there a few times without much luck on that end of things also php 5.3.3 did not like it for above reasons as well but the 5.2 worked without any problems. Apache would dump constant because of the newere mysqlnd
 
huntor







PostPosted: Tue Oct 05, 2010 7:11 pm Reply with quote

Abyss is basically apache just a little more user friendly. It has a web interface to do all the changes on the fly.
[ Only registered users can see links on this board! Get registered or login! ]

It is also for windows and linux.
 
kguske







PostPosted: Tue Oct 05, 2010 8:23 pm Reply with quote

Are you running it on Windows?
 
huntor







PostPosted: Tue Oct 05, 2010 9:43 pm Reply with quote

yes windows 2008
 
dad7732
RavenNuke(tm) Development Team



Joined: Mar 18, 2007
Posts: 1242

PostPosted: Wed Oct 06, 2010 1:02 pm Reply with quote

huntor wrote:
yes windows 2008


You're running 2008 Server as a "client"??
 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Wed Oct 06, 2010 2:32 pm Reply with quote

dad7732 wrote:
huntor wrote:
yes windows 2008


You're running 2008 Server as a "client"??
?

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
dad7732







PostPosted: Wed Oct 06, 2010 2:52 pm Reply with quote

[ Only registered users can see links on this board! Get registered or login! ]

However, W2008 Server can be converted to a workstation.
 
kguske







PostPosted: Wed Oct 06, 2010 5:19 pm Reply with quote

Using FCKeditor with Windows HTTP servers will likely require special configuration.
 
dad7732







PostPosted: Wed Oct 06, 2010 7:16 pm Reply with quote

Yes, that's the point of my bringing it up. Wink

Cheers
 
huntor







PostPosted: Thu Oct 07, 2010 4:37 pm Reply with quote

im not using iis. I have been running apache 2.2.16 for a few years with windows 2008 Web Server 64bit. Basically a waste of money!!! But since I have it I been using it.
I recently switched over to abyss. Just started having the issues that I mentioned above. But I have several accounts using ravens nuke and from what I am getting it is only happening with just that one. It is also the oldest version starting out wise that I am using. 2.02.02 or something like that back in the day. I am wondering if something carried over from that version is causing this issue. I have to verify with the other websites which all used the 2.30 version to start out with.

I will get back with you guys.

Also I use this version of windows for other things like hosting games and what not. Hence why it is not a linux or windows 2003 version. 2008 web edition allows for more ram since 2003 cuts off at 2 gigs.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©