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
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.

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: 8337
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: 8337
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 4 guests