Website goes blank!

Phoca PDF - creating PDF documents in Joomla! CMS
newbieonjoomla
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 19 Jul 2009, 01:19

Website goes blank!

Post by newbieonjoomla »

Hi!

I installed the Phoca PDF component and plugin on my website. However when I activate the plugin, my website goes blank. I am using PHP 5.2.9.

I also tried to go through the documentation but it didnt help either.

Is there something else I need to do before I can start using this?

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

Re: Website goes blank!

Post by Jan »

Hi, try to see error_log on your server, maybe you will find there some error message.

Jan
If you find Phoca extensions useful, please support the project
newbieonjoomla
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 19 Jul 2009, 01:19

Re: Website goes blank!

Post by newbieonjoomla »

Hello Jan

Thanks for your message. Though the PHP error log is activated but it doesnt show any error messages. When I activate the PDF extension the website just goes blank.

Cant figure out why

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

Re: Website goes blank!

Post by Jan »

Try to enable debug in global configuration too.
If you find Phoca extensions useful, please support the project
mportela
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 10 Aug 2009, 16:21

Re: Website goes blank!

Post by mportela »

Has this issue been solved? It happens to me as well on different webpages... Lood like a promising component too bad I can't use it.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Website goes blank!

Post by Jan »

Hi, you should see your error log (for possible problem) on your server or try to enable debug mode.

As there can be unlimited count of problems (combination of PDF + server settings + possible wrong output in the site) no fix can be done until we will know what causes the problems. :( :( :(

Jan
If you find Phoca extensions useful, please support the project
mportela
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 10 Aug 2009, 16:21

Re: Website goes blank!

Post by mportela »

Hi there,

As you have said previously I did consult the error logs, activated debug and tried to read all kind of logs available at cPanel. I had no error recorded logs, nothing to work with or share to solve this. Thus my asking if this was solved at all, being clueless as the OP.

I'm just sad I can't use your promising PDF outputter because the default one is a mess.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Website goes blank!

Post by Jan »

:(
If you find Phoca extensions useful, please support the project
F@re
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 18 Aug 2009, 23:27

Re: Website goes blank!

Post by F@re »

Hello Jan,

I'm new here so let me first thank you for all your great work.

And now into this problem. Since my site also went blank after I enabled you pdf plugin I started to look for reason. I hope that you don't mind for looking into code. I'm not too much into php(I prefer desktop languages for programing :) ) but I guess that I found root of problem.

After some investigation i found out that problem is in php function preg_replace_callback. It seems that from version 5.2 php there are some restrictions regarding this function. (according to this link http://www.allegro.cc/forums/print-thread/593073).
So like link say i used function preg_last_error() after your call to preg_replace_callback to find out is there really error and I get PREG_BACKTRACK_LIMIT_ERROR! (this is traced inside phocapdfcontent.php from plugin). For explanation look at http://us2.php.net/manual/en/function.p ... -error.php. But since your orginal code never calls this error checking function then $bodySite goes to empty and response is blank page without any explanation.

So I think that you need rewrite code that replace format=pdf for format=phocapdf (I tried simple call to ereg_replace and it works after I change code but I guess that is not too good solution)

My server has PHP Version: 5.2.9 so it's seams indeed that problem is preg_replace_callback.

Hope that this help and that you will bring us correct solution very soon.

F@re
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Website goes blank!

Post by Jan »

Hi, thank you for your information, yes the non system solution (find and replace link to pdf) is not good solution but didn't find any better :-(

Maybe using ereg_replace will be better then preg_replace_callback.

Did you test it, does it work? If yes, I will try to change it and test it.

Can you share changes you have made?

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