PHP Websample
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
PHP Websample
C:UsersUnicorn>c:phpphp -v
PHP 5.6.0 (cli) (built: Aug 27 2014 11:53:11)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
C:UsersUnicorn>
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
PHP Websample
sorry, I don't do web development on Windows. Prefer Linux and OS X.
I'm pretty sure that SOAP client is working since your error message said it couldn't connect to host. However, make sure SOAP is installed and enabled
http://devnumbertwo.com/php-class-soapclient-not-found/
Is Switch and PHP running on same server? If not then customize this line with the name of your Switch server. Also verify port # in Switch preferences in 51008.
$protected_url = "https://localhost:51008";
I'm pretty sure that SOAP client is working since your error message said it couldn't connect to host. However, make sure SOAP is installed and enabled
http://devnumbertwo.com/php-class-soapclient-not-found/
Is Switch and PHP running on same server? If not then customize this line with the name of your Switch server. Also verify port # in Switch preferences in 51008.
$protected_url = "https://localhost:51008";
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
PHP Websample
i prefer not to do anything on windows:) Reality forces me unfortunately.
Yes they are on the same machine.
I will see whether I can find a linux box to set up the PHP frontend.
one question: what are the bandwidth requirements for the connection between the web server and switch?
Thanks
Ariel
Yes they are on the same machine.
I will see whether I can find a linux box to set up the PHP frontend.
one question: what are the bandwidth requirements for the connection between the web server and switch?
Thanks
Ariel
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
PHP Websample
i prefer not to do anything on windows:) Reality forces me unfortunately.
Yes they are on the same machine.
I will see whether I can find a linux box to set up the PHP frontend.
one question: what are the bandwidth requirements for the connection between the web server and switch?
Thanks
Ariel
Yes they are on the same machine.
I will see whether I can find a linux box to set up the PHP frontend.
one question: what are the bandwidth requirements for the connection between the web server and switch?
Thanks
Ariel
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
PHP Websample
ArielRauch wrote: what are the bandwidth requirements for the connection between the web server and switch?
very small except when you submit files
very small except when you submit files
PHP Websample
gabrielp wrote: Just curious -- what does the web services module do? I've done a lot with PHP's SoapClient and it's really great. I did some stuff with Switch in Javascript using their Soap class which turned out all right but it would be great if I could roll in my PHP code into Switch somehow.
What you have been doing with the SOAP class in Javascript is to use Switch as a SOAP client. The Web Services Module enables the use of Switch Server as a SOAP server, so you can write some external application (usually, but not always, a web page) that acts as a Switch Client.
You can easily execute PHP code in Switch with the "Execute command" element. The command is the path to your PHP server and in the arguments you specify the name of your PHP script, plus any other parameters you can pick up from all the available Switch variables.
Freddy
What you have been doing with the SOAP class in Javascript is to use Switch as a SOAP client. The Web Services Module enables the use of Switch Server as a SOAP server, so you can write some external application (usually, but not always, a web page) that acts as a Switch Client.
You can easily execute PHP code in Switch with the "Execute command" element. The command is the path to your PHP server and in the arguments you specify the name of your PHP script, plus any other parameters you can pick up from all the available Switch variables.
Freddy
PHP Websample
Thanks for all who chimed in with the explanation. The web services module does sound pretty cool.
As far as the error, I'm not 100% sure I'm understanding what the issue is because I'm a little confused about how this is setup. But... the main issue seems to be that there is an uncaught SoapFault exception, so I'd try catching that.
try {
//...
} catch (SoapFault $e) {
echo "SoapFault: ".print_r($e, true)."n";
//echo "faultcode: '".$e->faultcode."'";
//echo "faultstring: '".$e->getMessage()."'";
}
I think it should be caught if your catching Exception, but maybe try a print_r on $e?
As far as the error, I'm not 100% sure I'm understanding what the issue is because I'm a little confused about how this is setup. But... the main issue seems to be that there is an uncaught SoapFault exception, so I'd try catching that.
try {
//...
} catch (SoapFault $e) {
echo "SoapFault: ".print_r($e, true)."n";
//echo "faultcode: '".$e->faultcode."'";
//echo "faultstring: '".$e->getMessage()."'";
}
I think it should be caught if your catching Exception, but maybe try a print_r on $e?
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
PHP Websample
Only to keep you posted: support connected to the server but was not able to solve the issue.
They will get back with new ideas - I hope
They will get back with new ideas - I hope
-
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
PHP Websample
ok - support found out that it does not support php 5.6.
Afterwards I ran into other permission issues and I finally moved to a linux box.
May the force be with me
Afterwards I ran into other permission issues and I finally moved to a linux box.
May the force be with me