473,386 Members | 1,654 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,386 software developers and data experts.

Sorry..try this one...phpinfo and PHP predefined constants do NOT match!

Sorry for previous email...hit the wrong key!

Original Email:

I ran the following code:
<?php
$a=get_defined_constants();
foreach($a as $key=>$value){
echo "$key = $value<br/>";
}
?>

and got the following as part of my output:
......
PHP_EXTENSION_DIR = C:\php5
PHP_PREFIX = C:\php5
PHP_BINDIR = C:\php5
PHP_LIBDIR = C:\php5
PHP_DATADIR = C:\php5
PHP_SYSCONFDIR = C:\php5
PHP_LOCALSTATEDIR = C:\php5

But I don't HAVE a "C:\php5" folder. I have everything in a folder called
"C:\PHP"...and when I run phpinfo() it lists the "C:\PHP\..." folder names
for 'includes', 'extensions', etc.

This tells me that you can't depend on the predefined constants.

????????????????

Larry Woods
Aug 30 '05 #1
1 2132
lwoods wrote:
Sorry for previous email...hit the wrong key!

Original Email:

I ran the following code:
<?php
$a=get_defined_constants();
foreach($a as $key=>$value){
echo "$key = $value<br/>";
}
?>

and got the following as part of my output:
.....
PHP_EXTENSION_DIR = C:\php5
PHP_PREFIX = C:\php5
PHP_BINDIR = C:\php5
PHP_LIBDIR = C:\php5
PHP_DATADIR = C:\php5
PHP_SYSCONFDIR = C:\php5
PHP_LOCALSTATEDIR = C:\php5

But I don't HAVE a "C:\php5" folder. I have everything in a folder called
"C:\PHP"...and when I run phpinfo() it lists the "C:\PHP\..." folder names
for 'includes', 'extensions', etc.

This tells me that you can't depend on the predefined constants.


Better report it to the PHP dev team via bugs.php.net and update the
status here.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Sep 4 '05 #2

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

Similar topics

3
by: Shawn Wilson | last post by:
Hi, My host keeps messing things up and not telling me. I am trying to write a cron job that will test to make sure the "unusual" functions I use work and, if not, email me. I want it to send...
2
by: ChronoFish | last post by:
Hello, From my understanding, setting the ini value "html_errors" is supposed to force the output from phpinfo to be either plain text or HTML. I have setup two files. One is executes as CGI,...
34
by: newsposter0123 | last post by:
The code block below initialized a r/w variable (usually .bss) to the value of pi. One, of many, problem is any linked compilation unit may change the global variable. Adjusting // rodata const...
2
by: merkury1 | last post by:
Does C# have any predefined preprocessor constants like the C/C++ compiler does? In C++ you had such predefined constants as: __cplusplus, _DEBUG, _WIN32, MSC_VER. Are there any such things for...
0
by: Paul H | last post by:
I am an XML virgin but I have had a couple of enquiries from people asking if I could export Access data to XML but strictly adhering to a predefined schema. How would I do this? I presume I...
10
by: Paul | last post by:
Hi all, All of the classes in my DAL are static, with constants defining the stored procedures and parameters. I've been having some problems with my site which makes me wonder if there's a...
1
by: Sagaert Johan | last post by:
Hi Is there a constant i could use to force conditional compilation based on whether i compile for CF or the Full NET framework ? Johan
1
by: Noah | last post by:
I'm trying to match against Event.type for KeyPress and ButtonPress. Currently I'm using integer constants (2 and 4). Are these constants defined anywhere? The docs talk about KeyPress and...
2
by: =?windows-1252?Q?=22=C1lvaro_G=2E_Vicario=22?= | last post by:
Is there any way to tell PHP predefined variables ($GLOBALS, $argv, $argc, $_GET, $_POST…) from *global* user-defined variables? Neither $GLOBALS nor get_defined_vars() put user data apart. I’m...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.