473,387 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

PHP 4.3.8: $_SERVER[’argv’] missing

PHP 4.3.8: $_SERVER[’argv’] does not return any values. Did not change
anything in php.ini.

Any ideas. Running from command line (CLI), Win Apache.
...Also tried to enable $argc, $argv parameters directly (via php.ini)
with no success either.

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-_SERVER-...ict154684.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=517787
Jul 17 '05 #1
2 3532
steve wrote:
PHP 4.3.8: $_SERVER[’argv’] does not return any values. Did not change
anything in php.ini.

Any ideas. Running from command line (CLI), Win Apache.
..Also tried to enable $argc, $argv parameters directly (via php.ini)
with no success either.


do not use the $_SERVER on CLI as this will not be filled like when you
use a webserver.

just use $argv[1] .. $argv[2] .. and so on.

you should also consider taking a look at you string delimiters. the
correct way to note an array variable is not with backticks but:
$_SERVER['var'] or $_SERVER["var"]

regards
sh

--
"The goal of Computer Science is to build something that will last at
least until we've finished building it." -- unknown
Jul 17 '05 #2
"Stefan Hegenbart" wrote:
steve wrote:
PHP 4.3.8: $_SERVER[’argv’] does not return any values. Did

not change
anything in php.ini.

Any ideas. Running from command line (CLI), Win Apache.
..Also tried to enable $argc, $argv parameters directly (via

php.ini)
with no success either.


do not use the $_SERVER on CLI as this will not be filled like
when you
use a webserver.

just use $argv[1] .. $argv[2] .. and so on.

you should also consider taking a look at you string
delimiters. the
correct way to note an array variable is not with backticks
but:
$_SERVER['var'] or $_SERVER["var"]

regards
sh

--
"The goal of Computer Science is to build something that will
last at
least until we've finished building it." -- unknown


Thanks, Stefan. But no go.

I try:
print_r ($argv);
from cli and it does not work.

I could do $_SERVER.... in previous versions (although as you said it
should not have worked but it did).

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-_SERVER-...ict154684.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=519203
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob | last post by:
Hello all, I'm attempting to use JpGraph (http://www.aditus.nu/jpgraph/index.php) with PHP (4.3.1) and Apache (1.3.26) runnning on WindowsXP. However, I receive the following notice: Notice:...
2
by: chops | last post by:
I need the path of the script that is running. Unfortunately it is not in the $_SERVER array when running a script through the CLI. Through a browser I can strip the script name off, e.g...
3
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
9
by: deko | last post by:
I have a page that I don't want anyone to be able to link directly to. The page should only be accessed from gatepage.php. I tried this code, but keep getting errors - "header info already sent",...
13
by: deko | last post by:
I'm trying to identify which named anchor is currently being viewed on a page. Although the address bar of my browser shows #whatever appended to the end of the url, I can't seem to find it in a...
1
by: | last post by:
In my PHP, argv always return correct value. In a remote server, PHP returns for argv always null. I believe this is a "php.ini" problem but from PHP help I don't found anything. 1. What is the...
6
by: user | last post by:
when i first load index.php with arguments ie: "index.php?page=x", the $_SERVERvalue is null. I then get the session id appended to each link. If i refresh the page, I get the $_SERVER I want, but...
10
by: tHatDudeUK | last post by:
My form action code to submit values to itself have stopped working using the code form action = <?=$_SERVER?> This code used to work My web host recently told me they enabled phpsuexec...
2
by: Daniel Mercier | last post by:
Hi, I'm new to mysql and just installed phpmyadmin. Here is the versions info: System Linux linlyne.spider.sense 2.4.22-1.2199.nptl #1 PHP Version 4.3.8
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.