EzDevInfo.com

wamp interview questions

Top wamp frequently asked interview questions

Get Windows localhost (port 80) to forward to port 8080 for Apache service

Recent Discovery

With IIS set back to port 80, when I put in http://localhost/ on the WHS computer, it gives me the "There is a problem with this website's security certificate" warning page. If I "Continue" anyway, this url comes up https://localhost/Remote/logon?ReturnUrl=%2fremote for a Windows Home Server 2011 Remote Web Access for a username and password. Now, I cannot recall for sure, but I do not believe that originally just a http://localhost/ brought up this issue. However, it seems as though this might affect any attempts to access localhost (no matter the port).

What may actually be the main issue

Oh the intricacies of networking! One thing that kept bothering me was why two of the sites would "partially" come up, and the others not at all. Then, running Firebug's NET tracking revealed to me that my main issue is that my ISP is acting as DNS proxy, and of course it is not finding my test sites. But it does find the two sites that are live at the www. (not test.) address, and appears to serve up those, but the images are blocked because (I assume) I have set up blocks to accessing the image files if not from the www. for the particular site.

That explains the mystery of the images not showing (expect on direct localhost:8080 call) and the odd behavior in "partially" finding those specific two of the five sites.

Now I need to figure out how to correctly configure either my router or a proxy file to redirect to back to my WHS computer. I am on Wildblue satellite internet service, as I am outside the area of any faster service connections. They have an "optimizer" file (I don't know if it is viewable to everyone or not, if not, it is basically the same as this version), that I may be able to modify and put on my local system to achieve what I need, but I am uncertain exactly what I may need to do there.

If anyone has any suggestions on either modifying that file, or how to configure my Linksys E1200 router to avoid sending to the proxy if it is a local site, then that may be the first (and possibly last) step to me solving my issues.

Representative code based on harrymc's recommendations... still not working

IIS port set to :90.

httdp file:

Listen *:80
ServerName localhost:80

vhosts file:

NameVirtualHost *:80
<VirtualHost *:80>
    ServerName localhost
    ProxyRequests off
    ProxyPass / http://127.0.0.1:90/
    ProxyPassReverse / http://127.0.0.1:90/
</virtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/Users/Public/LocalWebsites/site1.net/httpdocs"
    ServerName test.site1.net
    ProxyRequests off
    ProxyPass / http://127.0.0.1/
    ProxyPassReverse / http://127.0.0.1/
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/Users/Public/LocalWebsites/site2.net/httpdocs"
    ServerName test.site2.net
    ProxyRequests off
    ProxyPass / http://127.0.0.1/
    ProxyPassReverse / http://127.0.0.1/
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/Users/Public/LocalWebsites/site3.com/httpdocs"
    ServerName test.site3.com
    ProxyRequests off
    ProxyPass / http://127.0.0.1/
    ProxyPassReverse / http://127.0.0.1/
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/Users/Public/LocalWebsites/site4.com/httpdocs"
    ServerName test.site4.com
    ProxyRequests off
    ProxyPass / http://127.0.0.1/
    ProxyPassReverse / http://127.0.0.1/
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/Users/Public/LocalWebsites/site5.com/httpdocs"
    ServerName test.site5.com
    ProxyRequests off
    ProxyPass / http://127.0.0.1/
    ProxyPassReverse / http://127.0.0.1/
</VirtualHost>

Previous Update: What I had believed to be the main issue (may be a sub issue)

How do I make Windows Home Server (running IIS) forward specific localhost URL's to port 8080 so that Apache (not IIS) running on the same machine picks the request up to serve the page?

The c:\Windows\System32\drivers\etc\hosts file has been changed (see below), but I assume that has nothing to do with rerouting to a new port. IIS, I also assume, is picking up the particular test.whatever url request on port 80 and routing to its own local host on the same port.

I downloaded Application Request Routing from a tip on a site I found in researching, but in looking at it, I'm not sure whether it will help or not (my hope was to set up some url based forwarding to port 8080 by it). I am a web designer, not a network wizard. So how all this works is somewhat elusive to me.

A Possible Direction to Go

Based off this link (found after searching more based off erikxiv's first comment below) I attempted the following in IIS as a URL rewrite:

Outbound Rule:

Match: .* (seemed to test okay)

Conditions:

Match Any of... (these seemed to test pattern match okay)

{HTTP_HOST} Matches the Pattern test\.site1\.net
{HTTP_HOST} Matches the Pattern test\.site2\.net
{HTTP_HOST} Matches the Pattern test\.site3\.com

Rewrite Action:

http://localhost:8080/{R:0} (it would not let me put R:1 like the example)

But there appears to still be no forwarding!


The information below is now all background behind the new, above, request.


Background Info

I recently changed an old desktop that was running Windows XP to be a Windows Home Server (2011). The old computer was also the host for local test sites running on an Apache install. Doing some research unveiled that running Apache on a WHS machine would not be as difficult as I first thought (many sites say that the IIS of WHS and Apache would cause issues, but a few I found mentioned no problems at all if set up correctly--basically, make sure there is no port conflict).

So I installed a WAMP (64-bit version) to the WHS computer, and changed the settings in the Apache httpd config file to listen at port 8080 so there would be no conflict with IIS. I set up my virtual host file as on the XP computer, only with the port change as well.

Basically, everything seemed to be running fine (however, see update), except...

The (Original) Issue

While the pages to the local sites pull up fine, and all css and javascript are functioning, every image file is not showing. The path info is correct as evidenced by right clicking and selecting View Image Info (in Firefox... by the way, the images do not show in any browser, so it is not a browser bug).

What I have noticed, however, is that the Type in the image info box is showing text/html, rather than PNG Image or JPEG Image etc. This is in the information below where it shows the path (address) info--in that section, it recognizes that the file itself is of Type either Image or Background.

But despite that fact, it appears that rather than recognizing the correct mime-type (I assume) of the image within the html (actually php generated html), it is instead trying to process the image (whether an img element or a css background-image) as text, and thus giving me nothing! But I cannot figure out why. The mime file controlling the Apache mime-types is correct. The pages have the following headers...

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />

...but those should not be causing the issue (they did not when running on XP, nor do they on the live site).

So I am seeking thoughts on:

  1. Is my analysis of mime-type being the issue correct (based on update, probably not)?
  2. Where else can I look that might be causing the issue, and how to correct it? Could it still be a conflict with IIS on the WHS, and if so, what? Could it be anything in the php (this seems unlikely), and if so, what? What else can I check in Apache?

Updated Info (with more [related?] Issues)

Doing some more messing around, I've come to the conclusion that at least part of the issue seems to be the change to port :8080. First, I came to realize not all was as well as I thought in getting to all my sites. I have this representation in my c:\Windows\System32\drivers\etc\hosts file:

127.0.0.1   localhost
127.0.0.1   test.site1.net
127.0.0.1   test.site2.net
127.0.0.1   test.site3.com
127.0.0.1   test.site4.com
127.0.0.1   test.site5.com

And this representation in my apache vhosts file:

NameVirtualHost *:8080

<VirtualHost *:8080>
    DocumentRoot "C:/Users/Public/Documents/LocalWebsites/site1.net/httpdocs"
    ServerName test.site1.net
</VirtualHost>

<VirtualHost *:8080>
    DocumentRoot "C:/Users/Public/Documents/LocalWebsites/site2.net/httpdocs"
    ServerName test.site2.net
</VirtualHost>

<VirtualHost *:8080>
    DocumentRoot "C:/Users/Public/Documents/LocalWebsites/site3.com/httpdocs"
    ServerName test.site3.com
</VirtualHost>

<VirtualHost *:8080>
    DocumentRoot "C:/Users/Public/Documents/LocalWebsites/site4.com/httpdocs"
    ServerName test.site4.com
</VirtualHost>

<VirtualHost *:8080>
    DocumentRoot "C:/Users/Public/Documents/LocalWebsites/site5.com/httpdocs"
    ServerName test.site5.com
</VirtualHost>

Here's the behavior: site1 and site4 are showing up, but without images. The other three do not show up at all, but give Network Error (dns_unresolved_hostname).

However, if I access the first site in the vhosts on the WHS machine by using localhost:8080 in the url, then the images do show up, and whichever site is first in my vhosts file also shows up (which is expected); however, it does so even if it was one that previously would not (so if I move site2 to the first position, it starts "working" via localhost:8080 call).

I know my image files are returning a 403 (corrected, originally I said 404) error when accessed via test.site4.com syntax in the url, and I suspect that my images are showing up as text/html because the files are returning that error (so I don't think it is a mime-type issue now as much a failure to find the images). But the odd thing is that the paths are correct, and non-image files (javascript and css) are coming up fine.

So in my mind it seems like it maybe something with the port switch to 8080. My issues now are:

  1. Why are my hosts and vhosts files not correctly finding all the sites (is there some other file I need to modify on a Windows Home Server)?
  2. On those sites it does work for, why do the images specifically not get found (with the 403 error, that is "forbidden" I believe, which makes no sense if the other files in the website folders are being allowed access)?
  3. Why does the localhost:8080 access work no matter what in relation to the first two issues?

Some Further Info

A request was made for me to post log files. However, I discovered there were no logs occurring except (it appears) in those instances when I had accessed via the direct localhost:8080 call to the "default" site.

So I turned off the WAMP services, and went to the url's and discovered the same behavior as when WAMP was running. This would seem to indicate that IIS is still controlling the domain names, rather than Apache picking them up (can someone confirm my assumption there?), and thus the issue may well be something still with getting control itself over to the WAMP server.


Source: (StackOverflow)

Getting XAMPP to work with multiple version of PHP

How can I install XAMPP to work with different versions of PHP?

I use XAMPP because some of the scripts are buggy when run in WAMP. I use WAMP because it supports different versions of PHP.

But now I would like to streamline it down to just XAMPP so that my web development would be easier to manage.

Is it possible to configure XAMPP to work with more than one version of PHP? Or is it something that I have to look for in an alternative solution?

Note: I'm running on Windows 7.


Source: (StackOverflow)

Advertisements

How to add new PHP version to WAMP

I'm trying to install PHP 5.3.8 to work with WAMP (Windows).

I downloaded it from the PHP website, copied it in the bin folder, and added this line to wampmanager.ini:

Type: item; Caption: "5.3.8"; Action: multi; Actions:switchPhp5.3.8;

and:

[switchPhp5.3.8]
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: run; FileName: "c:/wamp/bin/php/php5.3.0/php-win.exe";Parameters: "switchPhpVersion.php 5.3.8";WorkingDir: "c:/wamp/scripts"; Flags: waituntilterminated
Action: run; FileName: "c:/wamp/bin/php/php5.3.0/php-win.exe";Parameters: "-c . refresh.php";WorkingDir: "c:/wamp/scripts"; Flags: waituntilterminated
Action: run; FileName: "net"; Parameters: "start wampapache"; ShowCmd: hidden; Flags: waituntilterminated
Action: resetservices
Action: readconfig;

But it doesn't work...

After I edit it and start WAMP, those changes get removed from the ini file.


Source: (StackOverflow)

What is the intel matrix storage manager? and what is IAAnotif.exe doing running in the background?

I have windows 7 and this is running in the background.

Using process explorer, I can see most of the DLLs are named, but two are unsigned called locale.nls an SortDefault.nls. One has no description OLEAUT32.DLL.

What are these files, what do they mean, and should I be concerned if they are lacking descriptions?

I have never heard of an .nls file.

The Intel homepage is no help. Intel(R) Matrix Storage Driver

I would imagine this is part of the whole RAID setup, but I do not even know if I need to be running RAID if I am running WAMP or not.

Is this something I can uninstall, or would it be recommended to keep this? (I have an Intel Atom N450.)


Source: (StackOverflow)

Installing zeromq on Windows 7 WAMP server

I am looking for installing zeromq on my Windows 7 machine for using zeromq with PHP (I am using WAMP server (5.3.4), Apache Server 2.2.17).

I followed the documentation on their site, but I don't know what to do. I installed the zeromq from the following site, then I tried to copy the dll from this site but it's down.

Where can I get the DLL? Am I want to install only the Windows installer from from this link, or is there anything else needed?

I have downloaded the dll from this site http://178.79.157.189/~mikko/win32/php-zmq-win32.zip


I'm using PHP 5.3.4 x64 version and Windows 7 x64. I tried the following steps:

  1. I have installed ZeroMQ-3.2.2rc2~miru1.5-x64
  2. copied libzmq.dll to c:\wamp\bin\php\php5.3.4
  3. copied php-zmq\php53\php53-ts_zeromq-3.2.2 to c:\wamp\bin\php\php5.3.4\ext
  4. enabled the php_zmq extension in php.ini
  5. I restarted the WAMP. It shows

    'c:/wamp/bin/php/php5.3.4/ext/php_zmq.dll' - %1 is not a valid win32 application

What could be the problem?

Again I tried with the Wamp x86(php 5.4.3) version and windows 7 x64

  1. I have installed ZeroMQ-3.2.2rc2~miru1.5-x86.exe
  2. copied libzmq.dll to c:\wamp\bin\php\php5.4.3
  3. copied php-zmq\php54\php54-ts_zeromq-3.2.2 to c:\wamp\bin\php\php5.4.3\ext
  4. enabled the php_zmq extension in php.ini
  5. I restarted the WAMP. It shows

    PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.3/ext/php_zmq.dll' - The specified module could not be found.\r\n in Unknown on line 0


Source: (StackOverflow)

How to create a fake hostname in windows?

I was reading a book and it said that I can setup a fake hostname in windows by changing the file hosts present in C:/Windows/System32/Drivers/etc/ but it didn't say how to do it.

I mean like http://localhost/ directs me to my wamp home folder www I want to type http://something/ and let the browser directs me to a specific folder.

Does anyone has an idea how to do this ?


Source: (StackOverflow)

How to make any IP accessible outside the network

Is it possible to make my internalĀ IP accessible outside the network? Something like 192.168.x.xxx.

If I try my external IP, I get redirected to the website of the company. I'm on Windows and I'm using WampServer. I already disabled my firewall and selected 'put online' from WampServer.


Source: (StackOverflow)

Updated my WAMP Server and MySQL is eating up 580mB of memory

I updated my dev-box's WAMPSERVER, and along with updating PHP and Apache, MySQL updated to '5.6.12'. After doing that, I copied the data folder from my old (5.1.36) install to the new one and now MySQL takes up 580mB which is way too much, since I'm the only person using it (Locally) and there are only 20 or so databases on it, none of which have 'memory' tables.

How can I get this down to a decent amount?

My my.ini:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

[mysqld]

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....


# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

Database info:

Storage Engine  Data Size   Index Size  Total Size  
InnoDB           48.00 KB             0.00  B            48.00 KB
MEMORY            0.00  B             0.00  B             0.00  B
MyISAM          163.64 MB           122.49 MB           286.13 MB
Total           163.69 MB           122.49 MB           286.18 MB

Source: (StackOverflow)

enabling ssl on wamp with startssl on a live site

i am trying to enable ssl on my website i use wamp for a live site, i have read ALOT of tutorials on how to enable SSL but was unable to find any for using certificates from startssl.com

every module that needs to be enabled i believe is enabled, i currently even have

Include conf/extra/httpd-ssl.conf

un commented in my httpd.conf, but have commented EVERY line in my httpd-ssl.conf for the sake of my site running.

i have gone through each line individually in my httpd-ssl and commented lines 1 by 1 checking and i dont seem to have any issues until i un comment the virtual hosts line (yes i did this saving and restarting my server every time)

I have no idea whats going on here though, i have the 4 files i saved from startssl, the crt is for my site... so im hoping someone here may be able to help. below is my httpd-ssl.conf

SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLPassPhraseDialog  builtin
SLSessionCache         "dbm:Z:/wamp/logs/ssl_scache"
SSLSessionCache        "shmcb:Z:/wamp/logs/ssl_scache(512000)"
SSLSessionCacheTimeout  300

Listen 443

AddType application/x-x509-ca-cert .crt  
AddType application/x-pkcs7-crl    .crl  
SSLPassPhraseDialog  builtin  
SSLSessionCache        "shmcb:Z:/wamp/bin/apache/Apache2.2.11/logs/ssl_scache(512000)"  
SSLSessionCacheTimeout  300  
SSLMutex default  

NameVirtualHost *:443  

<VirtualHost *:443>  
ServerName "dirtrif.com"  
DocumentRoot "Z:/wamp/www/"  

SSLEngine on  
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCACertificatePath "Z:/wamp/OpenSSL/certs/"
SSLCACertificateFile "Z:/wamp/OpenSSL/certs/public.crt"
SSLCACertificateFile "Z:/wamp/OpenSSL/certs/ca.pem"
SSLCertificateKeyFile "Z:/wamp/OpenSSL/certs/ssl.key"
SSLCertificateChainFile "Z:/wamp/OpenSSL/certs/sub.class1.server.ca.pem"
</VirtualHost>

i would also like to note: i run apache 2.4.4 and i have already over writen the files in apache with the openSSL download from http://slproweb.com/products/Win32OpenSSL.html (cause i read somewhere to do that lol)

also my site is actually a live site from my pc, i do have port 80 open, and port 443 is the same setup as 80, put some reason canyouseeme.org doesnt see port 443 =/


Source: (StackOverflow)

XAMPP and WAMPserver

I have been using Wamp with Windows 7 and when I recently upgraded to Windows 8 I have been unable to connect to the localhost. Uninstalling and reinstalling does not work. I also tried to install XAMPP to see if I can use the localhost on there but no. What is it about Windows 8 that is preventing me from doing this?


Source: (StackOverflow)

Aestan Tray Menu crashes and needs to close

I installed WAMP Server. When I click on start WampServer a Pop up window came up, said:

Aestan Tray Menu has encountered a problem and needs to close. We are sorry for the inconvenience. if you were in the middle of something, the information you were working on might be lost.

I have read that the reason can be Skype as it could use the same port, but I uncheck use port 80 and 443 as alternatives for incoming connections but the problem still exists.


Source: (StackOverflow)

MySql database from usb stick

I recently installed a portable WAMP server on my usb stick. Really nice, I can do some php programming on my girlfriend's windows7 laptop without installing anything on it.

I also have a LAMP environnement on my linux computer.

When I plug my usb stick on my linux box, I can easily mount -o bind /usbstick/wwwfolder ~/public_html and work on my php script from there.

But my question is, is there a way I could get the database from my usb stick's MySql server, to run on my linux MySql server? So I can modify data base schema from my Linux workstation, doing some INSERTS in some tables, and then plub my usb stick on the laptop and get my up-to-date database running from the portable environnement?

I don't know where / how MySql stores its databases.

EDIT: Basically, I want to "mount" the database from the usb stick in my Linux' installed MySql server, without extracting and importing the data, so there is just ONE database used for BOTH environnement. Hope this helps clarify the question.


Source: (StackOverflow)

WAMP MySQL service does not start

My question is similar to this. But none of the posted solutions worked.
my.ini file is pasted here. 'mysql.log' is pasted here.

The problem seems to be caused for no reason. I don't remember changing anything specifically.
Apache runs fine. I'm on windows 7 x64.

Most interestingly, mysql.exe runs just fine. No password is on. mysqld.exe doesn't run
(running it through console will just cause an infinite delay)

What I've tried

  • Turning off Firewall
  • Checking port 3306 to be open
  • Checking running services for other instances of MySQL
  • Checking for other installed versions of MySQL
  • Changing password in my.ini
  • Running wampserver as administrator
  • Disabling SQL Server services
  • Uncommenting 'skip-networking' option
  • Switching my computer's networking mode to DMZ (just in case if router firewall issue)
  • Googling and trying every other suggested solution
  • Re-installing wampserver
  • Restarting PC

I don't know what to do anymore. Anyone has a solution?


Source: (StackOverflow)

WAMP: Missing http://localhost/ in urls , wrong wamp projects links

I have a problem with Wamp which never happened to me before, cannot find what's wrong. I have a few projects located in my www folder ( running windows 7 ).

My hostfile has the line 127.0.0.1 localhost uncommented

When I go to http://localhost/ or http://127.0.0.1/ and click on a project name like "mysite" from the main Wamp panel page, the link just points to "mysite" and not "http://localhost/mysite"

Therefore I can't see any sites, what should I do ?


Source: (StackOverflow)

WAMP loaded (green icon), but keep loading localhost or localhost/phpmyadmin without any success

I do not know if it is a virus/trojan horse, but I am not able to use my WAMP.

I mean, I turn off all other program like skype (I know about the port isssues, but this is not this case I guess), email client, so nothing excet default windows programs are installed.

Then I start WAMP and it goes through all stages red->orange->green so I guess everything is loaded properly.

However, whenever I try to open localhost or phpmyadmin it keeps on loading...and loading... but nothing shows up... it says page is loading etc...

Btw. I have a red flag in my windows and if I try to start Microsoft Security essentials I get this message:

The specified service does not exist as an installed service.


Source: (StackOverflow)