PDA

View Full Version : Internal Server Error (Two Questions)


sleepydad
02-27-2008, 03:13 AM
The scenario:

I have created a Flash email client that collects the data using ...

var my_lv:LoadVars=new LoadVars();
my_lv.name=name_txt.text;
my_lv.to=to_txt.text;
// etc ...
///////////////////
submit_btn.onRelease=function() {
my_lv.send("process.php", "POST");
};
// pretty straightforward

process.php reads (for brevity) ..

<?
$to=$_POST['to'];
$subject=$_POST['name'];
// ...
// ...
mail($to, $subject, $body, $headers);
?>

When I test this on my local server using MAMP, it works fine. However, when I upload it to my web host, I get the following message:


Inernal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, support@supportwebsite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Question 1:
Why the error message generated by my web host when it works fine locally?

Question 2:
I've read a hundred posts on multiple forums about sendAndLoad vs send to keep the php window from popping up. The only way that I've gotten this to work (even locally) is to use send. sendAndLoad doesn't send the variables for some reason.

NOTE: I am calling this Flash movie into another movie using this.createEmptyMovieClip(); if that makes any difference.

Thanks in advance -
sleepydad

CyanBlue
02-27-2008, 01:57 PM
Howdy...

#1. That probably is because that your web host has configured the mail/smtp/php differently than you did on your local setup... Just because it works on one computer, that does not mean that it should work universally...

#2. send() function opens up the popup window if that's what you are looking for... I don't understand the circumstance where the sendAndLoad() function does not send out a variable to PHP as long as those are sitting in the same domain...

As for your Note, you should not use any absolute pathing in Flash like _root to make sure that you are making your SWF as flexible as possible...

sleepydad
02-27-2008, 05:32 PM
Apparently this is an extremely popular topic, as illustrated by the pages upon pages that I googled. What I failed to mention in my initial post, because I didn't realize how pertinent it is, is that this is a godaddy hosted site. Apparently they have this /gdform.php thing going on that I've read nothing but bad about so far.

Anyone know a work around? Would switching from Windows to Linux (or vice versa) resolve the problem? I've got everything working now, including the sendAndLoad() issue mentioned above. Now I have to get this @#$% godaddy issue resolved and I'm in business.

Eagerly awaiting any/all replies!

Thanks again -
sleepydad

CyanBlue
02-27-2008, 05:47 PM
I have no idea what that gd.php issue, is but I have seen several threads that talks nothing but the troubles... So, I'd stay away from any of those big hosting companies...

sleepydad
02-27-2008, 06:01 PM
I have no idea what that gd.php issue, is but I have seen several threads that talks nothing but the troubles... So, I'd stay away from any of those big hosting companies...
Now you tell me - LOL. I'm signed into a one year commitment with them, so I have to find a work-around for the time being until I can jump ship for another host if need be.

sleepydad
02-27-2008, 06:04 PM
I have no idea what that gd.php issue, is but I have seen several threads that talks nothing but the troubles... So, I'd stay away from any of those big hosting companies...
Hey CyanBlue -

Just curious who you would recommend as a host assuming I'm doing mostly Flash with a smattering of php and xml now and again. Don't say networksolutions or I'll have to cyber-slap you. I hate those <bleepers>.

Thanks!

sleepydad
02-28-2008, 09:25 PM
Anyone who has followed my dilemma with this post and is having similar problems may take comfort in this. I corresponded with godaddy and found a simple solution to the problem. Apparently, when I transferred my site to godaddy last year, I brought some 'baggage' from my old host with it. There was a file deeply embedded in the contents that I copied over and inside of that was a file called '.htaccess'. This file was attempting to override my php settings and sent everything running amok. All I had to do was delete that file and my php snapped right into line. Note: this sounds like a godaddy issue, so you may want to contact your host before deleting this file if you're with someone other than godaddy.

sleepydad

CyanBlue
02-29-2008, 12:49 AM
Well... I guess that depends on what was the content of the .htaccess file... Normally you don't touch that file unless you know what you are doing... and unless it is the default file that Apache creates, it has its own purpose... Um... What I am trying to say is that there is going to be a reason why you have that file in deep down the directory cuz Apache does not automatically creates that file in every directory... It's a man made, and the program that uses the power of that .htaccess file might not work... So just be careful...

I use the WebScorpion which hosts AS.org just for the record...
http://www.webscorpion.com