Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 10.13 / High Sierra - clamp no longer loads #29

Closed
alanfluff opened this issue Oct 1, 2017 · 17 comments
Closed

macOS 10.13 / High Sierra - clamp no longer loads #29

alanfluff opened this issue Oct 1, 2017 · 17 comments
Assignees

Comments

@alanfluff
Copy link

Hi,

I just upgrade to macOS 10.13 and a clamp install that was working before no doesn't load.

I checked the logs but nothing gets logged.

I ran 'brewup' a few times, which issues:

brew update; brew upgrade; brew prune; brew cleanup; brew doctor

I reinstalled clamp with brew tap jide/clamp and brew install clamp.

I moved away a previously working .clamp directory and re-ran clamp.

The error I get is:

httpd: Syntax error in -C/-c directive: Cannot load /usr/libexec/apache2/libphp5.so into server: dlopen(/usr/libexec/apache2/libphp5.so, 10): image not found

Happy to try stuff to help track what might be wrong.

Thanks for any pointers, cheers.

@rqelibari
Copy link
Collaborator

rqelibari commented Oct 1, 2017

macOS 10.13 (aka High Sierra) comes with PHP7 preinstalled (as such there is no PHP5 anymore on the system).

Quickfix
The easiest way to solve this issue is to replace "php5_module": "/usr/libexec/apache2/libphp5.so" with "php7_module": "/usr/libexec/apache2/libphp7.so" in your projects clamp.json file.

Will there be a hotfix?
As the next release is coming in the next days, I will not release a hot fix for that.

EDIT: Show full line of the config file (including the json key)

@rqelibari rqelibari self-assigned this Oct 1, 2017
@rqelibari rqelibari reopened this Oct 1, 2017
@alanfluff
Copy link
Author

alanfluff commented Oct 2, 2017

Thanks.

Tried that (should have said :/)

I just created an empty directory, ran clamp config write (before running clamp), edited and swapped the "php5_module": "/usr/libexec/apache2/libphp5.so" for "php7_module": "/usr/libexec/apache2/libphp7.so" and then ran clamp at the prompt. The result was:

httpd: Syntax error in -C/-c directive: Cannot load /usr/libexec/apache2/libphp5.so into server: dlopen(/usr/libexec/apache2/libphp5.so, 10): image not found

...as if somewhere in clamp it's hard-coded to check for libphp5.so maybe?

PS: In case relevant, since move to OS X 10.13 libphp5.so is no longer on the system (not in \usr\libexec\apache2\, however, libphp7.so is there.

@alanfluff
Copy link
Author

Got clamp working, by editing clamp.defaults.json in /usr/local/Cellar/clamp/1.4.1/.

Editing a local project's clamp.json to replace "php5_module": "/usr/libexec/apache2/libphp5.so" with "php7_module": "/usr/libexec/apache2/libphp7.so" didn't allow clamp to get past the above error.

@rqelibari
Copy link
Collaborator

@alanfluff: Thank you for your efforts! But I should mention, that this is only a quick fix. The actual error is fixed in the coming release (which will be released on Friday).

@alanfluff
Copy link
Author

Welcome @rqelibari — yep, I saw my 'fix' was gonna get trashed next Homebrew update, not a problem at all. Just sUPEr happy to get clamp back.

Thank you very much for the coming fix and the project as a whole. clamp is fabulous.

@alanfluff
Copy link
Author

@rqelibari if there's anything I can do this end to help/test the clamp fix just say the word. For now I'm just not updating brew stuff so my hacked clamp setup remains working brilliantly. Cheers!

@rqelibari
Copy link
Collaborator

Thank you @alanfluff !
Two things.

  1. Thank @jide for this great project! He had this great idea.
  2. I had two unforeseen deadlines at work, so I was not able, to yet finalize the coming release. I will keep you up to date on this. There are some changes coming, but they will make development much easier. If you can code, you are very welcome to help me!

@alanfluff
Copy link
Author

Welcome @rqelibari 👍

  1. Thank you @jide so much for clamp. It is a delight to not use MAMP Pro anymore. The advantages, speed, simplicity, database data staying local to the project folder, and many more, make clamp my favourite dev' find for 2017 >_<

  2. Hey, no sweat at all @rqelibari — I totally get that stuff like this cannot command the same priority, even when it's more fun :'( than normal life stuff... And I would totally ❤️ to help, but, sadly I suspect my front end web dev skills (design and CSS focussed) mean my lite JavaScript knowledge would rule me out of being much help :/ But if I'm wrong and there is stuff I can do, try me; Worst case I'll just apologize and say "no, sorry, I can't do that 'cos I don't know how, sadly...".

@alanfluff
Copy link
Author

Hi @rqelibari - no sweat as I'm just not updating brew and clamp is continuing to be brilliant, just wondering when you guess clamp will be adjusted for 10.13? Thanks again to you and @jide for clamp - it has totally replaced and is preferable to Mamp Pro for me. I would (will) page for 'clamp' - I'm just sorry me CSS focus likely means I can't do much to help :/ Cheers 👍

@alanfluff
Copy link
Author

Hi @rqelibari and @jide - any ETA for an update to clamp? Even if it's something like:

This time next year

it would be great to know. Thanks and sorry for bugging you ^_^

@alanfluff
Copy link
Author

Update: clamp now loads on macOS 10.13.3 but I am not sure if this is due to edits I have made.

It used to now work, then I stopped running Homebrew updates for months (sad face) after getting clamp to work, for fear of it breaking.

I finally ran brew update; brew upgrade; brew prune; brew cleanup; brew doctor a couple of times to get right up to date, and aside from it reporting:

==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.

it completed and clamp runs AOK with no changes.

So perhaps this issue can be marked closed?

@rqelibari
Copy link
Collaborator

Hi @alanfluff!

It's really a pity that I have not been able to update clamp.
BUT: I am very happy to know, that someone really cares about clamp! This is one of the best motivation to continue contributing :-)
Hence I have updated my schedule to have time for clamp and will make clamp work with macOS 10.13.3 ASAP (meaning today).
I will then create a roadmap with the next steps and publish it in the project readme.

@alanfluff
Copy link
Author

Hi @rqelibari 👋

I am delighted if by loving clamp I have helped a tiny bit by at least providing encouragement ^_^ I am only sorry I probably don't have the skills to do more :/

In case helpful, after my last comment I found clamp would not start (I'd just done my first brew update for weeks), but my previously found fix worked, here's how it went:

  • ran brew update; brew upgrade; brew prune; brew cleanup; brew doctor
  • created a new clamp install
  • had the problem where clamp would not work (WISH I had documented that better :/
  • hand-created the directory my.cnf.d under /usr/local/etc/
  • all good 👍

Good luck with all your commitments and thank you again for fabulous clamp work!

@rqelibari
Copy link
Collaborator

This issue has now been resolved with the 1.4.2 release.

@alanfluff
Copy link
Author

Hi @rqelibari

Thanks so much for this.

After upgrading via brew I still find I need to hand create a my.cnf.d folder. Doesn't bother me, but I assumed you might want to know.

Here's what I did and the output - the only thing I missed was the output when I first updated brew with brew update; brew upgrade; brew prune; brew cleanup; brew doctor.

Ran clamp, result:

Apache server started
You can browse to http://localhost to see your site.
Host set
/usr/local/opt/mariadb/bin/my_print_defaults: Can't read dir of '/usr/local/etc/my.cnf.d' (Errcode: 2 "No such file or directory")
Fatal error in defaults handling. Program aborted
/usr/local/opt/mariadb/bin/mysqld: Can't read dir of '/usr/local/etc/my.cnf.d' (Errcode: 2 "No such file or directory")
Fatal error in defaults handling. Program aborted
cat: stdout: Broken pipe
cat: stdout: Broken pipe
Initialized MySQL data directory
2018-02-26  9:47:39 140736060343104 [Note] /usr/local/opt/mariadb/bin/mysqld (mysqld 10.2.13-MariaDB) starting as process 50696 ...

Hand create folder my.cnf.d under /usr/local/etc/ delete my recently installed .clamp and re-ran clamp:

Apache server started
You can browse to http://localhost to see your site.
Host set
Initialized MySQL data directory
2018-02-26  9:49:39 140736060343104 [Note] /usr/local/opt/mariadb/bin/mysqld (mysqld 10.2.13-MariaDB) starting as process 51676 ...
MySQL server started
Created database db

All good.

Maybe I have something weird in my setup that is necessitating I hand-create that folder each time I update brew? If there's anything I can tell you to help please let me know.

Cheers, -Alan

@rqelibari
Copy link
Collaborator

Hi @alanfluff!

I set up a new macOS High Sierra in a VirtualBox and tried to install the latest version of clamp and it worked without errors. So it seems this error is rather related to your setup. Maybe uninstalling and reinstalling mariadb will fix this problem:

$ brew uninstall mariadb
$ [ -d /usr/local/etc/my.cnf.d ] && rm -r /usr/local/etc/my.cnf.d
$ brew reinstall clamp  # will also reinstall mariadb

@alanfluff
Copy link
Author

Thank you very much @rqelibari for that info and for the suggestion and the steps! Most appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants