473,659 Members | 2,987 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MySQL PHP & SSL

Hi All,

I am trying to use PHP & MySQL over SSL, my issue is that the data that I am
querying also needs to be available by non-secure as well.

Can someone please help me in doing this.

Cheers
Steve
Nov 5 '05 #1
3 8147
>I am trying to use PHP & MySQL over SSL, my issue is that the data that I am
querying also needs to be available by non-secure as well.

Can someone please help me in doing this.


You can set up the same web page on a secure server AND on an
insecure server. With appropriate use of Apache directives and/or
symlinks, you might even manage to use the same copy for both. It
is unclear to me why you'd want to do this, or whether this solves
your problem.

The fact that you use or don't use SSL on the web site talking to
browsers has *NOTHING WHATEVER* to do with whether you use SSL or
not between your web site and MySQL. The two are independent
choices.

It is possible to use a SSL connection between the web site and
MySQL, and use non-SSL connections between you elsewhere and MySQL.
Just set up different logins with different privileges. Again, it
is unclear whether this is what you want.

Gordon L. Burditt
Nov 5 '05 #2
Hi Gordon,

Thanks for that information, you see I have a open table that does not
require SSL, anyone from the net can add data to it, however. I run a query
from that table and return values which I want to post into a secure table
on mySQL the issue is that when I do my select statement and try to connect
to the database under the same username it returns a blank webpage using
SSL.

What Im probably asking how do I run a query to my MySQL database using SSL.
Hope that makes sense.

Cheers
Steven

"Gordon Burditt" <go***********@ burditt.org> wrote in message
news:11******** *****@corp.supe rnews.com...
I am trying to use PHP & MySQL over SSL, my issue is that the data that I
am
querying also needs to be available by non-secure as well.

Can someone please help me in doing this.


You can set up the same web page on a secure server AND on an
insecure server. With appropriate use of Apache directives and/or
symlinks, you might even manage to use the same copy for both. It
is unclear to me why you'd want to do this, or whether this solves
your problem.

The fact that you use or don't use SSL on the web site talking to
browsers has *NOTHING WHATEVER* to do with whether you use SSL or
not between your web site and MySQL. The two are independent
choices.

It is possible to use a SSL connection between the web site and
MySQL, and use non-SSL connections between you elsewhere and MySQL.
Just set up different logins with different privileges. Again, it
is unclear whether this is what you want.

Gordon L. Burditt

Nov 5 '05 #3
>Thanks for that information, you see I have a open table that does not
require SSL, anyone from the net can add data to it, however.
You let ANYONE log directly into your MySQL server? Wow! How much
porn, pirated software, stolen music, and stolen credit card numbers
have been added to it?
I run a query
from that table and return values which I want to post into a secure table
on mySQL
MySQL has no concept of a 'secure table', but you can restrict access
to one to specific users.
the issue is that when I do my select statement and try to connect
to the database under the same username it returns a blank webpage using
SSL.
How did you connect to MySQL using SSL? Show code. You didn't even
TRY that, did you? You just used a https page, which has got nothing
to do with using a SSL connection to MySQL. You should also, at
least for debugging, generate error messages if you can't connect
to MySQL or a query fails. Even for production use, if connecting
to the database fails, you should tell your user that things are
broken and to try again later.

Remember, just because you sent a package of weapons-grade plutonium
from Browserville to WebServerCity using armed guards and a fighter
plane escort doesn't mean the guy at WebServerCity didn't forward
it to MySQLTown using some kid with a wagon.
What Im probably asking how do I run a query to my MySQL database using SSL.


To connect to MySQL with SSL, you need PHP 4.3.0 or later, and the
MySQL client library installed with it must be 4.* or later. The
distributed client library with PHP 4 is MySQL 3.23: not recent
enough. The same applies to Windows binaries of PHP 5. Functions
to actually specify SSL parameters don't seem to be available until
PHP 5 with the 'mysqli' driver.

You also need a MySQL server *compiled with SSL*.

Gordon L. Burditt
Nov 5 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3360
by: AF | last post by:
I am a real novice to php and MySQL, with about a week's worth of reading and self tutoring. I have an urgent need to publish a database of information and need some guidance on how to do this. This question might be more suited to a MySQL newsgroup, but since php and MySQL seem to have become almost married to one another, and since getting the data out and displaying it is where my problem seems to lie, I thought I would start with...
2
2289
by: iwasinnihon | last post by:
I don't usually like to do this, but I need help. I have gone over this code and cannot figure out why it doesn't work. First of all it doesn't check to see if you have filled in the required fields. Second, it doesn't submit the information (it's supposed to send it to mySql and email it to me.) and lastly, it doesn't bring up the thankyou.php after submitting the form. I don't know enough about PHP to find the problem. If someone could...
0
1961
by: Donald Tyler | last post by:
Yes it can. But you should understand the three distinct levels of that situation. You need the following: Database Web Server Server-Side Scripting Language I would suggest using AMP (Apache, MySQL & PHP). If you want to know more
4
2799
by: MLH | last post by:
A programmer developed an AMP (Apache/MySQL/PHP) application for me. When he was done, he sent me the PHP files and the MySQL dump file. Now, when I connect to the application on my LAN using http://192.168.1.106/~mlh/credifree/index.php the AMP app still thinks the data resides somewhere else. It runs fine - as long as I leave my LAN's external internet connection up. But if I unplug my LAN from the world, my app locks up. Before I...
2
6698
by: zhengfish | last post by:
Hi,All, I try to install mysql-5.0.15 on RHEL3-U5. But It give me a error. MySQL-client-standard-5.0.15-0.rhel3.i386.rpm MySQL-devel-standard-5.0.15-0.rhel3.i386.rpm MySQL-server-standard-5.0.15-0.rhel3.i386.rpm MySQL-shared-standard-5.0.15-0.rhel3.i386.rpm MySQL-standard-debuginfo-5.0.15-0.rhel3.i386.rpm
1
1780
by: Lennie De Villiers | last post by:
Hi, I'm running PHP 4.4.2 and mySQL on MS Windows XP Home Edition in IIS 6.0. When I try to connect to mySQL from PHP I get the following error message: Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in D:\Work\LIVE WORK\Gafachi Clone\www\dbconnect.php on line 9
1
3601
by: cumupkid | last post by:
II am trying to create a form that will allow me to upload photos to a folder in the site root directory and add the information to the mysql db at the same time. I have created two forms, one that uploads to photo to the folder in the site root diorectory. One that uploads the info to mysql database. but... When I try to upload them both ways at the same time i cant get it. I am Including code for both pages i have working. Code for...
3
3217
by: jonathan184 | last post by:
The code seems to be working fine for some records but I am thinking it is finding some other records with special characters and so on. I am looking for a way to insert the xml string with escaping a bunch of chars This is the message i got DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your M ySQL server version for the right syntax to use near 'd to test@email.com...
3
3542
by: subho2009 | last post by:
Hello friends, I have face a problem, the problem is that when i fetch data from mysql database i get '&' in the place of '&amp;'. I am using php 5.1.2 and mysql version 5.0.11-beta. What is the problem? any body solve my problem? Please answer me. Thanks in advance!
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8335
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8747
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2752
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.