PHP - Moved: Ssh Connection Issue
This topic has been moved to Linux.
http://www.phpfreaks.com/forums/index.php?topic=317047.0 Similar TutorialsI'm using XAMPP and im a major noob. Last nite I was following this tutor and the connection script that was on it didnt work for me. So today I tried a connection script from another tutor on another site that worked just fine. here is the script that worked I saved it as test.php and went to localhost/test/php and it loaded a page connected to mysql <?php mysql_connect("localhost", "shadowing", "eguitars8") or die(mysql_error()); echo "Connected to MySQL<br />"; ?> The script that didnt work i saved it as connect.php and went to localhost/connect/php and it gave me a page saying "Object not found error "the request url was not found on this server." I understand this script doesnt have a echo on it but shouldnt it still take me to a blank white page instead of a error page. Or is there something wrong with it. Really appreciate any help with this. the script that didnt work is below <?php $mysql_server = "localhost"; // localhost is common on most hosts. $mysql_user = "shadowing"; // this is the name of your username of the server. $mysql_password = "eguitars8"; // the password connected to the username. MAKE IT COMPLEX. $mysql_database = "spacewars"; // the database name of where to connect to and where the information will be help. $connection = mysq1_connect("$mysql_server","$mysql_user","$mysql_password") or die ("Unable to establish a DB connection"); $db = mysql_database("$mysql_database") or die ("Unable to establish a DB connection"); ?> Hey, 'all. I think I'm just tired because I can't see the issue here, but I'm trying to run a SOAP 1.2 call to a legit endpoint using a legit function call and getting nothing but a 'Could not connect to host' message with a fault code of 'HTTP'. Here's some code: class Testing{ private $_user = "username"; private $_pass = "password"; private $_system = 1; private $_uri = "http://legit.com/endpoint/"; private $_location = "givenlocation.asmx"; private $_soapClient; public function __construct(){ $this->_soapClient = new SoapClient(null, [ 'location' => "{$this->_uri}{$this->_location}", 'uri' => $this->_uri, 'soap_version' => SOAP_1_2, 'exceptions' => true, 'trace' => true, ]); } public function makeCall(){ try{ $data = $this->_soapClient->__soapCall('functionCall', [ 'username' => $this->_user, 'password' => $this->_pass, ]); }catch(SoapFault $e){ die("<pre>".var_export($e, true)."</pre>"); } } } $testSoap = new Testing(); $testSoap->makeCall(); I'll happily take a "Let me Google that for you" result link if it's that simple, but I'm just not seeing the problem. Anybody? As always, help is greatly appreciated.
Forgot to mention - I don't get an error on instantiation of the SoapClient() object, just the __soapCall() call. Edited June 18, 2019 by maxxdThis topic has been moved to Installation in Windows. http://www.phpfreaks.com/forums/index.php?topic=312024.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=353212.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=327840.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=348545.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=342389.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=328179.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=348680.0 This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=349184.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=322069.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=347219.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=334644.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=353224.0 This topic has been moved to Installation in Windows. http://www.phpfreaks.com/forums/index.php?topic=347714.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=328244.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=320820.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=351266.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=344127.0 Hi Guys, need a little help and drawn a blank. The code that is not working is below $result = $conn->query("SELECT * FROM MK_migration_details WHERE mig_bid='".$_SESSION['bid']."'"); I can confirm the $_SESSION['bid'] is working as echo's out on another part of the page. and the above $result works when i manually type the search criteria like below. $result = $conn->query("SELECT * FROM MK_migration_details WHERE mig_bid='300101'"); Basically no result turn up on the page. Any ideas or advise how I can diagnose? |