w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Unable to get responses from local server when connecting via iOS device
AFJSONRequestOperation will call the failure block: If invalid JSON is returned If the HTTP status code or content-type is incorrect If the connection is cancelled or fails In all of these cases, the error variable is set. In fact, it's the presence of an error that causes the failure block to be called (see [AFJSONRequestOperation -setCompletionBlockWithSuccess:failure:]). If your log isn't outputting anything, try logging error instead of error.localizedDescription. Anyway, it sounds like your server is returning HTTP 200 with an invalid JSON object. You can set a breakpoint in the failure block and then type po operation.responseString in the debugger to inspect.

Categories : Iphone

sqlsrv error while connecting to mssql server 2008 on windows 2003 server
Two ways to try, first to check if the Native driver has the right version - is your server really a 32bit Version and not 84bit? The other thing is, to check if the extensions are actually loaded. To check that, create a file like "phpinfo.php" and put it in you folder for .htdocs. <?php // show phpinfo file phpinfo(); ?> The easy way is to search for it in the phpinfo-Page with Ctrl+F and "extension=php_sqlsrv_53_ts_vc9.dll"

Categories : PHP

Error in AJAX post when running from local web server but not local file system
Note to anyone who runs into this. It took me about a day to figure it out. First off Blender was right about the POST requests, I changed them to GET requests. Secondly the issue, as I found out lied not within my code, but with IIS 7.5. It does not come with json as a predefined MIME type. Here are the steps in order to solve this. 1)Make sure you are running IIS 7.5. 2)Open the IIS Services Manager. 3)Open up MIME Types 4)Add a new MIME type 5) There are two fields to fill out. File Name Extension: JSON MIME Type: application/json After that it should work.

Categories : Jquery

Checking username on local server using jquery, ajax and php ajax() not connecting
I always like to use GET request on AJAX issues, meaning to do jQuery AJAX with type:"GET" and read the parameter with GET on PHP.. So I can easily test the PHP page itself by running it in the browser like this localhost/ajax_check_username.php?username=something

Categories : PHP

Getting an error when connecting from android to PHP server
There are issues with your PHP. You are not passing back any JSON. You will need to change your script to encode your array into JSON. $result = json_encode($json) Returning the actual JSON will help. Make sure you are not returning any HTML either. Your Java is trying to parse a JSON response, but you are responding with <!DOCTYPE...

Categories : Java

Error connecting to server in a file
This line: inet_aton(h->h_addr_list[0],&indirizzo_server); is wrong. h_addr_list is not a list of strings in the format that inet_aton expects. It's not even a list of strings at all. It's a list of addresses ready to be copied directly into the appropriate field of the struct sockaddr_*. The char **h_addr_list in struct hostent should be treated as void **, which is what it would be if it hadn't been designed before ANSI C gave us void. A generic pointer is used because gethostby* supports (at least theoretically) arbitrary address families. In the case of h_addrtype==AF_INET, each h_addr_list[n] is a pointer to a struct in_addr, so you can just say indirizzo_server = *(struct in_addr *)h_addr_list[0]; and all will be well.

Categories : C

secure auth error connecting to SQL server from RMySQL
You may have an old my.cnf configuration on your local machine. You can override the client option secure_auth in my.cnf or in a specific config file you pass to dbConnect() dbConnect(MySQL(), default.file="your-file.cnf" The info on the setting is here: https://dev.mysql.com/doc/refman/5.6/en/mysql-command-options.html#option_mysql_secure-auth As an aside, you should really not be using 4.1-style password hashing :)

Categories : Mysql

"Illegal characters in path" error when connecting to SQL Server
You'll need to escape argil3.mdf Use \ or put an @ before the assignment of the string, for instance. SqlConnection Con = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory| argil3.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");

Categories : C#

Database not found error when connecting to Derby network server
By the JDBC url, it's looks like you're trying to connect to a Derby server vs. an embedded instance. If you are trying to connect to a server instance, here are some considerations: did you start the server yourself, did mydb already exists? if not, did you pass in the correct params to create (e.g. ;create=true) example: jdbc:derby://localhost:1527/dbname;create=true if mydb did exists, are you pointing the server to the correct location? also, depending on what was used to start derby (e.g. embedded vs network driver) default database locations are different as well. You can read about it here Basically the exception you're getting is that Derby's saying it can't find your database - it's basically a path issue.

Categories : Java

I'm trying to edit a datatable on a SQL server and i keep getting an error about either not accepting a keyword or not connecting due to a timeout
The ConnectionString key in the connectionString section of your web.config is used for an SqlClient.SqlConnection but you specify to use providerName="System.Data.OleDb". You should change to providerName="System.Data.SqlClient" The OleDb client cannot understand that syntax. Then the UPDATE command uses 5 parameters, but you add only one to the Parameters collection. This will be another error, after the opening of the connection. Then in BindGridView you use a connectionstring not defined anywhere, finally the SELECT statement here refers to a table named GridView, I suspect that you have mistyped the correct name of the table (the one used in the update command is called DevTesting ) For the timeout problem you should add the exception message connected to the timeout

Categories : C#

"Undefined" Error on another web server while everything is fine on local server
You have display_errors turned off on one server and on on the other. The issues still occur on both servers, you just don't get told about them on one. The issue is that you are accessing variables or parts of arrays that are not defined before you try to use them.

Categories : PHP

Error on live server and not on local server
Error states that BrakeShoe is not accessible, make BrakeShoe public rebuild and deploy may help. You can revere engineer your existing dll to find if BrakeShoe has proper access specifier.

Categories : C#

cant connect to mysql local server error
Several possibilities here... if your file my.cnf (usually in the /etc/mysql/ folder) is correctly configured with socket=/var/lib/mysql/mysql.sock You can check if mySQL is running with the following command: mysqladmin -u root -p status Try changing your permission to mysql folder. If you are working locally, you can try: sudo chmod -R 755 /var/lib/mysql/

Categories : PHP

codeigniter working fine on local but not on web server. 404 Error
I cannot comment yet, so I'll go for an answer. Check your project root directory if you have the .htaccess file and if you have access to the server, might as well check too if mod_rewrite is enabled (assuming you are using Apache). This might be an URL rewrite issue. EDIT 1 Ok now I see you have a .htaccess file in there. How about the <Directory> directives in your httpd.conf or is this setup via <VirtualHost>? EDIT 2 Try changing your .htaccess with this: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / #Removes access to the system folder by users. #Additionally this will allow you to create a System.php controller, #previously this would not have been possible. #'system' can be replaced if you have renamed your system folder.

Categories : Codeigniter

Not connecting to database from local website
First, ensure that the connection information is correct (server and database name). Then make sure that 'Remote Connections' are enabled in SQL. Also, since it is .Net, you could grab a .Net decompiler (perform a Google search) that will allow you to decompile the DLLs and view the most of the source code. This is probably your last option, but would allow you to at least view what the page is doing and gives you a starting point if you had to redevelop the site.

Categories : C#

Connecting to SQL Local Database using ConfigurationManager ASP.NET/C#
You don't have a connection string named Database1, it's named ConnectionString. Change your code to ConnectionStrings["ConnectionString"]. UPDATE: looks like the OP already fixed that. That error tends to indicate that your SQLEXPRESS instance isn't up and running. Make sure the services are started and the server is running.

Categories : Asp Net

Connecting to remote MySQL from local machine
I'm not sure why they would say not to add 127.0.0.1 - that's the local machine, which means that people from the outside can't access it. So you have skip-networking turned on and you're connecting through a local UNIX socket? Are you sure it didn't say not to add anything other than 127.0.0.1? Do you have SSH access? If so, you can easily use SSH tunneling so that you'll only have to connect locally with a command like ssh -L 3307:localhost:3306 -N yoursever.com Then you connect locally on your home machine to port 3307 (you can make this 3306 but you said you develop your database locally as well, so in that case you'd need a different port). Then the packets go through SSH and magically appear at the database, looking as though they had come from the same machine. The security th

Categories : Mysql

How to run the localhost server for Dart Web Services (error finding local web service)
I can reproduce your error message if I run the client in a browser without starting the server first. As noted in the documentation you included (but didn't seem to understand), you have two ways to run the server: from the command line or from Dart Editor. If you're using Dart Editor: Load simpleserver/simpleserver.dart in Dart Editor, then click the 'Run' button. Load json_clien/web/json_client.dart in Dart Editor, then click the 'Run' button. That will load json_client.html in the bundled Dartium browser and everything should work. If you prefer to use the command line (which it sounds like you don't), navigate to the simpleserver directory, then run dart simpleserver.dart. Then manually load json_clien/web/json_client.html in Dartium. Both ways work for me with Dart 0.5.13.1_

Categories : Web Services

com_create_guid() function got error on server side but works fine in local using php
You can create GUIDs manually: function getGUID(){ if (function_exists('com_create_guid')){ return com_create_guid(); } else { mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up. $charid = strtoupper(md5(uniqid(rand(), true))); $hyphen = chr(45);// "-" $uuid = chr(123)// "{" .substr($charid, 0, 8).$hyphen .substr($charid, 8, 4).$hyphen .substr($charid,12, 4).$hyphen .substr($charid,16, 4).$hyphen .substr($charid,20,12) .chr(125);// "}" return $uuid; } } Usage: $GUID = getGUID(); echo $GUID; Follow: http://guid.us/GUID/PHP http://php.net/manual/en/function.com-create-guid.php

Categories : PHP

Accessing apache server remotely, fine with local ip, error with global
You need to forward port 80 on your router to the WAMP server machine's IP address. Some routers misbehave if you try to access your public IP address from behind the router, so keep that in mind; if you want to verify that port 80 is forwarding properly, you can use a tool like ShieldsUP! at grc.com to port-scan port 80 and see if it returns OPEN. Remember that if you have DSL service, your DSL modem may also contain a NAT router, causing additional problems with port forwarding.

Categories : Apache

"Fatal error: Call to undefined function" resulting in particular local server, but ran well in others'
Your version of php is to old... as Royal Bg suspected. Either upgrade to 1.6.6 for php 5.2. But if there is no reason to use such an old version switch to something less than 7 years old :) see: http://sourceforge.net/p/wampserver/news/?source=navbar

Categories : PHP

Magento Custom Controller working on local, throwing 500 error on staging server
1: Clear your cache AND sessions . 2: Check if your module is installed using the free/open-source Module List Module 3 Drop some debugging code in the following method. The var_dumps will tell you which files/classes Magento's routers are looking for with your module, but can't find. File: app/code/core/Mage/Core/Controller/Varien/Router/Standard.php protected function _validateControllerClassName($realModule, $controller) { $controllerFileName = $this->getControllerFileName($realModule, $controller); if (!$this->validateControllerFileName($controllerFileName)) { var_dump($controllerFileName); return false; } $controllerClassName = $this->getControllerClassName($realModule, $controller); if (!$controllerClassName) { var_dump($controllerFileName); return false

Categories : Magento

http request from node.js local server port 5000 to 8000 gives error
When using http.request(), you have to at some point call request.end() to actually send the request. Note that in the example req.end() was called. With http.request() one must always call req.end() to signify that you're done with the request - even if there is no data being written to the request body. http.request(options, function(response) { // ... }).end(); Or, with GET requests, you can also use http.get() which will call request.end(). http.get(options, function(response) { // ... });

Categories : Javascript

jquery ajax call return error same service works on local and other server
The Reason that service was not working is web.config. i Was missing web.config service settings. Handlers for service that are mostly added by Visual studio. But it missed that. After addition of handlers it works fine

Categories : Asp Net

Batch File Connecting to Server and execute program install on connected server
Here's a little code to help you connect to the SQL server and interrogate the SQL version. @ECHO OFF SQLCMD /? > nul 2> nul IF ERRORLEVEL 1 ECHO.SQLCMD not found on this machine & PAUSE & GOTO :eof SET SQLCmdLine=SQLCMD -b -w400 REM use something like the next line for NT authentication; second line for SQL authentication REM for NT SET SQLCmdLine=%SQLCmdLine% -E -S "YourServerName" REM for SA SET SQLCmdLine=%SQLCmdLine% -U "YourSQLUserName" -P "YourSQLPassword" -S "YourServerName" SET Database=YourDatabaseName REM I will use NT Authentication for this example SET SQLCmdLine=%SQLCmdLine% -E -S "(local)" SET TestSQLCmdLine=%SQLCmdLine% -h-1 -d "%Database%" REM this will get the SQL version %TestSQLCmdLine% -Q "SELECT @@VERSION" | FINDSTR /v "rows affected" REM this will

Categories : SQL

Unable to login to MYSQL getting error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
It seems like a permission issue, try disabling selinuza by using setenforce 0, then restart the mysql service, also check if mysql has the right permissions on the mounted device (assuming you mounted as root or a sudo user that mysql cannot access)

Categories : Mysql

Setting up local ip over wireless network to create a local server on Ubuntu
Just add this to your normal runserver command: python manage.py runserver 0.0.0.0:8000 Then others on your local network can access it through: http://192.168.1.18:8000

Categories : Django

permission and timeout issues connecting to local northwind database in C# entity data model
Found a suggestion here by Peja Tao. Maybe that will help. http://social.msdn.microsoft.com/Forums/sqlserver/en-US/8cdc71eb-6929-4ae8-a5a8-c1f461bd61b4/provider-sql-network-interfaces-error-26-error-locating-serverinstance-specified

Categories : C#

Can't get a XMLHttpRequest's response neither from local file:/// nor from local web server
Feedburner does not support CORS (yet). These are the headers I receive from feedburner when executing your code from jsfiddle: HTTP/1.1 200 OK Content-Type: text/xml; charset=UTF-8 ETag: ckkcnAejDTcF+4d0Kj6kftZuq+0 Last-Modified: Tue, 30 Jul 2013 19:56:16 GMT Content-Encoding: gzip Transfer-Encoding: chunked Date: Tue, 30 Jul 2013 19:58:11 GMT Expires: Tue, 30 Jul 2013 19:58:11 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block Server: GSE If it supported CORS you should see an Access-Control-Allow-Origin header in there

Categories : Javascript

Unable to connect to local database in Visual Studio 2012 express For Web: (error 26)(C#)(SQL Server 2012)
You're getting that error because the (localDB)v11.0 is already a user instance of SQL Server. When you were using the SQLEXPRESS SQL Server instance, well, it's not. So, just get rid of the User Instance=true on the connection string.

Categories : C#

mysql error Can't connect to local MySQL server through socket '192.168.250.99'
You have to bind your server to that specific IP address So add this to your my.cnf under [mysqld] bind-address=192.168.250.99 or write bind-address = 0.0.0.0 for all ip addresses

Categories : Mysql

Connecting to a SQL Server DB
Well this seems to work ok, use DBI; # $dbh = DBI->connect( "dbi:mysql:DBNAME", "root", "password" ) or die "Connection Error $DBI::errstr "; N.B. Please Check you have the required modules installed.

Categories : Perl

issues in connecting to AD server over SSL?
If you can't get TLS to work, it is unlikely that SSL will work. Are you sure that you got the right certificate and configured the keystore correctly? Based on the SSLHandshakeException when trying to use TLS, it would seem that may not be set up correctly. Check out this SO answer for some tips on how to verify that your keystore is correctly set up: http://stackoverflow.com/a/9619478/1792088

Categories : Java

Connecting to SQL Server in Xcode
One route to take is to make a copy of that Database and put it on the phone as an SQLite Database and have a PHP script that gets the newest additions and adds them to the SQLite database. A second route you could take, is you could ask him to put it JSON format and you would have a dictionary on the phone that held all of the JSON, and then parse the JSON using apples built in parser, NSJSONSerialization or any of the other JSON parsers out there. Using the parsed JSON, you could then do as you please with the list of notifications Another method will be for that guy to write a PHP script for you to access all the notifications and you run that in a for loop and populate a table, or whatever, on the phone of the latest push notifications that way. This while take a few seconds longer t

Categories : Iphone

Connecting Sql Server though Node.js
I just did it following this walkthrough at http://tech.pro/tutorial/1848/getting-nodejs--sql-server--azure-to-work-together He's using the "msnodesql" package at https://www.npmjs.org/package/msnodesql, code at git-hub at https://github.com/WindowsAzure/node-sqlserver, and I've got it running in a node-console app with a simple select-statement: var mssql = require('msnodesql'); var conn_str = "Driver={SQL Server Native Client 10.0};Server=tcp:xxxxx;Database=yyyy;Uid=zzzz;Pwd=wwww;Connection Timeout=30;"; mssql.query(conn_str, "select * from testtable", function(err, recordset) { if(err){ console.log("Got error :-( " + err); return; } recordset.forEach(function(record) { console.log("name: " + record.Name + " (" + record.ID + ")"); }); });

Categories : Sql Server

connecting to an SQL Server database
The problem your having with regards to connecting to the database on a server is because of SqlConnection dbConnection = new SqlConnection("Data Source=.\SQLEXPRESS;Integrated Security=true"); The best way to do this is to go to your Web.config file and find the block and add a connection to your database in there. eg <add name="ConnectionString" connectionString="Data Source=YOUR SERVER;Initial Catalog=YOUR DATABASE;User ID=YOUR USER ID;Password=YOUR PASSWORD" /> then you can just call the connection string accross your whole project whenever you need to use it. Also with regards to VS2012. There are very few companies using that IDE at the moment so your probably better off learning VS 2010 in the most part but i would agree that VS2008 is fairly out of date now

Categories : C#

Connecting to database server using php
This should be basically the mysqli version of what you wrote. <?php $username = "user"; $password = "pass"; $hostname = "creative.coventry.ac.uk"; $mysqli = new mysqli($hostname, $username, $password, "asantec"); $stmt = $mysqli->prepare("SELECT * FROM books;"); $stmt->execute(); $stmt->bind_result($id, $title, $author, $price); //Put all your expected variables here while ($stmt->fetch()) { echo $id.'<br />'; echo $title.'<br />'; echo $author.'<br />'; echo $price.'<br /><br />'; } $mysqli->close(); ?> Also, if you have any issues in the code you've posted, this will work. Check your DB credentials and the data you're querying.

Categories : PHP

Connecting to wamp server from different pc
you need to follow the below steps: 1.in httpd.conf DocumentRoot "C:/xampp/htdocs" //add your wwwroot folder path (this is Xampp example) <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> 2.Open httpd-vhost.conf and add: ##</VirtualHost> <VirtualHost Name:80> DocumentRoot C:/xampp/htdocs/wwwroot/ <Directory "C:/xampp/htdocs/wwwroot/"> Options Indexes FollowSymLinks Includes execCGI AllowOverride All Order Allow,Deny Allow From All </Directory> ServerAdmin (any@email.com) ServerName (IP address or FQDN) </VirtualHost> 3.The most Important step is to add an exception for the used port(80 in this example) on windows firewall. Hope this helps :)

Categories : PHP

Connecting to sql server 2008 using vb
In DBConnect, check the status of objConn to make sure it's really being opened. In DBConnect, you have exit function before response.write. In GetValue, check value of err.number.

Categories : Vb.Net

Client isn't connecting to server
Always create output output stream before your input stream for Object streams, otherwise you create a deadlock situation. output = new ObjectOutputStream(socket.getOutputStream()); // output.flush(); if the underlying stream is buffered input = new ObjectInputStream(socket.getInputStream()); The input reads the header written by the output, which won't be there unless the output is created first.

Categories : Java



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.