Tester failed after upgrade from 0.x to 1.x

The forum for help and support with FreeNATS as well as any useful hints and tips
Post Reply
paullanders
Posts: 92
Joined: Thu Sep 04, 2008 9:48 pm

Tester failed after upgrade from 0.x to 1.x

Post by paullanders » Wed Sep 24, 2008 5:16 pm

Hi Dave.

After upgrading from 0.x to 1.x, I noted that test-threaded.php failed with the following errors:

./test-threaded.php: line 1: ?php: No such file or directory
./test-threaded.php: line 2: syntax error near unexpected token `"include.php"'
./test-threaded.php: line 2: `require("include.php");'


The problem was that test-threaded.php was missing it's very first line:

#!/usr/bin/php -q

Paul :)

dave
Site Admin
Posts: 260
Joined: Fri May 30, 2008 9:09 pm
Location: UK
Contact:

Re: Tester failed after upgrade from 0.x to 1.x

Post by dave » Wed Sep 24, 2008 5:45 pm

Hi Paul,

Ah! Perhaps the documentation should have been a bit clearer... I'll have a look.

In v1 the files change from test-threaded.sh to test-threaded.php and no longer have the shebang line. This is because the shebang line requires a specific directory location and some people had problems because their PHP binary wasn't in the same place (there is an alternative program you can use but it doesn't work with parameters).

So... the idea in v1 is that you php test-threaded.php which means you are running the PHP binary from your script and passing it the file to run.

To keep everything working there is (or rather, should be) still a test-threaded.sh which will continue to work in exactly the same way as before - it just has the shebang line and then includes test.threaded.php in the code.

So if you just either change your start script to do a php test-threaded.php or point it back to ./test-threaded.sh all should be ok.

Hope that helps,

Regards,

Dave.

Post Reply