SitePoint Sponsor

User Tag List

Results 1 to 17 of 17

Hybrid View

  1. #1
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WAMP, Apache, PHP & MySQL

    Hi all,

    Ok I hope I can explain this, as I am pretty confused myself.attachment-1.jpgattachment-2.jpg

    I am reading the book 'Build Your Own Database Driven Website Using PHP & MySQL'. I installed WAMP, then installed Apache, PHP & MySQL, seperately (like in the book). After using them for a little while I decided to unistall everything and just use WAMP. Since reinstalling WAMP (about 5 times) I still have acces denied to phpMyAdmin (attachment 1) and my localhost shows a page containing the words 'It works!' (attachment 2).

    I'm hoping someone here can help me sort this out, as I said I'm a bit confused at what's going on, and I'm fairly new to this.

    Thanks.

    Al.

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Allan,

    UNinstall everything - specifically your individual daemons AND WAMP. Restart your computer (to clear the services). Reinstall. I'm not a fan of "canned programs" but WAMP should then reinstall everything.

    The problem you've displayed is that you don't have a root password in MySQL so PHPMyAdmin can't function. Be sure you enter a password (for MySQL when asked.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  3. #3
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply.

    OK, this may sound like a bit of a silly question but how do I delete daemons?

    I have uninstalled everything that I can, but I might have missed something. I reinstalled WAMP, and phpMyAdmin is working but I still have the 'It works!' page for my localhost.

  4. #4
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by allanlud View Post
    ...
    I have uninstalled everything that I can, but I might have missed something. I reinstalled WAMP, and phpMyAdmin is working but I still have the 'It works!' page for my localhost.
    It sounds like you are OK now.

    The "It works" page is just there to show you that the apache server is up. You need to setup a virtual host to point to your site. I don't know if WAMP comes with Webmin? But Webmin is really great for helping to administrate apache; however, I don't want to confuse you, so if WAMP provides a way for you to change/add/delete new websites then you need to make the relevant changes there.
    ictus==""

  5. #5
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea it seems like everything is working but I guess the thing that is annoying me, is when I was using WAMP on it's own the localhost was showing up WAMP's homepage, with server configuration etc. Then (after a few months) I had installed Apache, MySQL & PHP just like in the book, and that way when running Apache it showed the 'it works' page.

    As I said I'm kinda new to this, but what I am trying to achieve now is to have the WAMP homepage up instead of the 'it works' page (which I have no idea how to do).

  6. #6
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by allanlud View Post
    Yea it seems like everything is working but I guess the thing that is annoying me, is when I was using WAMP on it's own the localhost was showing up WAMP's homepage, with server configuration etc. Then (after a few months) I had installed Apache, MySQL & PHP just like in the book, and that way when running Apache it showed the 'it works' page.

    As I said I'm kinda new to this, but what I am trying to achieve now is to have the WAMP homepage up instead of the 'it works' page (which I have no idea how to do).
    Probably the easiest way is to navigate in the file manager to your WAMP directory (default is c:\wamp\www). Open you will see your site files and folders inside this directory. Copy these files and folders and then navigate to your www directory in the path that apaches public or www directory is in the "How to ..." book. You may have to rewrite the permissions depending on what WAMP had mapped the files and folders and what permissions exist on your regular Apache install.

    Steve
    ictus==""

  7. #7
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've just created a sub folder (test-wamp) with an index.html file inside, in the wamp/www/ directory and that seems to work.

    I've typed in localhost/test-wamp/ in the browser and my html file is showing up. So it looks like the directory is still wamp/www/ but I don't know which file to edit to get rid of the 'it works' page and show the default index.php page which was there when I reinsalled WAMP.

    I hope I'm not being too annoying.

  8. #8
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    The 'It Works' page is a single .html file located in your htdocs folder. You have two options:
    1. replace the default apache index.htm(l) folder with your own index file
    2. change your http.conf like:

    Code:
    <VirtualHost 127.0.0.1> ServerName localhost DocumentRoot 'C:\wamp\www\my_site_folder' </VirtualHost>


    You then need to save the http.conf and restart apache. You can restart apache using the WAMP tools, or you may want to try the command line
    Code:
    exec("C:\wamp\wampmanager.exe -restart");
    or restart your computer.

    BTW, you are not too annoying, SitePoint is a place for people to learn and share knowledge. You have some challenges that you are trying to sort out, you demonstrate that you are trying to troubleshoot the problem yourself. Feel free to ask more questions if we can be of service.

    Regards,
    Steve
    ictus==""

  9. #9
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, yet again.

    I looked in httpd.conf and the only code I found that looked like it needed to be changed was:

    ServerRoot "c:/wamp/bin/apache/apache2.2.22"

    I changed it to - ServerRoot "c:/wamp/www/" and restarted, but it wouldn't work (WAMP stayed in orange colour).

    After a bit of messing around, I typed 'localhost/index.php' into the browser and it's showing the WAMP homepage. So I think I'm happy enough with that, it's all working, not exactly how I wanted it, but it's working.

    Thanks for your help Steve.



    Also in the httpd.conf file I saw these, looks like all other directories are pointing to c:/wamp/www/

    ServerName localhost:80
    DocumentRoot "c:/wamp/www/"
    <Directory "c:/wamp/www/">

  10. #10
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    I run apache and mysql in Linux, so I am not that familiar with the WAMP configuration although a little more familiar with LAMP which is similar. When trying to help I search in google for WAMP a virtualhost configuration and most links I found seemed to refer to a section in the http.conf that contain at least one host directive; normally in Linux installs the virtual host and host directives are at the bottom of the conf. You are likely to find the directive that maps to the host there somewhere.

    If you have not already done so, I would recommend that you restore the ServerRoot "c:/wamp/bin/apache/apache2.2.22" as this is mapping to the apache executable, without this if you reboot your machine you may find that WAMP doesn't work at all as it won't be able to find this executable to start.

    I found this thread Creating Virtual Hosts on WAMP Server where the blog suggests that you will find the host configuration in C:\wamp\bin\apache\apache2.2.11\conf\extra and open the file “httpd-vhosts.conf". If this is true in your WAMP install then you will likely find the existing host directive there.

    Regards,
    Steve
    ictus==""

  11. #11
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea I have changed the ServerRoot back to what it was. I looked in C:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhost.conf and changed some of the code like it says in that link you gave me, but still ends up with the 'It works' html page.

    Thanks for all your help, I'm sure if I was more knowledgable about this stuff, I would have sorted it a lot sooner.
    Attached Files Attached Files

  12. #12
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by allanlud View Post
    Yea I have changed the ServerRoot back to what it was. I looked in C:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhost.conf and changed some of the code like it says in that link you gave me, but still ends up with the 'It works' html page.

    Thanks for all your help, I'm sure if I was more knowledgable about this stuff, I would have sorted it a lot sooner.
    Yes the conf file you attached is not causing the wrong route as these are both bogus virtual host settings. Can you trace in your WAMP's http.conf where the virtual host or any host directives are located? Can you also open your tasks and then switch to the processes view and post a screen shot of the apache processes that are currently active? Can you also go into the admin interface of WAMP and select the http.conf their and scroll to the bottom of this file and copy any virtual host items that you can see?

    Regards,
    Steve
    ictus==""

  13. #13
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just another quick question. It's to do with the database upload size in phpMyAdmin.

    It was set at about 2MB. I found this on the internet:

    Find:
    post_max_size = 8M
    upload_max_filesize = 2M
    max_execution_time = 30
    max_input_time = 60
    memory_limit = 8M

    Change to:
    post_max_size = 750M
    upload_max_filesize = 750M
    max_execution_time = 5000
    max_input_time = 5000
    memory_limit = 1000M

    I went to the php.ini file located in the wamp folder - wamp/bin/php/php5.3.13/ (changed it and nothing happened)

    I eventually changed the php.ini file through the WAMP icon at the bottom of the screen and now it works (I can upload my db which was over 2MB). Is that strange or normal?

  14. #14
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Steve,

    Thanks for replying, I was away all weekend and couldn't get to my PC. I have just started up WAMP and clicked localhost and now it's on the WAMP server homepage. I haven't changed anything since I was last on. (Not that I can recall anyway).

    Looks like it's all sorted now.

    Thanks for your help Steve, really appreciate it.

  15. #15
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is a phpinfo() page already installed with WAMP. I've looked at it and the directory under 'Loaded Configuration File' is different to the php.ini file I had changed.

    Here is the 'Loaded Configuration File' path - C:\wamp\bin\apache\apache2.2.22\bin\php.ini

    The file I had changed was C:\wamp\bin\php\php5.3.13\php.ini

    Thanks Steve. It's helping me understand where everything is and how it works. Does it matter that both those php.ini files are changed (they're both the same anyway).

  16. #16
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by allanlud View Post
    Does it matter that both those php.ini files are changed (they're both the same anyway).
    Hi,

    Only the php.ini file listed in your WAMP phpinfo() page, the other php.ini is not doing anything )other than confusing you ). The Apache configuration files define the path to what php.ini file is used at any given time.

    Glad this becoming clearer for you!

    Regards,
    Steve
    ictus==""


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •