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

Error 444 Script or Action Blocked

This is a new one for me, and I couldn't find anything about it online.
So after wasting 4 hours of rewrites, I'm afraid that I have to beg the
gurus for help!

This is a relatively simple script. It takes a variable from the
header, and compares it to a tab-delimited flat-text database. Once it
finds a match, it uses the other info in the database to show a dynamic
page.

For instance, go to:

http://www.wilkessmartstart.com/providers/

These are all in the order by which they are in the database. Scroll
down to "Diane Benesh Day Care Home," and click on the title to be
taken to a view.php page. This is where you'll see the error, but it
only happens with this one; all of the other names seem OK.

Has anyone seen this one before, or have any idea what it means?

TIA,

Jason
The only real PHP code in the script is as follows:

// if there's no variable, send them to the intro page
if (!$_GET['id']) header("Location: index.php?error=true");

else {
$found = FALSE;

// if a single quote was in the name, PHP placed a \ in front
//of it by default
$_GET['id'] = str_replace("\'", "'", $_GET['id']);
}

// get database info
$providers = FILE("$basepath/providers.xls");

foreach ($providers as $key) {

// get rid of the \n at the end
$key = rtrim($key);

// $more_junk is here for your benefit; there are really about
// 20 variables in the script
//
// I actually don't use /t in the script, I use a real tab. I wasn't
// sure if that would show up in the NG, though
list ($facility, $more_junk) = explode("/t", $key);

// if it's found, change the boolean and stop looking
if ($_GET['id'] === $facility) {
$found = TRUE;
break;
}
}
if ($found) {
// print HTML code
}

else header("Location: index.php?error=true");

May 1 '06 #1
5 2141
Jason wrote:
This is where you'll see the error

Try disabling SecurePHP.

My bet is that you're trying to access/write to a file that you should not
have permission to do so. What does $basepath equal?

Carl

--
Carl Vondrick
Web-Enginner
www.CarlSoft.net
To contact me, please use my website.
May 1 '06 #2
str_replace("\\'", "'", $variable)

--
Cheers,
Gaurav Vaish
http://mastergaurav.org
---------------------------

May 1 '06 #3
Carl, I don't think I have an option to disable SecurePHP. This is a
remote-hosted website, so I don't have full configuration ability.
Also, a search on Google for "disable securephp" came back with 0
results, and a search for "securephp" only came back with a few (most
pointing to a subdomain). Any idea on how to disable it?

$basepath is a variable pointing to the database directory, and it's
the same for all of the other variables:

$basepath = "/home/wilkessmartstart/data";

The code you see above is literally all of the PHP code; everything
after that is just HTML and plugging in the variables pulled from the
database. The only time a database is called is what you see above
(using FILE), and there are 2 include() commands (for the header and
footer).

MasterGaurav, I changed the \ to \\ as you suggested, but that didn't
have any impact on this error. Thanks for catching that, though.

May 1 '06 #4
I hate to reply to myself, but I've made a discovery.

In this case, the variable $facility equals "Diane Benesh Day Care
Home." I found that if I change it in the database to "Diane Benesh,"
it works fine. But as soon as I make it a single character longer (ie,
"Diane Benesh D"), I get that error.

So I've left it as "Diane Benesh" for now, but that's not right and the
customer will complain before long.

Does "benesh" have a special meaning in PHP?

May 1 '06 #5
Jason wrote:
This is a new one for me, and I couldn't find anything about it online.
So after wasting 4 hours of rewrites, I'm afraid that I have to beg the
gurus for help!

This is a relatively simple script. It takes a variable from the
header, and compares it to a tab-delimited flat-text database. Once it
finds a match, it uses the other info in the database to show a dynamic
page.

For instance, go to:

http://www.wilkessmartstart.com/providers/

These are all in the order by which they are in the database. Scroll
down to "Diane Benesh Day Care Home," and click on the title to be
taken to a view.php page. This is where you'll see the error, but it
only happens with this one; all of the other names seem OK.

Has anyone seen this one before, or have any idea what it means?

TIA,

Jason
The only real PHP code in the script is as follows:

// if there's no variable, send them to the intro page
if (!$_GET['id']) header("Location: index.php?error=true");

else {
$found = FALSE;

// if a single quote was in the name, PHP placed a \ in front
//of it by default
$_GET['id'] = str_replace("\'", "'", $_GET['id']);
}

// get database info
$providers = FILE("$basepath/providers.xls");

foreach ($providers as $key) {

// get rid of the \n at the end
$key = rtrim($key);

// $more_junk is here for your benefit; there are really about
// 20 variables in the script
//
// I actually don't use /t in the script, I use a real tab. I wasn't
// sure if that would show up in the NG, though
list ($facility, $more_junk) = explode("/t", $key);

// if it's found, change the boolean and stop looking
if ($_GET['id'] === $facility) {
$found = TRUE;
break;
}
}
if ($found) {
// print HTML code
}

else header("Location: index.php?error=true");


Well, one of your problem is the URL

http://www.wiklessmartstart.com/prov...w.php?id=Diane Benesh

is invalid. You can't have spaces in a URL. It should be

http://www.wiklessmartstart.com/prov...Diane%20Benesh

Browsers will try to correct for this, but it may be a problem when sending it
back into the server. Check out htmlentities() for how to convert the invalid
space to %20. It may not solve your problem, but it will fix another potential
problem you can have with some browsers.

And as for "bensch" having a special meaning in PHP (another post), no, it
doesn't. Even if it did, you wouldn't be using it in PHP here. It's strictly a
string. You could use any PHP reserved word here, also - or anything else, for
that matter.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 1 '06 #6

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

Similar topics

1
by: Andrew V. Romero | last post by:
I have a script that I am working on for an intranet tool and in this script I have a form, which when submitted the onSubmit command calls calculate(). In this calculate function, I have it do...
8
by: JA | last post by:
Hi, I have this JavaScript that is supposed to show random products from my database, and show something different every time you refresh or revisit. But I keep getting an error - on my computer...
8
by: Sean Shanny | last post by:
To all, The facts: PostgreSQL 7.4.0 running on BSD 5.1 on Dell 2650 with 4GB RAM, 5 SCSI drives in hardware RAID 0 configuration. Database size with indexes is currently 122GB. DB size...
3
by: dancer | last post by:
I am using Framework 1.1.4322. Who can tell me why I'm getting this error? My code follows Compilation Error Description: An error occurred during the compilation of a resource required to...
0
by: msconfused | last post by:
Hello all. I'm hoping that someone can help me solve this error. This is the error that I am getting. Fatal error: Call to a member function on a non-object in /home/paytoo/public_html/prices.php...
8
by: ajos | last post by:
hi frnds, the situation is im developing a web application in struts-- my specifications-eclipse3.2.2,struts1.1,tomcat5.5.23 mysql5.0 db. the scenario-i have a jsp page which adds the...
1
by: santosh.anumandla | last post by:
Hi all, I am getting the following error randomly, I cannot expalin the exact scenario Active Server Pages error 'ASP 0115' Unexpected error /wmweb/Save.Asp A trappable error (C0000005)...
9
akohistani
by: akohistani | last post by:
I am having Parse error problem with my newly purchased Php upload script I have uploaded the script and I get the error below Parse error: syntax error, unexpected $end in URL/functions.php on...
2
by: tridirk | last post by:
Hi; I am getting a Objceted Expected Error on my forum site. I can't find what is wrong? Line: Char: Error: Object expected Code:0 the site is My SMF Forum
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.