new questions about php

Discussion in 'Web Development & Web Hosting' started by kobem, Sep 7, 2007.

  1. kobem

    kobem Megabyte Poster

    791
    1
    50



    1-think that i installed php5 on my computer and supposingly
    this has to run with apache server or iis

    continue ...

    i also installed apache server program and by doing this
    on my computer i am now both client(windows client) and server , with my existing internet connection how many people can connect my apache server?


    however , is it only about internet connection ?

    2- think that i am not a windows client and i am
    a linux client ,, in this case do i have to have apache while running php?


    3- and if i am on a workstation which is linux server installed
    what will occur?










     
    Certifications: CCNA
  2. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259
    Are you nuts ? :D

    Just kidding, your understanding of the concepts seems a little whack !

    A Web or HTTP Server takes the part of a server in a 'client server' type architecture, the browser is the client.

    The server is multithreaded and highly performant, it will support multiple clients unless it fails under load, for example look at DOS attack.

    The communication between client and server is HTTP, this protocol may encapsulate various other formats, mainly HTML which is an open standard, as such there are no real (major) interop issues.

    The browser forms an abstraction layer for the client, therefore its the browser that matters on the client, not the client OS.

    All important processing generally occurs on the server side, PHP is a server side scripting language, it runs on the web server. It can run anywhere in theory on windows or linux, but in this case it will be run by the apache web server.

    I'd really sort out your grasp of basic architecture and networking before you go much further ! :D

    You can use the loopback address 127.0.0.1 or localhost from the HOSTS file to connect from your local client to your local server, effectively you need not use TCP/IP at all as you are on the same machine, but the network stack is used to emulate the real architecture.

    You may need to be careful on Windows as if you have IIS installed you now have two Web servers fighting for TCP/IP port 80 ! A common solution is to configure non IIS web servers on port 8080.
     
  3. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    How many people can connect to your server will depend on your ISP, your router and any firewall you may be running.

    There is no distinction on the Internet (much) between Unix clients and Windows clients.

    If you want to serve PHP driven pages then Apache must be running with the PHP module enabled.

    I don't understand your question 3.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  4. kobem

    kobem Megabyte Poster

    791
    1
    50
    according to your post , i should say that i LOOKED AT THE IIS
    BUT IT WAS NOT ACTIVATED!


    AND what do you mean by i am not both client and server? i am a windows client since i use xp pro and i installed apache server so I AM BOTH CLIENT AND SERVER
     
    Certifications: CCNA
  5. kobem

    kobem Megabyte Poster

    791
    1
    50
    also there is something bad. when i run the
    apache server my CPU GOES UP TO 100!

    will this be the concern not to open the localhost web page?

    ............

    i have dsl modem(wired) and a pc and web

    i think while running apache server , i don't need
    that dsl modem must be open ? (while testing and viewing localhost or php pages)

    i think it must be open when someone tries to connect apache server on my pc?
     
    Certifications: CCNA
  6. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259
    I know ! I said may ! ;) IIS does not come with all Windows OS's and even those that is does come with its not always installed or enabled.


    Where did I say that ? You are creating a client server single machine test/dev environment, its designed to emulate the real architecture of two or more machines.

    Read The post ! :biggrin
     
  7. kobem

    kobem Megabyte Poster

    791
    1
    50
    HEY DMARSH

    "The browser forms an abstraction layer for the client, therefore its the browser that matters on the client, not the client OS."

    what does this mean ?
     
    Certifications: CCNA
  8. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259
    It means the browser acts like a virtual machine or hardware abstraction layer. If you read up on java applets you will hear them refer to the 'sandbox'. The browser becomes the environment for the client portion of the web application, it controls access to memory, disk, IO, etc. The application must conform to the features and settings of the browser, the operating system becomes largely irrelevant as most browsers are cross platform, and they generally try to all implement the same open standards, even the proprietary extensions like plugins are generally written for both linux and windows.
     
  9. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    What is taking all the CPU? It shouldn't go to 100% - this means that you may have misconfigured it.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  10. ffreeloader

    ffreeloader Terabyte Poster

    3,661
    106
    167
    Not to be snooty, but, it means you don't have enough understanding of the basics of how computing works yet to be playing with Apache and php5.

    That isn't saying you can't learn this stuff, but just that you're ignorant of these things right now. You're not alone either. We were all ignorant of these things at one time or another. Those of us who now have some varying degrees of understanding it have spent years learning about about the fundamentals. It doesn't come in a day or two, it takes a lot of reading and study to get to understand all of this.

    I have no idea as to how much technical background you do have, but there's a link at the bottom of this post that may help you to understand how Apache works. If it's over your head, or looks very intimidating because there is so much to learn don't give up. Just start reading and when you come to something you don't understand start putting that term into Google searches (such as "what is a server" or "what is a client", or "what is client-server", etc...) and reading until you come across something which allows you to understand it. That, or buying books on all these subjects, is how all the rest of us have learned about this stuff. I already have a library of more than 140 books on computing and I consider my library to be very small compared to how large it will grow to be after I have been working for a few years. I don't restrict my study to books either. I also Google things constantly. Google is probably my most used learning tool.

    Personally, I have spent an average of 8 hours a day, 6 days a week studying for the last 5 years, and I still consider myself a noob, someone who is just starting to learn and understand. Understand that the average hours for study a day is down quite bit now from what it used to be. I spent 12 - 14 hours a day for the first 3+ years in studying and practicing with hands on, but have had to slow down due to health problems, time spent job searching, and just plain old finally reaching a point where I got burnt out on studying so much.

    When I started out if I screwed something up and it wouldn't work I'd reformat my hard disk and start all over again. I learned something new every time I did it. I recommend that you do the same.

    Apache 2.2 Documentation
     
    Certifications: MCSE, MCDBA, CCNA, A+
    WIP: LPIC 1
  11. kobem

    kobem Megabyte Poster

    791
    1
    50
    if i misconfigured , how it does work ! it works but i can't view
    the localhost test page
     
    Certifications: CCNA
  12. kobem

    kobem Megabyte Poster

    791
    1
    50


    thanks for the advices man!

    but localhost still doesn't work!:x
     
    Certifications: CCNA
  13. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259
    Apache should work out of the box, did it serve the default test html page ?

    http://www.php-mysql-tutorial.com/install-apache-php-mysql.php#apache

    Did it stop serving this page after you changed httpd.conf ?

    How do you know its working if it doesn't serve the test page ?

    IE's progress bar nearly always goes to 50% when the server does not respond this doesn't mean much.

    100% processor usage should never happen on a dev setup like this, something must be very wrong with the install/config.
     
  14. kobem

    kobem Megabyte Poster

    791
    1
    50
    sorry but the main problem is the TEST PAGE ,it is not able to
    open this page!


    YOU SAID SOMETHING MUST BE WRONG BUT WHEN I CHANGE
    THE PHP MODULE LINES APACHE DOESN'T WORK

    IT SEEMS I MADE THE MODULE CORRECT BUT WHY LOCALHOST??
     
    Certifications: CCNA
  15. ffreeloader

    ffreeloader Terabyte Poster

    3,661
    106
    167
    Ummm.... I pointed you right to all the Apache documentation. You will find your answer in there if you will study it out. By your questions it is pretty easy to see you don't understand enough about it to troubleshoot it on your own, or even where to look, so it's time to learn enough to do that. That's the purpose of the documentation. It will walk you step-by-step through doing an install the correct way, and then where to look, and what to look for, if things aren't working.

    Do you just expect everyone else to educate you on everything? Right now you don't even know enough to ask intelligent questions. You need to read/study on your own quite a bit. A forum like this isn't a good format to educate someone on the all the fundamentals. It's a good place to help someone over a rough spot if they get stuck, but they have to know enough to be able to use the advice they are given, and you're not at that point yet.

    Yes, that is tough advice, but that's the way you will really learn what you need to know succeed. It's what all the rest of us have done. I have, and still do, spend days and days researching, reading, and experimenting on some things when running into issues I can't figure out right away. I don't think I have the right to demand answers from other people. I think I need to dig on my own to find things. That's the way I learn, and have learned in the past, the fundamentals of IT.
     
    Certifications: MCSE, MCDBA, CCNA, A+
    WIP: LPIC 1
  16. ffreeloader

    ffreeloader Terabyte Poster

    3,661
    106
    167
    PHP has nothing to do with the default page apache serves up after install. PHP is NOT required to serve an html page.

    This is what I mean about you not knowing enough yet about fundamentals to be messing with this yet. Yes, it's cool and fun to play with servers, but if you get too far over your head, it's completely frustrating. I know. I've been there and done that...
     
    Certifications: MCSE, MCDBA, CCNA, A+
    WIP: LPIC 1
  17. kobem

    kobem Megabyte Poster

    791
    1
    50


    HERE YOU ARE : THE STEPS I DID

    I TELL ALL THINGS FROM BEGINNING

    i downloaded apache 5.2.4 windows binary from apache site
    then i downloaded php5 wndows binary from php.net site.

    after these

    i extracted php5 zip package into F:/php5

    also i created a folder for php files F:/www

    then i installed apache server

    it asked me three things

    i gave names : first localdomain second : test.localdomain
    third : this was the email

    and then i changed php5.ini-recomended to php.ini
    then went to configure apache server i mean
    httpd.conf file

    here is the httpd.conf file content

    This is the main Apache HTTP server configuration file.doc


    in this file i only changed directory and documentroot
    line paths to "F:/www"

    THATS ALL BUT LOCALHOST DOESN'T WORK
    ALSO NO ERROR MESSAGES ARE AVAILABLE
     
    Certifications: CCNA
  18. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    Which is 'not working' in my book.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  19. ffreeloader

    ffreeloader Terabyte Poster

    3,661
    106
    167
    [​IMG][​IMG][​IMG]
     
    Certifications: MCSE, MCDBA, CCNA, A+
    WIP: LPIC 1
  20. zebulebu

    zebulebu Terabyte Poster

    3,748
    330
    187
    Freddie

    You've not been around much lately... :)

    Kobem pops up every couple of months or so with a few posts about some technology he's got himself hopelessly too deep in - seems like LAMP is his latest thang.

    I'm actually starting to think he's one of the other posters on here conducting some bizarre social experiment - I can't read his posts too often as they make mi brayn hert...
     
    Certifications: A few
    WIP: None - f*** 'em

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.