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
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)
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
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)
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
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:
- <em>line 1
<p> line 2</em> (incorrect HTML)
That would be bad. ;)
- ''line 1
<p> line 2'' (shows author what's wrong)
This is current behavior.
- 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.
- <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)
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
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
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)
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.
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:
- ''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
wikitech-l@lists.wikimedia.org