This should be fixed in tonight's Git update. Please report back if the problem persists and thanks for reporting the bug.
Hi.
I have some problem with PTS.
The error is because the glob() funtion return FALSE if no files were found. This FALSE is handled like an normal array with array_merge. But FALSE can not be merged with an other array. This issue exists at some positions. Here an example:Code:$ phoronix-test-suite list-suites ==================================== Phoronix Test Suite - Suites ==================================== Warning: array_merge(): Argument #2 is not an array in /usr/share/phoronix-test-suite/pts-core/functions/pts-functions_tests.php on line 660 Warning: array_unique(): The argument should be an array in /usr/share/phoronix-test-suite/pts-core/functions/pts-functions_tests.php on line 660 Warning: asort() expects parameter 1 to be array, boolean given in /usr/share/phoronix-test-suite/pts-core/functions/pts-functions_tests.php on line 661
Thanks, AndreasCode:656 function pts_available_suites_array() 657 { 658 $suites = glob(XML_SUITE_DIR . "*.xml"); 659 $local_suites = glob(XML_SUITE_LOCAL_DIR . "*.xml"); 660 $suites = array_unique(array_merge($suites, $local_suites)); 661 asort($suites); 662 663 for($i = 0; $i < count($suites); $i++) 664 { 665 $suites[$i] = basename($suites[$i], ".xml"); 666 } 667 668 return $suites; 669 }
This should be fixed in tonight's Git update. Please report back if the problem persists and thanks for reporting the bug.
Still there. http://bbs.archlinux.org/viewtopic.php?pid=657488
I suggest wrapping the glob() function:
Code:function pts_glob($pattern, $flags = 0) { $r = glob($pattern, $flags); return is_array($r) ? $r : array (); }
Last edited by apaige; 11-17-2009 at 04:16 PM.
Hi apaige,
Thanks for reporting this... The earlier bug poster never reported back to say whether the Git problem fixed it or not, which evidently it did not. However, this will be fixed in Git shortly using a method similar to what you describe.
BTW, can you get that user to submit any other information about what special php.ini settings he may have or anything? First time I've encountered a problem with no tests or suites like that.... And if he can try a .tar.gz copy locally from /home/ as my only thought is that he may have a PHP setting restricting php from opening files in /usr/
I'm another Arch Linux user and having a similar problem. My php.ini is the default one included with Arch, except for adding '/' to open_basedir (otherwise phoronix-test-suite wouldn't start)
Here's the whole php.ini: http://pastebin.com/f29dd8cbe
This is how it went:
Code:% phoronix-test-suite list-tests [ yadda yadda yadda GPLv3 yadda ] Do you agree to these terms and wish to proceed (Y/n)? y Do you wish to enable anonymous usage / statistics reporting (Y/n)? y ==================================== Phoronix Test Suite - Tests ==================================== PHP Warning: array_merge(): Argument #2 is not an array in /usr/share/phoronix-test-suite/pts-core/library/pts-functions_tests.php on line 695 PHP Warning: array_unique() expects parameter 1 to be array, null given in /usr/share/phoronix-test-suite/pts-core/library/pts-functions_tests.php on line 695 PHP Warning: asort() expects parameter 1 to be array, null given in /usr/share/phoronix-test-suite/pts-core/library/pts-functions_tests.php on line 696 PHP Warning: Invalid argument supplied for foreach() in /usr/share/phoronix-test-suite/pts-core/library/pts-functions_tests.php on line 698 PHP Warning: Invalid argument supplied for foreach() in /usr/share/phoronix-test-suite/pts-core/options/list_tests.php on line 28
Another Arch x86_64 user here....same problem. I ran phoronix on another laptop running the i686 version recently without problems.
After installing using pacman I edited /etc/php/php.ini to include / in the openbasedir line. (as usual)
I accept to user stats., etc and then this:
http://pastebin.com/f78a5378dPHP Warning: array_merge(): Argument #2 is not an array in /usr/share/phoronix-test-suite/pts-core/library/pts-functions_tests.php on line 695
PHP Warning: array_unique() expects parameter 1 to be array, null given in /usr/share/phoronix-test-suite/pts-core/library/pts-functions_tests.php on line 695
PHP Warning: asort() expects parameter 1 to be array, null given in /usr/share/phoronix-test-suite/pts-core/library/pts-functions_tests.php on line 696
PHP Warning: Invalid argument supplied for foreach() in /usr/share/phoronix-test-suite/pts-core/library/pts-functions_tests.php on line 698
PHP Warning: Invalid argument supplied for foreach() in /usr/share/phoronix-test-suite/pts-core/options/list_tests.php on line 28
Look at the open_basedir php.ini configuration problem and change that in your configuration to allow it to access PTS files, or just run PTS locally within your home directory.