Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Err

  1. No matter which way you do it, you end up with the same result. Doesn't matter how you go about uploading things just as long as you get everything online. Personally, I would have a folder with all the contents and upload entire folder that way you have everything in one place and the images are still linked (assuming you already linked to the images in your code before hand).
  2. Or just remove it completely: border: 0;
  3. Err

    Php Memory

    Another Update: I'm not sure why but when running on a Linux system is reads the file A LOT faster. Instead of the 2min 30sec per user, it runs one user every 20 secs, which is great!
  4. Err

    Php Memory

    Update: So I went with reading the files line-by-line, it takes considerably longer to process but I don't get any memory errors nor weird bugs. Takes on average of 2min 30sec for the script to complete instead of the way I was doing it before which was around 30-50sec. I don't suppose there is any way I can speed that up?
  5. Err

    Navigation Assistance

    Thanks to Chrome, I think I narrowed down your problem. In your styles.css (linked here) find: #access ul ul { -moz-box-shadow: 0px 0px 10px #999;-webkit-box-shadow: 0px 0px 10px #999; box-shadow: 0px 0px 10px #999; display: none; position: absolute; top: 37px; left: 0; float: left; padding:10px 0 !important; width:auto; white-space:nowrap; z-index: 99999; } In that code, find: top: 37px;. change that to something lower, like top: 28px;
  6. Err

    Php Memory

    I see. The files are considerably smaller than 1.7GB in size, it's in 8 - 693MB range. What I'm doing is looping through all the logs (have 4 of them) and extracting the strings I need twice over since I'm extracting two different set of strings without stopping.
  7. Err

    Php Memory

    I am reading the entire log then searching the file for certain strings and cutting them out of the log until I have everything that I want. How is reading it line by line going to help?
  8. Err

    Php Memory

    I'm working on a script that works on some users and fails on others. What my script does: - PHP script reading though log files and extracting certain lines from it.- Script extracts IP's and dates through a series of strpos() and substr()- I execute the script through a webpage that targets single users at one time. The log files are sometimes several MB in size. My problem: When I try to run the script on a certain user it will give me memory errors: Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 725359539 bytes) in C:\wamp\www\mc\index.php on line 141 Considering that the log files are big and the massive amounts of work the script has to do, I allowed it 1GB of memory directly in the php.ini file. Now this memory error is telling me that is exhausted all that. So I set ini_set('memory_limit','2048M'); in the script. When I run the script with that kind of memory, it doesn't generate any errors but what it does is simply remove the bottom half of my webpage. I always have error_reporting(E_ALL); and ini_set('display_errors', 1); set on all my pages. Line 141 contains: $str = (!empty($dts)) ? min($dts) : $str; Which is basically me assigning the earliest date in the $dts array to a return string. Else, it returns an error string. I can't figure out what's wrong. Could really use some help.
  9. Your very last IF statement is assigning 0 to $error instead of checking for it. Change it to if ($error == '0') {, note the two equal signs.I'm just making an observation here but variables should start with a letter and not with any other symbol. So you can't do $####, try to change it to a word that has meaning.
  10. Are you wanting to use the mailto to send a link to the body of the email? If so, something like this would work:<a href="mailto:example@example.com?subject=A Subject&body=A Link">Mail To...</a>If you want something a little more dynamic:http://webstudio.wikispot.org/mailto_link_...e_and_body_text
  11. You can with JavaScript but you shouldn't relay on it removing the cell. JavaScript can easily be turned off or disabled through extensions. Best way to go is to remove the cell from the code.
  12. Check if there is a $splitemail[1]. var_dump($splitemail);Removed the double quotation marks around $splitemail[1].
  13. You can if you go with JavaScript. Check out this website:http://www.dynamicdrive.com/dynamicindex4/index.html
  14. Err

    TEXT type reading as BLOB

    I got it. I used: mysql_query("SHOW FIELDS FROM table");Gives me the right type.
  15. I'm trying to get only true BLOB's out of the database and encode them, problem is the TEXT types are also read as BLOB's so my script is encoding the pain text. Is there any way I can differentiate BLOB between TEXT?
  16. Err


    Don't know if it will help but you're missing an 'e' on 'type' for type="text"
  17. Thanks, are there any other possible ways I can do this while keeping the info secure? I can only think of one other way that is secure, and that is to have the script create a separate PHP file then have it reference that.
  18. The time may be overkill but you will need the date the members registered. Then compare that date with today's date, if X amount of days have passed since they registered, send the email out. if ($date_registered < $a_difference_of_a_week) { // send out emails} You will also need to make sure that this script only runs only one time a day, when I did something like this, I had a database field with the date the script last ran. If the date was yesterday, the script would run and update the date in the database and set it for today. So something like: if ($today != $date_script_last_ran) {// run your emailing script// update date in database and set for today}
  19. I'm creating a database manager of sorts that can be easily installed. What I'm trying to do is use a cookie to save DB info so the next time the user logs in to this page it auto-fills the DB info. The image below shows the DB info (already inputted from another page) taken from the cookie and displayed in settings tab. The problems is, I hear using cookies to save info like this is a very bad idea unless you're using SSL (which I'm not). I thought about just using sessions but I want the DB info saved for at least a period of a month and sessions do not last that long. This application is meant to be mostly plug-'n'-play, so the DB info cannot be stored/retrieved from any database.My question then is, since this is single-page application that only administrators will be seeing and it's password (sha1) protected, would it be less of a security risk to go with cookies?
  20. Thanks for your help, justsomeguy. I figured it out what was wrong. I wasn't accounting for the htmlentities, not the < itself but the < which makes a lot more characters.
  21. I'm trying to get the correct length of a string, but for some reason the string length is wrong. I narrowed it down to a line that has preg_replace() which replaces a term in the string with one with <span> tags around it. For example, if I searched 'cat' I would get <span>cat</span>. Anyways, after the string goes through the preg_replace the string length gets a lot bigger than it should be, even with all the <span> tags accounted for. I can't seem to figure out what is going on with it. It works fine for some strings but certain strings are completely off. I've used the exact same method by itself and I can't repeat the results. I have error reporting on but not like that's any help for this. Has anyone had any similar problems with this or can help me nail down what the issue is?The below code works fine, (small scale example of what I'm working with) but I can't figure out why it's not working on my project. $str = "Looks good, but personally liked the layout of the old site. Like the interactive capabilities so you do not have to email for new or editing of postings. For open games link, need to also add boys/girls option on the advance search. Needs info on upcoming ####o conference. Was never posted on the old site either"; $str = preg_replace("/o/i","<span>o</span>",$str); var_dump($str); Here is part of the code I'm actually working with:$row[$i] is where the string comes from$txtSrc is the text searched, could be anything for ($i = 0; $i < $cnt; $i++) { $rowIdx = ""; $des = $row[$i]; // cut string at 1k characters if (strlen($des) >= 1000) {$des = substr($des,0,1000);} if ($txtSrc) {$des = preg_replace("/$txtSrc/i","<span>$txtSrc</span>",$des);} $des = htmlentities($des,ENT_QUOTES); if (strlen($des) >= 1000) { $des .= err("<a href=\"#\" onclick=\"showMore({$rowCnt}); return false;\">... [Show More] ...</a>"); $rowIdx = " id=\"show{$rowCnt}\""; } if ($txtSrc) {$des = str_replace(array('<span>','</span>'),array('<span>','</span>'),$des);} $txt .= " <td title=\"$tbl - $nam[$i]\"{$rowIdx}>$des</td>\n";}
  22. Please post your HTML, and when you do so please put them in tags.
  23. Validate your HTML. Warnings/errors will show up then you can go through the list and fix them. This is the first step in getting the most cross-browser compilable webpages (or to the layman, getting your webpages to look good no matter what browser people are using).http://validator.w3.org/
  24. Your CSS starts like this: height : 300px;/* add background image */background-image : URL(images/grroop-top-island.jpg);/* display background only once */background-repeat : no-repeat;/* center heading division on page */margin-left: auto;margin-right: auto;} But it should start with something like this: #center-page {height : 300px;/* add background image */background-image : URL(images/grroop-top-island.jpg);/* display background only once */background-repeat : no-repeat;/* center heading division on page */margin-left: auto;margin-right: auto;} Also, in your CSS on your #left id you don't end your comment correctly. You need to add what is green and remove what is red. This is what is most likely giving you your problem....background-color: #FF8040;/* set left margin *///margin-left: 50;...
  25. Not sure, but I know you're missing a closing </div>, your overflow: auto is missing an ending semicolon, and the beginning of your CSS is cut off.
  • Create New...