How To

CORS; How To Set HTTP Response Header on IIS Windows Server 2012 R2 to Access-Control-Allow-Origin

When attempting to make an AJAX call are you getting the following error? XMLHttpRequest cannot load (then some path to the remote site). No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://yourAjaxCallingSite.com’ is therefore not allowed access. This means the Server hosting the resource is not set up to be CORS compliant. If… Read more CORS; How To Set HTTP Response Header on IIS Windows Server 2012 R2 to Access-Control-Allow-Origin

How to Configure a Custom php.ini file for a Website

There are a few ways to create a custom php.ini configuration directives for an apache website. Create a phpinfo.php file with the following content within your document root.

View this file in your browser and look near the top for which Server API is running PHP. If PHP is being run by CGI If the phpinfo.php… Read more How to Configure a Custom php.ini file for a Website

Restart Apache on Mac 10.10

If you do not stop and restart apache often, it’s easy to forget how. apachectl -help says to uses -k flag with the following options start|restart|graceful|graceful-stop|stop.

So, to restart apache, do the following command.

How to Add Current URL from Within Symfony2 Controller

I am building a REST app and wanted to include the resources “href” with every response. Being able to easily do this from with a Symfony2 Controller is very convenient. Here’s the code:

Hope this helped you find it fast!

How to Make JSON REST POST with Curl

This is just a reference to remind myself and others how to make a JSON POST call with curl. The JSON is in the body of the post. I hope this is helpful to someone.