473,561 Members | 3,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

locally works/remotely breaks? (Oracle related?)


I'm diving into this crazy PHP thing, and I find myself a bit stuck.
Locally I can get a site to work very well. However, whenever I ask a
buddy of mine to test the site and I give him my IP it doesn't work.

I have a form. The form checks username/password against a database and
then either sends you back to the form or forwards you to the next
page. Is:

header("Locatio n: http://localhost/nextpage.php");

the proper form of redirection?

The issue on the not at my computer logins is in this redirect. I'm not
sure what I need to send, but I was getting connection errors in the
beginning which aren't showing up anymore. Then I was getting
unreferenced index errors, but I put all the variables in a session and
that seems to work now. And now I'm stumped because I'm not getting
errors in the log.

Thanks for any help in advance,

Melih Onvural

Jul 17 '05 #1
4 1398
me***********@g mail.com wrote:
[extrenal request redirects to:]
header("Locatio n: http://localhost/nextpage.php");

the proper form of redirection?

Well, Duh! localhost is the machine where the browser is running on.
Your friend connects to http://example.com/page.php and gets a redirect
to _his_ machine at http://localhost/nextpage.php.

The Q&D hack is to redirect to 'Location: nextpage.php', it violates the
HTTP rfc but in practice I have yet to see a browser that doesn't
redirect to the correct URL with this.

Better would be to redirect to "Location: http://{$_SERVER['HTTP_HOST']}/nextpage.php"
Jul 17 '05 #2
As a follow up, I'm getting that:


those lines are invalid indexes. I'm worried that the value isn't
carrying over. I have an index.html page which has a form that posts
and then a connection.php page that mines the data and makes a decision
to go forward or go back. Should I turn something on so that my POST
variables carry over?

Jul 17 '05 #3
me***********@g mail.com said the following on 01/07/2005 14:34:
As a follow up, I'm getting that:


those lines are invalid indexes. I'm worried that the value isn't
carrying over. I have an index.html page which has a form that posts
and then a connection.php page that mines the data and makes a decision
to go forward or go back. Should I turn something on so that my POST
variables carry over?

Carry over to where?

Without seeing a (minimal) example of the HTML and PHP that you're
using, it's difficult to tell what's going on.

Jul 17 '05 #4
don't worry dude. it's just the error reporting config.

change the error_reporting value to E_ERROR | E_WARNING | E_PARSE in
php.ini and restart your webserver :)

Jul 17 '05 #5

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

Similar topics

by: Newbie | last post by:
Hi, Could someone please tell how MINUS operator works for comparing and giving non-matching records in Table1? Does MINUS operator compares all records of Table1 with all records of Table2 to give differences? Say, i've got 2 tables - no keys defined on them. No PK and UK. Now MINUS operator will pick which columns for comparison? Having a...
by: ConTactMe | last post by:
I got this code off of javascriptsource.com, and it works like a charm locally. I can't get it to work on the server. I need some coffee. I don't _DRINK_ *coffee*! Can anyone check out the following link, and tell me why it doesn't work? Thanks. http://www.spvision.com/pubimages/DisneySnowGlobe/index.html
by: faktujaa | last post by:
Hi, I have created an application that uses IIS to host remote components. All the remote components are listed in app.config in client and web.config in server. Now the app.config can contain either localhost name/IP address to point to remote component like <wellknown type="XYZ, XYZ" url="http://localhost:80/XYZ" />. Remoting...
by: n00m | last post by:
import socket, thread host, port = '', 1434 s1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s2.connect((host, 1433)) s1.bind((host, port)) s1.listen(1) cn, addr = s1.accept() def VB_SCRIPT():
by: Raghu Rudra | last post by:
I have an ASP.NET web application, which accepts posted xml to do its work and returns response xml. This xml is large and is in the order of 1MB. I started testing this web app with client utility which spawns multiple threads to post xml to this web site. I noticed an interesting thing. When I kept the client utility and the web app on the...
by: Raterus | last post by:
Hi, I'm after this setup, and I'm just wondering if this is even feasible. I'd like to store my asp.net project remotely, on a network drive (all the project files, everything), But I want to be able to run the project on my local computer, off my local IIS server/asp.net configuration. Here is what I've done, I've set up an IIS virtual...
by: John | last post by:
Hi I have a very simply app with a single web form with a single button on it and has the following code; Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Response.Write("Hello world!") End Sub
by: rbenditt | last post by:
I've put together a simple script that uses the XMLHttpRequest() function. It works when I run it locally, but when I upload it to my web hosting account, I never get a response back. Here is what I have: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html lang="en"> <head> <script type="text/javascript"...
by: Alex | last post by:
Hello, I've written a Console application in VB 2005 which parses some files and stores the results in an MS SQL database. It runs beautifully locally, but as soon as I stick the compiled EXE on a network share and run it either via mapped drive or UNC it fails. Using a Try/Catch looking at Exceptions it shows the issue is SQL...
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...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
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. ...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
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...
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...
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...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.