I recently tried to install or add the PHP mssql driver to connect with the ms sql server. Official compiled dll for the php_sqlsrv is until version 5.4, and does not support PHP version 5.5 and beyond.
I tried adding the extension, but XAMPP keeps on telling me there is something wrong. It gives a message like "startup: sqlsrv: unable to initialize module..". I searched the internet for some time, until I came across a solution on my particular problem.
It seems there is a need to compile a newer version of the php_sqlsrv driver. Thankfully someone did that for me since I certainly have no idea how to compile this source file. This is only for test purposes only, so hopefully the compiled dll does not have anything else besides the intended purpose of connecting to the ms sql server.
Here is the link to that file: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e1d37219-88a3-46b2-a421-73bfa33fe433/unofficial-php-55-drivers-x86
Website Development & Programming related to front-end and back-end. Tech news: on gadgets, technology for the web and other things I think will be of use to people to be on the know.
Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts
Wednesday, August 27, 2014
Friday, August 22, 2014
Which is better? Notepad++ or Sublime text?
I have been searching lately for a better code editing application. Some use sublime, some use notepad++ for website development. I came across different websites saying Notepad++ is better, some say sublime text is better.
Here is one that is clear and objective comparison of both: http://text-editors.findthebest.com/compare/9-45/Notepad-vs-Sublime-Text
What it comes down to, is for what specific task will you be using the editor towards? Some argue Notepad++ can compile on the editor itself. Others argue, Sublime text can be used on different OS, such as Mac, Linux, Windows.
Both are almost identical, and can be customize to your specific layout. But as far as latest language updates for the web, I noticed that sublime text supports the new syntax in CSS3. I have been using Notepad++ occasionally, and when using intelli-sense, Sublime text offer much updated language file.
There is nothing wrong with Notepad++, if it can serve your specific project needs, then stick with it. It is a stable build and free. Sublime text on the other hand is not free and expensive for an editor. It cost $70, and free update on current version only. If there is a new version, the license you purchased is only good up to the point of latest update of version bought.
Note: out of the box, Sublime text already has intelli-sense working. While Notepad++ you will need to allow autocomplete thru this steps: Settings>Preference>Auto-Completion tick on the checkbox to enable auto-complete on each input.
Here is one that is clear and objective comparison of both: http://text-editors.findthebest.com/compare/9-45/Notepad-vs-Sublime-Text
What it comes down to, is for what specific task will you be using the editor towards? Some argue Notepad++ can compile on the editor itself. Others argue, Sublime text can be used on different OS, such as Mac, Linux, Windows.
Both are almost identical, and can be customize to your specific layout. But as far as latest language updates for the web, I noticed that sublime text supports the new syntax in CSS3. I have been using Notepad++ occasionally, and when using intelli-sense, Sublime text offer much updated language file.
There is nothing wrong with Notepad++, if it can serve your specific project needs, then stick with it. It is a stable build and free. Sublime text on the other hand is not free and expensive for an editor. It cost $70, and free update on current version only. If there is a new version, the license you purchased is only good up to the point of latest update of version bought.
Note: out of the box, Sublime text already has intelli-sense working. While Notepad++ you will need to allow autocomplete thru this steps: Settings>Preference>Auto-Completion tick on the checkbox to enable auto-complete on each input.
Monday, April 14, 2014
Windows host file helps in speeding up MySQL localhost access
We had a problem before, where the PHP page does not load as fast as it should on mySQL database access. We seem to have solved it by allowing the 127.0.0.1 to point to localhost.
What we did was removed the comment sign # to resolve the ip as localhost.
Host file is found at the following directory: c:\windows\system32\drivers\etc\
File name is hosts.
There are a lot of source material on the internet to edit the host file.
This is one of them:
http://helpdeskgeek.com/windows-7/windows-7-hosts-file/
What we did was removed the comment sign # to resolve the ip as localhost.
Host file is found at the following directory: c:\windows\system32\drivers\etc\
File name is hosts.
There are a lot of source material on the internet to edit the host file.
This is one of them:
http://helpdeskgeek.com/windows-7/windows-7-hosts-file/
Thursday, March 6, 2014
PHP include_once from parent folder not working in version 5 above
I don't know why but the include_once does not work if the file is one folder above the file calling it. There is a fatal error logged in the error log file, but it does seem to be still working.
The solution, that I found here: http://stackoverflow.com/questions/5588639/php-include-once-not-working
seems to work, and does not register as error after I place the code sample:
include_once (dirname(__FILE__) . '/../file.php');
The solution, that I found here: http://stackoverflow.com/questions/5588639/php-include-once-not-working
seems to work, and does not register as error after I place the code sample:
include_once (dirname(__FILE__) . '/../file.php');
Thank you, to the person who shared the answer.
Wednesday, October 30, 2013
IIS Compression of content urlCompression
It has been a busy week for me on updating this blog. Dealing with a 3rd party developer and letting me learn something new. I don't know everything and I seldom pretend knowing something I don't.
What I have learned from dealing with a 3rd party developer is this option of IIS to compress the content and giving it to the client browser. I sure wasn't aware of it. According to this source: http://www.codinghorror.com/blog/2004/08/http-compression-and-iis-6-0.html
IIS 6 is the server I am currently using for a website done by a 3rd party developer. So that article I linked above is a bit helpful in explaining it. And another link on how to enable it: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d52ff289-94d3-4085-bc4e-24eb4f312e0e.mspx?mfr=true
Here is a link for the IIS 7 configuration: http://www.iis.net/configreference/system.webserver/urlcompression
urlCompression replaces the settings of the IIS in .Net.
Which I found out was already set to send compressed files to browsers. And does not need to be set at all, it is only in IIS 6 and below where it is disabled, since some browsers then do not accept compressed files.
According to the first link, compression makes the plain text size by 75 percent. Not bad, but still if you have a small bandwidth, that will still affect your server and clients that are accessing it constantly.
What I have learned from dealing with a 3rd party developer is this option of IIS to compress the content and giving it to the client browser. I sure wasn't aware of it. According to this source: http://www.codinghorror.com/blog/2004/08/http-compression-and-iis-6-0.html
IIS 6 is the server I am currently using for a website done by a 3rd party developer. So that article I linked above is a bit helpful in explaining it. And another link on how to enable it: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d52ff289-94d3-4085-bc4e-24eb4f312e0e.mspx?mfr=true
Here is a link for the IIS 7 configuration: http://www.iis.net/configreference/system.webserver/urlcompression
urlCompression replaces the settings of the IIS in .Net.
Which I found out was already set to send compressed files to browsers. And does not need to be set at all, it is only in IIS 6 and below where it is disabled, since some browsers then do not accept compressed files.
According to the first link, compression makes the plain text size by 75 percent. Not bad, but still if you have a small bandwidth, that will still affect your server and clients that are accessing it constantly.
Saturday, October 26, 2013
what is the value represented in clientCache cachControlMaxAge
I have been given a code by a 3rd developer to update the website they created in .Net.
He just mentioned I place the code, inside the <system.webServer> configuration.
After looking at it I was a bit apprehensive in implementing this setting in the web.config file:
<staticContent>
He just mentioned I place the code, inside the <system.webServer> configuration.
After looking at it I was a bit apprehensive in implementing this setting in the web.config file:
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>
I have an idea, it could represent 10 days, but wasn't sure, since this is the first time I saw this code.
After an extensive search, which was hard since there isn't much result on the usage and value syntax for this settings. Also, the result always reflect as IIS, which makes me wonder when I see it if that is correct result.
It is confirmed it represents 10 days. Ten days cache on the client's browser cache, which I don't know how the microsoft technology can do it on client side level. But that was the explaination on this website: http://blog.janjonas.net/2011-08-21/microsoft-iis-7-enable-client-side-browser-caching-static-content-web-config
It says that the static contents such as image file, CSS and javascript files will not change based on the instruction given to the browser, on the page header.
The other source explained for this script can be found here: http://www.iis.net/configreference/system.webserver/staticcontent/clientcache
Which is also based on the first link, to a IIS.net resource, which confuses me, since I thought this was a .Net settings.
If conditional statement in a single line using Operators (?:)
I often forget how to do the simplified condition using the (?:) symbol. And it is very hard to search on what you meant to search at times. It's called the ternary operator logic (?:).
I found a source where it shows just how to do it in different levels of complexity:
http://davidwalsh.name/php-shorthand-if-else-ternary-operators
In case the site goes offline. The Ternary Logic is the process of using the following syntax: "(condition) ? (true value return) : (false value return)". This will shorten the if/else statement to a single line.
But often this technique confuses others not familiar with it. But it is fun way to do it. I still prefer the long way, but will use it to shorten the code at times.
based on the website source link, here is a sample:
I found a source where it shows just how to do it in different levels of complexity:
http://davidwalsh.name/php-shorthand-if-else-ternary-operators
In case the site goes offline. The Ternary Logic is the process of using the following syntax: "(condition) ? (true value return) : (false value return)". This will shorten the if/else statement to a single line.
But often this technique confuses others not familiar with it. But it is fun way to do it. I still prefer the long way, but will use it to shorten the code at times.
based on the website source link, here is a sample:
$var = 6;
$var_result = ($var>3 ? true:false); // it will return true
Wednesday, October 2, 2013
GIT repository problem
We have a 3rd party developer try to give us the updates thru their repository...
Problem is the instruction isn't clear on how to do the update. They expect everyone to know this.
The development manager just placed the command (git pull origin master). I tried running the command in gitbash. Without any instruction of specific folder to be in. Did he expect me to know this, when I have no idea how GIT worked in the first place. Thanks to the internet, now I know why I get the error:
Fatal: Not a git repository (or any parent directories): .git
He should have instructed me to change my directory to the one I cloned before. Thanks to the internet I found the solution here: http://stackoverflow.com/questions/11961600/fatal-not-a-git-repository-or-any-of-the-parent-directories-from-git-status
Problem is the instruction isn't clear on how to do the update. They expect everyone to know this.
The development manager just placed the command (git pull origin master). I tried running the command in gitbash. Without any instruction of specific folder to be in. Did he expect me to know this, when I have no idea how GIT worked in the first place. Thanks to the internet, now I know why I get the error:
Fatal: Not a git repository (or any parent directories): .git
He should have instructed me to change my directory to the one I cloned before. Thanks to the internet I found the solution here: http://stackoverflow.com/questions/11961600/fatal-not-a-git-repository-or-any-of-the-parent-directories-from-git-status
You have to actually cd into the directory first:
$ git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/liggghts
Cloning into 'liggghts'...
remote: Counting objects: 3005, done.
remote: Compressing objects: 100% (2141/2141), done.
remote: Total 3005 (delta 1052), reused 2714 (delta 827)
Receiving objects: 100% (3005/3005), 23.80 MiB | 2.22 MiB/s, done.
Resolving deltas: 100% (1052/1052), done.
$ git status
fatal: Not a git repository (or any of the parent directories): .git
$ cd liggghts/
$ git status
# On branch master
nothing to commit (working directory clean)
Tuesday, July 16, 2013
MySQL WorkBench problem cannot create user
'Unhandled exception: Error creating account' error message when creating an account in mySQL Workbench.
I'm using workbench 5.2.31 CE.
This problem have popped up, when I'm trying to create a user in mySQL.
There are two steps to work around this:
- edit the sql-mode configuration. It can be found under Advance tab, Edit the text of sql-mode. Remove the part "NO_AUTO_CREATE_USER," or cut it. Then paste it back after you have created your user.
- Run the grant all previleges script as instructed below.
The solution is very simple. You just have to run one of this statement in the Workbench Query window:
GRANT ALL PRIVILEGES ON *.* TO changetousername@localhost;
GRANT ALL PRIVILEGES ON *.* TO 'changetousername'@'%';
This will create an account without password. So better set the password and change the previleges.
I don't know if this is the best work around or the worst. But if you are desperate to add a user account. This is the way that worked for me.
Here is part of the source of the solution:
http://stackoverflow.com/questions/15673640/unhandled-exception-error-creating-account
I don't know if this is the best work around or the worst. But if you are desperate to add a user account. This is the way that worked for me.
Here is part of the source of the solution:
http://stackoverflow.com/questions/15673640/unhandled-exception-error-creating-account
Labels:
Creation,
Database,
Development,
MySQL,
Programming,
solution,
SQL,
User Account
Tuesday, July 9, 2013
Cookie Setting troubles in PHP
I was trying to determine why the value for a cookie is not reflecting on my page.
Here are some of other developers say you should now in implementing cookies:
There is a problem with the cookie when the mobile browser is never closed. I had my browser open in the background. Even when I set the cookie to expire in 30 mins. It does not happened, since the browser still reads the value even beyond expire date.
Here are some of other developers say you should now in implementing cookies:
- It has to be on top before any code is generated by the page
- Cookie will not reflect on the same page when you set it. It will reflect on the next loading of the page.
2nd one is true. The first one also seems to be true, since no value is placed when I placed the code in the middle and after html codes have been rendered.
Here are the links to those recommendations:
There is a problem with the cookie when the mobile browser is never closed. I had my browser open in the background. Even when I set the cookie to expire in 30 mins. It does not happened, since the browser still reads the value even beyond expire date.
Wednesday, June 19, 2013
Notepad++ free IDE for programming
I just started using this IDE called notepad++. I have been hearing things about this app, and when I tried it, I had a bit of a hard time getting the hang of it.
The only thing I liked about it. Is the document preview on the right side, where I can see the whole code and drag the view to where I want to be. There could be more features on this free IDE, I could just be scratching the surface.
As a free tool, I like this IDE already. Only thing lacking, is the design window, but that could be asking for something else, when it is just an advance version of notepad.
Official website of Notepad++: http://notepad-plus-plus.org/
The only thing I liked about it. Is the document preview on the right side, where I can see the whole code and drag the view to where I want to be. There could be more features on this free IDE, I could just be scratching the surface.
As a free tool, I like this IDE already. Only thing lacking, is the design window, but that could be asking for something else, when it is just an advance version of notepad.
Official website of Notepad++: http://notepad-plus-plus.org/
Friday, May 31, 2013
IIS Redirection include querystring
I mentioned before that I tried redirecting a website source for users not able to see the real website, but a folder or a domain name that points to the real site. Little, did I know I still need to set the redirection with a placement character of $S$Q. Example: the URL is: http://www.Domainname.com$S$Q
Placing that placement character made a big difference in passing the query string and value.
Source of the solution: http://stackoverflow.com/questions/7147806/iis-redirect-preserve-querystring
Placing that placement character made a big difference in passing the query string and value.
Source of the solution: http://stackoverflow.com/questions/7147806/iis-redirect-preserve-querystring
Wednesday, May 15, 2013
jQuery Thickbox, passing querystring value
I found a solution for passing value using the jQuery Thickbox. My error was I placed the querystring value at the end, when I should have placed it on the front.
Sample:
page.php?queryvar=a&TB_iframe=true
This solved my problem. Thank you internet for giving the answer, but the answer was deep in the haystack.
Sample:
page.php?queryvar=a&TB_iframe=true
This solved my problem. Thank you internet for giving the answer, but the answer was deep in the haystack.
Labels:
javascript,
jQuery,
Philippines,
PHP,
Programming,
thickbox
Monday, March 4, 2013
I often relay on the javascript, when it can be done on plain html and server side script
I have been guilty of using excessive javascript on my website developments, while ignoring the fact that some people, especially the iOS device users at time disable their javascript on their browsers.
I have been developing my own version of captcha, and I designed it, by using an external javascript, that in a way no one will be able to see the generated script on the page itself.
Only problem, is the method I created is not compatible with old iPad devices that have not updated their safari browser. I was able to fix the problem, by directly placing the images on the page and not changing values on my html elements.
I have been developing my own version of captcha, and I designed it, by using an external javascript, that in a way no one will be able to see the generated script on the page itself.
Only problem, is the method I created is not compatible with old iPad devices that have not updated their safari browser. I was able to fix the problem, by directly placing the images on the page and not changing values on my html elements.
Tuesday, January 29, 2013
Very good site to know the mobile screen size or viewport width
I was confident the project we are doing will will render fine on the mobile browsers of any devices. Then when we are testing in on my Galaxy S3, I notice the condition my Jr. developer made for the CSS was not correctly triggered and I was not satisfied on the way the page was shown.
I asked, what was the problem, and according to my jr. developer: There was no way of knowing the size since every time a browser zooms, the pixel width in the viewport changes. Which was true, when we tested it on our desktops and also on Opera mobile browser emulator.
While searching for a solution online, I stumbled upon this page: http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/ where a list of most mobile devices and their viewport are listed. This is very helpful in determining the smallest width you have to look for on a device.
I gave them a solution to place a width on the smallest screen possible at the viewport meta and this fixed the problem. But being a stubborn subordinate; my jr. developer retained the current settings and just change the CSS. Adding another pixel condition to render properly on my device.
When I asked, why do it like that, the reason according to my jr. developer was that setting a specific size will not render correctly on iPhone. Since none of us owns an iPhone, we have to rely on the web on this findings. According to my jr. developer the mobile website will now render correctly on the 240 pixel viewport screen, that is good enough for me.
I asked, what was the problem, and according to my jr. developer: There was no way of knowing the size since every time a browser zooms, the pixel width in the viewport changes. Which was true, when we tested it on our desktops and also on Opera mobile browser emulator.
While searching for a solution online, I stumbled upon this page: http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/ where a list of most mobile devices and their viewport are listed. This is very helpful in determining the smallest width you have to look for on a device.
I gave them a solution to place a width on the smallest screen possible at the viewport meta and this fixed the problem. But being a stubborn subordinate; my jr. developer retained the current settings and just change the CSS. Adding another pixel condition to render properly on my device.
When I asked, why do it like that, the reason according to my jr. developer was that setting a specific size will not render correctly on iPhone. Since none of us owns an iPhone, we have to rely on the web on this findings. According to my jr. developer the mobile website will now render correctly on the 240 pixel viewport screen, that is good enough for me.
Wednesday, December 26, 2012
Free Mobile Browser Detection code generation
While searching for a mobile browser detection code, I came across this site: http://detectmobilebrowsers.com/
This site generates the code for popular browsers to detect using the USER AGENT of the browser used. It's free to use, and donation to keep the site alive is pretty much appreciated by the author.
This is another useful website, that is simple to use, but takes a while to dissect the code. You pretty much need to brush up on your regular expression to understand the code and what it compares. But if you are not worried about the code behind the detection, by all means, just paste the code to your site and set the redirection page.
This site generates the code for popular browsers to detect using the USER AGENT of the browser used. It's free to use, and donation to keep the site alive is pretty much appreciated by the author.
This is another useful website, that is simple to use, but takes a while to dissect the code. You pretty much need to brush up on your regular expression to understand the code and what it compares. But if you are not worried about the code behind the detection, by all means, just paste the code to your site and set the redirection page.
Thursday, October 25, 2012
Minimum & Maximum Year in MS SQL
You guys remembered the millennium bug, in year 2000? It's where some people fear, the computers will crash, and planes will also crash when in flight, because of the bug on the year, where the computers only allow until year 2000. Well I didn't believe it, and wasn't affected by that scare.
But, there is such things as limits I supposed.
In MS SQL 2000 & 2005, they have the following limits:
This was fixed in MS SQL 2008, where they have the following limits to the dates:
If we ever reached that year 10000, then they will probably panic again like the millennium bug scare. Or people will be cyborgs with numbers on their names and probably fear they will be affected by the limit.
But, there is such things as limits I supposed.
In MS SQL 2000 & 2005, they have the following limits:
- minimum date of 1753-01-01 00:00:00.000
- maximum date of 9999-12-31 23:59:59.999
This was fixed in MS SQL 2008, where they have the following limits to the dates:
- Minimum date: 0001-01-01 00:00:00.000
- Maximum date: 9999-12-31 23:59:59.999
If we ever reached that year 10000, then they will probably panic again like the millennium bug scare. Or people will be cyborgs with numbers on their names and probably fear they will be affected by the limit.
Friday, September 7, 2012
Solution when submit method throws "object doesn't support this property or method" error.
Thank God, for the internet and Google. I was able to solve this problem right away. Somehow if you use the code: document.formname.submit() in javascript you will get an error when you named another object as 'submit'.
I was able to change the other objects name and everything was fine. On my case the object in conflict is the submit button, that usually by default named as 'submit'. I only change it and everything worked perfectly.
I saw the solution on the first result google gave me on the list. The link to the solution is here: http://it.toolbox.com/wiki/index.php/Why_does_form_submit_method_throws_%22object_doesn't_support_this_property_or_method%22_error%3F
I was able to change the other objects name and everything was fine. On my case the object in conflict is the submit button, that usually by default named as 'submit'. I only change it and everything worked perfectly.
I saw the solution on the first result google gave me on the list. The link to the solution is here: http://it.toolbox.com/wiki/index.php/Why_does_form_submit_method_throws_%22object_doesn't_support_this_property_or_method%22_error%3F
Thursday, July 12, 2012
window.onload problem on external javascript with lower versions of IE
I was happily developing a new application, and have been very happy with the results. Then as I was in the middle of implementation, (good thing it was still early stages) I realized that IE browsers versions 5-7 acts abnormally on the window.onload from an external javascript. Although, my application works on all current browsers, this still shows as a dilemma to me because, the websites I am going to use my application on have visitors that will use mostly old versions of IE, based on Google Analytics data. The only way I can sleep at night knowing my application behaves as it should, is to find a solution for this problem or not implement my application at all.
I keep getting an error of "Invalid Pointer", which could be due to the fact that script somehow ran before all the objects and elements have completely loaded. After a exhausting search, I was able to find the solution in an easy to understand blog by Dean Edwards at his site: http://dean.edwards.name/weblog/2005/09/busted/ and http://dean.edwards.name/weblog/2006/06/again/ .
The solution on my specific problem was to have my external page loaded after all objects and elements are finish on the main page. One of the solution presented was to have defer on the <script> tag. According to him, this only works on external files, which pretty much the solution on my problem. Here is how it would look:
<script defer type="text/javascript" src="external.js"></script>
Ok, so I placed that on my website. Still an error occured, I have no choice, but to just have my functions in an external file, while I do the window.onload on the main page.
After placing the window.onload on the main page, this time the error is on the browser not recognizing the object. So part of the solution is for IE to detect, if everything is ready. Answer is still in Deans blog, but a lot different for my case since, I want to use an external file and detect if all is ready, before I run the function. My own solution is to have the following script, based on his example:
document.onreadystatechange = function() {
if (this.readyState == "complete") {
somefunction();
}};
I just replaced his script object with document object, for me to see that document has all been loaded. This only works on IE according to some websites, but when I placed it to run on other browser was detected, it still performs as it should.
So, the whole solution for me was to detect in PHP, the browser and version to run this work around:
<script defer type="text/javascript" src="external.js"></script>
<?php
if(isset($_SERVER['HTTP_USER_AGENT']) && ((strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5') !== false) || (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false) || (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false)))
{
?>
document.onreadystatechange = function() { if (this.readyState == "complete") {
somefunction();
}};
<?php
}
else
{
?>
I keep getting an error of "Invalid Pointer", which could be due to the fact that script somehow ran before all the objects and elements have completely loaded. After a exhausting search, I was able to find the solution in an easy to understand blog by Dean Edwards at his site: http://dean.edwards.name/weblog/2005/09/busted/ and http://dean.edwards.name/weblog/2006/06/again/ .
The solution on my specific problem was to have my external page loaded after all objects and elements are finish on the main page. One of the solution presented was to have defer on the <script> tag. According to him, this only works on external files, which pretty much the solution on my problem. Here is how it would look:
<script defer type="text/javascript" src="external.js"></script>
Ok, so I placed that on my website. Still an error occured, I have no choice, but to just have my functions in an external file, while I do the window.onload on the main page.
After placing the window.onload on the main page, this time the error is on the browser not recognizing the object. So part of the solution is for IE to detect, if everything is ready. Answer is still in Deans blog, but a lot different for my case since, I want to use an external file and detect if all is ready, before I run the function. My own solution is to have the following script, based on his example:
document.onreadystatechange = function() {
if (this.readyState == "complete") {
somefunction();
}};
I just replaced his script object with document object, for me to see that document has all been loaded. This only works on IE according to some websites, but when I placed it to run on other browser was detected, it still performs as it should.
So, the whole solution for me was to detect in PHP, the browser and version to run this work around:
<script defer type="text/javascript" src="external.js"></script>
<?php
if(isset($_SERVER['HTTP_USER_AGENT']) && ((strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5') !== false) || (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false) || (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false)))
{
?>
document.onreadystatechange = function() { if (this.readyState == "complete") {
somefunction();
}};
<?php
}
else
{
?>
<!-- Other Browsers Script -->
<?php
}
?>
The following is the source for the onreadystatechange: http://help.dottoro.com/ljerfwdm.php
Tuesday, July 3, 2012
Installing MS SQL 2008 Management Studio
I'm making this post, since I have seem to have solved my installation problem with MS SQL 2008 Management Studio installer. And I want to share, the proven way in solving it. Somehow, solved anyway. I don't know what exactly the problem with the installer, but when you try to install it, it gives the following message:
SQL Server Setup failure.
------------------------------
SQL Server Setup has encountered the following error:
Invoke or BeginInvoke cannot be called on a control until the window handle has been created..
I looked for a solution thru google, and this is the most funny and unbelievable work around I found, but it works. Here is the link: http://stackoverflow.com/questions/1677435/invoke-or-begininvoke-cannot-be-called-on-a-control-until-the-window-handle-has
I don't know what happened, but after minimizing all windows and focusing only on the installation dialog, it somehow let me thru the installation process. I clicked back and forth the main installation window and the modal status window and somehow, I was able to successfully install my Management Studio 2008.
Reason that I installed the Management Studio 2008, was due to the fact that I cannot manage my data with editable results if I'm accessing MS SQL 2008, thru Management Studio 2005. It is stated in some forums, that you can use higher versions of Management Studio, but cannot use lower versions to fully use the latest MS SQL version. It does make sense to me, backwards compatibility only.
Here is the link to the MS SQL 2008 Management Studio Express installer: http://www.microsoft.com/en-us/download/details.aspx?id=7593
It states, express version, but I haven't notice any difference with the one included with the Enterprise edition installer. By the way, they both have bugs during installation, that is why I resorted in installing an express edition, even though I have an enterprise installer of MS SQL 2008.
You may have to install the SP 1 (service pack 1) of MS SQL 2008 after installation of Management Studio 2008. As indicated, during or initial install of Management Studio.
SQL Server Setup failure.
------------------------------
SQL Server Setup has encountered the following error:
Invoke or BeginInvoke cannot be called on a control until the window handle has been created..
I looked for a solution thru google, and this is the most funny and unbelievable work around I found, but it works. Here is the link: http://stackoverflow.com/questions/1677435/invoke-or-begininvoke-cannot-be-called-on-a-control-until-the-window-handle-has
I don't know what happened, but after minimizing all windows and focusing only on the installation dialog, it somehow let me thru the installation process. I clicked back and forth the main installation window and the modal status window and somehow, I was able to successfully install my Management Studio 2008.
Reason that I installed the Management Studio 2008, was due to the fact that I cannot manage my data with editable results if I'm accessing MS SQL 2008, thru Management Studio 2005. It is stated in some forums, that you can use higher versions of Management Studio, but cannot use lower versions to fully use the latest MS SQL version. It does make sense to me, backwards compatibility only.
Here is the link to the MS SQL 2008 Management Studio Express installer: http://www.microsoft.com/en-us/download/details.aspx?id=7593
It states, express version, but I haven't notice any difference with the one included with the Enterprise edition installer. By the way, they both have bugs during installation, that is why I resorted in installing an express edition, even though I have an enterprise installer of MS SQL 2008.
You may have to install the SP 1 (service pack 1) of MS SQL 2008 after installation of Management Studio 2008. As indicated, during or initial install of Management Studio.
Subscribe to:
Posts (Atom)