Could it be XAMPP causing phpinfo() not to show?

Hi there

Ive written my first form, with 2 files which did not show predefined variables in php…

.html - my form and
.php - my phpinfo()

I have setup xampp and both the files are located in C drive, in xampp. I have not found a solution to the variables not showing when the form is “executed” and therefore I have added my xampp php information in the hope of someone seeing if there is something wrong with my xampp or how to fix it.

Can someone please advise…

PHP Version 5.3.1

System Windows NT CHAVONNE-PC 6.1 build 7600 ((null)) i586
Build Date Nov 20 2009 17:20:57
Compiler MSVC6 (Visual C++ 6.0)
Architecture x86
Configure Command cscript /nologo configure.js “–enable-snapshot-build”
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path no value
Loaded Configuration File C:\xampp\php\php.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
PHP API 20090626
PHP Extension 20090626
Zend Extension 220090626
Zend Extension Build API220090626,TS,VC6
PHP Extension Build API20090626,TS,VC6
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
Zend Multibyte Support disabled
IPv6 Support enabled
Registered PHP Streams https, ftps, php, file, glob, data, http, ftp, compress.zlib, compress.bzip2, phar, zip
Registered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tls
Registered Stream Filters convert.iconv., string.rot13, string.toupper, string.tolower, string.strip_tags, convert., consumed, dechunk, zlib., bzip2.

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright © 1998-2009 Zend Technologies

PHP Credits
Configuration

apache2handler
Apache Version Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1
Apache API Version 20051115
Server Administrator postmaster@localhost
Hostname:Port localhost:80
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 5
Virtual Server No
Server Root C:/xampp/apache
Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_actions mod_alias mod_asis mod_auth_basic mod_auth_digest mod_authn_default mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_cgi mod_dav mod_dav_fs mod_dav_lock mod_dir mod_env mod_headers mod_include mod_info mod_isapi mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_ssl mod_status mod_autoindex_color mod_php5 mod_perl mod_apreq2

Directive Local Value Master Value
engine 1 1
last_modified 0 0
xbithack 0 0

Apache Environment
Variable Value
MIBDIRS C:/xampp/php/extras/mibs
MYSQL_HOME C:\xampp\mysql\bin
OPENSSL_CONF C:/xampp/apache/bin/openssl.cnf
PHP_PEAR_SYSCONF_DIR C:\xampp\php
PHPRC C:\xampp\php
TMP C:\xampp\tmp
HTTP_HOST localhost
HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 GTB7.1
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
HTTP_ACCEPT_LANGUAGE en-gb,en;q=0.5
HTTP_ACCEPT_ENCODING gzip,deflate
HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_KEEP_ALIVE 115
HTTP_CONNECTION keep-alive
HTTP_REFERER http://localhost/xampp/navi.php
HTTP_COOKIE ja_rave_new_tpl=ja_rave_new; ja_droid_tpl=ja_droid; ja_purity_tpl=ja_purity
PATH C:\Program Files\PC Connectivity Solution;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;c:\Program Files\Common Files\Roxio Shared\10.0\DLLShared;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\WIDCOMM\Bluetooth Software;C:\Program Files\Broadcom\Broadcom 802.11\Driver;C:\Program Files\jZip;C:\Program Files\QuickTime\QTSystem;
SystemRoot C:\windows
COMSPEC C:\windows\system32\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR C:\windows
SERVER_SIGNATURE Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 Server at localhost Port 80
SERVER_SOFTWARE Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1
SERVER_NAME localhost
SERVER_ADDR ::1
SERVER_PORT 80
REMOTE_ADDR ::1
DOCUMENT_ROOT C:/xampp/htdocs
SERVER_ADMIN postmaster@localhost
SCRIPT_FILENAME C:/xampp/htdocs/xampp/phpinfo.php
REMOTE_PORT 50295
REMOTE_USER admin
AUTH_TYPE Basic
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /xampp/phpinfo.php
SCRIPT_NAME /xampp/phpinfo.php

PHP Variables
Variable Value
_REQUEST[“ja_rave_new_tpl”] ja_rave_new
_REQUEST[“ja_droid_tpl”] ja_droid
_REQUEST[“ja_purity_tpl”] ja_purity
_COOKIE[“ja_rave_new_tpl”] ja_rave_new
_COOKIE[“ja_droid_tpl”] ja_droid
_COOKIE[“ja_purity_tpl”] ja_purity
_SERVER[“MIBDIRS”] C:/xampp/php/extras/mibs
_SERVER[“MYSQL_HOME”] C:\xampp\mysql\bin
_SERVER[“OPENSSL_CONF”] C:/xampp/apache/bin/openssl.cnf
_SERVER[“PHP_PEAR_SYSCONF_DIR”] C:\xampp\php
_SERVER[“PHPRC”] C:\xampp\php
_SERVER[“TMP”] C:\xampp\tmp
_SERVER[“HTTP_HOST”] localhost
_SERVER[“HTTP_USER_AGENT”] Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 GTB7.1
_SERVER[“HTTP_ACCEPT”] text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
_SERVER[“HTTP_ACCEPT_LANGUAGE”] en-gb,en;q=0.5
_SERVER[“HTTP_ACCEPT_ENCODING”] gzip,deflate
_SERVER[“HTTP_ACCEPT_CHARSET”] ISO-8859-1,utf-8;q=0.7,*;q=0.7
_SERVER[“HTTP_KEEP_ALIVE”] 115
_SERVER[“HTTP_CONNECTION”] keep-alive
_SERVER[“HTTP_REFERER”] http://localhost/xampp/navi.php
_SERVER[“HTTP_COOKIE”] ja_rave_new_tpl=ja_rave_new; ja_droid_tpl=ja_droid; ja_purity_tpl=ja_purity
_SERVER[“PATH”] C:\Program Files\PC Connectivity Solution;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;c:\Program Files\Common Files\Roxio Shared\10.0\DLLShared;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\WIDCOMM\Bluetooth Software;C:\Program Files\Broadcom\Broadcom 802.11\Driver;C:\Program Files\jZip;C:\Program Files\QuickTime\QTSystem;
_SERVER[“SystemRoot”] C:\windows
_SERVER[“COMSPEC”] C:\windows\system32\cmd.exe
_SERVER[“PATHEXT”] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
_SERVER[“WINDIR”] C:\windows
_SERVER[“SERVER_SIGNATURE”] Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 Server at localhost Port 80
_SERVER[“SERVER_SOFTWARE”] Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1
_SERVER[“SERVER_NAME”] localhost
_SERVER[“SERVER_ADDR”] ::1
_SERVER[“SERVER_PORT”] 80
_SERVER[“REMOTE_ADDR”] ::1
_SERVER[“DOCUMENT_ROOT”] C:/xampp/htdocs
_SERVER[“SERVER_ADMIN”] postmaster@localhost
_SERVER[“SCRIPT_FILENAME”] C:/xampp/htdocs/xampp/phpinfo.php
_SERVER[“REMOTE_PORT”] 50295
_SERVER[“REMOTE_USER”] admin
_SERVER[“AUTH_TYPE”] Basic
_SERVER[“GATEWAY_INTERFACE”] CGI/1.1
_SERVER[“SERVER_PROTOCOL”] HTTP/1.1
_SERVER[“REQUEST_METHOD”] GET
_SERVER[“QUERY_STRING”] no value
_SERVER[“REQUEST_URI”] /xampp/phpinfo.php
_SERVER[“SCRIPT_NAME”] /xampp/phpinfo.php
_SERVER[“PHP_SELF”] /xampp/phpinfo.php
_SERVER[“PHP_AUTH_USER”] admin
_SERVER[“PHP_AUTH_PW”] spirtet
_SERVER[“REQUEST_TIME”] 1307204723
_SERVER[“argv”]

Array
(
)

_SERVER[“argc”] 0

Make sure your files are in htdocs

Hi , Im sure ive double checked that my files are in fact in htdocs, also my files:

My php file: 5-3-2.php has the following info:

<?php //File p-3-2.php phpinfo(); ?>

My html file:5-3-2.php is the form
(the syntax is correct)

Anyhow, I dont know how to view a error log for xampp, Im sure it is xampp that causing the problem, thats why im asking if anyone knows how I would check to see whats wrong with my php.

Could the information I pasted not tell you anything concerning my php info?

Thanks again

Have you set xampp to run apache as a service? I know I’ve had issues before with that.

Try running a simple php test.

[php]<?php
$test = ‘test’;
echo $test;
?>[/php]

Also check you are loading the page from http://localhost/subdirectory/index.php in your browser
Goto http://localhost/xampp/ in your browser and click status.

Hi thanks for this:

To be hosnest Ive built over a dozen websites on my localhost, and Apache runs perfectly - does this answer your question?
Concerning the test - it outputs perfectly to my browser with the ANSWER “TEST”

aLL MY FILES ARE IN XAMPP>HTDOCS>PHP

the status of xampp is all fine:
MySQL database ACTIVATED
PHP ACTIVATED
Perl with mod_perl ACTIVATED
Apache::ASP ACTIVATED
HTTPS (SSL) ACTIVATED
Common Gateway Interface (CGI) ACTIVATED
Server Side Includes (SSI) ACTIVATED
IPv4 ACTIVATED
IPv6 ACTIVATED
SMTP Service DEACTIVATED
FTP Service DEACTIVATED

What now?

So

[php]<?php
$test = ‘test’;
echo $test;
?>[/php]

Doesn’t output test ?

Can you post your code for the two files? Because it seems like xampp might not be the issue.

Hi

I said: it outputs test to the browser perfectly.That is not the problem…

My files are as follows:
p.3.2.php

<?php //File p-3-2.php phpinfo(); ?>


p.3.2.html

my first form

Fill out the form


Your name

Password box

Textarea


Enter your address here

Checkboxes

Breakfast

Lunch

<INPUT TYPE="Checkbox"NAME=“Supper” >Supper

Radiobuttons

French

Italian

Chinese

Select



Cheese

Salami

Red Pepper




</FORM

[code]

my first form

Fill out the form


Your name

Password box

Textarea


Enter your address here

Checkboxes

Breakfast

Lunch

<INPUT TYPE="Checkbox"NAME=“Supper” >Supper

Radiobuttons

French

Italian

Chinese

Select



Cheese

Salami

Red Pepper




</FORM
[/code]

Remember to end your input fields with /> so

In your p-3-2.php place
[php]<?php
//File p-3-2.php
$variable = $_POST[‘textbox’];
echo $variable;
?>[/php]

This outputs what ever is placed in the first textbox.
There isn’t anything wrong with xampp.

<?php //File p-3-2.php phpinfo(); ?>

Outputs your php info, it won’t process any data being sent.

I cant thank you enough…

What is making me really confused here is Im trying to learn php, in the book im doing these tutorials from (its php 4 by the way…but that shouldn’t really be a problem should it?) It clearly says to create these to files as I did and to view the php information, variables stuff… with the file:
p.3.2.php

<?php //File p-3-2.php phpinfo(); ?>

Now that you are telling me its not the way its done, it never is? Please can you ellaborate…how do I view the Whole Form’s information and or variables…

I did as you said, closed the /> fields, I also replaced the code with what you reccommended in p-3-2.php, it doesn’t work

Please advise… :’(

Not a problem.

I would not work from an old book like that. Some functions have been replaced.

Work from php.net and search for functions. It is a wonderful resource. Also google is great. If your trying to do something, you can bet that 500 other people have tried to do the same thing.

phpinfo() displays your php info. There is no need to use it on a public website.

So you post information from a form as action=post. This sends it to another page, or the same page for processing. You can access this information being sent with $_POST[‘fieldname’]; and do with it what you want. If its a number you can subtract from it, add it to database, send it to a function etc.

For getting information out of a URL use $_GET[‘name’]; for example.
index.php?page=profile&person=gary

echo $_GET[‘gary’]; will output gary.

What I was saying with the /> was that because input fields and image fields don’t have closing tags like link tags or tables, it is advised to end those tags with />

Eg.
echo (’’.$_GET[‘gary’].’’);
See how it closes the tag with

but an input tag <input name=“silly” value='banana">
Now this has no closing tag on it. You don’t use So for compliant code you end the tag with />
<input name=“silly” value='banana" />
You don’t do this with any closed tags. Also you don’t have to do this. The code will still work.

p.3.2.html
[php]

Username [/php]

p-3-2.php
[php]<?php
//File p-3-2.php
$variable = $_POST[‘username’];
echo $variable;
?>[/php]

Hope it makes sense.

Sponsor our Newsletter | Privacy Policy | Terms of Service