Safe mode patch to CB

17 years 3 months ago #27137 by aenima
Safe mode patch to CB was created by aenima
My web host have safe mode on. Im running joomla with the safe mode patch, and it works perfectly, untill i try installing CB plugins. The safe mode patch does not apply to the CB plugin installation, and im unable to install any.
I want to run the joomla-SMF component, that allows fully integration of joomla and CB with the Simple Machines Forum.
This bridge requires a installation of a CB plugin. Without this plugin, i cant get the bridge to work correctly.

I would like to see the CB use the FTP mode like the one used in the safe mode patch for joomla.

Please Log in to join the conversation.

17 years 2 months ago #28175 by hackeman
Replied by hackeman on topic Re:Safe mode patch to CB
aenima wrote:

My web host have safe mode on. Im running joomla with the safe mode patch, and it works perfectly, untill i try installing CB plugins. The safe mode patch does not apply to the CB plugin installation, and im unable to install any.
I want to run the joomla-SMF component, that allows fully integration of joomla and CB with the Simple Machines Forum.
This bridge requires a installation of a CB plugin. Without this plugin, i cant get the bridge to work correctly.

I would like to see the CB use the FTP mode like the one used in the safe mode patch for joomla.


I second this request.

Please Log in to join the conversation.

17 years 2 months ago #30044 by melli
Replied by melli on topic Re:Safe mode patch to CB
Me too

Please Log in to join the conversation.

17 years 1 month ago #30985 by pakito1
Replied by pakito1 on topic Re:Safe mode patch to CB
Hi,

I succesfully installed some CB plugins with SafeMode on.

I post my method, hope more people will send their feedback, and somebody from the core team gets involved.

Safe Mode on Support should be a must for CB


INSTALLING CB PLUGINS WITH SAFE MODE = ON


1.- Modify the function function copyFiles
/administrator/components/com_comprofiler/plugin.class.php


line 1040 to 1065
[code:1]
function copyFiles( $p_sourcedir, $p_destdir, $p_files, $overwrite=false ) {
// if (is_array( $p_files ) && count( $p_files ) > 0) {
// foreach($p_files as $_file) {
// $filesource = mosPathName( mosPathName( $p_sourcedir ) . $_file, false );
// $filedest = mosPathName( mosPathName( $p_destdir ) . $_file, false );
//
// if (!file_exists( $filesource )) {
// $this->setError( 1, "File $filesource does not exist!" );
// return false;
// } else if (file_exists( $filedest ) && !$overwrite) {
// $this->setError( 1, "There is already a file called $filedest - Are you trying to install the same Plugin twice?" );
// return false;
// } else if ( (is_callable(array("JFile","copy"«»)) ? !(JFile::copy($filesource, $filedest)) : !(copy($filesource,$filedest))) ) {
// $this->setError( 1, "Failed to copy file: $filesource to $filedest" );
// return false;
// } else if (!((!is_callable("mosChmod"«»)) || is_callable(array("JFile","copy"«»)) || mosChmod( $filedest ))) { // mambo 4.5.1 support
// $this->setError( 1, "Failed to chmod file: $filedest" );
// return false;
// }
// }
// } else {
// return false;
// }
return count( $p_files );
}

[/code:1]



2.- Choose Install CB Plugin from directory

Unzip first the plugin and upload the folder using FTP (I used folder /media).

Click install


3.- Upload files manually

Each plugin has its folder in components/com_comprofiler/plugin/user/

To know the name of the new folder:
open the .XML file and read the tag
<NAME>Nameoftheplugin</NAME>


Thats working for me now, any feedback is welcome

Please Log in to join the conversation.

16 years 1 month ago #57179 by rholzler
Replied by rholzler on topic Re:Safe mode patch to CB
I work for a hosting company. We installed Joomla and Community Builder with the Safe Mode turned off. Afterward we turned Safe Mode back on for security reasons.

Problems:
None of the users can log in.
The Admin Menu COMPONENTS > COMMUNITY BUILDER is not accessible.

I am sure that there are other problems as well, but we can not tell until we can actually get in to the system to configure and test it. If I turn off Safe Mode, CB works fine.

The info files do say you need to have Safe Mode off for installation, but it does not say you have to have safe mode turned off forever!

Anyone have a work around for this? Maybe a .htaccess modification? We did use a .htaccess fix to turn on magic quotes for Joomla.

Thanks in advance.

Robert Holzler
Developer
ZombieMenace.com

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 1.131 seconds

Facebook Twitter LinkedIn