Jump to content

StormTheGates

Members
  • Posts

    170
  • Joined

  • Last visited

Everything posted by StormTheGates

  1. I am having a very odd error that Ive never encountered before. Here is the situation: I have a database table that gets echoed out in rows in a table, with checkboxes for each user. Everything works fine with only a few users, the entire thing runs normally. However, at exactly the 250th checkbox the form stops POSTing data. For example, given this code snippet: <?php $people = $_POST['change']; var_dump($people); ?> $people will only ever contain the first 249 checkboxes selected, even if all 400some are. Does anyone have any idea why this could be, or if there is some type of memory limit I should check? My memory_limit is 512mb and max post size is 500mb
  2. How can I get the page to be processed without lynx? Lynx was asking for permissions earlier for cookies, I told it to always accept. The code is a very simple: $ourFileName = "export.csv"; $ourFileHandle = fopen($ourFileName, 'w') or die("can't open file"); fwrite($ourFileHandle, "all data"); fclose($ourFileHandle); Cronjob setup is: 45 9 * * * lynx "site" > /opt/websites/wut.log But Ive also tried using a visit.sh shell script that did the following: lynx --dump "site" Same result from both.
  3. Hey all, having a very odd problem this morning. I have a cron job that executes a script that performs the following action: "lynx --dump "php page"" This executes fine, I see all the output. The problem is this: The php file is supposed to write information to a file. When executed by a user on a web browser like Chrome or Firefox, the data is written to the file with no problem. However with lynx the file is created with size 0, and no data is ever written. Any ideas why this may be? Thanks.
  4. Aye thanks for that. I discovered it during an attempted tracert. As it turned out in the end spam filters were activating because of a URL in the email, one that wasnt https for some reason. Also it seemed like the header that said "reply to:" was causing spam filters to activate as well. Solved
  5. What device are you looking at this email from? Sometimes handhelds like phones append that stuff to the end. Other than that do you control the server or is it hosted through someone else? And do you control the email its being sent from?
  6. What exactly is the problem? Your form is using POST, why use GET?
  7. Hey all, having a very odd problem Ive never encountered. I am trying to send mails via PHP's built in mail function. I set the From and Reply-To like so: <?php $headers = "From: noreply@contractortraining.energy.gov\r\n"; $headers .= "Reply-To: noreply@contractortraining.energy.gov\r\n"; Now here is when things get weird. When this email sends the return email gets changed to noreply@doe.golearnportal.org. Oddly enough it only happens when the From is "contractortraining.energy.gov". For example: If I send with these headers the email comes in as doe.golearnportal.org However if I change the headers to be something like "sometest.org" or "nowhere.golearnportal.org" or anything other than "contractortraining.energy.gov" it will come through using the specified headers. It is only when I use "contractortraining.energy.gov" that the headers get changed. Any ideas what could be responsible for this type of behavior? I dont think its a PHP issue at the moment, and this code is working successfully on several other servers.
  8. Have you tried changing to something like this? Just to see of course. if($Log['Revision1']&$Log['Revision2']){ $Message = 'Updated $Log[Name] from revision: $Log[Revision1] to revision: $Log[Revision2]'; }else{ $Message = 'Freshly downloaded: $Log[Name] revision: $Log[Revision1]'; } Also try putting a space at the end of $Message. Like so: $Message = 'Updated $Log[Name] from revision: $Log[Revision1] to revision: $Log[Revision2] '; That way you will know if the random numbers are part of the Revision number or are appended to the string.
  9. You assume that the government wants things functional and backwards compatible. The last time I mucked with their code they had a hissy fit. Trust me I know <? are bad tags, Ive seen benchmarks where the <?php is much faster. But sadly they are paying the bills so I just make our server run it.
  10. Well you helped me with my problem so I will toss a few ideas at you. Have you tried print_r, just to see if the numbers are inside any of the array elements? Also array_merge will merge strings of the same sequence, I think, but not numbers, could this be causing extra numbers to be appended? Also maybe print one thing out at a time to see where the 50 is coming from? Sorry I am not much help just tossing some ideas out.
  11. Relax boss, I didnt exactly get a choice. The government hands me the code, I just make it run on our servers.
  12. You are both a gentleman and a scholar. Fixed it right up, thank you.
  13. Hey all, I have an odd problem that I hope someone here has had and knows how to fix. I recently installed Apache, PHP, and MySQL on a new server we have at work. Everything works fine, oddly enough, except for PHP parsing. You see the following code: <? echo "test"; ?> Will display the PHP code, while <?php echo "test"; ?> Will echo "test". The problem seems to be that PHP isnt parsing the <? directive as a start command. Does anyone have any idea why this might be? Thanks for any help.
  14. Why wouldnt you recommend eval? These are hard coded language strings, there is 0 user input. Does it pose a security risk?
  15. Yes he said that because there were two dollar signs they must be escaped properly to display. However my previous reply to this one does not work either and it only uses one dollar sign.
  16. Thats not it, because this does not work either: <?php Your account number is <b>$act</b> and your pin number is <b>$pin</b>. <b> Write this number down there is no way to recover it</b> ?>
  17. Aright here is my situation. I have an array of language strings loaded at the top of the page from a language file. Then later the string is called. Some of the strings have variables in them. For example here is a sample: <?php 24 => "You have withdrawn $$with from that ATM account. There is $$amount left.", ?> And then later in the page it goes like this: <?php $amount -= $with; $money=$money + ($with*.; echo "$lang[24]"; ?> However I encounter a problem here, the variables are blank. Any idea why or a way I can fix it?
  18. You could always look at the manual. It should tell you everything you need to know about PHP Mail: http://www.php.net/mail
  19. But it worked ok on my last server, and now on the new one it dosnt. Is there some setting I should be looking to change?
  20. I recently moved a lot of my files to a new server. Now when the files are displayed there are weird rectangles in them. Like some characters can not be displayed. Is this a PHP problem? I am kind of at a loss of what to do.
  21. The language files in one page would be far to large to load on every page. I only need a select chunk at any given moment. Most of my pages look like this: <?php include 'languages/main.php'; $lang = GetLang(); echo "Statement: $lang[0]"; ?> And on main.php <?php function GetLang(){ $fr = array( 0 => "seulement rapporter les bogues dans le jeu pour eux.", 1 => "les modérateurs pour signaler des problèmes et des bugs à eux.", 2 => "pour aider les bureaux. S’il vous plaît demander jeu des questions qui leur sont confiées. ", 3 => "pour les personnes qui possèdent des casinos. ", 4 => "patrons pour la famille.", 5 => "la main droite pour les hommes.", 6 => "pour vos amis en ligne. ", ); $de = array( 0 => "bericht nur bugs im spiel zu ihnen. ", 1 => "moderatoren für probleme und bugs zu ihnen", 2 => "für Help Desks. Bitte fragen sie spiel fragen zu ihnen. ", 3 => "für Menschen, die eigenen Casinos. ", 4 => "für Familie Bosse. ", 5 => "rechte hand für männer.", 6 => "für ihre online-freunde. ", ); ... if($_SESSION['lang'] == 'en'){ return $en; } elseif($_SESSION['lang'] == 'fr'){ return $fr; } elseif($_SESSION['lang'] == 'de'){ return $de; } elseif($_SESSION['lang'] == 'it'){ return $it; } elseif($_SESSION['lang'] == 'sp'){ return $sp; } elseif($_SESSION['lang'] == 'nl'){ return $nl; } else { return $en; } } ?>
  22. Can you explain a bit more? I am not very knowledgeable about cURL.
  23. Here is my situation: I run a game that I am trying to make multi lingual. There is a language file for every regular file. On the language files there are arrays of all the strings for each language. For example users.lang.php contains 6 arrays of 8 strings each, an array for each language and then all the strings in that language. Now some of these pages are quite large, and have a lot of text 100-300 strings. Is there a way to cache these php pages so that the server dosnt have to go through all the arrays each time? The language files will not be changing so I was hoping I could find a way to cache them to make it faster to access. Any ideas?
×
×
  • 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.