Warning: include(/home/d/diskfast/diskfast.beget.tech/public_html/global_menu.php): failed to open stream: Permission denied in /home/d/diskfast/eng.diskfast.ru/public_html/shikarno/load_global_menu.php on line 19

Warning: include(): Failed opening '/home/d/diskfast/diskfast.beget.tech/public_html/global_menu.php' for inclusion (include_path='.:/usr/share/php') in /home/d/diskfast/eng.diskfast.ru/public_html/shikarno/load_global_menu.php on line 19

- Привет! Я Шикарно
- Моя миссия - облегчить тебе жизнь!
Пообщаться со мной:
cude@bk.ru
    
     Completely free of charge!
    Contact me for a Chic.     
    

Elegant is the control panel for scripts working in the background (scripts can be on different sites).

Description

Running scripts through cron is the last century. Of course, as long as you have a couple of 10-line scripts that were once written, debugged and work like a clock for years, the crown is enough. But if there are more scripts and they do not work regularly (it does not work for 100% on the Internet :(), it becomes more difficult to control the situation. And if you have 5 of these sites and everyone has to be controlled. it is also necessary to do business ... :)




Advantages before running through cron:

        
  • when developing and debugging:     
    • quick and easy viewing of logs (including multimeter)
    • You do not have to sit in putty all the time or download a log a hundred times via ftp.
    • You do not need to understand the hodgepodge of html tags. The log is displayed through the browser, everything looks clean and beautiful.  
    • convenient search         
    • manual start to check how everything works. When using the crown, debugging turns into a constant running around from one window to another.         
        
  • when using:         
    • I can see which scripts I'm working on at the moment
    • it is clear in what problems there were and what kind of problems (even do not need to watch the log)         
    

Script startup modes:

    
            
  • at a certain time         
  • through the interval         
  • hands (convenient when writing and debugging)         
  • power-on mode: if the script hangs, it restarts     
    

And another

    
            
  • From one panel you can control scripts on different sites.         
  • API for integration into your scripts         
  • All scripts are at hand, with descriptions and grouped by tabs.         
  • For each script run, a separate log with the start and stop date of the process is created. That allows to determine when and what went wrong.         
  • Old logs are deleted automatically. There will no longer be a situation where the server stops working because the hard drive is clogged, because of "yay b ..., forgot to clean up the logs"         
  • The socket is seasoned with a fashionable ajax     

I myself, when for a new site I need to write a script working in the background, the first thing I put is Chic. Has got used to comfort :) (to debug scripts under a crown still that мазахизм).

How it works


Elegantly can be installed both on one site, and on several. As the main site, you can even use Denver running from Windows (run scripts in the background so they work right on the dverver while it's impossible)

Сron_control.php does not have to be bet on crowns. In this case, the scripts will not start automatically.

How to add a script

Just write at the beginning of the script:

         <? Php
// for_run_shikarno
include   "absolute_path_to_shikarno / reg_potok.php" ;
? ≫
Then add the script to the panel and use :)
If the php start method is chosen, all paths in the script must be absolute. How to find the absolute path to the folder where the script is located:
$ script_folder  
=   realpath ( ". <135 >),
?> 139 <

Security

The password for the main shikarno folder through .htaccess is set, and also the access to the main site type is allowed.

Control.php
        
  • before running the script itself, the key passed from cron_control.php is checked. The key is encrypted, it's useless to intercept.     
  • protection against running scripts not intended for this. Checks if there is a label in the script // for_run_shikarno     
  • mode for paranoiacs. Before running, checks if there is a script name in the file white.txt (to change it you need ftp access). The file is on the site where the script is run.     
  • We naturally check that the path to php or wget was really the way the script should be in the directory site, the path to the log leads to the folder process_logs

process_logs, view_log.php Так как на папку поставлен пароль, доступ есть только у Вас.

Hosting settings

To work smartly need certain settings. On vps, vds and its servers, it's understandably the case will work (if that, the settings can be changed). But with a virtual hosting can not work, maybe it does not.

To simplify the task, I wrote a script that checks the settings and makes a test run.

How to run the test
        
  1. Download shikarno_test.rar , create a shikarno folder in the root directory of the site, fill in the contents of the archive.     
  2. Set permissions 777 to the shikarno / process_logs folder (for example, through the total commander: the Files-> Change Attributes menu)     
  3. Run shikarno / hosting_test.php
What the test checks:
        
  1. php5     
  2. safe_mode = off     
  3. permission to run exec ()     
  4. defines the path to php, wget. It tries to run a test thread through them.

Tested Shared Hosting

        
  1. agava.ru (via wget)     
  2. www.2x4.ru (via php)

Shared webhosting, where it will not work

Please note that this is only about the shared (virtual) hosting service. Vps and the server of these hosts do not belong to them

        
  1. hostlife.net

Installation

Installation on the main site (where there will be a control panel)
        
  1. Create a shikarno folder in the root directory of the site, fill in the contents of the archive.     
  2. Set permissions 777 to the process_logs folder (for example, through the total commander: the Files-> Change Attributes menu)     
  3. Run the script hosting_test.php. If everything is OK, move on.     
  4. In glob_config.php, specify the settings for accessing the mysql database, as well as the key (a random string of any characters)     
  5. Run shikarno / create_db.php     
  6. Put the password on the shikarno folder with shikarno / .htaccess (not necessarily, but highly desirable). If you do not know how to do this, read article . If you accidentally sweat, contact technical support, we will help.     
  7. Go to the bar and add the site: the menu Sites-> add
Installation on additional sites

There is no need for a socket, only control scripts and a folder with logs. Access to the database and cron is also not needed

        
  1. Create a shikarno folder in the root directory of the site, fill in the contents of the archive (you can not populate the panel folder)     
  2. Set permissions 777 to the process_logs folder (for example, through the total commander: the Files-> Change Attributes menu)     
  3. Run the script hosting_test.php. If everything is OK, move on.     
  4. Check that glob_config.php has the same key as the main site.     
  5. Write down the address of the main site in .htaccess ip so that only your site has access to the scripts. Also put the password on the shikarno folder with shikarno / .htaccess (not necessarily, but highly desirable). If you do not know how to do this, read article . If you accidentally sweat, contact technical support, we will help.     
  6. Go to the bar and add the site: the menu Sites-> add
All the necessary data (the path to the php and wget, ip site, the absolute path) you can find out by running shikarno / hosting_test.php