Phil
Phil

Reputation: 3648

If libcurl is enabled, can i assume that all setopt options are available?

If server has php libcurl enabled, does it have all setopt options available (unless something new was added in new libcurl version and server didn't upgraded, of course) or is it possible for admins to turn off parts of functionality?

I'm especially thinking about CURLOPT_HTTPHEADER - can i assume that if i'll be running my script on server(s) with enabled curl that i will be able to use CURLOPT_HTTPHEADER? Or is it possible that admins turned off this option alone?

Upvotes: 0

Views: 194

Answers (2)

GZipp
GZipp

Reputation: 5416

Although the admins can't directly turn off any of the options, as BraedenP said, they can indirectly affect some of them with the open_basedir and safe_mode settings in php.ini. There are also curl settings in php.ini (viewable with phpinfo()) that may or may not affect some options.

Upvotes: 2

BraedenP
BraedenP

Reputation: 7215

All you're doing when setting a cURL option is defining a constant within your cURL object. As far as I'm aware, the admin can't prevent you from defining a specific constant, so you should be safe in that regard.

Upvotes: 1

Related Questions