Click here to Skip to main content
15,893,790 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all, I am new member, I hope receive your supports about creating a php extension to connect to mysql by C++ driver (Mysql connector C++). Thank you very much.

[edit - copied from comment to first answer - Peter-in-2780]
I want to create a php extension (.dll file) and this file can connect and access MySQL. I have try create a simple php extension "Hello World" and it runs normally, but when I try to add function connect to MySQL (use C++ driver connector), it do not work and Wamp do not work when load this extension in php.ini. Purpose of action, I want to hide a piece of my php code when up host my site. I hope receive your supports,thank you very much. I am sorry about English skill, I am VietNamese. [/edit]
Posted
Updated 16-Aug-10 16:35pm
v2
Comments
Peter_in_2780 17-Aug-10 3:07am    
Just adding a comment to get an email to OP so he can see edits to Q and A.

1 solution

What are you trying to do? If you want your PHP code to access MySQL, that's already built in to PHP. Likewise, C++ can interface to MySQL directly.

[edit - added this after updating question from comment - Peter-in-2780]
You do not need to do anything to hide php code from visitors to your site. For example, have a look at this[^] That site is running on a computer within a metre of where I'm sitting, and I bet you can't see any of the PHP that generates the page or the MySQL database that stores everything. This is running on a very straightforward WAMP setup. There is no C++ involved. If you really need it, I can show you some bits of my Apache and PHP config.
[/edit]

[edit2 fixed URL in link /]
 
Share this answer
 
v3
Comments
Anh Ma Truong 16-Aug-10 22:02pm    
I want to create a php extension (.dll file) and this file can connect and access MySQL. I have try create a simple php extension "Hello World" and it runs normally, but when I try to add function connect to MySQL (use C++ driver connector), it do not work and Wamp do not work when load this extension in php.ini. Purpose of action, I want to hide a piece of my php code when up host my site. I hope receive your supports,thank you very much. I am sorry about English skill, I am VietNamese.
Anh Ma Truong 17-Aug-10 3:29am    
Thank you very much, I hope to receive your support. But I want to know how is a php extension connect MySQL. My email : matruonganh1988@gmail.com. Thank you for replying.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900