The server plugins.authpuppy.org is not available

Asked by Robin Jones

My server is not allowing the ability to update the plugins, as it is showing the message "The server plugins.authpuppy.org is not available".

any Ideas?

This server is running on a Windows shared hosting package with GoDaddy, so it might be a configuration / permissions issue, but I cant find the code that tells the application where the plugin update URL is. Maybe this should be configurable for multiple stores anyway?

Robin.

Question information

Language:
English Edit question
Status:
Solved
For:
AuthPuppy Edit question
Assignee:
No assignee Edit question
Solved by:
Robin Jones
Solved:
Last query:
Last reply:
Revision history for this message
gbastien (gbastien02) said :
#1

First obvious question: Was plugins.authpuppy.org really online when you tried?

And thanks for trying on a Windows server. The code to install plugins is in file plugins/apPluginManagerPlugin/lib/model/apWebPlugins.php

Revision history for this message
Robin Jones (robin-networkfusion) said :
#2

yes, I can browse to plugins.authpuppy.org and it shows up as I expect.

Revision history for this message
gbastien (gbastien02) said :
#3

Ok, we use file_get_contents(http://plugins.authpuppy.org/packages.yml) to get the package list, but turn off error_reporting before doing so. You may try to comment out this line and see what error pops up.

Revision history for this message
Robin Jones (robin-networkfusion) said :
#4

the error code seems to be 341???

but I have also tried using $packagesinfo = implode('', file("http://$packageurl/packages.yml")); and it is still returning null, so it looks like the webserver is not allowing cross domain trusts...

further investigation needed!!!

Revision history for this message
Robin Jones (robin-networkfusion) said :
#5

now we are getting somewhere:

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration...

Revision history for this message
Robin Jones (robin-networkfusion) said :
#6

Using a script such as this:

<?php

$myfile = "http://plugins.authpuppy.org/packages.yml";
//$content= implode('<br>', file($myfile));

//$content= file_get_contents("http://plugins.authpuppy.org/packages.yml");

$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, 'http://plugins.authpuppy.org/packages.yml');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$content = curl_exec($ch);
curl_close($ch);

echo "<html>";
echo $content;
echo "</html>";

?>

file_get_contents and implode dont work as url file access is disabled. using curl however returns the content (at least in this script). Turning this into workable code for apWebPlugins.php is starting to annoy me...

Revision history for this message
gbastien (gbastien02) said :
#7

Ok thanks...

In the meantime, you can still install the plugins manually by downloading the tarball and uploading them to the server.

Revision history for this message
Robin Jones (robin-networkfusion) said :
#8

Don't worry, I only set it up as a test to see if it was possible to make it work in a windows/iis environment... I didn't expect it to work as well as it does, and was an aid to start seeing what I can add to the project development.

Next will be looking into MSSQL compatability!!!

If it aids you, I can set you up as an FTP user on the site, so you can check solutions against a windows environment??

if so, you should have my email address from the issues with the wifidog spammers :-)

Robin.

Revision history for this message
Robin Jones (robin-networkfusion) said :
#9

    /**
     * Returns the plugins list from the authpuppy pear channel
     * @return SimpleXMLElement | false
     */
    public function getPlugins() {
        if (is_null($this->_plugins) && is_null($this->_msg)) {
            $packageurl = $this->_packageurl;
            // Set the error reporting to 0, in case the server does not answer, we don't want the error to show here
            $err = error_reporting();
            error_reporting(0);

   $site_url = "http://$packageurl/packages.yml";
   $ch = curl_init();
   $timeout = 10; // set to zero for no timeout
   curl_setopt ($ch, CURLOPT_URL, $site_url);
   curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);

   ob_start();
   curl_exec($ch);
   $errno = curl_errno($ch);
   $errstring = curl_error($ch);
   curl_close($ch);
   $packagesinfo = ob_get_contents();
   ob_end_clean();

   error_reporting($err);

  // Check if any error occured
  if($errno)
  {
         $this->_msg = "The server $packageurl is not available, $errstring";
            return false;

  } else {
    $this->_plugins = sfYaml::load($packagesinfo);
        }

        }
        return $this->_plugins;
    }

//works beautifully!!

Revision history for this message
Robin Jones (robin-networkfusion) said :
#10

as above