News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Safe Folder / Media Files Upload Paths / Virtual Products Extension Issues

Started by DavidAllenNeron, April 18, 2012, 23:04:48 PM

Previous topic - Next topic

DavidAllenNeron

in VirtueMart > Configuration > Templates > I have left my "Safe Path" blank for the first test.

I uploaded a test pdf file using the VirtueMart > Shop > Media Files > and marked that as "For Sale" > I removed "Used URL" and left that field blank for this test > I uploaded the file & checked my FTP server to see where it uploaded > I found the file in my sites "Administrator" directory.

I deleted the file on my server and in the Media Files section of virtuemart

I reuploaded using the same process > this time I left the "Used URL" section which reads as follows "images/stories/virtuemart/typeless/" > Uploaded the file and it made new folders in my "Administrator" section.
So it looked like ./administrator/images/stories/virtuemart/typeless/.

I deleted the files again.

Went into VirtueMart > Configuration > Templates > and changed the "Safe URL" to a folder within my Root Directory for this Joomla site > Went back and uploaded files in VirtueMarts "Media Files" section leaving the "Used URL" filled in as "images/stories/virtuemart/typeless/" and it created the folders in Administrator again this time starting with the "Safe URL" I put in under "VirtueMart > Configuration > Templates >"

So the short version of my problem is: Media Files are uploading to my "Administrator" folder no matter what I do and I'm not sure which configuration file to alter, or if it's my php.ini or htaccess file causing this issue.

Also, when this happens I go in and edit the Media File and repoint to the correct folders where the file uploaded and I can download the files from the link it provides in the "Media Files" window although when I use Paypal sandbox and get the download link, it says "File Not Found" below is the link I get in the email to download the product.
http://davidallenneron.com/index.php?option=com_virtuemart&view=plugin&name=st42_download&media_id=8&dlkey=cF9iZTViNw==&oid=2

I know it's something simple that I'm just not getting, could someone please help me sort this mess out?

DavidAllenNeron

and this is my htaccess file

##
# @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
#  Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

Milbo

Why do you just not enter a safepath?  Consider in 2.0.6 there is no automatic adding the ending / (or on windows machines a \ ) .

Remember a path ! not an url.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

sportyblack

i am using Virtuemart 1.1.9   im trying to download large media files about 900mb each.  I have everything set up in S3 Amazon and created a sub domain for masking link.  I've tested the link from S3 amazon outside of Virtuemart and it works great but when i added it to download path and created new product file then selected file type  downloadable product files to be sold, then added file url below and saved  file manager.  Tried testing and it failed, upon saving 900mb download to my computer the file is only 0kb  .   
I was told its something in admimistrator/component/comvirtuemart/classes/connectionTools.class.php page  but i have no clue how to edit this.   

My PHP5.ini settings
max_execution_time = 2700
max_input_time = 120
memory_limit = 64M

Please somebody explain what am i missing.  I need help   


PLUR