Skip to content
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

notices #1

Open
infograf768 opened this issue Oct 13, 2011 · 17 comments · Fixed by #5
Open

notices #1

infograf768 opened this issue Oct 13, 2011 · 17 comments · Fixed by #5

Comments

@infograf768
Copy link

I get these:

Notice: Undefined index: request_header in /Library/WebServer/Documents/trunk1.7/libraries/joomla/client/github.php on line 173

Warning: usort() [function.usort]: The argument should be an array in /Library/WebServer/Documents/trunk1.7/administrator/components/com_patchtester/models/pulls.php on line 102

Warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/trunk1.7/administrator/components/com_patchtester/models/pulls.php on line 104

Warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/trunk1.7/administrator/components/com_patchtester/views/pulls/tmpl/default.php on line 51

@elkuku
Copy link
Contributor

elkuku commented Oct 13, 2011

heh - that's the same issue I got...
Maybe you could change in libraries/joomla/client/github.php
function sendRequest()
CURLOPT_SSL_VERIFYPEER from true to false ?

I tried different certs with no avail..

@ianmacl
Copy link
Owner

ianmacl commented Oct 13, 2011

Yeah that's the verification error. I suppose we can change VERIFYPEER to false here until I fix it upstream in the library.

@ianmacl
Copy link
Owner

ianmacl commented Oct 13, 2011

So I pushed a change that should fix this. I tested on XAMPP WinXP and it worked. If somebody else can confirm that the fix works I will close this as resolved.

@jlleblanc
Copy link

Changing CURLOPT_SSL_VERIFYPEER from true to false fixes the issue here on my Mac with a MacPorts complied MAMP stack.

@elkuku
Copy link
Contributor

elkuku commented Oct 13, 2011

Well, I can not confirm that the fix works on windows but I can confirm that it works on Linux - perfect :)

I'm totally impressed - there is so much potential in this thingy..

@ianmacl
Copy link
Owner

ianmacl commented Oct 13, 2011

Joe can you confirm that the fix I pushed fixes the issue on your Mac?

@infograf768
Copy link
Author

@test
No more Notices.

The pull request joomla/joomla-cms#3 is correctly displayed and clicking on it displays the github pull for it.

Clicking on Apply Patch gives:

500 - An error has occurred.

Not connected to server.

@jlleblanc
Copy link

@ianmacl just tested with a fresh copy and yes, the notices are gone. However, I'm getting the same 500 error as @infograf768 when applying a patch.

@elkuku
Copy link
Contributor

elkuku commented Oct 14, 2011

I can reproduce this issue on a windows box - it occurs when the extension php_openssl.dll is not loaded in your php.ini

On a Mac ? No clue. Is PHP compiled with OpenSSL support ?

Could you check your php_info() and make sure that OpenSSL support is enabled ?

Also, Ian, the 500 comes from an unhandled exception thrown in JHttp.. should we implement a try..catch in the controller and also throw meaningful exception instead of just returning false ?

@infograf768
Copy link
Author

On Mac, with MAMP or Native Apache with php, SSL Support is enabled.

@jlleblanc
Copy link

OpenSSL is enabled on my Mac setup as well.
On Oct 14, 2011, at 11:58 AM, Nikolai Plath wrote:

I can reproduce this issue on a windows box - it occurs when the extension php_openssl.dll is not loaded in your php.ini

Ona Mac ? No clue.

Could you check your php_info() and make sure that OpenSSL support is enabled ?

Also, Ian, the 500 comes from an unhandled exception thrown in JHttp.. should we implement a try..catch in the controller and also throw meaningful exception instead of just returning false ?

Reply to this email directly or view it on GitHub:
#1 (comment)

@elkuku
Copy link
Contributor

elkuku commented Oct 14, 2011

JHttp is really unhelpful, eating up valuable error messages the Joomla! way...

try
{
    $connection = $this->connect($uri);
}
catch (Exception $e)
{
    return false;
}

The connect() method doesn't even throw an exception, nor it checks the $err and $errno variables - platform bug :(

Would it make sense to use cURL, now that the https problem seems to be resolved (i hope..) ?

edit ;)

Could you try the following code right in administrator/components/com_patchtester/patchtester.php or in any other place where it gets executed ?

$res = fsockopen('ssl://github.com', 443, $errno, $err, 5);
var_dump($err);
var_dump($errno);
var_dump($res);

@ianmacl
Copy link
Owner

ianmacl commented Oct 14, 2011

I wonder if it is the allow_url_fopen setting. Is that enabled?

@jlleblanc
Copy link

Yes, allow_url_fopen is enabled on my machine.

On Oct 14, 2011, at 2:13 PM, ianmacl wrote:

I wonder if it is the allow_url_fopen setting. Is that enabled?

Reply to this email directly or view it on GitHub:
#1 (comment)

@elkuku elkuku mentioned this issue Oct 15, 2011
@infograf768
Copy link
Author

allow_url_fopen is also enabled here.

@elkuku
Copy link
Contributor

elkuku commented Oct 20, 2011

Could you test again with the latest changes, so this issue might be closed (hopefully) ?

@jlleblanc
Copy link

Tested, no longer get the notices in the current version.

elkuku referenced this issue in elkuku/patchtester Dec 2, 2014
Makes links to github appear in a new window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants