473,511 Members | 16,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP and Apache confi problem

Hi everybody,
I think my confi has some problems. Can you guys help me to see what is going on?

i install Apache2.0.48 and Php4.3.4 in WinXP.
I add some codes in httpd(inside apache group/apache2)

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

# For PHP 4 do something like this:
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php

In addition, I put the php.ini file in Windows, put
php4ts.dll in system32. Anything else?
When I run apache and write some php code, I cannot
pass agrument between two php files. Do you guys have any idea?
Thanks.

Krista
Jul 17 '05 #1
4 3790
"Krista" <yw*****@hotmail.com> wrote in message
news:eb*************************@posting.google.co m...
Hi everybody,
I think my confi has some problems. Can you guys help me to see what is going on?
i install Apache2.0.48 and Php4.3.4 in WinXP.
I add some codes in httpd(inside apache group/apache2)

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

# For PHP 4 do something like this:
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php

In addition, I put the php.ini file in Windows, put
php4ts.dll in system32. Anything else?
When I run apache and write some php code, I cannot
pass agrument between two php files. Do you guys have any idea?
Thanks.

Krista


page1 sends:

www.mysite.com/page2.php?var1="something"&var2="somethingelse"

page2 reads:

$var1 = $_GET["var1"]; // or $_PUT[]
$var2 = $_GET["var2"]; // or $_PUT[]

or just use $_GET[] or $_PUT[] throughout your script
Jul 17 '05 #2
"SwissCheese" <Sw*********@cfl.rr.com> wrote in message news:<ai*******************@twister.tampabay.rr.co m>...
"Krista" <yw*****@hotmail.com> wrote in message
news:eb*************************@posting.google.co m...
Hi everybody,
I think my confi has some problems. Can you guys help me to see what is

going on?

i install Apache2.0.48 and Php4.3.4 in WinXP.
I add some codes in httpd(inside apache group/apache2)

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

# For PHP 4 do something like this:
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php

In addition, I put the php.ini file in Windows, put
php4ts.dll in system32. Anything else?
When I run apache and write some php code, I cannot
pass agrument between two php files. Do you guys have any idea?
Thanks.

Krista


page1 sends:

www.mysite.com/page2.php?var1="something"&var2="somethingelse"

page2 reads:

$var1 = $_GET["var1"]; // or $_PUT[]
$var2 = $_GET["var2"]; // or $_PUT[]

or just use $_GET[] or $_PUT[] throughout your script


I don't understand. For example, my script is to ask a user to enter
his/her name and click enter button. The following page should print
the user's name. However, I don't know why I cannot pass the name in
next page. Is it the config problem?
Jul 17 '05 #3
"SwissCheese" <Sw*********@cfl.rr.com> wrote in message news:<ai*******************@twister.tampabay.rr.co m>...
"Krista" <yw*****@hotmail.com> wrote in message
news:eb*************************@posting.google.co m...
Hi everybody,
I think my confi has some problems. Can you guys help me to see what is

going on?

i install Apache2.0.48 and Php4.3.4 in WinXP.
I add some codes in httpd(inside apache group/apache2)

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

# For PHP 4 do something like this:
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php

In addition, I put the php.ini file in Windows, put
php4ts.dll in system32. Anything else?
When I run apache and write some php code, I cannot
pass agrument between two php files. Do you guys have any idea?
Thanks.

Krista


page1 sends:

www.mysite.com/page2.php?var1="something"&var2="somethingelse"

page2 reads:

$var1 = $_GET["var1"]; // or $_PUT[]
$var2 = $_GET["var2"]; // or $_PUT[]

or just use $_GET[] or $_PUT[] throughout your script


Hi ,
I create two files.

testing.php:

<html>
<head><title>testing</title></head>
<body>
<form action = "testing1.php" method="get">
Enter our name:
<input type = "text" name="userName">
<input type ="submit" name="submit" value="Submit Now">
</form>
</body>
</html>

testing1.php:
<html>
<head><title>testing1</title></head>
<body>
<?php
print "Thanks $userName";
?>
</body>
</html>

However, I cannot show the name in testing1.php. Do you guys have any idea?
Jul 17 '05 #4
"Krista" <yw*****@hotmail.com> wrote in message
news:eb**************************@posting.google.c om...
"SwissCheese" <Sw*********@cfl.rr.com> wrote in message

news:<ai*******************@twister.tampabay.rr.co m>...
"Krista" <yw*****@hotmail.com> wrote in message
news:eb*************************@posting.google.co m...
Hi everybody,
I think my confi has some problems. Can you guys help me to see what
is going on?

i install Apache2.0.48 and Php4.3.4 in WinXP.
I add some codes in httpd(inside apache group/apache2)

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

# For PHP 4 do something like this:
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php

In addition, I put the php.ini file in Windows, put
php4ts.dll in system32. Anything else?
When I run apache and write some php code, I cannot
pass agrument between two php files. Do you guys have any idea?
Thanks.

Krista


page1 sends:

www.mysite.com/page2.php?var1="something"&var2="somethingelse"

page2 reads:

$var1 = $_GET["var1"]; // or $_PUT[]
$var2 = $_GET["var2"]; // or $_PUT[]

or just use $_GET[] or $_PUT[] throughout your script


Hi ,
I create two files.

testing.php:

<html>
<head><title>testing</title></head>
<body>
<form action = "testing1.php" method="get">
Enter our name:
<input type = "text" name="userName">
<input type ="submit" name="submit" value="Submit Now">
</form>
</body>
</html>

testing1.php:
<html>
<head><title>testing1</title></head>
<body>
<?php
print "Thanks $userName";
?>
</body>
</html>

However, I cannot show the name in testing1.php. Do you guys have any

idea?

You have declared this to be a 'GET' operation:
<form action = "testing1.php" method="get">

So, you need to refer to the incoming variable like this:
$HTTP_GET_VARS['id'] (Before PHP 4.1.0)
$_GET['id'] (PHP 4.1.0 and later)
or
$_REQUEST['id'] (PHP 4.1.0 and later).

In your case, that would be:
print "Thanks " . $_GET['userName'];
From the manual page
http://www.php.net/manual/en/languag....external.php:

Example 3.8. A simple HTML form
<form action="foo.php" method="POST">
Name: <input type="text" name="username"><br>
Email: <input type="text" name="email"><br>
<input type="submit" name="submit" value="Submit me!">
</form>
Depending on your particular setup and personal preferences, there are many
ways to access data from your HTML forms. Some examples are:

Example 3.9. Accessing data from a simple POST HTML form
<?php
// Available since PHP 4.1.0

print $_POST['username'];
print $_REQUEST['username'];

import_request_variables('p', 'p_');
print $p_username;

// Available since PHP 3. As of PHP 5.0.0, these long predefined
// variables can be disabled with the register_long_arrays directive.

print $HTTP_POST_VARS['username'];

// Available if the PHP directive register_globals = on. As of
// PHP 4.2.0 the default value of register_globals = off.
// Using/relying on this method is not preferred.

print $username;
?>
Using a GET form is similar except you'll use the appropriate GET predefined
variable instead. GET also applies to the QUERY_STRING (the information
after the '?' in an URL). So, for example,
http://www.example.com/test.php?id=3 contains GET data which is accessible
with $_GET['id']. See also $_REQUEST and import_request_variables().

HTH

Doug

Jul 17 '05 #5

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

Similar topics

1
6900
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
1
2757
by: neha | last post by:
hi, i m trying to integrate python with apache on linux.For this i m using mod_python. I dont see any problem with the versions of python,apache and mod_python i m using. the versions i m using...
4
1461
by: Dr. Paul Caesar - CoullByte (UK) Limited | last post by:
We have a contact us page that is used throughout our sites. I have over the last few days modified all sites to obtain information from Application Settings. It is a simple form that when ran...
19
5210
by: Alex Madon | last post by:
Hello, I am testing a web application (using the DBX PHP function to call a Postgresql backend). I have 375Mb RAM on my test home box. I ran ab (apache benchmark) to test the behaviour of the...
3
5134
by: madunix | last post by:
My Server is suffering bad lag (High Utlization) I am running on that server Oracle10g with apache_1.3.35/ php-4.4.2 Web visitors retrieve data from the web by php calls through oci cobnnection...
0
3767
by: zhenya.tkachenko | last post by:
Hi! Have a problem with mod_auth_mysql. Compilation and installation of module done ok: # /usr/local/apache/bin/apxs -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz...
9
13674
by: davids58 | last post by:
I installed Apache 2.2.3 per the instructions in the book I'm reading 'AJAX and PHP' by Darie et al. After installation, I confirmed that the server was working. I then installed MySQL and PHP....
5
3089
by: m.banaouas | last post by:
Hi, bonjour, witch versions are suitable to use for apache & mod_python ? Can i install and use "Apache 2.2.3" & "mod_python 3.2.10" (most recent versions) without facing any known major...
0
3397
rsrinivasan
by: rsrinivasan | last post by:
Hi All, When i run my JSP program, ihave the following exception. How i solve this problem? HTTP Status 500 - ...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7353
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,...
0
7418
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...
1
7075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7508
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5662
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.