How can I fix php-fpm info by homebrew-php - php

I've just installed php in osx by using homebrew with command like this.
$ brew install --without-apache --with-fpm --with-mysql php55
After install I got a following messeage.
To have launchd start php55 at login:
ln -sfv /usr/local/opt/php55/*.plist ~/Library/LaunchAgents Then to load php55 now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php55.plist
But the last sentence should be launchctl load ~/Library/LaunchAgents/homebrew-php.josegonzalez.php55.plist. This issue is already in github issue page.
https://github.com/josegonzalez/homebrew-php/issues/663
I thought it's only small change of text, so I forked the project and by git clone, cloned to local. And looked for the place the text is written by like this.
find . -type f -name "*.*" -print0 | xargs -0 grep "mxcl"
./Contributions/Using FPM.md:0. `brew update && brew pull https://github.com/mxcl/homebrew/pull/12093`
./Contributions/Using FPM.md:For PHP-FPM to work with OS X built-in Apache, you need to install mod_fastcgi. There is a formula for that at https://github.com/mxcl/homebrew/pull/12093 (hopefully, soon within Homebrew).
./Contributions/Using FPM.md: brew pull https://github.com/mxcl/homebrew/pull/12093
./Formula/abstract-php.rb: opoo "INTL is broken as of mxcl/homebrew#03ed757c, please install php#{php_version_path.to_s}-intl" unless build_intl?
./Formula/abstract-php.rb: icu4c is broken as of mxcl/homebrew#03ed757c, so you will need to install intl as
./README.md:This repository contains **PHP-related** formulae for [Homebrew](https://github.com/mxcl/homebrew).
As far as I can see, there is nothing related to the instruction text.
Am I completely wrong path to solve the problem like this?
I want to know there is more effective way to find the text, or should I read the code line by line to find the place?

Related

Error installing php 71 with homebrew on my mac

I have been developing with Vallet for some time now. Today i wanted to update laravel 5.4 to 5.5. Before doing so i run composer global update. Causing Vallet to stop working.
Fist i tried to do the following:
cd ~/.composer/
sudo chown -R $(whoami) vendor
source: https://laracasts.com/discuss/channels/general-discussion/getting-valet-not-found-error
I did not solve the issue. Then i decided to reinstall Vallet. Hereby i did the following:
I followed this: https://github.com/laravel/valet/issues/321
Stop and uninstall services
sudo brew services stop php71 dnsmasq nginx
brew uninstall php71 dnsmasq nginx
Remove related config files and valet home folder
sudo rm -r /usr/local/etc/php /usr/local/etc/nginx /usr/local/etc/dnsmasq.conf
sudo rm -r ~/.valet /var/root/.valet
Install services i tried this:
brew install php71
$ brew tap homebrew/php
$ brew install php71
brew install homebrew/php/php71
All gave the following error:
MacBook-Pro:~ mblivier$ brew install homebrew/php/php71
==> Installing php71 from homebrew/php Error: The following formula: php71
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:xcode-select --install
I new in this and don't know how to solve this. Any suggestions how to install php and go further with reinstalling Vallet?
homebrew is installed and working
You need xcode to build php, so first run:
xcode-select --install
to install xcode and later you can brew install php71
This is answer for your comment, I can't post as comment, need to post because is length limited.
There is one of two things going on here, either you didn't install PHP, or PHP is installed and not currently in any of system aware paths. First I would try to find PHP and make sure it exists:
$ find / -name php -type f
You should see something like:
/path/to/your/php/bin/php
If PHP binary does exist, check your path:
$ echo $PATH
If it does not exist, recompile php.
If PHP exists on your system, make sure the path to the /bin/php file is included. You can edit your ~/.bash_profile and add the custom path like this:
PATH=$PATH:/path/to/your/php/bin/
....
export PATH
Then save and reload the file to ensure your current session has access to new path changes:
$ source ~/.bash_profile
With any luck you can now do a php -v and see the version response.

brew link php71: Could not symlink sbin/php-fpm

I'm trying to install Laravel Valet, which requires php 7.1, but when i run brew install php71, I get the following error:
==> Pouring php71-7.1.10_21.high_sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink sbin/php-fpm
/usr/local/sbin is not writable.
I get the same error when i run brew link php71. If i run php -v, I actually see that I'm currently running PHP 7.1.7.
But when I run valet install, I get:
[DomainException]
Unable to determine linked PHP.
I don't even have an sbin directory in /usr/local.
Any suggestions?
I solved this problem by first creating the directory sbin:
sudo mkdir /usr/local/sbin
then if you are like me using macOS highSierra 10+ you need to run:
sudo chown -R $(whoami) $(brew --prefix)/sbin
after this
brew link php
Installing Laravel Valet, I had a similar issue with sbin not being writable. I had to make the directory, then utilized the solution included at this page. This finally allowed me the proper permissions to run a brew link command with a previously installed version of php 7.1.

Unable to install Libreoffice and cjpeg Pimcore 5

I am installing Pimcore 5 and dependencies on Amazon EC2 Linux AMI(HVM)(t2.micro) with nginx1.2. There are these 2 packages which even if installed but not shown installed in Pimcore System requirement.
I install Libreoffice as:
wget http://ftp.ussg.indiana.edu/tdf/libreoffice/stable/5.4.1/rpm/x86_64/LibreOffice_5.4.1_Linux_x86-64_rpm.tar.gz
yum remove openoffice* libreoffice*
tar -xvf LibreOffice_5.4.1_Linux_x86-64_rpm.tar.gz
cd LibreOffice_5.4.1.2_Linux_x86-64_rpm/RPMS
rm -rf libobasis5.4-gnome-integration-5.4.1.2-2.x86_64.rpm
yum install *rpm
Now output of whereis libreoffice5.4 come as
libreoffice5: /usr/bin/libreoffice5.4
But when check Pimcore then it showing not installed, In similar way I install cjpeg as given in https://www.pimcore.org/docs/5.0.0/Installation_and_Upgrade/System_Setup_and_Hosting/Additional_Tools_Installation.html and when do whereis cjpeg then it gives output
cjpeg: /usr/bin/cjpeg /usr/local/bin/cjpeg /opt/libmozjpeg/bin/cjpeg /usr/share/man/man1/cjpeg.1.gz
But still Pimcore showing it not installed.
What and where I am missing?
Have a look at app\config\parameters.yml and add the paths to the cjpeg and soffice executables there. If that file doesn't exists make a copy of parameters.example.yml.

Installing BeEF Produces Error: ruby: no such file or directory -- dk.rb (loaderror)

I am trying to install beef, but in order to do that I need ruby.So far I've downloaded ruby from their official site. Then I downloaded the SQLite dll and extracted it into the ruby bin folder. Then I downloaded DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe and extracted it into the C:/ folder. Instructions told me to then open command prompt and go to the devkit path, but when I downloaded the devkit it automatically renamed itself to mingw so I went to the mingw path. Finally I tried to run
ruby dk.rb init
I got the error:
ruby: no such file or directory -- dk.rb (loaderror)
I have done the gem update and I have the latest gems and latest ruby and all of that.
How can I resolve this error?
Looks like this was a while back, but if anyone have troubles with this in the future:
It seems like you are trying to this in windows, and that is pretty much impossible.
The guide on their wiki doesn't work and Ruby does not play well with windows.
Even if you get it up and running it is buggy.
your best bet is to download Vmware player and virtualise Ubuntu, the installation works like a dream and it runs smooth.
Assuming you get ubuntu up and running (that is pretty straight forward) do teh following:
Start the terminal
sudo apt-get update
You are now up to date and it is time to install Ruby and a couple of the dependencies, type the following:
sudo apt-get install curl git ruby build-essential libsqlite3-ruby libsqlite3-dev libssl-dev
Then we install Ruby virutal machine - rvm, with the following command
sudo curl https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stable
now we will need the Terminal to act as a login-shell. The top menu might be hidden, but will show on mouse-over, so select Edit -> Profile Preferences.
In the pop-up window, select the "Title and Command" tab and check the "Run command as a Login shell" box.
Close the window and run the following command
sudo echo [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
followed by:
rvm pkg install zlib --verify-downloads 1
Note that it says that we are required to reinstall all rubies, so lets do that:
rvm reinstall all --force
Followed by this:
rvm install ruby-1.9.3-p392
It might take a while depending on your CPU, so stay patient and enjoy the multicolored terminal.
When it is finished, we tell rvm to use ruby 1.9.3, with the following (extremely logical) command
rvm use 1.9.3
Finally we install Bundler by typing:
gem install bundler
We are now done with installing Ruby and Dependencies.
It is time to download BeEF, do that by typing the following:
git clone git://github.com/beefproject/beef.git
When it is done, navigate to the beef folder by typing:
cd beef
then we use bundler that we installed earlier, to install the beef bundle:
bundle install
Thats it, you have now sucessfully installed BeEF, congratulations! (start with "Ruby beef")

How do I install Pdftk on my server?

I am using a Linux Server and am trying to install Pdftk, but I am problems trying to figure out what exactly to do.
I found the following documentation on how to install it, but they refer mostly to installing it on the local Windows machine.
They are:
http://www.andrewheiss.com/blog/2009/07/29/installing-pdftk-php/
http://www.accesspdf.com/pdftk/#packages
Can someone help me unserstand exactly what files I need to place where on my server so I can refer to pdftk?
Pdftk is a version of iText which has been converted from Java to c++ and rebuilt with a command-line bridge for easy access from PHP applications.
To build pdftk on Redhat / CentOS please follow the below instructions.
ssh [server to install pdftk on]
Now that we are in the server we need to create the directories to store pdftk.
cd /
sudo mkdir extra
cd extra
sudo mkdir src
cd src
sudo wget http://www.pdfhacks.com/pdftk/pdftk-1.41.tar.gz
sudo tar zxvf pdftk-1.41.tar.gz
cd pdftk-1.41/pdftk
Now we need to install the gcj libraries.
sudo yum install java-1.4.2-gcj-compat-devel.i386
The gcc-c++ library doesn't get installed with the gcj package so we will install it now, so we don't get an error halfway through the compile process.
sudo yum install gcc-c++
If you compile the application right now you will receive a warning that tmpnam is dangerous to use and you should use mkstemp.
sudo vi report.cc
Run this from inside VI to do a search and replace for the tmpnam method.
:%s/tmpnam(/mkstemp(/g
Press escape and save the changes with
:wq!
Now that we have all the packages installed, we are going to start compiling pdftk-1.41
from /extra/src/pdftk-1.41/pdftk run the following command
sudo make -f Makefile.RedHat
This will kick off the build process for compiling and converting the java file to c++. This could take SEVERAL minutes to convert iText to c++. Go grab yourself a margarita from our new margarita machine in the break room :).
Now with the pdftk file created we will want to copy it to the /bin directory so that we can run it from anywhere.
sudo cp pdftk /usr/local/bin
Let's make sure the build was successful and run
pdftk --version
As of 2020, things are different now. CentOS 6 is stepping out and pdftk can only support CentOS 5/6. GCJ on CentOS 7 is removed, so installing from source is not easy too. But we have docker now:
FROM centos:centos6
RUN yum install -y https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.el6.x86_64.rpm
Then build with docker build . -t pdftk and run as:
docker run -it --rm -v $PWD:/data --workdir /data pdftk pdftk ./input.pdf output ./output.pdf
The example above can repair a pdf file missing a dozen of KB of data if you are lucky.
As mentioned by #rsc, pdftk-java will be available for Rocky Linux, but currently (2021.10.28), still cannot install it via yum.
Fortunately, there is a built command for x86_64 GNU/Linux systems, which does not require any runtime dependencies. So we can use it as follows
# the version number might be updated, check https://gitlab.com/pdftk-java/pdftk
wget https://gitlab.com/pdftk-java/pdftk/-/jobs/1527259632/artifacts/raw/build/native-image/pdftk
chmod +x pdftk
./pdftk ...
It works well in the server with the following system info,
$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Rocky
Description: Rocky Linux release 8.4 (Green Obsidian)
Release: 8.4
Codename: GreenObsidian
As of 2021, there is pdftk-java: A port of the original GCJ-based PDFtk to Java, which is currently on the way to the repositories for Fedora 33+ and EPEL 7+ (latter for CentOS, RHEL or Rocky), allowing yum install pdftk-java to succeed (once the package reached the stable repositories).
Edit: The pdftk-java package is in the stable repositories since yesterday, 2021-10-29.

Categories