Automatic Upgrades Script errors


(Nic Hubbard) #1

We just got our system up to 3.28.2 so that we could use the automatic upgrade scripts. When running the script, we get the following error:

    ####################################                                                                    
    *ERROR*8* Undefined index:  _ . /home/rhiebert/matrix/automatic_upgrades/steps/step_run_install_step.php
    :27                                                                                                     
    ################################################################################                        
                                                                                                        
    sh: /opt/matrix/install/step_02.php: Permission denied                                                  
    *ERROR*  '/opt/matrix/install/step_02.php' '/opt/matrix' returned error code 126


Full log dump: http://www.zedsaid.com/__data/assets/text_file/0007/979/screenlog.txt

Really not sure why we have permissions problems, we are running as root, and the config file was setup correctly. Also, what is the Undefined index error?

Thanks!

Note: Using the 4-4-0 version of the script and wanting to upgrade to 4.4.0. On Debian Lenny 5.0.8.

(Chris Smith) #2

Hi,


I'll have a look into the undefined index but the other error is a little weird. It thinks it's running step_2 as a shell script, basically it can't find the php binary in the path. Where is php installed? Is it in the root users path?


[quote]

We just got our system up to 3.28.2 so that we could use the automatic upgrade scripts. When running the script, we get the following error:


    ####################################                                                                    
    *ERROR*8* Undefined index:  _ . /home/rhiebert/matrix/automatic_upgrades/steps/step_run_install_step.php
    :27                                                                                                     
    ################################################################################                        
                                                                                                        
    sh: /opt/matrix/install/step_02.php: Permission denied                                                  
    *ERROR*  '/opt/matrix/install/step_02.php' '/opt/matrix' returned error code 126


Full log dump: http://www.zedsaid.com/__data/assets/text_file/0007/979/screenlog.txt

Really not sure why we have permissions problems, we are running as root, and the config file was setup correctly. Also, what is the Undefined index error?

Thanks!

Note: Using the 4-4-0 version of the script and wanting to upgrade to 4.4.0. On Debian Lenny 5.0.8.
[/quote]

(Chris Smith) #3

[quote]
Hi,



I'll have a look into the undefined index but the other error is a little weird. It thinks it's running step_2 as a shell script, basically it can't find the php binary in the path.

[/quote]



Ahh, no it's not. The undefined index is probably being triggered by running 'sudo php' (normally we do a full su) and that's also carrying through to step_2 not running properly.



If you want to change this for now then you'll need to edit a couple of files:



steps/step_checkout_code.php

steps/step_rollback.php

steps/step_run_install_step.php

steps/step_run_script.php



Anywhere that you see



$SERVER['']



change to



/full/path/to/php


(Nic Hubbard) #4

[quote]
Ahh, no it's not. The undefined index is probably being triggered by running 'sudo php' (normally we do a full su) and that's also carrying through to step_2 not running properly.

[/quote]



We were using sudo and that seemed to be the issue. Switched to root and everything worked!



Thanks Chris.


(Chris Smith) #5

[quote]
We were using sudo and that seemed to be the issue. Switched to root and everything worked!



Thanks Chris.

[/quote]



Excellent :slight_smile: I've almost got this fixed properly so in future you can set a php_path in the conf/main.conf file.


(Nic Hubbard) #6

[quote]
Excellent :slight_smile: I've almost got this fixed properly so in future you can set a php_path in the conf/main.conf file.

[/quote]



Wonderful! Thanks.