First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Within the terminal, Fire this command:
which php
<ifModule mod_headers.c> | |
Header set Connection keep-alive | |
</ifModule> |
<IfModule mod_expires.c> | |
ExpiresActive On | |
# Images | |
ExpiresByType image/jpeg "access plus 1 year" | |
ExpiresByType image/gif "access plus 1 year" | |
ExpiresByType image/png "access plus 1 year" | |
ExpiresByType image/webp "access plus 1 year" | |
ExpiresByType image/svg+xml "access plus 1 year" | |
ExpiresByType image/x-icon "access plus 1 year" |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Upload file from URL</title> | |
</head> | |
<body> | |
<?php | |
$BASE_URL = strtok($_SERVER['REQUEST_URI'],'?'); | |
if (isset($_POST['url'])){ |
Server { | |
Port = 80 | |
SourceRoot = /Users/dan/hhvm-test/public/ | |
} | |
VirtualHost { | |
* { | |
Pattern = .* | |
RewriteRules { | |
* { |
#!/bin/bash | |
# set base directory for Laravel apps (WITH trailing slashes) | |
# ex: "/Users/Foo/apache/httpdocs/" | |
BASE_DIR="/PATH/TO/WEBSERVER/" | |
function quit { | |
exit | |
} |
##Create an alias to MAMP's PHP installation
To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.
Within the terminal, run:
nano ~/.bash_profile
This will open nano with the contents, at the top in a blank line add the following line:
There are a bunch of reasons why this is convoluted, mostly in building the URL to make the request: | |
1. You have to rely on an AJAX request, this example uses jQuery | |
2. To make a GetFeatureInfo request, you must provide a BBOX for a image, and the pixel coordinates for the part of the image that you want info from. A couple of squirrely lines of Leaflet code can give you that. | |
3. Output formats. The `info_format` parameter in the request. We don't know *a priori* which will be supported by a WMS that we might make a request to. See [Geoserver's docs](http://docs.geoserver.org/stable/en/user/services/wms/reference.html#getfeatureinfo) for what formats are available from Geoserver. That won't be the same from WMS to WMS, however. | |
4. WMS services return XML docs when there's a mistake in the request or in processing. This sends an HTTP 200, which jQuery doesn't think is an error. | |
5. added a php proxy and 2 new options (CORS workaround) |