Mailing List Archive

Problem with installation
Hi,

I've just installed the Wikipedia software on my own machine, and I'm
having the following problem. The bottom of the page says:


Warning: Unknown(): Your script possibly relies on a session side-effect
which existed until PHP 4.2.3. Please be advised that the session
extension does not consider global variables as a source of data, unless
register_globals is enabled. You can disable this functionality and this
warning by setting session.bug_compat_42 or session.bug_compat_warn to
off, respectively. in Unknown on line 0


How can I fix this? Where do I enable or set these settings/variables?

Thanks,
Timwi
Re: Problem with installation [ In reply to ]
Timwi wrote:

> How can I fix this? Where do I enable or set these settings/variables?

Find your php.ini and set register_globals = On.

If you don't have a php.ini, find the php.ini-dist and copy it to
php.ini, probably under /usr/local/lib or /usr/local/etc or some such place.

-- brion vibber (brion @ pobox.com)
Re: Problem with installation [ In reply to ]
Brion Vibber wrote:

> Timwi wrote:
>
>> How can I fix this? Where do I enable or set these settings/variables?
>
> Find your php.ini and set register_globals = On.

Thank you! I didn't know about this file.

Things seem to work now, except editing an article. If I submit an
article, I get:

Warning: Empty regular expression in Language.php on line 1424

This line in Language.php is:

$text = preg_replace( $rxYDM, '[[$1]] [[$4 $3]]', $text);

What do I need to do here?

Thanks,
Timwi
Re: Re: Problem with installation [ In reply to ]
On Tue, 8 Jul 2003, Timwi wrote:
> Things seem to work now, except editing an article. If I submit an
> article, I get:
>
> Warning: Empty regular expression in Language.php on line 1424

Yeah, there's some bug in Tim's date munging code that someone should
look into...

Set $wgUseDynamicDates = false in LocalSettings.php to be sure it's
disabled for now. Or try to fix it. :)

-- brion vibber (brion @ pobox.com)
Re: Problem with installation [ In reply to ]
Brion Vibber wrote:

> On Tue, 8 Jul 2003, Timwi wrote:
>
>>Things seem to work now, except editing an article. If I submit an
>>article, I get:
>>
>> Warning: Empty regular expression in Language.php on line 1424
>
> Set $wgUseDynamicDates = false in LocalSettings.php to be sure it's
> disabled for now. Or try to fix it. :)

Thanks again for your input. Now that my Wikipedia test server works
fine (yay!), I was able to test my own patch.

PHP seems to have very different operator precedence than both Perl and
C. (This is my first time doing PHP, does it show? :) ) It does not seem
to be possible to do this:
return $var == $value ? $one : $two . $three;
without parentheses.

Anyway, just wanted to say that. I've reworked my patch to use
parentheses in some cases, and ifs in most cases (for sake of readability).

There's only one final decision left that I need someone to make: How do
we parse the following input?

''line 1

line 2''

There are three possibilities with my patch as it is now:

1) <em>line 1
<p>
line 2</em> (incorrect HTML)

2) ''line 1
<p>
line 2'' (shows author what's wrong)

3) line 1
<p>
line 2 (least confusing to readers, but author may
wonder why '' ... '' didn't work)

Of course other things are possible, e.g.

4) <em>line 1</em>
<p>
<em>line 2</em>

but that requires slightly more work (especially for line 2).

Thanks for any opinions,
Timwi
Re: Re: Problem with installation [ In reply to ]
On Wed, 9 Jul 2003, Timwi wrote:
> Thanks again for your input. Now that my Wikipedia test server works
> fine (yay!), I was able to test my own patch.

Which reminds me, did you get CVS working?

Note that if you pulled the tree anonymously, you have pull a fresh copy
as a developer and commit from the new tree. Cryptic commands at bottom of
http://sourceforge.net/cvs/?group_id=34373

> PHP seems to have very different operator precedence than both Perl and
> C. (This is my first time doing PHP, does it show? :) ) It does not seem
> to be possible to do this:
> return $var == $value ? $one : $two . $three;
> without parentheses.

?: probably should _never_ be used without parentheses, since it's such a
confusing sonuva.

> There's only one final decision left that I need someone to make: How do
> we parse the following input?
>
> ''line 1
>
> line 2''
>
> There are three possibilities with my patch as it is now:
>
> 1) <em>line 1
> <p>
> line 2</em> (incorrect HTML)

That would be bad. ;)

> 2) ''line 1
> <p>
> line 2'' (shows author what's wrong)

This is current behavior.

> 3) line 1
> <p>
> line 2 (least confusing to readers, but author may
> wonder why '' ... '' didn't work)

I don't think I like this one.

> Of course other things are possible, e.g.
>
> 4) <em>line 1</em>
> <p>
> <em>line 2</em>
>
> but that requires slightly more work (especially for line 2).

I don't think things like '' should cross block-level boundaries like
paragraph breaks (though they probably should cross line breaks in source
text that are in the same block). It's easy to mysteriously plunge an
entire page into italics by mistake like that, and hard to track down the
problem. Localizing the effects localizes the trouble, and makes it
easier to take isolated segments and move them around within and between
pages without breaking formatting.

Another possible rendering is:

<p><em>line 1</em></p>
<p>line 2<em></em></p>

in which we treat '' as a toggle which is reset at the end of a block.

-- brion vibber (brion @ pobox.com)
Re: Problem with installation [ In reply to ]
Brion Vibber wrote:

> On Wed, 9 Jul 2003, Timwi wrote:
>
>>Thanks again for your input. Now that my Wikipedia test server works
>>fine (yay!), I was able to test my own patch.
>
> Which reminds me, did you get CVS working?

Not today; kept having the EOF problem. (Is Sourceforge working on that
problem at all?)

> ?: probably should _never_ be used without parentheses, since it's such a
> confusing sonuva.

With well-chosen indentation, I find it absolutely not confusing at all:

return $var == $value1 ? $variable :
$var == $value2 ? SomeOperation( $variable ) :
$var == $value3 ? "Literal value" :
0;

or something like that.

> I don't think things like '' should cross block-level boundaries like
> paragraph breaks

I agree.

> Another possible rendering is:
>
> <p><em>line 1</em></p>
> <p>line 2<em></em></p>
>
> in which we treat '' as a toggle which is reset at the end of a block.

Of course. :-) I was going to mention this alternative too, but I
forgot. This will also be very easy to code.

Timwi
Re: Re: Problem with installation [ In reply to ]
Timwi wrote:

>There's only one final decision left that I need someone to make: How do
>we parse the following input?

> ''line 1
>
> line 2''

The Wikipedia software currently does:

>2) ''line 1
> <p>
> line 2'' (shows author what's wrong)

which IMO is best anyway.

Once upon a time, it did:

5) <em>line 1</em>
<p>
line 2

which avoids the "slightly more work [...] for line 2" of (4).


-- Toby
Re: Re: Problem with installation [ In reply to ]
> Warning: Empty regular expression in Language.php on line 1424
>
>This line in Language.php is:
>
> $text = preg_replace( $rxYDM, '[[$1]] [[$4 $3]]', $text);

Ouch, that's not the context I like to see my code quoted in a mailing list.
I think I've fixed it now, it was just an obvious typo. Timwi, can you
please test it for me? Download the latest Language.php (version 1.29 or
later), turn on $wgUseDynamicDates, and see if the error comes back?

-- Tim Starling.

_________________________________________________________________
Hotmail is now available on Australian mobile phones. Go to
http://ninemsn.com.au/mobilecentral/signup.asp
Re: Problem with installation [ In reply to ]
Tim Starling wrote:

> Timwi, can you please test it for me?

I can't; the CVS server has been dysfunctional for me all of today and
yesterday.

Again, are the Sourceforge people working on this problem at all?

Timwi
Re: Re: Problem with installation [ In reply to ]
Timwi wrote:

>> Timwi, can you please test it for me?
>
>
> I can't; the CVS server has been dysfunctional for me all of today and
> yesterday.

It's been fine and lovely for me... hmmm

> Again, are the Sourceforge people working on this problem at all?

Better to ask them than us, I suspect. :D

-- brion vibber (brion @ pobox.com)
Re: Re: Problem with installation [ In reply to ]
Timwi wrote:

> Tim Starling wrote:
>
>> Timwi, can you please test it for me?
>
>
> I can't; the CVS server has been dysfunctional for me all of today and
> yesterday.
>
> Again, are the Sourceforge people working on this problem at all?
>

The anonnymous access needs some (10 or 20) try's to work (and don't send
an EOF), but I don't have any problems with the developer server. Updates
works fine and fast.

--
Smurf

smurf@AdamAnt.mud.de
------------------------- Anthill inside! ---------------------------
Re: Problem with installation [ In reply to ]
Brion Vibber wrote:

> Timwi wrote:
>
>>> Timwi, can you please test it for me?
>>
>> I can't; the CVS server has been dysfunctional for me all of today and
>> yesterday.
>
> It's been fine and lovely for me... hmmm

I'm probably doing something wrong :/

>> Again, are the Sourceforge people working on this problem at all?
>
> Better to ask them than us, I suspect. :D

I did; they closed my support request with a short note to a "Known
issues" page where a notice about this has been posted over three months
ago.

Timwi
Re: Problem with installation [ In reply to ]
Tim Starling wrote:

>> Warning: Empty regular expression in Language.php on line 1424
>>
>> This line in Language.php is:
>>
>> $text = preg_replace( $rxYDM, '[[$1]] [[$4 $3]]', $text);
>
>
> Ouch, that's not the context I like to see my code quoted in a mailing
> list. I think I've fixed it now, it was just an obvious typo. Timwi, can
> you please test it for me? Download the latest Language.php (version
> 1.29 or later), turn on $wgUseDynamicDates, and see if the error comes
> back?

I've managed to update from CVS once, and I'm still getting the same
error. However, I have not ever consciously set (or unset)
$wgUseDynamicDates.

Additionally, I'm receiving the error only the first time (when the page
doesn't yet exist). It will then start to exist and I can edit it
without problems.

I hope that helps in further diagnosis,
Timwi
Re: Problem with installation [ In reply to ]
Brion Vibber wrote:
>
> Which reminds me, did you get CVS working?

Just now I caught another minute the CVS server was working, so I tried,
and I received the same error as before (WinCVS 1.3.8.1):

cvs login
Logging in to
:pserver:Timwi@cvs.wikipedia.sourceforge.net:2401/cvsroot/wikipedia

*****CVS exited normally with code 0*****

cvs commit -m "apostrophe fix" OutputPage.php (in directory
C:\Wikipedia\phase3\includes\)
cvs [server aborted]: "commit" requires write access to the repository


*****CVS exited normally with code 1*****


Any help would be appreciated :/

Thanks,
Timwi
Re: Re: Problem with installation [ In reply to ]
Timwi wrote:

> Just now I caught another minute the CVS server was working, so I
> tried, and I received the same error as before (WinCVS 1.3.8.1):
>
> cvs login
> Logging in to
> :pserver:Timwi@cvs.wikipedia.sourceforge.net:2401/cvsroot/wikipedia

Hrm... that doesn't look right. You should be using external
authentication via ssh, not pserver.

If you were on Unix or using Cygwin's Win32 port of the regular Unix
CVS, I'd tell you to just follow the instructions on SF and pull a fresh
source tree like so:

export CVS_RSH=ssh
cvs -z3 -d:ext:timwi@cvs.sourceforge.net:/cvsroot/wikipedia co phase3

I don't know how to set up WinCVS for this, as I've never used it. I
think Tarquin has used it....?

-- brion vibber (brion @ pobox.com)
Re: Re: Problem with installation [ In reply to ]
Timwi wrote:

> Just now I caught another minute the CVS server was working, so I tried,
> and I received the same error as before (WinCVS 1.3.8.1):
>
> cvs login
> Logging in to
> :pserver:Timwi@cvs.wikipedia.sourceforge.net:2401/cvsroot/wikipedia
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Use the right cvs server. See other mail from me.

--
Smurf

smurf@AdamAnt.mud.de
------------------------- Anthill inside! ---------------------------