noobhacker101 Posted February 16, 2011 Share Posted February 16, 2011 i need to know where the location of the dowloadable products are...i want to change it from the local server to a remote server when the usr clicks on the download link.is this possible??so the user clicks download link. ps looks in Download file on 98.211.11.23/downloads/ instead of on www.mysite.com/prestashop/uploads/ Link to comment Share on other sites More sharing options...
susanexpress Posted February 16, 2011 Share Posted February 16, 2011 I think you'd better ask some experts for help.such as WOW Gold expert Link to comment Share on other sites More sharing options...
noobhacker101 Posted February 16, 2011 Author Share Posted February 16, 2011 whos that? Link to comment Share on other sites More sharing options...
mytheory. Posted February 16, 2011 Share Posted February 16, 2011 Hi,I don't use downloadable products so take my advice lightly... and needless to say since Ihaven't modified my setup I do not know if this works 100%. But here is what I got...The downloadable files seems to be stored in the /download/ directory... this is the folder under your PS root directory titled "download." If you wanted to change this default directory to some place else I think you need to modify your /config/config.inc.php file... search for "download" and you should see a line where you can change the download directory (as well as other directories). Otherwise you can also see it on line 69, at least that's the line in my file.HTH! Link to comment Share on other sites More sharing options...
noobhacker101 Posted February 17, 2011 Author Share Posted February 17, 2011 mytheory, thanx for the input but non of what you said exists in my config.inc.php file.... i dont have a download line. while searcing for download no results were found. line 69 shows tax information. that is exaclty what i need to do though is change the default download dirctory. i just dont know where to find it... Link to comment Share on other sites More sharing options...
mytheory. Posted February 17, 2011 Share Posted February 17, 2011 Hi,Yes you are correct... took a look through the files of some of the newer versions and the files in the /config/ directory has been changed quite a bit. I'm still using an older version, looking forward to 1.4 final to upgrade.Anyways, the file these lines of code have been moved to is the new /config/defines.inc.php file. The directory declarations are near the top.HTH! Link to comment Share on other sites More sharing options...
noobhacker101 Posted February 17, 2011 Author Share Posted February 17, 2011 ok i tried changing the directory off site and when i add a new product it tells me that is not writable.... i have permissions allowed for everyone to wrie to..i dont underrstand now Link to comment Share on other sites More sharing options...
mytheory. Posted February 17, 2011 Share Posted February 17, 2011 Oh.. you were trying to point the download directory to a entirely different server, or directory for that matter (outside of PS). This might be harder to do than just changing the directory path in a config file. There probably are security measures in place to limit connections to and from the "outside." This may be an issue and question about security now... which I do not know whole lot about.Since it says something about not being writable... I'm guessing you've already tried CHMOD 777...? This is highly not recommended especially for a setup like this, but (if not already done so) you may want to give it a try just to see if it works or not. At least if it works you will know that is the problem and you can maybe password protect the directory, set it lower permissions but explicitly give full access to only your PS server, etc.I'm not much help when it comes to this, but thought I'd throw in some ideas.HTH! Link to comment Share on other sites More sharing options...
noobhacker101 Posted February 18, 2011 Author Share Posted February 18, 2011 your actually the only one who has given me ANY help. i appreciate all of it. yes i have tried 777 and that is not the issue. im ot sure exactly how to change the code in defines.inc.php since im a noob at php. i want to change the directory from define('_PS_DOWNLOAD_DIR_', _PS_ROOT_DIR_.'/download/'); to define('_PS_DOWNLOAD_DIR_', http://66.40.52.146/download/');but this code is not rights i know for a fact it will not work... any suggestions?? Link to comment Share on other sites More sharing options...
mytheory. Posted February 18, 2011 Share Posted February 18, 2011 Yea... to be honest I think this is out of my scope of knowledge. I only know the very basics of php and mysql, actually trying to learn at the moment. So I'm noob at php too.But here is what I see that might be the problem... when you define the download directory you are essentially pointing it to a web address. I don't know exactly where, but my guess it that when PS tries to access the directory (or web address in your case) it might be able to view what is in that directory, but might not be able to execute, write, etc to it.I think alot of this has to do with php security... so outsiders can't just access everything in a directory by using a web address and have full control. If they could, it would be very easy to take a malicious script that could be written into the directory and then executed as if it was allowed by your server. I'm sure there are ways around this that still offers security, but this is outside of my scope.To just barely touch the surface, I imagine there are some settings within your php.ini file or your apache configuration or some scripts using .htaccess that might allow you to what you are trying to do. But there might be security risks with this. Or you might need a PHP directive that will allow you to create a connection to your remote server, which then you could use to control just like other directories on your local server. By creating a legit connection, the security settings won't see you as an outsider just browsing the site, or an intruder trying to write and execute files in that directory.I wish I could help you with exactly what kind of php codes to write, but unfortunately I don't know them myself. But hopefully this gives you a little bit more direction in some of the other questions you might want to ask or search for using google.GoodLuck! Link to comment Share on other sites More sharing options...
noobhacker101 Posted February 19, 2011 Author Share Posted February 19, 2011 Well thank you you have been a great help!!! i def will continue my quest to find the answer to my problem and you have certainly lighted my path to an extent. thank you Link to comment Share on other sites More sharing options...
Recommended Posts