PHP - Can't Connect To Local Mysql Server Through Socket '/var/run/mysqld/mysqld.sock'
hi all, i have a test server (newest xampp) and the code works fine, as soon as i upload to 1and1 (they use apachi, php and mysql) i get this message: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
i have double checked username and passwords, had a look on google, contacted there support with no luck yet. i am wondering if its a mysql or php version problem, so hoping someone knows when the following code with classes etc was added or if someone knows how to fix it i be really greatful. heres some of the code i am using class cyberglide { var $host; var $username; var $password; var $db; function connect() { $con = mysql_connect($this->host, $this->username, $this->password) or die (mysql_error()); mysql_select_db($this->db, $con) or die(mysql_error()); } function get_top() { if (isset($_GET['page'])) { $page = $_GET['page']; // Display Page. $sql = "SELECT title,body FROM content WHERE page = '$page' AND location = 'left' AND disabled = 'no' ORDER BY id"; $res = mysql_query($sql) or die (mysql_error()); while($row = mysql_fetch_assoc($res)){ echo '<h1>' . $row['title'] . '</h1>'; echo '<p>' . $row['body'] . '</p>'; } } else { //Show Home Page $sql = "SELECT title,body FROM content WHERE page = 'home' AND location = 'left' AND disabled = 'no' ORDER BY id"; $res = mysql_query($sql) or die (mysql_error()); while($row = mysql_fetch_assoc($res)){ echo '<h1>' . $row['title'] . '</h1>'; echo '<p>' . $row['body'] . '</p>'; } } } function get_left() { if (isset($_GET['page'])) { $page = $_GET['page']; // Display Page. $sql = "SELECT title,body FROM content WHERE page = '$page' AND location = 'left' AND disabled = 'no' ORDER BY id"; $res = mysql_query($sql) or die (mysql_error()); while($row = mysql_fetch_assoc($res)){ echo '<h1>' . $row['title'] . '</h1>'; echo '<p>' . $row['body'] . '</p>'; } } else { //Show Home Page $sql = "SELECT title,body FROM content WHERE page = 'home' AND location = 'left' AND disabled = 'no' ORDER BY id"; $res = mysql_query($sql) or die (mysql_error()); while($row = mysql_fetch_assoc($res)){ echo '<h1>' . $row['title'] . '</h1>'; echo '<p>' . $row['body'] . '</p>'; } } } }//Ends Our Class db file //Setup Our Connection Vars $obj->host = 'localhost'; $obj->username = 'root'; $obj->password = ''; $obj->db = 'db361371865'; //Connect To Our Database $obj->connect(); many thanks all. Similar TutorialsThis topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=319948.0 I have a script that is trying to connect from one server to another and it doesn't seem to let it. Could someone help me please Code: [Select] Can't connect to MySQL server on 'example.com' (4) Hi, When i am trying to run one script on my web server, i get following error Cannot connect to the database using the info you provided Access denied for user 'My_Username'@'localhost' (using password: NO) I filled all info like Host(localhost) Database name(created in cpanel) Username(created in cpanel) Password(i kept blank dont know where to find this) You help will highly appreciate Thanks, Ravindra Hey, I've had this problem for a couple days now, and haven't been able to work it out. I'm trying to connect to the Gamesurge IRC using PHP - though the code I am using times out and can't connect. I thought it was my code, however I have searched the web for working codes and they all *seem* to do the same basic thing as mine. So if anyone has any ideas as to why I am getting a timeout, I would appreciate it. The code I'm using. <?php error_reporting(E_ERROR); $cfg = array( "server" => "irc.gamesurge.net", "channel" => "#wiremod", "port" => 6667, "name" => "thetree PHP" ); echo "Connecting to " . $cfg["server"] . " on port " . $cfg["port"] . "<br/>"; $socket = fsockopen($cfg["server"], $cfg["port"], $errno, $errstr, 5); if (!$socket) { echo("Error[$errno]: $errstr...<br/>"); } else { echo "Socket connection successful..<br/>"; } fclose($socket); ?> Hosted file: http://joethetree.lil.org.uk/socket.php Thanks thetree Hi, i'm developing an app in wampp, i'm usually use cUrl but this time i wanted to try sockets for a change and more portability. I have followed the basic socket structure but i can't connect. So this is my code: Code: [Select] function googlear($search,$filtro,$safe) { //Abrimos el socket $socket = fsockopen( "www.google.com", 80, $errno,$errdesc); if (!$socket) {print "$errstr ($errno)<br/>\n";die;}; $busqueda = "search?q=".$search."&num=100";//Solo me va a tirar 100 resultados por ahora, para ir pasando de pagina arranco de start=0 y voy sumando de a 100 para pasar de pagina. if($safe = true) { $busqueda = $busqueda . "&safe=active"; } if($filtro != true) { $busqueda = $busqueda . "&filter=0"; } $request = "GET $busqueda HTTP/1.1\r\n"; $request .= "Host: www.google.com\r\n"; $request .= "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\r\n"; $request .= "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n"; $request .= "Accept-Language: es-ar,es;q=0.8,en-us;q=0.5,en;q=0.3"; $request .= "Accept-Encoding: gzip, deflate\r\n"; $request .= "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n"; $request .= "Connection: keep-alive\r\n"; //Mando las cabeceras con el socket como resource fputs($socket, $request); while(!feof($socket)) { $busqueda[] = fgets($socket, 1024); } //Cerramos fclose($socket); return count($busqueda); } As you can see i'm doing a GET and waiting for the count of lines of the array as result (just to test), but i'm getting "Fatal error: Maximum execution time of 30 seconds exceeded in [...]". It can't take that long to make a GET Request... Any clues? Good Day
I have a bit of an issue with my website I loaded on my domain.
I am getting an error:
SQLSTATE[HY000] [1130] Host 'xxx.xxx.xx.xxx' is not allowed to connect to this MySQL server
Can some one please explain to me in detail how do fix this?
It only shows on my Sale and Rent pages
Hi everyone! I'm trying to create a socket TCP/IP server, i used this code which is already available @ php.net Code: [Select] <?php error_reporting(E_ALL); /* Allow the script to hang around waiting for connections. */ set_time_limit(0); /* Turn on implicit output flushing so we see what we're getting * as it comes in. */ ob_implicit_flush(); $address = '0.0.0.0; $port = 5000; if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) == false) { echo "socket_create() failed: reason: " . socket_strerror(socket_last_error()) . "<br \>"; } if (socket_bind($sock, $address, $port) == false) { echo "socket_bind() failed: reason: " . socket_strerror(socket_last_error($sock)) . "<br \>"; } if (socket_listen($sock, 5) == false) { echo "socket_listen() failed: reason: " . socket_strerror(socket_last_error($sock)) . "<br \>"; } do { socket_set_nonblock($sock); if (($msgsock = socket_accept($sock)) == false) { echo "socket_accept() failed: reason: " . socket_strerror(socket_last_error($sock)) . "<br \>"; socket_clear_error(); break; } /* Send instructions. */ $msg = "\nWelcome to the PHP Test Server. <br \>" . "To quit, type 'quit'. To shut down the server type 'shutdown'.<br \>"; socket_write($msgsock, $msg, strlen($msg)); do { if (false == ($buf = socket_read($msgsock, 2048, PHP_NORMAL_READ))) { echo "socket_read() failed: reason: " . socket_strerror(socket_last_error($msgsock)) . "<br \>"; break 2; } if (!$buf = trim($buf)) { continue; } if ($buf == 'quit') { break; } if ($buf == 'shutdown') { socket_close($msgsock); break 2; } $talkback = "PHP: You said '$buf'.<br \>"; socket_write($msgsock, $talkback, strlen($talkback)); echo "$buf<br />"; } while (true); socket_close($msgsock); } while (true); socket_close($sock); ?> I've assigned the address to receive from anybody '0.0.0.0' The problem is that it tells me: socket_accept() failed: reason: Success I searched a lot trying to figure this error out but found nothing. Any help, i'd be thankful? Hi I recently created a socket server in PHP and a client in actionscript, what the client does is send the X and Y and there ID to the server and then the server sends it back to the clients connected, my problem is it works but the X and Y start messing about and it duplicates sometimes, i'm pretty sure it is to do with the PHP server, this is my code: Server: Code: [Select] <?php /* Raymond Fain Used for PHP5 Sockets with Flash 8 Tutorial for Kirupa.com For any questions or concerns, email me at ray@obi-graphics.com or simply visit the site, www.php.net, to see if you can find an answer. */ // E_ALL is a named constant (bit of 2047) // error_reporting(E_ALL) ensures any errors will be displayed error_reporting(E_ALL); // set_time_limit() is set to 0 to impose no time limit set_time_limit(0); // ob_implicit_flush() will push the whole message to flash (including any extra markups like terminating zeros) ob_implicit_flush(); // address set to internal port for the socket to bind to and port set to something above 1024 so flash will connect $address = '192.168.1.71'; $port = 9999; //---- Function to Send out Messages to Everyone Connected ---------------------------------------- // $allclient is an array of resource id's that php will refer to for the sockets // $socket contains the resource id for the flash client who sent the message // $buf is just the message they sent, we are sending to everyone using a foreach loop function send_Message($allclient, $socket, $buf) { foreach($allclient as $client) { $phoneChunks = explode("=", $buf); $pid = $phoneChunks[0]; $x = $phoneChunks[1]; $y = $phoneChunks[2]; // socket_write uses the $client resource id (which calls on the socket) and sends it our message (which is the second flag) socket_write($client, "$pid=$x=$y"); echo "$pid=$x=$y \n"; } } //---- Start Socket creation for PHP 5 Socket Server ------------------------------------- // socket_create function is pretty simple, depending on what you want it to do, you can just rig it for that, // AF_INET is a "kind of" default address/protocol family that I have used, // then socket_create takes and uses SOCK_STREAM, another default available socket type, // and uses a SOL_TCP protocol to have a guaranteed data sending. if (($master = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) < 0) { echo "socket_create() failed, reason: " . socket_strerror($master) . "\n"; } // this little beauty is hard to understand, but very useful to our kind of chat // we want to be able to reuse our sockets, so we set our $master socket with a level at SOL_SOCKET, // with it reusable (SO_REUSEADDR), and a "1" in the mixed optval spot to make it true. socket_set_option($master, SOL_SOCKET,SO_REUSEADDR, 1); // now we need to bind our socket to the address and port specified. if (($ret = socket_bind($master, $address, $port)) < 0) { echo "socket_bind() failed, reason: " . socket_strerror($ret) . "\n"; } // to allow our socket server to listen for incoming calls made by our flash client, we need // to use socket_listen on our $master socket. The next flag indicates that only 5 calls at a time. // any others will be refused until there is sufficient room to process a new call. if (($ret = socket_listen($master, 5)) < 0) { echo "socket_listen() failed, reason: " . socket_strerror($ret) . "\n"; } // this will allow an easy way to keep track of sockets connected to our server $read_sockets = array($master); //---- Create Persistent Loop to continuously handle incoming socket messages --------------------- while (true) { $changed_sockets = $read_sockets; // socket_select is used here to see if there were any changes with the sockets that were connected before // $num_changed_sockets is here so you can check to see if the change is true or not with a subsequent function $num_changed_sockets = socket_select($changed_sockets, $write = NULL, $except = NULL, NULL); // we run a foreach function on $changed_sockets to see whether it needs to be added (if new), determine the message it sent // or determine if there was a socket disconnect foreach($changed_sockets as $socket) { // now if the $socket currently being checked is the $master socket, we need to run some checks // if not then we will skip down to else and check the messages that were sent if ($socket == $master) { // socket_accept will accept any incoming connections on $master, and if true, it will return a resource id // which we have set to $client. If this did not work then return an error, but if it worked, then add in // $client to our $read_sockets array at the end. if (($client = socket_accept($master)) < 0) { echo "socket_accept() failed: reason: " . socket_strerror($msgsock) . "\n"; continue; } else { array_push($read_sockets, $client); } } else { // socket_recv just receives data from $socket as $buffer, with an integer length of 2048, and a mystery flag set to 0 // that mystery flag has no real documentation so setting it to 0 will solve it as others have done. // we've also set it as a var $bytes in case we need to ensure data sending with socket_write, which is optional $bytes = socket_recv($socket, $buffer, 2048, 0); // if the $bytes we have is 0, then it is a disconnect message from the socket // we will just search for it as an index and unset that socket from our $read_sockets and // finish up with using socket_close to ensure it is closed off if ($bytes == 0) { $index = array_search($socket, $read_sockets); unset($read_sockets[$index]); socket_close($socket); }else{ // we need to make sure $read_sockets isn't messed with, so setting up a new variable called $allclients // will ensure this. We then shift the array so that our $master socket is not included to the count when // we send our data to all the other sockets in $allclients. $allclients = $read_sockets; array_shift($allclients); // just a simple call on our premade function 'send_Message' with $allclients, $socket (current one), and $buffer (the message) send_Message($allclients, $socket, $buffer); } } } } ?> This is my ActionScript 2, but I'm pretty sure this is not the problem: Code: [Select] _global.server_connected = false; _global.mySocket = new XMLSocket(); mySocket.onConnect = function(success) { if (success) { msgArea.htmlText += "<b>Server connection established!</b>"; server_connected = true; } else { msgArea.htmlText += "<b>Server connection failed!</b>"; } }; mySocket.onClose = function() { msgArea.htmlText += "<b>Server connection lost</b>"; }; //incoming data from server. var depthb = 6000; var myArray = new Array(); mySocket.onData = function(msg) { //msgArea.htmlText += msg; myArray = msg.split('='); if(_global.pid != myArray[0]) { if(_root["players_" + myArray[0]]) { //if players exist if(_root["players_" + myArray[0]]._x != myArray[1] || _root["players_" + myArray[0]]._y != myArray[2]) { _root["players_" + myArray[0]]._x = myArray[1]; _root["players_" + myArray[0]]._y = myArray[2]; } } else { _root.players.duplicateMovieClip("players_" + myArray[0], 6000); //_root["players_" + myArray[0]]._x = myArray[1]; //_root["players_" + myArray[0]]._y = myArray[2]; } } }; //connect to server. _global.mySocket.connect("192.168.1.71", 9999); If you are good with sockets and such then you should easily be able to spot the problem on why it's buggy, I cannot see what is wrong and really need the client and server to communicate properly. It's OK when you connect alone, but when someone else joins it will start being glitchy and not going to the correct X and Y and then there will be duplicates and such.. If you do not understand I will try and get a demo up and show you what I mean. Thanks. Hi, I am not a PHP programmer. I took on a new client with a simple PHP site, without any databases. The site is up and running on the web. I would like to get it running on my local machine for further development. I have latest version of WAMP installed, running Apache version 2.2.11 and PHP version 5.3.0 I created a directory in the WAMP "www" project directory and it shows up there like it's supposed to when I browse to "localhost" Problem: The home page of website displays text but no, images, styles, footer, header, nav links, etc. Here is the code for the home page: <? define("NAV","home"); require_once('local/local.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>TITLE</title> <meta name="keywords" content=""> <meta name="Description" content=""> <? include("common/dochead.php"); ?> </head> <body onLoad="<? include('common/preloads.php'); ?>"> <!-- ============================ main ============================= --> <div id="main-frame"><div id="main" class="noCollapse"> <? include("common/sign.php"); ?> <div id="right-frame"> <? include("common/navigation.php"); ?> <div id="content-frame"> <div id="content"> <h1>Welcome</h1> <p>This is the content area. This is the content area. This is the content area. </p> </div><!-- end content --> </div><!-- end content-frame --> </div><!-- end right-frame --> <div class="clearFloats"></div> </div><!-- end main --></div><!-- end main-frame --> <? include("common/footer.php"); ?> </body> </html> Any help would be greatly appreciated. I have spent many hours on this. Regards I'm trying to make a simple website where people register to my website. When the user doesn't fill anything inside the boxes they get a message "Please fill all required fields" on the register.php page On my local host require_once works good. It shows up.
But when i upload the files to my sever the require_once does not show up on the register.php It just refreshes and i dont get the message "Please fill all required fields"
This is the code that works in local host but not in a live server <?php require_once 'messages.php'; ?>
Here is my full code
Register page: <html> <?php require_once 'messages.php'; ?> <br><br> <form action="register-clicked.php" method="POST"> Username:<br> <input type="text" name="usernamebox" placeholder="Enter Username Here"> <br><br> Email:<br> <input type="text" name="emailbox" placeholder="Enter email here"> <br><br> Password:<br> <input type="password" name="passwordbox" placeholder="Enter password here"> <br><br> Confirm Password:<br> <input type="password" name="passwordconfirmbox" placeholder="Re-enter password here"> <br><br> <input type="submit" name="submitbox" value="Press to submit"> <br><br> </form> </html>
Register clicked <?php session_start(); $data = $_POST; if( empty($data['usernamebox']) || empty($data['emailbox']) || empty($data['passwordbox']) || empty($data['passwordconfirmbox'])) { $_SESSION['messages'][] = 'Please fill all required fields'; header('Location: register.php'); exit; } if ($data['passwordbox'] !== $data['passwordconfirmbox']) { $_SESSION['messages'][] = 'Passwords do not match'; header('Location: register.php'); exit; } $dsn = 'mysql:dbname=mydatabase;host=localhost'; $dbUser='myuser'; $dbPassword= 'password'; try{ $connection = new PDO($dsn, $dbUser, $dbPassword); } catch (PDOException $exception){ $_SESSION['messages'][] = 'Connection failed: ' . $exception->getMessage(); header('Location: register.php'); exit; }
messages.php <?php session_start(); if (empty($_SESSION['messages'])){ return; } $messages = $_SESSION['messages']; unset($_SESSION['messages']); ?> <ul> <?php foreach ($messages as $message): ?> <li><?php echo $message; ?></li> <?php endforeach; ?> </ul> Edited Wednesday at 12:49 AM by bee65 Following a tutorial on udemy, i tried to learn the very basics of mvc structure. I built the same project on my local server and it worked without giving me any error. but when i tried it on live server. its not working as it should. not showing any error. I tried to figure out the problem and found that for every page loading, it stops at the same line in my main.php file. <?php require($view); ?> starting from the above line. it stops. i came here to share my problem but i am unable to upload my files here. if there is a way to upload and share my files, please guide. zip file size of the whole project is 31.6 kb I have the following socket server. <?php class Controller public function doSomething($conn):void { $foo=new SomeClassWhichDoesntExist(); } } require 'vendor/autoload.php'; $server = new \React\Socket\TcpServer($settings['url'].':'.$settings['port'], \React\EventLoop\Factory::create()); $server->on('connection', function (\React\Socket\ConnectionInterface $rawSocket) { $conn = new LengthPrefixStream($rawSocket); $conn->on('data', function($data) use ($conn){ $controller->doSomething($conn); }); $rawSocket->on('error', function($error, $conn) {exit('error';}); $rawSocket->on('close', function() use ($conn) {exit('close';}); $conn->on('error', function($error, $conn) {exit('error';}); $conn->on('close', function() use ($conn) {exit('close';}); }); $server->on('error', function (Exception $e) {exit('server error';}); Turns out Controller::doSomething() is trying to create a new SomeClassWhichDoesntExist, but since it doesn't exist, composer doesn't require it and then PHP throws an error. But the error is caught by FulfilledPromise::then(), and then appears to eventually be ignored and an exception is never thrown, and the loop continues. In the past, I've always been able to catch these errors, but must have changed something. Any thoughts what might have changed to prevent errors from being caught? namespace React\Promise; class FulfilledPromise implements ExtendedPromiseInterface, CancellablePromiseInterface { public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null) { if (null === $onFulfilled) { return $this; } try { return resolve($onFulfilled($this->value)); } catch (\Throwable $exception) { return new RejectedPromise($exception); //<===== Caught here } catch (\Exception $exception) { return new RejectedPromise($exception); } } }
Hi all I was trying to connect to a database which is running on an external host. So i thought i try the stuff below. That didn't work. Is it possible that the host has disabled external connection or something? I tried to add http:// before the domain, but no succes either Code: [Select] <?php $dbc = mysqli_connect('db87654321.somedomain.com','user','pass','database')// this is line 5 or die(mysqli_error($dbc)); echo 'connected'; ?> it gave the following error: Quote Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2005): Unknown MySQL server host 'db87654321.somedomain.com' (11004) in H:\xampp\htdocs\databasetestfile.php on line 5 P.s. the script worked when upload to the server. P.p.s is there something i should be carefull with when connection to an external database? hi all First of all My client have dot net server on windows OS. They want to display some pages which are created by php. Is there any possibility to display like this. And How can i connect sql server using php on remote to retrieve data. Can any one tell me how can i do this. Thanks in advance I just did a huge import from an app I have been working on. No issues except for this. I uploaded & imported all files & databases from my wampserver (localhost, local server) to my main online server. Before I continue with the problem, I have to give you info on how the files work. I am using a "controller" to view the files. Meaning, from index.php, I call all the files. For example, instead of mysite.com/register.php, its mysite.com/index.php?page=register. The index defines the doctype & html tags etc. The other files that are called through index.php are just pure php code, it does not contain the head & body tags etc. So, the issue is , when the surfer submits a form, i need to set a cookie. this cookie is VERY important. I cannot get it to work. I am getting the header warnings after submit Of course, this is to be expected. But I tried it on my local server, & it worked. I am not very familiar with cookies, this is a side of PHP i never really even touched. I know almost everything but that. So the php code is before the html code on the page, so I figured it was worth a shot. Im guessing the problem here is, since the code being outputted as index.php code + the form page code. So the cookie is being set after the html tags. How can I fix this? I need it to work thru the controller. I cannot just make it a single file, all files on the site needs to be thru this controller, otherwise it will mess everything up. Ino I could just add the code from index.php plus the form page code & just run the php code before all of the html tags, but like I said it has to be called thru index.php. I appreciate your replies, & I hope you guys dont think im an idiot & can understand my question, im terrible with words! I've been working on this for 8 hours and still cannot get sqlsrv_connect to work. Thank you, Microsoft. My connection strings work for Access DBs and MySQL - but I can't get this to work. For servername, I've tried: $serverName = "MYSERVER"; $serverName = "(MYSERVER\MYINSTANCE)"; $serverName = "'MYSERVER\MYINSTANCE'"; $serverName = "(MYSERVER)"; Setup: PHP Compiler = MSVC9 (Visual C++ 2008) C:\Program Files (x86)\PHP\v5.3\php.ini extension_dir C:\Program Files (x86)\PHP\v5.3\ext\ php_sqlsrv_53_nts_vc9.dll in the extension library. And I'm getting an error from sqlsrv_errors, so it looks like the DLL is working. Pulling my hair out here. Any ideas? Code: [Select] $serverName = "MYSERVER\MYINSTANCE"; $connectionInfo = array("UID" => $uid, "PWD" => $pwd, "Database"=>"$dbname"); $conn = sqlsrv_connect( $serverName, $connectionInfo); if($conn) { echo "Connection established.\n"; } else { echo "Connection could not be established.\n"; die( print_r( sqlsrv_errors(), true)); } sqlsrv_close( $conn); Connection could not be established. Array ( => Array ( => 08001 => 08001 [1] => 53 => 53 [2] => [SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [53]. => [SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [53]. ) [1] => Array ( => HYT00 => HYT00 [1] => 0 => 0 [2] => [SQL Server Native Client 10.0]Login timeout expired => [SQL Server Native Client 10.0]Login timeout expired ) [2] => Array ( => 08001 => 08001 [1] => 53 => 53 [2] => [SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. => [SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. ) ) Hi friends... I am using Wamp with PHP 5.3 and want to connect with SQL Server 2005 but not successful. I also tried it with PHP 5.2.8 but it still not working. I google it and found some solutions but not successsful yet. Can anyone give me detailed guide (step by step) that how i can connect PHP with Sql Server 2005??? Thanks in advance... I am using this: $tags = @get_meta_tags($http["domain"]); Is there any way to tell if that function can not connect to the server for reasons such as server being down, or an invalid URL? Is there a way for me to connect to a directory on a NAS server running a windows share from PHP. I can connect from the command line using mount, but I want the connect within my PHP script. Can this be done & if so how? |