Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004733 [Quercus] major always 08-29-11 05:10 01-05-13 23:24
Reporter timowest View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0004733: MediaWiki 1.17.0 installation issue
Description When trying to install MediaWiki I get the following issue :

Fatal: PHP's PCRE module seems to be compiled without PCRE_UTF8 support. MediaWiki requires UTF-8 support to function correctly.

I am using Quercus 4.0.18 with Jetty 6.?.
Additional Information
Attached Files

- Relationships

- Notes
(0005476)
timowest
08-29-11 05:12

And here is the stacktrace I get :

com.caucho.quercus.QuercusException: java.lang.IllegalArgumentException: port out of range:-1
        at com.caucho.quercus.statement.TryStatement.execute(TryStatement.java:142)
        at com.caucho.quercus.statement.BlockStatement.execute(BlockStatement.java:105)
        at com.caucho.quercus.statement.ForeachStatement.execute(ForeachStatement.java:103)
        at com.caucho.quercus.statement.ForeachStatement.execute(ForeachStatement.java:186)
        at com.caucho.quercus.statement.BlockStatement.execute(BlockStatement.java:105)
        at com.caucho.quercus.program.Function.callImpl(Function.java:433)
        at com.caucho.quercus.program.Function.callMethod(Function.java:469)
        at com.caucho.quercus.env.ObjectExtValue.callMethod(ObjectExtValue.java:809)
        at com.caucho.quercus.expr.AbstractMethodExpr.eval(AbstractMethodExpr.java:97)
        at com.caucho.quercus.expr.ObjectMethodExpr.eval(ObjectMethodExpr.java:97)
        at com.caucho.quercus.expr.Expr.evalBoolean(Expr.java:665)
        at com.caucho.quercus.expr.UnaryNotExpr.eval(UnaryNotExpr.java:64)
        at com.caucho.quercus.expr.Expr.evalCopy(Expr.java:497)
        at com.caucho.quercus.expr.BinaryAssignExpr.eval(BinaryAssignExpr.java:88)
        at com.caucho.quercus.expr.Expr.evalTop(Expr.java:523)
        at com.caucho.quercus.statement.ExprStatement.execute(ExprStatement.java:67)
        at com.caucho.quercus.statement.BlockStatement.execute(BlockStatement.java:105)
        at com.caucho.quercus.program.Function.callImpl(Function.java:433)
        at com.caucho.quercus.program.Function.callMethod(Function.java:469)
        at com.caucho.quercus.env.ObjectExtValue.callMethod(ObjectExtValue.java:809)
        at com.caucho.quercus.env.Value.callMethod(Value.java:1533)
        at com.caucho.quercus.expr.ObjectMethodVarExpr.eval(ObjectMethodVarExpr.java:113)
        at com.caucho.quercus.expr.Expr.evalCopy(Expr.java:497)
        at com.caucho.quercus.expr.BinaryAssignExpr.eval(BinaryAssignExpr.java:88)
        at com.caucho.quercus.expr.Expr.evalTop(Expr.java:523)
        at com.caucho.quercus.statement.ExprStatement.execute(ExprStatement.java:67)
        at com.caucho.quercus.statement.BlockStatement.execute(BlockStatement.java:105)
        at com.caucho.quercus.statement.ForeachStatement.execute(ForeachStatement.java:103)
        at com.caucho.quercus.statement.IfStatement.execute(IfStatement.java:84)
        at com.caucho.quercus.statement.BlockStatement.execute(BlockStatement.java:105)
        at com.caucho.quercus.program.Function.callImpl(Function.java:433)
        at com.caucho.quercus.program.Function.callMethod(Function.java:469)
        at com.caucho.quercus.env.ObjectExtValue.callMethod(ObjectExtValue.java:809)
        at com.caucho.quercus.expr.AbstractMethodExpr.eval(AbstractMethodExpr.java:97)
        at com.caucho.quercus.expr.ObjectMethodExpr.eval(ObjectMethodExpr.java:97)
        at com.caucho.quercus.expr.AbstractMethodExpr.evalCopy(AbstractMethodExpr.java:63)
        at com.caucho.quercus.expr.BinaryAssignExpr.eval(BinaryAssignExpr.java:88)
        at com.caucho.quercus.expr.Expr.evalTop(Expr.java:523)
        at com.caucho.quercus.statement.ExprStatement.execute(ExprStatement.java:67)
        at com.caucho.quercus.statement.BlockStatement.execute(BlockStatement.java:105)
        at com.caucho.quercus.program.QuercusProgram.execute(QuercusProgram.java:413)
        at com.caucho.quercus.page.InterpretedPage.execute(InterpretedPage.java:89)
        at com.caucho.quercus.env.Env.executePageTop(Env.java:3951)
        at com.caucho.quercus.env.Env.executeTop(Env.java:3892)
        at com.caucho.quercus.servlet.QuercusServletImpl.service(QuercusServletImpl.java:188)
        at com.caucho.quercus.servlet.QuercusServlet.service(QuercusServlet.java:594)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
 
(0005477)
timowest
08-29-11 06:29

It appears when host:port is given as CURL_PROXY, the proxy port part is not updated in the CurlResource.

According to PHP docs :

CURLOPT_PROXYPORT

The port number of the proxy to connect to. This port number can also be set in CURLOPT_PROXY.
 
(0005478)
timowest
08-29-11 23:16

The PCRE error is output from the following code :

    $regexd = preg_replace( '/[\x{0430}-\x{04FF}]/iu', '', '-&0001040;&0001041;&0001042;&0001043;&0001044;-' );
    wfRestoreWarnings();
    if ( $regexd != '--' ) {
        $this->showError( 'config-pcre-no-utf8' );
        return false;
    }

Is Quercus not handling unicode escapes properly in regular expressions?
 
(0005482)
ryansmagnusson
08-30-11 08:17

I am also getting both of these errors when trying to install MediaWiki 1.17.0.
I have tried doing it on Jetty 7 & Tomcat 7.

For the "port out of range: -1" error, as timowest describes, it seems to be caused by the CurlResource not having its port property set and defaulting to -1 when used in the method:
com.caucho.quercus.lib.curl.HttpConnection#createConnection(URL, String, String, CurlResource, URL, String, String, String).

HttpConnection#createConnection invokes HttpConnection#init(CurlResource).
HttpConnection#init invokes HttpConnection#getProxy().
HttpConnection#getProxy() creates a new InetSocketAddress using the default -1 for the port number, which InetSocketAddress doesn't seem to be very happy about.

As a quick hack around, I changed the #getProxy() code to use zero if the port is -1, and this seemed to resolve the issue for me:
InetSocketAddress address = new InetSocketAddress(_proxyURL.getHost(), (_proxyURL.getPort() < 0 ? 0 : _proxyURL.getPort()));


After this was resolved, I am still getting the PCRE_UTF8 error message when using the mediawiki install screens.
 
(0006146)
nam
01-05-13 23:24

The PCRE error should be fixed in 4.0.34. I have confirmed that mediawiki-1.20.2 works with Quercus.
 

- Issue History
Date Modified Username Field Change
08-29-11 05:10 timowest New Issue
08-29-11 05:12 timowest Note Added: 0005476
08-29-11 06:29 timowest Note Added: 0005477
08-29-11 23:16 timowest Note Added: 0005478
08-30-11 07:50 ryansmagnusson Issue Monitored: ryansmagnusson
08-30-11 08:17 ryansmagnusson Note Added: 0005482
01-05-13 23:23 nam Status new => assigned
01-05-13 23:23 nam Assigned To  => nam
01-05-13 23:24 nam Status assigned => closed
01-05-13 23:24 nam Note Added: 0006146
01-05-13 23:24 nam Resolution open => fixed
01-05-13 23:24 nam Fixed in Version  => 4.0.34


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
44 total queries executed.
36 unique queries executed.
Powered by Mantis Bugtracker