Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8817037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:45:17+00:00 2026-06-14T04:45:17+00:00

I am building a website using PHP and a mySQL database. The website now

  • 0

I am building a website using PHP and a mySQL database. The website now has a login/register functionality and profiles with walls could be visited. On the same website, I want to build a big chat application using websockets. This chat should host a dynamically expanding amount of chat rooms (could run into thousands) of medium-sized groups (+/- 25 people).

I’ve been considering node.js to run websockets with, but I only want to use node.js to handle incoming messages and broadcasting. In addition, I want to save the incoming messages in the database using PHP. I want to use http calls in the node.js server file to handle this, as described in http://docs.nodejitsu.com/articles/HTTP/clients/how-to-create-a-HTTP-request. I also want to use http requests to get properties of the user (for example name and profile picture), so these could be displayed to other users in the same chatroom. I do not want to handle this client side, as the user could then easily pretend to be someone else.

Both the php website and the node.js server run on localhost. The website runs on 127.0.0.1:80 and the server on 127.0.0.1:1337.

My question is, is this approach save? Are there any security risks in doing http requests on a node.js server to send/receive data from the database? Is it a good idea to run node.js next to a PHP website, or should I build my website purely on node.js? Are there any other alternatives?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:45:18+00:00Added an answer on June 14, 2026 at 4:45 am

    Is this approach safe?

    Sure. I mean technically, sure. It’s no more unsafe than any of the technologies individually. It does, however, make your architecture a bit more complex which may marginally lead to more human error and bugs or security issues. But that’s more about humans and complexity rather than the tech itself.

    Are there any security risks in doing http requests on a node.js server to send/receive data from the database?

    Nope, not more than any other backend technology. It sits behind a webserver, runs code that may or may not access a database and returns a response. Plenty of production websites are running node.js without any security issues.

    Is it a good idea to run node.js next to a PHP website, or should I build my website purely on node.js?

    That’s tough to answer. I think overall a simpler and more maintainable pattern is too keep things in one place and technology. But as applications grow it’s actually very common to remove standalone parts and implement them on their own in their own best case way. Usually this has as much to do with performance, separating high traffic systems from low traffic ones, as it does with the capabilities of the tech itself.

    But this usually comes into play when you have multiple servers with different roles. With smaller projects, there is usually less value.


    I don’t know if that answers your question, but in short: It’s not inherently bad. It depends.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a website using php and mysql.I have a login that is
I am building a Web2Print website using PHP, MySQL and jQuery.The main concept of
I'm currently building a multilingual website using PHP and MySQL and am wondering what
I have a website I am building using PHP and mysql and want to
I'm building a multi-lingual website using drupal 7. Now, I'm in the process of
Greetings, I'm building my personal website using php. My standard approach is to use
Ok, so I'm building a website that has client profiles. A web user finds
Building a website using a PHP based Ecommerce product Magento. The problem I have
I'm building an IMDB.com like website using PHP/jQuery and a MVC approach (no OOP).
I'm building a website with xhtml, css, jquery, php and mysql. In one of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.