Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
Is it possible to invoke the browser via php code ?
Thank you in advance.
PHP is processed by the Web server. The browser is a client application on a client machine. The server cannot launch a client application without having a helper application in place and running on the client machine. Any other architecture would be very bad from a security standpoint - the client machine would have no control over who could run an application on their machine.
if you use firefox, you can use this:
pclose(popen('firefox -url http://www.example.com/reader.php?code=12345 &', 'r'));
other browsers have different console arguments, so you can try it yourself.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I've setup a websocket server on local, and I'm able to make request on it. 127.0.0.1:2345,
But when setup the WebSocket on a AWS Ubuntu 18 server, I'm unable to make request at the 1.2.3.4:2345 (Assume that's my server IP).
What is the step that I might be missing?
It was just a matter of whitelisting the post 2345 in the security groups in AWS attached to the instance.
I thought I had to do some NAT or something. But it wasn't the case.
Whitelisting port in the EC2 security group. is the solution.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I am building a website using wordpress on local WAMP. Already running perfect when I go through the server computer. But, when trying to access from other device that are connected on the network LAN, it work. but, the browser brings up a text link without border, background, images etc on my project.
What should I do?
That's because you are setting the URLs as http://localhost,
try changing all links to your machine's IP address.
http://192.168.1.101 for example
Edit
The browser only shows texts with no styles because it fails to load the assets,
and that's because you are setting the base URL to localhost.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
Issue: I made an application without problems working on localhost where I debuged it. But when I uploaded it on server in internet (my school server) few SQL didnt work, there were no PHP error messages and i tested SQL code in phpMyAdmin(on server) and there it worked.
Guys,can you help me solve this please?
The main problem is that you cannot provide any useful information about whats wrong. In this case, we need to tell PHP that for any and every problem please send it down to the client on page load. Normally in production this is precisely what you do not want to do but in this case- we need it.
Put the code below at the beginning of your index.php file, or whatever file your web server is configured to send requests to:
ini_set('display_startup_errors',1);
ini_set('display_errors',1);
error_reporting(E_ALL);
So long as your web server is successfully sending requests there, something should come up on page load that will help us determine the issue.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am trying to run PHP script from erlang code.Can anybody explain with a simple example?
I am basically trying put some data on google server via this php script.
Since Erlang webserver (Yaws) CAN run PHP scripts, this is an example.
first on the yaws.conf, write this.
the env variable.
php_exe_path = /usr/bin/php-cgi
Also be sure you enable the php processing for the individual server, like this.
<server www.example.org>
port = 80
listen = 0.0.0.0
allowed_scripts = php yaws cgi
</server>
Yaws will invoke the php-cgi binary and talk the CGI protocol to the
binary.
And thats all, you can run PHP Scripts into Earlang WebServers (Yaws)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
In my project simply I want to run local application as netbeans or word document installed in my computer on click of a link? Is it possible ? If yes how am I to do it? If no why it's not possible.
Thanks in advance.
You can link to a PHP script and then in this script use exec() to run your application.
<?php
exec('path/to/your/app.exe -possibleparam -param2');
/* EOF */
I don't know if it is that what you are looking for:
http://www.php.net/manual/en/function.exec.php
exec will execute the app in the machine where the php is installed (so your server).
If you mean that the php should open an app on the user pc while he's surfing on your site, no.
The only way to to this is an NPAPI plugin. And use Javascript, not PHP.
PHP runs on the server. It has no control over the client. This is by design. If web pages could run programs on the client computer then it would be abused to an unlimited degree, for spam, viruses, and junk.
You can use the exec function to run a program on the server. If your server and client happen to be running on the same local computer, then this will do what you want.