Tags
I love cool things built with Drupal…Beer Cloud
21 Friday Sep 2012
Tags
I love cool things built with Drupal…Beer Cloud
27 Friday Jul 2012
Tags
I found a backup of a defunct Drupal project, and now it’s time to see if I can take these file system zip files (of the entire Drupal directory structure in (I don’t remember what directory they were in)) and database backup files made with the backup module or something and see if I can recreate enough stuff to look at one of the sites from that server…
To that end, here are some links that I’m reviewing…more to come as I work through this…
a quick drupal install refresher for me… http://idolinux.blogspot.com/2009/01/quick-install-of-drupal-6.html
http://www.webologist.co.uk/blog/how-to-backup-and-restore-drupal
since the backup and migrate module was used…http://drupal.org/node/547560#comment-1935846
Create the MySQL user…and create the database…and try to import the GIANT SQL file
GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
CREATE DATABASE db_name;
mysql -u USERNAME -p DATABASENAME < FILE.SQL
and now I can get to the default site…just need to get the vhosts set up and working and Bob should then be your uncle…
…sites are up and running, but need to work on the URL rewriting…http://drupal.org/node/228462
26 Thursday Jul 2012
Posted CMS, Code Samples, WordPress
in≈ Comments Off on ..hacking core (WP)
Tags
Due to a quirk of my Windows shared hosting provider that is impacting one WordPress blog and not another…I hacked functions.php. Now, as with hacking Drupal core, I’m not proud of this, but despite the fact that both sites claim to be reading the same php.ini file, one has the open_basedir restriction in effect, and the other does not. So here’s my hack to get around image uploads blowing up because IIS is putting them in temp and php can’t get there…
// /wp-includes/functions.php // ~ line 1716 function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) { $proper_filename = false; // Do basic extension validation and MIME mapping $wp_filetype = wp_check_filetype( $filename, $mimes ); extract( $wp_filetype ); // hack return compact( 'ext', 'type', 'proper_filename' ); // We can't do any further validation without a file to work with if ( ! file_exists( $file ) ) return compact( 'ext', 'type', 'proper_filename' );
In case there’s any question, dropping a custom php.ini into the web root didn’t work. Neither did one in each folder, or in the cgi folder or anywhere else I could think to stuff a php.ini…
18 Wednesday Jul 2012
Tags
Got this error trying to update a WordPress site, and I didn’t want to lose all the content. What error?
Unable to locate WordPress root directory
Given that I use a Windows host (don’t start on me, I’ve used them since, like, 2001), it’s obviously permissions. The site in question (not this one, so don’t go playin’) had WP installed in a sub-folder, so I brute forced the permissions there and the upgrade worked. Now I just need to tighten up security back to what it SHOULD be 😦