Laravel 5 + Homestead + HHVM + PGSQL = Driver not found - laravel

My PHP project uses PGSQL. It runs successfully from Homestead on my dev machine. As soon as I add hhvm: true to my project in homestead.yaml, and provision -- my web app throws a PDOException with a driver is not found. The exception goes away as I remove the hhvm:true and re-provision homestead.
Obviously HHVM's config does not include the PGSQL driver.
How do I correct that?

You don't give a lot of details about your setup, so it's not clear if you have the Postgres driver installed. Postgres isn't supported right out of the box. You have to build and/or install it yourself.
Facebook has an "official" list of HHVM extensions. PGSQL is not (yet) integrated into HHVM proper, but Facebook's page points to the external GitHub project, which is here:
Postgres Extension for HHVM
Below is a summary of the project instructions; you can read them yourself in the README.md files.
Build from source
If you want to build it from source, you will need the hhvm-dev and libpq-dev packages to be installed. Once they have been installed, the following commands will build the extension:
$ cd /path/to/source
$ hphpize
$ cmake .
$ make
This will produce a pgsql.so file, the dynamically-loadable extension. Copy this file to /etc/hhvm/pgsql.so.
Pre-built binaries
If you don't want to build it, there are pre-built binary versions for some of the popular distros in the separate "releases" branch here: Releases.
Again, copy the downloaded pgsql.so file to /etc/hhvm/pgsql.so.
Configuration
Whether you build from source or install binaries, you need to tell HHVM where to find it. Edit your config file (generally /etc/hhvm/php.ini) and add these if they're not present:
extension_dir = /etc/hhvm
hhvm.extensions[pgsql] = pgsql.so
You can check that everything is working by running
hhvm --php -r 'var_dump(function_exists("pg_connect"));'
If everything is working fine, this will output bool(true).
You may need to restart HHVM to have the server pick up the extension.

Related

TYPO3 v10: Install extension with cmd on Windows 10

I'm trying to install a typo3(v10) extension with composer under XAMPP in the C:\xampp\htdocs\typo3\public\typo3 folder. I'm on Windows 10, I use cmd in admin to install with composer.
With cmd, I accessed my TYPO3 folder using the following command: cd C:\xampp\htdocs\typo3 then I started composer. I typed the command:
composer require typo3/cms-introduction
I get a message that told me the extension is installed. Following the instructions, I must now enter the following commands:
./vendor/bin/typo3 extension: activate bootstrap_package
./vendor/bin/typo3 extension: activate introduction
But cmd returns me the following message (an english translation from the message i get in french)
'.' is not recognized as an internal order or external, an executable
program or a batch file.
How can I activate those 2 extensions?
(De-)Activating TYPO3 extensions is always possible via the extension manager module in the TYPO3 backend.
Side note:
Maybe you want to check out DDEV-local as local development environment instead of XAMPP. DDEV uses Docker and is an awesome powerful tool but easy to use. And it provides a native shell for commands like yours above.
A big plus is the very helpful community. If you have problems, register an account at my.typo3.org, request your TYPO3 Slack invitation and go to the #ddev Slack channel.
This works on Windows:
vendor\bin\typo3 extension:activate <EXTKEY>
Note: You have to solve dependencies manually, but you will be warned and the extension will not be activated if dependencies are absent.

devspace behind coporate proxy

I am installing devspace in my local windows machine using npm
npm install -g devspace
after installed, it needs to Finish installation of DevSpace CLI, in which the following request is failed
Error requesting URL: https://github.com/devspace-cloud/devspace/releases/download/v5.1.0/devspace-windows-amd64.exe
I think it's because of my machine is using the company's proxy. However, I don't know how to config proxy in devspace (just like git, for example).
DevSpace maintainer here. Instead of using npm, you can also download the release binary manually from GitHub: https://github.com/devspace-cloud/devspace/releases/
You can just do this:
Download the devspace-windows-amd64.exe for a release
Rename the downloaded file to devspace.exe
Save the devspace.exe file in a folder (and add this folder to your PATH environment variable) => You may need to restart after changing the PATH variable
That's basically what the npm installer does as well but it seems like it is unable to download the binary from GitHub. This may be because of a proxy or because of anything related to GitHub (your company may hit the rate limit or something else).

Looking for cloud based ide/ides where i can setup apache-superset for developement

I am looking to play with apache-superset on a cloud-based ide. I have it on my local. I tried unsuccessfully to set it up on gitpod. I wanted suggestions on where can I set it up, opensource preferably not necessarily. I believe cloud9 is 1 such place, but I am looking for other options before I settle. If you've ever set it up on any such platform, even if it is on gitpod and can help me, kindly do so.
[Disclaimer: Gitpod staff]
You can indeed use Gitpod to work on apache-superset, and for that you'll just need a working configuration.
From what I can see in apache-superset's requirements, you'll need to get:
PostgreSQL (e.g. by using Gitpod's official gitpod/workspace-full-postgres Docker base image)
Redis (e.g. by installing it in a Dockerfile via sudo apt-get install)
Various Python dependencies (e.g. by running pip install . after cloning)
Various Node.js dependencies for the front-end (e.g. by running npm install)
Here is a basic configuration I wrote to achieve this:
https://github.com/jankeromnes/incubator-superset/commit/0d345a76ec8126fd1f8b9bc7b6ce4961bf3b593d
What it does is:
Create a Docker image with PostgreSQL and Redis
Once the repository is cloned, open 4 separate Terminals ("tasks"):
Redis server
Superset backend
Superset worker
Superset front-end
All dependencies will be installed automatically, and once the front-end is ready, it will automatically open in a web preview IDE side panel.
You can try it out by opening my personal fork of the apache-superset repository in Gitpod, e.g. by following this link:
https://gitpod.io/#https://github.com/jankeromnes/incubator-superset

Vagrant dev build throwing errors

So I am having some issues with vagrant. I had initially tried to report this as an issue on the vagrant github issue boards, but they kept closing the issues without responding to them. I guess they decided I wasn't worth their time, or they were just behaving unprofessionally. Anyway, Here is the problem: I use vagrant with virtualbox, and a new version of virtualbox was recently released that is, unfortunately, not compatible with the latest vagrant installation.
However, the people at hashicorp have already updated the source code so that it is compatible with the new version of virtualbox, but you have to build the vagrant executable from the source repo (instructions here). So I followed the instructions and vagrant is working just like it used to.....when the only command I need to run is vagrant up. I should also mention ahead of time that, in order to run the vagrant dev build, the current working directory needs to be the root of the source code repo and the dev build can only be run using the following command with ruby:
bundle exec vagrant
With that being said, I needed to update one of my custom boxes, so I built a vm in the updated version of virtualbox and ran the below command
bundle exec vagrant package --base go --vagrantfile ../../vagrant/vagrantfile
After an extended period of time, vagrant spat back out the following error
The executable 'bsdtar' Vagrant is trying to run was not found in the %PATH% variable. This is an `error. Please verify this software is installed and on the path.`
I should also note that I use a windows machine and that this error never occurred when using the installed version of vagrant. At this point, I had posted the issue on github to get some input from the devs, but they (very unprofessionally) decided to ignore my requests for help and close the issues without providing any response. I used the GNUwin32 project to make numerous unix commands available to my Windows environment and added the folder to my PATH environment variable. I then run the same command again to create my new box and it works!! So then I upload it to the vagrant cloud and attempt to update the vagrant box that is stored on my system by running the following command:
bundle exec vagrant box update
Then, after waiting for a while, vagrant then spat this error out at me:
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):
C:\gnuwin32\bin/bsdtar.EXE: invalid option -- s
Usage:
List: bsdtar.EXE -tf <archive-filename>
Extract: bsdtar.EXE -xf <archive-filename>
Create: bsdtar.EXE -cf <archive-filename> [filenames...]
Help: bsdtar.EXE --help
Another error, and still involving this bsdtar tool. It does not appear that anyone else is reporting the issue I am running into because I think they are just waiting for hashicorp to release the new official installation, but, just to give you a look into their priorities, the version of virtualbox that was released which no longer worked with vagrant was released back on December 10. It has been over a month since and there is still no updated release.
So, I am hoping that someone out there might be able to find out why I keep running into these errors when trying to use vagrant's dev build and provide a solution. If not, then maybe if someone else is able to reproduce the issue and report it to hashicorp, maybe they will listen to someone else.
If you are on Ubuntu 20.04 then bsdtar was removed. Try to install libarchive-tools package.
$ sudo apt-get install libarchive-tools
I figured it out. My original hypothesis was correct: since vagrant is a tool that was built primarily to be run on linux machines, then vagrant runs in windows, the installation includes a mingw environment with all of the dependencies vagrant needs to function and which the installed vagrant executable imports into the console session when run. This why the dev build kept failing: because it was not importing this mingw environment. So, in order to fix the issue, I first cloned the vagrant source code repo from github and followed the instructions I linked to above to build the executable from the source repo. I then copied all of the files in the source repo into the following folder:
<hashicorp install folder root>\Vagrant\embedded\gems\2.2.6\gems\vagrant-<version num>
So, for me, the destination directory is C:\HashiCorp\Vagrant\embedded\gems\2.2.6\gems\vagrant-2.2.6
This directory is identical to the source code repo, and copying the source code repo to the above folder replaces the installation version of vagrant with the dev build. After I did this, running the vagrant commands which had failed previously normally (as in, without using ruby or bundle) worked. I hope this helps someone else out there who Hashicorp has decided is not worth their time.

Installing MULE ESB mule-standalone-3.3.1

Can some guide me .. for installing Mule ESB(mule-standalone-3.3.1) in Ubuntu . I am unable to find any documentation for installing. i want to automate it through Chef.
It's can be as simple as downloading and unpacking the archive file from: http://dist.codehaus.org/mule/distributions/mule-standalone-3.3.1.zip
Note: You need jdk 6/7 installed first.
Here's a chef cookbook that does this: https://github.com/ryandcarter/mule-cookbook
And here's a Vagrant script for running the mule cookbook on ubuntu etc: https://github.com/ryandcarter/vagrant-mule
It is very simple.
Download and unpacking the archive file from: http://dist.codehaus.org/mule/distributions/mule-standalone-3.3.1.zip or whatever version you want to install.
put this unpack file to anywhere where you want like /opt/ or /usr/local/
put you mule application inside apps folder.
& go to bin directory and run ./mule start command. Now mule server is running. You can also check mule log inside log folder mule.log file
This is an old question, but in case there are others who are looking.
You want to install Mule as a Ubuntu Service, so that it restarts when The server restarts. There are a couple of basic steps to this
I detailed out instructions and installation files at my github repository
https://github.com/jamesontriplett/mule_linux_service_install
Steps in general:
Install a startup script in /etc/init.d
Install a startup parameter file in /etc/mule
Customize parameters in the wrapper.conf file in /conf/wrapper.conf
Install the license file onto the server if using enterprise
Add the startup script to the run levels.
To test, you want to reboot the linux service to make sure that it will come back after a reboot. If it doesn't you have a reliability issue.

Resources