Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

WAMP on my laptop

Options
  • 01-02-2012 10:19am
    #1
    Banned (with Prison Access) Posts: 3,455 ✭✭✭


    I just downloaded and installed WAMP on my laptop - (I'm running Vista Win 6 - I know, I'm a girly man)

    Mysql service is running - I can toy with it through the command line.

    Apache seems to be running - typing 'localhost' in my browser displays the index page from the WWW folder - I assume it's being served to me.

    The PHP server, does not seem to be working. I've never tried running a PHP server before. And it's also an age since I set up and Apache server.

    When I click on PHPMyAdmin link on the WAMP index page, I get a 403 Forbidden
    You don't have permission to access /phpmyadmin/ on this server
    Is that Vista screwing with me, or is it something I need to configure in Apache?

    Is there a command line method of playing around with Apache, and the PHP server?.........I'm more comfortable with that kind of thing.


    Also, before installing WAMP. I have a MySql on my machine. WAMP didn't prompt me for any changes to MySql...And when I logged onto it used the same user/password for root access.


    I know Vista isn't ideal.

    Any tips?


Comments

  • Registered Users Posts: 15,065 ✭✭✭✭Malice


    There is no PHP server as such, the server is Apache. PHP is a module which will interpret files ending in .php per the Apache config file.
    The usual way I check if PHP is running is to dump this to test.php

    [PHP]<?php
    phpinfo();
    ?>[/PHP]
    and save it to the wamp\www folder. Then make sure WAMP is running (run wamp\wampmanager.exe). If it's configured to run on port 80 then make sure you don't have IIS running on port 80 at the same time. Anyway, you should just be able to go to http://localhost/test.php and see a load of information about your PHP setup.


  • Banned (with Prison Access) Posts: 3,455 ✭✭✭krd


    Malice wrote: »
    There is no PHP server as such, the server is Apache. PHP is a module which will interpret files ending in .php per the Apache config file.

    I was kind of half expecting the PHP interpreter to run as a service. And one reason I though this is when I do the port test in Wampmanager, I get Your port 80 is used by: Apache/2.2.21 <Win32> PHP 5.3.8

    I've just realised that the port test is php.exe - though I can't see what arguments have been sent to it. I've found php.exe, and have been experimenting with the command line switches to see what it'll do. php.exe -i gives me a huge amount of information.

    The Apache server is running, and MySql is running too.

    Where does Apache get it's authorisations and privileges? Is it from Windows? Vista can be picky about privileges - you're not automatically administrator or root.
    The usual way I check if PHP is running is to dump this to test.php

    [PHP]<?php
    phpinfo();
    ?>[/PHP]
    and save it to the wamp\www folder. Then make sure WAMP is running (run wamp\wampmanager.exe). If it's configured to run on port 80 then make sure you don't have IIS running on port 80 at the same time. Anyway, you should just be able to go to http://localhost/test.php and see a load of information about your PHP setup.

    I can't find IIS on the machine anywhere, and I don't think it's running. I'm nearly sure Apache is functioning on port 80. MySql seems to working happily away.

    I'm chipping away at it. I've just been reading through the php.ini file - that's kind of interesting.

    I've done a 'hello world' using the PHP echo - and that seems to have worked. But the phpinfo(); function is not returning anything.

    I've even tried using PHP.exe on the command line - it seems to interpret php code into text/html - or it will process a file. But the phpinfo(); just doesn't return anything.

    So, I pretty sure Apache is working, and nothing is jamming the port. PHP seems to be interpreting - but it's not completely working.


    =============================================

    I think all of my WAMP stack is working. Other PHP functions are working - just the phpinfo(); isn't. I think this is because of some privilege my user status doesn't allow me.


  • Registered Users Posts: 15,065 ✭✭✭✭Malice


    Can you post up the code of the PHP file that is working? I'm not sure where Apache gets its privilege settings from, I've never had to mess with it to that extent.


  • Moderators, Technology & Internet Moderators Posts: 11,015 Mod ✭✭✭✭yoyo


    Try taking ownership of the WAMP directory (Right click on WAMP folder>Properties>Security>Edit and grant your user "Full Control"), you never know, may solve it. I use XAMPP myself personally, used WAMP before and had minor issues with it, can't remember what it was a while ago

    Nick


  • Banned (with Prison Access) Posts: 3,455 ✭✭✭krd


    Malice wrote: »
    Can you post up the code of the PHP file that is working? I'm not sure where Apache gets its privilege settings from, I've never had to mess with it to that extent.

    This is my first crack at PHP so I can't do anything fancy yet - gettimeofday(); works.

    And with a little experiment I have found that:
    <?php 
     phpinfo(); 
    ?>
    
    Doesn't work for me.
    But
    <?php 
     phpinfo(1); 
    ?>
    
    Does work.

    So my PHP interpeter is working. Just the phpinfo function won't work for me without an argument.


  • Advertisement
  • Banned (with Prison Access) Posts: 3,455 ✭✭✭krd


    yoyo wrote: »
    Try taking ownership of the WAMP directory (Right click on WAMP folder>Properties>Security>Edit and grant your user "Full Control"), you never know, may solve it. I use XAMPP myself personally, used WAMP before and had minor issues with it, can't remember what it was a while ago

    Nick

    Yep. I just took a look at those settings. I think that's where Apache on Windows gets it's privileges.

    Vista is a bit of a pain, in that it the user isn't automatically granted administrative privileges. Which can be annoying if some time you're trying to kill a process and message comes up telling you, you don't have administrative rights to kill it..."It's my f'ing machine - of course I have the right kill any process running on it"


    The links for phpmyadmin, sqlbuddy, and webgrind, on the index page that installs with WAMP, don't work - they give me a "Forbidden You don't have permission to access /phpmyadmin/ on this server." But when I check for folders on the machine, they don't exist. I'll look them up and see if I can install them a different way - maybe they're useless. But it had me very confused.


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    krd wrote: »
    yoyo wrote: »
    Try taking ownership of the WAMP directory (Right click on WAMP folder>Properties>Security>Edit and grant your user "Full Control"), you never know, may solve it. I use XAMPP myself personally, used WAMP before and had minor issues with it, can't remember what it was a while ago

    Nick

    Yep. I just took a look at those settings. I think that's where Apache on Windows gets it's privileges.

    Vista is a bit of a pain, in that it the user isn't automatically granted administrative privileges. Which can be annoying if some time you're trying to kill a process and message comes up telling you, you don't have administrative rights to kill it..."It's my f'ing machine - of course I have the right kill any process running on it"


    The links for phpmyadmin, sqlbuddy, and webgrind, on the index page that installs with WAMP, don't work - they give me a "Forbidden You don't have permission to access /phpmyadmin/ on this server." But when I check for folders on the machine, they don't exist. I'll look them up and see if I can install them a different way - maybe they're useless. But it had me very confused.

    Those are virtual directories under WAMP - i.e. they're not in the htdocs folder.

    Try them with the index.php suffix

    And check if there are any spaces in the install location path - you sometimes need quotes around these in config files to get them to work


  • Registered Users Posts: 15,065 ✭✭✭✭Malice


    Liam Byrne wrote: »
    And check if there are any spaces in the install location path - you sometimes need quotes around these in config files to get them to work
    That was going to be my next suggestions :). I've always had WAMP installed to something like "C:\dev\wamp" or "c:\programming\utilities\wamp" so it hasn't been an issue but it is entirely possible.

    Also have you got the right version of WAMP to match the operating system as in 32-bit if you're running 32-bit Vista? I assume the installer would just refuse to run if not but then I don't have much exposure to Vista.


  • Banned (with Prison Access) Posts: 3,455 ✭✭✭krd


    Malice wrote: »
    That was going to be my next suggestions :). I've always had WAMP installed to something like "C:\dev\wamp" or "c:\programming\utilities\wamp" so it hasn't been an issue but it is entirely possible.

    Also have you got the right version of WAMP to match the operating system as in 32-bit if you're running 32-bit Vista? I assume the installer would just refuse to run if not but then I don't have much exposure to Vista.

    Yeah, is 32 bit vista - and it's a 32 bit installation of WAMP. I also installed it to C:\WAMP

    Most of it's working I'm surprised with how relatively painless it's all been.


  • Banned (with Prison Access) Posts: 3,455 ✭✭✭krd


    Liam Byrne wrote: »
    Those are virtual directories under WAMP - i.e. they're not in the htdocs folder.

    Try them with the index.php suffix

    And check if there are any spaces in the install location path - you sometimes need quotes around these in config files to get them to work

    You're right. There's an Alias set up in Apache for them. I think I need to edit the alias .conf files to get them to work for me. But I've found them. The exist and I'm being denied access to them for some reason. I'll be able to fix it, or find my way around it, or use brute force and barbarity.


  • Advertisement
  • Registered Users Posts: 1,477 ✭✭✭azzeretti


    krd wrote: »
    You're right. There's an Alias set up in Apache for them. I think I need to edit the alias .conf files to get them to work for me. But I've found them. The exist and I'm being denied access to them for some reason. I'll be able to fix it, or find my way around it, or use brute force and barbarity.

    Click Start->All Programs->WAMP->Start WAMPServer. This will put an icon in your systray. From there you can click and scroll to edit/create aliases through a DOS screen with prompts and tips etc.

    You may also have to enable modules for PHP. This can also be done in the WAMP icon context menu (scrolling and click to enable/disable). If fact, you can do most things from there. Not sure how it will play with Vista though especially with the way it implemented UAC.

    After playing with it for about 10 minutes I skipped Vista and either rolled back to XP or waited for 7. Of course, that was then, now I just avoid Windows, but that isn't going to help you!


  • Banned (with Prison Access) Posts: 3,455 ✭✭✭krd


    azzeretti wrote: »

    After playing with it for about 10 minutes I skipped Vista and either rolled back to XP or waited for 7. Of course, that was then, now I just avoid Windows, but that isn't going to help you!

    Yeah, I know. But for the minute all I've got is Vista. I'll probably try to get my hands on a second machine somewhere. I'm not going to defend Vista. It's not atrocious. I've lived through several generations of Windows, it's not as bad as the past.


    I got /phpmyadmin/ working. Though I had to get into the phpmyadmin file and add my SQL password, as it would prompt me, and just refused the connection. I also had to get into another file and edit it to allow localhost access it. .........I'm new to PHP, and MYSQL, but not so much everything else. Whatever happened with my installation, you could be really screwed if you were a novice user.

    Haven't got Sqlbuddy, or Webgrind to work yet. It's Vista screwing with me. It's the permissions on file sharing.


  • Registered Users Posts: 5,246 ✭✭✭conor.hogan.2


    Virtualbox and Ubuntu and you will be up and running in no time.


  • Banned (with Prison Access) Posts: 3,455 ✭✭✭krd


    Virtualbox and Ubuntu and you will be up and running in no time.

    That reminds me. I have VMWare and a bunch of different Linux distros. I could put a LAMP on a USB. Though, I'm getting on okay with what I have at the minute. The last time I tried to Apache/MySql/PHP I gave up defeated pretty early on. This time around, nearly everything has run really smoothly for me. I'm surprised how light the servers are on my machine.

    Though I think Windows is pretty awful for this kind of thing. It has a habit of playing tricks on yah.


Advertisement