php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35522 argv and argc not defined
Submitted: 2005-12-02 16:34 UTC Modified: 2005-12-02 16:36 UTC
From: niam dot niam at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.1.1 OS: FreeBsd 6.0
Private report: No CVE-ID: None
 [2005-12-02 16:34 UTC] niam dot niam at gmail dot com
Description:
------------
argv and argc not defined through script is called from inetd

Reproduce code:
---------------
#!/bin/php
<?php

if (count($argv) > 0 )
{
	echo $argv[1];
}
else
{
	echo "no servers";
}
?>

Expected result:
----------------
serv1

Actual result:
--------------
no servers

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-02 16:36 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

use $_SERVER['argv'] and $_SERVER['argc']
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Dec 05 01:00:02 2025 UTC