Como habilitar short open php desde el archivo .htaccess
septiembre 23rd, 2013 Posted by freelo apache, htaccess, php 0 thoughts on “Como habilitar short open php desde el archivo .htaccess”Para poder usar <?
php_value short_open_tag 1
Para poder usar <?
php_value short_open_tag 1
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]
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”
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>
Para agregar: a2ensite sitio
Para eliminar: a2dissite sitio
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.