OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Warning: array_merge() [function.array-merge]

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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Warning: array_merge() [function.array-merge]

Postby timmcgeary » Wed Aug 15, 2007 1:24 pm

I got the following error when trying to do a search in OJS version 1.1:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/local/ojs/search.php on line 44

We just did an OS upgrade on the server in which this journal was residing from RH ES 3 to CentOS 5. Maybe this is a configuration issue or a php library?
timmcgeary
 
Posts: 29
Joined: Wed Aug 15, 2007 1:15 pm

Re: Warning: array_merge() [function.array-merge]

Postby asmecher » Wed Aug 15, 2007 3:14 pm

Hi timmcgeary,

You're probably running a newer version of PHP than OJS 1.x was designed for, so you'll probably see a number of these sorts of warnings pop up. They're harmless, i.e. everything will still work, but they are also distracting. The easiest way to deal with them is to configure PHP to redirect error and warning messages to a log file rather than displaying them on the screen. (If you don't have access to your system php.ini, you can also configure this using ini_set directives.)

This is generally a good idea for production machines anyway, since errors and warnings displayed on the screen can sometimes be used to compromise security.

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

Re: Warning: array_merge() [function.array-merge]

Postby timmcgeary » Thu Aug 16, 2007 5:49 am

I do know where to change this in the php.ini file, but unfortunately this isn't harmless. It is the only warning/error message we are getting and it is with the Search function, which isn't working. It only reports this error.
timmcgeary
 
Posts: 29
Joined: Wed Aug 15, 2007 1:15 pm

Re: Warning: array_merge() [function.array-merge]

Postby timmcgeary » Thu Aug 16, 2007 6:03 am

I just looked at the install page from version 1.1 and the only stipulation for PHP version is that it is later than 4.1.2. Would PHP 5.1.6 have something that would just kill it? I can't imagine that.
timmcgeary
 
Posts: 29
Joined: Wed Aug 15, 2007 1:15 pm

Re: Warning: array_merge() [function.array-merge]

Postby asmecher » Thu Aug 16, 2007 9:32 am

Hi Tim,

OJS 1.x was written to use a number of PHP features that have since been phased out, such as register_globals; there have been a number of changes in the PHP 4.x and 5.x lines that have affected it, although usually just in terms of error reporting.

If you need some help debugging this and you're comfortable giving me temporary server access, I can have a look. Please PM me with the details and I'll see what I can find.

I'd strongly suggest upgrading to OJS 2.x, as we're not actively maintaining the 1.x line any more.

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


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot], Yahoo [Bot] and 2 guests