php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11681 implode ($argv) leads to error
Submitted: 2001-06-25 21:22 UTC Modified: 2001-06-26 06:15 UTC
From: marotiere at online dot fr Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.0.6 OS: linux
Private report: No CVE-ID: None
 [2001-06-25 21:22 UTC] marotiere at online dot fr
I don't know if it is PHP3 ? 4 ? Linux ? apache  ?
I just know that, after working 1 year and half, this X?#:! hoster has decided to upgrade his hardware ...
6 months of works spoiled !!!

Anyway... This is the Problem
To avoid these "ugly" and long arguments like:
http://www.mysite.com/index.php?id=12345,
we have adopted a shorter:
http://www.mysite.com/index.php?12345

Begining the "index.php" page, just a simple code:

$what=implode(" ",$argv);
if ($what) {$id=$what;}

And the life can continue ...

And it has continued 1 year and half !
Till today ... after his x%#! change, 
The system anwers: Bad Arguments to implode ...

Difficult to contact all my (6000) clients to tell them to modify the link...

Thanks for your help



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-26 06:15 UTC] zak@php.net
Relax - it is very unlikely that your work is spoiled. :)

Chances are good that this problem is due to a change in the php.ini file.

Try adding ini_set ('register_argc_argv', 1); at the top of one of your files that uses the 'short' arguments.

Does it work now? If so, good - then a setting only needs to be changed in the php.ini file. register_argc_argv will need to be set to On.

Also this is unlikely to be a bug. PHP has many configure options - it is easy to break things without meaning to if the various options are not understood.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jan 27 20:01:24 2021 UTC