Syndicate content

Pages with category Web Server

  • With Drupal, it is possible to have many sites defined in many different ways.

    These are the things you can have in your URL that Drupal will understand and use to configure your site. The configuration file is called settings.php and will reside in a folder of which the name is determined using the URL used to access the site.

    1. Fully qualified domain name

    2. Port

    3. Path withing the website

    Sites are expected to be found under the 'sites' folder found in the same directory as the index.php file.

  • See attachment at the bottom for sample code that fails in different versions of PHP 5.2.x

    Today a customer told me that his pages disappeared on his Drupal site.

    I looked into it and after a few hours determined that a module was the cause. Then I looked in the module and the only part I could see that could possibly be wrong was the preg_replace_callback() call.

    So I got the input data from one of my customer pages and run the PCRE against it in an interactive version of PHP. That gave me the same result: nothing.

    The expression started with (?:<p.*?>)?\[ and it used the /s ...

  • I use all sorts of tricks in order to duplicate functionality without actually duplicating PHP code.

    One of the main, easiest way under Unix is to create softlinks. First put all your code in one folder, then create a softlink to it. That gives you two paths:

  • Today I helped a customer get a PECL extension going. The first error I was getting was as follow:

    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/http.so' - /usr/lib64/php/modules/http.so: cannot open shared object file: No such file or directory in Unknown on line 0

    Obviously the extension was not yet installed... I run pear install pecl/pecl_http in order to get it to work, which it did after I installed the C compiler, the curl header files, and a few other things.

    After a few minutes, I got the message:

    install ok: ...

  • When you use a PostgreSQL database, it gets vacuumed every night (by default on most systems, verify on yours, it may not be the case...) This is a quite simple process to make sure that the database remains fast. And it works great, also. You can have millions of entries and it remains very fast (they have real good algorithms to auto-generate index files as required by your repetitive queries.)

    The problem is that tables are being grown for 24h and then they get cleaned up. They can then grow again for 24h. If you don't clean up, the tables continue to grow, fast. Up to the point where ...

  • I've been trying to send a POST to Apache 2.x using cURL. In itself, that's very easy to do. However, I run modsecurity and when cURL sends a POST that's too large, it actually decides to break the transfer down using an Expect: 100-continue header. That in itself sound good.

    Some people said that you could override the Expect by adding the curl option to add a header like this:

      curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));

    This sounds all nice, however, it only removes the header from the request, it does not prevent the errors with modsecurity. Not only that, the curl header

  • I wanted to dynamically manage the attributes of the HTML tag. As I'm working on the Snap! C++ system, I thought that should be done with the standard XSLT feature: <xsl:attribute-set name="...">. Unfortunately the the XQuery implementation does not currently support such, at all.

    There is a way, though, to still make it work with a central template definition which can be used to decide what should be and what should not be added to the HTML tag.  Especially, in this way we can make use of one template that is a system defined template. This being said, if you use ...

  • After about 2 hours of search, I finally got it. All the docs were telling me do this:

    	var f = document.getElementById('myform');
    	f.action = url;
    	f.submit;
    				

    And it did not work. I was getting an error. So thinking that this 'action' is an attribute I used f.setAttribute('action', url);. And that worked great with Sea Monkey, FireFox, etc. but one day we tried under Internet Explorer. That one was not working somehow. Reading some notes on the net, indeed, setAttribute('action', url)is no good under Internet Explorer. But f.action = url;generates an error?!

    After ...

  • When I create a new DigitalOcean droplet I have to run a few commands that I don't otherwise use very much at all so I was thinking that adding them here would make it easier to remember.

    First if you setup an SSH key on DigitalOcean before you create the servlet, then you will be able to access the server root account with SSH.

    ssh -l root -i <path-to-key> <ip-address>

    IMPORTANT NOTE: Although you will have access with an SSH key, the system will ask you for a root password if you use the wrong key. So make sure to use the -i option if you have multiple keys and the one ...

  • Ubuntu Installation

    In the last few days, I've been testing SquirrelMail. It's neat. Really ugly, but neat as it is very small and still quite functional.

    To install on Ubuntu, just use apt-get install as in:

    apt-get install squirrelmail

    The available plugins as of Ubuntu 10.04:

      squirrelmail-compatibility - SquirrelMail plugin: Let other plugins work with older/newer SM versions
      squirrelmail-decode - SquirrelMail support for decoding exotic character sets
      squirrelmail-locales - Translations for the SquirrelMail Webmail package
      squirrelmail-lockout - SquirrelMail plugin:
    
    
Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Salesperson
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • inside
  • INTO

    An SQL keyword used right before the name of a table where data is to be inserted. It is used with the INSERT and the SELECT keywords.

  • IsMissing
  • recordset
  • tab