Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Invalid URI detected.'

1,327 views
Skip to first unread message

Franz

unread,
Jun 20, 2013, 9:08:38 AM6/20/13
to joomla-de...@googlegroups.com
Hello all,
I get the this error when getting an URL from a Joomla 2.5 site with php-curl, and not when I just paste the same URL in the browser:

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Invalid URI detected.'

I read this:


and tried to apply the "rawurlencode" solution, but with no luck (same error). 

I am really curious about why it seems to happen only with php-curl.

FYI this is a code to get the backup profiles list of Akeeba of a remote site.

Thank you to anyone who can shed some light on this mistery!

--
Franz

Mark Dexter

unread,
Jun 20, 2013, 11:16:55 AM6/20/13
to joomla-de...@googlegroups.com
It sounds as though you have a quote in your url. You could change the
error message as suggested in the forum thread to see what URL's are
causing the issue. The system tests use php-curl and they work fine
with it running Joomla.

Mark
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to joomla-dev-gene...@googlegroups.com.
> To post to this group, send an email to joomla-de...@googlegroups.com.
> Visit this group at http://groups.google.com/group/joomla-dev-general.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Franz

unread,
Jun 20, 2013, 11:20:49 AM6/20/13
to joomla-de...@googlegroups.com
Hello Mark and thank you for your answer.

I know I have a quote in my URL. But:

1) it should be escaped by "rawurlencode"
2) why the same URL is fine if I call it via the browser (i.e. I get the desired response)?

Mark Dexter

unread,
Jun 20, 2013, 11:31:45 AM6/20/13
to joomla-de...@googlegroups.com
Unfortunately, I don't know the answers to your questions. I would try
debugging the code (where we check for quotes) when you are using the
rawurlencode and see why it is failing. Mark

Franz

unread,
Jun 20, 2013, 11:49:32 AM6/20/13
to joomla-de...@googlegroups.com
Thank you again. I found the issue.

There is an intermediate redirect (303 response), so curl automatically fires another request to retrieve the "redirect_url". 

But of course this new "redirect_url" is not correctly escaped, thus the error.

The browser is probably escaping it automatically and that is why I don't get this error in browser..

elin

unread,
Jun 21, 2013, 6:51:16 PM6/21/13
to joomla-de...@googlegroups.com
We have recently had an issue come in about quotes in urls in browsers and apparently with the glaring exception of Chrome they will all escape.

Elin

Richard

unread,
Aug 16, 2013, 11:25:48 AM8/16/13
to joomla-de...@googlegroups.com

George Wilson

unread,
Aug 16, 2013, 12:42:21 PM8/16/13
to joomla-de...@googlegroups.com
Hi Richard,
It had already been filed here: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=31036&start=0 so marked yours as a duplicate. There's a patch here we're testing at the moment :)

Kind Regards,
George
Reply all
Reply to author
Forward
0 new messages