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

php MySQL works on remote server, only partially on local server

I am new at php and MySQL and have some (ugly, I'm sure) code to
populate form select fields with data from a MySQL database, so a user
can use those to sort/filter and view the 3,000 records. No inserts --
just selects; very simple.

I originally set this up using URL-based query strings at
http://stjuliana.org/school/ar/BUindex.php but since that only allowed
sorting and not filtering, hence all 3k records load, I made a form
verson at http://stjuliana.org/school/ar/index.php . Everything works
just fine, however, there's still a lot of tweaking I want to do, such
as splitting the form input and output into two pages (_blank), having
a printable version, etc. To that end I just set up the latest builds
of Apache, php and MySQL on my local Windows XP box, lest I blow my
beer budget for the month on bandwidth overage. <g>

I have a very simple page I used to test my localhost setup and
everything's fine. I can connect to MySQL, create, insert and select
from DBs, so I know my config is fine. All my other .php pages on this
site work fine locally as well.

The two abovementioned pages, however, are giving me fits when run
locally...

For the URL-query-string version, it loads up with the default view
(=name_ns), which grabs all records and sorts by name and point asc.
No matter which of the other sort 'views' I might choose, it still
loads up all the records in that default sort. The server's holding on
to something and I don't know how to clear it. The remote version
correctly sorts based on the query string chosen.

The form version is worse. It connects to the DB and populates the
select boxes with the field data -- that part's fine. But no matter
which submit button is selected, no data is retrieved. I get no error,
but no data either. The form's action is set to $_SERVER['PHP_SELF']
and I've tried both GET and POST -- no change.

Since the exact same pages work on the remote server I know it has to
be something on the local setup. But where do I look if there's no
obvious error?

This is probably something incredibly basic but I'm bleary-eyed from
reading tutorials and forums all over the Internet and can't come up
with anything.

TIA
Hera
Jul 17 '05 #1
2 2264
I noticed that Message-ID: <jt********************************@4ax.com>
from hera contained the following:
Since the exact same pages work on the remote server I know it has to
be something on the local setup. But where do I look if there's no
obvious error?


This is most likely a register globals issue. If you are passing the
sort criteria to the script via a form you need to make sure you
retrieve them via the $_POST array

Try echoing your SQL to the screen to see what you are actually
searching for.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2
Thank you so much - that was indeed the answer and now I can test to
my heart's content locally.

The comments in php.ini indicate that turning register_globals on is a
security risk and my host obviously has this setting on or the script
wouldn't have worked remotely. Ergo, I've not done a good job with my
script in that I should get it to work with register_globals off, so
it's more secure.

Thanks again,
Hera
On Sat, 06 Nov 2004 08:25:04 +0000, Geoff Berrow
<bl******@ckdog.co.uk> wrote:
This is most likely a register globals issue.

Jul 17 '05 #3

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

Similar topics

11
by: Mike MacSween | last post by:
My client has an MS Access database application on her local machine. I have full access to that in terms of changing the design. I've got a simple PHP/MySql application on shared hosting, so no...
0
by: Lenz Grimmer | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, MySQL 4.0.14, a new version of the popular Open Source/Free Software Database, has been released. It is now available in source and binary...
4
by: Ian Davies | last post by:
Hello all The following code allows me to connect to a local MySQL database on my pc from a VB6 project. **************************************************************************** ** Dim...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
3
by: apostolosl | last post by:
Hi there. I need to update a remote database from a local one. I use mysqldump in my php page in order to create a file for each table, like this: $command="mysqldump table_products >...
4
by: Jerim | last post by:
I have a script on one server, trying to access the MySQL database on another server. The server with the script is on an outside network, hosted with another company. The MySQL server is here in...
11
by: Robin S. | last post by:
I've used phpinfo() to confirm settings for mySQL on our host server, and it's not returning accurate info. phpinfo() returns a mySQL client API version of 3.23.54 (uselss for me), where as a...
3
by: ist | last post by:
Hi, I am trying to get (and transfer over ASP.NET) some encrypted data from some MySQL fields. Since the data contains many unicode characters, I tried to get the data as a series of ASCII...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.