PHP Classes

No response on browser

Recommend this page to a friend!

      PHP Termux API  >  All threads  >  No response on browser  >  (Un) Subscribe thread alerts  
Subject:No response on browser
Summary:browser waits
Messages:5
Author:superia
Date:2017-03-20 02:53:35
 

  1. No response on browser   Reply   Report abuse  
Picture of superia superia - 2017-03-20 02:53:35
Setup as per instruction in blog. Using the test.php to try out. My browser waits forever for a response. At the termux console. can see status code 200.
Any advice. Greatly appreciate

  2. Re: No response on browser   Reply   Report abuse  
Picture of Luis Martinez Ulloa Luis Martinez Ulloa - 2017-03-20 17:49:13 - In reply to message 1 from superia
Hello Superia:

Please test all the examples, specially clipshow.php (in Termux):

cd /your/path
php clipshow.php

and copy some text to Android's clipboard; if you have some response with notification and toast, so the Termux:API is correctly installed; else:
* Install Termux:API plug-in from Google Play
* apt install termux-api (in Termux)

cd /your/path
php -S 0.0.0.0:8088 -d /your/path

and open the Web Browser, at the address:
localhost_or_ip:8088/location.php

or

localhost_or_ip:8088/test.php

Because there we haven't an index.php script, we can't browse the root doing localhost:8088/

I can assume that PHP is correctly configured because is very straightforward as can be: apt install php (in Termux)

Please can you send me a more detailed explanation of your problem?

Copy the result of these commands inside Termux (then pressing over the Termux screen for some seconds and selecting the text):

apt search termux-api
apt search php
termux-battery-status

And paste here or in pastebin.com or another place to review.

I wait your response. Thanks!

  3. Re: No response on browser   Reply   Report abuse  
Picture of superia superia - 2017-03-21 01:43:45 - In reply to message 2 from Luis Martinez Ulloa
Hi Luis,

Thanks. Installed termux-api fixed the problem.

Done all tests in test.php. all works except test f=1 which give
Warning: strstr(): Empty needle in /storage/emulated/0/Download/test.php on line 112


  4. Re: No response on browser   Reply   Report abuse  
Picture of Sos Equus Sos Equus - 2019-12-15 11:03:09 - In reply to message 3 from superia
I get same error, but actually is after you get asked for location permission... I wonder if i use webview, it will still work?

  5. Re: No response on browser   Reply   Report abuse  
Picture of Sos Equus Sos Equus - 2019-12-15 11:25:23 - In reply to message 4 from Sos Equus
I think if you run your server in another folder than "storage", leads to this error. (i tried again inside cd/storage, and works perfect!)