Page 1 of 1

Problem open stream pdf

Posted: 13 Aug 2019, 11:48
by mjmartino
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??

Re: Problem open stream pdf

Posted: 13 Aug 2019, 11:52
by Jan
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

Re: Problem open stream pdf

Posted: 13 Aug 2019, 12:04
by mjmartino
I test in Opera and FF, Chrome.
I try maximum reporting.. zero errors. Console debug no errors.
strange situation...

Re: Problem open stream pdf

Posted: 13 Aug 2019, 21:47
by Jan
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

Re: Problem open stream pdf

Posted: 13 Aug 2019, 23:27
by mjmartino
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?

Re: Problem open stream pdf

Posted: 13 Aug 2019, 23:40
by Jan
Hi, what do you exactly mean with "separation"?

Re: Problem open stream pdf

Posted: 14 Aug 2019, 10:32
by mjmartino
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.

Re: Problem open stream pdf

Posted: 14 Aug 2019, 11:53
by Jan
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