Why does WordPress Request FTP Info when you Upload a File or Theme?

I fell into this issue and found a bunch of articles… None of which solved my issue of wordpress asking for ftp.

Screen Shot 2015-04-14 at 9.51.57 AM

Here’s the answer!

If you are on a private host (private or dedicated server) all you have to do is add the following line of code to your root config.php page (below all other scripts):

define(‘FS_METHOD’, ‘direct’);

If you are on a shared host, you will need to edit config.php with your server settings in order for it to work:

define( ‘FTP_USER’, ‘yourusername’ );
define( ‘FTP_PASS’, ‘yourpassword’ );
define( ‘FTP_HOST’, ‘localhost or your host ip’ );

If this doesn’t work check into permission settings on your wp-content directory and make sure to set everything in that folder to chmod 777.

Tagged , , , , , , ,

My Journey thru OOP (Object Orientated Programming) – Day 1-2

I am by far no expert programmer, however, over the years I have worked to learn just enough principles to carry me through a world wind of scenarios. Though most of my learning has been on the fly, thanks to my previous employers ;-), my perception of the web and applications are beginning to change over all. For a while I looked at Software Applications as a whole other beast, but these days I see the development community working hard to sew the seams in web and software technology. HTML5 I can say has made this possible…

My employer is notorious for development projects on the fly. My dev team can literally be working on a project involving big data that is supposed to span into a completion date, but because our field of work is so key to our clients, there are times (like every other day) where we need to stop the big important project and begin another big important project. The catch is usually, the new rush project is usually due in 2-days, fully tested and deployed to the client before the deadline.

This type of demand had me thinking of ways I could modularize my various development needs. One main process I see we utilize a lot is a Login feature. Mostly every project we work with, requires us to define a Login security feature allowing user to access secure content. For months, my team would reuse content and modify were needed. I’ll be honest with you, though copying-and-pasting code is easy to implement and mod, it gets messy. Especially if a team member accidentally copy’s over or edits the example docs instead. Been there, done that!

My thought process begin to change when it came to code reuse and modular architecture. We (My org) are a Apache/Linux environment but do also support and work in Windows which has a far more structured framework that handles the heavy lifting of object orientated programming. I am most comfortable in a .net, asp/C# environment when working in Windows so I am familiar with Class, Methods, Constructors and so on. I wanted to alternative in my Apache environment so I begin looking how to construct this same process in PHP.

Day: 1-2

My first step into my implementation is to create a Login class. This class will hold the connection strings we can add to and utilize anywhere where our script needs to execute various SQL statements. Long story short, I’ve spent the last few days defining classes for my new Login class. The classes contain our various SQL environments, my first being our MySQL connections, then our MSSQL connections, as well as Oracle. We utilize PDO in our environment so we defined all the MS connections to connect using the latest PDO security standards.

I spent a good day just doing my research on the principles. I wanted to make sure I understood as a whole how OOP in PHP worked compared to .NET. Honestly, I see no differenced besides the different syntax. The principles seem to be the same when delegating tasks and calling methods thru functions. It’s just more spelled out in .NET and more straight forward in PHP. My next couple of days I will be completing all the configurations for our other connections and defining them into classes.

My next post will be about the next module I’ll create in my quest to modularize some of our development features using object-orientated programming. Here’s a screenshot of my login-class. There is a separate file called db-mysql.php and db-mssql.php which holds the variables with db values.

Screen Shot 2014-11-09 at 10.37.11 AM

Tagged , , , ,

The Beauty of Client Side editing

Boy I’ve been indulging in client-side editing more than ever. I can see it becoming an important development tool for me and other developers. A friend of mine introduced me to ShiftEdit, which allows for remote connection over ftp. Source code editing, has never been easier. Theirs even an option to link a db, I wouldn’t suggest it, but the option is there.

Microsoft’s Sharepoint is another good one. It has enough punch to make any backend application seem incredible. It’s client-side editing at its finest and it’s taking over. I can see more cloud based dev tools come fourth in the coming years as the cloud continues to prove positive. HTML5 is making these features readily available for those even the smallest devices. I’m excited to see where it all goes and how I can participate in all of it.

HTML5 Datalist control

HTML5 Web Development

HTML5 Datalist control is more alike Google Suggest. Before HTML5 presence even for a known list to be suggested, developers go for AJAX request to hit on the database and populate the suggestion list. For every keystroke, an AJAX request is fired. HTML5 ‘Datalist’ could be useful when the form is to be loaded with known list. For example, a form has to be chosen with month. I will explain down with the code how it could be achieved through Datalist HTML5 control.


<!DOCTYPE html>
<title>HTML5 Datalist Demo</title>
<form action="LoginPageSuccess.jsp" method="get">
<input type="text" placeholder="Month Name" id="MonthText" list="getMonthList" required>
<datalist id="getMonthList">
<option value="January"/>
<option value="February"/>
<option value="March"/>
<option value="April"/>
<option value="May"/>
<option value="June"/>
<option value="July"/>
<option value="August"/>
<option value="September"/>
<option value="October"/>
<option value="November"/>
<option value="December"/>


Screenshot of how it works:


View original post

Send attachments with email in PHP

My Blog

Add below function in your PHP file.

Use this function like,

View original post

MVC 4 – Using HTML5 “data-” attributes with Jquery

a developer's notes - a semi-technical web development BLOG

You can create data- HTML attributes with your controls using this technique.

Define a new HTML Attributes anonymous object with your Html helpers. Below, I create a text box with some additional properties I want to be able to access with jQuery. Using properties that start with “data_”, you will be able to access the property with jquery’s data() method. Note: using property names that start with “data-” will result in a compilation error.

This is the HTML that gets rendered

Here is what jquery’s data() method converts property names to. Interestingly, the underscores are removed and camel casing is applied to the name.


Here is another good article on the subject.

View original post

Blog.Twitter.com (An official Drupal Blog)

Ahhh yes. This site miraculously uses Drupal as its core. For all of my Drupal enthusiasts, you can rest assure this is a victory as Twitter is one of the biggest social media platforms alive today!

EASY FIX: Firefox Anchor Links don’t work in 23.0.1

I stumbled upon this url when looking for a resolution to the anchor tag issue in Firefox. I was working vastly on a schedule of events for the University I work at and ran into an issue with all browser anchor links working except for Firefox.

After reviewing this post on CSS-Tricks, this easily solved my issue. If you are ever faced with an issue where your anchor tags aren’t working in any browsers, in my case, I was drawing my page in using an <iframe> and my source page was on a different server with a different dns. My console pulled up the issue which showed me that my issue was my dns, ports and folders – which all have to be stored on the same server in order for the anchor to reference the domain correctly for the anchors.

After moving my files over to the same hosted dns, all browsers anchors worked with no issue. Skipping to a new day on the calendar/schedule was easy, however, Firefox still did not want to function correctly. After finding this article, i used it’s suggestion. I used <style=”display: inline-block;”> as an inline style and it worked!

%d bloggers like this: