473,549 Members | 2,982 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Am I using the right version of php?

97 New Member
I made a website using some of the old MySQL commands to interact with a database such as mysql_connect, but I had loads of trouble with it so I tried to use the improved version with the site I'm currently building now. Problem is that the new commands such as mysqli::real_co nnect won't work either.

I keep getting this error message:

Non-static method mysqli::real_co nnect() cannot be called statically in "...FileName... "

I'm using Instant WordPress as my Apache server and I checked the php version and got a result of 5.4.36. I'm not sure if that's compatible with the improved php commands, but if it is then there must be something wrong with my code. Can someone tell me when the improved commands came into use? Or how to call the new methods non-statically?
Jun 2 '15 #1
1 1352
Dormilich
8,658 Recognized Expert Moderator Expert
see http://php.net/manual/en/mysqli.real-connect.php for an example how to use this method.

btw. this has nothing to do with your PHP version.
Jun 3 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
17299
by: Phil Powell | last post by:
class NicknameVerifier { function NicknameVerifier() {} function isValid() { if ($fileID) { $content = fread($fileID, HTMLRetriever::MAX_URL_SIZE); fclose($fileID); if ($content) $this->setErrorArray(array('nickname' => $content)); // DUP NICKNAME FOUND
6
1489
by: BR | last post by:
Is there a way to tell what exe is using which version of a .dll in the gac?
26
2571
by: blah | last post by:
ok, i m going to use Linux for my Python Programs, mainly because i need to see what will these fork() and exec() do. So, can anyone tell me which flavour of linux i should use, some say that Debian is more programmer friendly, or shold i use fedora, or Solaris. Because these three are the only ones i know of that are popular and free. -- *...
3
2481
by: hrishy | last post by:
Hi Folks and fellow IBMers I received a toolbox CD from IBM with DB2 version 8.1 when i installed it on linux and was trying ton create a instance it always failed saying that the instance update failed as the db2iupdt and db2icrt are not of the right version. Can i download Db2version 8.1 enterprise edition for learning purpose..I am a...
0
954
by: Kaush | last post by:
Hi all, I am implementing a web service server to accept SOAP messages from my client and send a SOAP response back. Actually I am using .NET's WSE-2 for receiving and sending SOAP messages. The message I get from my client has a "security" element with "username" and "password" fields which I got to authenticate. Actually the namespace...
8
1391
by: ronen.chen | last post by:
I noticed that some sites use <script src='fineName.js?ver=XXX'></script(even google) Someone told me that it's for script changes, means - if the file in server has been changed than the new XXX will demand to load the new file. I find it hard to believe that it's true. Any suggestions ?
0
787
by: Sedge | last post by:
Hi, Im writing a program! from a java timing prog. an excel sheet is spat out, with information to make a graph. what i dont know is how to put a pause between the sheets so u can see the graph. im using VB version 6 and the code looks something like this: Sub Macro3() ' ' Macro3 Macro ' Macro recorded 7/06/2007 by Sedge ' ' Keyboard...
0
2921
by: WendyYap | last post by:
When I try to play online game this console appear:Java Plug-in 10.5.0.06 Using JRE version 1.7.0_05-b06 Java HotSpot(TM) Client VM User home directory = C:\Users\user ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this help message...
1
1320
by: Amjad Hussein | last post by:
Hi Guys I am working in making Access VBA code which needs another software, so first I need to check if this software is installed in the PC or not before I implement my codes. I found one way to do this with searching for the directory, but then I figure out that I may have a different version, and also this directory may change based on...
0
7518
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...
0
7715
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. ...
0
7808
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...
0
6040
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...
0
5087
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...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1935
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
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
757
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...

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.