Giter Site home page Giter Site logo

perfect-pearls's Introduction

Hi there 👋


cobalt's GitHub stats cobalt's GitHub stats   Top Languages Top Languages

perfect-pearls's People

Contributors

angelostavrow avatar nmcardoso avatar pufferfish101007 avatar redguy12 avatar

Watchers

 avatar  avatar

perfect-pearls's Issues

Loading forever problem

Problem

Last night, 8 hours ago, my project was working fine. But now, it’s just saying “waking up” without actually ever “waking up”! This happens pretty often to me. How can I fix this?
It says, “starting” for a second, then “waking up” Up until then, my favicon was showing up. Then it reloads and my favicon disappears. It says “starting” for a few seconds again, then changes to “waking up” again and never changes again.
How can I permanently fix the loading issue? When I edited glitch.json earlier, it started working again, but now it’s broken again.

Fixes

  • Add a random character to the glitch.json, wait a minute, then remove it.
  • You could also try using just PHP. Remix a static site and add the following to your glitch.json:
{
  "install": "echo 'We Are Ready!'",
  "start": "php -S 0.0.0.0:3000 -t ."
}

But you aren’t really supposed to use it for production apps.

  • You could also try out “PHP in express” however I’m unsure how well this works.
var phpExpress = require('php-express')({
// Set bin path of PHP
  binPath: 'php'
});

// We're assuming your express app variable is called 'app'

// Apply PHP manager
app.engine('php', phpExpress.engine);
app.set('view engine', 'php');
app.all(/.+\.php$/, phpExpress.router);
  • Yeah, lamp-poc likes to do this; you can boost your project to prevent this from happening.
  • Node.js, Python, Flask, and static sites work wonders as many hosting devices have dropped PHP support due to some scripts only working with servers with fast CGI and some that don’t use it, etc. Your site does not need PHP to function correctly. Express + ejs a decent alternative as you have a bit more control over your site.

Causes

  • Sometimes Apache conflicts with another server.
  • Sorry for all the confusion, but Glitch doesn’t support PHP officially and these are currently the only workarounds.
  • Bottom line is this is the best PHP experience you can get on Glitch right now because PHP isn’t supported.
  • I don’t think Glitch is going to fix that unless PHP becomes official. A staff member recently said that they don’t have plans to update PHP.
  • There is a PID conflict with httpd. I’ll assume restarting changes the PID.

https://support.glitch.com/t/loading-forever-problem

UPDATE:
Partially fixed, yay!!

This is caused when the page is open for a suspended period at a time. I solved this by making the page redirect when focus is removed from the page. It redirects to a page hosted on GitHub Pages (because I only used Glitch for the PHP). See the code on the gh-pages branch of this repository. When the focus is returned to the page, it redirects back to the page the user was on before.

  • Dosen't freeze up
  • Redirects to the right page
  • Scroll position stays the same
  • URL Parameters stay the same
  • <input>, <textarea>, and <select> values stay the same

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.