Go to advanced search

by rpdom
Sun Dec 10, 2017 7:45 pm
Forum: General discussion
Topic: How to execute program on server without breaking security issues ?
Replies: 14
Views: 381

Re: How to execute program on server without breaking security issues ?

Your "error.log" file only contain information about each time the apache server starts. If you want to see IF your PHP program has been run, take a look at "access.log". What is index.php supposed to do ? What do you see when you open that page in a browser ? WRONG! The error log will log ANY fail...
by rpdom
Sun Dec 10, 2017 6:31 pm
Forum: Advanced users
Topic: REAL MySQL instead of MariaDB
Replies: 4
Views: 124

Re: REAL MySQL instead of MariaDB

What is wrong with using mariadb? It's a drop-in replacement for mysql.
by rpdom
Sun Dec 10, 2017 6:28 pm
Forum: Automation, sensing and robotics
Topic: Beginner - Automation of Outside Christmas Lights
Replies: 48
Views: 1350

Re: Beginner - Automation of Outside Christmas Lights

bensimmo wrote:
Sun Dec 10, 2017 6:21 pm
I've lost track...
So the room gets to 21C, turns the heating on and also the Christmas lights to say it's a Warm welcome this Christmas ?
Actually, the Pi that controls my heating does also turn on my Christmas tree lights at sunset in December :D
by rpdom
Sun Dec 10, 2017 6:16 pm
Forum: Beginners
Topic: Best command to shut Rpi down
Replies: 8
Views: 163

Re: Best command to shut Rpi down

Has the behaviour of "halt" reverted back to what it used to be? I recall in older versions of Debian it used to do a full poweroff, but they (Debian maintainers) realised that wasn't what it was supposed to do. So they fixed it in Jessie (IIRC). The difference was more obvious on a PC where "halt" ...
by rpdom
Sun Dec 10, 2017 4:01 pm
Forum: Beginners
Topic: Best command to shut Rpi down
Replies: 8
Views: 163

Re: Best command to shut Rpi down

I always use sudo poweroff
by rpdom
Sun Dec 10, 2017 12:27 pm
Forum: General programming discussion
Topic: How to Autorun a Bash .sh script located on optical media when optical media is inserted?
Replies: 14
Views: 428

Re: How to Autorun a Bash .sh script located on optical media when optical media is inserted?

DougieLawson wrote:
Thu Dec 07, 2017 1:42 pm
rpdom wrote:
Thu Dec 07, 2017 12:58 pm
DougieLawson wrote:
Thu Dec 07, 2017 12:39 pm
You just can't fork or spawn a new task directly from the udev script.
I never suggested that you should.
I know, you said "send a message to another process to action the udev event" (paraphrased).
Exactly :roll:
by rpdom
Sun Dec 10, 2017 7:06 am
Forum: Raspbian
Topic: [HowTo!] Watch video 1080p desktop
Replies: 9
Views: 294

Re: [HowTo!] Watch video 1080p desktop

Another alternative is to group the commands in a subshell and pipe the output of the whole lot into the file. ( # -START---------------------------------------------------------------- echo '[Desktop Entry]' echo 'Version=1.0' echo 'Name=Chromium mediaplayer' echo 'GenericName=Mediaplayer' # and al...
by rpdom
Sun Dec 10, 2017 5:58 am
Forum: Beginners
Topic: Sequential file nameing
Replies: 3
Views: 98

Re: Sequential file nameing

Probably not the easiest way to do it, and could be more flexible when it comes to the filenames and I'm not fully awake yet, but here's something that will work for sequential files within the given spec (data0001.txt to data9999.txt): #!/bin/bash # Generate a sequential file name lastfile="$(ls da...
by rpdom
Sun Dec 10, 2017 5:36 am
Forum: Beginners
Topic: 2nd Pi doesn't boot
Replies: 3
Views: 106

Re: 2nd Pi doesn't boot

First stop in "not booting" scenarios is to look at the Not booting sticky post in the Troubleshooting section of the forum. I'd check the contents of your card (put it in a PC and see what files can be seen on it). Also pay attention to what the red and green LEDs do when the Pi is powered on - the...
by rpdom
Sat Dec 09, 2017 8:08 pm
Forum: General discussion
Topic: How to execute program on server without breaking security issues ?
Replies: 14
Views: 381

Re: How to execute program on server without breaking security issues ?

Those permissions should be sufficient. Why do you say it hasn't got permissions? Is there an error in a log file somewhere?
by rpdom
Sat Dec 09, 2017 5:38 pm
Forum: Beginners
Topic: Bash script to create file?
Replies: 6
Views: 135

Re: Bash script to create file?

So you want to create a file called (for example): /home/pi/newproject 171209173400 ? Complete with the space? (personally I would use an underscore, as using a space means you have to quote the filename. Do you want to put anything in the file? To create an empty file with this naming convention, y...
by rpdom
Fri Dec 08, 2017 6:30 am
Forum: Advanced users
Topic: Assigning an IP to Respbarry Pi 2 Model B1.1
Replies: 40
Views: 920

Re: Assigning an IP to Respbarry Pi 2 Model B1.1

You need to enable ssh on the card before you put it in the Pi.

Plug it into a windows system (or whatever you used to create it) and make a file called "ssh" or "ssh.txt" in the first partition of the card. Then put it in the Pi and power up. SSH should then be enabled.
by rpdom
Fri Dec 08, 2017 5:46 am
Forum: Advanced users
Topic: Assigning an IP to Respbarry Pi 2 Model B1.1
Replies: 40
Views: 920

Re: Assigning an IP to Respbarry Pi 2 Model B1.1

Did you enable ssh on the Pi after writing the image to the card?
by rpdom
Fri Dec 08, 2017 5:35 am
Forum: Advanced users
Topic: How to insmod Linux usb mass storage device
Replies: 4
Views: 202

Re: How to insmod Linux usb mass storage device

Yes, the Zero and Zero W can be used as USB gadgets.
by rpdom
Fri Dec 08, 2017 5:24 am
Forum: Raspbian
Topic: PHP5, MySQL & MySQLAdmin issues on latest raspbian stretch release
Replies: 2
Views: 145

Re: PHP5, MySQL & MySQLAdmin issues on latest raspbian stretch release

MariaDB is a fork of MySQL. It works as a drop-in replacement. All your code should be compatible. I have some servers running MariaDB and some running MySQL and my programs can use both with no changes. PHP7.0 has a few changes from PHP5.x, most importantly the mysql_xxxx() functions have gone. You...
by rpdom
Thu Dec 07, 2017 9:10 pm
Forum: Automation, sensing and robotics
Topic: Beginner - Automation of Outside Christmas Lights
Replies: 48
Views: 1350

Re: Beginner - Automation of Outside Christmas Lights

Overnight I have the main temperature set to 16°C If it drops below that the heating will cut in. In the morning that gradually ramps up to about 18.5°C and back down in the evening. I have some PHP that generates a graph and some more code that drives a Nokia 5110 type display or generates an ident...
by rpdom
Thu Dec 07, 2017 12:58 pm
Forum: General programming discussion
Topic: How to Autorun a Bash .sh script located on optical media when optical media is inserted?
Replies: 14
Views: 428

Re: How to Autorun a Bash .sh script located on optical media when optical media is inserted?

DougieLawson wrote:
Thu Dec 07, 2017 12:39 pm
You just can't fork or spawn a new task directly from the udev script.
I never suggested that you should.
by rpdom
Thu Dec 07, 2017 12:37 pm
Forum: Raspbian
Topic: Headless Ethernet connection - refused
Replies: 15
Views: 566

Re: Headless Ethernet connection - refused

Dycius wrote:
Thu Dec 07, 2017 12:27 pm
Is your Ethernet cable a crossover cable?
That doesn't matter. The Pi can handle crossover or straight cables. It will auto detect the cable type and switch the port to match. The PC will probably do the same. It's quite rare now to find something that doesn't auto switch.
by rpdom
Thu Dec 07, 2017 12:30 pm
Forum: General programming discussion
Topic: How to Autorun a Bash .sh script located on optical media when optical media is inserted?
Replies: 14
Views: 428

Re: How to Autorun a Bash .sh script located on optical media when optical media is inserted?

Udev scripts have a time limit before Udev shoots them dead. Isn't there a way around that ? Like using "at" to schedule your script some seconds into the future ? It seems like no matter how deep you nest your bash scripts udev kills the whole process hierarchy. How about having something monitori...
by rpdom
Thu Dec 07, 2017 12:12 pm
Forum: Automation, sensing and robotics
Topic: Beginner - Automation of Outside Christmas Lights
Replies: 48
Views: 1350

Re: Beginner - Automation of Outside Christmas Lights

For my (gas) central heating, I disconnected the timer switch and connected a Pi and relay in its place. The Pi uses a sensor to check the temperature of the main room in the house and turns the relay on for five minutes minimum if it is below a certain level for the time of day. This has saved me h...
by rpdom
Thu Dec 07, 2017 8:59 am
Forum: Troubleshooting
Topic: Official Raspberry Pi power supply unusable for acquiring audio
Replies: 14
Views: 418

Re: Official Raspberry Pi power supply unusable for acquiring audio

asandford wrote:
Thu Dec 07, 2017 1:46 am
I have one of these , I've relegated it to charging my phone as it sure won't power a Pi3.
I have several of those PSUs. They happily power a Pi3 + HDD, also Pi2 + HDD, and Pi Zeros with WS2812 LED strips.
by rpdom
Thu Dec 07, 2017 8:53 am
Forum: Troubleshooting
Topic: RPi freezes intermittently. Nothing in the logs
Replies: 4
Views: 142

Re: RPi freezes intermittently. Nothing in the logs

The red LED is on constantly. Ok, unlikely to be power problems then. You've already looked in the logs, which would have been my other suggestion. SD cards can fail. Usually it is pretty obvious, but I'd try another card just to rule out problems with the current one. Then I'd try another Pi. Does...
by rpdom
Thu Dec 07, 2017 8:44 am
Forum: Beginners
Topic: NOOBS for NOOB
Replies: 1
Views: 103

Re: NOOBS for NOOB

Did you install NOOBS or NOOBS Lite? Has your Pi got an internet connection? NOOBS Lite requires internet to download and install the operating systems. (note: it always says to turn on format size adjustment, that's not an option it appears in the current version of sdformatter???). That option has...
by rpdom
Thu Dec 07, 2017 8:26 am
Forum: Troubleshooting
Topic: RPi freezes intermittently. Nothing in the logs
Replies: 4
Views: 142

Re: RPi freezes intermittently. Nothing in the logs

I'd suspect power or the SD card. The usual fault finding methods apply for a Pi 2B - is the red LED on constantly or does it flicker? FWIW I still have a Pi 2B running Wheezy without problems. (I will move it to a Pi 3B on Stretch one day, but it runs a lot of stuff and will take time to shift it a...

Go to advanced search