Dreamweaver public beta

As promised, Adobe is releasing a public beta of the next major version of Dreamweaver with a dark UI and integration of Brackets as the code editor. The Dreamweaver CC 2017 beta is available to anyone who has an Adobe ID. You don’t need to have a subscription to the Creative Cloud.

I’ve been experimenting with the beta. Apart from the changes in the UI, it’s heavily geared towards web developers who are comfortable working directly with code. Here are my initial impressions.

First up, it’s important to point out that this is a beta. Don’t expect everything to work 100% smoothly. Continue reading

Posted in Dreamweaver | 9 Comments

Enabling advanced features in phpMyAdmin

A subscriber to lynda.com was watching my Up and Running with phpMyAdmin course, and was puzzled by the absence of three fields in his version of phpMyAdmin when defining a table. The three fields are Mime types, Browser transformation, and Transformation options. In my opinion, they don’t serve a really useful purpose because I strongly believe that you shouldn’t store images or audio files in a database.

What puzzled me, though, was why the fields should be enabled in my version of phpMyAdmin, but not in his. It turns out that the fields are part of phpMyAdmin’s advanced features that depend on configuration storage being enabled. I’m using a recent installation of XAMPP on Windows, whereas the lynda.com subscriber was using MAMP on a Mac. XAMPP installs configuration storage automatically. MAMP doesn’t.

Although I’m not a fan of phpMyAdmin’s MIME and transformation options, configuration storage does enable some pretty useful features in phpMyAdmin, such as bookmarking SQL queries and storing table relations. So, I pulled out my Mac laptop, and decided to enable configuration storage, thinking I would be finished in 20 minutes or so. It turned out to be a lot more difficult than I anticipated.

Once I finally worked out what needed to be done, the procedure turned out to be fairly straightforward. One of the most important steps was closing down and relaunching phpMyAdmin after making all the changes. I’ve added a step-by-step guide to enabling advanced features in phpMyAdmin in the tutorials section of my site. I hope you find it useful.

Posted in phpMyAdmin | 2 Comments

Two PHP courses just published on lynda.com

I’m delighted to announce that lynda.com has just published two new PHP courses that I created recently. The first one, PHP for Web Designers, serves as a gentle introduction to PHP, and is aimed primarily at web designers who have little or no previous experience of programming. It’s a mixture of simple exercises that demonstrate basic techniques, combined with practical examples of incorporating those techniques into an existing website. Among the topics covered are:

  • Moving common page elements to external files using server-side includes
  • Displaying different text and images depending on the month or season
  • Gathering and processing user input from an online form
  • Displaying the results from a database query
  • Creating a page to display product information drawn from a database

The final chapter is devoted to dealing with common PHP error messages. Each video in the chapter deals with a different error message or problem, explaining what the message means, and how to fix it. The following video explains what to do when you get a completely blank page.

The other course is Up and Running with phpMyAdmin, which teaches you in two-and-a-half hours probably all you need to know about administering MySQL through phpMyAdmin’s web-based interface.

PHP for Web Designers is longer (5 hours 26 minutes), but each video is devoted to a single topic, allowing you dip in and out as you please. It’s been released just in time for the Christmas/New Year break. So, if you’ve been putting off learning PHP, now’s your chance. If you don’t have a subscription, why not get 7 days of free unlimited access to lynda.com, and try out my courses?

Posted in PHP, phpMyAdmin, Video | 4 Comments

Avoiding email header injection

Barely a week goes by without someone asking for help with a PHP mail() script that uses one of the most insecure techniques—inserting unfiltered user input into the headers argument. It exposes your server to email header injection, an exploit that can turn your website into a spam relay. This exploit has been known for many years, and I warn about it in all the books I’ve written on PHP. But beginners still blithely ignore the dangers.

The problem is that the fourth argument to the mail() function lets you specify custom headers. So, it’s become almost routine to create a From header with the user-submitted email address. There are two things wrong with this:

  • The From header is meant to indicate where the email originated from. When you use the mail() function, it’s your website that originates the message, not the person submitting the form. If you want to use the submitted address, it should go in a Reply-to header.
  • You should never trust user-submitted input without checking its validity. Email header injection relies on unfiltered data being passed as the fourth argument to mail().

What happens is that the attacker uses the email input field to inject Cc and Bcc headers plus a replacement message body. Avoiding this problem is simple. All that’s necessary is to check the validity of any values that are added to the headers. I’ve created a simple tutorial explaining how to do it—and keep safe.

Posted in Books, PHP | 4 Comments

IE 10 fails to display styles locally

I’ve just spent the last couple of hours battling with Internet Explorer 10 failing to render styles when viewing a web page on my local computer. The problem was with a static HTML page loaded directly from the local file system, not served through localhost. The page displayed correctly in other browsers, so there was obviously nothing wrong with the code. In fact, I had viewed the same page several times before in IE 10 without difficulty. For some reason, it was now ignoring my styles.

I launched the IE Developer Tools, and eventually found this error message in the Console after reloading the page:

“CSS was ignored due to mime type mismatch”

Googling that phrase made me realize I was far from alone. The culprit appears to be installing a new program that automatically associates itself with CSS files. The frustrating thing was that none of the forum posts and articles I read seemed to point to a solution that would work for me.

After fruitlessly poking around in the Windows Registry, and trying to change file associations in the Control Panel, I found a utility called FileTypesMan that solved the problem for me in minutes. It’s freeware created by NirSoft, and is compatible with any version of Windows from Windows 98 to Windows 7 (I don’t know about Windows 8). It turned out that the MIME type of .css files had been changed to text/plain, preventing IE 10 from rendering my styles. Using FileTypesMan to change it back to text/css fixed the problem.

  1. Download FileTypesMan from the NirSoft site. Use the links near the bottom of the page to select the correct version for your operating system (there are different versions for 32-bit, 64-bit, and Windows 98/ME).
  2. Unzip the files to a local folder, and double-click FileTypesMan.exe.
  3. When FileTypesMan has finished listing all file types, scroll down in the top pane to find .css.
  4. Double-click to edit the settings.
  5. Change the value to text/css in the MIME Type field in the dialog box that opens.
  6. Click OK. Job done. IE 10 should now behave itself (well, at least as far as rendering style sheets is concerned).
Posted in CSS | 4 Comments

Linking to specific panel or tab in jQuery UI widgets

Dreamweaver CC has replaced its Spry widgets, such as accordion and tabbed panels, with jQuery UI equivalents. This means that one of my most requested tutorials on linking to a specific panel or tab needed to be rewritten for jQuery UI. The jQuery UI version is here. If you’re still using Spry, the Spry version is still online.

Unlike Spry, jQuery doesn’t have a built-in method for extracting the values from a URL, so I have created a simple JavaScript function that takes as its argument the name of a variable passed through a query string and returns its value. All you need to do is to copy the function definition, and make a couple of minor changes to the code that initializes the accordion or tabs.

Although I’ve written this mainly for Dreamweaver users, the code is not Dreamweaver-specific. It works with any jQuery UI accordion or tabs widget.

Posted in AJAX/JavaScript, Dreamweaver | 4 Comments

Video review of Dreamweaver CC August update

I’ve been testing the Dreamweaver CC August 2013 update, and have posted a 10-minute video review on YouTube.

The new features in this update include:

  • Live Highlight: this acts as a sort of reverse inspect in Live view, highlighting all elements affected by a CSS selector (useful, but it can get in the way—fortunately, there’s a way to turn it off when not needed)
  • Improvements to CSS Inspect Mode, including dynamic rulers and tooltips with useful information about the current element
  • A brand new colour picker (about time, too)
  • Improved stability in the CSS Designer
  • Support for HTML5 form elements in Live view
  • Improvements to Code view, including automatically highlighting an element’s matching opening or closing tag
  • Synchronization with the Creative Cloud

All in all, I like the improvements. Whether they’re enough to convince non-subscribers to take the plunge into the Creative Cloud is difficult to say. But if you are a Creative Cloud subscriber, I think you’ll like the improvements.

Posted in CSS, Dreamweaver, Video | Comments Off on Video review of Dreamweaver CC August update

Introducing PHP course now live on lynda.com

I’m delighted to announce that my Introducing PHP video course is now part of the lynda.com subscription library. It was originally recorded for video2brain, which was aquired by lynda.com earlier this year. Since the aquisition, video2brain publishes courses only in German, French, and Spanish. As a result, my course has been migrated to the main lynda.com site.

If you’ve got a lynda.com subscription, why not take a look at my course now? And if you don’t have a lynda.com subscription, you’re missing out on a fantastic learning resource (and I don’t just mean my course). As a special offer, why not try 7 days of free unlimited access to lynda.com?

I’m humbled (and proud) to join the ranks of lynda.com authors. The lynda.com library contains nearly 2,000 video courses on every imaginable subject related to design and development. It has also expanded recently into business subjects. The only problem is finding time to watch all the courses that interest you.

I’m currently discussing creating a new PHP course for lynda.com. If you have any suggestions for what you would like to see in such a course, particularly one aimed at web designers rather than hard-core programmers, please post in the comments.

Posted in PHP, Video | 2 Comments

Get up to speed with Dreamweaver CSS Designer at Adobe MAX

Big changes are coming to the way CSS is handled in the next version of Dreamweaver. Normally, authors and beta testers are sworn to secrecy until the new version of a program is released, but Dreamweaver’s product manager Alejandro Gutierrez has posted a video offering a sneak peek of CSS Designer. Although I can’t go into any more details than shown in Alejandro’s video, I can now tell you that my Visual CSS Editing in Dreamweaver lab at Adobe MAX is a 90-minute hands-on session showing you how CSS Designer works.

If you attend the session, you’ll learn how to move elements and background images into position visually, create CSS gradients, and add drop shadows and rounded corners, all directly inside the Document window. This isn’t a throwback to the discredited Layout mode that created horrendous spaghetti code. CSS Designer creates standards-compliant CSS, so it requires a basic understanding of CSS properties and selectors. If you attend the lab, you’ll get a detailed workbook copiously illustrated with more than 100 screenshots showing how CSS Designer works (bring a USB stick to take away the demo files).

I’ve been using this new tool for several months, so am very familiar with its capabilities. Accompanying me in the lab will be several members of the Dreamweaver team, including Silas Lepcha, one of the main product specialists and quality engineers. As well as getting help with any questions or problems, you’ll have the opportunity to give feedback to the team on features you’d like to see added to future versions of Dreamweaver and CSS Designer.

There are two sessions of the lab:

  • Monday, 6 May at 2:45pm (nearly full)
  • Wednesday, 8 May at 11:00am (spaces still available)

If you want to register for MAX, you can get a $300 discount on the regular price using the code MXSM13. By the way, the registration price entitles you to a free 12-month subscription to the Adobe Creative Cloud, which includes Dreamweaver, Fireworks, Photoshop, Illustrator, and much more. If you already have a Creative Cloud subscription, the 12 months gets added to your existing expiry date, so you don’t lose out. If you’re already registered for MAX, log into the MAX scheduler, and sign up for my lab.

See you in LA!

Posted in CSS, Dreamweaver | Comments Off on Get up to speed with Dreamweaver CSS Designer at Adobe MAX

lynda.com goes multilingual

Over the past couple of years, I’ve recorded several video training courses for video2brain, an Austrian company that I often referred to as the European equivalent of lynda.com. It turns out that my description was prophetic. If you visit the video2brain website today, you’ll see a subtle change in its logo:

video2brain logo

It now has the tagline “a lynda.com brand”.

According to a press release, lynda.com sees “a huge growth opportunity in new and emerging markets that demand multi-lingual educational content.” That market was already served by video2brain, which has been creating video training material in German, French, and Spanish for the past decade, and already has more than 400,000 subscribers. The English-language video training material that I and others—such as Tom Green, Joseph Labrecque, Maxim Jago, and Angie Taylor—created was a relatively new venture for video2brain. Following the acquisition, video2brain will no longer produce English-language material. Instead, it becomes the multilingual arm of lynda.com.

From a business point of view, the acquisition makes a lot of sense. As a video2brain author, I’ve had access to the full library, and I can honestly say that the quality of material is superb, an excellent match for lynda.com. Over the next few months, many of the video2brain English-language courses will be migrated to lynda.com. Unfortunately, my Dreamweaver video courses won’t be migrated, because they were co-produced with Peachpit. However, the following two courses are available on DVD and in the Safari Online Library:

It hasn’t been confirmed what will happen to my Introducing PHP course, but it’s currently still available from video2brain.

Although I’m delighted that lynda.com has recognized the quality and value of video2brain, I’m naturally sad that I’ll no longer be working with Barbara Luef and all the other great people in the English team at video2brain’s studios in Graz. I had a long chat with Dan Brodnitz, video2brain’s Director of Content, this morning. He’s moving to lynda.com (in fact, it’s a homecoming for him—he was with lynda.com at an earlier stage in his career). The news of the acquisition has only just broken, and a lot of discussions need to take place. lynda.com already has a large cohort of talented video trainers. But I hope they have room for some of video2brain’s English-language authors—and if I’m one of them, so much the better.

Posted in Dreamweaver, PHP, Video | 11 Comments