deuill / go-php

PHP bindings for the Go programming language (Golang)
MIT License
925 stars 105 forks source link

Getting this to build on Ubuntu 16.04 #28

Closed randlem closed 7 years ago

randlem commented 7 years ago

This commit fixes the issue that @promorphus was having related to issue #26. Works on Ubuntu 16.04 with PHP7 installed from apt.

deuill commented 7 years ago

@randlem Perfect, thanks for this. Makes complete and total sense, if you can fix the review comments I'll push this ASAP.

promorphus commented 7 years ago

Hmm, I've got a slight issue actually. So building this is fine, but then attempting to invoke it causes essentially the same issue. Here's what I'm looking at (again).

vagrant@CHANGEME:~/go/src/github.com/deuill/go-php/engine$ go get -tags php7.debian github.com/deuill/go-php
vagrant@CHANGEME:~/go/src/github.com/deuill/go-php/engine$

Yeah success!

But then....

package main

import php "github.com/deuill/go-php"

func main() {

    script := php.New()
    return
}

Go building this gives me....

vagrant@CHANGEME:~/go/src/github.onpay.com/parasshah/test$ go build
# github.com/deuill/go-php/engine
../../../github.com/deuill/go-php/engine/context.go:11:23: fatal error: main/php.h: No such file or directory
 // #include <main/php.h>
                       ^
compilation terminated.