Go to advanced search

by stockton
Thu Aug 23, 2018 7:16 am
Forum: Raspbian
Topic: Explain this command
Replies: 17
Views: 427

Re: Explain this command

fbe You are quite correct in saying that that file only needs to be read.
Now I was about to do the Apache Directory setup but it would appear that you are saying that is not necessary and, if I understand correctly, all I need do is alter the permissions on the file to 755.
by stockton
Wed Aug 22, 2018 12:35 pm
Forum: Raspbian
Topic: Explain this command
Replies: 17
Views: 427

Re: Explain this command

Initially I was not thinking of making a web page to monitor my solar system but I have now changed my mind and would like a "real time" web page doing just that. The file that I want to get to is on an external drive as it is very data intensive, a write every 2 or 3 seconds, and I did not for that...
by stockton
Wed Aug 22, 2018 11:02 am
Forum: Raspbian
Topic: Explain this command
Replies: 17
Views: 427

Re: Explain this command

[email protected]:/var/www/html/lcars $ sudo -i [email protected]:~# sudo chown -R pi:www-data /media/pi/ chown: changing ownership of '/media/pi/My Passport/Lenovo-20180406/android/node_modules/cordova/node_modules/elementtree/tests/test-simple.js': Operation not permitted and carries on throught the whole HDD w...
by stockton
Wed Aug 22, 2018 10:06 am
Forum: Raspbian
Topic: Explain this command
Replies: 17
Views: 427

Re: Explain this command

sudo -u www-data ls -la /media/pi/
ls: cannot open directory '/media/pi/': Permission denied
by stockton
Wed Aug 22, 2018 10:00 am
Forum: Raspbian
Topic: Apache/Raspbian file Permissions
Replies: 2
Views: 66

Re: Apache/Raspbian file Permissions

Not FAT32, normal ext3.
by stockton
Wed Aug 22, 2018 9:58 am
Forum: Raspbian
Topic: Explain this command
Replies: 17
Views: 427

Re: Explain this command

tpyo kingg to answer your question. I have a system monotoring my solar system and it is working fine writing data to the aforementioned USB connected HDD. I now wish to display that data from a "real time" web page using HTML/javascript/CGI but cannot access that file unless I run the CGI from the ...
by stockton
Wed Aug 22, 2018 9:27 am
Forum: Raspbian
Topic: Explain this command
Replies: 17
Views: 427

Re: Explain this command

I suspect you mean "run as www-data" rather than "run as www.data" However su www.data No passwd entry for user 'www.data' [email protected]:/var/www/html/lcars $ su www-data Password: su: Authentication failure [email protected]:/var/www/html/lcars $ su www-data Password: su: Authentication failure The 1st time wi...
by stockton
Wed Aug 22, 2018 8:54 am
Forum: Raspbian
Topic: Explain this command
Replies: 17
Views: 427

Explain this command

It has been suggested that I can change permissions on a USB attached HDD file with the following command sudo su www-data -s /bin/sh -c "ls -la /media/pi" but firstly the command fails with ls: cannot open directory '/media/pi': Permission denied and I do not understand the command enough to be abl...
by stockton
Wed Aug 22, 2018 8:26 am
Forum: Raspbian
Topic: Apache/Raspbian file Permissions
Replies: 2
Views: 66

Apache/Raspbian file Permissions

I need to create a "real time" web page which reads data from a USB attached HDD at /media.pi/MyPassport/Axpert/solar.log. I am getting a permissions error when I attempt reading that file via CGI/AJAX but when I run said program from command line it works perfectly. [email protected]:~ $ ls -al /media/pi/M...
by stockton
Mon Aug 20, 2018 4:57 am
Forum: Raspbian
Topic: Understanding permissions
Replies: 13
Views: 377

Re: Understanding permissions

Unfortunately that did not work. [email protected]:~ $ sudo su www-data -s /bin/sh -c "ls -la /media/pi" ls: cannot open directory '/media/pi': Permission denied [email protected]:~ $ ls -al /media/pi/ total 264 drwxr-x---+ 4 root root 4096 Aug 18 05:46 . drwxr-xr-x 3 root root 4096 Mar 8 14:26 .. drwxrwxrwx 1 pi p...
by stockton
Sun Aug 19, 2018 5:27 pm
Forum: Raspbian
Topic: Understanding permissions
Replies: 13
Views: 377

Re: Understanding permissions

Thanks you suggestions worked for me. You should be able to browse to it at 196.32.102.29/lcars/solar5.html. I placed a copy of solar.log into the cgi-bin folder as you suggested but I would prefer to use the actual file at /media/pi/MyPassport/Axpert The traffic on solar.log is heavy and as I don't...
by stockton
Sun Aug 19, 2018 1:25 pm
Forum: Raspbian
Topic: Understanding permissions
Replies: 13
Views: 377

Re: Understanding permissions

I made the change to the source that you suggested but I still get a 500 and /var/log/apache2/error.log still contains [Sun Aug 19 15:16:07.268215 2018] [cgi:error] [pid 5771] [client 192.168.0.176:55366] End of script output before headers: LastLine, referer: http://192.168.0.120/lcars/solar5.html ...
by stockton
Sun Aug 19, 2018 11:24 am
Forum: Raspbian
Topic: Understanding permissions
Replies: 13
Views: 377

Re: Understanding permissions

I am getting [Sun Aug 19 13:15:31.672730 2018] [cgi:error] [pid 5771] [client 192.168.0.176:54656] End of script output before headers: LastLine, referer: http://192.168.0.120/lcars/solar5.html in /var/log/apache2/error.log #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <string.h...
by stockton
Sun Aug 19, 2018 8:40 am
Forum: Raspbian
Topic: Understanding permissions
Replies: 13
Views: 377

Re: Understanding permissions

Thank you FBE. I followed all your steps but still I get the contants of the binary displayed rather than the result of running the binary. [email protected]:/var/www/html/lcars $ ls -al /usr/lib/cgi-bin/LastLine -rwxr-xr-x 1 root root 8376 Aug 19 10:32 /usr/lib/cgi-bin/LastLine [email protected]:/var/www/html/lcar...
by stockton
Sun Aug 19, 2018 5:02 am
Forum: Raspbian
Topic: Understanding permissions
Replies: 13
Views: 377

Re: Understanding permissions

I got a step further but now the command
xhr.open('GET', './LastLine', true);
Returns the content of my C binary rather than return the result of running the binary.

/var/www/html/lcars $ ls -al ./LastLine
-rwxr-xr-x 1 root root 8376 Aug 17 12:21 LastLine
by stockton
Sat Aug 18, 2018 2:46 pm
Forum: Troubleshooting
Topic: gtextcommand error
Replies: 1
Views: 62

Re: gtextcommand error

As gtextcommand was part of PiAUISuite and I am not using PiAUISuite and have no future intention of using PiAUISuite I uninstalled PiAUISuite. Not a proper solution but it did what I needed.
by stockton
Sat Aug 18, 2018 2:41 pm
Forum: Raspbian
Topic: Understanding permissions
Replies: 13
Views: 377

Understanding permissions

I am attempting to create a "real time" web page under Apache2 using HTML and AJAX and a C program that I wrote. The web page includes a call to Ajax which in turn calls my C program. Each of these parts works perfectly well when used apart from each other but in combination I get a permissions erro...
by stockton
Sat Aug 18, 2018 11:13 am
Forum: Troubleshooting
Topic: gtextcommand error
Replies: 1
Views: 62

gtextcommand error

One of my machines is emailing me as follows. gtextcommand: symbol lookup error: gtextcommand: undefined symbol: _ZN5boost9re_detail12perl_matcherIPKcSaINS_9sub_matchIS3_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE14construct_initERKNS_11basic_regexIcSA_EENS_15regex_constants12_match_flagsE Th...
by stockton
Thu Jul 19, 2018 11:15 am
Forum: Other programming languages
Topic: PHP5 mysqli.so
Replies: 5
Views: 438

Re: PHP5 mysqli.so

DougieLawson we need to tell the Squirrelmail developers to pull their fingers out and switch from PHP5 to PHP7.
by stockton
Sat Jul 14, 2018 7:36 am
Forum: Python
Topic: extract variables from mariadb select
Replies: 2
Views: 142

Re: extract variables from mariadb select

Thank you that worked for me.
by stockton
Sat Jul 14, 2018 4:55 am
Forum: Python
Topic: extract variables from mariadb select
Replies: 2
Views: 142

extract variables from mariadb select

Please help me fix the following program. #!/usr/bin/python import mysql.connector as mariadb mariadb_connection = mariadb.connect(user='root', password='123456789', database='gae3') cursor = mariadb_connection.cursor() #retrieving information Name = " " cellNumber = " " email = " " notes = " " curs...
by stockton
Thu Jul 12, 2018 6:00 pm
Forum: Other programming languages
Topic: PHP5 mysqli.so
Replies: 5
Views: 438

PHP5 mysqli.so

I am trying to understand why I would get the apache error/warning ;- PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/mysqli.so' when in fact mysqli.so is in /usr/lib/php/20151012/mysqli.so What is the solution? Copy mysqli.so to /usr/lib/php5/20131226 or copy /usr/l...
by stockton
Mon Jul 09, 2018 7:51 am
Forum: Python
Topic: Addressing a USB port
Replies: 12
Views: 360

Re: Addressing a USB port

topguy you reply bears no fruit. It does not work.
by stockton
Sun Jul 08, 2018 1:34 pm
Forum: Python
Topic: Addressing a USB port
Replies: 12
Views: 360

Re: Addressing a USB port

I missed seeing the WLAN adapter. Sorry.
So how does one without rebooting, identify USB devices?
I've tried grep -iR usb /var/log/messages and syslog as well as
grep -iR tty on both files. All without success.
by stockton
Sun Jul 08, 2018 9:28 am
Forum: Python
Topic: Addressing a USB port
Replies: 12
Views: 360

Re: Addressing a USB port

The line from dmesg | grep USB reading
"new high-speed USB device number 5 using dwc_otg"
made me think of /devb/ttyS5

Go to advanced search