Based on @Mamaduka comment; the following changes resolve it:
Use plugin_dir_path()
to get the filesystem directory path:
$certfile = plugin_dir_path(__FILE__) . '/clientcert.pem';
$keyfile = plugin_dir_path(__FILE__) . '/clientkey.key';
Then remove getcwd()
.
If you want to use it in your theme use TEMPLATEPATH
I also want to mention that using the following paths previously did not work:
WP_PLUGIN_URL . "https://wordpress.stackexchange.com/" . plugin_basename( dirname(__FILE__) ) . '/clientkey.key'
nor:
get_bloginfo('template_directory') . '/lib/cert/clientcert.pem'
nor:
'http://my-web-site.com/clientcert.pem'
Related Posts:
- I found this in a plugin. What does it do? is it dangerous?
- cURL error 60: SSL certificate problem: unable to get local issuer certificate
- How can i get the post’s full html source by its ID?
- Error: Can´t access facebook comment plugin admin page
- Using file_get_contents within admin but keep logged in
- Installation failed: 504 – Gateway Timeout
- Hide response returned from WordPress REST API call
- WordPress Plugin: Where should I put my cookies for cURL?
- cURL External API request displays content above other content on page
- Best way to overide plugin CSS?
- Ways to create a paid wordpress plugin?
- OpenID for WordPress 3.x? [duplicate]
- Edit plugin without hooks in functions.php
- How to register_sidebar() without messing up the order?
- Unable to add admin notice on plugin activation
- Pass $this to function nested in another public function of the same class
- WP Plugin for Terms of Use
- Adding Scripts in the Admin Area
- Is there a good plugin for social bookmarking on site for WordPress [closed]
- Automagic Link Shortening for Non-Hosted WP
- Popup Maker nav menu item not working
- how can i limit the number of instances for my widget
- What are the hierarchy of filenames while initialising a WordPress plugin?
- Creating a menu page in a Object Oriented developed plugin
- Way to hook into a sidebar call to replace it with a custom sidebar
- How to trigger an action with a URL
- Where to place custom functions?
- wordpress theme backend admin only
- Im unable to login to my wordpress
- Search is not working on plugin directory
- Set Post Format if find a string in title or post content
- Is it possible to create Custom Post plug-in?
- why doesn’t this update part of this plugin work? it take me to nothing here page
- woocommerce product countdown not showing in variable product? [closed]
- Session destroyed on page redirect
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- Excerpts on category page
- Add menu page issues (permissions & position)
- How passing values to construct function with Actions?
- What is the best way for showing a grid of customer logos?
- Is there any way to make myself an admin?
- Measure and limit file uploads
- Why Does The `auto_update_plugin` Hook Disable Management?
- Is there a way to add custom endpoint to specific page only
- Is there a script to collect all hooks and filters provided by a plugin?
- Change in one place the data about the company, which are placed on several pages
- WP RSS Aggregator plugins breaks after switch to HTTPS
- Post status doesn’t update to ‘future’ every time?
- wp_trash_post hook – problem with page updating if using wp_die
- Form Plugin for Api Requests which is used via Shortcode
- Apply a Meta tag to one page only
- Can I remove an image from the Gallery without deleting it from the Media Library?
- rewrite file to wordpress
- WordPress Url setting
- When Installing a Plugin Where do I Move Template Files to?
- What would make the plugin update process to complete but don’t report as such?
- Looking for a good way to include php code in posts, but using special include markup rather than direct php code
- Contact Form 7 is not redirecting the “Thank-You” page with the removal of CSS and JS of plugins
- WordPress search input in database, to edit information via form and update the database
- Show Custom Post on Frontend
- WordPress to be used more like an app?
- Remove a div class with condition
- BS Authorize.net Problem (Payment in hanging if customers is not logged in)
- PHP Error message Upload images to remote server
- WP_get_image_editor resizing images in a foreach loop
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- WP core and plugin updates fail AWS
- Load my Inline js footer area
- Custom product page’s style for printing
- Remove action added in plugin class from theme
- WordPress Admin sub-level menu issue
- Why does WordPress use cookies for /wp-admin and /wp-content/plugins for non-admin users [duplicate]
- How to add subdomain to htaccess
- Create a two column content
- HyperDB failover Delay
- Add class as plugin for other plugins
- Hidden Some Setting on Post or Page [duplicate]
- How do I secure a subdomain using UCC SSL?
- Adding an onchange event to a custom dropdown menu in WordPress
- How to add jquery to my custom post type wp plugin
- Template from scratch: Sidebars not showing widget
- Home not showing in yoast breadcrumb
- Contact Form 7: custom validation [closed]
- Adding a Filter to Sidbar Login Plugin to Change Login Button Lable
- Enforce conditions only for draft posts using WyPiekacz, ignore pending and published posts
- Redirect url in plugin to somewhere else?
- Trouble Removing Plugin [closed]
- WordPress site show white screen after updating some plugins (URGENT) [closed]
- Output plugin post like system count [closed]
- How to develop an extension for a simple form post and post back? [closed]
- plugin translations not reflected in admin dashboard
- Elementor with system colors instead of kit colors [closed]
- Shortcode inside a redirect [closed]
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- How can I display an attribute from each post inside foreach($latest_posts1 as $post )
- Wrong block appender button showing
- Check Plugins in Use by Mutli Site Network
- Plugin with Fatal error
- Uncaught Error: Cannot use object of type stdClass while showing the list using WP_List_Table
- Plugin to transfer new/updated files from media library in “/wp-content/uploads/” between prod environment and preprod environment?