Last modified: 2011-05-12 22:50:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27872, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25872 - Rename class HttpRequest to something that doesn't conflict with PHP's HTTP extension.
Rename class HttpRequest to something that doesn't conflict with PHP's HTTP e...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.17.x
All Linux
: Normal normal (vote)
: ---
Assigned To: Bawolff (Brian Wolff)
:
: 28929 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-10 18:35 UTC by Corneel Booysen
Modified: 2011-05-12 22:50 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Corneel Booysen 2010-11-10 18:35:32 UTC
I have a public Wiki http://semanticstreams.com
that I am getting ready to use the Maps and Semantic Maps extension.

The Versions of software can be found here:
http://semanticstreams.com/wiki/index.php?title=Special:Version
(mediawiki 1.16, Maps and Semantic maps 0.7.2 rc1)

When I use the following syntax:
{{#display_point: coordinates=52.5234051, 13.4113999|zoom=7|height=400|type=hybrid}}
- the extension works as can be seen here: http://semanticstreams.com/wiki/index.php?title=Berlin

But when I try to use this form:
{{#display_point:New York City}}

I am not even able to save the page but during the save process gets the following error:

Fatal error: Cannot redeclare class HttpRequest in /home/semanti4/public_html/wiki/includes/HttpFunctions.php on line 122

Please advise how you would like to proceed with this. 

Thanks.
Corneel Booysen.
Comment 1 Bawolff (Brian Wolff) 2010-11-10 18:40:27 UTC
Mediawiki isn't compatible the HTTP php extension ( http://ca3.php.net/manual/en/intro.http.php ) . It sounds like you have the HTTP extension installed, which you'll need to disable (This isn't a smw issue).
Comment 2 Corneel Booysen 2010-11-10 21:04:19 UTC
As can be seen from the following link: http://semanticstreams.com/wiki/index.php?title=Special:Version

I have the following extensions installed:
include_once("$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php");
include_once("../wiki/extensions/SemanticForms/includes/SF_Settings.php");
require_once( "../wiki/extensions/Validator/Validator.php" );
require_once( "../wiki/extensions/Maps/Maps.php" );
require_once( "../wiki/extensions/SemanticMaps/SemanticMaps.php" );
require_once("../wiki/extensions/SemanticResultFormats/SRF_Settings.php");
require_once( "../wiki/extensions/ParserFunctions/ParserFunctions.php" );
require_once( "../wiki/extensions/BreadCrumbs/BreadCrumbs.php" );
require_once("../wiki/extensions/CategoryTree/CategoryTree.php");
require_once("../wiki/extensions/Cite/Cite.php");
require_once("../wiki/extensions/GoogleAnalytics/googleAnalytics.php");
include_once('../wiki/extensions/GoogleAdSense/GoogleAdSense.php');
require_once( "../wiki/extensions/GoogleAdSense2/GoogleAdSense.php" );
require_once("../wiki/extensions/ImageMap/ImageMap.php");
require_once("../wiki/extensions/IncludeArticle/IncludeArticle.php");
require_once("../wiki/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php")

Which one should I disable?
Comment 3 Chad H. 2010-11-10 21:09:42 UTC
(In reply to comment #1)
> Mediawiki isn't compatible the HTTP php extension (
> http://ca3.php.net/manual/en/intro.http.php ) . It sounds like you have the
> HTTP extension installed, which you'll need to disable (This isn't a smw
> issue).

We should probably just rename our class to not conflict with a known PHP interface :)
Comment 4 Jeroen De Dauw 2010-11-10 21:23:11 UTC
(In reply to comment #2)
> I have the following extensions installed:
> Which one should I disable?

The conflict is between MediaWiki and a PHP extension (not a MediaWiki extension). You need to change the configuration of your webserver to fix this.
Comment 5 Corneel Booysen 2010-11-11 18:14:37 UTC
Well,

I was hoping I would not end up in the middle between you guys and my hosting company. They attempted to disable the extension without much success. They then referred back to the comment Chad made that you should probably just rename the class as to not conflict with PHP. So they have now given up trying to disable the extension and I am left in the middle.

Could you guys please consider renaming your class - or send me instructions to do the renaming for my local copy.

I will add the copy of my siteground ticket for your benefit below.

Thanks
Corneel.


2010-11-11 11:30am by semanti4 (me)- I can try that - if you let me know which directory in the server the file needs to go.

From your note I assume the file will be called php.ini and will contain the one line:
;extension=http.so

If this is correct - just let me know which directory it should go in and I will give it a try.

Thanks.
Corneel.

PS. Will Apache have to be restart to enable the change?
2010-11-11 11:44am by Yavor.I -	Hello Corneel,

Please note that I have already created the php.ini file in each MediaWiki folder. You only have to test whether the issue persists with that workaround implemented. 

Apache restart is not required for the purpose. 

Best Regards, 

Yavor I.
Technical Support Team

--------------------------------------------

Check out our Friends Special:

One year hosting for $9.95 only + free months for referral
2010-11-11 11:55am by semanti4 -	I tried it and the problems still persists. 

1. If you login at semanticstreams.com with id "siteground" password "mediawiki" then
2. Try to create a page called New York (or any other name) - with the following content:
{{#display_point:New York City}}

3. Attempt to save it and you will the error.

Thanks.
Corneel.




2010-11-11 12:09pm by Yavor.I -	Hello Corneel,

In that case please check the possible courses of action below: 

- wait for the Mediawiki developers to rename their class in a way that it will not conflict with the http class. As one of them said in your bug report: 

We should probably just rename our class to not conflict with a known PHP interface :)

- contact professional developer to customize your application and rename the http class. If you want to take advantage of our development services you should post a support request by logging into your customer's area -> Get support -> HelpDesk - report hosting related issue -> Other technical issues -> Development related issues.

Alternatively, you can find developer at any of the portals below:

http://getafreelancer.com

http://scriptlance.com

If you have other questions or comments, feel free to contact us.

Best Regards, 

Yavor I.
Technical Support Team
Comment 6 Corneel Booysen 2010-11-11 18:29:31 UTC
This is a valid bug because we were unable to solve the problem by overriding the PHP extension.

I believe you should rename your class.

Thanks.
Corneel.
Comment 7 Jeroen De Dauw 2010-11-12 02:30:25 UTC
(In reply to comment #6)
> This is a valid bug because we were unable to solve the problem by overriding
> the PHP extension.
> 
> I believe you should rename your class.
> 
> Thanks.
> Corneel.

This is a MediaWiki bug, not a Semantic Maps bug, so please enter a new one into bugzilla with correct component and title. That way you have more chance of getting help.
Comment 8 Bawolff (Brian Wolff) 2010-11-12 02:51:43 UTC
How about we just rename/move the bug instead :)

/me plans to try to rename the class shortly if no one beats me to it.
Comment 9 Bawolff (Brian Wolff) 2010-11-12 07:55:28 UTC
Fixed in trunk on r76566 by renaming HttpRequest to MWHttpRequest. The old HttpRequest should still work as well so not to break backwards compatability.

Since maps extension was using the Http::get wrapper around HttpRequest, it doesn't need to change anything to be fixed.
Comment 10 Corneel Booysen 2010-11-12 19:21:57 UTC
I installed the trunk copy 1.17alpha that you fixed, on a local xampp server. 
(I can see your fix comments in the release notes)

When I attempt to store a page with the following:

{{#display_point:New York City}}

- the save action hangs for a really long time and then I get the following message:

"Fatal error: Parameter coordinates must be one or more valid locations."

Then I tried the example off of your page at: http://mapping.referata.com/wiki/Maps_examples

{{
#display_points:
Moscow, Russia;New York City; Brussels, Belgium
| icon=Green_marker.png
}}

The wiki hangs for a long time and then return the message:

"Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\wiki\includes\HttpFunctions.php on line 981"

I am reopening this ticket because I get the feeling it might be more semantic map related this time.

Thanks.
Corneel.
Comment 11 Max Semenik 2010-11-12 19:26:10 UTC
Please don't reuse bugs. This particular bug is about a duplicate class, the dupe is gone. If there's another problem with Maps, be bold to open another bug, or ask on IRC.
Comment 12 Bawolff (Brian Wolff) 2011-05-12 22:50:47 UTC
*** Bug 28929 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links