Skip to content

Bad message and not working workaround #27

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

Closed
remicollet opened this issue Dec 29, 2016 · 7 comments
Closed

Bad message and not working workaround #27

remicollet opened this issue Dec 29, 2016 · 7 comments
Labels

Comments

@remicollet
Copy link

$ php -v
php-vips-ext: unable to lock libvips -- graceful may be unreliable
PHP 7.0.14 (cli) (built: Dec  7 2016 09:36:47) ( NTS )

As i understand, this message is related to #26 so perhaps this message should be display only for "mod_php", not for other SAPI ?

@jcupitt
Copy link
Member

jcupitt commented Dec 29, 2016

Oh good point, thanks @remicollet.

I'll have a look. I don't suppose you know of an easy way to spot if you're running inside apache?

@jcupitt jcupitt added the bug label Dec 29, 2016
@remicollet
Copy link
Author

More, if (!dlopen("libvips.so", RTLD_LAZY | RTLD_NODELETE)) { can't work, libvips.so is usually not installed (part of "devel" stuff), only the versioned library needed at runtime (e.g. libvips.so.42.6.4)

@remicollet
Copy link
Author

More, the printf call is absolutely not acceptable, should use the SAPI error logger.

@remicollet
Copy link
Author

I don't suppose you know of an easy way to spot if you're running inside apache?

You can test strcmp(sapi_module.name, "apache2handler"))

@remicollet remicollet changed the title Bad message Bad message and not working workaround Dec 29, 2016
jcupitt added a commit to libvips/php-vips-ext that referenced this issue Dec 30, 2016
- only lock libvips if we're running inside apache
- use the sapi error logger for the warning message
- include the binary API version in the .soname

also, the notes section at the top of package.xml should repeat the most
recent changelog notes

see

libvips/php-vips#27

libvips/php-vips#28
@jcupitt
Copy link
Member

jcupitt commented Dec 30, 2016

Hello again, thank you for taking the time to look at this @remicollet.

Does this look better?

libvips/php-vips-ext@ed9f424#diff-b1cc89f7ef630413232cfad4ba9bdbf2R1625

It now tests for apache, it uses the SAPI logger, and it uses the API number in the .soname. I updated the notes section in package.xml as well.

I tested under apache and it seems to survive graceful successfully, and I tried at the CLI and it runs without strange console output. All the tests pass too.

@jcupitt
Copy link
Member

jcupitt commented Dec 30, 2016

OK, 1.0.4 includes these changes. Thanks very much for suggesting these improvements!

jcupitt added a commit to libvips/php-vips-ext that referenced this issue Dec 31, 2016
@jcupitt
Copy link
Member

jcupitt commented Jan 19, 2017

I think this is done, please reopen if not.

@jcupitt jcupitt closed this as completed Jan 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants