Jump to content

corbin

Staff Alumni
  • Posts

    8,102
  • Joined

  • Last visited

Everything posted by corbin

  1. Look into setTimeout. setTimeout('functionThatHidesDiv()', 10000);
  2. I suggest finding the error log then... You could enable error output in PHP (add to the top of the page): error_reporting(E_ALL); ini_set('display_errors', '1'); Or, you could find the error log: find . -name error_log Or: find . -name httpd.conf (or maybe apache.conf) Then: grep ^ErrorLog <file returned from find>
  3. http://pear.php.net/manual/en/installation.php PEAR is not installed by default, so I bet when the server was upgraded, PEAR is no longer installed. Don't know why I didn't think of that >.<. The error log is in different places for different systems. I'm sure it would be in the Apache log, but no idea where that is either on your system. You could try looking in /var/log/ for Apache looking files.
  4. Does the directory C:\Server\Website\htdocs\Server\tmp\ Exist? That's a kind of strange session save path. Perhaps you meant to set it to \Server\tmp instead of ..\Server\Tmp?
  5. Have you checked the error log or turned error reporting on? I figured it was GD, but I guess not, so finding the error reported will be a bit faster than guessing. My second guess though, is that TTF support isn't in PHP on your box.
  6. It's worthing looking into it since that would be a cool feature for phones to have, but I don't think any phones' browsers have a JS API for location. You could probably google for the docsof a couple phones though and see.
  7. You'll need to figure out what library PHP was using to generate the CAPTCHAs. I would assume that it's GD. Anyway, you'll need to enable (or install) the php_gd extension. Get in a shell as a root user (or use sudo) and do something like: apt-get install php-gd Or yum install php-gd (Depending on your distro)
  8. Does config or make output any errors? Also, make sure the native driver for MySQL is building correctly. Also, you might have to set yum to use an alternate repo to do PHP 5.3. As for which repo, no idea . (CentOS tries to stay very stable and what not, so sometimes they lag behind quite a bit in new software. As such, the yum repo from another distro might have PHP 5.3 in it.) Edit: If you look at http://php.net/downloads.php on the left PHP suggests http://iuscommunity.org/ as a possible repo for PHP 5.3. So, you could try something like: Make a file in /etc/yum.repo.d/ called ius.repo with: [ius] name=IUS Repo baseurl=http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ gpgcheck=1 Then run something like: yum --enable-repo=ius install php53 (If you had another version of PHP installed from the main repo, you would probably have to remove it first.)
  9. To do that, you would need access to the location handling stuff in the phone. In other words, the location stuff is most likely handled on an OS level. So, an app (think about an iPhone app for example) might be able to access the API to retrieve location information, but as far as accessing location information on a web page, JS would have to be able to access an API in the browser which would then have to access something in the OS. So, possible? Maybe. Would depend on the phone. I would guess no though.
  10. echo nl2br(<variable that contains message from DB>)
  11. Hmmmm, I think you misunderstand nameservers a little bit. A nameserver in the context that you mean it is exactly the same as a DNS server, just at a different level. Apache is what controls what directory is served, not a nameserver. A nameserver controls what IP address a hostname resolves to. Basically you'll need to setup named based virtual hosts on Apache (very easy... There's probably even a template config file around your system somewhere if you used apt or yum or something). And then you'll need to configure your DNS stuff. With the nameserver stuff, you'll need to tell a higher level DNS server where to send requests for your server and then you'll need to configure your nameserver to resolve requests. The following should explain: http://www.howstuffworks.com/dns.htm http://www.webmasterworld.com/forum23/3009.htm Basically you'll need to create a record with a registrar so your nameservers can be resolved then you'll need to set up records on your nameserver.
  12. Have you updated iptables to allow incoming port 80 through? If you request the page on the server, does it work, or is it messing up locally and remotely? (If you don't have wget or lynx or anything, you could always use telnet and HTTP headers to request a page.)
  13. Hmmmm.... I bet Apache is setup to not allow that in .htaccess files... You might have to go the PHP route. A possible way to do it site wide though could be to use (in an htaccess file): php_flag zlib.output_compression on (Chances are though, if you can't do it the other way, you can't do it this way either.) Maybe you should ask your host how they suggest you set it up? Basically if they've given you access to do it with Apache directives or if you'll have to do it on a PHP level.
  14. "optimising it for each different system I use it in." The performance gained by compiling Apache for each system is typically very, very small. Anyway, how did you compile Apache/PHP, and how have you configured Apache to use PHP?
  15. I believe reCAPTCHA has a listen to option. It would be an external solution, but it would work.
  16. (Disclaimer: I'm by no means a genius with PHP or any language, so feel free to assume I'm just crazy in the following post.) I suggest just learning as much as you can. The thing I often see people forget with that approach though is that you can't jump straight from square 1 to complex OOP patters and interactions and whatnot. As boring as the middle stuff is, it is necessary. Basically I would try to find new things, and if you don't understand it, break it into parts and learn about each part until everything does make sense. As far as involvement in an open source project goes, I doubt you'll be able to contribute to one while at a beginner level. Not that anyone would have anything against you or anything like that, it's just that open source (well, all projects really) strive to be as good as possible, so the higher the skill level of people the better. You could always try to think of something yourself though. It would probably suck in the end (just assuming, I could of course be wrong) unless you entirely rewrote it once you had learned more, but it could be a good learning experience. Also, letting other people see your code can sometimes help a lot. Numerous times on here I've posted a solution to someone's problem and someone else has come along and showed me a better way to do something. The same thing applies to just sharing code in general. Anyway, good luck and I hope you enjoy programming.
  17. class SomeClass { public $somePublic, $someOtherPublic; private $somePrivate; public someMethod() { } private somePrivMethod() { } } Sometimes I'll prefix private methods with _ if there's also a public method with that name (obviously since I have to) or if I think someone else might ever modify the code. Also, with camel case I'm entirely random. Sometimes I use it, and sometimes I don't. I do try to be consistent with camel case in projects though.
  18. Random.... Perhaps you had a bit of that champagne?
  19. This is kind of random, but how are you checking if it's compressing the page or not? If there's not an error when you remove that, you seem to have mod_deflate installed. Hrmm, instead of doing it by mime type, you could try: <FilesMatch "\\.(js|css|html|htm|php|xml)$"> SetOutputFilter DEFLATE </FilesMatch> (http://brightscape.net/blog/compress-your-web-pages-with-mod_deflate/)
  20. 15 minute orgy scene in the second one? Maybe I should get around to watching the second one... (Only seen the first lol.)
  21. That accept encoding stuff is client side. Hrmmm, you could try this: <IfModule mod_deflate> AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css </IfModule> The easiest way to check if mod_deflate is enabled or not would be to just remove the IfModule and leave the AddOut... line and see if it's a 500 error. (The 500 error from the mod_gzip stuff means that most likely mod_gzip is not enabled.) Do you happen to know what version of Apache is running? An easy way to determine that is either phpinfo() or do the following in command prompt: telnet yourwebsite.com HEAD / HTTP/1.1 Host: yourwebsite.com Connection: close (Double enter after it) And see if there is a Server: line in response.
  22. Hmmm... Do print_r(apache_get_modules()) on a PHP page (assuming you're running PHP 5), and tell me if mod_gzip or mod_deflate is installed.
  23. I'm guessing that he's trying to do SEO in regards to the new Caffeine technology. Which seems very pointless to me.
  24. It doesn't work like that. It only requires it once during the execution of that PHP run. Any other sequential php.exe instances running will re-require it.
  25. Under Windows, separate commands on 1 line with &&. Example: dir && dir Woudl run dir twice.
×
×
  • 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.