PHP wont work in apache or iis - php

I have spent two weeks trying to get PHP installed, I want t use it to interface to MYSQL.
I first installed MYSQL and got that running perfectly OK and created a small database to record information about my family tree.
I then installed PHP manually and took some sample code from a tutorial to display Hello World, I could not get the PHP element to work, I inserted some HTML code at various points in the file, all of which displayed as expected, I also inserted a chunk of javascript to display time and date, that also worked fine, but the PHP code not even giving an error message still would not display hello world.I then installed XAMPP, but did not include MYSQL as it was already running perfectly well. , but when I came to start XAMPP control panel Apache started fine but it did not recognise that MYSQL was already installed, and I could find no way of telling it where MYSQL was installed. So I uninstalled XAMPP and MYSQL and (I think) PHP and then reinstalled XAMPP selecting all the options.
This time Apache will not start on some occasions not giving any error on others giving the following error:
Error:
Apache shutdown unexpectedly. 12:19:11
[Apache] This may be due to a blocked port, missing dependencies, 12:19:11 [Apache] improper privileges, a crash, or a shutdown by another method. 12:19:11
[Apache] Press the Logs button to view error logs and check 12:19:11
[Apache] the Windows Event Viewer for more clues 12:19:11
[Apache] Attempting to start MySQL app... 12:19:39
[mysql] Status change detected: running.
I have also installed XAMPP without having MYSQL previously on a laptop apache runs on this OK put still does not display hello world.
I have each time checked the W3SVC service and stopped it where necessary.
I am completely stuck as of now and have no idea how to proceed. I am retired 5 years, before that I worked 45 years in IT and am proficient in SQL and understand the documentation on PHP reasonably well, everything on the internet indicates put echo "Hello World" between tags and it should just happen, any help would be appreciated, all I really need is to get PHP running.

Try this:
Press Window + R, type: services.msc
Find World Wide Web Publishing Service and Stop it !

Related

Xampp is bringing apache and mysql not found when i run the control exe

I have been using xampp for a while and suddenly it brings error for apache and mysql:
"Apache or mysql shutdown unexpectedly This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method. Press the Logs button to view error logs and check the Windows Event Viewer for more clues. If you need more help, copy and post this entire log window on the forums". A second attempt to retry will bring "apache/mysql not found".
I check both apache and mysql bin folder and i notice it removes httpd.exe and mysqld.exe this files automatically for some reason. I have tried several troubleshooting like un-installing and re-installing completely but its all been futile.
I manage to tweak it by creating a cmd file that copies this files (httpd.exe and mysqld.exe) where they are needed in xampp folder before i run xampp which seems to be working fine but i believe it shouldnt be so and i need to find out the reasons this files get removed on my pc. Any help and suggestions is highly welcomed.
check any third party antivirus software?
Kaspersky Enterprise v10 killed my WAMP installation on win10 a few months back...
Bit more complicated but ...
if that does not fix it, you can run disk mon.. a Microsoft tool, wait for it to happen again an find the process ID in the disk mon log, that matches your file and look for the process in task manager to see what program did the delete...
https://learn.microsoft.com/en-us/sysinternals/downloads/diskmon

error in apache starts xampp version 5.6.30

Good Morning!
Dear php master how do I fix this error? This happened on a laptop where I have installed x.ampp version 6.5.30, the following mistakes:
Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check the Windows Event Viewer for more clues.
If you need more help, copy and post this entire log window on the forums.
Thanks in advance.

xampp--apache app fails to start

I am new to php. please help me out. i have a xampp installed on my windows. when i am trying to start apache service it throws me the error. Tried to track the error in apache error log which says "www.example.com:443:0 server certificate does NOT include an ID which matches the server name" and on the control panel i get red lines
Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method
I searched over the internet and found over lot of solution but none of them worked for me.
i am using windows 7 - 64bit

PHPmyAdmin Login Error every Monday morning

I have been everywhere looking for answer to this, so here is the problem.
We have a MySQL server 5.0 running on a windows server 2003. We have Apache 2.2.3 and PHP 5.2 installed.
EVERY Monday morning, when logging into http : // hostname / phpmyadmin I get the following:
phpMyAdmin - error
#2003 - Can't connect to MySQL server on 'localhost' (10055)
So, I havent been in my role for too long, and not a SQL expert or anything. My manager and the person I had replaced have not been able to find a solution to the problem.
I will just add, that If I were to upgrade to mySQL 5.5 or the latest versiom, I have to go through a whole series of meetings and other management stuff. I also cant reboot the server, or restart mySQL as it doesnt restart correctly, and this is a production system - my ... is on the line :)
Here is the strange part, the login will work later in the day, say after 12:30pm. This happens every week, same time and works at the later time.
Seriosuly, some help on this issues would be great.

XAMPP Apache and MySQL services not starting or stopping after first installation

Hi I want to start learning PHP and MySql and also polish my knowledge of Javascript witch is very limited at the moment having only use jQuery and knowing only the core sintax of the language.I choose to read Learning PHP MySQL and Javascript witch seemed to fit all my needs.
Having always had bad luck when installing something new I immediately hit a dead end with XAMPP 1.7.7.
The server runs corectly when is first installed and I can stop MySQL and Apache from running from the control panel.But if close the control panel and reopen it I get and error.
If when it was first opened I left apache and Mysql opened I get the error Apache Service not stopped [-1] the same goes for MySQL.If the services were close I get the same error that says apache service can't start same for MySQL.
I have tryed multiple instalations and the same thing happens.
I first tought I will install it and live them open so I can start working but sadly it didn't work corectly or I don't know how to run a PHP script corectly.
Here's what I did:
I opened PHPStorm and pasted this little scripped with a PHP extension :
<?php
echo "Hello world";
?>
After that I tried to run it but I get the error "PHP interpretor is not installed".
Shouldn't it have worked if the apache server was running?
You should wait after you stopped apache or mysql to let them clean things up. If you want to force them to end their processes, you can kill httpd.exe and mysqld.exe from task manager and then try starting it from xampp control panel.
Could it be that you are running Skype on the same machine? Its a known issue where Skype takes control over port 80 in order to become a supernode in the Skype network.
Go to Skype and in the "Tools" menu locate subsection "Advanced", option "Connection". There you'll find an option saying "Use port 80 and 443 as alternatives for incoming connections". Uncheck it, click "Save" and try restarting your server.
What OS are you using? Are you using the XAMPP control panel?
In windows press
Start
Run
Type "Services.msc"
Find the "Apache" service
Right click and stop
I find i get this error if i start the apache service without the control panel but try to stop it with the control panel.

Categories