In my application there are two PHP are available.
1) PHP 5.1.6
2) PHP 5.2.6
Currently I am using PHP 5.2.6 version in my application. Also I'm using PHP 5.2.6 database ( phpmyadmin ).
Here my question is I want to use another PHP's database ( phpmyadmin ) i.e. PHP 5.1.6 's phpmyadmin.
I dont know how to do this, Please give me ur suggestions, in which file should i make change for accessing correct database in my application.
Thanks
-Pravin
phpMyAdmin is not a database, but a front-end for a DBMS like MySQL. Your scripts in PHP 5.2.6 and 5.1.6 are likely using using the same database (MySQL).
Related
Or is php 5.4 only compatible with mysql? I've been having some problems getting my php to work with mysql.
I'm using PHP 5.6.6, Apache 2.4, MySQL 5.6.23. My PHP and Apache work just fine. I created a website using CSV. I wanted to learn how to use MySQL, but I was having problems trying to get MySQL to work with my PHP. Now, I have never take any courses on MySQL nor have I ever used. The only thing I have done with MySQL is install it from the community tab from the MYSQL download page. I followed all the instruction and set my file path to be C:\mysql, and my data path to be C:\mysqldata, but I don't know, why it doesn't seem to work with my php when I try to connect. Is there another step I have to take to connect? I know a lot of people use WAMP, which is something I might look into if I don't get this working, but If there's anyone who has installed all three (apache php and mysql) sperately, know what my problem might be, I'll really appreciate it.
PDO works on all PHP versions 5.1+, which is the preferred method to connect to MySQL.
Im developing a little web application with PHP and MySQL but in the computer that im working, i cannot install Database Servers like SQL Server or MySQL Server.
I've worked with SQLITE and its amazing, NO INSTALL just the DABATASE AND THE CORRECT LIBRARIES.
DO you know if there's a way to work like this with MySQL Databases ?
Thanks.
NOTE: I 've tried .sdf of Microsoft SQL COmpact but i dont wanna use Microsoft products for now.
Not possible. MySQL is not a file based Database.
Yeah, you have to install MySQL (if you want MySQL) like you install Php in your computer.
Or you can get both of them in one app like: http://sourceforge.net/projects/xampp/
Is these what you want?
This is a peculiar requirement
I am doing this on a vendor router so I do not have much control over things. I can not load my own PHP or modify php.ini etc.
Addition:
Actually PHP is running just as a Apache Module. What options do i have to connect to PostgreSQL database. Though PHP version is PHP Version 5.3.2 - Its is extremely stripped down version of it.
Requirement:
There is a PostgreSQL database on this router and I need to access it using the barebones PHP that is available on the router.
Is there a way I can add the PostgreSQL libraries along with my own files and connect to the PostgreSQL database ??
Thanks in advance!
You can use PDO if your PHP has compiled and enabled with this module.
By default is included since PHP 5.1
Theoretically, if you can get the postgres module (.so) for this version of php and if php.ini would allow you to do so (not likely) you can dynamically load it.
I generally use linux servers and program in PHP (plus other associated technologies) with mysql databases. A client has existing ASP sites using MSSQL databases on a Windows server and wants some new sites created on their server using their MSSQL database as the main data source. I have used ASP in the past but much prefer PHP so would rather use this.
I just wanted to confirm that i'm right in saying as long as the server has PHP installed (which it does) then there's no reason I can't create a PHP site on the Windows server and just use different connectors to connect to the MSSQL db (rather than what i would usually use for connecting to a MYSQL db). Presumably (other than the different connect/query code) this would work in pretty much the same way as with a linux setup with mysql and i could then code the site in PHP but use their existing datasource?
I would be extremely grateful if anyone could confirm i'm right in saying this and if there's any other issues that might cause any problems?
Thanks so much for your help as ever,
Dave
You can enable MSSQL support in PHP on Windows. The default Windows PHP install has the php_mssql.dll extension commented out in the php.ini file. Uncomment that line, restart Apache, and it should work.
There is a supporting DLL called ntwdblib.dll that you may need to find a replacement for, as the version included with PHP may be outdated and won't work with newer versions of SQL Server. (I had this problem when setting it up.)
There are two different libraries to connect to SQL Server from PHP:
The legacy mssql extension, which has been discontinued on Windows
Microsoft's sqlsrv extension, which only works on Windows
I've basically worked with the second one and I can say it's a very interesting product. It's robust, it has a very nice interface and it's totally up-to-date. But what I like most is that it has very nice features. E.g.:
It can return dates as PHP DateTime objects
It provides a PDO driver
The only drawback of using SQL Server is that there isn't an easy way to write a cross-platform app but I understand it isn't problem in your case.
Yes, it is rather straight forweard.
You need to have the mssql library activated in php.ini. Which can be troublesom.
MSSSQL docmentation
Trying to fix the problem causing this error message, "Your PHP MySQL library version 5.1.54 differs from your MySQL server version 5.5.7. This may cause unpredictable behavior." Any help would be appreciated.
Installed on the web server - PHP version 5.3.5, Apache 2.2.3, MySQL Client API 5.1.54, MySQLi 5.1.54
MySQL 5.5 installed on seperate DB server.
Do I need to upgrade the MySQL Client API on the web server? Any ideas how?
Considering you have :
MySQL Server v 5.5
MySQL Client (the php-side library) v 5.1
You should update the client library (on the PHP side), to use a more recent version : you'll gain more by using a 5.5 server than by reverting to a 5.1, I'd say.
On the how to update the php-side component... The simplest solution is probably to update your version of PHP, I'd say -- or, if that's not enough (if PHP is compiled against the 5.1 client library) to recompile PHP yourself, against a 5.5 client library.
Anyway, as long as you don't do any strange stuff, using a 5.1 client with a 5.5 server should generally work -- that's why phpMyAdmin reports a warning, but still works ;-)
I Do not know what the hell everyone suggesting you the best method is
1.Go to https://dev.mysql.com/downloads/installer/
2.Install the mysql installer do not configure anything .It will update automatically.
3.Restart all services if you are using wamp.
4.now open phpmyadmin.
Please use wamp its easy yo use and configure.
Asif iqbal