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

PHP Warning: parse_url(http://): Unable to parse URL in core/UrlHelper.php on line 494 #5180

Closed
mattab opened this issue May 18, 2014 · 6 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@mattab
Copy link
Member

mattab commented May 18, 2014

Reported by at least two users in forum post

Changing the cron command fro, --url= to --piwik-domain= fixed it.

@tsteur
Copy link
Member

tsteur commented May 26, 2014

In eb78302: refs #5180 this could be related to a specific PHP version or suhosin? At least display a message to use --piwik-domain instead of --url in such a case

@mattab mattab added this to the 2.5.0 - Piwik 2.5.0 milestone Jul 8, 2014
@merowinbt
Copy link

Actually, the warning error in parse_url() is suppressed since PHP 5.3.3. With PHP 5.3.2 you get the Warning-Error, because the parameter $url is false in Piwik\UrlHelper::getHostFromUrl()

Instead of handling the error in getHostFromUrl(), I'd rather fix the initial problem in Piwik\Console\initPiwikHost(), where the code explicitly demands --piwik-domain as an input parameter, which contradicts to the documentation at http://piwik.org/docs/setup-auto-archiving/, where --url is used:

$piwikHostname = $input->getParameterOption('--piwik-domain');

Sorry I don't have any code contribution..

@mattab mattab modified the milestones: Short term, Piwik 2.5.0 Aug 7, 2014
@mattab
Copy link
Member Author

mattab commented Aug 7, 2014

@merowinbt thanks for the tip, we will definitely fix this one for the next version!

(we will always read both --piwik-domain and --url parameters as both should be supported)

tsteur added a commit that referenced this issue Aug 8, 2014
…ure if I understand the problem fully but this should fix it I reckon
@tsteur
Copy link
Member

tsteur commented Aug 8, 2014

Can someone confirm this fixes the issue? I cannot reproduce it as I do not have an installation with 5.3.2.

@tsteur tsteur self-assigned this Aug 8, 2014
@tsteur
Copy link
Member

tsteur commented Aug 12, 2014

Closing it as it should work I reckon. Please reopen at any time if not and I will definitely look into it.

@merowinbt
Copy link

thanks, looks good, at least I don't get the warning anymore; tested with PHP 5.3.2-1ubuntu4.26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants