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 4576434
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:12:20+00:00 2026-05-21T20:12:20+00:00

What I want to do(and have done) is to access the same MySQL db.

  • 0

What I want to do(and have done) is to access the same MySQL db. and table from both a PHP script and a Django app. However i would like to know if the way I am doing this could cause errors or issues. I hope you can help 🙂

The setup as of now:

The thing is I am setting up a 2 way SMS gateway thing.
The user sends an sms message to the sms-gateway provider who then afterwards sends a POST request to an URL I specify.

mydomain.com/gateway/receive.php

This script inserts the data(defined by the gateway provider) message, sender, code into the MySQL db. and a table named gateway… as well as a variable called ‘retrieved’ which is a Boolean and =False at first. It then returns an XML response to the gateway provider so that they can be certain the sms message has been delivered(and notify the user via an sms message)

Every few minutes, my django app. looks through the same db. and table and looks for all sms entries with “retrieved=False”. For each object a new object in the Django app is created with the same data (This object is then tied to the exact user, timestamped, formatted and so forth) and the original object from the gateway table is set to “retrieved=True” and then saved… (just in case… and for “log” purposes)

The reason I use PHP is because of the response time with my hosting service. PHP is a lot faster (directly behind an nginx server thingy) instead of the django app. which is on a custom build apache2 server. So in order for the sms part of the setup to work correctly I will have to use PHP for that part. Also I find that a simple PHP script is much less prone to downtime than a more complex apache2+Django setup.

So the question is… Could this cause any problems… Having a PHP and Django/Python script accessing the same mysql db. simultaneously? Is it at all the proper way of designing this sort of thing… My main concern is some sort of trouble with the PHP script inserting new stuff while the Django part reads/edits the older stuff(or the same stuff)

I hope this makes sense. And that you can help…? Could be a non-issue… I would just like to have a little certainty 🙂

Thanks.

Regards

pete

  • 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-05-21T20:12:21+00:00Added an answer on May 21, 2026 at 8:12 pm

    Use transactions, even in queries.

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

Sidebar

Related Questions

I Have done a site but want to redirect it to another subdomain in
I have done with OClusterMapView ,now I want to add unit tests to it.
I have done a graphics project using OpenGL and now I want to convert
I want to ensure I have done all I can to configure a system's
I have done this without much effort on T-SQL, but I want to implement
I want to make a reverse string function and I have done it like
I want to place a login inline-form in a twitter navbar. I have done
I want to add banner to my project. I have done some work in
I want to get this straight. I know what DLL's are. I have done
I want to show rss feeds of link http://dekora.com/blog/?feed=rss2 . I have done it

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.