Infinite Loading Times When Using PHP Sessions

I have recently started moving from a Sharedhost(HostGator). Hostgator had to much downtime as the website was starting to get a large amount of traffic. I figured this wouldn’t be as painful as it has been. I’ve been working trying to get the server up for almost 3 days with the same result and no luck.

I’m currently working on a project that requires users to login, and when they login or a session have been set by PHP. Everything on the Website will load indefinitely. There doesn’t seem to be a timeout or error codes. It just loads. This project was built when using the Shared Server and has no no problems, everything is stable.

To see the example, Form Inputs(shymus Roffo, password, nexus) Those are all the test values. Once you login, you will need to refresh the page a few times and it will never load. On that example, there were no errors when using shared hosting or any problems. Everything ran very stable.

These were the guides that i followed to get my VPS started. I’m running Ubuntu 16.04.

When i got everything working, when i logged in the website the first time after the LAMP was set up, everything loaded fast. But if i attempted to visit another page after that any page with PHP session_start() would be extremely slow.

There are no errors that appear in the PHP logs or Apache Logs.

Would love to know what might possibly cause this or what could fix it. Would also be great if i could find a way that could pin-point me to finding these errors.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

When checking on your example URL and credentials it does not appear that these issues are still present. Did you find a solution? If so, we’d love it if you can share the details here.