XF 2.1 Error when trying to create an addon

rhodes

Active member
Hello,
I have installed XF2.1 on my development environment (upgrading from XF1.5). Everthing works fine. The forum is running without any error message.

However, when I try to create my first addon, as described here:
https://xenforo.com/xf2-docs/dev/lets-build-an-add-on/

a fatal error occurs:
Fatal error: Uncaught exception 'XF\Db\Exception' with message 'No such file or directory' in /Applications/MAMP/htdocs_wr/community/src/XF/Db/Mysqli/Adapter.php:160

Any idea what can cause this error and how I can fix it? Did sth. went wrong with my installation?

Thank you very much for a short reply.

Regards, rhodes
 
You need to make sure you create the addon using SSH. If you did that then we will need more information such as what step are you on when the error occurred.
 
That looks like it can't connect to your database. Do you have the database setup correctly, and is your server setup correctly to access the database over the CLI?

Liam
 
You need to make sure you create the addon using SSH. If you did that then we will need more information such as what step are you on when the error occurred.
Xf2.1 is runnning on a localhost on a Mac. So I just use the OSX terminal. The error occurs when I try to execute this command.
Code:
sudo php cmd.php xf-addon:create
However, the update itself was fine. The forum on my localhost is running witout any errors @Mythotical
 
@rhodes I run a local environment as well. I found the best option is to SSH into your localhost. If your using vagrant then do the following:
Code:
vagrant ssh

Once you are in SSH, cd to your directory which should be under:
Code:
/var/www/public

Once there run (without sudo):
Code:
php cmd.php xf-addon:create

Then you should go through the add-on creation process without a hitch. I find doing this outside of vagrant ssh can cause issues.
 
Top Bottom