I am getting error in wamp for PHP in path - php

My wamp server icon is currently orange, which means only 2 out of 3 servers are running. I can not open my phpmyadmin page because it gives 404 not found error. if I right click on my wamp icon at the bottom I get an error saying Error: C:/wamp64 or PHP in PATH. If I click on this error then a command prompt window appear saying this:-
Sorry,
There is an error.
There is Wampserver path (c:/wamp64)
into Windows PATH environnement variable: (C:\wamp64\bin\php\php7.2.4)
It seems that a PHP installation is declared in the environment variable
PATH
C:\wamp64\bin\php\php7.2.4
Wampserver does not use, modify or require the PATH environment variable.
Using a PATH on Wampserver or PHP version
is detrimental to the proper functioning of Wampserver.
Press ENTER to continue...

To repress this error notification: right-click on System Tray wampserver icon and hover on "Wamp Settings" >> select "Do not verify PATH"

As indicated, you do not need a path on a PHP version in the Windows PATH environment variable.
Control Panel
System
Advanced system settings
Environment Variables button
System variables
Select PATH
Modify
Select C:\wamp64\bin\php\php7.2.4
Press OK

I meet the same issue.
Maybe it's because your port 80 is used by other programs you don't need to add path just change your port 80 -> 8080

If you use Composer commands, you need to add PHP path in the Windows PATH Environment Variable. Otherwise, you don't.
I am using Laravel framework and usually install packages by command lines. I have to keep PHP path in WEV although WampManager told me that error.
You should be careful on checking PHP version. The http://localhost/ will give you the PHP version selected by WampManager. If you use command line "php -v", it will give you the version added in Windows PATH.

Related

Error in Wamp server shows Error: C:/wamp or PHP in PATH

1. when i click on error i get this
Sorry, There is an error. It seems that a PHP installation is declared
in the environment variable PATH C:\php
There is Wampserver path (c:/wamp) into Windows PATH environnement
variable: (C:\wamp\bin\php)
Wampserver does not use, modify or require the PATH environment
variable. Using a PATH on Wampserver or PHP version is detrimental to
the proper functioning of Wampserver.
Press ENTER to continue...
then i check my enviroment variable see here screenshot
i am working in php framework laravel when i type php artisan migrate it show error
[PDOException] could not find driver
then check my phpinfo then search pdo see this screenshot image
while wamp installation you need to set path of wamp to directory where "php.exe" file is exist.. then it will be solved
There is probably a reference to C:\php in the Systems Variables path (check your environment variables), and it is confusing WAMP.
When you run the migration, you are probably using the php interpreter that is in C:\php that doesn't have PDO mysql driver.
I would suggest to try to remove the reference to C:\php in the Path variable.
Do you try with the php 7.0 becuase maybe your laravel version doesn't support by wamp server.
Please check that first and let me know.
Thank you.

Running PHP on Windows 10 - Server problem?

My computer is a Windows 10 64 bit.
I tried to run my PHP code, steps:
Downloaded php.net.
Set the environment variables path as instructed. Ran the command line like this: https://imgur.com/a/Q9zs9mL
Microsoft Windows [Version 10.0.17134.345]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\Mai Do>php -S localhost:4000
PHP 7.2.10 Development Server started at Mon Oct 22 21:04:32 2018
Listening on http://localhost:4000
Document root is C:\Users\Mai Do
Press Ctrl+C to quit.
Created a PHP file, first with NetBeans
Saved the file in the root directory folder named "php1" (try to be different from my root name)
Typed in browser: localhost:4000/php1/input.php
Object not found 404 page.
Tried multiple times with different php file. same thing.
Switch to Atom. Same thing.
Moved the file to htdocs folder. Same thing
Download Xampp. Turn on the Apache and MySQL. XAMP ver 3.2.2 control panel shows up. Both Button turn to Green. Still not found.
This SO page PHP not working in XAMPP says:
If you're trying to connect via your IP then your router must be
stopping it so you have to sort the settings out. I don't know your
router make/model you better off asking their support forums.
I am thinking there might be a server config problem. Like this one has a similar issue: Apache2 not working with routes PHP
which leads to this:
https://docs.bolt.cm/3.0/howto/making-sure-htaccess-works
"Editing the apache2.conf and setting 'AllowOverride All' on , finally
works." ???
I am not sure if that is the right problem either. Can someone walk me through it? Bless you.
To set up a test environment on your personal computer, follow the steps below:
Remove any installed PHP (Windows: uninstall via "Add/Remove Programs")
Install XAMPP (in your case, it's better to re-install the software suite)
XAMPP is a software suite that contains PHP + MariaDB (a fork from MySQL) + Apache Web Server + Perl. In your case, you are going to use PHP & Apache only.
Configure the DocumentRoot in Apache config file; you should put your website files in this DocumentRoot, thus I recommend you to set the path value to your development path. Read the manual if you're unsure how to do so.
Start/Restart Apache. If everything goes smooth, Apache should be up and running at port 80 (by default).
Launch your favorite browser and navigate to http://localhost
You should see your website written in PHP
If you have any further questions, please ask in the comment box below.
Note:
NetBeans is an IDE, not related to your testing environment
You can actually write your PHP scripts using any text editor

Error installing XAMPP: Windows cannot find -n

I've been trying to install XAMPP for quite some time now, but every time, at the end of the installation, it says:
Windows cannot find "-n"
And after that, it says:
Problem running post-install step. Installation failed (php.exe) Perhaps you have to install Visual C++ 2008 package.
I have Visual C++ 2008 package and it still says this. What do I do now? I have Windows 10 64-bit for anyone wondering.
I installed it in the root of my C: drive and it worked. Strange that previously I could just install it in my program files folder and that everything works...
Had the same problem when I tried to install xampp in a folder with spaces in its name (some folder example)
It was solved after I reinstalled xampp in a folder that has no space in its name, E.g. c:/xampp
Change your registry settings.
Open Registry Editor by pressing Windows + R key combination, type in regedit and press Enter.
If prompted by UAC, click on Yes to continue.
Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
In right-side pane, look for a EnableLUA and set the value to 0 and close Registry Editor.
Restart your computer.
Source: windows10update.com
Then type in XAMPP shell:
setup_xampp.bat
That error could be shown if you already had an older version of XAMPP installed to the default folder (C:\xampp) and you try to install a new version in a specific custom folder.
Just go to the Windows Control Panel, Add or Remove programs and uninstall the old installation of XAMPP.
I can confirm using Windows 10, that the "Windows cannot find -n" message is indeed based on the fact that you are installing XAMPP in a folder which is not c:\xampp.
That is rather a huge oversight for those who distribute XAMPP, they should allow relative paths.
I was trying to set XAMPP in c:\webservers\xampp\ because I'm working with multiple versions of servers for testing and development and well, there goes that idea.
Of course, in the end, I could always just do it myself, and get each bundle I need such as APACHE, mySQL, etc.. And that would mean, not relying on XAMPP.
Anyways, it's a rather stupid flaw, but it is what it is, and it's free, so, you pay for what you get! :)
An alternative to the current answers: I found that installing in a folder with a dash also didn't seem to work for me. E.g. C:\xampp-test\ would still give an error. Changing it to C:\xampptest\ solved the issue.
I ran setup_xamp.bat once (w/o admin rights) and it did some configuration for XAMPP but that did not help. When I executed setup_xamp.bat again with admin rights, it gave a message "nothing to do!".
While looking at the Apache config I realized it is trying to listen on port 80 and I already had IIS listening on that port. Which was causing the problem.
So I changed httpd.conf to use a different port 8765 (change needed at 2 places)
Also changed httpd-ssl.conf to use a different port 8766 (change needed at 3 places)
Then in XAMPP Control panel > Config > Services and Port Settings > specified same port number for Apache.
Once that was done I was able to start Apache without any error.

wamp server not work but server is online my wamp server 2.4

Wamp server not work but server is online and all service start. my Wamp server version 2.4 .
[http://localhost/] result is blank page. source code not view. please help me now.
To start the WampServer, choose start WampServer from the Start menu; or run wampmanager.exe from the WampServer installed directory. An icon will appear on the icon tray. Green icon indicates that all the services have started. Red indicates that all the services have stopped. You can put the server online (so that user can access the server over the Internet) by selecting the option Put Online. Alternatively, you could put the server Offline, such that it is accessible only within the localhostthen verify the server.may be your problem is on port problem. change the port setting (using https://localhost:8080) and upload your files in www directory.
Start your server and then instead of this
http://localhost/
use this
http://localhost:8080
8080 is the port.
before that check weather your port is open
Sounds like Apache doesn't have a path to the PHP interpreter.
Go to System Properties -> Advanced -> Environment Variables -> Path
Add the path to the PHP interpreter at the end of the line. Mine looks like this:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\xampp\php;

Cant add PHP 5 Interpreter on Netbeans

I'm currently trying to add the Codeigniter framework to Netbeans. I followed all instructions to download the plugin as noted here : https://kenai.com/projects/nbphpci/pages/NBInstall , but after all is done and Netbeans is restarted, I try to create a new project but an error comes up saying
PHP Interpreter must be selected
I tried pointing it to my php.exe file found in my WAMP directory C:\wamp\bin\php\php5.3.13\php.exe but still nothing... any ideas? I attached an image where the error shows (in the options window)
You have to localize the php.exe file.
If you are using xampp it is located in c:\xampp\php\php.exe
In case you are using wamp it is located in c:\wamp\bin\php\php.exe
If you see the message above you have to...
Download xampp latest version from http://www.apachefriends.org/en/xampp.html.
After you run netbeans, you get the error message above you should
click the "Browse" button.
Go to xampp folder for example C:\xampp
Click on PHP folder C:\xampp\php
Click on php.exe to tell neatbeans the interpreter directory location. (because it does not come with netbeans package) xampp\php\php.exe
Run Netbeans as administrator
So you can set your path in the php setting

Categories