Giter VIP home page Giter VIP logo

cloudflare-cpanel's Introduction

⚠️ Notice: This plugin has been deprecated and is no longer being maintained. Our hosting partner program that was used in tandem with this plugin has also been deprecated. For those interested in partnering with Cloudflare see https://www.cloudflare.com/partners/

Build Status

Cloudflare cPanel Quick Installation Instructions

Using an SSH client such as Terminal or Putty:

Step 1. Access cPanel for the server using root user by:

ssh root@SERVER IP ADDRESS or SERVER NAME

Step 2. Download necessary files and run installation

bash <(curl -s https://raw.githubusercontent.com/cloudflare/CloudFlare-CPanel/master/cloudflare.install.sh) -k [YOUR_HOST_API_KEY] -n '[YOUR_COMPANY_NAME]'

NOTES:

  • Be sure to replace [YOUR_HOST_API_KEY] and [YOUR_COMPANY_NAME] with the appropriate values

cPanel X3 Theme Support Deprecated

We deprecated support for the cPanel X3 theme because the theme itself is deprecated and scheduled for removal in a future version of cPanel. We realize everyone may not be able to deprecate support for the x3 theme immedietely and have made the old v5 version of the plugin available on the v5 branch. This deprecated branch will not receive any updates aside from security fixes.

Localization

The English localization will always be up to date and is located at config/en.js. In the future we plan to support more languages by default but if you would like to localize the plugin in your language in the mean time follow these steps:

  1. Copy lang/en.js as lang/[LANGUAGE CODE].js and translate it.
  2. Rename config.json.sample to config.json.
  3. Edit config.json and set "locale": "[LANGUAGE CODE]" using the same language code from step 1.

Full Zone Provisioning

The plugin now supports Full Zone Provisioning but it is disabled by default. If you would like to enable it for your customers simple edit config.json so that "featureManagerIsFullZoneProvisioningEnabled": true,

Uninstalling the cPanel Plugin

An uninstall script has been provided to unregister the plugin with cPanel and remove all Cloudflare specific files from the server to deactivate the plugin.

NOTE: This will not remove zones or users from Cloudflare that have been registered through the plugin.

The following set of commands will download the necessary files, execute the uninstall script and ultimately remove the uninstall script as well:

bash <(curl -s https://raw.githubusercontent.com/cloudflare/CloudFlare-CPanel/master/cloudflare.uninstall.sh) && rm -f cloudflare.uninstall.sh

cloudflare-cpanel's People

Contributors

arthurcf avatar bdraco avatar bundan avatar cf-b avatar cfpatrick avatar dfritsch avatar edgarasg avatar garrettgalow avatar jamescf avatar jwineman avatar manatarms avatar martijngonlag avatar peterw-cf avatar thellimist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudflare-cpanel's Issues

Auto Minify settings not saving

Hello,
We're running plugin 6.1.5 and one of our customers noticed that none of the Auto Minify settings (js, css,html) save after checking them. Let me know what logs I can provide to help troubleshoot.

Is it possible to enable CloudFlare via cPanel if the domain's nameservers are managed externally?

In normal scenarios, the web host that serves the webpages and provides cPanel also manages the nameserver. This is not always the case, however.

What is required when a nameserver is managed externally? After enabling CloudFlare optimization inside the cPanel plugin, is it simply a matter of adding the CNAME record manually to the external zone file? ie...

mydomain.com  CNAME  mydomain.com.cdn.cloudflare.net.

If so, how does CloudFlare actually know the IP address of the origin server - is CloudFlare somehow informed of this via the cPanel plugin?

"Cloudflare" branding reads as "CloudFlare" in cPanel

cPanel 11.60.0.37
Cloudflare plugin v6.1.2

The Cloudflare option in the main page of cPanel has not had its branding text updated to Cloudflare yet. Currently, it still reads as CloudFlare, with the old capital F.

image

After navigating to the Cloudflare page, the following pages' title does reflect the proper Cloudflare casing.

image

DNS Records don't sync with Full DNS type

On CloudFlare cPanel plugin version 7.0.0 on WHM 64.0 (build 33) the DNS records don't sync with CloudFlare full DNS Zone. After remove or add sub-domains or try to point some existing domain, the DNS records like CNAME, A and MX do not sync. Wen try to add a new domain with full zone, the same happens.

CloudFlare Plugin: 7.0.0
WHM: 64.0.33
SO: CloudLinux 6.9 x86_64

/scripts/postupcp does not force plugin reinstall

The entry in /scripts/postupcp calls cloudflare_update.sh with the argument "force".

sh /usr/local/cpanel/bin/cloudflare_update.sh force

But the update script expects the argument -f to run the upgrade with a forced reinstall.
/usr/local/cpanel/bin/cloudflare_update.sh -f

Calling the script with 'force' results in nothing being executed.

postupcp line should be changed to use -f

Infinite loading Version: 7.0.1

Hello,

I have just realized that CF plugin never loads Cloudfare interface on cPanel server.

I have removed and install again the plugin and have exact same problem.

Please see browser console log:

cf_console

and cPanel error logs: tail -f /usr/local/cpanel/logs/error_log

PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/index.live.php on line 6 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/72/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 Use of uninitialized value in concatenation (.) or string at /usr/local/cpanel/Cpanel/AdminBin/Server.pm line 339, <GEN1727> line 1. PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 15 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/72/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error response [url] https://api.cloudflare.com/client/v4/zones/?name=masfernandez.com [status code] 403 [reason phrase] Forbidden in /usr/local/cpanel/3rdparty/php/72/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:89 Stack trace: #0 /usr/local/cpanel/3rdparty/php/72/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(32): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response)) #1 /usr/local/cpanel/3rdparty/php/72/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(108): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete') #2 /usr/local/cpanel/3rdparty/php/72/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent)) #3 /usr/local/cpanel/3rdparty/php/72/lib/php/cloudflare/vendor/guzzlehttp/guzzle in /usr/local/cpanel/3rdparty/php/72/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 89 PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 15 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/72/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25

Same error like this

Server: CLOUDLINUX 7.6, cPanel v76.0.14

Thanks,
Miguel Ángel

ERROR - Unpack failed, directory not found: 'Cloudflare-CPanel-7.0.1'

Hi, I'm having trouble installing the plugin on one of my servers, I'm running the installation command as root on the / root /

The error I have is:

Starting CloudFlare CPanel Installation...
Downloading and unpacking latest version v7.0.1...

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
ERROR - Unpack failed, directory not found: 'Cloudflare-CPanel-7.0.1'

Can you help me solve it?

Zone not being updated

Hi,

When I enable CF (CNAME) for a domain, the following happens:
www (former CNAME) record gets pointed to www.domain.com.cdn.cloudflare.net.
domain.com. stays the same (A record to IP)
cloudflare-resolve-to is created doing a CNAME point to domain.com.

I click (back and forth) on the plugin panel to enable/disable, and the zone remains unchanged afterwards.
I solved it (manually) by editing:
domain.com. CNAME domain.com.cdn.cloudflare.net.
www CNAME domain.com.cdn.cloudflare.net. (no www in front, it worked for me)
cloudflare-resolve-to A server.ip.address

Any pointers at what could be wrong?

Install for 7.0.1 references nonexistant file

Looks like the installation script for this plugin is referencing files/paths that are obsoleted in the most recent version of WHM cPanel, version 72.0.10 at the time of this writing. Specifically:
grep: /scripts/postupcp: No such file or directory

Entire installation output:

# bash <(curl -s https://raw.githubusercontent.com/cloudflare/CloudFlare-CPanel/master/cloudflare.install.sh) -k <REDACTED> -n '<REDACTED>'
Starting CloudFlare CPanel Installation...
Downloading and unpacking latest version v7.0.1...
info [install_plugin] Installing to paper_lantern
info [install_plugin] Installing cloudflare in feature manager ...
info [install_plugin] Done
info [install_plugin] Running sprite_generator
info [install_plugin] Queueing task to update API spec files
Plugin installed ok
grep: /scripts/postupcp: No such file or directory
Cleaning up
#

Not loading.

The cloudflare plugin will not load on one of our servers. It has been working fine for years and even a reinstall would not work. The page loads, but the loading circle just continues to spin without ever loading the options.

Here is the cpanel error below. Substituted the real domain for domain.com:

PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/index.live.php on line 6 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 Use of uninitialized value in concatenation (.) or string at /usr/local/cpanel/Cpanel/AdminBin/Server.pm line 339, <$socket> line 1. PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 15 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 15 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error response [url] https://api.cloudflare.com/client/v4/zones/?name=domain.com [status code] 403 [reason phrase] Forbidden' in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:89 Stack trace: #0 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(33): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response)) #1 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(108): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete') #2 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent)) #3 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vend in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 89 PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/index.live.php on line 6 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 Use of uninitialized value in concatenation (.) or string at /usr/local/cpanel/Cpanel/AdminBin/Server.pm line 339, <$socket> line 1. PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 15 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 15 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error response [url] https://api.cloudflare.com/client/v4/zones/?name=domain.com [status code] 403 [reason phrase] Forbidden' in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:89 Stack trace: #0 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(33): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response)) #1 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(108): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete') #2 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent)) #3 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vend in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 89 PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/index.live.php on line 6 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 Use of uninitialized value in concatenation (.) or string at /usr/local/cpanel/Cpanel/AdminBin/Server.pm line 339, <$socket> line 1. PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 15 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 15 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error response [url] https://api.cloudflare.com/client/v4/zones/?name=domain.com [status code] 403 [reason phrase] Forbidden' in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:89 Stack trace: #0 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(33): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response)) #1 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(108): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete') #2 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent)) #3 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vend in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 89 [2018-08-29 01:57:28 +0200] info [gather-update-logs] Cannot send file /usr/local/cpanel/logs/update_analysis/2018-08-28T23:57:24Z.tar.gz to updatelogdrop.cpanel.net: 500 Internal Server Error [2018-08-29 01:57:28 +0200] info [gather-update-logs] Failed to send data to cPanel PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/index.live.php on line 6 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 Use of uninitialized value in concatenation (.) or string at /usr/local/cpanel/Cpanel/AdminBin/Server.pm line 339, <$socket> line 1. PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 15 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 PHP Warning: file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 15 PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25 PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error response [url] https://api.cloudflare.com/client/v4/zones/?name=domain.com [status code] 403 [reason phrase] Forbidden' in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:89 Stack trace: #0 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(33): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response)) #1 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(108): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete') #2 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent)) #3 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vend in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 89

Blank Cloudflare Page in cPanel

Hello all,

OS: CloudLinux release 7.3 (Yury Malyshev)
cPanel & WHM 64.0 (build 24)

After installing the cPanel plugin for Cloudflare the page it adds is blank.

When pulling up the Cloudflare option in cPanel the below is output in /usr/local/cpanel/logs/error_log

PHP Warning:  file_get_contents(config.js): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/index.live.php on line 6
PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultConfig.php on line 25

During installation the output is as follows.

bash <(curl -s https://raw.githubusercontent.com/cloudflare/CloudFlare-CPanel/master/cloudflare.install.sh) -k removed_for_security -n "removed_for_security"
Starting CloudFlare CPanel Installation...
Downloading and unpacking latest version v6.2.0...
install: cannot stat ‘Cloudflare-CPanel-6.2.0/config.json.sample’: No such file or directory
info [install_plugin] Installing to paper_lantern
info [install_plugin] Running sprite_generator
info [install_plugin] Queueing task to update API spec files
Plugin installed ok
Cleaning up

I have also been able to recreate the issue on a different server with the below specs.
CentOS Linux release 7.3.1611 (Core)
cPanel & WHM 64.0 (build 33)

If you need any more information please let me know. Any help that can be provided would be awesome, even a ductape fix would work for now.

No or invalid host_key.

Hello,

on my WHM/cPanel (v68.0.19) server when i login cPanel and click Cloudflare icon, i submit login form and it says: "No or invalid host_key." on that cPanel/cloudflare page i see: Version: 6.1.5
Is there any file where i can update the key? I am afraid to do uninstall as i do not want to remove cpanel users cloudflare connection (when they logged in using their login data and enabled cloudflare via cpanel).

At https://partners.cloudflare.com/dashboard i login and i have there API key and name.

$ /usr/local/cpanel/bin/cloudflare_update.sh
cat: /root/.cpanel/datastore/cf_api: No such file or directory
ERROR - Missing HOST_KEY

Thank you in advance for suggestion.

plugin can't create cloudflare_data.yaml

while users trying to login with their cloudflare account, this plugin can't create /home/[username]/.cpanel/datastore/cloudflare_data.yaml containing :
client_api_key
cloudflare_email
host_user_unique_id
host_user_key

i found this problem in version 6.0.9
i'm using cpanel 58.34 with easyapache 4

error log content during user login

[2016-11-04 13:38:10 +0700] info [cpanel] Filemanager::get_file_content => The file /home/airsoftw/.cpanel/datastore/cloudflare_data.yaml does not exist for the account.
[CloudFlare] ERROR: [CPANEL UAPI] Array
(
    [type] => response
    [body] => Array
        (
            [cpanelresult] => Array
                (
                    [result] => Array
                        (
                            [data] => 
                            [errors] => Array
                                (
                                    [0] => The file /home/airsoftw/.cpanel/datastore/cloudflare_data.yaml does not exist for the account.
                                )

                            [messages] => 
                            [metadata] => Array
                                (
                                )

                            [status] => 0
                        )

                    [module] => Fileman
                    [func] => get_file_content
                    [apiversion] => 3
                )

        )

)
 
[CloudFlare] ERROR: [CPANEL UAPI] Array
(
    [type] => request
    [module] => Fileman
    [function] => get_file_content
    [parameters] => Array
        (
            [dir] => /home/airsoftw/.cpanel/datastore
            [file] => cloudflare_data.yaml
            [from_charset] => _DETECT_
            [to_charset] => _LOCALE_
        )

)
 
[CloudFlare] ERROR: [CPANEL UAPI] Array
(
    [type] => response
    [body] => Array
        (
            [cpanelresult] => Array
                (
                    [result] => Array
                        (
                            [data] => 
                            [errors] => Array
                                (
                                    [0] => The file /home/airsoftw/.cpanel/datastore/cloudflare_data.yaml does not exist for the account.
                                )

                            [messages] => 
                            [metadata] => Array
                                (
                                )

                            [status] => 0
                        )

                    [module] => Fileman
                    [func] => get_file_content
                    [apiversion] => 3
                )

        )

)
 
[CloudFlare] ERROR: /.cpanel/datastorecloudflare_data.yaml does not exist. 
[2016-11-04 13:38:10 +0700] warn [cpanel] Cpanel::Wrap::send_cpwrapd_request error: namespace=[CloudFlare] module=[APIKey] function=[get_host_api_key]: set error in context cloudflare: statusmsg=[Account is suspended] at /usr/local/cpanel/Cpanel/Wrap.pm line 120, <$socket> line 1.
	Cpanel::Wrap::send_cpwrapd_request("namespace", "CloudFlare", "module", "APIKey", "function", "get_host_api_key") called at /usr/local/cpanel/Cpanel/API/CloudFlare.pm line 47
	Cpanel::API::CloudFlare::get_host_api_key(Cpanel::Args=HASH(0x7363178), Cpanel::Result=HASH(0x73528b8)) called at /usr/local/cpanel/Cpanel/API.pm line 285
	Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 357
	eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 357
	Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x73528b8), CODE(0x73b4a10)) called at /usr/local/cpanel/Cpanel/API.pm line 285
	Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x7363178), Cpanel::Result=HASH(0x73528b8), "CloudFlare", "get_host_api_key") called at /usr/local/cpanel/Cpanel/API.pm line 142
	Cpanel::API::execute(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__, undef) called at cpanel.pl line 1441
	cpanel::cpanel::docpanelaction("<cpanelaction>\x{a}{\"module\":\"CloudFlare\",\"reqtype\":\"exec\",\"func\""...) called at cpanel.pl line 4102
	cpanel::cpanel::dotag_finished_headers(0) called at cpanel.pl line 3891
	cpanel::cpanel::cpanel_parseblock("<cpanelaction>\x{a}{\"module\":\"CloudFlare\",\"reqtype\":\"exec\",\"func\""...) called at cpanel.pl line 5158
	cpanel::cpanel::run_standard_mode() called at cpanel.pl line 839
	cpanel::cpanel::script("cpanel::cpanel", "./frontend/paper_lantern/cloudflare/proxy.live.php") called at cpanel.pl line 295
[2016-11-04 13:38:10 +0700] warn [cpanel] Failed to load Host API key. at /usr/local/cpanel/Cpanel/API/CloudFlare.pm line 61.
	Cpanel::API::CloudFlare::get_host_api_key(Cpanel::Args=HASH(0x7363178), Cpanel::Result=HASH(0x73528b8)) called at /usr/local/cpanel/Cpanel/API.pm line 285
	Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 357
	eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 357
	Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x73528b8), CODE(0x73b4a10)) called at /usr/local/cpanel/Cpanel/API.pm line 285
	Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x7363178), Cpanel::Result=HASH(0x73528b8), "CloudFlare", "get_host_api_key") called at /usr/local/cpanel/Cpanel/API.pm line 142
	Cpanel::API::execute(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__, undef) called at cpanel.pl line 1441
	cpanel::cpanel::docpanelaction("<cpanelaction>\x{a}{\"module\":\"CloudFlare\",\"reqtype\":\"exec\",\"func\""...) called at cpanel.pl line 4102
	cpanel::cpanel::dotag_finished_headers(0) called at cpanel.pl line 3891
	cpanel::cpanel::cpanel_parseblock("<cpanelaction>\x{a}{\"module\":\"CloudFlare\",\"reqtype\":\"exec\",\"func\""...) called at cpanel.pl line 5158
	cpanel::cpanel::run_standard_mode() called at cpanel.pl line 839
	cpanel::cpanel::script("cpanel::cpanel", "./frontend/paper_lantern/cloudflare/proxy.live.php") called at cpanel.pl line 295
[2016-11-04 13:38:10 +0700] warn [cpanel] Cpanel::Wrap::send_cpwrapd_request error: namespace=[CloudFlare] module=[APIKey] function=[get_host_api_key]: set error in context cloudflare: statusmsg=[Account is suspended] at /usr/local/cpanel/Cpanel/Wrap.pm line 120, <$socket> line 1.
	Cpanel::Wrap::send_cpwrapd_request("namespace", "CloudFlare", "module", "APIKey", "function", "get_host_api_key") called at /usr/local/cpanel/Cpanel/API/CloudFlare.pm line 47
	Cpanel::API::CloudFlare::get_host_api_key(Cpanel::Args=HASH(0x7362f50), Cpanel::Result=HASH(0x7363208)) called at /usr/local/cpanel/Cpanel/API.pm line 285
	Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 357
	eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 357
	Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x7363208), CODE(0x7363670)) called at /usr/local/cpanel/Cpanel/API.pm line 285
	Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x7362f50), Cpanel::Result=HASH(0x7363208), "CloudFlare", "get_host_api_key") called at /usr/local/cpanel/Cpanel/API.pm line 142
	Cpanel::API::execute(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__, undef) called at cpanel.pl line 1441
	cpanel::cpanel::docpanelaction("<cpanelaction>\x{a}{\"module\":\"CloudFlare\",\"reqtype\":\"exec\",\"func\""...) called at cpanel.pl line 4102
	cpanel::cpanel::dotag_finished_headers(0) called at cpanel.pl line 3891
	cpanel::cpanel::cpanel_parseblock("<cpanelaction>\x{a}{\"module\":\"CloudFlare\",\"reqtype\":\"exec\",\"func\""...) called at cpanel.pl line 5158
	cpanel::cpanel::run_standard_mode() called at cpanel.pl line 839
	cpanel::cpanel::script("cpanel::cpanel", "./frontend/paper_lantern/cloudflare/proxy.live.php") called at cpanel.pl line 295
[2016-11-04 13:38:10 +0700] warn [cpanel] Failed to load Host API key. at /usr/local/cpanel/Cpanel/API/CloudFlare.pm line 61.
	Cpanel::API::CloudFlare::get_host_api_key(Cpanel::Args=HASH(0x7362f50), Cpanel::Result=HASH(0x7363208)) called at /usr/local/cpanel/Cpanel/API.pm line 285
	Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 357
	eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 357
	Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x7363208), CODE(0x7363670)) called at /usr/local/cpanel/Cpanel/API.pm line 285
	Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x7362f50), Cpanel::Result=HASH(0x7363208), "CloudFlare", "get_host_api_key") called at /usr/local/cpanel/Cpanel/API.pm line 142
	Cpanel::API::execute(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__, undef) called at cpanel.pl line 1441
	cpanel::cpanel::docpanelaction("<cpanelaction>\x{a}{\"module\":\"CloudFlare\",\"reqtype\":\"exec\",\"func\""...) called at cpanel.pl line 4102
	cpanel::cpanel::dotag_finished_headers(0) called at cpanel.pl line 3891
	cpanel::cpanel::cpanel_parseblock("<cpanelaction>\x{a}{\"module\":\"CloudFlare\",\"reqtype\":\"exec\",\"func\""...) called at cpanel.pl line 5158
	cpanel::cpanel::run_standard_mode() called at cpanel.pl line 839
	cpanel::cpanel::script("cpanel::cpanel", "./frontend/paper_lantern/cloudflare/proxy.live.php") called at cpanel.pl line 295
[CloudFlare] ERROR: [HOST API] Array
(
    [type] => response
    [body] => Array
        (
            [request] => Array
                (
                    [act] => user_auth
                )

            [result] => error
            [msg] => No or invalid host_key.
            [err_code] => 100
        )

)

v5.3.11 not installing correctly on cpanel 56

So just yesterday I installed on a few of our servers which were still on version 54. They all installed without issues. Today I went to install on one of our servers that had just updated to version 56 and it appears not to be working correctly.

There is no error on the install process but this definitely looks odd, when I log into any cpanel account there is a single icon installed mixed with other icons (not a category specific to cloudflare as per the other installs I've done). There is also no /usr/local/cpanel/etc/cloudflare.json file setup.

Clicking on the one cloudflare icon brings up a broken design page which simply asks to login to a cloudflare account and there are no further options nor buttons unlike the version that installed on our other servers.

Also the install instructions appear to have changed since we now have to use the -k and -n parameters for they key and name and this isn't referenced in the documentation either. So I am not sure if the new version is not yet fully published but I don't seem to be able to install the version 5 either since attempting to do that automatically downloads version 6 anyways.

Paper lantern quick-search does not function on Cloudflare plugin page

cPanel version 11.60.0.37
Cloudflare plugin version 6.1.2

After opening the Cloudflare page in cPanel, the paper lantern quick search feature no longer works. If you enter anything in to the box, the quick-search drop-down does not functional at all.

Image 1 - How it works on every other cPanel page:

image

Image 2 - How it works on the Cloudflare plugin page, note "add" is entered in to the box with no dropdown. The box is empty when the page is initially loaded.

image

Exact steps to replicate:

  • Log in to cPanel for an account on the paper_lantern theme, "basic" style.
  • Navigate to the Cloudflare plugin page
  • Attempt to search for cPanel pages in the search drop-down

Issue:
No results are returned from the paper_lantern search box. Only occurs when on the Cloudflare page.

Unpack failed, directory not found

Unable to install on new cPanel 60 server.

bash <(curl -s https://raw.githubusercontent.com/cloudflare/CloudFlare-CPanel/master/cloudflare.install.sh) -k myapikeyhere -n 'DOMAIN.COM'

Starting CloudFlare CPanel Installation...
Downloading and unpacking latest version v6.1.0...
ERROR - Unpack failed, directory not found: 'CloudFlare-CPanel-6.1.0'

Download is successful and directly CloudFlare-CPanel-6.1.0 gets unpacked with several files in it. Even when I step into the directory to call cloudflare.install.sh directly, I still get exactly the same error message above.

Subdomain not appearing in CloudFlare cPanel list

Here is an example whereby a subdomain created in cPanel does not appear in the CloudFlare settings page, and is not available for activation. What might cause that?

cPanel > Subdomains

screenshot - 5 oct 2014 5_21_47 pm

cPanel > CloudFlare

screenshot - 5 oct 2014 5_33_18 pm

nsw.sbms.org.au does not appear on the CloudFlare page. Any suggestions as to why?

Here is the zone file for reference.

cPanel > Advanced DNS Zone Editor

screenshot - 5 oct 2014 5_34_13 pm

Domain inactive

Hello, I'm using cpanel with paper lantern 11.54 and cloudflare plugin 6.0.2
The problem is that when I'm trying to enable a domain, the domain is activated on cloudflare (and dns updated) but in cpanel interface I still see the domain disabled (cloudflare plan is empty, zone type is empty and use cloudflare->inactive). The strange thing is the domain is active if I'm login in cloudflare.com.

Unable to activate site

I am hosting a number of sites on the same server. For some of them, we are able to activate CloudFlare using the cPanel plugin. For 2, we are unable to get past the initial entry of the email address for the CloudFlare account; when we click the button it never proceeds to the next step.

The log entry in the cPanel log corresponding to this action reads:

 "info [cfadmin] User mismatch. Bailing out ". 

Any idea what user does not match to what, that is preventing the activation to proceed for some sites and not others?

"The name is already in use" issue

Just recently we started to face this error while trying to login to the CF account via CloudFlare plugin:

Taken from /usr/local/cpanel/logs/error_log:

PHP Fatal error:  Cannot use Psr\Log\LoggerInterface as LoggerInterface because the name is already in use in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultIntegration.php on line 5

This error appears when http://*.*.*.*:2082/cpsess*******/frontend/paper_lantern/cloudflare/proxy.live.php is executed.

Plugin version: 6.1.5
What we have already tried: reinstalling plugin, installing older versions, updating kernel, updating cPanel PHP to 5.6.30, updating cPanel with --force switch.

Any thoughts?

Interface does not reflect actual state of zone file when using cname method

When viewing the "Domain Overview" page in the plugin, you are presented with the zone records for the domain.

Currently my Domain Overview on my domains shows that cloudflare is on, replacing the main A record and the www A record for cnames that point to cloudflare.

When I go to view the zone file on the server I see that is not the case.

I'm running NSD instead of bind on my cPanel server if that makes a difference.

Installer does not activate mod_cloudflare on the server

I think the installer should install mod_cloudflare (or at least remind the client to in a message) -- I would make a commit but t he repository is currently read-only.

These commands work flawlessly for us and have been tested on a bunch of servers

wget --no-check-certificate http://www.github.com/cloudflare/CloudFlare-Tools/raw/master/mod_cloudflare.c;
apxs -i -a -c mod_cloudflare.c;
/usr/local/cpanel/bin/apache_conf_distiller --update;
/scripts/restartsrv_httpd;

First command downloads the module, second compiles it, third one makes cPanel aware of the extra "LoadModule" in the configuration so that it doesn't disappear when cPanel regenerates the server configuration, the last to restart HTTP using cPanels scripts as cPanel does have some locking mechanisms to prevent restarting sometimes (but it will restart it after it's unlocked)

Error with cpanel 58 PHP path on install

Hello,
Noticed our users were having trouble accessing their CF control panel. This was in the logs:

Child failed to make LIVEAPI connection to cPanel from: ./frontend/paper_lantern/cloudflare/proxy.live.php. at cpanel.pl line 4904.
[2016-07-12 14:46:56 -0400] warn [cpsrvd] The subprocess (cpanel (cpanel)) exited with an error: The subprocess reported error number 10 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 156.
    Cpanel::Server::Handlers::SubProcess::_report_subprocess_errors(Cpanel::Server::Handlers::SubProcess=HASH(0x2a2c8b8)) called at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 71
    Cpanel::Server::Handlers::SubProcess::handler(Cpanel::Server::Handlers::SubProcess=HASH(0x2a2c8b8), "subprocess_name", "cpanel (cpanel)", "subprocess_read_handle", IO::Handle=GLOB(0x2a2c5d0), "subprocess_write_handle", IO::Handle=GLOB(0x2a14810), "api_type", "html", ...) called at cpsrvd.pl line 6369
    cpanel::cpsrvd::cpHandler("app", "cpanel", "document", "./frontend/paper_lantern/cloudflare/proxy.live.php") called at cpsrvd.pl line 2315
    cpanel::cpsrvd::dodoc_cpaneld() called at cpsrvd.pl line 1550
    cpanel::cpsrvd::dodoc(HASH(0xea46c0)) called at cpsrvd.pl line 1315
    cpanel::cpsrvd::handle_one_connection() called at cpsrvd.pl line 807
    cpanel::cpsrvd::script() called at cpsrvd.pl line 314
PHP Warning:  require_once(cloudflare/vendor/autoload.php): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 2
PHP Fatal error:  require_once(): Failed opening required 'cloudflare/vendor/autoload.php' (include_path='/usr/local/cpanel/3rdparty/php/56/lib/php:.') in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/proxy.live.php on line 2
[2016-07-12 14:47:41 -0400] die [Internal Death while parsing [live php] 800446] Child failed to make LIVEAPI connection to cPanel from: ./frontend/paper_lantern/cloudflare/proxy.live.php. at cpanel.pl line 4904.
 at cpanel.pl line 4904.
    cpanel::cpanel::setup_external_engine() called at cpanel.pl line 792
    cpanel::cpanel::script("cpanel::cpanel", "./frontend/paper_lantern/cloudflare/proxy.live.php") called at cpanel.pl line 295


Child failed to make LIVEAPI connection to cPanel from: ./frontend/paper_lantern/cloudflare/proxy.live.php. at cpanel.pl line 4904.
[2016-07-12 14:47:42 -0400] warn [cpsrvd] The subprocess (cpanel (cpanel)) exited with an error: The subprocess reported error number 10 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 156.
    Cpanel::Server::Handlers::SubProcess::_report_subprocess_errors(Cpanel::Server::Handlers::SubProcess=HASH(0x2a1ba98)) called at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 71
    Cpanel::Server::Handlers::SubProcess::handler(Cpanel::Server::Handlers::SubProcess=HASH(0x2a1ba98), "subprocess_name", "cpanel (cpanel)", "subprocess_read_handle", IO::Handle=GLOB(0x2a2ccd8), "subprocess_write_handle", IO::Handle=GLOB(0x2a1b9c0), "api_type", "html", ...) called at cpsrvd.pl line 6369
    cpanel::cpsrvd::cpHandler("app", "cpanel", "document", "./frontend/paper_lantern/cloudflare/proxy.live.php") called at cpsrvd.pl line 2315
    cpanel::cpsrvd::dodoc_cpaneld() called at cpsrvd.pl line 1550
    cpanel::cpsrvd::dodoc(HASH(0xea46c0)) called at cpsrvd.pl line 1315
    cpanel::cpsrvd::handle_one_connection() called at cpsrvd.pl line 807
    cpanel::cpsrvd::script() called at cpsrvd.pl line 314
[2016-07-12 14:50:18 -0400] info [install_plugin] Installing to paper_lantern
[2016-07-12 14:50:18 -0400] info [install_plugin] Running sprite_generator
PHP Warning:  require_once(cloudflare/vendor/autoload.php): failed to open stream: No such file or directory in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/index.live.php on line 2
PHP Fatal error:  require_once(): Failed opening required 'cloudflare/vendor/autoload.php' (include_path='/usr/local/cpanel/3rdparty/php/56/lib/php:.') in /usr/local/cpanel/base/frontend/paper_lantern/cloudflare/index.live.php on line 2
[2016-07-12 14:52:42 -0400] die [Internal Death while parsing [live php] 803206] Child failed to make LIVEAPI connection to cPanel from: ./frontend/paper_lantern/cloudflare/index.live.php. at cpanel.pl line 4904.
 at cpanel.pl line 4904.
    cpanel::cpanel::setup_external_engine() called at cpanel.pl line 792
    cpanel::cpanel::script("cpanel::cpanel", "./frontend/paper_lantern/cloudflare/index.live.php") called at cpanel.pl line 295

Looking at the install script, it appears to install the vendor folder to:
/usr/local/cpanel/3rdparty/php/54/lib/php/cloudflare/vendor/
but on our system, we default to 56
/usr/local/cpanel/3rdparty/php/56/lib/php/
Issuing a
cp -R /usr/local/cpanel/3rdparty/php/54/lib/php/cloudflare/ /usr/local/cpanel/3rdparty/php/56/lib/php/
fixed the issue for us, but just wanted to let you know you may want to update the script to check for different default PHP versions.

Thanks!
Ray

Installation error: Missing file compiled.js.map

An error occurred during installation of version 6.1.2. The problem is the file compiled.js.map.
This file is not included in the latest version. Is it no longer required or just not included? Anyway you should add the file or remove the line of code in the installation script.

cloudflare.install.sh:
install $SOURCE_DIR/compiled.js.map $INSTALL_DIR/base/frontend/paper_lantern/cloudflare

Remove www. limitations

One of the issues we have noticed was that a .htaccess redirect is not reliable and does break somethings, some clients also want to host their sites without www. for SEO reasons, etc. A DNS zone of a domain without CF on our platform:

https://gist.github.com/776781

First setup is without CF, second setup with CF, and the third is what I suggest we can try creating if possible, to avoid usage of .htaccess for a redirect

Zone information

It seems like in the current version, full zone information from cpanel isn't being transferred over to cloudflare for new domains added. MIssing cpanel aliases (ftp.domain.tld, cpanel.domain.tld, etc. in addition to TXT records for DKIM, spf, etc.)

The aliases alone sometimes seem to appear in the cloudflare cpanel plugin, but not on the cpanel site itself (only domain.tld and www.domain.tld appear on the cloudflare website)

Updating the plugin

Hello,

At start I assumed that the plugin is auto updating itself however when I've compared the github source with those in production and they were quite different.

It would be really nice if we could find more documentation on how to update the plugin, in order to avoid problems with the clients that already have activated CloudFlare.

Thanks

Problem in cPanel 11.42.X using "Paper Lantern" template.

Hello friends using CloudFlare-CPanel.

Unfortunately I do not know how to help you in this problem, because I know not program to assist in this case, but I discovered a problem as the current plugin is not compatible with the available standard layout in 11.42 over version of cPanel, the "Paper Lantern" (more details on "http://blog.cpanel.net/meet-paper-lantern/"), but only in the default template "X3".

When I change the account to use the layout "X3" everything works perfectly.

When the layout is using "Paper Lantern" nothing works.

ERROR: Could not find latest version. Please double check your HOST_KEY.

The installer doesn't work. I copy and pasted the commands from the install doc. API key copy/pasted from my profile.

Cpanel v70.0.26 on Centos 7.

(Key below sanitized for this public ticket)

./cloudflare.install.sh -v -k XXXXXXXXXXXXXXX -n "XXXXXX LLC"
HOST_KEY = 'XXXXXXXXXXXXXXXXX'
ORG_NAME = 'XXXXXXX'
LOCAL_FILE_PATH = ''
Running as root
Starting CloudFlare CPanel Installation...
LATEST_VERSION - ''
ERROR: Could not find latest version. Please double check your HOST_KEY.

Usage: ./cloudflare.install.sh -k HOST_KEY -n 'ORG_NAME' [-f /path/to/local/cpanel.tar.gz ]

Add more information to cPanel page

Would it be worth adding more details to the cPanel screen to explain the difference between CloudFlare-controlled DNS and host-controlled DNS? Or perhaps at least link to a CloudFlare knowledge base page. Things like...

Using CloudFlare DNS

  • Provides faster DNS resolution with servers distributed around the world
  • Your IP address is more veiled from the internet and less vulnerable to DDOS attacks
  • Allows the root/naked domain to be routed through CloudFlare, not just the "www" domain and subdomains.
  • Subdomains created via cPanel will not work automatically. They will need to be manually added to CloudFlare. (Unless the plugin can be made to do this?)
  • To activate this, you must disable CloudFlare within cPanel, enable it via cloudflare.com and then follow the instructions in changing your nameservers
  • RailGun will only be available for business/enterprise accounts.

Using your hosting provider's DNS

  • DNS resolution may not be quite as fast or reliable
  • Your IP address becomes more visible to the internet and vulnerable to DDOS attacks
  • Does not allow the root/naked domain to be routed through CloudFlare – it should be redirected to the "www" domain or another subdomain which has been enabled for CloudFlare
  • Subdomains created via cPanel will work automatically
  • RailGun automatically available for hosting partners that support it, no need to upgrade to business/enterprise plan.

404 error, unable to log in

WHM/cPanel version 11.62.0.16 (clean install)
Plugin version 6.1.3

I'm not sure how to replicate this- on a clean install of 6.1.3 on a another new cPanel install, the installer seems to successfully install the plugin; however, when at the Cloudflare login screen in cPanel this error occurs when attemping to log in:

Client error response [status code] 404 [reason phrase] Not Found [url] https://api.cloudflare.com/host-gw.html/host-gw.html.

It seems the correct url is https://api.cloudflare.com/host-gw.html rather than https://api.cloudflare.com/host-gw.html/host-gw.html

Uninstalling/reinstalling doesn't seem to work either. I didn't seem to encouter this problem with 6.1.2 and have been using that version fine on another install.

Error Uncaught exception - cpanel

Hi, i'm getting an infinite loading when clicking on cpanel's cloudflare icon.

The error i get in /usr/local/cpanel/logs/error_log is :

Use of uninitialized value in concatenation (.) or string at /usr/local/cpanel/Cpanel/AdminBin/Server.pm line 339, <$socket> line 1.
PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ServerException' with message 'Server error response [url] https://api.cloudflare.com/client/v4/zones/?name=chaton.gr [status code] 500 [reason phrase] Internal Server Error' in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:89
Stack trace:
#0 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(33): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response))
#1 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(108): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete')
#2 /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent))
#3 /usr/local/cpanel/3rdparty/php/56/lib/php/clou in /usr/local/cpanel/3rdparty/php/56/lib/php/cloudflare/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 89

i've tried to reinstall without any luck.

best regards,

No notification about incorrect credentials

Hello,
I've faced following strange behavior of plugin:
In case if you enter incorrect access credentials you won't get any error message, as far as I can see this feature doesn't work since 6.0.8 version and till current 6.1.1.
in "developer console" of browser you will get following message:
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
Could you please check JS vars or such behavior is correct and I missed something?
2017-01-13-130014_510x31_scrot

Auto update does not work in < 6.0.1

The new_version variable is declared in upper case but is used in the if statement in lower case, also the curl request is just outputting to stdout and not interpreting the code.

DNS is not loaded

I am using the cPanel plugin to activate sites on my web host, for sites whose name servers are also hosted on the same server, which is a dedicated server running WHM/cPanel.

When I attempt the activation, the plugin accepts and validates the CloudFlare account credentials, offers me the settings where I can click to activate CloudFlare for the site, and then re-writes the DNS records. It does not however make those settings live. We have to go into WHM, edit the DNS zone and then save it (without changing it) in order to reload the zone to finish the activation.

Is this the intended behavior of the plugin, or is there a way to get the plugin to re-load the zone after rewriting it?

Full zone setup not properly sync'd

Hi,

I went to full zone setup and I had to disable/enable my domain to get the record set on CF.
Is there any way to trigger a full sync?
May be related to #156

Thanks!

Not working with the latest version of WHM/cPanel.

The WHM was updated to 11.52.0 (build 21), Today i tried to use the cloudflare plugin on cPanel, but is not working when i click on the CloudFlare icon (/frontend/paper_lantern/cloudflare/index.html) It takes forever to load, I left there and 10 minutes later it was still loading.

Plugin dont work, infinite load

Hello,
We have installed the last version of plugin in two brand new cPanel servers and in both the plugin dont work and display a infinite loading..

screenshot_1

Domain tab show the domain in inactive state but button "Provision domain with CNAME setup" dont work. Any idea?

Thanks,

Cloudflare installation issue - no such file or directory

Dear support team,

we tried to install a cpanel cloudflare addon but the install routine is interrupted before finalization.

May find this screenshot helpful - [link removed]

We tried to use this guide for installation (https://www.dropbox.com/s/riwd4bgoyumqz9p/cloudflare-cpanel-installation-activation-guide.pdf?dl=0) but cannot get it to run.

I also reported the failure on cpanel support https://tickets.cpanel.net/review/msg.cgi?ticketid=7566529 and the suggested me to inform you with this advice:

As the cloudflare plugin is a third party application and is not part of cPanel, or the basic configuration of bundled software, I can offer advice as a courtesy but will not be able to take actions to resolve the issue on your behalf.

It appears the script in question attempts to use a relative path directory for the cd command that incorrectly references the path name:

[07:55:32 server01 root@7566529 /usr/local/cpanel/cloudflare-CloudFlare-CPanel-5b8bd3a]cPs# sed -n 14p ./cloudflare/install_cf
(cd ../CloudFlare-CPanel* && mv * ../ && ../cloudflare.install.sh -k $HOST_KEY -n '${FORMAL_NAME}')

My suggestion would be to use an absolute path "/usr/local/cpanel/cloudflare-CloudFlare-CPanel-5b8bd3a" rather than "../CloudFlare-CPanel*" to see if this resolves the issue.

Please note this suggestion could result in unexpected behavior and I would suggest contacting the scripts developer or maintainer before making this modification on a production system.

Please help & advice how to proceed further to enable a proper installation on our dedicated server.

Thanks in advance. Alex

6.0 install problem

Hi,

When installing the 6.0 plugin on cPanel 56, I get this output:

Starting CloudFlare CPanel Installation...
Downloading and unpacking latest version v6.0.0...
info [install_plugin] Installing to paper_lantern
info [install_plugin] Installing cloudflare in feature manager ...
info [install_plugin] Done
info [install_plugin] Running sprite_generator
Plugin installed ok
Cleaning up

# cat /usr/local/cpanel/etc/cloudflare.json
cat: /usr/local/cpanel/etc/cloudflare.json: No such file or directory

Is the plugin compatible with this version?. Mod_cloudflare is not available in EA3.

Thanks!.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.