Syndicate content


Database driven CMS running using PHP.

My Embedded YouTube Video Disappeared

Embedded videos from used to work just fine on my website.

Today, though, I just noticed that my video was not showing up on one of my pages. Looking into it, I found out that the problem was the protocol.

I'm not too sure whether it was my browser or YouTube,com (although I'm not too sure how would know...) but the fact is that the iframe source was using HTTP and the page I was viewing used HTTPS.

By editing the page and changing the video from HTTP to HTTPS resolved the issue. It is generally much better to always use encryption anyway.

CRON Drupal says "HTTP/1.0 302 Found" about "/cgi-bin/ipdiags.ha" (AT&T U-Verse)

I run a few Drupal website and once per hour I run the cron.php script. I do it only once per hour because nothing changes so often on my websites so it would require faster refreshes.

Once in a while (relatively rarely now) I get a list of errors from CRON saying that the checks failed. The errors look something like this:

HTTP/1.0 302 Found
Location: /cgi-bin/ipdiags.ha
Pragma: no-cache
Content-Type: text/html

<html><meta http-equiv=Refresh content=0;url=/cgi-bin/ipdiags.ha>

As you can see, this is a 302 so a temporary error. ...

Bad move for PHP unpack()! So unpack() stopped working?

Today I noticed many errors on one of my websites. Looking closer into it, I noticed that the code for the mo_references Drupal module stopped working.

It took me some time, especially because the code seemed to work just fine as all the files could easily be displayed.

Actually, that was not the case. The unpack() character 'a', which I used, was transformed from a simple string that gets trimmed, to all the characters, including the NULL characters. Ouch! Now we have to use the 'Z' character instead.

I use it to unpack() a tar file by loading 512 bytes of data in a ...

"Your server runs WebDAV!" But how do you know?

Just got told that one of my servers was running WebDAV. I used that before so I thought it was turned on. Checking at the server, I could not find anything about DAV that was turned on in my server...

So, how could they detect WebDAV and not me??

The fact is that by default Drupal doesn't check the HTTP query method. It should! In fact, Drupal happily answers all methods with an HTML page. So I did not have WebDAV, just a flaky CMS.

How can you test methods that your server supports?

Knowing your IP address and port, use telnet like this:

telnet IP port (i.e. telnet 80)


jQuery and hidden IFRAME bug

In the last 3 days I've been working on a new page and ran in some strange problem. There was an error in the console but things seemed to otherwise work just fine so I ignored it (since it wasn't in my own code...)

That error was an unhandled jQuery error which resulted in "let's stop the JavaScript at once." This meant all the page initialization failed (or did not occur.) The code was there otherwise. What give?!

The script in question was loaded from a hidden IFRAME, something like this:

  <div style="display: none;">
    <iframe ...

Drupal blocks all disappeared!

Today I had an interesting experience... all of a sudden, all the blocks of a given theme disappeared.

It has been working just fine for months, so I really wasn't sure what the heck it could be.

The fact was that the theme was called the same as the module (as I work for a given client, I tend to do that...)

At some point, I must have added a function with a specific name and that would influence the theme. The result being blocks going bye bye!

I checked and the block content is computed just fine, the problem is the theme('block', $block) call. Although the ...

get_defined_vars() PHP function

Once in a while, I need to get the complete list of all the variables available in a PHP piece of code.

This is done with the get_defined_vars() PHP function. It's very simple, it returns an array of name / value pairs. You can then print that value using print_r() or var_dump().

That's it!

VTune "New Analysis" button disabled

Yesterday I installed VTune on a system at one of the companies I'm working with. It worked like a charm and I could run a few analysis and see problem areas in the system.

Later I worked on another C++ project in Linux, this morning I woke up on MS-Access, and did a little Drupal after that (PHP). I came back on Visual Studio C++ and... the VTune button is disabled! Not available at all somehow and no error message or anything!?

Turns out, like yesterday I had to start the VTune version of Visual Studio! Without that special version, it simply doesn't work, but it still appears and ...

Drupal paths that won't work!

As I created a new site to list all of my accounts on the Internet, I thought the folder where those accounts appear should be called profiles. But somehow autopath did not generate the URL Alias as expected.

I tried several times and each time it returned an empty alias. Then I tried adding the alias by hand and that was accepted by Drupal, but when I then tried to go to that page it failed with an Apache error which at first I found odd. Then I recalled that there was a folder named profiles in the top directory of Drupal. The Drupal code (from the

cellpadding="..." and cellspacing="..." not working

Today I was trying to create a table in a post and just could not get the cell padding I wanted. Without the padding the data is all cramped together which did not look the way I wanted (see Alexis Wilke Accounts.)

I knew I had the following entry in my CSS but did not think it was stronger than the table cellpadding and cellspacing specifications because I thought it worked for me before!

* {
  margin: 0;
  padding: 0;

I was wrong, that definition applies to the td with a greater constrained. So I had to add another entry. I solved the problem using a td definition like this:

Syndicate content 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
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165


Terms of Site Index

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