php-windows Digest 22 Jan 2002 14:40:58 -0000 Issue 964

Topics (messages 11543 through 11553):

Re: problem running php4.0.6 and apache1.3.22 on winXP
        11543 by: SomeGuy

Re: Apache 1.3.22 and PHP 4.1.0
        11544 by: SomeGuy

Include()
        11545 by: John (News)
        11546 by: alain samoun
        11547 by: Shrock, Court
        11549 by: alain samoun
        11550 by: John (News)

php_pear.dll
        11548 by: John Moeller

Session and Header function
        11551 by: ST Ooi

New Metabase Aniversary release
        11552 by: Manuel Lemos

Re: [PEAR-DEV] New Metabase Aniversary release
        11553 by: Lukas Smith

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]


----------------------------------------------------------------------
--- Begin Message ---
instead of php4.c just use
LoadModule php4_module C:/php/sapi/php4apache.dll
and then offcourse register the file types
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php .phtml
    AddType application/x-httpd-php-source .phps
i am using the same configuration and it works for me
"Rui Nuno Castro" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I installed php4.0.6 and apache 1.3.22 (as a service) on windows XP and
> followed the instructions to configure the httpd.conf file to load php as
an
> apache module (including the AddModule mod_php4.c instruction). I have
also
> copied the php4ts.dll file to the
> windows/system32 directory, but when I try to run any php script with the
> browser, I only get a blank page. It seems that apache doesn't send the
> script for interpretation by php (even though apache is loading the php
> module). Can anyone tell me what's wrong?
>
> Thanks,
> Rui
>
>
>
>


--- End Message ---
--- Begin Message ---
i don't really see why you would even try to unload mod-php4.c since apache
doesn't come installed with it.In windows you can only load the module
(php4apache.dll)
if you installed php under c:\
you would only add
LoadModule php4_module D:/Programs/AppServ/php/sapi/php4apache.dll
any text with mod-php4.c shouldn't even exists in the config
then you would add the file types
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php .phtml
    AddType application/x-httpd-php-source .phps
and it should work
and you shouldn't forget to copy the file
php4ts.dll
to lets say your system32 folder making sure it doesn't exists anywhere else
in your windows root(from previous php installations)
that should generally work.

the other way would be to use the php.exe file and run php as a cgi
you would have to add the lines:
   ScriptAlias /php/ "c:/php/"
   AddType application/x-httpd-php .php
   Action application/x-httpd-php "/php/php.exe"
again no text with mod-php4.c should exists.

if you for some insane reason still think that mod-php4.c is loading and it
shouldn't you could always uncomment the line that says
ClearModuleList
and then load the needed modules by hand.Note:
if you use cleanmodule list and don't uncomment the lines that load the
default modules apache will fail to start.
Hope this helps
"Randall Barber" <[EMAIL PROTECTED]> wrote in message
002001c1940e$3af25ea0$c4df070a@rdb55">news:002001c1940e$3af25ea0$c4df070a@rdb55...
Using both the MSI and EXE packages of the subject mentioned programs, I
arrive at the same place, Apache will not run PHP.  I am using NT 4.0 SP 6.

I add the familiar LoadModule and AddType lines to the Apache httpd.conf
file.
I install Apache first, then PHP with the following error:

Cannot unload mod-php4.c: File is not in module list

(thats a paraphrase by the way).

I tried uninstalling both and installing both in different order.
Same result.

What am I missing?
Apache runs with out the module, so I am guessing its php.
Anyone have a solution? Please.

Thanks in advance
RDB



--- End Message ---
--- Begin Message ---
Has anyone been able to use the include() statement with a URL in the 
windows version of php? I've tried v4.0.6 and v4.1.1 and neither of them 
seem to work. Function is as follows.

include('http://www.tol.com.au/default.htm');

I have checked and made sure that allow_url_fopen is enabled in the ini 
file but I can't find any other config that needs to be changed in order to 
get this to work.

Hippie.


--- End Message ---
--- Begin Message ---
You are right, it doesn't seem to work with windows, I don't know if it
works with *nix either?
But you can include your file as:
include("http://whatever/yourfile.php";);
A+
Alain


-----Original Message-----
From: John (News) [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 3:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Include()


Has anyone been able to use the include() statement with a URL in the
windows version of php? I've tried v4.0.6 and v4.1.1 and neither of them
seem to work. Function is as follows.

include('http://www.tol.com.au/default.htm');

I have checked and made sure that allow_url_fopen is enabled in the ini
file but I can't find any other config that needs to be changed in order to
get this to work.

Hippie.



--- End Message ---
--- Begin Message ---
Yes, it works on Linux/Apache.  But the results are not what you might
expect.  When one normally uses the include statement, you intend to process
some php file, not the output from such a file.

For example:

nfo.php contains, located at http://www.myserver.com/nfo.php :
------BEGIN FILE---------
<?php 
  function nfo($addr) {
    return getnamebyaddr($addr);
  }

  echo nfo($REMOTE_ADDR);
?>
-------END FILE-----------

test.php contains, located at http://www.otherserver.com/test.php :
------BEGIN FILE---------
<?php
  include('http://www.myserver.com/nfo.php');

  echo nfo($REMOTE_ADDR);
?>
-------END FILE-----------

When you visit http://www.otherserver.com/test.php, the nfo function is not
defined, but results are returned by the include because the server connects
to http://www.myserver.com and correctly includes the results (output) from
that visit.  It is essentially an alternative to
fopen('http://www.myserver.com/nfo.php') if you just want to echo all the
results of the fopen.

-----Original Message-----
You are right, it doesn't seem to work with windows, I don't know if it
works with *nix either?
--- End Message ---
--- Begin Message ---
Humm, I do not know if I understand you...
If you include a file in your server A, it will run in your server locally
as part of your code. Now if the included file is located at another server
B, it should be all the same, the included file will run as part of your
code in server A, isn't it?
A+
Alain


-----Original Message-----
From: Shrock, Court [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 4:38 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Include()


Yes, it works on Linux/Apache.  But the results are not what you might
expect.  When one normally uses the include statement, you intend to process
some php file, not the output from such a file.

For example:

nfo.php contains, located at http://www.myserver.com/nfo.php :
------BEGIN FILE---------
<?php
  function nfo($addr) {
    return getnamebyaddr($addr);
  }

  echo nfo($REMOTE_ADDR);
?>
-------END FILE-----------

test.php contains, located at http://www.otherserver.com/test.php :
------BEGIN FILE---------
<?php
  include('http://www.myserver.com/nfo.php');

  echo nfo($REMOTE_ADDR);
?>
-------END FILE-----------

When you visit http://www.otherserver.com/test.php, the nfo function is not
defined, but results are returned by the include because the server connects
to http://www.myserver.com and correctly includes the results (output) from
that visit.  It is essentially an alternative to
fopen('http://www.myserver.com/nfo.php') if you just want to echo all the
results of the fopen.

-----Original Message-----
You are right, it doesn't seem to work with windows, I don't know if it
works with *nix either?

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
I'm not using it to include remote php files as I assumed it would still 
onlu be able to process the file after it was parsed by the remote system. 
I do however need to include remote html files which should not be affected 
by this problem.

Hippie.

At 04:38 PM 1/21/02 -0800, you wrote:
>Yes, it works on Linux/Apache.  But the results are not what you might
>expect.  When one normally uses the include statement, you intend to process
>some php file, not the output from such a file.
>
>For example:
>
>nfo.php contains, located at http://www.myserver.com/nfo.php :
>------BEGIN FILE---------
><?php
>   function nfo($addr) {
>     return getnamebyaddr($addr);
>   }
>
>   echo nfo($REMOTE_ADDR);
>?>
>-------END FILE-----------
>
>test.php contains, located at http://www.otherserver.com/test.php :
>------BEGIN FILE---------
><?php
>   include('http://www.myserver.com/nfo.php');
>
>   echo nfo($REMOTE_ADDR);
>?>
>-------END FILE-----------
>
>When you visit http://www.otherserver.com/test.php, the nfo function is not
>defined, but results are returned by the include because the server connects
>to http://www.myserver.com and correctly includes the results (output) from
>that visit.  It is essentially an alternative to
>fopen('http://www.myserver.com/nfo.php') if you just want to echo all the
>results of the fopen.
>
>-----Original Message-----
>You are right, it doesn't seem to work with windows, I don't know if it
>works with *nix either?
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
I asked this on the pear.general group, but maybe I'm asking in the wrong place.  Does 
anyone know what php_pear.dll is used for?

John
--- End Message ---
--- Begin Message ---
I have a problem with session and redirection. I have setup 2 testing file. index.php 
will start the session, set the
session variable and redirect it to index-full.php.

However, in index-full.php, I cannot see the output that I expected. it should be 
"trial is Ooi Soo Tuck". The output
is "trial is" which mean that the session variable is not registered or expired.

If I remove the header function and replace it with a link to index-full.php, I get 
the output that I expected.
Why header function will cause session not working?

(index.php)
<?
session_start();
$trial="Ooi Soo Tuck";
session_register("trial");
header("Location: index-full.php");
exit;
?>


(index-full.php)
<?
session_start();
print ("trial is ".$trial);
?>


any help would be appreciated.

Thanks 

ST Ooi
Malaysia
--- End Message ---
--- Begin Message ---
Hello,

Finally I made time to put a new Metabase release together celebrating
the 2nd aniversary since its first public release which is also the 3rd
aniversary since I started developing it.

For this release I added new features that either were requested or
contributed:

- Query result bulk data fetching - There is now a set of functions that
let you query databases, collect results into single variables and free
the results in a single call. These functions were contributed by Lukas
Smith and Christopher Linn.

These functions are meant not only to reduce the number of Metabase API
calls necessary to perform common types of queries but also to optimize
the result set data retrieval process. This was introduced to overcome
some complaints that Metabase would not perform as fast as other PHP
database abstraction packages.

There is now a function that retrieves a single result set row and is
optimized for each of the supported types of database. Around this and
other functions there are now some new functions that let you retrieve
just the first field of the first row, just the first row, just the
first field of all rows and all the fields of all rows.

Additionally, these new functions may convert the data types of the data
that is retrieved if necessary by specifing a data type mapping array
before retrieving the query results. If no data type is necessary, for
instance with result sets with only text and integer fields, no
conversion is performed, thus providing full database portability when
necessary without compromising Metabase ability to retrieve result set
data at the highest speed.

- Customizable error handling - There is also now a function to specify
a error handling function. This is meant to please those that want to
provide custom error handling separately from their main database
programming code.

- SQL REPLACE abstraction - There is now a function that lets you
execute SQL REPLACE command like what MySQL provides, but in a way that
works with almost all databases. SQL REPLACE is non-standard SQL command
that is like SQL INSERT, except that instead of just inserting a new
row, first it figures if there is already a row with the same primary
key values. If such row exists, it just updates it with new values,
otherwise it inserts a new row. This is very good to add or update
entries to relationship tables that have as primary keys, the keys of
other two or more tables.

To implement this command, Metabase uses transactions with the databases
that support them, except for MySQL that has native support for SQL
REPLACE.

For this release it was not possible to already integrate the Sybase
driver that was contributed by Sergio Zia. It will be done in a next
release after it is properly tested with the Metabase driver conformance
test as it is the standard for Metabase to assure the quality of its
drivers by only releasing what has be throughly tested.

Since Metabase feature list is not stopping to grow, in a future release
I also want to split all these optional features in such way that each
programmer only loads what their scripts need avoiding further PHP
compilation overhead.

That is all for now. If you would like to have some feature in Metabase
please feel free to approach either by contributing with code or just
suggesting what you have in mind even if you feel that you don't have
the time or the skill to do it yourself.

Metabase is free Open Source package and can be found with full
documentation and tutorials here:
http://phpclasses.UpperDesign.com/browse.html/package/20

Regards,
Manuel Lemos
--- End Message ---
--- Begin Message ---
Hi,

so for all who care:
I will begin pearifying Metabase starting next week.
Obviously this will take a fair amount of time. Also I am fairly busy
with work so any help is greatly appreciated.

This is also my first stab at reworking such a huge amount of code that
was originally written by someone else. I am quite optimistic that it
will work out though (with the megabytes of code my companies framework
fills sometimes that code feels alien too :-)  ) and I am allready quite
aqainted with the Metabase code. I am not very experienced with PEAR DB
code though so it is very important for people to tell me what features
are missing from Metabase that are included in PEAR now. I also would
like to hear where people think the issues will be (and possibly how to
solve them).

Aside from the fact that the Metabase class is not derived from the PEAR
core class there are a couple of things, like being able to retrieve and
associative array from a result set, missing from Metabase.

The goal is to have a DB abstraction layer based on Metabase with a PEAR
DB API. The outcome will be compatible with both Metabase and PEAR DB
where necessary through a wrapper class.

I also would like to hear if anyone uses Metabase with using the API in
metabase_interface.php .. if there are not many people using it then all
then I can safely modify the method names and parameters orders in the
new DB class and make the same changes to metabase_interface.php.

I guess after getting a good idea where the problem zones are and not
what features are missing I will first attempt to get a pearified
version of Metabase along with the MySQL driver working.

I will first focus on the functional aspects, then step by step making
the necessary changes to make that final code compliant to the PEAR
coding standard.

FYI: there has been a lot of discussion about this project in the last
couple months (especially december irrc) on the pear-dev mailinglist. So
some questions might allready be answered there.

Best regards,
Lukas Smith
[EMAIL PROTECTED]
_______________________________
 DybNet Internet Solutions GbR
 Alt Moabit 89
 10559 Berlin
 Germany
 Tel. : +49 30 83 22 50 00
 Fax : +49 30 83 22 50 07
 www.dybnet.de [EMAIL PROTECTED]
_______________________________

--- End Message ---

Reply via email to