Posts in apache

Como habilitar short open php desde el archivo .htaccess

septiembre 23rd, 2013 Posted by apache, htaccess, php 0 thoughts on “Como habilitar short open php desde el archivo .htaccess”

Para poder usar <?


php_value short_open_tag 1

Cómo redirigir un sitio a sin www

septiembre 12th, 2013 Posted by apache, htaccess 0 thoughts on “Cómo redirigir un sitio a sin www”

Se puede hacer editando el .htaccess del sitio y metiendo la siguiente regla:


RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Como debuggear con MAMP y Netbeans

abril 26th, 2011 Posted by apache, mac, netbeans, php 0 thoughts on “Como debuggear con MAMP y Netbeans”

1. Desde la consola:

vi /Applications/MAMP/conf/php5.3/php.ini

2. Buscar [xdebug] y agregar:

[xdebug]
xdebug.default_enable=1

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1

zend_extension=”/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so”

3. Reinicar MAMP
4. En Netbeans click derecho sobre el proyecto -> “Debug”

Cómo setear el include path de php para un determinado Virtual Host de Apache

abril 24th, 2011 Posted by apache, php 0 thoughts on “Cómo setear el include path de php para un determinado Virtual Host de Apache”

Se puede hacer editando el archivo http.conf

Por ejemplo:

<VirtualHost *>
ServerName mysite.local
DocumentRoot "/path/to/site"
<Directory "/path/to/site">
php_value include_path ".:/include/path/"
</Directory>
</VirtualHost>

Cómo agregar y eliminar virtual hosts en Apache

agosto 1st, 2010 Posted by apache, apache2 0 thoughts on “Cómo agregar y eliminar virtual hosts en Apache”

Para agregar: a2ensite sitio

Para eliminar: a2dissite sitio

Mac + Apache + MySQL + PHP = MAMP

julio 30th, 2008 Posted by apache, mac, mysql, php 0 thoughts on “Mac + Apache + MySQL + PHP = MAMP”

La url: http://www.mamp.info/en/index.php

Hay una version de descarga gratuita que funciona bastante bien.

El problema que tiene es que por defecto trae seteado que no se muestren los errores de PHP. Para solucionarlo hay que ir a:

Applications -> MAMP -> conf -> php

y editar el archivo php.ini

cambiar en la linea 277 que dice:

display_errors = Off

por:

display_errors = On

y resetear los servidores.

Copyright © 2018 programadorfreelanceargentina.com

Programador Freelance Argentina