My school has an apache/mysql server that we make and host websites from as projects. I am doing an ebay type site where people bid on a product until time runs out. Problem is I don't know how to trigger that the product should be delisted and the buyer and seller notified that the auction is over. mysql trigger updates only work when a mysql action like select, insert delete, etc are triggered, I'm not sure about php (If my website would get more traffic then simply me editing and maintaining it, I would simply run a php script every time the index page is accessed. But I might do that anyway.) and honestly, I think this might be impossible without higher access privileges. I would like to note I have access to the GCC compiler, and can confirm I can compile program (just not installing programs for obvious reasons).

I'm currently skimming through: http://www.netzmafia.de/skripten/unix/linux-daemon-howto.html to see if this is possible in my position.

Recommended Answers

All 4 Replies

You can write a program or script that uses inotify to inform you when a file is accessed, opened, modified, created, deleted, etc. See the inotify man page for more information.

OK. I can use this to trigger sql queries at certain times?

I wanted to work on the server that we make and host website.So i need help ????

If you have an account on the server, you can use cronjobs which regularly trigger actions. I recommend that you set up a PHP script which does whatever bookkeeping you need, and that you call it either directly with

php <myscript.php> 

or via the apache server using

wget http://<myserver>/<myscript.php>

If you can do that from the command line, you can put the command in your crontab which you can edit with

crontab -e

from the command line.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.