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

Members Online

»
0 Active | 103 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP 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, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Bit of HTML/PHP help
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: General
Posted: Tuesday, Aug. 7, 2012 12:06 pm
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 7, 2001
Posts: 95765
Last: Apr 9, 2024
[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 12:28 pm
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: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: General
Posted: Tuesday, Aug. 7, 2012 02:00 pm
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: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: General
Posted: Tuesday, Aug. 7, 2012 02:43 pm
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 7, 2001
Posts: 95765
Last: Apr 9, 2024
[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 03:02 pm
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 Topic is Locked subscribe
MODSonline.com Forums : MODSonline : General

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»