Foros del Web » Programando para Internet » PHP »

Problemas spaw2 y document_root

Estas en el tema de Problemas spaw2 y document_root en el foro de PHP en Foros del Web. Acabo de subir mi web al hosting de 1and1. Dicha web lleva un gestor de contenidos en el que utilizo el spaw2, como editor. El ...
  #1 (permalink)  
Antiguo 22/07/2010, 12:20
 
Fecha de Ingreso: julio-2010
Mensajes: 2
Antigüedad: 13 años, 9 meses
Puntos: 0
Problemas spaw2 y document_root

Acabo de subir mi web al hosting de 1and1. Dicha web lleva un gestor de contenidos en el que utilizo el spaw2, como editor.
El problema es que al entrar en la parte de administración no me muestra dicho editor.

El DOCUMENT_ROOT del hosting es: homepages/23/d318746926/htdocs/ , y el dominio que tengo es www.samesa.net

El spaw2 no localiza las imágenes en la ruta homepages/23/d318746926/htdocs/, pero si esto lo sustituyo por “samesa.net”, si las muestra.

¿Cómo puedo cambiar el archivo config.php para que funcione?

Este es el archivo config.php del spaw2

<?php
require_once(str_replace('\\\\','/',dirname(__FILE__)).'/../../../Connections/conf.php');

require_once(str_replace('\\\\','/',dirname(__FILE__)).'/../class/config.class.php');
require_once(str_replace('\\\\','/',dirname(__FILE__)).'/../class/util.class.php');

// sets physical filesystem directory of web site root empty.html

// if calculation fails (usually if web server is not apache) set this manually
if ($LINUX)
{
SpawConfig::setStaticConfigItem('DOCUMENT_ROOT ', str_replace("\\","/",SpawVars::getServerVar("DOCUMENT_ROOT ")));
if (!ereg('/$', SpawConfig::getStaticConfigValue('DOCUMENT_ROOT ')))
SpawConfig::setStaticConfigItem('DOCUMENT_ROOT ', SpawConfig::getStaticConfigValue('DOCUMENT_ROOT ').'/');

// el servidor de callate la boca devuelve como DOCUMENT_ROOT /www, cuando es /var/www
if (!$SERVIDOR_PROPIO)
SpawConfig::setStaticConfigItem('DOCUMENT_ROOT ', '/var'.SpawConfig::getStaticConfigValue('DOCUMENT_RO OT '));

// sets physical filesystem directory where spaw files reside

// should work fine most of the time but if it fails set SPAW_ROOT manually by providing correct path

SpawConfig::setStaticConfigItem('SPAW_ROOT', str_replace("\\","/",realpath(dirname(__FILE__)."/..").'/'));

// sets virtual path to the spaw directory on the server

// if calculation fails set this manually

SpawConfig::setStaticConfigItem('SPAW_DIR', '/'.str_replace(SpawConfig::getStaticConfigValue("DO CUMENT_ROOT "),'',SpawConfig::getStaticConfigValue("SPAW_ROOT" )));
// Presupone que estas en la jerarquia de documentroot, y puede que estes fuera de ella accediendo por

//echo "DEBUG: ".SpawConfig::getStaticConfigValue("DOCUMENT_R OOT ");
//echo "<BR>DEBUG: ".SpawConfig::getStaticConfigValue("SPAW_ROOT" );
//echo "<BR>DEBUG: ".SpawConfig::getStaticConfigValue("SPAW_DIR") ;
}
else // WINDOWS con MS IIS
{
// under IIS you will probably need to setup the above paths manually. it would be something like this
// PATHS DE GLOBOMEDIA
SpawConfig::setStaticConfigItem('DOCUMENT_ROOT ', 'e:/webs/');
SpawConfig::setStaticConfigItem('SPAW_ROOT', 'e:/webs/www.elsuenodemorfeo.com/www/spaw2/');
SpawConfig::setStaticConfigItem('SPAW_DIR', '/www/spaw2/');
}

// DEFAULTS used when no value is set from code

// language

SpawConfig::setStaticConfigItem('default_lang','en ');

// output charset (empty strings means charset specified in language file)

SpawConfig::setStaticConfigItem('default_output_ch arset','');

// theme

SpawConfig::setStaticConfigItem('default_theme','s paw2');

// toolbarset

SpawConfig::setStaticConfigItem('default_toolbarse t','standard');

// stylesheet

SpawConfig::setStaticConfigItem('default_styleshee t',SpawConfig::getStaticConfigValue('SPAW_DIR').'w ysiwyg.css');

// width

SpawConfig::setStaticConfigItem('default_width','1 00%');

// height

//SpawConfig::setStaticConfigItem('default_height',' 200px');



// specifies if language subsystem should use iconv functions to convert strings to the specified charset

SpawConfig::setStaticConfigItem('USE_ICONV',true);

// specifies rendering mode to use: "xhtml" - renders using spaw's engine, "builtin" - renders using browsers engine

SpawConfig::setStaticConfigItem('rendering_mode', 'xhtml', SPAW_CFG_TRANSFER_JS);

// specifies that xhtml rendering engine should indent it's output

SpawConfig::setStaticConfigItem('beautify_xhtml_ou tput', true, SPAW_CFG_TRANSFER_JS);

// specifies host and protocol part (like http://mydomain.com) that should be added to urls returned from file manager (and probably other places in the future)

SpawConfig::setStaticConfigItem('base_href', '', SPAW_CFG_TRANSFER_JS);

// specifies if spaw should strip domain part from absolute urls (IE makes all links absolute)

SpawConfig::setStaticConfigItem('strip_absolute_ur ls', true, SPAW_CFG_TRANSFER_JS);

// specifies in which directions resizing is allowed (values: none, horizontal, vertical, both)

SpawConfig::setStaticConfigItem('resizing_directio ns', 'vertical', SPAW_CFG_TRANSFER_JS);



// data for style (css class) dropdown list

SpawConfig::setStaticConfigItem("dropdown_data_cor e_style",

array(

'' => 'Normal',

'style1' => 'Encabezado 1',

'style2' => 'Encabezado 2',

'style3' => 'Encabezado 3',

'style4' => 'P&aacute;rrafo',

'style5' => 'Imagen izda',

'style6' => 'Imagen dcha',

)

);

// data for style (css class) dropdown in table properties dialog

SpawConfig::setStaticConfigItem("table_styles",

array(

'' => 'Normal',

'style1' => 'Encabezado 1',

'style2' => 'Encabezado 2',

'style3' => 'Encabezado 3',

'style4' => 'P&aacute;rrafo',

'style5' => 'Imagen izda',

'style6' => 'Imagen dcha',

)

);

// data for fonts dropdown list

SpawConfig::setStaticConfigItem("dropdown_data_cor e_fontname",

array(

'Arial' => 'Arial',

'Courier' => 'Courier',

'Tahoma' => 'Tahoma',

'Times New Roman' => 'Times',

'Verdana' => 'Verdana'

)

);

// data for fontsize dropdown list

SpawConfig::setStaticConfigItem("dropdown_data_cor e_fontsize",

array(

'1' => '1',

'2' => '2',

'3' => '3',

'4' => '4',

'5' => '5',

'6' => '6'

)

);

// data for paragraph dropdown list

SpawConfig::setStaticConfigItem("dropdown_data_cor e_formatBlock",

array(

'Normal' => 'Normal',

'<H1>' => 'Heading 1',

'<H2>' => 'Heading 2',

'<H3>' => 'Heading 3',

'<H4>' => 'Heading 4',

'<H5>' => 'Heading 5',

'<H6>' => 'Heading 6'

)

);

// data for link targets drodown list in hyperlink dialog

SpawConfig::setStaticConfigItem("a_targets",

array(

'_self' => 'Self',

'_blank' => 'Blank',

'_top' => 'Top',

'_parent' => 'Parent'

)

);





// toolbar sets (should start with "toolbarset_"

// standard core toolbars

SpawConfig::setStaticConfigItem('toolbarset_standa rd',

array(

"format" => "format",

"style" => "style",

"edit" => "edit",

"table" => "table",

"plugins" => "plugins",

"insert" => "insert",

"tools" => "tools"

)

);

// all core toolbars

SpawConfig::setStaticConfigItem('toolbarset_all',

array(

"format" => "format",

"style" => "style",

"edit" => "edit",

"table" => "table",

"plugins" => "plugins",

"insert" => "insert",

"tools" => "tools",

"font" => "font"

)

);

// mini core toolbars

SpawConfig::setStaticConfigItem('toolbarset_mini',

array(

"format" => "format_mini",

"edit" => "edit",

"tools" => "tools"

)

);







// SpawFm plugin config:



// global filemanager settings

SpawConfig::setStaticConfigItem(

'PG_SPAWFM_SETTINGS',

array(

'allow_upload' => true, // allow uploading new files in directory

'allow_modify' => true, // allow edit filenames/delete files in directory

'max_upload_filesize' => 1048576, // max upload file size allowed in bytes, or 0 to ignore

'max_img_width' => 0, // max uploaded image width allowed, or 0 to ignore

'max_img_height' => 0, // max uploaded image height allowed, or 0 to ignore

'chmod_to' => 0755, // change the mode of an uploaded file (like to octal 0777 - see PHP chmod()

// function description for details), or false to leave default

'allowed_filetypes' => array('images'), // allowed filetypes groups/extensions

'recursive' => false, // allow using subdirectories

'allow_modify_subdirectories' => false, // allow renaming/deleting subdirectories

'allow_create_subdirectories' => false, // allow creating subdirectories

//'view_mode' => 'list', // directory view mode: list/details/thumbnails - TO DO

//'thumbnails_enabled' => true, // enable thumbnails view mode - TO DO

),

SPAW_CFG_TRANSFER_SECURE

);



// directories

Etiquetas: Ninguno
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:44.