• About
  • Everyday Linux Commands

<roughCode/>

~ …so I can find it

Category Archives: CMS

Cool Drupal (beer) site/app/services

21 Friday Sep 2012

Posted by Scott in CMS, Drupal

≈ Comments Off on Cool Drupal (beer) site/app/services

Tags

Drupal

I love cool things built with Drupal…Beer Cloud

http://drupal.org/node/1625240

Drupal restoration project link dump

27 Friday Jul 2012

Posted by Scott in CMS, Drupal

≈ Comments Off on Drupal restoration project link dump

Tags

Drupal

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

 

Advertisement

..hacking core (WP)

26 Thursday Jul 2012

Posted by Scott in CMS, Code Samples, WordPress

≈ Comments Off on ..hacking core (WP)

Tags

WordPress

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…

Error updating WP site

18 Wednesday Jul 2012

Posted by Scott in CMS, WordPress

≈ Comments Off on Error updating WP site

Tags

WordPress

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 😦

Recent Posts

  • Bulk commands to install PHP and MySQL on CentOS 7
  • Four year gap? No, had just been self-hosting for a while
  • winhttpcertcfg.exe Example
  • Configure Tomcat 7 to use HTTPS
  • SCP on Mac (and a tool for Windows)

Archives

  • November 2018
  • October 2018
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012

Categories

  • Apache Tomcat
  • Apache Web Server
  • Application Servers
  • C#
  • CMS
  • Code Samples
  • Databases
  • Development Tools
  • Drupal
  • IIS
  • Java
  • Linux / UNIX
  • MS SQL Server
  • Networking
  • Operating Systems
  • Oracle
  • Uncategorized
  • Video Games
  • Windows
  • WordPress

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com

Blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • <roughCode/>
    • Already have a WordPress.com account? Log in now.
    • <roughCode/>
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar