Cannot Start Wamp Server - php

For some unknown reason I cannot start WAMP server - The icon stays yellow no matter what:
Checked port 80, and it's not used.
No Skype, no Firewall.
Tried MANY solutions I suggested here in stackoverflow - absolutely nothing.
Tried to uninstall and reinstall - it worked for 10 minutes, then it didn't work again.
The only thing I'm changing is to include Virtual Hosts under httpd.conf. Checked every solution I could find on the net - nothing is working for me.
Maybe, just maybe it's because I previously installed PHP 5.5 apart from WAMP? If I go to PHP > PHP Extensions > then I can see there's a problem in php_opcache and php_enchant. When I click on them I get an error message that says: Could not execute menu item (internal error). [Execption] Could not perform service action: the service has not been started. The PHP Version I installed is 5.5.15. The PHP WAMP is 5.5.12... I don't have a clue how to uninstall PHP, and I couldn't find anything about that on the net.
PHP Error log says: PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - %1 is not a valid Win32 application. in Unknown on line 0
EDIT - It seems like the cause for the problem is me trying to include Virtual Host via httpd.conf file. When I excluded, like in default, WAMP is online again. Any suggestion of how to include virtual host and still get WAMP get online?

It looks like you're running on a corrupt install have you tried reinstalling the software?
Alternatively i would recommend using Xampp which basically offers the same service as Wampp only with a bit more ease of access (also allowing for Mecury mail service and an FTP server for remote access).

The problem with php_intl can be corrected easily, see this answer
In order to find out what Apache is complaining about with the Virtual Hosts definition look at the Windows Event Log or, launch a command window and
cd \wamp\bin\apache\apachex.y.z\bin
httpd -t
This should give you filename and line number where your errors are.

Try changing that port number anyway. Mine stays yellow if the port number is set to 80, even though WAMP says it's not being used by any other program.

Related

Apache in MAMP Pro 4 has stopped working, refuses to start

Have been using MAMP Pro for a fair while - version 3 primarily, upgraded to 4 a while ago.
I haven't had any unusual issues at all, but today the Apache service failed to start, telling me to check the error logs. The logs were blank unfortunately... I've made no system configuration changes, no changes to MAMP/MAMP Pro. Shut down my system yesterday, started today, it no longer works...
I've tried numerous suggestions found via Stack Overflow and Google without any success.
Even after completely uninstalling and re-installing MAMP Pro I am unable to get the service to start.
Nothing appears in the logs...
When starting it manually on the command line it comes up with a PHP related error:
$ Applications/MAMP/bin/apache2/bin/apachectl start
httpd: Syntax error on line 135 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/bin/php/php5.2.17/modules/libphp5.so into server: dlopen(/Applications/MAMP/bin/php/php5.2.17/modules/libphp5.so, 10): image not found
The confusing thing is that I don't have PHP 5.2.17 specified anywhere, at all - according to MAMP Pro it should be using PHP 7.0.12.
If I add PHP 5.2.17 to MAMP using the appropriate MAMP Pro dialogs, Apache still fails to start via the MAMP Pro interface. I can now start it manually from the command line however, but none of my virtual hosts/etc seem to be loaded.
apachectl -V tells me it's using /Applications/MAMP/conf/apache/httpd.conf, but there is nothing in that file that has any reference to any of the configs generated in /Library/Application Support/appsolute/MAMP PRO/conf
It also looks like hosts entries aren't added to /etc/hosts.
Even if I tell /Applications/MAMP/conf/apache/httpd.conf to do nothing but include /Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf (and manually add entries to /etc/hosts) it still doesn't seem to work at all...
I and my colleagues are at a complete loss, especially given it was working yesterday...
Has anyone had any issues like this?
I managed to fix the similar issue you had.
My Apache server was working fine and then following updating to 4.0.6 I experienced similar issues.
There were 2 things I did to fix the issue. I was getting the same error where it couldn't find a php file in 5.2.17. After fixing that by adding 5.2.17 to MAMP I experienced an apache error regarding user permissions.
(22)Invalid argument: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
File > Edit Template > Revert ALL Templates to Default Settings.
Save & restarted the servers and all worked finally and all my hosts had retained as well.
I had previously entered a custom line in my httpd.conf file that for countless versions had copied across fine however it looks like the folder structure had changed and so couldn't locate it causing the unusual error about User permissions. I have since re-entered the custom line with the correct structure and all working fine again.
Hope this helps.

XAMPP in OS X El Capitan - oci_connect(): OCIEnvNlsCreate() failed

This issue started just after I upgraded my Mac to OS X El Capitan. Before that it was working just fine.
I am using XAMPP and Oracle Instant Client was properly set up to connect with Oracle DB. I followed the instructions mentioned here while installing (click on the question "How do I activate the OCI8/Oracle extension for PHP?").
But, after I upgraded my OS to OS X El Capitan, it started to show this warning,
Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that DYLD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries
I am searching for solution all over the internet (not only SO), for the last few days and the nearest match I found was this : https://stackoverflow.com/a/20670810/5645769. So, I tried to edit the file org.apache.httpd.plist, as suggessted by the answer. But I was having this error :
You don't own the file "org.apache.httpd.plist" and don't have permission to write to it. You can duplicate this document and edit the duplicate. Only the duplicate will include your changes.
I asked about that to OP and his reply didn't make any help to resolve the issue. So my search for solutions continued. After a few more days of search, I found this post https://stackoverflow.com/a/32910408/5645769. So I followed the instructions to disable SIP (System Intregrity Protection) and I was then able to add write access to the file and containing folder for my account (and also administrator). After that oci_connect() started working again.
But when I disabled the SIP again following the same answer, the same error comes again. I am not sure, but it seems like there is something happening with other file permissions which oci_connect() is trying to use but it can access only when SIP is disabled.
Currently I am working with keeping the SIP disabled (not sure, what harm it may cause), I need a solution which will work while keeping the SIP enabled.
I am spending many days with this. Any help will be highly appreciated.
/System/Library/LaunchDaemons/org.apache.httpd.plist is only for controlling the behaviour of the Apache server built in to OS X.
To set DYLD_LIBRARY_PATH for the XAMPP version of Apache you'll need to edit its startup script:
sudo nano /Applications/XAMPP/xamppfiles/apache2/ctl.sh
On the second line of the file, after #!/bin/sh you can add whatever you need to:
#!/bin/sh
DYLD_LIBRARY_PATH=/path/to/your/library/files
ERROR=0
HTTPD_STATUS=""
HTTPD_PIDFILE=/Applications/XAMPP/xamppfiles/logs/httpd.pid
HTTPD="/Applications/XAMPP/xamppfiles/bin/httpd -f /Applications/XAMPP/xamppfiles/etc/httpd.conf"
DO NOT disable system integrity protection. It's there for a reason.

Unable to use PHP curl on amazon ec2 free tier

I am currently moving my web app to amazon ec2. Since it's only for testing, I use the free version called ec2 free tier with windows server 2008 instance. However, Although I have done all I know and read this thread ( How to enable cURL in PHP / XAMPP ). I just couldn't use curl on my php script. it always creates the error
Call to undefined function curl_init() in C:\xampp\htdocs\index.php on line 2
Here are all thing I have tried
Install Wamp ( I tried it on XAMPP to)
Uncomment out php_curl in php.ini file ( and restart apache)
Copy two dll files to both system32 and syswow64
Could it have to do with the fact that I am using free vps?
Update:
Also, when I started the apache server in XAMPP , this error appeared
'PHP Startup: unable to load dynamic library curl.dll'
However, I have double checked the ext directory and the php_curl.dll was in there.
i think curl need to access remote sever from our web server. so i opened all traffic in my server outbound rule and it works. i think this is not good solution. still look for better way.
nope.
be sure, that you have the files in the right place, usually its in the plugins folder for php! maybe you cann add a absolute path to your php.ini!
be sure, you edit the correct ini file!
php completly independent to your operatingsystem!
just be sure to doublecheck everything. because its not saying, it has trouble loading your extention, its just saying, the function your trying to call, is not there. so i assume your extention ist not loading at all! :)
One reason I did notice for this cURL plugin to malfunction was the availability of copies of libeay32.dll and ssleay32.dll files. Please check whether your system32 folder has such copies and if so, please rename them to some other names and copy the ones found with the php installation. Sometimes you may need to restart your machine. This was documented here some time ago.
I had a similar problem, but it occours just with requests under https. I tried to create a curl request directly from the ec2 machine and got a error: "curl: (77) error setting certificate verify locations".
It looks like some kind of ssl validation fail because of a certificate not found. So I used a parameter -k (or --insicure) in my curl command, to ignore this validation and after that my curls request did directly from ec2 machine worked.
So I tried to apply a similar ideia in my curl command in php, (I suppoused that the curl php extension forward this requests to the operation system) and I found this curl opt:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
After that it works to me.
Probably this isn't the best way to solve the problem, but solved my problem temporarelly.

Error in Configuration File EasyPHP and WAMP not working

I tried to install both EasyPHP and Wamp but when I start easyphp it starts sql normally but won't let me start apache server and gives error "Error in configuration file Edit?" but the same version works fine on my desktop computer and when I tried wamp it just crashes saying "Aestan Tray menu has encountered.. bla bla". I searched a lot on google but could not find solution to this. Kindly help me removing this error. What could be the possible cause and how could I make it working? I have tried removing Skype too.
I had the same problem and just fixed it.
ALl you have to do is downloading and installing Microsoft .NET Framework 3.5 and if you use a non english windows xp make sure you change the language of .net framework to the one you have on XP before you download it, otherwise it won't be installed
If you use Windows 7 there could also be error with line breaks when you add virtual host via virtual hosts manager.
I had an error with following easyphp response "Error in Apache configuration file ... Synthax error on line 12 of ... conf/inc_virtual_hosts.conf".
To fix this just open [EasyPhp Folder]\binaries\apache\conf\inc_virtual_hosts.conf and add line break where it should be!
# Virtual hosts<VirtualHost 127.0.0.1> - error!!!
DocumentRoot "D:/projects/...
Also you can check [EasyPhp Folder]\binaries\conf_files\httpd.conf - there also can be bad synthax.

Having troubles configuring PHP to work with mySQL

I'm venturing out of the world of .NET and into the world of open-source. However, I've hit a few roadblocks while trying to get my development environment set up. And I'm kind of stuck on the most recent one.
I have installed: Apache 2.2, php 5.3.2, and mySQL 5.1.48
everything is working pretty much; apache is serving up PHP pages, and I'm able to create databases and tables in mySQL, however, I can't seem to get php to communicate correctly with mySQL. My php.ini has these lines un-commented:
extension=php_mysql.dll
extension=php_mysqli.dll
However, I keep getting this error message:
Warning: mysqli_connect(): (HY000/2002): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\mysql_test.php on line 15
any help would be greatly appreciated.
(btw, the php code runs properly when I put it on my web host)
This is most likely a configuration problem with the MySql server. It sounds like it either isn't listening on the correct port or something else is going on with the connection. You have the extensions loaded correctly because PHP is able to find the mysql functions. I would make sure you don't have a firewall blocking any of the requisite ports (actually, just try turning off your firewall and see what happens...just don't forget to turn it back on ;-) ). Also make sure if you are following a tutorial you didn't deviate from the MySQL setup instructions at all. If those don't work, post an update and we can try again.
This looks like bug #45150 : MySQL functions cannot be used with 5.3.x on Vista when using "localhost" -- I've had this problem once, and it took me some time to figure out what was causing it...
If you are working with Windows Vista (and possibly seven ?), and trying to connect to MySQL using "localhost" as host, try to replace that by the corresponding IP address : "127.0.0.1"
Or try to edit the hosts file, and to un-comment the line that corresponds to localhost in IPv4 :
127.0.0.1 localhost
(Remove the # at the beginning of the line)
Or to comment the line that corresponds to localhost in IPv6 :
#::1 localhost
(Add a # at the beginning of the line)
And here's an interesting article about that : PHP 5.3 and MySQL connectivity problem
Use XAMPP - it'll remove any headaches like this for local development.
XAMPP is a very easy to install Apache Distribution for Linux, Solaris, Windows and Mac OS X. The package includes the Apache web server, MySQL, PHP, Perl, a FTP server and phpMyAdmin.

Categories