Notas de la Etiqueta: php

Error al actualizar PHPList

Cuando actualicé PHPList de la versión 3.0.5 a la versión 3.0.11 me surgió un error al querer ingresar a la página http://novedades.dominio.com/boletin/admin/?page=upgrade para finalizarla.

El error que lanzaba era HTTP Error 500: Internal Server Error – The server encountered an internal error or misconfiguration and was unable to complete your request

Aparentemente, el error se genera porque la instalación la tengo en un subdominio y se pierde en alguna ruta.

La solución que encontré es modificar el archivo .htaccess de la carpeta root y agregarle la línea RewriteBase /

Entonces, el archivo quedaría así:

DirectoryIndex index.php
RewriteBase /                    # Agregar esta línea.

<FilesMatch "\.(php|inc)$">
Order allow,deny
deny from all
</FilesMatch>
<FilesMatch "(index.php|dl.php|ut.php|lt.php|download.php|connector.php)$">
Order allow,deny
allow from all
</FilesMatch>

# if you want more than this for attachments, you can increase these values
# but you really, really should consider uploading them somewhere
# and only sending a link in your mails
# bigger than this really doesn't make sense in emails

## these lines are now commented out, to avoid 500 errors, https://mantis.phplist.com/view.php?id=9937
## but you should consider adding them

#php_value upload_max_filesize 3M
#php_value post_max_size 4M

PHP :: Problemas de strtoupper con acentos, ñ, diéresis, etc.

texto extraído de: http://blog.controlzeta.net/?p=427

Si en PHP queremos pasar un String con acentos, diéresis o diferentes letras de codificación UTF-8 a mayúsculas, directamente no podemos utilizar:

$var = strtoupper($valor);

ya que transformará a mayúsculas únicamente las letras del abecedario simple (sin contar ñ ni ç).

 

La forma correcta de cubrir todos los casos es:

$var =   mb_strtoupper($valor,'utf-8');

Lighttpd + PHP

A ver, si no me olvido nada es:

  1. aptitude update
  2. aptitude install -y lighttpd
  3. /usr/sbin/lighty-enable-mod fastcgi-php
  4. aptitude install php5 php5-cgi
  5. vi /etc/lighttpd/lighttpd.conf
  6. Agregar «mod_fastcgi»,

    server.modules = (

    «mod_access»,
    «mod_alias»,
    «mod_compress»,
    «mod_redirect»,
    #       «mod_rewrite»,
    «mod_fastcgi»,

    )

     

  7. vi /etc/lighttpd/conf-available/15-fastcgi-php.conf
  8. Corregir si fuera necesario el bin-path:

    fastcgi.server += ( «.php» =>
    ((

    «bin-path» => «/usr/bin/php5-cgi»,
    «socket» => «/tmp/php.socket»,
    «max-procs» => 1,
    «bin-environment» => (
    «PHP_FCGI_CHILDREN» => «4»,
    «PHP_FCGI_MAX_REQUESTS» => «10000»

    ),

  9. /etc/init.d/lighttpd restart
A %d blogueros les gusta esto: