I am currently using Windows XP SP3 with Apache 2.2, PHP 5.3, MySQL 5.1 and XAMPP 1.7.3 installed.
However after installing everything including XAMPP, I could not see the "XAMPP Welcome Page" at all! I only see the Apache default Page "It Works!!" on http://localhost/ . I also tried http://127.0.0.1/ but it gives back the same Apache results. My Apache and MySQL service seems to be running fine on the XAMPP console.
I have also placed a php file under C:\program files\apache\htdocs\test.php and access the page via http://localhost/test.php which works fine! I really can't guess why isn't the XAMPP installed over the Apache.
Can anyone please give some advice on the problem? Thanks.
XAMPP is a standalone AMP solution, so you don't need to install Apache or anything else with it. And if you do, both servers will probably conflict.
You need to either uninstall XAMPP, or uninstall Apache, PHP, and MySQL.
Note that XAMPP needs to be started up through its control panel, accessible from whatever start menu folder it will have created.
EDIT: Also, XAMPP has its own htdocs folder, located in C:\xampp\htdocs
Alternatively you can switch the port of the Apache server that came with your XAMPP installation via httpd.conf. and as it is described here for example:
Just remember to address the corresponding pages via http://localhost:XXXX
XXXX being the new portnummer you picked (for example 8080).
check the port from xampp control panel >config > Apache httpd.conf
then
Related
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.
So I want to use Xampp to control my servers. I already installed Apache2 and now it orverrides localhost.
Whenever i put localhost/xampp/index.php it says OBJECT NOT FOUND.
How would I delete this Apache program, and strictly use Xampp on localhost?
I already tried to change the .conf file to Listen 8000 and when to http://localhost:8000/xampp/index.php
Steps:
Open "XAMPP controll panel and run Apache and MySQL"
create folder www inside xampp\htdocs, if you are on win propably C:\xampp\htdocs, so now you have C:\xampp\htdocs\www\
Create test.php inside C:\xampp\htdocs\www\, now you have C:\xampp\htdocs\www\test.php
Put inside test this: <?php echo 'php works fine.'; ?>
Run this script in browser on link "http://localhost/www/test.php" you will see "php works fine.".
DONE.
Have you started apache by opening up Xampp control panel? If you didn't then it won't work. So open up Xampp control panel from the start menu and click on start where it says apache and then run http://localhost to see whether it works.
Have a look at the :
\xampp\apache\logs\error.log
This might give you an idea, why the XAMPP splash screen cannot be found.
Also, make sure you do not have any IIS or similar programs running, as they might have a conflict with the XAMPP.
You can also check if the port is open or not using the instructions given here..
Cheers.
I might be wrong, but it seems to me that everything on localhost is coming from htdocs, but you don't call it from htdocs in the URL.
I have installed XAMPP in a virtual machine with VirtualBox. I run both Apache and MySql and there aren't any errors.
I can access phpmyadmin from this virtual machine but if I try to run it on the real machine, I can't get it.
I tried to put http://IP of the virtual machine/phpmyadmin but it doesn't work.
If I put only http://IP of the virtual machine I can see a webpage in which it says "It works".
If I try to use http://localhost in the virtual machine I can see a page in which I see "XAMPP" and where I can choose the language in which I want to use it.
I want to use phpmyadmin from real machine.
The screen you get is the real (splash) screen choose your language from there you will be routed to make the basic setup options, then you will see the phpmyadmin link under the subheading "Tools", select it and see what the link is for you
Create a host only network in virtualbox. Configure the network in your guest machine. Then using IP of guest in the host only network
try http://IP/phpmyadmin . It will work if you have installed it correctly.
as you are working on Windows you might have to configure your host file and allocate a different ip for your vm then add a new alias(or change your alias) in your http-xampp.conf
Finally, I realized that I had installed Apache 2.4 in my real machine so the main page that I saw before and could see this: "It works" was from this Apache.
I solved it uninstalling Apache, and now it works perfectly.
Thanks all of you for your answers!
I have installed PHP and its not working in the Apache Webserver.
Steps followed
Installed Apache and tested a sample html file and it worked fine.
Installed PHP and configured in apache.
Created a new php file under httd folder and tried running through the browser but it just opens with the code.
PHP code:
<?php
phpinfo();
?>
There were many recomendations to install WAMP Server. My next step would be that but I just want to fix it.:)
RECOMENDED IS XAMPP http://www.apachefriends.org/en/xampp-windows.html
for your problem if your are running SKYPE On windows make sure you sign out cause they share the same port 80
or any other program that might do the same
I want to start learning php, I install apache 2.2 and I want to run my first.php file, I look for www folder in the installation folder of ApacheSoftwareFoundation but I couldn't find it.
here's the files in the apache
I tried to put my php file in htdocs but it doesn't work , can some one help ?
Edit
Doesn't work means when I make http:localhost/first.php , returns Unable to connect
Now the apache is running, when I open htt'://localhost/
returns "it works"
but when I open any php file, it opens as-is ?!
You'll need to check a couple of things...
Make sure the Web Server is running ,either the service
or the program, is running and that you have the correctly configured the Virtual Directories.
If the web server just outputs the
content of the .php file, it could
mean that you don't have mod_php
installed. Meaning the server does
not have the Mime type registered so
it will just try to treat it as a
text file ...
And as your on windows you might consider using something like XAMPP. It gives you a Full Working AMP (Apache Mysql Php) Stack with one install and a easy control manager to start/stop the servers. Other wise do a couple of Google searches on how to install the php module for your Web Server on Windows
Update
To start the server try executing the executable bin/httpd.exe .
Now the apache is running, when I open
http://localhost/ returns "it works"
but when I open any php file, it opens
as-is ?!
A default installation of Apache on windows does not include the necessary modules to run PHP. After installing Apache, you must either:
Install PHP separately and follow the instructions described here to configure Apache to use the installed version of PHP to serve .php files. I've been through this and took me hours to get every thing to work.
Recommended for you: uninstall Apache; install WAMP instead.
if you look in your httpd.conf file you will find the default root directory, it doesnt have to be called www. It is the htdocs by default.
error 500 covers a whole host of things. from compile error, to permissions.
Have you put a simple file of
<?php
echo "test";
?>
As your test php page to rule out other issues?
You need to:
Construct your URI correctly: http://localhost/first.php (with the //)
Ensure that Apache is running
all files in htdocs can be referenced from outside
Just put a basic file named index.php
and visit site http://localhost/
In general type in http://localhost/filename
You say that you get a connection error when you try to go to your webpage. Since it looks like you're using Windows Vista or 7, make sure you're running Apache as an administrator; it can't bind to port 80 otherwise. Also check that other programs like Skype aren't binding to port 80. If you still can't find the problem, check the error log. (logs/error.log by default I think)
The problem is that Apache was installed but not started
If you are using xampp start it and then start apache through control panel
for others look for similar instruction