|
hello all,
i am having this issue with trying to connect my php app to sql server and i have edited the php.ini with the required driver needed to the php version 5.5. Below is the error i get anytime i try to connect to the database, i will appreciate if anybody will help with this.
Database connection refused.
Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension requires the ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [message] => This extension requires the ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) [1] => Array ( [0] => IM002 [SQLSTATE] => IM002 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) )
"
|
|
|
|
|
What part of those instructions are you having a problem with?
|
|
|
|
|
I did the connection from the php using these lines of code "
$serverName = "(THAIWO)";
$connectionInfo = array("Database"=>"examples");
$conn = sqlsrv_connect($serverName,$connectionInfo);
if ($conn){
echo ("Database connection Successful.<br />") ;
}else
{
echo ("Database connection refused.<br />") ;
die(print_r(sqlsrv_errors(), true));
}
"
i did download for
php_pdo_sqlsrv_55_ts.dll
php_pdo_sqlsrv_55_nts.dll
php_sqlsrv_55_ts.dll ,
php_sqlsrv_55_nts.dll
with all these done and checking for solution in the MSDN libary where i used the PDO syntax for connecting to sql server using the function sqlsrv_connect, am still at lost for where am doing things wrong. I want to know why i am refused and the reason for asking for the ODBC driver when i have downloaded and enabled it.
|
|
|
|
|
taiwokaffo wrote: i did download for That's the plugin for PHP, not the ODBC-driver. Follow the link in the instructions, download it and install it.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks all it now working i used this to connect to the sql server 2012
$serverName = "OurIPAddress";
$connectionInfo = array( "Database"=>"Thenameofourdatabase", "UID"=>"OurID", "PWD"=>"Ourpassword");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
|
|
|
|
|
Hy everyone ..... I have to select php final year project..... suggest me some unique ideas ...... what sort of application i choose?
|
|
|
|
|
How should we? We have no idea at what level you are, what you have learned, how many time you have to finish and so on...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Choose something that you understand, and is within the limits of your skills and experience.
|
|
|
|
|
where to find your framework...link me
|
|
|
|
|
|
Hello. I have a list of numbered folders. In each folder there is a lot of .jpg files. I get a list of all including image files from this directories with two glob functions dynamically. I store a list of directory paths and filenames into two separates arrays called $DIR[] and $files[].
<?php
$pathDIR = "dirname/";
$DIR = Array(
);
foreach (glob($pathDIR . '/[0-30]*', GLOB_ONLYDIR) as $dirname) {
$DIR[] = $dirname;
}
for($a = 0; $a < count($DIR); $a++) {
echo $DIR[$a];
}
$pathFILE = Array();
$files = Array();
for($b = 1; $b <= count($DIR); $b++) {
$pathFILE[$b] = "dirname/" . $b . "/";
foreach(glob($pathFILE[$b] . '*.jpg') as $filename) {
$files[] = $filename;
}
}
for($c = 1; $c <= count($files); $c++) {
echo $files[$c-1];
}
?>
I have tried to combine two arrays in one multidimensional array with:
array_push ($DIR, $file);
to display array values I've tried with a pair of loops:
for($d = 0; $d <= count($DIR); $d++) {
for($e = 0; $e <= count($DIR[$d]); $e++) {
echo $DIR[$d][$e];
}
}
unfortunately array values are not properly show. Also, a notice indicate undefined offset .
Thanks a lot for your help.
|
|
|
|
|
My proposition is to modify the code in the following way:
<?php
$pathDIR = "dirname/";
$DIR = Array(
);
foreach (glob($pathDIR . '/[0-30]*', GLOB_ONLYDIR) as $dirname) {
$DIR[] = $dirname;
}
for($a = 0; $a < count($DIR); $a++) {
echo $DIR[$a];
}
$pathFILE = Array();
$files = Array();
for($b = 1; $b <= count($DIR); $b++) {
$pathFILE[$b] = "dirname/" . $b . "/";
$files[$b] = Array();
foreach(glob($pathFILE[$b] . '*.jpg') as $filename) {
$files[$b][] = $filename;
}
}
for($d = 1; $d <= count($files); $d++) {
for($e = 0; $e <= count($files[$d]); $e++) {
echo $files[$d][$e];
}
echo "\r\n\r\n";
}
?>
remember you can display files simlper way:
var_dump($files);
|
|
|
|
|
hy everybody.
I have learn basics in PHP i want to stronger my Object Oriented Concepts In PHP.
Kindly guide me Tutorials .
And what project will be suitable for me to learn things quickly and smartly .... i.e e-commerce or else?? ?
thanks in advance
|
|
|
|
|
AFAIK, PHP is a server side scripting language.
If you want to move to Object Oriented programming, its better to try .net (C#) or Java.
You will get a lot of examples over the internet.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
Welcome to 2004.
Quote from Wikipedia: On July 13, 2004, PHP 5 was released, [...] PHP 5 included new features such as improved support for object-oriented programming, ... and it's advanced a lot more since then.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
|
Object-oriented-ism is a concept, not a tool. Any platform can have it if they start following the rules of Object-oriented programming - Wikipedia[^].
Secondly, C# is not a pure object-oriented language either, it just uses the concepts.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Sorry dude but php is OOP
Kribo
|
|
|
|
|
Yeah I got a response long back. Thanks for confirming it again.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
Did you try to Google? A simple Google for "oop in php" would have yielded the following,
Object Oriented Programming in PHP[^].
Quote: And what project will be suitable for me to learn things quickly and smartly .... i.e e-commerce or else?? ? I recommend build applications for your own use. Your own online notes keeping application, your online to-do list, etc. This gives a flexible time to learn and experiment.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
thanks ...its really helpful
|
|
|
|
|
YO dude...
If you wanna master PHP - OOP - MVC then I sugest to try creating your own Php - Mvc - Framework.
And if you need some idea of what one looks like have a look at the one I created for the same reason. You can download the source code from bitbucket. bitbucket And if you can improve it even better...
So dude have @ it....
kribo @ ScorpioCoding
Kribo
modified 5-Dec-16 12:34pm.
|
|
|
|
|
|
Hello Programmers,
Ho are you all ? I am slowly getting well. However that will speeden up as soon as I start learning Php 7.
MY PHP 7 LEARNING PROBLEM
Most tutorials I find assume I know Php 5 and only mention what's new in Php 7 and just teach the new things added into Php 7. Those tutorials are no good to me since I don't know Php 5 or any previous versions. I need a tutOrial that would teach me orthodox Php 7 (and not frameworks, etc.) and object oriented php (OOP) which would teach me right from the beginning starting from the "Hello World!". I think you know what I mean.
(NOTE: Not interested in learning Php 5 or any previous versions. Why learn old timers which are about to go extinct. Plus, in Php 7, you write less code compared to previous version and the page loading are thrice as fast.
I do have some programming background but not in Php. Only in Ubot Studio which is a visual bot programming tool.
Q1. For beginners:
* Do you recommend any free/paid tutorials on php 7 be it text or video ?
* Do you recommend any free/paid online course on php 7 where we can take online exams and get certified that employers would recognize and value ?
I am at a loss on where to start learning php 7.
I was wondering if you programmers could kindly recommend to me:
1. A good php 7 free tutorial (text or video) website;
2. A good php 7 online course (text or video) to get ceritified as a php developer/programmer.
TUTORIAL/COURSE REQUIREMENTS
1. Tutorial/course must be on Php 7 only and not 5.6 or lower.
2. Tutorial must teach the full language (basic and fundamentals and all commands & functions) and not just the parts that deal with Web design only (Php & Mysql).
3. The tutorial/course must first teach the basics of the php 7 language and then move-on to the intermediate then the advance level.
4. Not interested in Frame Works as of now. Especially, not interested in Frame Works that are not developed by the official Php language developer (php.net). (Eg. Not interested in third party Frame Works such as Zend or Laravel since they're not officials like php.net is). Must teach the core of the language first. Can move-onto Frame Works later, if I wish.
5. Must be OOP (Object Oriented Php).
MY AIM/DREAM
I want to become a php developer/programmer. A php expert. A php guru, who knows all the default & official commands and functions of the language.
I am interested in becoming a professional Php programmer and a freelancer so I can build professional dynamic websites for myself and my clients. I wish to become expert enough to build my own websites and platforms using my own codes that I write and not need to rely on other programmers. Not need to hire any php programmer or borrow php codes from anywhere.
PHP CAREER DREAM
I may get into freelancing where clients outsource me jobs/tasks/assignments to build dynamic websites with Php 7. Hence, I need to learn Php 7 properly to become a Pro Php freelance programmer.
I need to become professional enough to rely on myself and to build my own:
* Forum (phbb, etc.)
* Chat
* Instant Messenger
* CMS (like Word Press, Dolphin, Drupal, Joomla, etc.).
* Social Networks (like Youtube, Facebook, Twitter, Del.icio.us, Reddit, Digg).
It is my hobby to learn things and build things on my own according to my own needs (custom design & features) even if that means re-inventing the wheel a little or even if the work doesn't result upto standard at first. You will agree that, it feels great to build things all by yourself top to bottom from scratch and give life to it even if it isn't upto standard.
I have been researching internet marketing ever since 2004 and have gained a fair understanding of what works and what not online. I have a lot of great concepts and I wish to give life to them in the form of dynamic websites. Hence, the need to learn Php 7.
In short, whenever I come-up with a good concept (good Social Networking concept) then I wish to immediately start programming in Php 7 and make my dream website come true.
NOTE: (I wish to learn how to walk first, then jog, then run in Php programming and not jump into the deep end at the beginning (jumping into frameworks, etc.). I think you understand what I mean.
Hearing all this, can you be kind enough to recommend us your article/blogwebsite audience some tutorials both text and video for complete beginners like me ? I mean, which tutorial sources cover Php 7 from top to bottom for beginners so I can launch my Php 7 programming career ? As a beginner, I don't want to get into Php frameworks just yet as I first want to learn the basics of the Php 7 language then move-on the intermediate level. You may count me as a complete beginner, if you like.
Would also appreciate you recommending us some intermediate level text & video tutorials so we can move-on to them after the beginning levels end. Not interested in learning Php 7 in anybody’s way (Zend’s way or Laravel or this or that organisation's or company’s way) but interested in learning it the “Main Stream’s way” (The Way). The default way. The orthodox way. I think you know what I mean.
Also, which WAMP or XAMP should I install to use Php 7 ?).
Thank you in advance for your reply.
Ali
|
|
|
|
|
Hi there!
I've been developing a small tool to test PHP code snippets online.
Here it is: Online PHP Debugger
Now I want user can choose the version. So I think I should install multiple PHP versions on same server.
Has anyone done it?
Please give me a comment or your ideas.
|
|
|
|