Jump to content

Walker33

Members
  • Posts

    78
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Walker33's Achievements

Member

Member (2/5)

0

Reputation

  1. Found the answer and just wanted to get it here for other people if they ever run across a similar problem. Yes, it was a setting in the php.ini file, the memory_limit parameter. I found in the server log that the allowed memory size was exhausted, so by moving the memory_limit up to 20, the problem was resolved. Hope that helps someone else down the road.
  2. No, I've never heard of a script being too large to process, either. It's 8,000 lines, though, which is larger than any other single page I've ever constructed. I know it's not the code, because I kept cutting parts of it out to see where the failure was (figuring it was the code, even though I couldn't find my mistake), and when it failed, I took that code at the failure point, put it back in, and pulled other code. Worked fine, then when adding the previously "working" code, it failed there. I did that several times with several different pieces of the code, and all was fine until I hit a certain level. So to answer the other question, no, I can't really post it. It's enormous, and there's an awful lot of sensitive data there. But I can say with certainty that it's not the code, so I'm assuming it's the size. But maybe it's not the size? Maybe it's the memory limit? I'm not sure.
  3. I've got an enormous page for a pretty complex process. I just posted some changes, and it stopped functioning. Through multiple tests, I determined there was no problem with the code; it was just becomes too large at a certain point. I've read about changing settings in the php.ini file, but I'm not exactly sure what to change or what to bump it up to to allow for this huge page. Here are some current settings that I'm guessing control this problem: max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) ; Maximum size of POST data that PHP will accept. post_max_size = 8M ; Maximum allowed size for uploaded files. upload_max_filesize = 2M Does anyone have any insight into what to change or what settings might allow for a larger page? Not sure which one of these settings controls my problem. Thanks, as always, for any help.
  4. Okay, thanks. I didn't think so, but I wanted to be sure, and I couldn't find a definitive answer anywhere. Appreciate it.
  5. I think I know the answer to this, but it would make things easier if I could do what I think I can't. Can I use LIKE and NOT LIKE in an if statement? Doesn't seem to be working for me. <?php //$rightlic is a twelve character string ending either P00, P01, V00, or V01. I want to do different things based on V or P if ($rightlic not like '%V00' AND $rightlic not like '%V01'){ echo "<br>purchaser ran demo as public but is now trying to purchase a private account. Stop the process."; exit; } ?> Can I do something like this or do I have to separate the string and look for the last characters that way? Thanks in advance for any help.
  6. Well, I didn't put that in there, but the $Email variable is gained from the form they fill out, so $Email = dave@dave.com or whatever they put in.
  7. Okay, thanks. I researched quite a bit and didn't find much. Some stuff about using the host, user and pass, but nothing is working. Thanks for your input.
  8. I have a form on my web page on a Windows server. I'm trying to send a simple email. My email server is on a different Linux server. That Linux server has seven different email accounts tied into into it. Whenever the "to" address resovles to one of the addresses on the Linux server, I receive the email just fine, but if it tries to send it to any other email address outside that Linux server (gmail or yahoo or whatever), I never recieve it. Not sure what to do. <?php // Sending email to person requesting free trial $to = $Email; $headers = "From: support@company.net\r\n" . ""; $subject = "Your Trial"; $body = "$Name, Thank you for requesting a free, 15-day trial!"; mail($to, $subject, $body, $headers); ?> Thanks for any help!
  9. Yes, that helps quite a bit. Thanks for taking the time to explain it to me. Appreciate it.
  10. Explain why ($_POST['memlname']) didn't work, but ($memlname) does work? When I used the same trim code, but $memlname = mysql_real_escape_string($_POST['memlname']); the $memlname variable would not allow whitespace. When I took your suggestion and used: $memlname = mysql_real_escape_string($memlname); instead, then $memlname variable would allow the whitespace at beginning and end. Why is that? Thanks.
  11. thanks. Came across ltrim and rtrim befor trim. You're right, cleaner with trim. I was using mysql_real_escape_string to stop a single quote ' from breaking up the input query and causing the error, as in O'Malley, O'Sullivan, etc. To this point, it seems to have worked. Am I misunderstanding something? I took your advice and changed ($_POST['memlname'] to simply ($memlname) and now all is working as it should. If you care to explain why this is, I'm always eager to learn. Thanks for the help! New code: //this allows for accidental extra spaces at beginning and end of name $memfname = trim($memfname); $memlname = trim($memlname); $mememail = trim($mememail); $mempass = trim($mempass); //this allows for Irish names like O'Sullivan, O'Donnell, etc. $memlname = mysql_real_escape_string($memlname);
  12. I've been using mysql_real_escape_string to allow for Irish names for a login, and I just added ltrim and rtrim to the code to eliminate accidental spaces at the beginning and end. Everything worked except the $memlname variable. When I pulled the mysql_real_escape_string snippet from the code, the ltrim and rtrim worked for $memlname variable. Not sure what I'm doing wrong. Any help would be greatly appreciated. <?php //this allows for accidental extra spaces at beginning and end of name $memfname = ltrim($memfname); $memlname = ltrim($memlname); $mememail = ltrim($mememail); $mempass = ltrim($mempass); $memfname = rtrim($memfname); $memlname = rtrim($memlname); $mememail = rtrim($mememail); $mempass = rtrim($mempass); //this allows for Irish names like O'Sullivan, O'Donnell, etc. $memlname = mysql_real_escape_string($_POST['memlname']); ?>
  13. Beautiful! Thanks a ton, that was what I was looking for. Really appreciate the help.
  14. let me clarify, which I should have done from the start. A standard echo WILL give both names. But when I echo it in a form for them to change, it does not. So: <form name="profileupdate" method="post" action="/memberupdate.php"> <strong>First:</strong> <input type="text" name="newfirst" size="30" value=<?php echo $userfirst; ?>><br> <strong>Last:</strong> <input type="text" name="newlast" size="30" value=<?php echo $userlast; ?>><br> <strong>Email:</strong> <input type="text" name="newemail" size="30" value=<?php echo $useremail; ?>><br> Does that help?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.