OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Blank Pages after upgrade

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Blank Pages after upgrade

Postby kayiwa » Tue Feb 19, 2013 9:49 am

I am having a problem post upgrade. Our installation works fine but none of the actual articles render. I've looked at what *I think* are the usual suspects. The files_dir is owned by the Web Server. For giggles I placed this directory on the publicly accessible webserver with no change.

The access.log file gives me 200 OK and the error log shows nothing. Is there any other place I should be looking to correct this?

I am running Debian (Squeeze) with all the packages from the Debian project.


Cheers,
kayiwa
 
Posts: 8
Joined: Tue Feb 19, 2013 9:18 am

Re: Blank Pages after upgrade

Postby asmecher » Tue Feb 19, 2013 10:23 am

Hi kayiwa,

The best place to investigate is the lib/pkp/classes/file/FileManager.inc.php class -- particularly readFile function. It's responsible for reading and displaying a file's contents. Try adding a die(...) statement there to display the file path so you know exactly what it's trying to read.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8591
Joined: Wed Aug 10, 2005 12:56 pm

Re: Blank Pages after upgrade

Postby kayiwa » Wed Feb 20, 2013 3:00 pm

Sorry for delayed response. This is what I did.

Code: Select all
        function &readFile($filePath, $output = false) {
                echo $filePath;
                if (is_readable($filePath)) {
                        echo 'Hi';
                        $f = fopen($filePath, 'rb');
                        $data = '';
                        while (!feof($f)) {
                                $data .= fread($f, 4096);
                                if ($output) {
                                        echo $data;
                                        $data = '';
                                }
                        }
                        fclose($f);

                        if ($output) {
                                $returner = true;
                                return $returner;
                        } else {
                                return $data;
                        }

                } else {
                        echo 'Error';
                        $returner = false;
                        return $returner;


It shows me the path to the file. The file itself is readable by the webserver. Just in case my eyes were deceiving me I made the world readable and still it will not render them. I now get

/path/to/file.htmlError

Thanks for any more pointers.
kayiwa
 
Posts: 8
Joined: Tue Feb 19, 2013 9:18 am

Re: Blank Pages after upgrade

Postby asmecher » Wed Feb 20, 2013 3:57 pm

Hi kayiwa,

There may still be a permissions problem with an upstream directory. Have you checked to see what the results of that is_readable call are, e.g. by adding an "else die('Permissions problem!');" statement?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8591
Joined: Wed Aug 10, 2005 12:56 pm

Re: Blank Pages after upgrade

Postby kayiwa » Fri Feb 22, 2013 11:56 am

I get the same error. It *sees* the file but will not render it. A curious thing happened and I pulled in someone more fluent in PHP than I am to look at...

The /path/to/file.html

differs from

/path/to/filetoopen.pdf

By that I mean from the actually server I am able to

/usr/local/bin/lynx /path/to/file.html and when I open that, it is looking for

/path/to/filetoopen.pdf

I feel like I have described the actual problem wrong given that.
kayiwa
 
Posts: 8
Joined: Tue Feb 19, 2013 9:18 am

Re: Blank Pages after upgrade

Postby asmecher » Fri Feb 22, 2013 12:16 pm

Hi kayiwa,

Sorry, just making sure I'm following -- in the above code sample you provided, were you seeing "Hi" or "Error"?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8591
Joined: Wed Aug 10, 2005 12:56 pm

Re: Blank Pages after upgrade

Postby kayiwa » Fri Feb 22, 2013 1:40 pm

My apologies. I restarted the upgrade process with a clean DB dump and clean ojs install files (instead of)

Code: Select all

php tools/upgrade.php patch


and was able to go to 2.4.0

Sorry for the noise.
kayiwa
 
Posts: 8
Joined: Tue Feb 19, 2013 9:18 am

Re: Blank Pages after upgrade

Postby asmecher » Fri Feb 22, 2013 2:00 pm

Hi kayiwa,

Glad to hear you got it going.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8591
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests