v3.5.1 beta - Report Bugs or Issues Here

Status
Not open for further replies.

wski3731

New Member
YetiShare User
Mar 13, 2014
21
0
0
adam said:
wski3731 said:
File delete from file server still doesn't work for me. I get confirmation and all but the file is still there. Not a big deal right now, just thought I post here.
Just checking, did you update the file server with the latest files aswell?
Yes, all should be 3.5.1. Any specific file you want me to double check make sure I have the recent version?
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
wski3731 said:
adam said:
wski3731 said:
File delete from file server still doesn't work for me. I get confirmation and all but the file is still there. Not a big deal right now, just thought I post here.
Just checking, did you update the file server with the latest files aswell?
Yes, all should be 3.5.1. Any specific file you want me to double check make sure I have the recent version?
Was it via the admin area or front end?
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
@All

- Minor update to includes/class.charts.php to fix php warning.

Any fixes will be listed also in the diff file once moved out of beta later this week.
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
wski3731 said:
adam said:
Was it via the admin area or front end?
Front end, when you access "Your Files" Admin area works fine.
I don't recall the specific file which was fixed but uploading these from the latest beta should cover it:

- includes/file.class.php
- _get_all_file_server_paths.ajax.php
- _file_manage_bulk_delete.ajax.php

Make sure they're uploaded both to the main server and any file servers.
 

ballevill3616

New Member
Feb 17, 2014
40
0
0
41
ballevill3616 wrote:Small error after turning off the ability to send files to the server for a group of non-users admin account can not also send :)

Regards
Adam I uploaded the latest version of the script from what I now observed running on the local server option, however, when it is set to send the remote server is not working.

Regards
 

ballevill3616

New Member
Feb 17, 2014
40
0
0
41
And here's another problem with the remote server when you set everything right in the configuration file on the remote server does not work removing and carefully if want to let the master server to delete the file using a link is a redirection error on the remote server if you mix it in the config redirection is working, but when uploading a file is a link to download instead of being the main server in the form www.xxx.com / link to a file is www.s1.xxx.com/link to the file server configuration is set url main option is set to yes
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
ballevill3616 said:
And here's another problem with the remote server when you set everything right in the configuration file on the remote server does not work removing and carefully if want to let the master server to delete the file using a link is a redirection error on the remote server if you mix it in the config redirection is working, but when uploading a file is a link to download instead of being the main server in the form www.xxx.com / link to a file is www.s1.xxx.com/link to the file server configuration is set url main option is set to yes
Sorry I don't understand the issue, could you give more information?
 

ballevill3616

New Member
Feb 17, 2014
40
0
0
41
If the file is on a remote server and want to let him remove this information from the browser gets redirected Wrong
 

ballevill3616

New Member
Feb 17, 2014
40
0
0
41
Setting up my remote server I do not know maybe incorrect but I do not think so

/ * Main configuration file for the script * /
define ("_CONFIG_SITE_HOST_URL", ""); <- enter web address of the remote server
define ("_CONFIG_SITE_FULL_URL", ""); <- enter web address of the remote server

/ * Database connection details * /
define ("_CONFIG_DB_HOST", "l"); Here it is known
define ("_CONFIG_DB_NAME", "l"), / * database name * / Here it is known
define ("_CONFIG_DB_USER", ""); / * database username * / Here it is known
define ("_CONFIG_DB_PASS", ""); Here it is known

/ * Set these to the main host site if you're using direct web server uploads / downloads to remote servers * /
define ("_CONFIG_CORE_SITE_HOST_URL", ""); <- enter web address of the main server

define ("_CONFIG_CORE_SITE_FULL_URL", ""); <- enter web address of the main server
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
@all:

Update done todat to fix an issue with stats not logging when file uploaded by anon user. File changed in beta:

- \includes\class.file.php
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
ballevill3616 said:
Setting up my remote server I do not know maybe incorrect but I do not think so

/ * Main configuration file for the script * /
define ("_CONFIG_SITE_HOST_URL", ""); <- enter web address of the remote server
define ("_CONFIG_SITE_FULL_URL", ""); <- enter web address of the remote server

/ * Database connection details * /
define ("_CONFIG_DB_HOST", "l"); Here it is known
define ("_CONFIG_DB_NAME", "l"), / * database name * / Here it is known
define ("_CONFIG_DB_USER", ""); / * database username * / Here it is known
define ("_CONFIG_DB_PASS", ""); Here it is known

/ * Set these to the main host site if you're using direct web server uploads / downloads to remote servers * /
define ("_CONFIG_CORE_SITE_HOST_URL", ""); <- enter web address of the main server

define ("_CONFIG_CORE_SITE_FULL_URL", ""); <- enter web address of the main server
If this the '_config.inc.php' file link when adding a file server? Try reloading then clicking edit and selecting the file again, it should automatically populate with the correct information.
 

ballevill3616

New Member
Feb 17, 2014
40
0
0
41
Yes adam file is correct but does not work redirect to a remote server when you delete files when downloading send everything works the problem is only deleting file
 

mastern

New Member
YetiShare User
Apr 24, 2013
56
1
0
ballevill3616 said:
Yes adam file is correct but does not work redirect to a remote server when you delete files when downloading send everything works the problem is only deleting file
On local, I had that problem when deleting files or downloading before, with plugins 3.5.1, but it had been fixed now.

Older code
$pluginConfig['required_script_version'] = 3.5.1;
New code
$pluginConfig['required_script_version'] = "3.5.1";

if you use a plugins, just verify _plugin_config.inc.php in a plugin root/folder.

Regards,
Mastern
 

alexandreweb123407

New Member
YetiShare User
Dec 31, 2013
37
0
0
adam said:
ballevill3616 said:
And here's another problem with the remote server when you set everything right in the configuration file on the remote server does not work removing and carefully if want to let the master server to delete the file using a link is a redirection error on the remote server if you mix it in the config redirection is working, but when uploading a file is a link to download instead of being the main server in the form www.xxx.com / link to a file is www.s1.xxx.com/link to the file server configuration is set url main option is set to yes
Sorry I don't understand the issue, could you give more information?
I'm tired of talking to Adam who is giving error when deleting via remote server. But he always says it works, so I changed it!!!

replace your code, for me.
delete_file.php
Code:
<?php
/* setup includes */
require_once('includes/master.inc.php');

/* setup page */
define("PAGE_NAME", t("delete_file_page_name", "Delete File"));
define("PAGE_DESCRIPTION", t("delete_file_meta_description", "Delete File"));
define("PAGE_KEYWORDS", t("delete_file_meta_keywords", "delete, remove, file"));

// load file
$file = null;
if (isset($_REQUEST['u']))
{
    // figure out the delete hash
    $deleteHash = '';
    foreach($_REQUEST AS $k=>$item)
    {
        if(strlen($k) == 32)
        {
            $deleteHash = $k;
        }
    }

    // only keep the initial part if there's a forward slash
    $shortUrl = current(explode("/", str_replace("~d", "", $_REQUEST['u'])));
    $file = file::loadByShortUrl($shortUrl);

    // check it's active
    if($file->deleteHash != $deleteHash)
    {
        $file = null;
    }
}

// do we have a return page
$returnAccount = false;
if((isset($_REQUEST['returnAccount'])) && ((int)$_REQUEST['returnAccount'] == 1))
{
    $returnAccount = true;
}

/* load file details */
if(!$file)
{
    /* if no file found, redirect to home page */
    redirect(WEB_ROOT . "/index." . SITE_CONFIG_PAGE_EXTENSION);
}

/* delete file if submitted */
if ((int) $_REQUEST['delete'])
{
    // reomve file
    $file->removeByUser();

    // redirect to confirmation page
    $resultMsg = t('file_permanently_removed', 'File permanently removed.');
    if($file->errorMsg)
    {
        $resultMsg = $file->errorMsg;
    }
    
    if($returnAccount)
    {
        redirect(CORE_WEB_ROOT.'/account_home.'.SITE_CONFIG_PAGE_EXTENSION.'?s='.urlencode($resultMsg));
    }
    
    redirect(CORE_WEB_ROOT . "/error." . SITE_CONFIG_PAGE_EXTENSION.'?e='.urlencode($resultMsg));
}

// get file path
$filePath = file::getFileDomainAndPath($file->id);

require_once('_header.php');
?>

<div class="contentPageWrapper">

    <?php
    if (isErrors())
    {
        echo outputErrors();
    }
    ?>

    <!-- delete file form -->
    <div class="pageSectionMain ui-corner-all">
        <div class="pageSectionMainInternal">
            <div id="pageHeader">
                <h2><?php echo t("delete_file", "Delete File"); ?></h2>
            </div>
            <div>
                <p class="introText">
                    <?php echo t("delete_file_intro", "Please confirm whether to delete the file below. Note: Once deleted, this file is removed from our servers and can not be recovered."); ?>
                    <br/><br/>
                </p>
                <form class="international" method="post" action="<?php echo $file->getDeleteUrl($returnAccount, true); ?>" id="form-join" AUTOCOMPLETE="off">
                    <ul>
                        <li class="field-container">
                            <?php echo t('file', 'File'); ?>: <a href="<?php echo _CONFIG_SITE_PROTOCOL; ?>://<?php echo $filePath; ?>/<?php echo $file->shortUrl; ?>" target="_blank"><?php echo $file->originalFilename; ?></a> (<?php echo formatSize($file->fileSize); ?>)
                        </li>
                        <li class="field-container">
                            <span class="field-name"></span>
                            <input name="delete" type="hidden" value="1"/>
                            <input name="submitme" type="hidden" value="1"/>
                            <input name="returnAccount" type="hidden" value="<?php echo (int)$returnAccount; ?>"/>
                            <input tabindex="99" type="submit" name="submit" value="<?php echo t("delete_file", "Delete File"); ?>" class="submitInput" />
                            <input tabindex="100" type="reset" name="reset" value="<?php echo t("cancel", "Cancel"); ?>" class="cancelInput" onClick="window.location='<?php echo $returnAccount?(CORE_WEB_ROOT.'/account_home.'.SITE_CONFIG_PAGE_EXTENSION):WEB_ROOT; ?>';" />
                        </li>
                    </ul>
                </form>

                <div class="clear"></div>
            </div>
        </div>
    </div>
    <?php include_once("_bannerRightContent.inc.php"); ?>
    <div class="clear"><!-- --></div>
</div>

<?php
require_once('_footer.php');
?>
 

ballevill3616

New Member
Feb 17, 2014
40
0
0
41
Re: v3.5.1 beta - Report Bugs or Issues Here

Unread postby alexandreweb123407 » 26 Mar 2014 01:14

adam wrote:

ballevill3616 wrote:And here's another problem with the remote server when you set everything right in the configuration file on the remote server does not work removing and carefully if want to let the master server to delete the file using a link is a redirection error on the remote server if you mix it in the config redirection is working, but when uploading a file is a link to download instead of being the main server in the form www.xxx.com / link to a file is www.s1.xxx.com/link to the file server configuration is set url main option is set to yes



Sorry I don't understand the issue, could you give more information?



I'm tired of talking to Adam who is giving error when deleting via remote server. But he always says it works, so I changed it!!!


replace your code, for me.
delete_file.php

Code: Select all
Code:
    <?php
    /* setup includes */
    require_once('includes/master.inc.php');

    /* setup page */
    define("PAGE_NAME", t("delete_file_page_name", "Delete File"));
    define("PAGE_DESCRIPTION", t("delete_file_meta_description", "Delete File"));
    define("PAGE_KEYWORDS", t("delete_file_meta_keywords", "delete, remove, file"));

    // load file
    $file = null;
    if (isset($_REQUEST['u']))
    {
        // figure out the delete hash
        $deleteHash = '';
        foreach($_REQUEST AS $k=>$item)
        {
            if(strlen($k) == 32)
            {
                $deleteHash = $k;
            }
        }

        // only keep the initial part if there's a forward slash
        $shortUrl = current(explode("/", str_replace("~d", "", $_REQUEST['u'])));
        $file = file::loadByShortUrl($shortUrl);

        // check it's active
        if($file->deleteHash != $deleteHash)
        {
            $file = null;
        }
    }

    // do we have a return page
    $returnAccount = false;
    if((isset($_REQUEST['returnAccount'])) && ((int)$_REQUEST['returnAccount'] == 1))
    {
        $returnAccount = true;
    }

    /* load file details */
    if(!$file)
    {
        /* if no file found, redirect to home page */
        redirect(WEB_ROOT . "/index." . SITE_CONFIG_PAGE_EXTENSION);
    }

    /* delete file if submitted */
    if ((int) $_REQUEST['delete'])
    {
        // reomve file
        $file->removeByUser();

        // redirect to confirmation page
        $resultMsg = t('file_permanently_removed', 'File permanently removed.');
        if($file->errorMsg)
        {
            $resultMsg = $file->errorMsg;
        }
       
        if($returnAccount)
        {
            redirect(CORE_WEB_ROOT.'/account_home.'.SITE_CONFIG_PAGE_EXTENSION.'?s='.urlencode($resultMsg));
        }
       
        redirect(CORE_WEB_ROOT . "/error." . SITE_CONFIG_PAGE_EXTENSION.'?e='.urlencode($resultMsg));
    }

    // get file path
    $filePath = file::getFileDomainAndPath($file->id);

    require_once('_header.php');
    ?>

    <div class="contentPageWrapper">

        <?php
        if (isErrors())
        {
            echo outputErrors();
        }
        ?>

        <!-- delete file form -->
        <div class="pageSectionMain ui-corner-all">
            <div class="pageSectionMainInternal">
                <div id="pageHeader">
                    <h2><?php echo t("delete_file", "Delete File"); ?></h2>
                </div>
                <div>
                    <p class="introText">
                        <?php echo t("delete_file_intro", "Please confirm whether to delete the file below. Note: Once deleted, this file is removed from our servers and can not be recovered."); ?>
                        <br/><br/>
                    </p>
                    <form class="international" method="post" action="<?php echo $file->getDeleteUrl($returnAccount, true); ?>" id="form-join" AUTOCOMPLETE="off">
                        <ul>
                            <li class="field-container">
                                <?php echo t('file', 'File'); ?>: <a href="<?php echo _CONFIG_SITE_PROTOCOL; ?>://<?php echo $filePath; ?>/<?php echo $file->shortUrl; ?>" target="_blank"><?php echo $file->originalFilename; ?></a> (<?php echo formatSize($file->fileSize); ?>)
                            </li>
                            <li class="field-container">
                                <span class="field-name"></span>
                                <input name="delete" type="hidden" value="1"/>
                                <input name="submitme" type="hidden" value="1"/>
                                <input name="returnAccount" type="hidden" value="<?php echo (int)$returnAccount; ?>"/>
                                <input tabindex="99" type="submit" name="submit" value="<?php echo t("delete_file", "Delete File"); ?>" class="submitInput" />
                                <input tabindex="100" type="reset" name="reset" value="<?php echo t("cancel", "Cancel"); ?>" class="cancelInput" onClick="window.location='<?php echo $returnAccount?(CORE_WEB_ROOT.'/account_home.'.SITE_CONFIG_PAGE_EXTENSION):WEB_ROOT; ?>';" />
                            </li>
                        </ul>
                    </form>

                    <div class="clear"></div>
                </div>
            </div>
        </div>
        <?php include_once("_bannerRightContent.inc.php"); ?>
        <div class="clear"><!-- --></div>
    </div>

    <?php
    require_once('_footer.php');
    ?>
alexandreweb123407

Posts: 15
Joined: 31 Dec 2013 17:06


Adam as you can see not only I have this problem may specifically have a look at this problem?
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
I'm tired of talking to Adam who is giving error when deleting via remote server. But he always says it works, so I changed it!!!
No shouting in the forum please. The beta is only for testing. If you're not happy with something, revert to a previous release.

Can you be clear. Are you still having problems with deleting files on remote servers? What is the code you posted for?
 
Status
Not open for further replies.