php-windows Digest 11 Apr 2002 14:32:51 -0000 Issue 1088
Topics (messages 13015 through 13031):
Apache 2 and PHP
13015 by: Gaylen Fraley
13016 by: Rasmus Lerdorf
13018 by: Helphand
13019 by: Helphand
13020 by: Rasmus Lerdorf
13021 by: Steffen
13022 by: Eric
Re: Tired of fighting - function doesn't exist !!
13017 by: Rasmus Lerdorf
Re: Uploading large Files on IIS5
13023 by: Svensson, B.A.T. (HKG)
Warnings...
13024 by: Martin.Andrew
13025 by: Daniel Reichenbach
13026 by: Martin.Andrew
13029 by: Daniel Reichenbach
13030 by: Martin.Andrew
13031 by: Daniel Reichenbach
Session Variable Problem
13027 by: R.S. Herhuth
13028 by: Mike Flynn
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 ---
When trying to set up PHP with Apache 2, the following error occurs:
Syntax error on line 175 of /Apache2/conf/httpd.conf:
Cannot load /php/sapi/php4apache.dll into server: One of the library files
nee
ded to run this application cannot be found.
How do I find what is missing? It works under Apache 1.3.24
--
Gaylen
PHP KISGB v4.0.4 Guest Book http://www.gaylenandmargie.com/phpwebsite/
--- End Message ---
--- Begin Message ---
There is no Apache2 support for PHP yet. Coming in a future version.
-Rasmus
On Wed, 10 Apr 2002, Gaylen Fraley wrote:
> When trying to set up PHP with Apache 2, the following error occurs:
>
> Syntax error on line 175 of /Apache2/conf/httpd.conf:
> Cannot load /php/sapi/php4apache.dll into server: One of the library files
> nee
> ded to run this application cannot be found.
>
> How do I find what is missing? It works under Apache 1.3.24
>
> --
> Gaylen
> PHP KISGB v4.0.4 Guest Book http://www.gaylenandmargie.com/phpwebsite/
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
At 09:51 PM 4/10/02 -0500, Gaylen Fraley wrote:
>When trying to set up PHP with Apache 2, the following error occurs:
>
>Syntax error on line 175 of /Apache2/conf/httpd.conf:
>Cannot load /php/sapi/php4apache.dll into server: One of the library files
>nee
>ded to run this application cannot be found.
>
>How do I find what is missing? It works under Apache 1.3.24
I had the same problem. I think it's an issue with the installer, it
seemed to unzip
some files with bad file names (longfile name was set to the shortfile name).
My fix was to run the install a second time. Once I did that, everything
worked fine.
Scott
--- End Message ---
--- Begin Message ---
At 06:50 PM 4/10/02 -0700, Rasmus Lerdorf wrote:
>There is no Apache2 support for PHP yet. Coming in a future version.
That can't be right, I'm running Apache2 with PHP right now.
Scott
--- End Message ---
--- Begin Message ---
Well, you are extremely lucky if you have the Apache module version of PHP
working with Apache 2. It has been hit and miss version-wise for a while.
It will be solidified in a future version. Perhaps 4.2, but probably not
stable until 4.3.
-Rasmus
On Wed, 10 Apr 2002, Helphand wrote:
> At 06:50 PM 4/10/02 -0700, Rasmus Lerdorf wrote:
> >There is no Apache2 support for PHP yet. Coming in a future version.
>
> That can't be right, I'm running Apache2 with PHP right now.
>
> Scott
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Same here with running as module.
Running as cgi is running just fine with 4.1.2
Steffen
"Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> When trying to set up PHP with Apache 2, the following error occurs:
>
> Syntax error on line 175 of /Apache2/conf/httpd.conf:
> Cannot load /php/sapi/php4apache.dll into server: One of the library files
> nee
> ded to run this application cannot be found.
>
> How do I find what is missing? It works under Apache 1.3.24
>
> --
> Gaylen
> PHP KISGB v4.0.4 Guest Book http://www.gaylenandmargie.com/phpwebsite/
>
>
>
--- End Message ---
--- Begin Message ---
Which version of PHP are you using? Do you mind post the PHP configuration
section of your Apache 2's httpd.conf? Thanks a lot!
"Helphand" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó·s»D
:[EMAIL PROTECTED]
> At 06:50 PM 4/10/02 -0700, Rasmus Lerdorf wrote:
> >There is no Apache2 support for PHP yet. Coming in a future version.
>
> That can't be right, I'm running Apache2 with PHP right now.
>
> Scott
>
>
--- End Message ---
--- Begin Message ---
First of all, why not just use fsockopen() if all you need to do is
connect to a simple tcp socket and send a string?
Second, there is no socket() function. Please read the fine manual:
http://www.php.net/manual/en/ref.sockets.php
-Rasmus
On Wed, 10 Apr 2002, Quique wrote:
> Sorry 4 long post (necessary)
> -----------------------------
>
> Hi.
> I decided to post this msg coz i'm almost tired of "fighting" with
> php...
> I begun some time ago looking in php anything that would allow me to
> make a
> connection to another host. Then i discovered in the PHP's manual (
> Spanish CHM edition )
> some stuff about sockets.
> Then when i begun reading i found:
>
> "The socket extension implements a low-level interface to the socket
> communication functions, providing the possibility to act as a socket
> server as well as a client."
>
> Then i realized that my php needed a sockets extension.
> Then i downloaded latest php and found in php.ini the following line
> ;extension=php_sockets.dll
> Then, i deleted the ; and activated that line.
>
> The thing is that when i copied the example found in the manual and run
> i got an error !!
> I supposed that SOCKET function sould be in php_sockets.dll but it seems
> i'm wrong BECAUSE when
> i run the example i got
> "Fatal error: Call to undefined function: socket() in c:\inetpub\clcswi
> \test.php on line 13"
> WELL, WHERE IS THIS FUNCTION !?
>
> So, i'd like to know what can i do to enable this function in my php,
> then
> How can i connect to a tcp server (using or not this NON-EXISTING
> function) and send a string...?
>
> Thanks
>
> test.php (the example located in chm manual)
>
> <?php
> error_reporting(E_ALL);
> echo "<h2>TCP/IP Connection</h2>\n";
> /* Get the port for the WWW service. */
> $service_port = getservbyname('www', 'tcp');
> /* Get the IP address for the target host. */
> $address = gethostbyname('www.php.net');
> /* Create a TCP/IP socket. */
> $socket = socket(AF_INET, SOCK_STREAM, 0);
> if ($socket < 0) {
> echo "socket() failed: reason: " . strerror($socket) . "\n";
> } else {
> "socket() successful: " . strerror($socket) . "\n";
> }
> echo "Attempting to connect to '$address' on port '$service_port'...";
> $result = connect($socket, $address, $service_port);
> if ($result < 0) {
> echo "connect() failed.\nReason: ($result) " . strerror($result) .
> "\n";
> } else {
> echo "OK.\n";
> }
> $in = "HEAD / HTTP/1.0\r\n\r\n";
> $out = '';
> echo "Sending HTTP HEAD request...";
> write($socket, $in, strlen($in));
> echo "OK.\n";
> echo "Reading response:\n\n";
> while (read($socket, $out, 2048)) {
> echo $out;
> }
> echo "Closing socket...";
> close($socket);
> echo "OK.\n\n";
> ?>
>
> ----------------------------------
> Henry - Argentina
> http://www.quiquesistemas.com.ar
> [EMAIL PROTECTED]
> ICQ: 18048153
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Just want to mention in my conceptual view of an upload: the connections
is not passive, rather active, since the client is sending data to the
server - hence a timeout while sending data makes no sense for me?
> -----Original Message-----
> From: Fabian Deutsch
> Sent: Wednesday, April 10, 2002 9:15 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: Uploading large Files on IIS5
>
>
> Maybe the upload takes longer than 30secs and the iis sends a timeout!?
--- End Message ---
--- Begin Message ---
I keep getting the following warning message on my production server (ISP
hosted), but local version doesn't have this problem! I check the local INI
file and can't find the "allow_call_time_pass_reference" mentioned!
Any ideas?
Warning: Call-time pass-by-reference has been deprecated - argument passed
by value; If you would like to pass it by reference, modify the declaration
of [runtime function name](). If you would like to enable call-time
pass-by-reference, you can set allow_call_time_pass_reference to true in
your INI file. However, future versions may not support this any longer. in
/home/sites/site200/web/include/session.inc on line 310
--- End Message ---
--- Begin Message ---
The only reference i found is here:
http://www.php.net/manual/en/function.ini-set.php
But no description what it does :-(
If i understood it right, you called a function like this
myFunction(&$variable)
You can do the following, which should work. I use it myself
to pass references to database handles.
myFunction($variable);
and in your function declaration use:
function myFuntion( &$variable )
{
$this->variable = &$variable;
}
> I keep getting the following warning message on my production
> server (ISP
> hosted), but local version doesn't have this problem! I check
> the local INI
> file and can't find the "allow_call_time_pass_reference" mentioned!
>
> Any ideas?
--- End Message ---
--- Begin Message ---
Anyone know a way of turning WARNINGS off with the ini_set() function? I
can't find it in the list of changeable options!
-----Original Message-----
From: Daniel Reichenbach [mailto:[EMAIL PROTECTED]]
Sent: 11 April 2002 14:26
To: Php-Windows
Subject: RE: [PHP-WIN] Warnings...
The only reference i found is here:
http://www.php.net/manual/en/function.ini-set.php
But no description what it does :-(
If i understood it right, you called a function like this
myFunction(&$variable)
You can do the following, which should work. I use it myself
to pass references to database handles.
myFunction($variable);
and in your function declaration use:
function myFuntion( &$variable )
{
$this->variable = &$variable;
}
> I keep getting the following warning message on my production
> server (ISP
> hosted), but local version doesn't have this problem! I check
> the local INI
> file and can't find the "allow_call_time_pass_reference" mentioned!
>
> Any ideas?
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Try using:
allow_call_time_pass_reference = On
in your php.ini. This should turn the warning off.
Daniel
> -----Original Message-----
> From: Martin.Andrew [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 11, 2002 3:35 PM
> To: Php-Windows
> Cc: Daniel Reichenbach
> Subject: RE: [PHP-WIN] Warnings...
>
>
> Anyone know a way of turning WARNINGS off with the ini_set()
> function? I can't find it in the list of changeable options!
>
>
>
>
>
> -----Original Message-----
> From: Daniel Reichenbach [mailto:[EMAIL PROTECTED]]
> Sent: 11 April 2002 14:26
> To: Php-Windows
> Subject: RE: [PHP-WIN] Warnings...
>
>
> The only reference i found is here:
> http://www.php.net/manual/en/function.ini-> set.php
>
> But no
> description what it does :-(
>
> If i
> understood it right, you called a function like this
>
> myFunction(&$variable)
>
> You can do the following, which should work. I use it myself
> to pass references to database handles.
>
> myFunction($variable);
>
> and in your function declaration use:
>
> function myFuntion( &$variable )
> {
> $this->variable = &$variable;
> }
>
> > I keep getting the following warning message on my production
> > server (ISP
> > hosted), but local version doesn't have this problem! I check
> > the local INI
> > file and can't find the "allow_call_time_pass_reference" mentioned!
> >
> > Any ideas?
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
thats the problem, my ISP has this set to OFF and I need to know how I can
change it locally.
I used ini_set("error_reporting", "4"); for general warnings which works
fine
but trying ini_set("allow_call_time_pass_reference", "On"); doesn't work
I think it's a rights issue, being a general user I'm not allowed to modify
this!
-----Original Message-----
From: Daniel Reichenbach [mailto:[EMAIL PROTECTED]]
Sent: 11 April 2002 16:18
To: Php-Windows
Cc: 'Martin.Andrew'
Subject: RE: [PHP-WIN] Warnings...
Try using:
allow_call_time_pass_reference = On
in your php.ini. This should turn the warning off.
Daniel
> -----Original Message-----
> From: Martin.Andrew [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 11, 2002 3:35 PM
> To: Php-Windows
> Cc: Daniel Reichenbach
> Subject: RE: [PHP-WIN] Warnings...
>
>
> Anyone know a way of turning WARNINGS off with the ini_set()
> function? I can't find it in the list of changeable options!
>
>
>
>
>
> -----Original Message-----
> From: Daniel Reichenbach [mailto:[EMAIL PROTECTED]]
> Sent: 11 April 2002 14:26
> To: Php-Windows
> Subject: RE: [PHP-WIN] Warnings...
>
>
> The only reference i found is here:
> http://www.php.net/manual/en/function.ini-> set.php
>
> But no
> description what it does :-(
>
> If i
> understood it right, you called a function like this
>
> myFunction(&$variable)
>
> You can do the following, which should work. I use it myself
> to pass references to database handles.
>
> myFunction($variable);
>
> and in your function declaration use:
>
> function myFuntion( &$variable )
> {
> $this->variable = &$variable;
> }
>
> > I keep getting the following warning message on my production
> > server (ISP
> > hosted), but local version doesn't have this problem! I check
> > the local INI
> > file and can't find the "allow_call_time_pass_reference" mentioned!
> >
> > Any ideas?
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
As far as I understood allow_call_time_pass_reference can only be
set via php.ini. So your ISP would have to do this for you. He could
even do this for your domain(s) only.
Daniel
> thats the problem, my ISP has this set to OFF and I need to
> know how I can change it locally.
>
> I used ini_set("error_reporting", "4"); for general warnings
> which works fine but trying
> ini_set("allow_call_time_pass_reference", "On"); doesn't work
>
> I think it's a rights issue, being a general user I'm not
> allowed to modify this!
--- End Message ---
--- Begin Message ---
I'm running the latest build of php and Apache under Windows 2000 pro.
I have been experimenting with sessions and I'm having a bit of trouble.
page 1
I create a session_start() above all of the HTML.
I have a 3 form element (a checkbox) with:
name="myVar" value="1",name="myVar" value="2",name="myVar" value="3"
I session_register("myVar")
On submit I go to page two.
page 2
I create a session_start() above all of the HTML.
I echo $myVar
this is where things get weird.
The first time I run page 1, when I get to page 2 the value is passed correctly.
If I use the browsers back button and change which checkbox I select and
then click submit, the value doesn't change and the original value is
printed out.
If I reload the first page by rekeying in it's URL I get an error
message saying that php expected a "," or ";" on line 23. That line is
blank in the code and the syntax is correct and I didn't get an error
the first time I ran the script.
However if I refresh the page it reloads and runs, but again the value
doesn't change when I submit it and view the printout on page two. If I
set the form method to get and view the variable that is getting passed
it looks correct but the session instance of the variable never changes.
I have tried everything I could possibly try. I even copied and pasted
sample code from www.zend.com with the exact same results.
Is this a bug or what am I doing wrong? This is the most frustrating
thing I have done in a long time.
Ron Herhuth
--- End Message ---
--- Begin Message ---
I'm a bit confused by your description. Seeing the code itself would be
much more of a help. One thing that I notice though is that you say you
session_register 'myvar' on the first page. But the value for myvar isn't
actually set until after the form has been submitted, right? What might
happen is that since myvar is set (assuming register_globals is on in your
php.ini), on the 2nd page it's echoing the value of myvar from the
submitted form, not from the session variable.
But like I said, it would help much more to see the snippits of code in
question.. :)
-Mike
At 09:00 AM 4/11/2002 -0500, R.S. Herhuth wrote:
>I'm running the latest build of php and Apache under Windows 2000 pro.
>
>I have been experimenting with sessions and I'm having a bit of trouble.
>
>
>page 1
>
>I create a session_start() above all of the HTML.
>
>I have a 3 form element (a checkbox) with:
>name="myVar" value="1",name="myVar" value="2",name="myVar" value="3"
>
>I session_register("myVar")
>
>On submit I go to page two.
>
>
>page 2
>
>I create a session_start() above all of the HTML.
>
>I echo $myVar
>
>this is where things get weird.
>
>The first time I run page 1, when I get to page 2 the value is passed
>correctly.
>If I use the browsers back button and change which checkbox I select and
>then click submit, the value doesn't change and the original value is
>printed out.
>
>If I reload the first page by rekeying in it's URL I get an error
>message saying that php expected a "," or ";" on line 23. That line is
>blank in the code and the syntax is correct and I didn't get an error
>the first time I ran the script.
>
>However if I refresh the page it reloads and runs, but again the value
>doesn't change when I submit it and view the printout on page two. If I
>set the form method to get and view the variable that is getting passed
>it looks correct but the session instance of the variable never changes.
>
>
>
>I have tried everything I could possibly try. I even copied and pasted
>sample code from www.zend.com with the exact same results.
>
>Is this a bug or what am I doing wrong? This is the most frustrating
>thing I have done in a long time.
>
>Ron Herhuth
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
Mike Flynn - Burlington, VT
http://www.mikeflynn.net/ - [EMAIL PROTECTED]
home=>work=>home=>store=>home [repeat daily]
--- End Message ---