Mad Max
Forum Replies Created
-
Forum: Installing WordPress
In reply to: Warning: realpath() [function.realpath]: Unable to accesstompress1 gets it right! But there is still a problem with PHP realpath() function (under some circustances) throwing out PHP warnings.
To resolve issue about php warning with realpath(), you have to test if a path exists before apply realpath() to it. So, for example, edit yourWPblogpath/wp-admin/includes/post.php, at line 1263 and substitute this
if ( function_exists('realpath') ) $path = trailingslashit( realpath($path) );with
if ( function_exists('realpath') ) if (file_exists($path)) { $path = trailingslashit( realpath($path) ); } else { $path = ""; }Obviously, this patch has to be applied on all others core files using realpath() function this way, i.e.
wp-admin/includes/class-ftp.php
wp-admin/load-styles.php
wp-admin/load-scripts.phpThis “bug” is due to the inclusion of the Hardened-PHP Project’s Suhosin Patch in many distributions of PHP (version > 5.2.3) by default (Ubuntu Hardy 8.04 for example).
This patch replaces PHPs realpath function with the BSD implementation, which ignores the last path component.The workaround is to use the file_exists function to verify that the file exists before using realpath to get its real path string.
Joomla! soffers of the same bug also and the patch was not included
yet, even in the actual 1.5.15 version.
Hope WordPress developer take care of this quickly.[Explanation taken from
http://www.php.net/manual/en/function.realpath.php#82770
http://www.hardened-php.net/suhosin/a_feature_list:realpath.html
]Forum: Plugins
In reply to: TinyMCE Advanced PHP ErrorTo resolve issue about php warning with realpath(), you have to test if a path exists before apply realpath() to it. So, for example, edit yourWPblogpath/wp-admin/includes/post.php, at line 1263 and substitute this
if ( function_exists('realpath') ) $path = trailingslashit( realpath($path) );with
if ( function_exists('realpath') ) if (file_exists($path)) { $path = trailingslashit( realpath($path) ); } else { $path = ""; }Obviously, this patch has to be applied on all others core files using realpath() function this way, i.e.
wp-admin/includes/class-ftp.php
wp-admin/load-styles.php
wp-admin/load-scripts.phpThis “bug” is due to the inclusion of the Hardened-PHP Project’s Suhosin Patch in many distributions of PHP (version > 5.2.3) by default (Ubuntu Hardy 8.04 for example).
This patch replaces PHPs realpath function with the BSD implementation, which ignores the last path component.The workaround is to use the file_exists function to verify that the file exists before using realpath to get its real path string.
Joomla! soffers of the same bug also and the patch was not included
yet, even in the actual 1.5.15 version.
Hope WordPress developer take care of this quickly.[Explanation taken from
http://www.php.net/manual/en/function.realpath.php#82770
http://www.hardened-php.net/suhosin/a_feature_list:realpath.html
]Forum: Installing WordPress
In reply to: 2.7 post and edit errorTo resolve issue about php warning with realpath(), you have to test if a path exists before apply realpath() to it. So, for example, edit yourWPblogpath/wp-admin/includes/post.php, at line 1263 and substitute this
if ( function_exists('realpath') ) $path = trailingslashit( realpath($path) );with
if ( function_exists('realpath') ) if (file_exists($path)) { $path = trailingslashit( realpath($path) ); } else { $path = ""; }Obviously, this patch has to be applied on all others core files using realpath() function this way, i.e.
wp-admin/includes/class-ftp.php
wp-admin/load-styles.php
wp-admin/load-scripts.phpThis “bug” is due to the inclusion of the Hardened-PHP Project’s Suhosin Patch in many distributions of PHP (version > 5.2.3) by default (Ubuntu Hardy 8.04 for example).
This patch replaces PHPs realpath function with the BSD implementation, which ignores the last path component.The workaround is to use the file_exists function to verify that the file exists before using realpath to get its real path string.
Joomla! soffers of the same bug also and the patch was not included
yet, even in the actual 1.5.15 version.
Hope WordPress developer take care of this quickly.[Explanation taken from
http://www.php.net/manual/en/function.realpath.php#82770
http://www.hardened-php.net/suhosin/a_feature_list:realpath.html
]Forum: Plugins
In reply to: [Plugin: Subscribe to Comments] compatible up to 2.3.1?Opened another (resolved) topic for a new release of this plugin there.
I’m using it with WP 2.8.4
Opened another (resolved) topic for a new release of this plugin there.
Forum: Plugins
In reply to: [Plugin: Sidebar Login] How do I activate the language package?There’s nothing special to do, the plugin just needs sblogin-es_ES.mo in its langs directory.
Then, if you have a line like thisdefine ('WPLANG', 'es_ES');in your wp-config.php, wordpress automatically look for the right .mo file in the folder specified by
load_plugin_textdomain('sblogin', WP_PLUGIN_URL.'/sidebar-login/langs/', 'sidebar-login/langs/');i.e. the plugin langs folder
Futhermore i was not able to get translation working, so i’ve modified line 826 also as below:
//load_plugin_textdomain('subscribe-to-comments'); load_plugin_textdomain('subscribe-to-comments', false, 'subscribe-to-comments');and now it searchs .mo file in its folder.
I’m working on some modification in the way this plugin recreate theme page around its Subscription Manager. The approach taken by Customize yuor community plugin, seems to be simple and efficient enough.
More to come!I have installed it too. And it works fine, but i’ve built a theme with 2 sidebars and this plugin doesn’t provide support in those cases. So i’ve made a small patch, on line 1228 of subscribe-to-comments.php:
//if ( !empty($sg_subscribe->sidebar) ) // @include_once($sg_subscribe->sidebar); if ( !empty($sg_subscribe->sidebar) ){ $sidebars_array=explode(",",$sg_subscribe->sidebar); foreach($sidebars_array as $sb_file){ @include_once($sb_file); } }I’ve commented out the first two lines and replaced them with the code below. Now, if you have more than one sidebar you can specify it in the admin panel (under subscrive-to-comments options), under “Path to sidebar:” listing all your sidebar files separated by a simple comma (“,”).
For example
Path to sidebar: [theme_path]/sidebar-sb1.php,[theme_path]/sidebar-sb2.php