{"id":57,"date":"2005-02-15T12:32:47","date_gmt":"2005-02-15T12:32:47","guid":{"rendered":"http:\/\/blografia.net\/vicm3\/?p=57"},"modified":"2005-02-15T12:32:47","modified_gmt":"2005-02-15T12:32:47","slug":"on_php_flags","status":"publish","type":"post","link":"https:\/\/blografia.net\/vicm3\/2005\/02\/on_php_flags\/","title":{"rendered":"On php flags"},"content":{"rendered":"<p>Well as this post was originally on english and i have two powerful reasons to no translate is lefted as in the original&#8230; apologies to the spanish readers:<\/p>\n<p>Posted: Mon Feb 14, 2005 1:48 pm<\/p>\n<p>Before i have complained about had to use register_globals &#038; magic_quotes&#8230; as for we host several sites every one with his own virtualhost directive&#8230; as a friend of me suggested there is one way to not expose all your vhosts&#8230; to attack (as for some sites are using applications with exploits only affected\/presented\/exploitable with these variables ON).. I find the next solution, on my global php.ini had these values off&#8230; but in virtual host had this:<\/p>\n<p><code><br \/>\n<VirtualHost foo.foobar><br \/>\nServerName foo.foobar<br \/>\nDocumentRoot \/var\/www\/claroline<br \/>\nErrorLog \/var\/log\/apache\/claroline_error.log<br \/>\nCustomLog \/var\/log\/apache\/claroline_access.log combined<br \/>\nphp_flag register_globals On<br \/>\nphp_flag magic_quotes_gpc On<br \/>\n<\/VirtualHost><br \/>\n<\/code><\/p>\n<p>So only claroline and his directory is running with these variables turned on&#8230; also for i have see a lot of .inc en claroline, reading docs found:<\/p>\n<p><code><br \/>\n<Location ~ \"\/[^ ](?=\\.inc(\\?[^ ]*)?)\/\"><br \/>\nOptions None<br \/>\nOrder Allow, Deny<br \/>\nDeny from All<br \/>\nAllowOverride None<br \/>\nSatisfy All<br \/>\n<\/Location><br \/>\n<\/code><\/p>\n<p>As I not enough saavy with httpd.conf don&#8217;t know how to apply only to the claroline directory (as i had not defined in these file&#8230; thing of put these inside <Virtual host>) any ideas are welcome&#8230; suggest and comments&#8230; required ;)<\/p>\n<p>Reading from other sources&#8230;<br \/>\nSetting up a .htaccess file for testing<\/p>\n<p>If you want to test your site with the register_globals setting on, you will need to create a .htaccess file in your site&#8217;s main directory (or the main directory of your site that contains PHP scripts). Your .htaccess file should contain the following line:<\/p>\n<p>php_flag register_globals on<\/p>\n<p>so i think same applies to magic_quotes&#8230;.<\/p>\n<p>And is a very nice way to do the work ;)<\/p>\n<p>Regards<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well as this post was originally on english and i have two powerful reasons to no translate is lefted as in the original&#8230; apologies to the spanish readers: Posted: Mon Feb 14, 2005 1:48 pm Before i have complained about &hellip; <a href=\"https:\/\/blografia.net\/vicm3\/2005\/02\/on_php_flags\/\">Sigue leyendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3],"tags":[],"class_list":["post-57","post","type-post","status-publish","format-standard","hentry","category-general"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1407,"url":"https:\/\/blografia.net\/vicm3\/2014\/12\/two-things-are-infinite-the-universe-and-human-stupidity\/","url_meta":{"origin":57,"position":0},"title":"Two things are infinite: the universe and human stupidity","author":"vicm3","date":"10 diciembre, 2014","format":false,"excerpt":"I think that reality is better than fiction, so take this as a fiction story... well short of... The full quote that gives nave to this post it's \"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.\" Albert Einstein. Monday lost five hours\u2026","rel":"","context":"En \u00abDebraye\u00bb","block_context":{"text":"Debraye","link":"https:\/\/blografia.net\/vicm3\/category\/debraye\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1378,"url":"https:\/\/blografia.net\/vicm3\/2014\/09\/wordpress-xmlrpc-ddos-mitigation\/","url_meta":{"origin":57,"position":1},"title":"WordPress xmlrpc DDOS mitigation","author":"vicm3","date":"27 septiembre, 2014","format":false,"excerpt":"Well not long ago DH contacted me with this dreaded message: Hello, I'm writing you about your domain: foo.bar Specifically the file: xmlrpc.php This file is used for modifying your wordpress install from 3rd party\u00a0programs, like mobile site designers, desktop client programs, and pretty\u00a0much anything besides the wordpress control panel\u2026","rel":"","context":"En \u00abplanetalinux\u00bb","block_context":{"text":"planetalinux","link":"https:\/\/blografia.net\/vicm3\/category\/planetalinux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1104,"url":"https:\/\/blografia.net\/vicm3\/2013\/09\/svn-and-its-new-sqlite-format-again\/","url_meta":{"origin":57,"position":2},"title":"SVN and its new sqlite format again","author":"vicm3","date":"10 septiembre, 2013","format":false,"excerpt":"I been a user of svn for a quite long time now, and had to work around certain \"features\", like berkeley.db locking on multiuser home directories, the migration to FS logs, and problems working with multi platform environments, most of it its documented on this blog. Yeah, git is sexy,\u2026","rel":"","context":"En \u00abDebraye\u00bb","block_context":{"text":"Debraye","link":"https:\/\/blografia.net\/vicm3\/category\/debraye\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":77,"url":"https:\/\/blografia.net\/vicm3\/2005\/04\/variaciones_de_voltaje\/","url_meta":{"origin":57,"position":3},"title":"Variaciones de voltaje","author":"vicm3","date":"2 abril, 2005","format":false,"excerpt":"Leyendo a Gunnar y el como murio la alimentacion de su maquinita en casa, transcribo algo sobre mi experiencia con variaciones de voltaje en esta zona de la ciudad... que me recordaron algunas cosas interesantes... desafortunadamente el comentario original esta en ingles, ya que me tome un rato para practicarlo\u2026","rel":"","context":"En \u00abGeneral\u00bb","block_context":{"text":"General","link":"https:\/\/blografia.net\/vicm3\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1491,"url":"https:\/\/blografia.net\/vicm3\/2015\/10\/wp-cli\/","url_meta":{"origin":57,"position":4},"title":"Wp-cli","author":"vicm3","date":"27 octubre, 2015","format":false,"excerpt":"Well Dreamhost sometime ago installed wp-cli [1] on their machines think of it like drush [2] and it's really fast and nice, managing wp via CLI is way easier and clean, yes I'm aware that for sometime now also there is WP multisite and other improvements but as I like\u2026","rel":"","context":"En \u00abGeneral\u00bb","block_context":{"text":"General","link":"https:\/\/blografia.net\/vicm3\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":33,"url":"https:\/\/blografia.net\/vicm3\/2004\/11\/svn\/","url_meta":{"origin":57,"position":5},"title":"svn","author":"vicm3","date":"11 noviembre, 2004","format":false,"excerpt":"Bien en algun momento tuve que implementar subversion, es probable que en la version que alguien este instalando en este momento ya no haya ningun problema (de hecho en la ultima que tengo noticia, se puede elegir entre usar Berkeley DB y otro metodo para evitar problemas, pero si alguien\u2026","rel":"","context":"En \u00abGeneral\u00bb","block_context":{"text":"General","link":"https:\/\/blografia.net\/vicm3\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/posts\/57","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":0,"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"wp:attachment":[{"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blografia.net\/vicm3\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}