Apache and Command Prompt running two different version of PHP on windows - php

Yesterday, I installed Pear. During installation it asked me installation path of php. But, i mistakely entered different path. So, Pear installed different php version in that Path.
Problem
Now, my apache runs php v5.5 as always. But, from yesterday, command prompt runs v5.3!
How can I make changes so that command prompt runs same version as apache i.e. v5.5.??
I am using windows.

Edit your path variable, replacing the path to v5.3 with the path to v5.5. This guide provides some good info on how to edit the system path.

Related

Windows 10 uninstall Mamp - cannot find C:\MAMP\unins000.exe

Short backstory: Recently I've installed MAMP as I want to start learning PHP. I got version 4.1.1 from the MAMP homepage, Apache didn't start. This seems to be a common bug for that version, I found a solution in downloading version 4.1.0. Both servers started but the Open WebStart Page didn't work.
My Problem: I wanted to try reinstalling it, I deleted the MAMP folder, as I thought that would be sufficient, instead of deleting it in the system settings. Now when I download it again and start the installer it says
MAMP setup has detected existing MAMP installation. You need to remove existing installation before proceeding. Do you want to uninstall it now?
Clicking either yes or no gives me
MAMP setup will now exit and the existing MAMP installation will not be removed.
In the system settings I find
MAMP & MAMP PRO 4.1.0 version 4.1.0 (1.47 GB)
When trying to uninstall it it gives me this error
Windows cannot find 'C:\MAMP\unins000.exe'. Make sure you typed the name correctly, and then try again.
Is there any way, other than reinstalling my whole OS, to solve this problem or do I have to turn to a different web server app?
I just encountered this problem and I hope my solution works for you as well:
Just download the .exe file into another device and install the MAMP.
After a successful installation, just copy the folder to your original device that has the problem.
And then you should find a file with a name starting with "uni" meaning it is for uninstallation. Just run that file and then everything should be fine!
I had the same problem (on OS is windows 10).
I browse the web and found a way:
You can download the ccleaner and use it, it can delete the MAMP.

Unable to connect sql server database with codeigniter on xampp with windows 7

I have an application where i need to connect my web (PHP based) application with desktop application database so that both desktop and web can communicate with each other.
On ubuntu OS connectivity is working fine but when i comes to windows 7 codeigniter sql server connectivity is not working.
i tried visual c++ redistributional packages as well as other instructions provided on many platforms but fails.
i also added extensions in php\ext and dll files as well as include that extensions like sql_serv55_nts like that but nothing is working.
last error that i am receiving is
application not be run as php5.dll is missing .
can some one help to figure this out as soon as possible and can send me proper tested procedure for this.
As you say you have installed the sql_serv55_nts version of the SQLServer libraries, this is your problem.
Instead install the TS (Thread Safe) version of the SQLServer libraries. XAMPP on windows runs Thread Safe.
The php5.dll is the Non Thread Safe version of php5ts.dll which is supplied with the XAMPP install of PHP.
Once you install the TS version of SQLServer libraries delete the php5.dll it is not required, also you got it from a source that you cannot be sure is safe. A simple rule of thumb If it was required it would have come with the XAMPP install.
NOTE: You should never need to copy anything related to Apache/PHP/MYSQL into the Windows system folders. If you do, when you come to install another version of XAMPP it will still be there and will cause you hours of debugging to find out why you are having odd issues.
ALSO: It is also dangerous adding anything XAMPP or WAMPServer related to the Windows PATH as this will also cause you issues when you come to update XAMPP/WAMPServer as you are bound to forget that this was done.
Try adding your php directory and your php extensions directory to your PATH environment variables.
I resolved issue in following way.
Install xampp with php 5.5
install microsoft re distributional package
download php5.ddl file from php5.dll
if window is 32 bit than just copy downloaded php5.dll into windows/system32
if you have 64bit window than you need to copy it into windows/SysWOW64 too.
best is to restart your PC
All done......

PHP Version in Wamp and Command Line Windows not compatible

So basically i am trying to run yii-framework on wamp server but required higher version of php (5.4 above). In my Wamp server, the php version is 5.5 which i have checked on browser (localhost). But the when i run it on windows, it fails because the windows version is only 5.3. It causes the yii framework fail too because when i type php requirements.php. it does not work.
There is no Windows version of PHP so basically you must have installed a version of PHP manually i.e. not with WAMPServer.
This will probably have added an entry on you PATH ( always a bad idea when using WAMPServer anyway as you can have many versions of PHP on your system at one time with WAMPServer)
Look at your PATH and if you must, amend it to point to the PHP in \wamp\bin\php\php{version}
A better way is to remove any reference to PHP from the PATH environmant variable and write a simple batch file to add php to your path only when you want to, like this
Batch file saved in C:\windows\phppath.cmd
echo off
PATH=%PATH%;c:\wamp\bin\php\php5.4.16
Assuming you have php5.4.16 on your wampserver install.

Upgrade PHP on XAMPP 1.8.3 windows 7 installation

I have XAMPP 1.8.3 installed on my windows 7 machine. Which include PHP 5.5.6. I want to upgrade the PHP to 5.6 version. Is it possible to do the upgrade while keeping the XAMPP bundle other module as it is (Apache, MySQL). Can any one suggest a way to do upgrade on windows 7.
Download the package from following url:
http://windows.php.net/download/. Make sure the “Thread Safe” zip
file with around 20MB was downloaded.
Extract and rename the folder to “php”.
Rename the existing “php” folder to something and place the new
bundle with folder name “php”.
Then restart the apache server. It will simply load the new PHP
version.
Try like this:
How to upgrade php in xampp:-
Lots of time you need to use multiple version of php for your
different project. In this case either you want to install xampp on
different port or you can install one xampp and upgrade php. In this
article I will demonstrate how you can upgrade php in your xampp
server. I will demonstrate the complete process by adding PHP 5.4
with XAMPP. Following is the step by step process of upgrading php
in your xampp server. Before trying these steps please take complete
backup of your code and database alognwith xampp because any small
mistake can lead to the corruption of your regular XAMPP.
Upgrade PHP in XAMPP server
Download PHP : If you are using xampp ofcourse you are using windows operating system. So first download your desired version of php binary from http://windows.php.net/download/ website. Be careful while choosing binary. If you are using XAMPP then your webserver is apache. So always download Thread Safe binary. Also read the compiler suggestion carefully on the windows.php.net site. I will recommend to download zip version.
Configure New PHP Version with your xampp: Unzip the downloaded version of the PHP in a separate folder. Please make sure that your new php folder name is not “PHP”. May be you can use folder name as the version name. For example for php 5.4 you can use php54. Copy the new php folder into your xampp folder. Now go to yourxampp/apache/conf/extra folder. Open file httpd-xampp.conf from the folder extra. Change the following variables:
Variable PHPINIDir to be your xampp folder new version of PHP
Varaible LoadModule to be your xampp folder/new version of PHP/php5apache2_2.dll
Save the file httpd-xampp.conf. Restart your XAMPP apache server. If your server get restarted successfully then your server php version is upgraded. You can check the status of your php version by URL http://localhost/xampp/phpinfo.php .

Installing PHP+ Apache on netbeans

I need help with this issue. I'm trying to install php in my netbeans but i dont know exactly how to do it. The netbeans version i'v downloaded already have PHP installed (i can create a php project). But, for some reason when i run the project, nothing happens. I dont really think i have Apache Tomcat installed in my netbeans, that what i need help for. When adding the "tomcat 6.0" server, this information is needed:
server location (catalina home)
username
password
I have no idea what is that. I would apreciate help on this - How to install PHP + ApacheTomcat on neatbeans.
Apache Tomcat is for running Java apps. You'll be wanting Apache HTTP server instead.
I've always kept the installation of Apache and netbeans separate, I would:
Install Apache on your system - doesn't matter if Windows or Linux, just follow install instructions.
Find out the Apache directory that you will add your php files into. That's usually /var/www/ on Linux, don't know about Windows.
Create a new PHP project in Netbeans and configure it to use sources from the Apache directory in #2. Say for a project called teststuff I create a dir called /var/www/teststuff/ and create a Netbeans project inside there.
You should be able to browse to http://localhost to see your new server running.

Categories