WebFaction
Community site: login faq

Hi,

I'm trying to automate some tasks, I'm using phing build tool, it is based on php and the webfaction doesn't have a default php api client, so a I started to write, i'm using as reference the python webfaction api.

I'm writing some tests, but when I trying to create app via API i get:

<class 'webfaction_api.exceptions.dataerror'="">:[u"Error: the install script didn't output the new application ID (it didn't produce any output)"]

the call code:

public function testCreateAndDeleteAppSuccess()
{
    $webfApi = new \WebFaction\Api();
    $webfApi->login(self::validUser, self::validPassword);

    $appName   = 'testWP';
    $appType   = 'wordpress_351'; // Must consulting listAppTypes to see possible alternatives
    $autoStart = false;
    $return    = $webfApi->createApp($appName, $appType, $autoStart);
    $this->assertTrue($return);
    if($return){ // cleanup
        $returnDelete = $webfApi->deleteApp($appName);
        $this->assertTrue($returnDelete);
    }
}

and the base code:

public function createApp($appName, $appType, $autoStart = false, $extraInfo = '')
{
    try{
        $args   = [$this->sessionId, $appName, $appType, $autoStart, $extraInfo];
        $this->logger->addDebug(var_export($args, true));
        $result = @$this->client->call('create_app', $args);
        $this->logger->addDebug(var_export($result, true));
    }catch(FaultException $e){
        $this->logger->addError($e->getMessage());
        return false;
    }
    return true;
}

Any idea of what is happening ?

asked 11 Mar '13, 10:15

Daniel Martins
11
accept rate: 0%


Since your app is named "testWP", the installer is trying to create a database named "account_wp_testWP". Our control panel won't let you create a database that contains uppercase characters in the name, so I think that's where the failure is occurring.

As an immediate workaround, just try using a different app name that is all lowercase, and that won't conflict with any of your existing database (and database user) names.

On our end, we're already looking into the "Error: the install script didn't output the new application ID (it didn't produce any output)" error (which is a generic error message that is masking the actual error message that describes the real problem). We'll also tweak the WordPress installer so that it won't attempt to create a database with an invalid name.

Hope that helps!

permanent link

answered 11 Mar '13, 11:02

seanf
12.2k31736
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×261
×112
×75
×54
×9

question asked: 11 Mar '13, 10:15

question was seen: 2,045 times

last updated: 11 Mar '13, 11:02

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM