473,606 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTTP 403

I have finally managed to get Apache 2.2.4, PHP 5.2.0 and MySQL to talk to
each other. Everything seems to work OK when dealing with databases but as
soon as I use a php-script that use $_server the browser will throw me away
and give me HTTP 403.

It has worked before but that was before I got the communication to work
with MySQL

Any ideas or solutions are very much appreciated.

/Lennart
Feb 8 '07 #1
20 4059
On Feb 8, 3:59 am, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
I have finally managed to get Apache 2.2.4, PHP 5.2.0 and MySQL to talk to
each other. Everything seems to work OK when dealing with databases but as
soon as I use a php-script that use $_server the browser will throw me away
and give me HTTP 403.

It has worked before but that was before I got the communication to work
with MySQL

Any ideas or solutions are very much appreciated.

/Lennart
---------------------
I see no reason for this.
if you are using $_server then use $_SERVER['key'];

Feb 10 '07 #2

"Satya" <sa********@gma il.comskrev i meddelandet
news:11******** **************@ h3g2000cwc.goog legroups.com...
On Feb 8, 3:59 am, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
>I have finally managed to get Apache 2.2.4, PHP 5.2.0 and MySQL to talk
to
each other. Everything seems to work OK when dealing with databases but
as
soon as I use a php-script that use $_server the browser will throw me
away
and give me HTTP 403.

It has worked before but that was before I got the communication to work
with MySQL

Any ideas or solutions are very much appreciated.

/Lennart

---------------------
I see no reason for this.
if you are using $_server then use $_SERVER['key'];
Thats is exactly how I'm doing. Still the browser will through me away and
denies to show the page, just saying HTTP 403.
/Lennart
Feb 12 '07 #3
On 12 Feb, 15:06, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
"Satya" <satya61...@gma il.comskrev i meddelandetnews :11************ **********@h3g2 000cwc.googlegr oups.com...
On Feb 8, 3:59 am, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
I have finally managed to get Apache 2.2.4, PHP 5.2.0 and MySQL to talk
to
each other. Everything seems to work OK when dealing with databases but
as
soon as I use a php-script that use $_server the browser will throw me
away
and give me HTTP 403.
It has worked before but that was before I got the communication to work
with MySQL
Any ideas or solutions are very much appreciated.
/Lennart
---------------------
I see no reason for this.
if you are using $_server then use $_SERVER['key'];

Thats is exactly how I'm doing. Still the browser will through me away and
denies to show the page, just saying HTTP 403.
/Lennart- Hide quoted text -

- Show quoted text -
Care to share some of the code?

Feb 12 '07 #4

"Satya" <sa********@gma il.comskrev i meddelandet
news:11******** **************@ h3g2000cwc.goog legroups.com...
On Feb 8, 3:59 am, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
>I have finally managed to get Apache 2.2.4, PHP 5.2.0 and MySQL to talk
to
each other. Everything seems to work OK when dealing with databases but
as
soon as I use a php-script that use $_server the browser will throw me
away
and give me HTTP 403.

It has worked before but that was before I got the communication to work
with MySQL

Any ideas or solutions are very much appreciated.

/Lennart

---------------------
I see no reason for this.
if you are using $_server then use $_SERVER['key'];
This is exactly how I'm using it but still the browser refuse to show the
page but just say HTTP 403
/Lennart
Feb 12 '07 #5

"Captain Paralytic" <pa**********@y ahoo.comskrev i meddelandet
news:11******** *************@s 48g2000cws.goog legroups.com...
On 12 Feb, 15:06, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
>"Satya" <satya61...@gma il.comskrev i
meddelandetnew s:11*********** ***********@h3g 2000cwc.googleg roups.com...
On Feb 8, 3:59 am, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
I have finally managed to get Apache 2.2.4, PHP 5.2.0 and MySQL to
talk
to
each other. Everything seems to work OK when dealing with databases
but
as
soon as I use a php-script that use $_server the browser will throw me
away
and give me HTTP 403.
>It has worked before but that was before I got the communication to
work
with MySQL
>Any ideas or solutions are very much appreciated.
>/Lennart
---------------------
I see no reason for this.
if you are using $_server then use $_SERVER['key'];

Thats is exactly how I'm doing. Still the browser will through me away
and
denies to show the page, just saying HTTP 403.
/Lennart- Hide quoted text -

- Show quoted text -

Care to share some of the code?
This is the simple test code that causes the HTTP403
<form action="<?=$_SE RVER['PHP_SELF']?>" method="post">
Username: <input type="text" name="username" >
<br />
Password: <input type="password" name="password" >
<br /><br />
<input type="submit" name="submit" value="Sign Up">

/Lennart
Feb 12 '07 #6
On 12 Feb, 15:13, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
"Captain Paralytic" <paul_laut...@y ahoo.comskrev i meddelandetnews :11************ *********@s48g2 000cws.googlegr oups.com...
On 12 Feb, 15:06, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
"Satya" <satya61...@gma il.comskrev i
meddelandetnews :11************ **********@h3g2 000cwc.googlegr oups.com...
On Feb 8, 3:59 am, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
I have finally managed to get Apache 2.2.4, PHP 5.2.0 and MySQL to
talk
to
each other. Everything seems to work OK when dealing with databases
but
as
soon as I use a php-script that use $_server the browser will throw me
away
and give me HTTP 403.
It has worked before but that was before I got the communication to
work
with MySQL
Any ideas or solutions are very much appreciated.
/Lennart
---------------------
I see no reason for this.
if you are using $_server then use $_SERVER['key'];
Thats is exactly how I'm doing. Still the browser will through me away
and
denies to show the page, just saying HTTP 403.
/Lennart- Hide quoted text -
- Show quoted text -
Care to share some of the code?

This is the simple test code that causes the HTTP403
<form action="<?=$_SE RVER['PHP_SELF']?>" method="post">
Username: <input type="text" name="username" >
<br />
Password: <input type="password" name="password" >
<br /><br />
<input type="submit" name="submit" value="Sign Up">

/Lennart- Hide quoted text -

- Show quoted text -
OK, now when you say "I use a php script", when aer you considering it
to be used?
Do you get the form displayed but get the error when you press "Sign
Up" or do you not get the form displayed at all?

Feb 12 '07 #7

"Captain Paralytic" <pa**********@y ahoo.comskrev i meddelandet
news:11******** **************@ j27g2000cwj.goo glegroups.com.. .
On 12 Feb, 15:13, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
>"Captain Paralytic" <paul_laut...@y ahoo.comskrev i
meddelandetnew s:11*********** **********@s48g 2000cws.googleg roups.com...
On 12 Feb, 15:06, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
"Satya" <satya61...@gma il.comskrev i
meddelandetnew s:11*********** ***********@h3g 2000cwc.googleg roups.com...
On Feb 8, 3:59 am, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
I have finally managed to get Apache 2.2.4, PHP 5.2.0 and MySQL to
talk
to
each other. Everything seems to work OK when dealing with databases
but
as
soon as I use a php-script that use $_server the browser will throw
me
away
and give me HTTP 403.
>It has worked before but that was before I got the communication to
work
with MySQL
>Any ideas or solutions are very much appreciated.
>/Lennart
---------------------
I see no reason for this.
if you are using $_server then use $_SERVER['key'];
>Thats is exactly how I'm doing. Still the browser will through me away
and
denies to show the page, just saying HTTP 403.
/Lennart- Hide quoted text -
>- Show quoted text -
Care to share some of the code?

This is the simple test code that causes the HTTP403
<form action="<?=$_SE RVER['PHP_SELF']?>" method="post">
Username: <input type="text" name="username" >
<br />
Password: <input type="password" name="password" >
<br /><br />
<input type="submit" name="submit" value="Sign Up">

/Lennart- Hide quoted text -

- Show quoted text -

OK, now when you say "I use a php script", when aer you considering it
to be used?
Do you get the form displayed but get the error when you press "Sign
Up" or do you not get the form displayed at all?
When ran I get the page and give ensers to the two inputs.
The browser reacts with HTTP 403 when I press the submit-button
/Lennart
Feb 12 '07 #8
On 12 Feb, 15:41, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
"Captain Paralytic" <paul_laut...@y ahoo.comskrev i meddelandetnews :11************ **********@j27g 2000cwj.googleg roups.com...
On 12 Feb, 15:13, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
"Captain Paralytic" <paul_laut...@y ahoo.comskrev i
meddelandetnews :11************ *********@s48g2 000cws.googlegr oups.com...
On 12 Feb, 15:06, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
"Satya" <satya61...@gma il.comskrev i
meddelandetnews :11************ **********@h3g2 000cwc.googlegr oups.com...
On Feb 8, 3:59 am, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
I have finally managed to get Apache 2.2.4, PHP 5.2.0 and MySQL to
talk
to
each other. Everything seems to work OK when dealing with databases
but
as
soon as I use a php-script that use $_server the browser will throw
me
away
and give me HTTP 403.
It has worked before but that was before I got the communication to
work
with MySQL
Any ideas or solutions are very much appreciated.
/Lennart
---------------------
I see no reason for this.
if you are using $_server then use $_SERVER['key'];
Thats is exactly how I'm doing. Still the browser will through me away
and
denies to show the page, just saying HTTP 403.
/Lennart- Hide quoted text -
- Show quoted text -
Care to share some of the code?
This is the simple test code that causes the HTTP403
<form action="<?=$_SE RVER['PHP_SELF']?>" method="post">
Username: <input type="text" name="username" >
<br />
Password: <input type="password" name="password" >
<br /><br />
<input type="submit" name="submit" value="Sign Up">
/Lennart- Hide quoted text -
- Show quoted text -
OK, now when you say "I use a php script", when aer you considering it
to be used?
Do you get the form displayed but get the error when you press "Sign
Up" or do you not get the form displayed at all?

When ran I get the page and give ensers to the two inputs.
The browser reacts with HTTP 403 when I press the submit-button
/Lennart- Hide quoted text -

- Show quoted text -
OK, so what you said first was incorrect. You are using the script to
produce the form. So it is not the act of accessing $_SERVER per se
that is causing the 403. You are getting the 403 when you try to
submit the form to the "address" that is output by the original php
call.

To be honest, you don't really need that call for what you are doing.
By default the form will submit to the same address that is in the
address bar, so try coding the form as

<form action="" method="post">
Username: <input type="text" name="username" >
<br />
Password: <input type="password" name="password" >
<br /><br />
<input type="submit" name="submit" value="Sign Up">

and see what happens.

Feb 12 '07 #9

"Captain Paralytic" <pa**********@y ahoo.comskrev i meddelandet
news:11******** **************@ s48g2000cws.goo glegroups.com.. .
On 12 Feb, 15:41, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
>"Captain Paralytic" <paul_laut...@y ahoo.comskrev i
meddelandetnew s:11*********** ***********@j27 g2000cwj.google groups.com...
On 12 Feb, 15:13, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
"Captain Paralytic" <paul_laut...@y ahoo.comskrev i
meddelandetnew s:11*********** **********@s48g 2000cws.googleg roups.com...
On 12 Feb, 15:06, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
"Satya" <satya61...@gma il.comskrev i
meddelandetnew s:11*********** ***********@h3g 2000cwc.googleg roups.com...
On Feb 8, 3:59 am, "Lennart Anderson" <lennart.ander. ..@tele2.se>
wrote:
I have finally managed to get Apache 2.2.4, PHP 5.2.0 and MySQL
to
talk
to
each other. Everything seems to work OK when dealing with
databases
but
as
soon as I use a php-script that use $_server the browser will
throw
me
away
and give me HTTP 403.
>It has worked before but that was before I got the communication
to
work
with MySQL
>Any ideas or solutions are very much appreciated.
>/Lennart
---------------------
I see no reason for this.
if you are using $_server then use $_SERVER['key'];
>Thats is exactly how I'm doing. Still the browser will through me
away
and
denies to show the page, just saying HTTP 403.
/Lennart- Hide quoted text -
>- Show quoted text -
Care to share some of the code?
>This is the simple test code that causes the HTTP403
<form action="<?=$_SE RVER['PHP_SELF']?>" method="post">
Username: <input type="text" name="username" >
<br />
Password: <input type="password" name="password" >
<br /><br />
<input type="submit" name="submit" value="Sign Up">
>/Lennart- Hide quoted text -
>- Show quoted text -
OK, now when you say "I use a php script", when aer you considering it
to be used?
Do you get the form displayed but get the error when you press "Sign
Up" or do you not get the form displayed at all?

When ran I get the page and give ensers to the two inputs.
The browser reacts with HTTP 403 when I press the submit-button
/Lennart- Hide quoted text -

- Show quoted text -

OK, so what you said first was incorrect. You are using the script to
produce the form. So it is not the act of accessing $_SERVER per se
that is causing the 403. You are getting the 403 when you try to
submit the form to the "address" that is output by the original php
call.

To be honest, you don't really need that call for what you are doing.
By default the form will submit to the same address that is in the
address bar, so try coding the form as

<form action="" method="post">
Username: <input type="text" name="username" >
<br />
Password: <input type="password" name="password" >
<br /><br />
<input type="submit" name="submit" value="Sign Up">

and see what happens.
Thanks. I think I see what you mean but can I still use the keyed username
and password as variables and go furhter to for instance a database with
them. I admit I am a newbie but if you don't ask you don't get any answers.
/Lennart
Feb 12 '07 #10

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

Similar topics

7
9274
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. # No warranty express or implied for the accuracy, fitness to purpose
8
10633
by: turnit \(removethis\) | last post by:
I have a login form that uses the post method to carry the information to the next page. The form works just fine in ie6.0, but fails in mozilla and fails in ie5.2 on a mac. "HTTP/1.1 400 Bad Request" was the original error msg now that I reinstalled iislockdown and urscan I get "The parameter is incorrect." If I use the get method with this form it works just fine on everything. I can't say for certain but I think this problem started...
3
5397
by: ashesdesign | last post by:
Hi All, I am very new to php and even newer to XML. Can anyone please shed some light on how to post XML requests via HTTP. I have been searching high and low and have come across many examples and snippets, but none work nor make sense to me. Below is an example of what it is I need to send as a request and the typical example I should receive. I just don't know how to send the request!!! A Request
5
10384
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said they need to consume this web service using HTTP. The developer's IDE is Notepad. Yeah, weird I know. How is this done? I guess if I can get it to run ASP, IDE independant, that should make them happy. Any references you can point me to?
4
2471
by: Bob Badger | last post by:
Hi, Simple question (although I guess with a complicated answer). Is HTTP an async protocol? For instance, if I send a message to a c# webservice via http what is the protocol actually doing? Thanks in advance Steffan
1
4281
by: zpinhead | last post by:
I am unable to get my downloaded extension from pecl to link up with php properly. seems like the php.so I could not use pear install http. pear claimed the extension was already installed. that is certainly not true. I downloaded the http extension from pecl. cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/http
3
2139
by: webEater | last post by:
Hey, I am writing a file that reads in an external file in the web and prints it out including the response header of the http protocol. I do this to enable cross domain XMLHttpRequests. I implemented it via fsockopen, like this: <? $url = $_REQUEST; // take the param as $uri //... more ...
1
1933
by: rpjd | last post by:
I am completely new to this so please bear with me here. My project involves a webpage executing php scripts via an xmlhttprequest which queries a database and returns data to the webpage. This code below is working to a degree in IE7. As I have not yet parsed http.responseText, I am getting all the code in parts.php in the alert. My php script query creates two php arrays, one a single array and a two-dimensional array such as array. My...
1
2237
by: rpjd | last post by:
I am having a problem getting the http.status of an xmlhttprequest. The request readystate has come back as readystate 4, but then it stops without confirming the http.status. Any help appreciated. <script type="text/javascript" > var postring = "?"; function string() { var first = document.numbers.first.value; var second = document.numbers.second.value; var third = document.numbers.third.value;
16
2301
by: Harry Simpson | last post by:
I've been away from ASPNET - I open up a new Web app in VS2008 and go into properties and select to use IIS instead of the personal web server. Then I run in debug mode and it says I have to set the Debug= True in the Web.config which I do. Then try to run it again and it says I must enable integrated security which I do. I then try to run it again and get the HTTP 403 error - " This error (HTTP 403 Forbidden) means that Internet...
0
8009
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8432
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8428
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8299
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6753
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5962
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5456
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3919
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1548
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.