PHP-script runs locally but not remotely

48 views
Skip to first unread message

Jan Eyking

unread,
Dec 17, 2019, 4:03:31 PM12/17/19
to WebIOPi
I have this PHP-script:

<?php echo "Hello world!"; ?>

located in the directory where my webIOPi index file is. If I run this script locally it works:


my browser displays Hello world!

If I try to run this script remotely and type:

[my public IP address]:8000/hello_world.php

The script is not executed, only the file 'hello_world.php' is downloaded.

How come?

hal8000b

unread,
Jan 12, 2020, 6:19:51 PM1/12/20
to WebIOPi

Short answer, I dont know.

Longer answer. Post your php file it may allow someone to see whats wrong.
Also what do you need to do?
It may be possible using html5 css3 and javascript without php

Andrew McClure

unread,
Jan 12, 2020, 6:33:51 PM1/12/20
to web...@googlegroups.com
These are different interfaces.  Is 8000 proxied or is it a separate listener?  I don't know much about WebIOPI, but looking at this it suggests the content type attributes are not being passed back in the HTTP headers correctly.   

I would be setting up a wireshark, and comparing the difference in headers.  Also, ensuring I know exactly what differences there were in the configurations of these two listeners.


--
You received this message because you are subscribed to the Google Groups "WebIOPi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webiopi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webiopi/6423956d-2296-4739-bf07-9f74c6a54777%40googlegroups.com.


--
Andrew McClure
Senior Design Engineer
Tait Communications
Mobile: 0279635208




This Communication is Confidential. We only send and receive email on the
basis of the terms set out at www.taitradio.com/email_disclaimer

jse.ne...@gmail.com

unread,
Jan 11, 2021, 9:09:55 AM1/11/21
to WebIOPi
Seeing my question again - sorry for not responding earlier - it isn't much of an effort to tell how I worked around it. I've installed Apache2 and reach the script by another port, set in /etc/apache2/sites-available/default and  /etc/apache2/ ports.conf. 
Reply all
Reply to author
Forward
0 new messages