PHP - Ranting On Godaddy.
I'm so angry right now. Just want to vent a little.
Godaddy sucks. They are currently taking an blow torch to their servers, or them damn gremlins. Our shared host cpanel server is on for a few seconds then down again. If it is up, it can't connect to mysql. Then it works, then back. Why? oh ohhh ohhhh! Cause yesterday, from 7pm to this morning, 5 am they did what ever it is those nuts do and well now my client, our customers and I can't use the site. YAY!
No idea when it will be back. Work to do. But...why would that piss me off so much? That's not it!!
The day before yesterday, which would be Tuesday they had already started screwing things up. What ever they did caused the sql settings in my php.ini file to no longer mesh with the server. SO, I get the call from client and employees, "it's not working." Can't get to mysql. Call GoDaddy, they disable my php.ini and the timezone for the server changed and some odd hours later employees where calling me saying the data changed early.
72 hours, roughly of on edge, what's going to be next from GoDaddy.
This is just the past few days!
The 2 weeks before that I was trying to get a asp.net c# MVC application to run on another of their servers. Nope. Ended up getting a new host. 2 weeks!! Those 2 weeks were filled with godaddy saying "Everything is ok on our end.. something is wrong with your code." Upload the code to new server and it just worked. Hum?
Over the past 6+ years I have had nothing but head aches dealing with godaddy. Their normal solution is found in the next pay package, or it isn't their problem in the first place.
We had issues sending emails out from PHP. This was a big one. 5+ years of dealing with it. Sometimes they got the email, sometimes they didn't. Looked around the net, use a php mailer plug in. Same problem. Tweaked sent froms and return's to. Same thing. Years of godaddy saying they are setup right. Guess what! Nope! Found out they had a setting hidden deep in the horrid control panels that tweaked something I don't even know what and that seemed like a fix. Nope. So we start doing an in depth look at our server reputation and logging the ip's emails came from. Testing those IP's to see if they were black listed showed us that yes some of them were black listed. We send maybe 25 emails out a month? All legit, clean. But shared server so, someone did it. GoDaddy said there was nothing they could or would do about it. That's right! Their server's were blacklisted, shucks!
My last 2 clients on godaddy are making the switch. Soon I will be godaddy free and will strongly recommend new clients away.
Sorry that this was a big long BLAH of garbage. Thank you for listening. I feel better now.
Similar TutorialsHi I've created my website, I'm hosting it on Godaddy but my email doesn't work at all, it shows the errors so it looks like it works and the mail has been sent, but i don't get any emails at all. I used different emails, one from Gmail and one from Godaddy. I've been loking for the solution for that for last few days... can you help, please? Is there a PHP "API" that can connect to GoDaddy, list domains, change the dns and whois? Possibly add new domains? I highly doubt it, and if not, I'll start writing one. However, GoDaddy uses what must be the worst HTML code EVER. WHO THE @$%^ uses javascript FOR EVERY LINK. That is just plain unnecessary. And I have a feeling GoDaddy wouldn't like such an API, and would make any attempt to break it Thanks Hello, I am new. I have created a very simple webpage that has content the changes when a link is clicked. The site works perfectly on my "localhost". I am running Apache 2.2 and PHP 5.3 on localhost. When I upload to my GoDaddy shared hosting, ( I beleive Apahe 1.3 and PHP 5.2) my "index.php" displays fine on load. However, when any of the links are clicked the content area where it is supposed to change disapeears. Here is a sample of the code that I am using: // These are the links in the index.php html code... <li><a href="index.php?id='home'" id="home" name="home">Home</a></li> <li><a href="index.php?id='form'" id="form" name="form">Register</a></li> <?php include("form1.php"); getPage(); ?> html.... Then on the form1.php page is the following code... function getPage() { $linkID = $_GET['id']; if ($linkID == NULL) { changeBool("'home'"); } else changeBool($linkID); } //end example The function "changeBool()" has a switch structure that is determined by the $_GET[] var. I beleive this has something to do with the php.ini settings, possibly the apache settings...any ideas would be greatly appreciated. Hello, I have a script that will resize all images in a directory.. the script functions properly on my normal hosting (through hostgator) but when I try to run the script on a GoDaddy site, the script will only get about half way done and then just stop without any errors. I've checked the max_execution_time and it's set to 90 but the script seems to stop after around 25 seconds. I wrote another script that was just a for loop with sleep(1) to run 90 times and it did without any issues.. I was thinking it was a memory error but I don't get any fatal errors saying so... I know its something to do with the config of GoDaddy but I can't figure out the exact cause. the server does have PHP5 installed and the only error i can even get to throw through the GoDaddy logs is a warning about ./json.so not being able to load.. Can anyone think of anything off the top of their head that could cause this to happen only on GoDaddy? this is the gist of the function but its been modified a tiny bit... (only filenames that are created etc) <?php // The file $filename = 'test.jpg'; // Set a maximum height and width $width = 200; $height = 200; // Content type header('Content-type: image/jpeg'); // Get new dimensions list($width_orig, $height_orig) = getimagesize($filename); $ratio_orig = $width_orig/$height_orig; if ($width/$height > $ratio_orig) { $width = $height*$ratio_orig; } else { $height = $width/$ratio_orig; } // Resample $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); // Output imagejpeg($image_p, null, 100); ?> thanks! For the first time in my life, I can't open a webpage with curl: $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); //curl_setopt($ch, CURLOPT_SSLVERSION, 3); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.02; Windows NT 5.0)"); curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__).'/godaddycokie.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__).'/godaddycokie.txt'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $url = 'https://auctions.godaddy.com'; curl_setopt($ch, CURLOPT_REFERER, $url); echo curl_exec($ch); Any clues? Some Javascript trick?! Hi I was wondering if anybody could help me. I have used this form script on other hosting packages and it work well however I can not get it to work on Godaddy. I have not written the script i got it off the web and therefore i am having trouble implementing the advise from Godaddy. "It appears that the form in question allows you to define the To address for the message, but that in most cases the From address is designated as the email address entered by the party submitting the form. For anti-spam purposes, emails using a major provide as the From address (e.g. @hotmail, @gmail, @yahoo, etc) will often be rejected. As a result, we recommend that the From address for your message be a dedicated address utilizing your hosted domain; for example, contactform@your-directories.com. We recommend that you update your configuration to use a defined From address as previous indicated in order to resolve the issues which you are encountering" I guess what I am asking for is a fairy godmother/father to look at my code and tell me what I need to do to make it work. If anybody can help me I would be really greatful as I have been trying to make this work for day. Thanks for your time Kelly Code: [Select] <?php // ------------- CONFIGURABLE SECTION ------------------------ $mailto = 'kpayne@your-directories.com' ; $subject = "ContactForm" ; $formurl = "http://www.your-directories.com/contact.html" ; $thankyouurl = "http://www.your-directories.com/Forms/Thankyoucontact.html" ; $errorurl = "http://www.your-directories.com/Forms/Errorcontact.html" ; $email_is_required = 1; $name_is_required = 1; $comments_is_required = 1; $uself = 0; $use_envsender = 1; $use_sendmailfrom = 1; $smtp_server_win = '' ; $use_webmaster_email_for_from = 1; $use_utf8 = 1; $my_recaptcha_private_key = '' ; // -------------------- END OF CONFIGURABLE SECTION --------------- define( 'MAX_LINE_LENGTH', 998 ); $headersep = (!isset( $uself ) || !$uself) ? "\r\n" : "\n" ; $content_type = (!isset( $use_utf8 ) || ($use_utf8 == 0)) ? 'Content-Type: text/plain; charset="iso-8859-1"' : 'Content-Type: text/plain; charset="utf-8"' ; if (!isset( $use_envsender )) { $use_envsender = 0 ; } if (isset( $use_sendmailfrom ) && $use_sendmailfrom) { ini_set( 'sendmail_from', $mailto ); } if (isset( $smtp_server_win ) && strlen($smtp_server_win)) { ini_set( 'SMTP', $smtp_server_win ); } $envsender = "-f$mailto" ; $fullname = (isset($_POST['fullname']))? $_POST['fullname'] : $_POST['name'] ; $phone = $_POST['phone'] ; $email = $_POST['email'] ; $department = $_POST['department'] ; $comments = $_POST['comments'] ; $http_referrer = getenv( "HTTP_REFERER" ); if (!isset($_POST['email'])) { header( "Location: $formurl" ); exit ; } if (($email_is_required && (empty($email) || !preg_match('/@/', $email))) || ($name_is_required && empty($fullname)) || ($comments_is_required && empty($comments))) { header( "Location: $errorurl" ); exit ; } if ( preg_match( "/[\r\n]/", $fullname ) || preg_match( "/[\r\n]/", $email ) ) { header( "Location: $errorurl" ); exit ; } if (strlen( $my_recaptcha_private_key )) { require_once( 'recaptchalib.php' ); $resp = recaptcha_check_answer ( $my_recaptcha_private_key, $_SERVER['REMOTE_ADDR'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field'] ); if (!$resp->is_valid) { header( "Location: $errorurl" ); exit ; } } if (empty($email)) { $email = $mailto ; } $fromemail = (!isset( $use_webmaster_email_for_from ) || ($use_webmaster_email_for_from == 0)) ? $email : $mailto ; if (function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc()) { $comments = stripslashes( $comments ); } $messageproper = "This message was sent from:\n" . "$http_referrer\n" . "------------------------------------------------------------\n" . "------------------------------------------------------------\n" . "Name of Sender: $fullname\n" ."------------------------------------------------------------\n" . "Phone Number of Sender: $phone\n" ."------------------------------------------------------------\n" . "Email of sender: $email\n" ."------------------------------------------------------------\n" . "For the Attention of Department: $department\n" . "------------------------- COMMENTS -------------------------\n\n" . "------------------------------------------------------------\n" . "------------------------------------------------------------\n" . wordwrap( $comments, MAX_LINE_LENGTH, "\n", true ) . "\n\n------------------------------------------------------------\n" ; $headers = "From: \"$fullname\" <$fromemail>" . $headersep . "Reply-To: \"$fullname\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.16.1" . $headersep . 'MIME-Version: 1.0' . $headersep . $content_type ; if ($use_envsender) { mail($mailto, $subject, $messageproper, $headers, $envsender ); } else { mail($mailto, $subject, $messageproper, $headers ); } header( "Location: $thankyouurl" ); exit ; ?> MOD EDIT: [code] . . . [/code] tags added. Hello, I have been working on my website lateley and realized that godaddy only allows a 1000 email limit. I am sure this will be fine when the site first launches but if I get more and more users it will cause some issues. How can I fix this? Is there like a function that can bypass this or something??? Thanks in advance :-) Hey guys, bit of a newb here. But I am having a brutal time trying to get the php mail() function to work with GoDaddy. I contacted them and they said I must use their PHP gdform.php script to send out emails. My script sends the emails from register.php and functions.php. Does anyone know how I can integrate godaddy's gdform.php to work with my functions.php mail() script. Doesn't make sense to me my go daddy makes this so difficult to use a simple function. Thanks in advance!!! My register.php script Code: [Select] <?php include ('config.inc.php'); include ('functions.php'); // Those two files can be included only if INCLUDE_CHECK is defined session_name('wkLogin'); // Starting the session session_set_cookie_params(2*7*24*60*60); // Making the cookie live for 2 weeks session_start(); if($_SESSION['id'] && !isset($_COOKIE['wkRemember']) && !$_SESSION['rememberMe']) { // If you are logged in, but you don't have the wkRemember cookie (browser restart) // and you have not checked the rememberMe checkbox: $_SESSION = array(); session_destroy(); // Destroy the session } if(isset($_GET['logoff'])) { $_SESSION = array(); session_destroy(); header("Location: tester.php"); exit; } if($_POST['submit']=='Login') { // Checking whether the Login form has been submitted $err = array(); // Will hold our errors if(!$_POST['username'] || !$_POST['password']) $err[] = 'All the fields must be filled in!'; if(!count($err)) { $_POST['username'] = mysql_real_escape_string($_POST['username']); $_POST['password'] = mysql_real_escape_string($_POST['password']); $_POST['rememberMe'] = (int)$_POST['rememberMe']; // Escaping all input data $row = mysql_fetch_assoc(mysql_query("SELECT id,usr FROM wk_members WHERE usr='{$_POST['username']}' AND pass='".md5($_POST['password'])."'")); if($row['usr']) { // If everything is OK login $_SESSION['usr']=$row['usr']; $_SESSION['id'] = $row['id']; $_SESSION['rememberMe'] = $_POST['rememberMe']; // Store some data in the session setcookie('wkRemember',$_POST['rememberMe']); } else $err[]='Wrong username and/or password!'; } if($err) $_SESSION['msg']['login-err'] = implode('<br />',$err); // Save the error messages in the session header("Location: tester.php"); exit; } else if($_POST['submit']=='Register') { // If the Register form has been submitted $err = array(); if(strlen($_POST['username'])<4 || strlen($_POST['username'])>32) { $err[]='Your username must be between 3 and 32 characters!'; } if(preg_match('/[^a-z0-9\-\_\.\@]+/i',$_POST['username'])) { $err[]='Your username contains invalid characters!'; } if(!checkEmail($_POST['email'])) { $err[]='Your email is not valid!'; } if(!count($err)) { // If there are no errors $pass = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6); // Generate a random password $_POST['email'] = mysql_real_escape_string($_POST['email']); $_POST['username'] = mysql_real_escape_string($_POST['username']); // Escape the input data mysql_query(" INSERT INTO wk_members(usr,pass,email,regIP,dt) VALUES( '".$_POST['username']."', '".md5($pass)."', '".$_POST['email']."', '".$_SERVER['REMOTE_ADDR']."', NOW() )"); if(mysql_affected_rows($link)==1) { send_mail( 'noreply@mygodaddydomain.com', $_POST['email'], 'Registration System Demo - Your New Password', 'Your password is: '.$pass); $_SESSION['msg']['reg-success']='We sent you an email with your new password!'; } else $err[]='This username is already taken!'; } if(count($err)) { $_SESSION['msg']['reg-err'] = implode('<br />',$err); } header("Location: tester.php"); exit; } $script = ''; if($_SESSION['msg']) { // The script below shows the sliding panel on page load $script = ' <script type="text/javascript"> $(function(){ $("div#panel").show(); $("#toggle a").toggle(); }); </script>'; } ?> My Mail() funtions.php script Code: [Select] <?php function checkEmail($str) { return preg_match("/^[\.A-z0-9_\-\+]+[@][A-z0-9_\-]+([.][A-z0-9_\-]+)+[A-z]{1,4}$/", $str); } function send_mail($from,$to,$subject,$body) { $headers = ''; $headers .= "From: $from\n"; $headers .= "Reply-to: $from\n"; $headers .= "Return-Path: $from\n"; $headers .= "Message-ID: <" . md5(uniqid(time())) . "@" . $_SERVER['SERVER_NAME'] . ">\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Date: " . date('r', time()) . "\n"; mail($to,$subject,$body,$headers); } ?> Godaddys gdform.php Code: [Select] <?php $request_method = $_SERVER["REQUEST_METHOD"]; if($request_method == "GET") { $query_vars = $_GET; } elseif ($request_method == "POST") { $query_vars = $_POST; } reset($query_vars); $t = date("U"); $file = $_SERVER['DOCUMENT_ROOT'] . "\ssfm\gdform_" . $t; $fp = fopen($file,"w"); while (list ($key, $val) = each ($query_vars)) { fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\r\n"); fputs($fp,"$val\r\n"); fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\r\n"); if ($key == "redirect") { $landing_page = $val; } } fclose($fp); if ($landing_page != "") { header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page"); } else { header("Location: http://".$_SERVER["HTTP_HOST"]."/"); } ?> Just a basic email test gives me this error: Warning: mail() [function.mail]: Failed to connect to mailserver at "relay-hosting.secureserver.net" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\hosting\7746358\html\testmail.php on line 7 Mail Sent. mailtest.php Code: [Select] <?php $to = "someone@domain.com"; $subject = "Test mail"; $message = "Hello! This is a simple email message."; $from = "noreply@mygodaddydomain.com"; $headers = "From:" . $from; mail($to,$subject,$message,$headers); echo "Mail Sent."; ?> This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=332575.0 i dont understand what is wrong plz help me.
here is code
$name = "img/".rand(1,9999999).".png"; $myFile = $name; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = $html; fwrite($fh, $stringData); fclose($fh); $file=$name; $fst=file_get_contents($file); $im=imagecreatefromstring($fst); imagefilter($im, IMG_FILTER_GRAYSCALE); imagefilter($im, IMG_FILTER_NEGATE); //Convert to Grey Scale for($i=0;$i<123;$i++){ for($j=0;$j<50;$j++){ $px=imagecolorat($im,$i,$j); if($px<0x303030){ imagesetpixel($im,$i,$j,0); }else{ imagesetpixel($im,$i,$j,0xffffff); } } } $database = unserialize(@file_get_contents("db.txt")); if($database === false) $database = array(); // modify the database if needed if($_SERVER['REQUEST_METHOD'] == 'POST'){ if($_POST['submit'] == 'Add') $database[$_POST['ident']] = substr($_POST['letter'], 0, 1); if($_POST['submit'] == 'Del') unset($database[$_POST['ident']]); if($fh = @fopen('db111.txt', 'w+')){ fwrite($fh, serialize($database)); fclose($fh); } }else{ $newimage = true; } $width = 130; $height = 40; $captcha_gridstart =1; $captcha_gridspace =2; $letters = findletters($im, $width, $height, $captcha_gridstart, $captcha_gridspace); $count = count($letters); $cellw = ($count > 0) ? intval(100 / $count) : 0; //dispeckle the image and GET co-ordinates of the characters of captcha image and return them. function findletters($image, $width, $height, $gridstart, $gridspace){ $offsets = array(); $o = 0; $atstartx = true; for($x = 0; $x < $width; $x++){ $blankx = true; for($y = 0; $y < $height; $y++){ if(imagecolorat($image, $x, $y) == 0){ $blankx = false; break; } } if(!$blankx && $atstartx){ $offsets[$o]['startx'] = $x; $atstartx = !$atstartx; }else if($blankx && !$atstartx){ $offsets[$o]['endx'] = $x; $atstartx = !$atstartx; $o++; } } $count = $o; for($o = 0; $o < $count; $o++){ for($y = 0; $y < $height; $y++){ $blanky = true; for($x = $offsets[$o]['startx']; $x < $offsets[$o]['endx']; $x++){ if(imagecolorat($image, $x, $y) == 0){ $blanky = false; break; } } if(!$blanky){ $offsets[$o]['starty'] = $y; break; } } for($y = $height-1; $y > $offsets[$o]['starty']; $y--){ $blanky = true; for($x = $offsets[$o]['startx']; $x < $offsets[$o]['endx']; $x++){ if(imagecolorat($image, $x, $y) == 0){ $blanky = false; break; } } if(!$blanky){ $offsets[$o]['endy'] = $y; break; } } } for($o = 0; $o < $count; $o++){ $offsets[$o]['ident'] = ""; for($x = $offsets[$o]['startx'] + $gridstart; $x < $offsets[$o]['endx']; $x += $gridspace){ for($y = $offsets[$o]['starty'] + $gridstart; $y < $offsets[$o]['endy']; $y += $gridspace){ $offsets[$o]['ident'] .= ((imagecolorat($image, $x, $y) == 0) ? "0" : "1"); #echo $offsets[$o]['ident'].'<br>'; } } } return $offsets; } $a=""; foreach($letters as $letter){ $asciiletter = $database[$letter['ident']]; if(!empty($asciiletter)) { $a.=$asciiletter; } } |