Problem open stream pdf

Phoca Download - download manager
mjmartino
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 10 Jun 2019, 15:53

Problem open stream pdf

Post by mjmartino » 13 Aug 2019, 11:48

Hi.
Case.
After click download button, *.pdf open in browser but like txt %PDF 1.6 DF-1.6 %���� 1 0 obj <> stream x ... etc.
Site been migrate from /folder/folder to /folder
I check path tmp and logs in configuration is correct.
What could happen was that it stopped working??

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 41480
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem open stream pdf

Post by Jan » 13 Aug 2019, 11:52

Hi, it seems like the PDF starts with right code. But there is a question why your browser does not display PDF but its text version.

Do you get this in all browsers (did you try more browsers)?

When you enable error reporting on your site to maximum, do you get some php error redndered before the PDF header?

Jan
If you find Phoca extensions useful, please support the project

mjmartino
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 10 Jun 2019, 15:53

Re: Problem open stream pdf

Post by mjmartino » 13 Aug 2019, 12:04

I test in Opera and FF, Chrome.
I try maximum reporting.. zero errors. Console debug no errors.
strange situation...

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 41480
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem open stream pdf

Post by Jan » 13 Aug 2019, 21:47

Hmm, is the site somewhere accessible to test it?

Mostly in past when users had similar problems it was somehow related to php errors which were rendered before the header sent but since cleaning the buffer function added, there were no such problems more :idea:

Jan
If you find Phoca extensions useful, please support the project

mjmartino
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 10 Jun 2019, 15:53

Re: Problem open stream pdf

Post by mjmartino » 13 Aug 2019, 23:27

Jan
I found where is problem.
Problem is when domain redirect to folder and turn on is site separation.
When separation is enabled no script can go outside the root directory /
This protection if malware wanted to copy itself and infect other higher folders.

I don't know why this not working well with separation. Maybe core Joomla has a problem with that...
Maybe you have some explanation why this no work with separation?

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 41480
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem open stream pdf

Post by Jan » 13 Aug 2019, 23:40

Hi, what do you exactly mean with "separation"?
If you find Phoca extensions useful, please support the project

mjmartino
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 10 Jun 2019, 15:53

Re: Problem open stream pdf

Post by mjmartino » 14 Aug 2019, 10:32

separation
Domain domain.com -> /public_html/domain.com <-this domain no accession to domain.com.pl
Domain domain.com.pl -> /public_html/domain.com.pl <-this domain no accession to domain.com
This is separation
Many vhost allow to access doman.com and domain.com.pl if you have multiple domain. Script php can go above root / path. Example if I in domain.com.pl i can view, edit, delete file from domain.com.

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 41480
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem open stream pdf

Post by Jan » 14 Aug 2019, 11:53

Hi, thank you, now I understand, yes unfortunately no clue advices here and I think this must be consulted with server experts (regarding limits or security limits). I will not say that it is somehow related to Joomla! itself, maybe this is related to communication between the server and the user's browser, but really I have no experiences with such problem so these are only thoughts :-(

Jan
If you find Phoca extensions useful, please support the project

Post Reply