Urgent.News

What's breaking now, across thousands of outlets.

Tech

How do you verify a deploy when you have no shell access?

Genuine question, because I have a weird constraint and I'm curious how everyone else handles it. I run two PHP sites on shared cPanel hosting. No SSH, no shell, no CI runner, nothing touches the server except the cPanel file manager and FTP. For years my deploys were: edit file, upload, refresh the page, squint, hope. That got old fast, so I built something I call self-verifying worker files. A…

In a shared cPanel hosting environment without SSH or terminal access, one reporter relies on a self-verifying deployment process for their PHP sites. This approach involves uploading a single PHP file through the cPanel file manager and triggering the deployment by hitting the file in a web browser. The deployment file incorporates several key features to ensure a reliable and safe deployment process.

Firstly, a token gate is embedded within the URL, which restricts access to authorized users only. This prevents unauthorized triggers of the deployment process. Secondly, a needle matching mechanism is employed, wherein the patch only gets applied if an exact marker string is present in the source code. This ensures that the deployment only occurs when intended and avoids accidental changes.

Thirdly, a lint check, similar to the "php -l" command, is performed on the patched result before committing the changes. If the lint check fails, the deployment automatically rolls back to the previous state, preventing any potential issues.

After the lint check, a dry-run mode is employed, which reports the count of needle matches in the HTML output before making any changes. This step allows the reporter to verify the number of matches and ensure that the patch will land cleanly without any conflicts. Finally, a cache-buster query string is added to the live page URL to force a refresh of the cached content. The reporter then manually checks the served HTML for the presence of the patch marker to confirm the successful deployment.

While this self-verifying deployment process has been effective and saved the reporter from numerous headaches, the reporter acknowledges that it may appear overengineered due to the lack of shell access. They wonder if others in similar situations trust their host's staging tools, push changes from Git repositories elsewhere, or have developed their own unique deployment mechanisms.

The reporter invites others to share their war stories, especially those that ended badly, as a way to learn from each other's experiences in this challenging environment.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Delegation Limits: What Junior Support Staff Can Answer Without Asking

Hand a new support hire a queue and two things can go wrong: they route every question to a senior and the backlog grows, or they improvise answers to questions that were theirs to ask about.

  • Junior staff can answer questions with existing written answers.
  • Checklist should include knowledge base, procedures, and policies.
  • Money, commitments, and exceptions require senior staff handling.

Centreon API tokens inherit the union of access groups

Centreon API tokens inherit the union of access groups Centreon provides monitoring, configuration, and API access through several interfaces.

  • Centreon API tokens inherit access rights from multiple user access groups
  • Authentication tokens, CMA tokens, and poller tokens are distinct credentials
  • Centreon users can belong to several access groups, combining their rights

Snapping a tap to a real corner: building a LiDAR tape measure for iPhone

When you tap the screen to start a measurement, you are not tapping the corner of the table. You are tapping a pixel, and that pixel sits on a ray that leaves the camera and hits something .

  • Users tap screen to initiate measurement, not table corner.
  • iPhone app uses depth and image data for measurement.
  • RANSAC identifies up to three planes for accurate measurement.

More from Tuesday 10 November →