Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
1 Active | 13 Guests
Online:

LATEST FORUM THREADS

»
water
CoD4 MP Mapping
Rainbow HELP....
CoD4 MP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : MODSonline
Category: General
General chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: Bit of HTML/PHP help
Mystic
General Member
Since: Apr 10, 2004
Posts: 6095
Last: Apr 27, 2013
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: General
Posted: Tuesday, Aug. 7, 2012 05:06 am
Strange problem i can't quite understand the cause of. I have a back end page on my site which is used for adding products to the online store, its has always worked just fine but since yesterday upon submitting the form i get;

Quote:
Not Found
The requested document was not found on this server.


It makes no difference if the form is submitted empty or full. The script which processes the form is on the same page, so the form submits to the same page therefore this error makes no sense because it clearly exists since i just filled out the form..

I had a quick check around and the action of the form hasn't changed, all other scripts seems to work fine from the same directory apart from the most important one which is this.

Any ideas what i may have missed?

Thanks guys.
Share |
foyleman
Preferred PLUS Member
Since: Nov 6, 2001
Posts: 95732
Last: Apr 28, 2013
[view latest posts]
Level 10
Admin
Forum Moderator
Im a fan of MODSonair
Im a HOST of MODSonair
Category: General
Posted: Tuesday, Aug. 7, 2012 05:28 am
Being PHP based, there are quite a few possible answers.

If the page "cannot be found", then you must check:
- is htaccess doing a mod-rewrite and redirecting the page?
- is there a syntax error causing the page to load a different script other then the one you expect?
- is there a php url directive that causes a different file to load as a result of switch cases or if statements?

I think I need to see the code to get a better understanding of what might be the cause.
Go ahead... You Play I Mod : Support Modsonline by becoming a PREFERRED MEMBER today!
Have you heard the MODSonair Podcast?:
MODSonair is a weekly podcast bringing you the news from a modders perspective.
Tune in every Sunday at 12pm EST to listen LIVE.
Quake 4 Mods for Dummies - Half-Life 2 Mods for Dummies
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6095
Last: Apr 27, 2013
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: General
Posted: Tuesday, Aug. 7, 2012 07:00 am
The only mod-rewrites i have is to hide the page file extensions (.php, .html etc..) and another to catch ErrorDocument's and direct the user to a more fancy landing page. I just tested by completely removing the htaccess, same problem.

The script hasn't been altered since its last working state so there shouldn't be any syntax errors, mysql database hasn't changed so all the inputs should be the same. Even when doing the initial check to make sure no field are empty, so before even getting to the database input stage i get directed to the 'not found' page

The only if statements i have are what you may expect, simply to validate the input field is correct, so an example of one would be

Code:
if( !empty($_POST['title']) ) { 
		if( strlen($_POST['title']) < 10 ) {
			$title_err = true;
			$errors['title'][] = 'Title must be 10 characters or more.'; 
		}
	} else {
		$title_err = true;
		$errors['title'][] = 'Title is a required field.'; 
	}

If $errors is empty, the form then gets processed and all information goes to the databases etc.. All queries have mysql_error reporting to which nothing reports a problem. This is just a simple INSERT into a database (well several) nothing fancy or any complicated calculations

It seems as soon as i hit the submit form button i get the error, its not even trying to process the information.

I'm not sure which part you may find useful but if you need to see any of the script i will post what you need.

Thanks foyleman, much appreciate your help as this one has me stumped.
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6095
Last: Apr 27, 2013
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: General
Posted: Tuesday, Aug. 7, 2012 07:43 am
removed original post just in case i left any security risk info in there

edited on Aug. 7, 2012 07:46 am by Mystic

It may be for what ever reason it didn't like me trying to write html to my database, no idea what changed but i removed some html breaks i added from a textarea and the script seems to be processing now.

Sorry to waste your time, hopefully that solves it but if not ill be back here soon :)
Share |
foyleman
Preferred PLUS Member
Since: Nov 6, 2001
Posts: 95732
Last: Apr 28, 2013
[view latest posts]
Level 10
Admin
Forum Moderator
Im a fan of MODSonair
Im a HOST of MODSonair
Category: General
Posted: Tuesday, Aug. 7, 2012 08:02 am
You have some heavy web restrictions on that server. I've not seen that error.
Glad you got a fix for now.
Go ahead... You Play I Mod : Support Modsonline by becoming a PREFERRED MEMBER today!
Have you heard the MODSonair Podcast?:
MODSonair is a weekly podcast bringing you the news from a modders perspective.
Tune in every Sunday at 12pm EST to listen LIVE.
Quake 4 Mods for Dummies - Half-Life 2 Mods for Dummies
Share |
Restricted Access Restricted Access subscribe
MODSonline.com Forums : MODSonline : General

Latest Syndicated News

»
Why console gaming is dying
Quote:Consider this: Dedicated gaming sales — including living-room consoles...
Devs: Games are being dumb...
Click 'read more' to view the contents of this post.
Loadout
Gun Crafting to the Max. edited on Sep. 25, 2012 06:57 pm by Morp...
Introducing the Source Fil...
Surprised this wasn't made a long time ago. Sounds like a nice little feature.
Introducing the Source Fil...
The Source Filmmaker (SFM) is the movie-making tool built and used by us he...

Partners & Friends

»