Unable to launch MapServer through MS4W - gis

I have installed the MS4W map server and when I try to launch the site in the localhost it takes me to the below landing page. I am unable to see the map getting loaded in the page.
Any suggestions?

Besides using the setup.exe installer from https://ms4w.com, you can install MS4W manually as well, using the .zip available there; you can use the steps below to verify your installation either way:
make sure that you installed/extracted MS4W into a root of a drive (for example,
you should have a resulting directory structure such as:
C:/
ms4w
Apache
apps
...
open a command prompt window (use Windows search, enter "cmd", and make sure to
choose "Run as Administrator"
now in Command Prompt, enter:
cd c:/ms4w
then setup the MS4W environment with:
setenv.bat
which should let you know that the MS4W environment is ready:
GDAL, mapserv, Python, PHP, and commandline MS4W tools path set
now we can install the Apache web server:
apache-install.bat
which should display a successful message such as (notice the text "The Apache MS4W Web Server service was started successfully") :
Installing the 'Apache MS4W Web Server' service
The 'Apache MS4W Web Server' service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
The Apache MS4W Web Server service is starting.
The Apache MS4W Web Server service was started successfully.
if you have errors, you can check the Apache logs at C:/ms4w/Apache/logs
you can also verify that MapServer is ready at the commandline, with:
mapserv -v
which should display MS4W information such as:
MapServer version 7.6.0-dev (MS4W 4.0.3) OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=SVGCAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
TIP: try to now execute other MS4W tools at that same commandline, such as gdalinfo --formats or shp2img etc. (basically you can call any tool now, that lives in C:/ms4w/tools, without ever having to change directory there)
now you are ready to goto your localhost, so open your web browser (Firefox, Chrome, IE) and type: 127.0.0.1 <enter>
you should see the MS4W homepage now in your local browser, with a sample map as well (that is actually a fully configured WMS service served from your local machine, serving Spatialite data), such as: https://ms4w.dev/

Related

Alternative to "Web Server for Chrome"?

I need help with an alternative to "Web Server for Chrome" extension provided by Chrome. I don't even want to download chrome let alone using it so is there any alternative to run HTMl and JS files on a web server? I want something very simple which does not require extra coding or effort. please and thank you.
You should install a server software for this purpose like XAMPP server. No need to download a specific browser as long as you have the server software.
Maybe you can do the following (if you have python installed ):
Open command prompt
Type cd your_path_to_folder_in_which_file_is_located
Type the command : python -m http.server
Hit enter
Open browser and enter localhost:8000
Done! to cancel the server , hit CTRL+C
If you do not have python then you can install Web Server for Chrome on any other browser . Edge , firefox .Simply go into the chrome web store and search the same . You should be able to add it the usual way.

PhpStorm - Configuring deployment remote server for debug

I want to debug in a remote server, which is, by the way, a Vagrant machine. Not really a remote server, but this has a peculiar setup: the shared host/vagrant machine folder isn't related to the web server files.
The server is configured with Zend Framework.
I have, locally, to deploy to the machine the following folders (as Zend Framework structure):
/home/user/webStuff/web
Inside web: config, data, module, vendor and public folders
Inside public folder I have the index.php, which handles all server requests.
Following is the server deployment configuration:
When I press "Test SFTP Connection" everything is fine. When I press "Open", the website opens.
And here, is the "Mappings" tab on the deployment configuration
Everything seems OK, here. At least from my point of view.
But when I test the settings, in Run -> WebServer Debug Validation, it gives me "Failed to collect files: Invalid relative file name". I've tried more settings, like placing /web/public in Web path, but with no success.
In Settings -> Languages & Frameworks -> PHP I have a good configuration for the server vagrantmachine.com, with XDebug version correctly displayed.
Also, I've placed the following in xdebug.ini:
xdebug.remote_connect_back = 1
xdebug.remote_enable=1
I've searched and tried a lot, but with no success.
I'm no specialist in these server configuration things, but if you need any information, just ask.
"Deployment path on server" and "Root Path" were wrong.
Like #Eugene Morozov said, I changed the root path to "/opt/webStuff" and deployment path to "/" and it worked out.

How to load cesium globe in firefox

I just started testing Cesium after I read all the documentation for getting started with it, but I have a problem:
I downloaded the files (Cesium 1.6 zip)
But when I am open file HelloWorld.html in Firefox (but also in Chrome) it appears an error:
An error occurred while rendering. Rendering has stopped.
SecurityError: The operation is insecure.
p#file:///E:/3D/Cesium-1.11/Build/Cesium/Cesium.js:433:19771
et.prototype.createTexture2D#file:///E:/3D/Cesium-1.11/Build/Cesium/Cesium.js:449:19216
H.prototype.update#file:///E:/3D/Cesium-1.11/Build/Cesium/Cesium.js:434:9598
S.prototype.update#file:///E:/3D/Cesium-1.11/Build/Cesium/Cesium.js:452:1283
m.prototype.update#file:///E:/3D/Cesium-1.11/Build/Cesium/Cesium.js:455:27826
vt#file:///E:/3D/Cesium-1.11/Build/Cesium/Cesium.js:458:15315
Ct#file:///E:/3D/Cesium-1.11/Build/Cesium/Cesium.js:458:18817
bt.prototype.render#file:///E:/3D/Cesium-1.11/Build/Cesium/Cesium.js:458:25057
P.prototype.render#file:///E:/3D/Cesium-1.11/Build/Cesium/Cesium.js:464:4096
t#file:///E:/3D/Cesium-1.11/Build/Cesium/Cesium.js:463:23110
Please solve this problem.
Try to launch it from a local server. Many browsers have different security policies if they load files from file:// or http://
An easy way to launch a local server is use python (on linux or cygwin):
$ cd /path/to/HelloWorld.html
$ python -m SimpleHTTPServer

Couchbase Mobile (Sync Gateway) sample TODOlite application doesn't replicate; complains _facebook doesn't exist

My objective: get https://github.com/couchbaselabs/ToDoLite-iOS syncing with a Couchbase Server and sync gateway on localhost rather than the default demo URL.
I run sync gateway like so: bin/sync_gateway -url http://localhost:8091
And then the only thing I changed in the example is:
-#define kSyncGatewayUrl #"http://demo.mobile.couchbase.com/todolite"
+#define kSyncGatewayUrl #"http://localhost:4984/sync_gateway/"
And when I run
Error: Error Domain=CBLHTTP Code=404 "404 not_found" UserInfo=0x7ff11941fb50 {NSURL=http://localhost:4984/sync_gateway/_facebook, NSLocalizedFailureReason=not_found, NSLocalizedDescription=404 not_found}
How do I fix this?
I solved it. The reason is that I ran sync_gateway without enabling Facebook registration support.
Normally this is done in config.json file. In fact, this configuration file was supplied in ToDoLite all along.
It is crucial that you launch sync_gateway with this configuration file. The README actually states this but in a loose and casual way...
cd ToDoLite-iOS
sync_gateway -url http://localhost:8091 sync-gateway-config.json
NB: I assume above that sync_gateway has been made accessible through $PATH. It's a good idea to do that anyway.
Also, I didn't pay attention to the dbname. So you'll need to replace
#define kSyncGatewayUrl #"http://demo.mobile.couchbase.com/todolite"`
with
#define kSyncGatewayUrl #"http://localhost:4984/todos"
So, what's the complete sequence of steps to get it working?:
If you want to wipe everything on the server, rm -rf Library/Application\ Support/Couchbase and start over. Homebrew cask hides this setting somewhere else where it's hard to reset so a manual install is very recommended.
Install Couchbase Server
Set up login credentials if fresh install; otherwise just login
Create a bucket (a database) with name todos on the cluster. This is the dbname used by TODOLite.
Launch sync gateway. Be sure to pass in the replication URL AND the JSON config file.
bin/sync_gateway -url http://localhost:8091 sync-gateway-config.json; keep sync gateway running
In the TODOLite AppDelegate.m, change kSyncGatewayUrl:
#define kSyncGatewayUrl #"http://localhost:4984/todos". Notice the name of the database is necessary!
(Optionally) Access the administrator interface of the sync gateway by going to http://localhost:4985/_admin/db/sync_gateway/sync. You can set up the sync function here.
In case you're wondering where those port numbers came from, check out
ports Couchbase Server uses
ports Sync Gateway uses
4984 — SG API port
4985 — SG admin server
The default remote sync URL will be defined in different files depending on the version of the project you download (iOS, Android, PhoneGap, and Motion). To find the appropriate string to change simply search through your project for the URL "http://demo.mobile.couchbase.com/todolite" and replace it with the URL of your new sync gateway database.

openshift ghost mail config

I installed ghost via Openshift. When signing in I get a sendmail/email configuration popup. Ghost appears to be attempting to use sendmail. I updated the config.js file (via git push) to use gmail. I still get the popup. Either config isn't being read/used or my push isn't successful (it appears to be). Any ideas?
Fritz
Hy Fritz,
You should try reloading the openshift application so it's reading the config.js file again:
rhc app reload
Or if that doesnt seem to be enouguh you can restart it with
rhc app restart