Jump to content

mens

Members
  • Posts

    52
  • Joined

  • Last visited

    Never

Everything posted by mens

  1. On my local test machine, running WinXp SP3, I've got xampp and wamp. Both of them service different purposes, and was was always running smoothly. Yesterday, I upgraded xampp PHP version to 5.3.2 manually, I didn't re-install the whole xampp because I did not want to lose my current configuration files. The thing now is: apache won't start, logs holds nothing. System event viewer says that "libapr-1.dll" is, and I'm quoting... "faulty". In addition, a error dialog apears when starting httpd, saying that memory can't be read, and refers back to "libapr-1.ddl". I have searched google, and no solutions have been posted there. Xampp and Wamp are shutdown, and when started doesn't show any active service. I've run netstat -a -b, and it doesn't show any port open for 80 or 443. Later, I ran nmap -sS to see if WinXP isn't lying, and sure enough, it picked up that ports 80 and 443 was open, though mysql wasn't. When trying to browse port 80 in my browser, it does actually load, but at very slow speeds and then fails for anything else browsed. When trying to start apache, it gives me an "failed to 'read' memory. Another thing, when starting Apache manually(httpd -k start), it always says that the pid file existed at time of execution; even though I tried to delete the pid file. At this point, reinstalling apache won't work, as "some" previous instance is already active. Does anyone have ideas why this is happening, and how I could repair it? Any help is appreciated. Edit: if anyone knows how to kill the process, or a utility that can, that'll also work.
  2. I found this a while back: http://technophiliac.wordpress.com/2008/05/28/ever-wondered-how-gmailfacebook-chat-works/ It may offer an explanation to you, as I also don't know exactly how it works. Edit: look at this as well.
  3. You can use CSV files, or XML - your choice. Unfortunately for you, fopen() is your best bet when working with file manipulation techniques. There's also file() and file_get_contents() though.
  4. As you said, it may get large. MySQL wouldn't be your answer then, unless you clear logs on a daily basis. I'd suggest using files for the chat logs, and dividing them by hour, day or week depending on the size of them. The is, by using MySQL for this, you would need to select through thousands of chat message entries, which would make it very slow indeed. With files, you can specify the size of the files, and instantly create a new file for chat messages as needed. This wouldn't affect performance as much as a MySQL database design would.
  5. Try without the money() function, as it is pointless anyway. <?php $income = 5000000000; $daily = number_format($income*24,0); $weekly = number_format(($income*24)*7,0); $monthly = number_format((($income*24)*7)*30,0); ?> <html> <center> <table border="1"> <tr> <td>Daily</td> <td><?php echo $daily; ?></td> </tr> <tr> <td>Weekly</td> <td><?php echo $weekly; ?></td> </tr> <tr> <td>Monthly</td> <td><?php echo $monthly; ?></td> </tr> </table> </form> </center> </html>
  6. The variables need an ending semi-colon(, or else it will show syntax errors.
  7. I can't think of any tutorials for this specific task, but I would suggest reading up on jQuery. It makes working with Javascript much easier. Here's a guide on checkbox/radio manipulation with jQuery: http://www.techiegyan.com/2008/07/09/using-jquery-check-boxes-and-radio-buttons/
  8. I'm using Chrome 10.0.648.205. As for the sorting and images, I can suggest Quicksand. It could be a valuable plugin to use for your images.
  9. Using Javascript would be your best solution, and less time consuming on your part. By adding an onclick property to the checkbox, you can alter the display properties of a specific input element causing it top appear. The back-end of this, would be simple: if the specific checkbox is selected validate the input element - else, don't. This can be done with PHP, sure. But the user will need to submit the form, and you need to validate it and generate the HTML for the input element; and then output it... again.
  10. There are many other jQuery plugins that you could use. Just search on the jQuery website. I'd suggest this.
  11. 1. Please obscure or remove your email address. 2. Google, and learn.
  12. By looking at your script, pre-appending to $fullpath should do the trick. Or manually, you can edit the fopen function, eg.: $path = getcwd() . '/DIR/'; $x = fopen($path . $fullpath,'x');
  13. I'm loving the design, so simplistic and elegant. What I don't love: All the images are loaded, whether I like it or not. The images, could use a plugin like FancyBox, instead of going directly to the image. The "What I'm about" section by the contact form, not liking the contrast between the black background and white text. One thing worth mentioning about one page websites, they are load intensive, and since you have a lot of images being displayed I'd prefer the option to load the different sections on command. Other than that, good job.
  14. Try: SELECT COUNT(*) as `filled` FROM `done` WHERE DATE(`date`) = DATE(NOW()) GROUP BY `user_id` Hope that helps.
  15. Whoah, PHP4 hey? Anyways, the manual has a lot of valueble information on this, see the use of POST and GET global variables here. Although, it is still possible to use a PHP4 method, using HTTP_POST_VARS. The basic usage would be: if (!empty($_POST['name'])) { $clientName = $_POST['name']; } { ... HTML ... } <form method="post"> <input type="text" name="name"> <input type="submit"> </form>
  16. I'm sorry if I sounded harsh about it, but many, many people ask about this topic. What I said may not be 100% correct, as there are methods to blocking proxies themselves, but lists aren't 100% accurate, though they are your best bet. I'd suggest looking into something like DNSBL, which is a list of know spammers/offenders.
  17. Proxies aren't meant to be detected, well not the ones people will use to create multiple accounts on your website. The short and simple answer to this, is: Forget it, there is no way you will be able retrieve the "real" IP address of someone behind an anonymous proxy. If they had malicious intent, you can contact the proxy administrator and request the originating IP address. This still may not be the real IP address.
  18. Hi there, Image upload via PHP is a very simple thing, and easy to do as well. The client-side setup for it, requires a form with an input type of "file", eg. <input type="file=" name="image">. In addition to that, you need to specify the enctype type of form as well, eg. <form method="post" enctype="multipart/form-data">. The back-end of it is also simple, you can use the $_FILES global for this: which is an array containing information about the uploaded file. You would typically move the uploaded image to a directory of your choosing, as it saves it by default in the PHP temporary folder. After that, you would just add a column to the database, such as "image_url", and then assign the image file name to it. There are many great tutorials for this, and many methods as well. Just do a Google search for tutorials.
  19. No it wouldn't, PHP doesn't support SQL statements. Look at strstr() or preg_match().
  20. mens

    php wap

    I'm afraid I don't know exactly what the network technology is called, but it's similar to SMS or Pager networks. This won't be able to be done in PHP unfortunately, mostly because it would not be practical. You could try and use an SMS method, where the client SMS's in and the SMS is an action. This is also not very practical, as it is money consuming. I'd suggest dropping this idea, unless you're working for a client with a sizable company.
  21. As said, you will need to be able to store the game data. So PHP is the logical choice. But good luck.
  22. How does the email actually look? Your script looks fine to me. But it'd also suggest using a pre-constructed class such as Rmail, as it makes life much easier.
  23. mens

    Hello

    Hello people, I started PHP a few years back, when helping out family create a website. From there I just further educated myself with stuff like, Javascript, CSS, MLs and a few more. I like to create totally pointless stuff, such as Nutshell games. I've got to much free time on my hands these days, so I decided I would do something productive with it. Searched Google for "PHP help forum", and I came here. Quite enjoying it, apart from the idiots who can't speellz hph. Oh, and I play guitar as a second hobby. That's pretty much my story.
  24. Ah, sorry about that. I didn't see the additions. If I can be honest with you here, you're really not going to get any form of accurate result form PHP. What I can suggest though, is using Javascript to determine how fast the client is receiving the data from the server. Basically the other way around from this. But, if it need be in PHP, then you will need to dig deeper and use system specs, and a variety of memory, cpu and network tests to make this as accurate as can be. This, still would not be correct as to how fast the client is receiving it though. For that, you will need to combine a Javascript method and send back the data to the script, to be recalculated and resent to the client. Only then, will you know more or less accurately the time from the script's initiation to the client reading the data.
  25. Thank you for clearing that out, and thanks everyone for your advice.
×
×
  • 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.