# README.PHP4-TO-PHP5-THIN-CHANGES

- Thread: https://externals.io/message/7156
- Original archive: https://news-web.php.net/php.internals/7156
- Started by Greg Beaver on 2004-01-17T18:55:15+00:00
- Messages: 9
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #7156 — Greg Beaver — 2004-01-17T18:55:15+00:00

URL: https://externals.io/message/7156#7156

Hi,

There is a bug in #6 of README.PHP4-TO-PHP5-THIN-CHANGES.  It should read:

6. Starting PHP 5.0.0 the T_ML_COMMENT constant is no longer defined by
    the ext/tokenizer extension. If error_reporting is set to `E_ALL` 
    notices will be produced. Instead of T_ML_COMMENT for /* */ the
    `T_COMMENT` constant is used, thus both // and /* */ are resolved as
    the `T_COMMENT` constant.

    However, a phpdoc-style comment /** */ will resolve as the new
    `T_DOC_COMMENT` constant.

In addition, I noticed that argv and argc don't appear to be registered 
in $_SERVER in the cli version any more - is this expected behavior?  If 
so, it should be added to THIN-CHANGES as well.  It does seem planned, 
since both $argv and $argc exist.

Thanks,
Greg

---

## #7157 — Daniel Convissor — 2004-01-17T19:15:10+00:00

URL: https://externals.io/message/7156#7157 · In reply to: #7156

> 
> In addition, I noticed that argv and argc don't appear to be registered 
> in $_SERVER in the cli version any more - is this expected behavior?

I reported this as a bug in November: http://bugs.php.net/bug.php?id=26206
It doesn't seem to be intentional.


> It does seem planned, since both $argv and $argc exist.

WOW!  That's a very interesting observation.

Thanks,

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

---

## #7158 — Stefan Walk — 2004-01-17T19:32:41+00:00

URL: https://externals.io/message/7156#7158 · In reply to: #7157

This has been discussed on internals before.
See http://www.zend.com/lists/php-dev/200310/msg00026.html and
follow-ups.

-- 
Regards,
Stefan Walk
<swalk@prp.physik.tu-darmstadt.de

---

## #7160 — Andrey Hristov — 2004-01-17T19:37:16+00:00

URL: https://externals.io/message/7156#7160 · In reply to: #7158

Hi,
Stefan Walk wrote:
> This has been discussed on internals before.
> See http://www.zend.com/lists/php-dev/200310/msg00026.html and
> follow-ups.
> 
Thanks for pointing out this discussion.

Andrey

---

## #7161 — Greg Beaver — 2004-01-17T20:08:32+00:00

URL: https://externals.io/message/7156#7161 · In reply to: #7160

Indeed, this was very helpful.

Perhaps the best path is to add Rasmus's words to THIN-CHANGES:

$_SERVER should be populated with argc and argv if variables_order
includes "S".  If you have specifically configured your system to not
create $_SERVER, then of course it shouldn't be there.  The change was to
always make argc and argv available in the CLI version regardless of the
variables_order setting.  As in, the CLI version will now always populate
the global $argc and $argv variables.

Greg

Andrey Hristov wrote:

> Hi,
> Stefan Walk wrote:
> 
> > […]
> Thanks for pointing out this discussion.
> 
> Andrey

---

## #7162 — Daniel Convissor — 2004-01-17T20:40:47+00:00

URL: https://externals.io/message/7156#7162 · In reply to: #7161

> 
> $_SERVER should be populated with argc and argv if variables_order
> includes "S".

Unfortunately, this isn't working on my system with the 
php5-win32-200401161930 snapshot.  Perhaps I'm misunderstanding something?

My variables_order has "GPCS" and register_argc_argv is "On" but 
$_SERVER['argv'] isn't there.

Test script:

<?php
echo "\$_SERVER\n";
var_dump($_SERVER);

echo "\n\$_SERVER['argv']\n";
var_dump($_SERVER['argv']);

echo "\n\$argv\n";
var_dump($argv);

echo 'register_argc_argv = ' . ini_get('register_argc_argv') . "\n";
echo 'variables_order = ' . ini_get('variables_order') . "\n";
?>


Regardless of the register_argc_argv and variables_order settings in the 
php.ini file, the following happens:
  $_SERVER            is filled with loads of stuff
  $_SERVER['argv']    is not set
  $argv               is set
  register_argc_argv  says 1

The right .ini file is being read, because changing variables_order shows 
up in the `ini_get()` output.

So, what am I forgetting?

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

---

## #7357 — Daniel Convissor — 2004-01-27T16:51:26+00:00

URL: https://externals.io/message/7156#7357 · In reply to: #7162

Greetings:

The following message got overlooked over the past few days.  It'd be 
really nice if someone could answer this please so PHP 5 will work...

Thanks!

----- Forwarded message -----

From: Daniel Convissor <danielc@analysisandsolutions.com>
To: PHP Internals List <internals@lists.php.net>
Date: Sat, 17 Jan 2004 15:40:47 -0500
Subject: Re: [PHP-DEV] README.PHP4-TO-PHP5-THIN-CHANGES


> 
> $_SERVER should be populated with argc and argv if variables_order
> includes "S".

Unfortunately, this isn't working on my system with the 
php5-win32-200401161930 snapshot.  Perhaps I'm misunderstanding something?

My variables_order has "GPCS" and register_argc_argv is "On" but 
$_SERVER['argv'] isn't there.

Test script:

<?php
echo "\$_SERVER\n";
var_dump($_SERVER);

echo "\n\$_SERVER['argv']\n";
var_dump($_SERVER['argv']);

echo "\n\$argv\n";
var_dump($argv);

echo 'register_argc_argv = ' . ini_get('register_argc_argv') . "\n";
echo 'variables_order = ' . ini_get('variables_order') . "\n";
?>


Regardless of the register_argc_argv and variables_order settings in the 
php.ini file, the following happens:
  $_SERVER            is filled with loads of stuff
  $_SERVER['argv']    is not set
  $argv               is set
  register_argc_argv  says 1

The right .ini file is being read, because changing variables_order shows 
up in the `ini_get()` output.

So, what am I forgetting?

--Dan

----- End forwarded message -----

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

---

## #7363 — Jani Taskinen — 2004-01-27T18:02:31+00:00

URL: https://externals.io/message/7156#7363 · In reply to: #7357

There's open bug about 'register_long_arrays', if it's
    'Off', some of the super-globals won't work.
    
    --Jani
    



>Greetings:
>
>The following message got overlooked over the past few days.  It'd be 
>really nice if someone could answer this please so PHP 5 will work...
>
>Thanks!
>
>----- Forwarded message -----
>
>From: Daniel Convissor <danielc@analysisandsolutions.com>
>To: PHP Internals List <internals@lists.php.net>
>Date: Sat, 17 Jan 2004 15:40:47 -0500
>Subject: Re: [PHP-DEV] README.PHP4-TO-PHP5-THIN-CHANGES
>
>
> > […]
>
>Unfortunately, this isn't working on my system with the 
>php5-win32-200401161930 snapshot.  Perhaps I'm misunderstanding something?
>
>My variables_order has "GPCS" and register_argc_argv is "On" but 
>$_SERVER['argv'] isn't there.
>
>Test script:
>
><?php
>echo "\$_SERVER\n";
>var_dump($_SERVER);
>
>echo "\n\$_SERVER['argv']\n";
>var_dump($_SERVER['argv']);
>
>echo "\n\$argv\n";
>var_dump($argv);
>
>echo 'register_argc_argv = ' . ini_get('register_argc_argv') . "\n";
>echo 'variables_order = ' . ini_get('variables_order') . "\n";
>?>
>
>
>Regardless of the register_argc_argv and variables_order settings in the 
>php.ini file, the following happens:
>  $_SERVER            is filled with loads of stuff
>  $_SERVER['argv']    is not set
>  $argv               is set
>  register_argc_argv  says 1
>
>The right .ini file is being read, because changing variables_order shows 
>up in the `ini_get()` output.
>
>So, what am I forgetting?
>
>--Dan
>
>----- End forwarded message

---

## #7364 — Daniel Convissor — 2004-01-27T18:17:08+00:00

URL: https://externals.io/message/7156#7364 · In reply to: #7363

> 
>     There's open bug about 'register_long_arrays', if it's
>     'Off', some of the super-globals won't work.

BINGO!  That's why $_SERVER['argv'] was unpopulated for me.

THANK YOU!  I'll update the bug reports.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409
