php-windows Digest 5 Sep 2001 10:12:57 -0000 Issue 738

Topics (messages 9187 through 9196):

PHP CGI-mode - Problem with Apache ForceType directive
        9187 by: David M. Patterson

In Need of...
        9188 by: chicago23f.yahoo.com

Install issue
        9189 by: Kirk Mitchell
        9193 by: Phil Driscoll

php/apache $remote_addr variable help!
        9190 by: pasupathy
        9191 by: Bryan Kaufman

SNMP Error/Warning Message
        9192 by: Anov Mailoa

Re: opendir trouble (accessing directories)
        9194 by: Michel Laine
        9195 by: Michel Laine

Local Apache
        9196 by: Sichta Daniel

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


Hello everybody.

I'm having a problem with the Apache ForceType directive when running PHP
in CGI mode.

The goal is to be able to use URL like "/local/param1/val1/param2/val2",
have them all run the same PHP script (local), and have the script parse
out the parameters and values (all of this to be more compatible with
search engine 'bots.)

When I do this with PHP as a module, it works fine. When I do it in
CGI-mode though, it results in a 404-not found error. I know that the
Location block that the ForceType directive is in is being processed by
Apache because if I change the access for the block to deny all, I get a
non-allowed error instead.

Here is my configuration:
  Windows 2000 Professional-Sp2
  Apache 1.3.20
  PHP 4.0.6/CGI-mode

The Location block looks like this:
  <Location /source>
    ForceType application/x=httpd-php
  </Location>


Thanks in advance,

Dave

----------------------------------------------------------------------------
David M. Patterson                     Voice:                   714-532-4492
Consulting Software Engineer           Fax:                     253-679-8673
Web/Php Development                    email:     [EMAIL PROTECTED]

         "Artificial Intelligence is no match for natural stupidity"
----------------------------------------------------------------------------





Hello,

This message is being sent to you because you either sent / or requested
this information from me.  We are offering a full or part-time position using our
program.  You can work at home.  I do require that you have a computer and 
are familar with internet/email functions.  As to the salary, that is totally up to
you, as you will be running your own business.  The sky is the limit!  What you
will see represents a totally legal money making business that anyone can do.
You will receive full instructions, and we will always be available to help you 
and answer your questions.  This is a genuine home business.  This is not a 
chain letter, money game, telecom scheme, or any of the multitudes of dubious
"business" offers that come through your emailbox.  This business will generate
an income of $2,000 to $6,000 every month with a part-time commitment.  We do
not make promises that we cannot keep so that is why we GUARANTEE that 
you will make money with our program.  If the above opportunity interestes you 
in the least, and you would like more information about our business, please
contact our customer service department at [EMAIL PROTECTED]
and type "Send Info" in the subject line.  Insert your name with your correct 
email address.  We are successful ONLY if YOU are successful, and therefore
we will do everything in our power to ensure that your relationship with us is a
profitable and successful one.  We look forward to your response.

Best Reguards,
Customer Service
J&H Marketing

[EMAIL PROTECTED]


This message is being sent in compliance with the new e-mail bill: Section 301.
Per section 301, paragraph (a)(2)(c) of S. 1618, http://www.senate.gov/
~murkowski/commercialemail/S771index.html  Further transmissions to you by
the sender of this email may be stopped at no cost to you by sending a reply to
this email address with the word "remove" in the subject line.




  I've installed php4.0.6 on a NT4(sp6a)/IIS4 machine and followed all the
instructions I could find on the matter; application mapping,
extensions_dir setting, etc. I'm getting the following when trying to run a
slideshow:

Fatal error: Call to undefined function: pg_connect() in
F:\inetpub\etgcompanies\fibercom\doc\global.php on line 2

The file noted contains:

<?
$conn=pg_Connect("","","","", "joel");
?>

Any ideas?

Thanks,

-- 
Kirk Mitchell-General Manager    [EMAIL PROTECTED]
Keystone Connect                 Unlock Your World
Altoona, PA  814-941-5000   http://www.keyconn.net





On Tuesday 04 September 2001 9:24 pm, Kirk Mitchell wrote:
>   I've installed php4.0.6 on a NT4(sp6a)/IIS4 machine and followed all the
> instructions I could find on the matter; application mapping,
> extensions_dir setting, etc. I'm getting the following when trying to run a
> slideshow:
>
> Fatal error: Call to undefined function: pg_connect() in
> F:\inetpub\etgcompanies\fibercom\doc\global.php on line 2
>
> The file noted contains:
>
> <?
> $conn=pg_Connect("","","","", "joel");
> ?>
>
> Any ideas?

You probably haven't enabled the postgress extension dll in your php.ini (and 
you may also not have installed the extension).

Cheers
-- 
Phil Driscoll





hello, please help

the  <? echo $remote_addr ?> script won't return the IP address of the
viewer of my remote webpage,
could it be that the remote apache server disallow this, however
the network functions gethostbyname,gethostbyaddr does return the
hostname or ipaddress when used with
the form inputs






--- pasupathy <[EMAIL PROTECTED]> wrote:
> 
> hello, please help
> 
> the  <? echo $remote_addr ?> script won't return the
> IP address of the
> viewer of my remote webpage,

Try
<?php echo HTTP_SERVER_VARS['REMOTE_ADDR']; ?>

also try
<?php echo phpinfo(); ?>

It will tell you all the vars available, and you can
see if register_globals is turned off (which is why
you need to use HTTP_SERVER_VARS[])

Cheers,
Bryan

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com




Title: Glacier
Need help, plz...
 
I get this message on my PHP page after I added SNMP module in my php.ini:
Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none)
 
What's wrong with it? Is it my php.ini or else?
 

Adrianov A.Y. Mailoa, S.T.
System Development

 





Try
$dir_name = "../files";

Paul Kalyakin wrote:

> i've installed Apache 1.3.20 and PHP 4.06
> i've added the following strings to the httpd.conf file
> <VirtualHost 127.0.0.2>
>     ServerName localhost2
>     ServerAdmin [EMAIL PROTECTED]
>     DocumentRoot "c:/inetpub/localhost2
>     <Directory "c:/inetpub/localhost2">
>         Options Includes FollowSymLinks MultiViews
>         AllowOverride None
>         Order allow,deny
>         Allow from all
>     </Directory>
>     ScriptAlias /cgi-bin/ "c:/inetpub/localhost2/cgi-bin/"
>     ErrorLog "c:/inetpub/error.log"
>     CustomLog "c:/inetpub/custom.log" common
> </VirtualHost>
>
> i've created folder c:\inetpub\localhost2 and added string 127.0.0.2
> localhost2 to the HOSTS file.
>
> everything works fine to this point. simple index.html file is shown after
> the http://localhost2 request in browser URL
>
> i've created FILES folder in the c:\inetpub\localhost2 folder and created
> test.php file in the localhost2 folder
>
> =========test.php============
> <?
> $dir_name = "/files";
>
> $dir = @opendir($dir_name) or die( "Directory \"$dir_name\"not found.");
>
> $file_list = "<ul>";
>
> while ($file_name = readdir($dir)) {
> if (($file_name != ".") && ($file_name != "..")) {
> $file_list .= "<li>$file_name";
> }
> }
>
> $file_list .= "</ul>";
>
> closedir($dir);
>
> ?>
>
> <!-- Start your HTML -->
>
> <HTML>
> <HEAD>
> <TITLE>Directory Listing</TITLE>
> </HEAD>
> <BODY>
>
> <!-- Use PHP to print the name of the directory you read -->
>
> <P>Files in: <? echo "$dir_name"; ?></p>
>
> <!-- Use PHP to print the directory listing -->
> <? echo "$file_list"; ?>
>
> </BODY>
> </HTML>
>
> ==============/test.php=============
>
> but when i try to execute this file, i see "Directory "/files"not found."
> What i'm doing wrong ?

--

Michel Laine
Engineer / Network Administrator

SYSTEM TECHNOLOGY SWEDEN AB
Phone:(+46)-8-982255
Fax:(+46)-8-982060
Snail mail: Vretenvagen 2,  171 54 SOLNA,  SWEDEN

E-mail: [EMAIL PROTECTED]
WWW: http://www.systemtech.se






Try
$dir_name = "../files";

Paul Kalyakin wrote:

> i've installed Apache 1.3.20 and PHP 4.06
> i've added the following strings to the httpd.conf file
> <VirtualHost 127.0.0.2>
>     ServerName localhost2
>     ServerAdmin [EMAIL PROTECTED]
>     DocumentRoot "c:/inetpub/localhost2
>     <Directory "c:/inetpub/localhost2">
>         Options Includes FollowSymLinks MultiViews
>         AllowOverride None
>         Order allow,deny
>         Allow from all
>     </Directory>
>     ScriptAlias /cgi-bin/ "c:/inetpub/localhost2/cgi-bin/"
>     ErrorLog "c:/inetpub/error.log"
>     CustomLog "c:/inetpub/custom.log" common
> </VirtualHost>
>
> i've created folder c:\inetpub\localhost2 and added string 127.0.0.2
> localhost2 to the HOSTS file.
>
> everything works fine to this point. simple index.html file is shown after
> the http://localhost2 request in browser URL
>
> i've created FILES folder in the c:\inetpub\localhost2 folder and created
> test.php file in the localhost2 folder
>
> =========test.php============
> <?
> $dir_name = "/files";
>
> $dir = @opendir($dir_name) or die( "Directory \"$dir_name\"not found.");
>
> $file_list = "<ul>";
>
> while ($file_name = readdir($dir)) {
> if (($file_name != ".") && ($file_name != "..")) {
> $file_list .= "<li>$file_name";
> }
> }
>
> $file_list .= "</ul>";
>
> closedir($dir);
>
> ?>
>
> <!-- Start your HTML -->
>
> <HTML>
> <HEAD>
> <TITLE>Directory Listing</TITLE>
> </HEAD>
> <BODY>
>
> <!-- Use PHP to print the name of the directory you read -->
>
> <P>Files in: <? echo "$dir_name"; ?></p>
>
> <!-- Use PHP to print the directory listing -->
> <? echo "$file_list"; ?>
>
> </BODY>
> </HTML>
>
> ==============/test.php=============
>
> but when i try to execute this file, i see "Directory "/files"not found."
> What i'm doing wrong ?

--

Michel Laine






Hi,
My PC is in network. I'm using Apache for developing sites but I don't want
to other people in network access my Apache. What should I change in
httpd.conf file ? Or is it possible to do it ?
 
DAN
 


Reply via email to