| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
phpMyAdmin server side component for the error reporting system. It uses CakePHP with some extra plugins like migrations, debugkit and OAuth component.
In order to deploy the app in this repo you need to follow these steps:
HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName reports.phpmyadmin.net
<Directory /path/to/repo/dir/webroot/>
AddType application/x-httpd-php .html
Options Indexes MultiViews
Require all granted
</Directory>
ErrorLog "/var/log/httpd/dummy-host.example.com-error_log"
CustomLog "/var/log/httpd/dummy-host.example.com-access_log" common
</VirtualHost>$HTTP["host"] =~ "^reports.phpmyadmin.net$" {
server.document-root = "/srv/http/reports.phpmyadmin.net/webroot/"
url.rewrite-if-not-file =(
"^([^\?]*)(\?(.+))?$" => "/index.php?url=$1&$3"
)
}
server {
listen [::]:80;
listen [::]:443 ssl;
root /home/reports/error-reporting-server/webroot/;
index index.php;
server_name reports.phpmyadmin.net;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# # With php7-fpm:
fastcgi_pass unix:/var/run/php8.4-fpm-reports.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}https://reports.phpmyadmin.net {
# Set this path to your site's directory.
root * /home/reports/error-reporting-server/webroot/
php_fastcgi unix//var/run/php8.4-fpm-reports.sock
# Enable the static file server.
encode gzip
file_server
try_files {path} {path}/ /index.php?{query}
}
The application relies on authentication using GitHub. To obtain the client ID and key, visit application settings in your Github profile and register an application there.
The callback for the github app should be <http://YOUR_PREFERRED_DOMAIN>/developers/callback where YOUR_PREFERRED_DOMAIN is the URL you wish to access the local instance on.
Copy the example configuration in config/oauth.example.php to config/oauth.php and replace the dummy credentials with the obtained client ID and secret.
Add a webhook at your target repository with payload URL as https://<host>:<port>/events
Set the appropriate value of secret token in app.php (same as what you set while setting up the webhook)
./bin/cake sync_github_issue_statesIf you are on a development machine you can use the webrunner at /test.php However if you need a command line runner. You can use:
composer run test --timeout=0There is a new way of finding unique stacktraces that uses hashes that did not exist previously. I created a shell to calculate those hashes for old records so that they can work with the new code. To use the shell you can just type:
Console/cake custom addHashesToOldRecordsTo Schedule & run cron jobs cakephp provides a console tool. We need to create shell for use in console. We can run the created shell as cron job.
For example, following is the command to execute the shell src/Shell/StatsShell.php which cache the error reporting statistics for later use.
bin/cake statsstats cache will expire in one day so we need to schedule this command to run everyday as cron job.
We need to create new shells to schedule and run different tasks.
A separate log file named cron_jobs is maintained for all the cron jobs. All the logging is done via CakeLog interface. All the failures and other activity relating to cron jobs should be reported there only. That would make debugging easier in case of failure.
| Back | FazBrowse Home | New Git URL |