Deployer - Fatal error: Call to undefined function server()

mcv

Deployer version 4.1.0

When running dep deploy test the following error is reported:

PHP Fatal error: Call to undefined function server()

server ftn is defined as follows in config file:

// Configure servers
server('test', 'test.server.com')
    ->user('user')
    ->identityFile('~/.ssh/id.pub', '~/.ssh/user', 'password')
    ->stage("test")
    ->env('deploy_path', '/var/www/project.com');  

This is pretty much the standard as per the Deployer site. Has anyone else experienced this issue? If so how did you resolve it?

mcv

SOLUTION

Fixed issue by running the following cmd (Suggested in comments above by Ken)

dep init

Compared the auto-generated deploy.php file to the original. Noted that the following was omitted:

namespace Deployer;

Also noted that ->env has been replaced with ->set

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Fatal error: Call to undefined function curl_init()

PHP Fatal error: Call to undefined function Laravel tinker

Fatal error: Uncaught Error: Call to undefined function mysql_connect()

PHP Fatal error: Call to undefined function json_decode()

PHP Fatal error: Call to undefined function imagecreatefrompng()

Fatal error: Uncaught Error: Call to undefined function - have to use $this

Fatal error: Call to undefined function get_row_css_class()

Call to undefined function iconv() fatal error - Suitecrm

PHP Fatal error: Call to undefined function?

Fatal error: Uncaught Error: Call to undefined function bcadd()

CodeIgniter PHP Fatal error: Call to undefined function form_open()

Fatal error: Uncaught Error: Call to undefined function get_option()

Fatal Error: Call to undefined function curl()

Caught fatal error: Call to undefined function geoip_db_avail()?

Fatal error: Call to undefined function sqlsrv_connect()

Fatal error: Call to undefined function bindParam()

phpMyAdmin Fatal error: Call to undefined function __()

Wordpress Fatal error: Call to undefined function get_header()

PHP to Postgres - Fatal error: Call to undefined function pg_connect()

Fatal error: Call to undefined function session_id() when installing

Fatal error: Call to undefined function

PHP Fatal error : Call to undefined function mysql_connect()

PHP Fatal error: Call to undefined function curl_init()

PHP Fatal error: Call to undefined function pdo_query()

Fatal error: Uncaught Error: Call to undefined function mysqli_connect()

Fatal error: Call to undefined function runQuery()

Fatal error: Uncaught Error: Call to undefined function mysql_close()

Fatal error: Uncaught Error: Call to undefined function header() - Beginner question

Fatal error: Uncaught Error: Call to undefined function get_header()