473,701 Members | 2,638 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 8149
>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
3361
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
2291
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
1964
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
2811
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
6700
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
1785
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
3605
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
3218
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
3546
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
8736
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
8649
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
9083
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...
1
8977
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7824
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5904
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();...
0
4410
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3102
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

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.