I've resolved the problem by performing a factory reset on the Omega2+ (ver: 0.1.10 b160) and then installing the full version of Python2.7 (not the light version) and PySerial, all works well now.
Paul
Just messin' with the Onion... for my model railroad...
I've resolved the problem by performing a factory reset on the Omega2+ (ver: 0.1.10 b160) and then installing the full version of Python2.7 (not the light version) and PySerial, all works well now.
Paul
Sorry for the delay in getting back, Christmas and New Years ... Happy New Year!
Thank-you Bill and cas for the suggestions, took the easy root first and changed the "Omega-xxx.local" to "192.168.3.1" and the connection worked. ie in the ATOM's .ftpconfig file:
original:
{
"protocol":"sftp",
"host":"Omega-xxxx.local",
"port":"22",
"user":"root",
"pass":"xxxxxxxx",
"remote":"/"
}
...changed to:
{
"protocol":"sftp",
"host":"192.168.3.1",
"port":"22",
"user":"root",
"pass":"xxxxxxxxxx",
"remote":"/"
}
Changing it back to "Omega-xxxx.local" brought back the problem. I'm not sure what you mean Bill with:
If the latter perhaps you've not yet generated a key pair for the new laptop and sent over the public key to the device?????
Either way its working now, thanks for the help.
Paul
Hello, I've recently rec'd a new Win10 laptop and I am able to connect to the Omega2+ using PuTTY and the application that I am running on the Omega is working (ie WiFi is ok). My problem is I am not able to get the Atom text editors Remote sftp working. When remote connecting, Atom gives an error message:
Remote FTP: Connection failed
Error: getaddrinfo ENOTFOUND Omega-xxxx.local Omega-xxxx.local:22
I have the remote sftp working on my old Win7 laptop with no problems... just wondering where in Win10 the problem may be... any help on this is really appreciated.
Paul
Hello Jon,
Thank you very much, followed your instructions and php session is working (was a bit reluctant to perform a factory reset on the Omega... but it was worth it).
Now I need to restore the old omega's program/files and see if session still works.
Best Regards,
Paul
Hello Jon,
I've looked into the session.io file and it has a bunch gibber and a message half way through indicating:
Session is not active
Cannot call default session handler ss
php-7.2.9/ext/session/mod_user_class.c
Parent session handler is not open
S SS and much more (not able to copy it out of Atom editor ....)
The result of phpinfo() call does not give a section labeled session as you've posted.
I'm running php7 (7.1.1-1) php-cgi (7.1.1) and php-mod-session (7.2.4-2). I've tried re-installing php7, php-cgi and php7-mod-session and rebooting, no luck. Tried removing and re-installing the above packages all with ver 7.2.9-3 and rebooting ... but then I get a browser error: Bad Gateway
The process did not produce any response.
Luckily, I have a firmware back-up on a USB stick so I can restore the Omega2+ to its previous working state (ie my php script is working but not the simple sessions script).
It appears I'm out of luck with PHP Sessions and the Omega .... I'll have to find another way to identify a user...
Thanks for the help,
Best Regards,
Paul
Hello Jon,
Really appreciate your help on this.
The missing < in <?php was a copying mistake, it's there...
I've checked the phpinfo() file but there's no section on Sessions,
just:
'--enable-session=shared' in the Configure Command section
Additional .ini files parsed /etc/php7/20_session.ini
in the standard section....
session.trans_sid_hosts no value no value
session.trans_sid_tags a=href,area=href,frame=src,form=
a=href,area=href,frame=src,form=
int the Environment section ...
SCRIPT_NAME /Sessions/sessions.php
SCRIPT_FILENAME /www/Sessions/sessions.php
REQUEST_URI /Sessions/sessions.php
I have removed and re-installed php7-mod-session, rebooted, and performed an uhttpd restart ... to no avail, error message still there when opening page...
Maybe removing all PHP7 packages and re-installing will resolve this, otherwise ??
Best Regards,
Paul
Hello Jon,
I have removed the php7-cli but the result is the same error message as above. The demo_session1.php script is pretty bare-bones:
?php
session_start();
//phpinfo();
?>
<!DOCTYPE html>
<html>
<body>
<h1> Testing ... Session </h1>
<?php
echo "Current script owner is: " . getmypid();
?>
</body>
</html>
I have tried the phpinfo() ... without the session_start() ... and it comes back with a lot of info, I'm not sure where to look for session issues ? Also, the getmypid() returns an int and
if (extension_loaded('session')) {
echo "Session Loaded";
}else{
echo "Session not loaded";
}
displays ... "Session not loaded" (when the session_start() is commented out of course).
My end objective in this is to have php identify the user accessing the file so that I can have the script respond differently depending on the user. Unless there's another way to uniquely identify a user without using session.
Best Regards,
Paul
Thanks for replying Jon, list interpreter is:
list interpreter ".php=/usr/bin/php-cgi"
Note: the Omega's firmware is 0.1.10 b160
Best Regards,
Paul
Hello,
I am not able to get PHP7 Sessions working on my Omega2+, when I run this php script from a browser:
<?php
session_start();
?>
I get the following error message:
Fatal error: Uncaught Error: Call to undefined function session_start() in /www/Sessions/demo_session1.php:2 Stack trace: #0 {main} thrown in /www/Sessions/demo_session1.php on line 2
I have php7, php7-mod-session, php7-cgi, php7-cli, php7-fastcgi installed. I am able to run other php/html scripts with no problems. When I run phpinfo() in the script (session_start(); commented out) it appears the sessions is enabled... '--enable-session=shared'.
Any help on this would be greatly appreciated.
Paul
I've resolved the problem by performing a factory reset on the Omega2+ (ver: 0.1.10 b160) and then installing the full version of Python2.7 (not the light version) and PySerial, all works well now.
Paul
Hello, I'm encountering the following error message when trying to run --
import serial -- in a Python script (I have installed pyserial):
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/serial/init.py", line 29, in <module>from serial.serialposix import Serial, PosixPollSerial, VTIMESerial # noqa
File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 58, in <module> import array
ImportError: Error relocating /usr/lib/python2.7/lib-dynload/array.so: _PySlice_Unpack: symbol not found
I have no problems communicating to an Arduino through the Omega's command line (or screen commands), I would now like to starting running scripts to communicate to the Arduino.
Any help in this is greatly appreciated,
Paul