I have IIS7 on my computer. It can display html files. But if I put a PHP program in the corresponding folder and then try to open it with the Chrome browser I do not see the expected page. Instead Chrome "downloads" this file. Is it beacuse IIS7 cannot display the PHP files?
Roman's questions
Is it possible? If it is the case, how can I do it? I need it since I want to test communication between web servers on a local network and I do not have a local network. I just have one computer. I use apache on Windows 7.
I am trying to use "dns-sd" command line tool on my Windows 7 machine.
I can already do something. For example I can register a service using "dns-sd -R ...". I also can browser (see) registered services using "dns-sd -B ...". What I still miss, is how to unregister a service.
At the moment when I type "dns-sd -R ..." the dns-sd does not return me to the command prompt. To return to the command prompt I need to press Ctrl-C. And the service stays registered till I press Ctrl-C.
What I want is to run "dns-sd -R ..." in the background regime and then I would like to have a possibility to unregister a service from the command line.
One more thing which I do not understand yet is what "to look up a service" means. In my picture it should be sufficient to register a service, to see it and then to unregister it. But apparently I need to look up a service. What does it mean and why I need to do it?
ADDED: As it is asked, I clarify. I refer to "dns-sd" command line tool which I use in Windows 7. I think this command is part of Bonjour software for Windows (from Apple). Well, I did not checked if I had this command before I installed Bonjour, but I assume I did not have it. So, my question is about this command.
I am a bit lost in the terminology. I wanted to start to use Bonjour. As the first step, I tried to find an easy way to use it. And I thought that I, probably, can call Bonjour from the command line to register and discover services.
When I asked other people how to do it, I was told about mDNS (which works for Mac and Linux but not Windows). People also told me that I can use "dns-sd" (which works on Windows). I was told that "dns-sd" is just an alias for mDNS.
But! Later I found out that DNS Service Discovery and Multicast DNS are two different things (which are compatible and work especially well when are used together but they do not require each other).
Moreover, it seems to me that mDNS and DNS-SD are two of three main components of Bonjour. Is it right? Can I use them without Bonjour? On my Windows 7 I have installed Bonjour and I was able to run "dns-sd" in the command line. But I am unable to run mDNS.
So, I am kind of confused at the moment. Can anybody, pleas, clarify the situation a bit?
I am trying to start to use Bonjour. Here I found a manual how to register a service with Bonjour. The following is written there:
The network services architecture in Bonjour includes an easy-to-use mechanism for publishing, discovering, and using IP-based services.
Well let's see how to register a service. In the very beginning it is written:
To publish a service, an application or device must register the service with a Multicast DNS responder
But how?!?! First of all I do not know what is the Multicast DNS responder. Second, it is not written how do I do it. Where and what should I type? Should I use command line? Should I use some programming languages? What exactly should I type...
Is there an easy way to start to use Bonjour? Well, it was emphasized several times how easy it should be to use it. But I cannot start to use it for several day.
So, can anybody, pleas, help me with that?
I mean, why IP addresses are not sufficient? We can identify devices by their IP addresses. Why do we want to use hostnames? To identify devices?
I know that IP addresses are assigned in a random way (from a certain range). What about the host names? How are they assigned?
I just want to have a table in which a first column is a monotonically increasing unique integer number. For example, if I have a table with 5 rows the indexes of the rows should be 1,2,3,4,5. And if I add a new row it gets index 6.
I am alway confused with this things because there are many related options: "auto_increment", "primary key", "unique", "index". What should I use?
First, what exactly Bonjour does (pleas read my guesses written bellow)?
Here I found out that Bonjour enables automatic discovery of computers, devices, and services on IP networks. But I thought that it not only "discovers devices on IP network" it also creates an IP network by assigning IP addresses to devices where Bonjour is running. Am I right?And I still miss the essence. Does it work in the following way? First I connect devices (for example laptops) physically so that they potentially can communicate with each other. Then, let say, on some laptops I have Bonjour running and then, as a consequence, these laptops assign IP addresses to them self in automatic way. So, laptops (where Bonjour is running) build an IP network. Does it work in this way?
Or may be a computer running Bonjour is not considered as a service and it does not broadcast itself just because Bonjour is running on this computer. I mean that the applications running on the computers need to use Bonjour to broadcast themself. So, it is applications that broadcast themself (not computers) and it is not done automatically (application needs to broadcast themself explicitly). Is it right?
How exactly my application can broadcast itself? Can I use command line to register an service (so that all applications using Bonjour knows that a new service appeared)?
Further, I would like to have an application which use the IP network created by Bonjour. For that my application needs to know which devices/services are present in the network. In more details, my application needs to have a list of services. Each service in the list should have a name, the IP address where it is running and the port which is used by the application. Can Bonjour provide this information in some way? If it is the case, how exactly it works. How my program can get this information from Bonjour? Can my program read some file created by Bonjour and containing the above mentioned information? Can I use some commands in command line to retrieve this information?
I have a special interest in accessing the information about services from files, environment variables or commands in command line. These options seems to me to be the simplest! Since in these case I do not need to use any additional libraries to communicate with Bonjour from a particular programming language.
P.S. Pleas ask questions if something is not clear in my question. I will try to formulate my question in a more clear way.
P.P.S. I use Windows 7.
ADDED: I plan to write my applications in PHP. Every computer should run a Apache web server. And I want to use Bonjour to help computer discover each other (computers are working in a local network).
I could find some information on the Internet but it is hard for me to understand this information because of the use of technical words. Could somebody please help me with that.
Did I correctly understand what I read?
Firstly, is a link-local address always an IP address? Moreover, is the link-local address always in the range from 169.254.1.0 to 169.254.1.0?
Secondly, the link-local address is always assigned to a device by itself. In more detail, the device chooses an IP address (from a specified range) and sends this IP address to other devices in the network. If this IP address is not occupied by other devices, it will be taken by the considered device. Is this right?
Do I run it in a command line? Do I run it as a GUI application? I think it discovers resources available through a local network and assigns addresses to the resources. What happens next? Is this information written to some file which I can read by other application? Can I put addresses generated by zeroconf into the address line of my browser and reach the web server (under condition that a web server is running on the resource)?
I will have several laptops which will be used by other side to build a local network. Some of these laptops will be working as web servers and other as clients. I will not have any control over the network (I do not know how it will be build and which IP addresses will be assigned to the laptops). So, I wonder how user of the "client" laptops can find available web servers. Can computers in the network be identified by their names. I mean, the IP addresses will be not fixed, but the names of the laptops should be fixed. Can I use names of the computer to identify the web servers. For example on the client side I open browser with the following address in the address line: http://nameofthe_computer.
I am trying to install php5-sqlite3. In the command line I type:
sudo apt-get install php5-sqlite3
As I result I get:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-sqlite3 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package php5-sqlite3 has no installation candidate
What is happening here and how I can solve this problem?
At the moment I cannot use sqlite from PHP. Probably I need to change something in my php.ini file. In my php.ini file I found 2 lines containing "sqlite":
[sqlite]
;sqlite.assoc_case = 0
Does semicolon in front of the line means that line is commented? Should I uncomment the second line? Should I change the value of the "sqlite.assoc_case" from 0 to something else?
P.S.
I have 2 php.ini files:
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini
which one should I change?
I am trying to use sqlite from PHP. I have the following simple code:
<?php
$db = new SQLiteDatabase("test2.sdb");
unset($db);
?>
As the result of this code (which I execute in the command line "php test2.php") I get:
Fatal error: Class 'SQLiteDatabase' not found in /var/www/test2.php on line 3
Does anybody know how can I make PHP able to use sqlite?
P.S. Here I found out that "SQLite support is enabled by default on a standard Linux PHP compilation starting with PHP 5.0." And I have "PHP Version => 5.2.6-2ubuntu4.6". So, sqlite should be enabled unless the "--disable-sqlite". In my case output of "phpinfo();" does not contain "sqlite" at all.
I know that I can set user's privileges in the following simple way:
grant all on [database name].[table name] to [user name]@[host name];
But how can I see existing privileges?
I need to see data similar to those which are used in grant. In other words I want to know that a given user has a given access to a given table of a given database from a given host.
How can I get it?
I am trying to use IIS7 web server. I found out that I cannot edit (or create) files in this directory. The reason for that is that this directory has read-only permissions. I could change this permissions but I am afraid that it can make a hole in the security of my site. I mean, for example, if this directory has write-permissions that somebody from "outside" can put there some "shit". Or I should not worry about that?
I have enabled IIS7 in Windows 7. It works fine. I can see the default page from my local computer as well as from remote computer connected to the Internet.
Now I would like to do something. I would like to change my index.html. Does anybody know where this file can be located?
I have installed Apache server on Windows 7. When I try to access the server by its IP address I get in Chrome:
Forbidden
You don't have permission to access / on this server.
In IE I get:
The website declined to show this webpage
HTTP 403 Most likely causes:
•This website requires you to log in.
I want to emphasize that I get another message if I type arbitrary IP. So, the server is working it just does not want to show me files.
I checked already ports (port 80 is opened, I think). And in my "httpd.conf" file I have "Listen 80".
At the moment I think that the problem is in permissions to files and folders. Can anybody tell me how can I check the permissions of files and folders, how can I change them (DOS analog of Linux's chmode), and which permission I need to set (so that people from outside can see my files but they cannot do something bad).
Thank you in advance for any help.
I have installed Apache server on my Windows 7 computer. I was able to display the default index.php by typing http://localhost/ in the address line of my browser.
However, I am still unable to see this page by typing IP address of my computer (neither locally (from the same computer) no globally (from another computer connected to the Internet)).
I was told that I need to open port 80. I did it (in a way described here) but it did not solve the problem.
First of all I would like to check which ports are opened and which are not. For example I am not sure that my port 80 was closed before I tried to open. I am also not sure that it is opened after I tried to open it.
I tried to run a very simple web server written in Python. For that I used port 81 and it worked! And I did not try to open the port 81. So, it was opened by default. So, if 81 is opened by default, why 80 is not? Or it is?
ADDITIONAL INFORMATION:
1. In my httpd.conf file I have "Listen 80".
2. This site tells me that port 80 on my computer is opened.
3. I get different responses if I try http://myip:80 and http://myip:81. In the last case browser (Chrome) writes me that link is broken. In the first case I get: Forbidden You don't have permission to access / on this server.
4. IE writes that "The website declined to show this webpage".
I have just installed Apache web server on my computer. I have managed to use it locally (I can open index.php from my computer using my web browser). But I would like to make my web site available publicly. I found out that for that I need to open port 80. I started to do it and now I have to specify to which protocol I need to apply these rules (TCP or UDP). Can anybody, pleas, help me?