PHP con Apache 2.4


Como desarrollador PHP , mi trabajo diario lo hago sobre un Debian Gnu Linux ( SID ) , que luego de una actualizacion

$ sudo apt-get update; sudo apt-get dist-upgrade -y

Me deja de funcionar la re escritura de direcciones en wordpress y CakePHP ( Por suerte en django no tengo estos problemas ), revisando un poco de documentación, veo que se necesita tener activo la directiva Add Require all granted

Finalmente, edito el archivo /etc/apache2/sites-enabled/000-default.conf

ServerName localhost
ServerAlias localhost
ServerAdmin webmaster@localhost
DocumentRoot /home/csotelo/public_html/
<Directory "/home/csotelo/public_html/">
allow from all
Require all granted
AllowOverride All
Options +Indexes
</Directory>
LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Anuncios

Call current_user_can after init()


This error appears on wordpress when I activate debug mode, and using bbpress and buddypress, the error was a requiremnt on using the init function before use a restriction related with the function current_user_can

After having this using on a theme development, I have check some pages like

Finally my solution was create a function as http://codex.wordpress.org/Plugin_API/Action_Reference/admin_init says and warning disappear

function restrict_admin(){
//if not administrator, kill WordPress execution and provide a message
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( __('You are not allowed to access this part of the site') );
}
}
add_action( 'admin_init', 'restrict_admin', 1 );

Gallo has been moved to GitHub


blog-github

After been using source for my project I have decide to move my two projects to GitHub, and now and available here

Both of them were used for me on some pages in order to have a tool for make web sites on a easily and simple and smarty