php.rb | PHP.rb translates Ruby code into PHP code | Parser library
kandi X-RAY | php.rb Summary
kandi X-RAY | php.rb Summary
PHP.rb translates [Ruby][] code into [PHP][] code by obtaining the [parse tree][ParseTree] for a Ruby expression, transforming that into an [abstract syntax tree][AST] (AST) compatible with PHP, and then generating valid PHP code as the final output.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Transform data into Ruby object
- Processes the given statement .
- Processes a method call .
- Process the given arguments .
- Processes a function .
- Serializes the function .
- convert a string into a string
- Process a value .
- Processes an array .
- Add a child
php.rb Key Features
php.rb Examples and Code Snippets
Community Discussions
Trending Discussions on php.rb
QUESTION
I have a localhost development environment on my Mac that uses homebrew's php
formula and I'm pulling my hair out trying to install with a custom path to cURL rather than the default Mac OS version (v7.54.0) that uses SecureTransport for SSL. SecureTransport causes a lot of issues with SSL requests to remote services, so OpenSSL is pretty much a requirement for my purposes.
Here's the process I've taken so far:
- Installed curl through home brew with OpenSSL:
brew install curl --with-openssl
- Edited brew's
php
formula to modify the compile process, telling./configure
to use the brew installed curl (v7.59.0). I've tried--with-curl=/usr/local/Cellar/curl/7.59.0
and also--with-curl=#{Formula["curl"].opt_prefix}
. The second option is just a dynamic symlink to the former. - Save the edits and rebuild php from the source:
brew reinstall --build-from-source php
To verify that I have the write ./configure
options I added a temporary line to my Brew formula edits that spits out the args
passed. Here's what this looks like:
ANSWER
Answered 2018-Jun-10 at 19:48I've applied the patch supplied by dossy and it works!
Below are the specific steps to take to solve the issue. More details on what this fixes can be found below.
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
curl -s https://github.com/dossy/homebrew-core/commit/b75fe286f79e2b89548c5ed1bbe1958313c5c103.patch | patch -p1
brew reinstall php --build-from-source
The specific source of issue appears to be that the libxml2
library is needed to replace Mac's built-in libcurl
, which is what ultimately forces PHP's dependency on SecureTransport. These two lines in php.rb were the critical part of the fix for my purposes:
- depends_on "libxml2"
- --with-libxml-dir=#{Formula["libxml2"].opt_prefix}
For my specific circumstance I had to reset my editted home brew formula (php.rb) to the source because I had previously editted it. As a result applying the patch didn't work at first. If you've also editted your php.rb formula then I'd reset it to the source: https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/php.rb.
In the linked article on medium.com dossy suggests the follow command to build after applying to patch, brew install php --build-from-source
. If you already have PHP installed you'll need to use reinstall in place of install instead.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install php.rb
To get a local working copy of the development repository, do:.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page