OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Failed install on CentOS

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.

Failed install on CentOS

Postby ChristinaSalazar » Mon Mar 11, 2013 4:17 pm

Hello,

We're on Apache 2
PHP 5.3.3
PostgreSQL 8.4.11

I've already checked the FAQs for installation problems and tried some of the suggestions there, but nothing seems to be fixing the issue that I'm having. I tried to install version 2.3.8 and then moved to 2.4.2 and am having the same problem with each: the installation form loads successfully, but after clicking the button to install, a blank page appears and the database was not created. I verified with phpinfo(); that the module for PHP/PostgreSQL is installed and see the following:

PostgreSQL Support enabled
PostgreSQL(libpq) Version 8.4.11
Multibyte character support enabled
SSL support enabled
Active Persistent Links 0
Active Links 0

per the comments in php.ini, modules are loaded dynamically from the php.d directory

I tested to see if php was interacting correctly with postgresql by creating a very simple php script with a SQL select statement that I ran from the same directory as where I've installed OJS and the script worked correctly.

There are no errors in apache's error_log. The last few entries in apache's access_log are:
10.23.215.40 - - [11/Mar/2013:14:05:49 -0700] "GET /ojs-2.4.2/index.php/index/install HTTP/1.1" 200 31199 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"
10.23.215.40 - - [11/Mar/2013:14:40:59 -0700] "GET / HTTP/1.1" 200 1343 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"
10.23.215.40 - - [11/Mar/2013:15:19:24 -0700] "GET / HTTP/1.1" 200 1343 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"
10.23.215.40 - - [11/Mar/2013:15:19:26 -0700] "GET /ojs-2.4.2/ HTTP/1.1" 302 - "http://10.10.121.142/" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"
10.23.215.40 - - [11/Mar/2013:15:19:26 -0700] "GET /ojs-2.4.2/index.php/index/install HTTP/1.1" 200 31199 "http://10.10.121.142/" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"
10.23.215.40 - - [11/Mar/2013:15:20:13 -0700] "POST /ojs-2.4.2/index.php/index/install/install HTTP/1.1" 200 - "http://10.10.121.142/ojs-2.4.2/index.php/index/install" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"
10.23.215.40 - - [11/Mar/2013:15:21:15 -0700] "GET /ojs-2.4.2/index.php/index/install HTTP/1.1" 200 31199 "http://10.10.121.142/" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"
10.23.215.40 - - [11/Mar/2013:15:41:53 -0700] "GET / HTTP/1.1" 200 1343 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"
10.23.215.40 - - [11/Mar/2013:15:41:55 -0700] "GET /ojs-2.4.2/ HTTP/1.1" 302 - "http://10.10.121.142/" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"
10.23.215.40 - - [11/Mar/2013:15:41:55 -0700] "GET /ojs-2.4.2/index.php/index/install HTTP/1.1" 200 31199 "http://10.10.121.142/" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"

I'm out of ideas of other things to try to get this installation to work correctly. Anyone with any suggestions?

Thanks!
Christina
ChristinaSalazar
 
Posts: 8
Joined: Mon Mar 11, 2013 12:19 pm

Re: Failed install on CentOS

Postby ChristinaSalazar » Tue Mar 12, 2013 3:31 pm

Does it matter that the installed database driver is PDO not ADOdb???
ChristinaSalazar
 
Posts: 8
Joined: Mon Mar 11, 2013 12:19 pm

Re: Failed install on CentOS

Postby asmecher » Tue Mar 12, 2013 3:52 pm

Hi Christina,

Does your test PostgreSQL script use PDO or does it use the older pg_... functions (e.g. pg_connect)?

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

Re: Failed install on CentOS

Postby ChristinaSalazar » Tue Mar 12, 2013 4:39 pm

It used the pg_ functions, so I see now why this wasn't a good test.
ChristinaSalazar
 
Posts: 8
Joined: Mon Mar 11, 2013 12:19 pm

Re: Failed install on CentOS

Postby asmecher » Tue Mar 12, 2013 5:17 pm

Hi Christina,

Actually, that's a good test; ADODB uses the pg_ functions internally.

Have you checked whether or not there is another place PHP errors might be getting logged? It may not be the Apache error log, depending on your server configuration.

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

Re: Failed install on CentOS

Postby ChristinaSalazar » Wed Mar 13, 2013 11:48 am

I adjusted php's error logging in php.ini and checked the Apache log and see the following:

[Wed Mar 13 11:25:50 2013] [error] [client 10.23.215.40] ojs2 has produced an error\n Message: WARNING: Cannot modify header information - headers already sent by (output started at /var/www/html/ojs/lib/pkp/includes/functions.inc.php:23)\n In file: /var/www/html/ojs/lib/pkp/classes/template/PKPTemplateManager.inc.php\n At line: 295\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.3.3\n Apache Version: Apache/2.2.15 (CentOS)\n DB Driver: mysql, referer: http://10.10.121.142/ojs/

I'm confused though because I set php.ini to report errors to php_errors.log and no such file is created.
ChristinaSalazar
 
Posts: 8
Joined: Mon Mar 11, 2013 12:19 pm

Re: Failed install on CentOS

Postby asmecher » Wed Mar 13, 2013 3:29 pm

Hi Christina,

What do you see in lib/pkp/includes/functions.inc.php at line 23?

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

Re: Failed install on CentOS

Postby ChristinaSalazar » Wed Mar 13, 2013 3:46 pm

Hmmm... at line 23 I see the following:

static $deprecationWarning = null;

but I think a more likely culprit is a couple lines later (more of code block here):

if (!function_exists('import')) {
function import($class) {
static $deprecationWarning = null;

// Try to bypass include path for best performance
$filePath = str_replace('.', '/', $class) . '.inc.php';
if((@include_once BASE_SYS_DIR.'/'.$filePath) === false) {
// Oups, we found a legacy include statement,
// let's try the include path then.
require_once($filePath);
if (is_null($deprecationWarning) && class_exists('Config')) {
$deprecationWarning = (boolean)Config::getVar('debug', 'deprecation_warnings');
}
if ($deprecationWarning) trigger_error('Deprecated import of a partially qualified class name.');
}
}
}
ChristinaSalazar
 
Posts: 8
Joined: Mon Mar 11, 2013 12:19 pm

Re: Failed install on CentOS

Postby asmecher » Wed Mar 13, 2013 3:59 pm

Hi Christina,

Hence my confusion; I'm not sure why PHP believes output is being generated at that line. (The output it mentions could be a warning or error message; if so, make sure you quote it.) These "cannot modify header information" warnings are themselves harmless, but they can prevent redirects and the like and may indicate problems elsewhere.

Make sure you restart your Apache process after you adjust php.ini settings; if you're using mod_php or FastCGI or the like, changes won't take effect until you do.

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

Re: Failed install on CentOS

Postby ChristinaSalazar » Wed Mar 13, 2013 4:25 pm

Ok... I know why that error message is showing up there... I'd edited functions.inc.php to add the line to output classes as they are called per some suggestions in the faqs - that change was right around line 23. I later deleted the line as I didn't see anything useful from that output.

I've made no other changes to the source code.

As to restarting Apache after modifying php.ini - yep... that's what I've been doing.

When I click the submit button on the install form the url that is returned is this: http://10.10.121.142/ojs/index.php/inde ... ll/install - is that correct?
ChristinaSalazar
 
Posts: 8
Joined: Mon Mar 11, 2013 12:19 pm

Re: Failed install on CentOS

Postby asmecher » Wed Mar 13, 2013 4:57 pm

Hi Christina,

Your installation is behaving exactly like it would if the PostgreSQL module was missing -- blank screen, no error message, with the URL you've noted above. A good debugging next step would be to verify that the pg_... functions work when called directly, which is what you've already done. Unfortunately debugging a blank screen with no error message doesn't give one much to work with and it's one of the pernicious things about PHP. The next step I'd recommend will be to find out how far the script gets before it dies, and unfortunately there's no more elegant way to do this than to go to various points in the system and add "die(...);" messages, trying again as you go. I'd suggest starting with lib/pkp/classes/install/Installer.inc.php in the "execute" function -- that's where the actual installation process happens.

One note -- before you do this, it's worth spending a little time figuring out your PHP error message configuration. It would be annoying to spend time trying to debug a blank screen only to discover that error messages were helpfully logged somewhere you weren't looking. Your phpinfo() output is the definitive resource here -- but make sure that you're testing with the same environment you're working in; some servers will have one php.ini for command-line access and another for web-based access.

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

Re: Failed install on CentOS

Postby ChristinaSalazar » Thu Mar 14, 2013 9:51 am

Thanks, Alec. At least this is something to go on.

This is actually my first experience with open source - too bad it's gone this way (which I know is not the fault of the software), but I'm glad for the experience and to see how community support works.

Thanks again!
Christina
ChristinaSalazar
 
Posts: 8
Joined: Mon Mar 11, 2013 12:19 pm

Re: Failed install on CentOS

Postby ChristinaSalazar » Fri Mar 15, 2013 3:00 pm

We went ahead and wiped the server and rebuilt it, this time enabling MySQL instead of PostgreSQL and I have now been successful with the install. I wonder if there's some issue with the way that PostgreSQL is set up on CentOS that causes this failure. If anyone should happen to run into this/have a solution, I'd love to know, because I do have a VERY slight preference for PostgreSQL.

Meanwhile, much thanks to Alec for helping out!
Christina
ChristinaSalazar
 
Posts: 8
Joined: Mon Mar 11, 2013 12:19 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 6 guests