Welcome, Guest
Username Password: Remember me

Point server path to document root not public html
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Point server path to document root not public html

Point server path to document root not public html 28 Apr 2009 09:42 #803

  • Kris
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
First of all, great component and thanks for your time and effort as a webservant for His kingdom!


Secondly, I'd like to point my server path to a folder residing outside of my public html to access a folder of documents,media, etc. that are also being accessed for download (successfully) by another component (PhocaDownloads).

Could someone point me to a way to do that? Or at least, to get started, which are the file(s) I would need to edit?

Since the server path (under the "Servers Edit") menu starts in the public html folder, it doesn't seem possible to do without hacking the source code somewhere.

Re:Point server path to document root not public html 28 Apr 2009 10:17 #804

  • Eugen
  • OFFLINE
  • Moderator
  • Posts: 147
try setting the server path to something like this: "../" (to go back one folder) or "../../" (to go back 2 folders)

I haven't tested the above, but you could try.

I'll have to review the code to see exactly how the component processes the urls.

Re:Point server path to document root not public html 28 Apr 2009 10:19 #805

  • Tom
  • OFFLINE
  • Administrator
  • Posts: 860
You might run into problems doing that - I'm not positive your website will allow anyone to access something outside of your public_html folder - nothing having to do with com_biblestudy or Joomla.

Why not put them into a folder inside your public_html somewhere?

other than than, the component creates a link with SERVER FOLDER FILE - so whatever you set those three to, it will create a url.
"You shall know the truth and the truth shall set you free." JC

Re:Point server path to document root not public h 28 Apr 2009 11:30 #807

  • Eugen
  • OFFLINE
  • Moderator
  • Posts: 147
@tomfuller:

o ok, ur right. Although it is possible to download files that are outside the "public_html" folder if the headers are sent from the same server.

the way it works (we've done this before to try to fix the downloading issue) --> The download button links to the files to a php file which in turn sends headers to request the file from the server root.

@Kris:
Of course, changes would have to be made to the code for this to work.

Re:Point server path to document root not public html 28 Apr 2009 19:55 #809

  • Kris
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
Thanks for your quick responses!

@tomfuller:
One reason to keep content outside your "public_html" folder is to prevent it from being downloaded without permission (e.g. because it is part of the copyright terms or it is an item with potential commercial value). I would vouch for this as a feature request if it is not too hard. The latest release of the PhocaDownload component, for instance, does have a parameter for setting an "Absolute Path" and I've gotten that to work, but I'd love to have that ability in the BibleStudy component.

@genu:
Unfortunately, setting the server path as "../ " did not work for me.

I did have a look at the code and it seemed to me that controllers/mediafilesedit.php and class.biblestudydownload.php (among others?) were places where some code change would be needed. I'm not versed enough in PHP or Joomla, however, to know where exactly in the code to make the necessary changes. Any more thoughts on this would be welcome if time allows...

Re:Point server path to document root not public html 29 Apr 2009 08:11 #811

  • Tom
  • OFFLINE
  • Administrator
  • Posts: 860
I put this in as a feature request.
"You shall know the truth and the truth shall set you free." JC
  • Page:
  • 1
  • 2
Moderators: Darren Vandermyde, Kyle
Time to create page: 0.59 seconds