Recordad que para pedir soporte alguno, debéis facilitar los datos de soporte oportunos por favor, mirad aquí y leer las Normas generales del foro, esto nos servirá de ayuda para dar el mejor soporte..

Gracias.

La Administración de phpBB España.

open_basedir (error ayuden) instalaciond de lateX

Foros donde podréis dejar vuestras dudas sobre phpBB 3.0.x
Cerrado

0
No hay votos
 
Votos totales: 0

dNielf
Observador/a
Mensajes: 28
Registrado: 06 Sep 2008, 06:06

open_basedir (error ayuden) instalaciond de lateX

#1

Mensaje por dNielf »

miren me sale este error:

[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 120: bbcode::include() [bbcode.include]: open_basedir restriction in effect. File(/var/htdocs/foros/latexrender/phpbb_hook_2.php) is not within the allowed path(s): (/tmp:/var/tmp:/var/www/errors:/usr/share/php:/home/vol4/eshost.com.ar/eshos_2326133/htdocs)
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 120: bbcode::include(/var/htdocs/foros/latexrender/phpbb_hook_2.php) [bbcode.include]: failed to open stream: Operation not permitted
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 120: bbcode::include() [function.include]: Failed opening '/var/htdocs/foros/latexrender/phpbb_hook_2.php' for inclusion (include_path='.:/usr/share/php:/tmp')

estoy tratando de instalar latex en mi foro

aca esta el readme. Ayuden pls:
Spoiler
#################################################################
## Mod Title: LaTeX Rendering Class
## Mod Version: 0.8
## Copyright (C) 2003/2004 Benjamin Zeiss <zeiss@math.uni-goettingen.de>
## Maintained from version 0.7 by Steve Mayer <mayer@dial.pipex.com>
##
## Revised version for phpBB3 following sisteczko at
## http://www.phpbb.com/community/viewtopi ... a#p3671325" onclick="window.open(this.href);return false;
## phpBB3 automates the adding of buttons so the process is simpler
##
## Description: This Class is supposed to offer easy to use functionality to render LaTeX
## formulas into pictures
## Discussion on LatexRender can be found at http://www.phpbb.com/phpBB/viewtopic.php?t=94454" onclick="window.open(this.href);return false;
## In Linux do "which latex", "which convert" and "which identify" to find the paths which could
## well be the default given in the file. If they are not there they will need to be installed.
## For Unix compatible systems (distributions commonly include LaTeX), a common LaTeX
## distribution is teTeX available from http://www.tug.org/teTeX/" onclick="window.open(this.href);return false;
## For Windows, MiKTeX can be found at http://www.miktex.org/" onclick="window.open(this.href);return false;
## ImageMagick is at http://www.imagemagick.org/" onclick="window.open(this.href);return false;
##
## thanks
## Ulrich Klauer (for sending bad latex tags)
## Steve Mayer (for bugfixing, more phpbb tweaks and evangelism work :-))
##
## Benjamin Zeiss
##
## Installation Level: Easy
## Installation Time: 10 Minutes
## Files To Edit: includes/bbcode.php, templates/subSilver/posting_body.tpl,
## language/lang_english/lang_main.php, posting.php
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
##
#
# Make a new folder called latexrender directly below the forum's root folder
# Create latexrender/pictures and latexrender/tmp folders.
# These must be readable and writeable by the webserver which may mean chmod 777

# Adjust the paths in phpbb_hook_2.php in the 2 lines:
# $latexrender_path = "/home/domain_name/public_html/phpbb/latexrender";
# $latexrender_path_http = "/phpbb/latexrender";

# Adjust the paths in class.latexrender.php, if necessary, to point to the latex, dvips and ImageMagick executables
# var $_latex_path = "/usr/bin/latex";
# var $_dvips_path = "/usr/bin/dvips";
# var $_convert_path = "/usr/bin/convert";
# var $_identify_path="/usr/bin/identify";
# For Windows the paths in class.latexrender.php must use \\ or / not just a single \
# For example
# var $_latex_path = "C:\\texmf\\miktex\\bin\\latex.exe";
# or
# var $_latex_path = "C:/texmf/miktex/bin/latex.exe";

# Adjust any other variables at the beginning of class.latexrender.php that you wish to change,
# the default values should work fine

# Copy all files and folders to their respective locations
#
# latexrender/phpBB/class.latexrender.php -> latexrender/class.latexrender.php
# latexrender/phpBB/index.php -> latexrender/index.php
# latexrender/phpBB/phpbb_hook_2.php -> latexrender/phpbb_hook_2.php
# latexrender/phpBB/pictures -> latexrender/pictures
# latexrender/phpBB/pictures/index.php -> latexrender/pictures/index.php
# latexrender/phpBB/tmp -> latexrender/tmp
# latexrender/phpBB/tmp/index.php -> latexrender/tmp/index.php
#
# phpbb_hook_1.php is not required for phpBB3

#
#-----[ OPEN ]---------------------------------------------
#
phpbb_hook_2.php

#
#-----[ FIND ]---------------------------------------------
Two occurances of $uid
#
#-----[ REPLACE WITH]---------------------------------------------
$bbcode_uid

#
#-----[ FIND ]---------------------------------------------
Six occurances of $text
#
#-----[ REPLACE WITH]---------------------------------------------
$message

#
#-----[ OPEN ]---------------------------------------------
#
includes/bbcode.php

#
#-----[ FIND ]---------------------------------------------
# around line 118
// Remove the uid from tags that have not been transformed into HTML

#
#-----[ BEFORE, ADD ]--------------------------------------
#
## replace the path below with your path
include("/var/www/phpBB3/latexrender/phpbb_hook_2.php");


## Add a TeX button which will add the [tex] and [/tex] tags
#
#-----[ OPEN ]---------------------------------------------
#
Administrative Control Panel

#
#-----[ FIND ]---------------------------------------------
#
posting->BBCode usage

#
#-----[ AFTER, ADD ]--------------------------------------
#
[tex]{TEXT}[/tex]

Check Display on Posting, and click Submit

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#

Further notes:

1. LatexRender produces GIFs by default - if you prefer PNG then change the variable at the beginning
of class.latexrender.php. Be aware though that ImageMagick may not make PNGs transparent so may show them
with a white background

2. The default is to use article.cls for LaTeX which is a common class but it only supports 10,11,12 point
font sizes. For smaller (or larger fonts) in the image, install the extsizes package available from CTAN
http://ctan.tug.org/" onclick="window.open(this.href);return false;. Add these files to a new extsizes directory in usr/share/texmf/tex/latex.
Refresh the database using "texhash" command, assuming you are using teTeX.
Then in class.latexrender.php you can change var $_font_size = 10; to var $_font_size = 8;

3. You can allow larger images and/or longer latex code by adjusting the default 500 in
class.latexrender.php in the lines
var $_xsize_limit = 500;
var $_ysize_limit = 500;
var $_string_length_limit = 500;

4. You can make equation arrays and other code that starts with \begin, by prefacing them with 2 new lines.

5. Displayed formulae can be rendered using \displaystyle and <center> tag

# EoM
--------------------------------------------------------------------
* URL: http://www.substudy.tk" onclick="window.open(this.href);return false;
* MODs instalados: MODs por defecto
* Nombre y versión del MOD: -----
* URL del MOD: ------
* Versión de phpBB: phpBB3
* Servidor: http://eshost.com.ar" onclick="window.open(this.href);return false;
* Si es una actualización desde otra versión: no
*URL: http://www.substudy.tk" onclick="window.open(this.href);return false;
* MODs instalados: MODs por defecto
* Nombre y versión del MOD: ajax_chat,mimetex
* Versión de phpBB: phpBB 3.0.2
* Servidor: http://000webhost.com" onclick="window.open(this.href);return false;
* Si es una actualización desde otra versión: phpbb 3.0.1

Shaddow
Observador/a
Mensajes: 3
Registrado: 12 Sep 2008, 18:37

Re: open_basedir (error ayuden) instalaciond de lateX

#2

Mensaje por Shaddow »

Eso es un problema por intentar incluir un fichero que no está en ninguna de las rutas autorizadas. En vez de usar la ruta absoluta usa rutas relativas.

Cambia
include("/var/htdocs/foros/latexrender/phpbb_hook_2.php");

Por:
include("../latexrender/phpbb_hook_2.php");

Saludos

dNielf
Observador/a
Mensajes: 28
Registrado: 06 Sep 2008, 06:06

Re: open_basedir (error ayuden) instalaciond de lateX

#3

Mensaje por dNielf »

mmm con los puntos .. ?
*URL: http://www.substudy.tk" onclick="window.open(this.href);return false;
* MODs instalados: MODs por defecto
* Nombre y versión del MOD: ajax_chat,mimetex
* Versión de phpBB: phpBB 3.0.2
* Servidor: http://000webhost.com" onclick="window.open(this.href);return false;
* Si es una actualización desde otra versión: phpbb 3.0.1

Shaddow
Observador/a
Mensajes: 3
Registrado: 12 Sep 2008, 18:37

Re: open_basedir (error ayuden) instalaciond de lateX

#4

Mensaje por Shaddow »

Si, ¿no funciona?

Avatar de Usuario
Giovy
Observador/a
Mensajes: 19
Registrado: 18 Oct 2006, 05:32
Género:
Edad: 53

Re: open_basedir (error ayuden) instalaciond de lateX

#5

Mensaje por Giovy »

Ando en lo mismo, al parecer hice todo lo indicado y me sale este errro

[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 118: bbcode_second_pass(../latexrender/phpbb_hook_2.php) [function.bbcode-second-pass]: failed to open stream: No such file or directory
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 118: bbcode_second_pass(../latexrender/phpbb_hook_2.php) [function.bbcode-second-pass]: failed to open stream: No such file or directory
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 118: bbcode_second_pass() [function.include]: Failed opening '../latexrender/phpbb_hook_2.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php')
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3545: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3547: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3548: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3549: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
*URL: http://www.cjeo-peru.com/foro" onclick="window.open(this.href);return false;
* MODs instalados: MODs por defecto
* Nombre y versión del MOD: ninguno
* Versión de phpBB: phpBB 3.0.2
* Servidor: http://www.cjeo-peru.com" onclick="window.open(this.href);return false;
* Si es una actualización desde otra versión: ----

Avatar de Usuario
Giovy
Observador/a
Mensajes: 19
Registrado: 18 Oct 2006, 05:32
Género:
Edad: 53

Re: open_basedir (error ayuden) instalaciond de lateX

#6

Mensaje por Giovy »

Seguí estas instrucciones :shock: .. disculpen pero mis conocimientos todavia son de un 5% :roll: en todo esto, pero la ando luchando para lograr aprender :lee ...

Off Topic:
PhpBB3 supone que está instalado en / var/www/phpBB3 y se ejecuta en el servidor Ubuntu 7.04 (que también debería aplicarse a Debian Linux también)
1. En el tipo de terminal: sudo apt-get install imagemagick texlive gs
2. Descargar, y desempaquetar latexrender.zip en / var/www/phpBB3/latexrender
3. Añadir los permisos adecuados. En la consola escribir:
Código: Seleccionar todo
sudo chmod -R u=rw /var/www/phpBB3/latexrender
sudo chmod -R g=r /var/www/phpBB3/latexrender
sudo chmod -R o=r /var/www/phpBB3/latexrender
sudo chmod u=rwx /var/www/phpBB3/latexrender/tmp
sudo chmod g=rwx /var/www/phpBB3/latexrender/tmp
sudo chmod o=rwx /var/www/phpBB3/latexrender/tmp
sudo chmod u=rwx /var/www/phpBB3/latexrender/pictures
sudo chmod g=rwx /var/www/phpBB3/latexrender/pictures
sudo chmod o=rwx /var/www/phpBB3/latexrender/pictures

4. Abra el archivo / var/www/phpBB3/latexrender/phpbb_hook_2.php.
5. Reemplazar todas las ocurrencias de dos uid $ en $ bbcode_uid. Debido a los permisos de los ficheros que debe ser root para hacer eso.
6. Reemplace todas las seis apariciones de texto en $ $ mensaje.
7. Abra el archivo / var/www/phpBB3/includes/bbcode.php y en la línea 118 (justo antes de "/ / Eliminar el uid de etiquetas que no se han transformado en HTML"), añadir el texto siguiente:
Código: Seleccionar todo
include("/var/www/phpBB3/latexrender/phpbb_hook_2.php");

8. Abra el Panel de Control Administrativo de phpBB3 utilizando la interfaz web, y en virtud del desplazamiento-> BBCode poner el uso
Código: Seleccionar todo
[tex]{TEXT}[/tex]

y comprobar en la pantalla de envío, y haga clic en Enviar.
9. Opcionalmente se puede querer hacer su propio LaTeX comandos disponibles para los usuarios de foro. Para ello tenemos que añadir a las líneas / var/www/phpBB3/latexrender/class.latexrender.php, entre las líneas 184 y 185:
Código: Seleccionar todo
function wrap_formula($latex_formula) {
$string = "\documentclass[".$this->_font_size."pt]{".$this->_latexclass."}\n";
$string .= "\usepackage[latin1]{inputenc}\n";
$string .= "\usepackage{amsmath}\n";
$string .= "\usepackage{amsfonts}\n";
$string .= "\usepackage{amssymb}\n";
<PUT NEW \usepackage OR \newcommand OR \DeclareMathOperator OR whatever here>
$string .= "\pagestyle{empty}\n";
$string .= "\begin{document}\n";
$string .= "$".$latex_formula."$\n";
$string .= "\end{document}\n";

return $string;
}

Cada LaTeX necesidad de comando envuelto en comillas. También tenemos que sustituir la barra con doble reacción (\ -> \ \), las comillas con barra quatation marca ( "-> \"). Cada línea debe terminar con \ n.
Ejemplo:
Código: Seleccionar todo
$string .= "\\newcommand{\\dbar}{d\\mkern-6mu\\mathchar'26}\n";
$string .= "\\newcommand{\\suchas}[1]{\\Bigr\\rvert_{#1}}\n";

Observaciones:
• Sí, si no queremos añadir comandos personalizados LaTeX, no la edición de class.latexrender.php se requiere en Ubuntu Server.
• Tengo totalmente idea de por qué no en el original cadena literal en función wrap_formula (/ var/www/phpBB3/latexrender/class.latexrender.php, líneas 188) único reacciones no se sustituye con el doble de barras ... Pero si queremos añadir comandos personalizados LaTeX que se corrió, tenemos que utilizar las directrices del punto 9.
*URL: http://www.cjeo-peru.com/foro" onclick="window.open(this.href);return false;
* MODs instalados: MODs por defecto
* Nombre y versión del MOD: ninguno
* Versión de phpBB: phpBB 3.0.2
* Servidor: http://www.cjeo-peru.com" onclick="window.open(this.href);return false;
* Si es una actualización desde otra versión: ----

Avatar de Usuario
Giovy
Observador/a
Mensajes: 19
Registrado: 18 Oct 2006, 05:32
Género:
Edad: 53

Re: open_basedir (error ayuden) instalaciond de lateX

#7

Mensaje por Giovy »

Ah, los permitos dados fueron a través del CPanel y se le dio el maximo 777

saludos y gracias por si me pueden dar una luz.
*URL: http://www.cjeo-peru.com/foro" onclick="window.open(this.href);return false;
* MODs instalados: MODs por defecto
* Nombre y versión del MOD: ninguno
* Versión de phpBB: phpBB 3.0.2
* Servidor: http://www.cjeo-peru.com" onclick="window.open(this.href);return false;
* Si es una actualización desde otra versión: ----

Cerrado

Volver a “Foros de Soporte 3.0.x”