After uploading my site from my pc to the server Whenever I try to run update.php on my site I get this error. warning: array_pop() [function.array-pop]: The argument should be an array in /home/musicdow/public_html/update.php on line 314.

Why this error happening?

Comments

aneuryzma’s picture

hi, did you solve it ?

idcm’s picture

did you check your error logs? I just got the same issue with D6.17 when running update after uploading some module updates. Servers Error logs shows:

[Fri Jul 09 15:29:47 2010] [error] [client 71.163.146.41] ModSecurity: Access denied with code 403 (phase 2). Match of "rx (^application/x-www-form-urlencoded$|^multipart/form-data;)" against "REQUEST_HEADERS:Content-Type" required. [file "/etc/httpd/conf.d/modsecurity.conf"] [line "152"] [id "9001"] [hostname "example.com"] [uri "/update.php"] [unique_id "bP@2rULFPj0AAAerC2AAAAAA"]

Notice that modsecurity.conf might be the issue. I have had modsecurity be the cause of many issues like this on my Drupal sites. My server guys at prohosters.com go in and tweak the modsecurity settings a little and all gets better.

If they tell me the solution, i will post it here. Otherwise, let your server guys know this info.

idcm’s picture

The solution to the mod_security issue above was as follows on a Centos Linux install:

They modified the settings for modsec (in /etc/httpd/conf.d/modsecurity-carp.conf) so it will be disabled for this domain:



SecRuleRemoveById 9001
SecRuleEngine Off

idcm’s picture

The solution I posted here was only part of the problem. It returned recently. The errors were:

[Thu Jul 15 20:21:23 2010] [error] [client xx.xxx.xxx.xx] ModSecurity: Access denied with code 403 (phase 2). Match of "rx (^application/x-www-form-urlencoded$|^multipart/form-data;)" against "REQUEST_HEADERS:Content-Type" required. [file "/etc/httpd/conf.d/modsecurity.conf"] [line "152"] [id "9001"] [hostname "example.net"] [uri "/filefield/ahah/page/field_page_image/1"] [unique_id "Mu55zULFPj0AAC28CnsAAAAB"]

[Thu Jul 15 20:22:59 2010] [error] [client xx.xxx.xxx.xx] ModSecurity: Access denied with code 403 (phase 2). Match of "rx (^application/x-www-form-urlencoded$|^multipart/form-data;)" against "REQUEST_HEADERS:Content-Type" required. [file "/etc/httpd/conf.d/modsecurity.conf"] [line "152"] [id "9001"] [hostname "example.net"] [uri "/admin/build/views/ajax/add-item/ergrt/default/filter"] [unique_id "OKrBUULFPj0AAG2LcqAAAAAD"]

[Thu Jul 15 20:24:04 2010] [error] [client xx.xxx.xxx.xx] ModSecurity: Access denied with code 403 (phase 2). Match of "rx (^application/x-www-form-urlencoded$|^multipart/form-data;)" against "REQUEST_HEADERS:Content-Type" required. [file "/etc/httpd/conf.d/modsecurity.conf"] [line "152"] [id "9001"] [hostname "example.net"] [uri "/update.php"] [unique_id "PIrumELFPj0AAGc6YjMAAAAC"] 

After talking with Marius at Prohosters, he explains (like it says in many articles out there) that "there is no actual solution. i just added rules in the modsecurity config based on the error ID from the logs. it won't be the same on other servers, that ID can change. if you want to share the solution just tell them to check the modsecurity log and site error log and they will see the path and ID they need to allow."

The error came back after these settings were made and "my best guess is that something in the script changed triggering a change in the ID there were some rules already added in there but they did not cover the errors completely"

Good luck. Just find a hosting plan that is willing to spend as much time as it takes to resolve it.