sensational / sassphp

PHP bindings to libsass - fast, native Sass parsing in PHP!
Other
229 stars 39 forks source link

Multiple PHP versions? #18

Closed wintercounter closed 9 years ago

wintercounter commented 9 years ago

I was able to install the extension for the system PHP easily which is 5.5. I also have 5.4 and 5.3 on my server and I should make it for those also. Any advice? I tried to create a custin phpize init file and changed the paths in the configured Makefile but no success. Can someone point me to the right direction?

pilif commented 9 years ago

This question if beyond the scope of this project as this same question applies to any PHP extension.

Still: I can help you:

Unfortunately, just having different versions of phpize is not enough to create a configure script that will actually create a correct make file because phpize calls into other things related to the PHP install based on $PATH.

The only way to make this work correctly is if you have separated the various PHP installs into their own prefixes and then you adjust $PATH to only contain the correct PHP version's bin directory before calling phpize.

This will build a correct extension for the respective PHP version.

wintercounter commented 9 years ago

This sounds a little bit risky to play with on a production server :) Maybe i'll setup a free VPS with the corresponding PHP version, compile the extension and copy the .so file from there. Anyway, i really appreciate the help, thanks ;)

pilif commented 9 years ago

Well. On a production server, you shouldn't have any compiler running to begin with :P

I was talking about your packaging server of course.