php-windows Digest 14 May 2004 02:26:11 -0000 Issue 2249
Topics (messages 23698 through 23723):
Re: Date format
23698 by: Gryffyn, Trevor
Re: photo gallery with description
23699 by: Jonathan Pilborough
Problems Configuring and I do all the manual says...HELP!
23700 by: Alejandro C�sar Garrammone
23701 by: Luis Moreira
23703 by: Steve Douville
23704 by: Alejandro C�sar Garrammone
$_ENV displaying admin password
23702 by: Steve Douville
23716 by: Jason Barnett
I've found the cause of the error but I cant fix it.
23705 by: Alejandro C�sar Garrammone
23706 by: Gerardo Rojas
23707 by: Gryffyn, Trevor
23709 by: Alejandro C�sar Garrammone
23710 by: Gryffyn, Trevor
23711 by: Steve Douville
23713 by: Jason Barnett
Q on fopen (URL )
23708 by: \[php\]Walter
23715 by: Jason Barnett
23717 by: Manuel Lemos
23718 by: Dietrich Ayala
Re: Problems Configuring.
23712 by: Jason Barnett
Re: (Problem Solved) I've found the cause of the error but I cant fix it.
23714 by: Alejandro C�sar Garrammone
Windows speed issue
23719 by: Andrew Staples
23720 by: Gryffyn, Trevor
23721 by: Jason Barnett
Re: CGI timeout WAS: [PHP-WIN] Windows speed issue
23722 by: Svensson, B.A.T. (HKG)
Ping from PHP with shell_exec comando in IIS 5 and windows XP
23723 by: hdl
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 ---
Lots of ways to skin this particular cat.. Here's one way I'd do it
(broken out a bit so you can follow the flow):
$date = "1965-12-25";
List($year,$month,$day) = explode("-",$date);
$monthtext = date("M",mktime(0,0,0,$month,date("d"),date("Y")));
$fixeddate = "$day-$monthtext-$year";
You're right though, mktime doesn't like dates prior to 1/1/1970 (at
least on this Windows system) so I'd manipulate it in pieces. If all
you need to do is translate the "12" into a "Dec" then just pull the
month out and pick any day and year. This will work fine unless you're
trying to get "day of the week".
-TG
> -----Original Message-----
> From: Sudeep Zamudra [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 13, 2004 4:48 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Date format
>
>
> Hi everyone,
>
> I want to convert a date 1965-12-25 into the format: 25-Dec-1965.
> When i use mktime it works fine for any date after the year
> 1970. It doesn't work for any date before 1970. Help please.
> Is there any function that shows the date in the above
> required format.
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Movies - Buy advance tickets for 'Shrek 2'
>
--- End Message ---
--- Begin Message ---
Sorry - try www.fotopics.net
[EMAIL PROTECTED] wrote: In a message dated 5/12/2004 17:01:35 GMT Daylight Time,
[EMAIL PROTECTED] writes:
wwww.fotopics.net
link doesn't work...
Tryst
--
Please fill in my Business Questionnaire at http://www.businessq.tk
--
Pupil at Haybridge High School http://www.haybridge.worcs.sch.uk
---------------------------------
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download
Messenger Now
--- End Message ---
--- Begin Message ---
Hi all, I've a problem configuring my php on a Windows XP OS.
I do all the manual says...the Apache Server has service start and it seems it is
working fine...but when the php try to connect to a mysql databases it's do nothing.
Before the XP I have a W98 running perfectly with Apache, PHP and Mysql and when I do
not start mysql it notify that can't connect, but right now with this new operating
system don't tell nothing...so i think the problem is in the configuration of the php.
Someone can help me?.
PHP ver 4.2.3
Apache ver 1.3.27
MySQL ver 3.23.53
Sorry for my english,
Thx in advance,
Alex
--- End Message ---
--- Begin Message ---
Alejandro C�sar Garrammone wrote:
Hi all, I've a problem configuring my php on a Windows XP OS.
I do all the manual says...the Apache Server has service start and it seems it is
working fine...but when the php try to connect to a mysql databases it's do nothing.
Before the XP I have a W98 running perfectly with Apache, PHP and Mysql and when I do
not start mysql it notify that can't connect, but right now with this new operating
system don't tell nothing...so i think the problem is in the configuration of the php.
Someone can help me?.
PHP ver 4.2.3
Apache ver 1.3.27
MySQL ver 3.23.53
Sorry for my english,
Thx in advance,
Alex
Not necessarily.
I am not an experto on XP (who is ?) but I think there are such things
as "file permissions".
Chek to see if the user with which Apache runs as rights over the
directory where MySql is...
Luis
--- End Message ---
--- Begin Message ---
Are you sure that MySQL is running? Are you able to connect to it with an
MySQL client? Are you running it as a service or standalone?
steve
----- Original Message -----
From: "Luis Moreira" <[EMAIL PROTECTED]>
To: "Alejandro C�sar Garrammone" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 13, 2004 11:30 AM
Subject: Re: [PHP-WIN] Problems Configuring and I do all the manual
says...HELP!
> Alejandro C�sar Garrammone wrote:
>
> >Hi all, I've a problem configuring my php on a Windows XP OS.
> >I do all the manual says...the Apache Server has service start and it
seems it is working fine...but when the php try to connect to a mysql
databases it's do nothing.
> >Before the XP I have a W98 running perfectly with Apache, PHP and Mysql
and when I do not start mysql it notify that can't connect, but right now
with this new operating system don't tell nothing...so i think the problem
is in the configuration of the php.
> >Someone can help me?.
> >PHP ver 4.2.3
> >Apache ver 1.3.27
> >MySQL ver 3.23.53
> >
> >Sorry for my english,
> >
> >Thx in advance,
> >
> >Alex
--- End Message ---
--- Begin Message ---
Yes, I'm sure, If I open a cmd window and go to c:\mysql\bin I execute mysql
and it's open well.
I'm running mysql as a service.
The type of server I use is mysqld-max-nt.
I've created a new php file that contains phpinfo(), and it's runs well, so
the php is well linked to the apache server. But, when I go to a page of
autentication of user and password, when I clik "ok" it do nothing.
An observation I made is that in phpinfo() the method that is shows is
GET...and I pass the User and Password with POST method. If that could be
the problem...how can I fix it?
Thxs again for your response,
Alex
----- Original Message -----
From: "Steve Douville" <[EMAIL PROTECTED]>
To: "Alejandro C�sar Garrammone" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 13, 2004 12:37 PM
Subject: Re: [PHP-WIN] Problems Configuring and I do all the manual
says...HELP!
> Are you sure that MySQL is running? Are you able to connect to it with an
> MySQL client? Are you running it as a service or standalone?
>
> steve
> ----- Original Message -----
> From: "Luis Moreira" <[EMAIL PROTECTED]>
> To: "Alejandro C�sar Garrammone" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, May 13, 2004 11:30 AM
> Subject: Re: [PHP-WIN] Problems Configuring and I do all the manual
> says...HELP!
>
>
> > Alejandro C�sar Garrammone wrote:
> >
> > >Hi all, I've a problem configuring my php on a Windows XP OS.
> > >I do all the manual says...the Apache Server has service start and it
> seems it is working fine...but when the php try to connect to a mysql
> databases it's do nothing.
> > >Before the XP I have a W98 running perfectly with Apache, PHP and Mysql
> and when I do not start mysql it notify that can't connect, but right now
> with this new operating system don't tell nothing...so i think the problem
> is in the configuration of the php.
> > >Someone can help me?.
> > >PHP ver 4.2.3
> > >Apache ver 1.3.27
> > >MySQL ver 3.23.53
> > >
> > >Sorry for my english,
> > >
> > >Thx in advance,
> > >
> > >Alex
>
>
--- End Message ---
--- Begin Message ---
Values for $AS_ADMIN_PASSWORD which is stored in $_ENV is displayed from
phpinfo(). What is this a password to and can I turn it off?
TIA,
Steve
--- End Message ---
--- Begin Message ---
Steve Douville wrote:
Values for $AS_ADMIN_PASSWORD which is stored in $_ENV is displayed from
phpinfo(). What is this a password to and can I turn it off?
TIA,
Steve
It's from the operating system. I don't know exactly what it's a
password for, but you can probably find out by going to: start->control
panel->system->advanced (tab)->environment variables (button)
--- End Message ---
--- Begin Message ---
Hi all,
The problem is the GET and the POST method.
I've create a simple form and I pass my name on it, on the other hand, on the file
referenced in the form, I put an echo with the variable, and it doesn't print it. (I
use GET, on the link it shows it, but the variable is empty).
How can I fix it?
Best Regards,
Alex
--- End Message ---
--- Begin Message ---
If you provide a bit of your source code. It would be quicker to determine the
problem.
--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]
-----Original Message-----
From: Alejandro C�sar Garrammone [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 12, 2004 10:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] I've found the cause of the error but I cant fix it.
Hi all,
The problem is the GET and the POST method.
I've create a simple form and I pass my name on it, on the other hand, on the file
referenced in the form, I put an echo with the variable, and it doesn't print it. (I
use GET, on the link it shows it, but the variable is empty).
How can I fix it?
Best Regards,
Alex
--- End Message ---
--- Begin Message ---
If you're used to running on a system with register_globals turned ON then you might
run into a snag with something like this since the GET and POST values aren't
automatically assigned to the variables you're trying to echo.
You need to do:
$variablename = $_GET["variablename"];
Or...
$variablename = $_POST["variablename"];
Or..
$variablename = $_REQUEST["variablename"];
The last one (REQUEST) will populate the $variablename variable with either GET or
POST data so can be used for either. I forget the order that it takes it though, I
believe it essentially does:
If (isset($_POST["variablename"])) $variablename = $_POST["variablename"];
If (isset($_GET["variablename"])) $variablename = $_GET["variablename"];
(or vice versa)
So if both $_POST["variablename"] and $_GET["variablename"] are both set, then the
data stored in the GET overwrites the POST data previously assigned to $variablename.
It IS possible to pass both POST and GET data at the same time:
<form action="index.php?GETVARIABLE=testget" method="POST">
<input type="text" name="POSTVARIABLE" value="testpost">
</form>
Var_dump($_REQUEST) will have both GETVARIABLE and POSTVARIABLE values ("testget" and
"testpost" respectively) available where as $_GET only has the GETVARIABLE value
("testget") and $_POST only has the POSTVARIABLE value ("testpost")
-TG
> -----Original Message-----
> From: Alejandro C�sar Garrammone [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 11:48 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] I've found the cause of the error but I
> cant fix it.
>
>
> Hi all,
> The problem is the GET and the POST method.
> I've create a simple form and I pass my name on it, on the
> other hand, on the file referenced in the form, I put an echo
> with the variable, and it doesn't print it. (I use GET, on
> the link it shows it, but the variable is empty).
>
> How can I fix it?
>
> Best Regards,
>
> Alex
>
--- End Message ---
--- Begin Message ---
I understands you well but the problem is a week ago with a OS Win98 all the
pages funcioned very well, but when I install WinXP, and configure the
mysql, apache and php and I tested with the same pages I've used on W98 it's
not working.
Where is the configuring problem?
If you need some of the files like php.ini and httpd.conf, tell me and I'll
send you those files.
Thxs for helping me!!!
Alex
----- Original Message -----
From: "Gryffyn, Trevor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Alejandro C�sar Garrammone" <[EMAIL PROTECTED]>
Sent: Thursday, May 13, 2004 1:18 PM
Subject: RE: [PHP-WIN] I've found the cause of the error but I cant fix it.
If you're used to running on a system with register_globals turned ON then
you might run into a snag with something like this since the GET and POST
values aren't automatically assigned to the variables you're trying to echo.
You need to do:
$variablename = $_GET["variablename"];
Or...
$variablename = $_POST["variablename"];
Or..
$variablename = $_REQUEST["variablename"];
The last one (REQUEST) will populate the $variablename variable with either
GET or POST data so can be used for either. I forget the order that it
takes it though, I believe it essentially does:
If (isset($_POST["variablename"])) $variablename = $_POST["variablename"];
If (isset($_GET["variablename"])) $variablename = $_GET["variablename"];
(or vice versa)
So if both $_POST["variablename"] and $_GET["variablename"] are both set,
then the data stored in the GET overwrites the POST data previously assigned
to $variablename.
It IS possible to pass both POST and GET data at the same time:
<form action="index.php?GETVARIABLE=testget" method="POST">
<input type="text" name="POSTVARIABLE" value="testpost">
</form>
Var_dump($_REQUEST) will have both GETVARIABLE and POSTVARIABLE values
("testget" and "testpost" respectively) available where as $_GET only has
the GETVARIABLE value ("testget") and $_POST only has the POSTVARIABLE value
("testpost")
-TG
> -----Original Message-----
> From: Alejandro C�sar Garrammone [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 11:48 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] I've found the cause of the error but I
> cant fix it.
>
>
> Hi all,
> The problem is the GET and the POST method.
> I've create a simple form and I pass my name on it, on the
> other hand, on the file referenced in the form, I put an echo
> with the variable, and it doesn't print it. (I use GET, on
> the link it shows it, but the variable is empty).
>
> How can I fix it?
>
> Best Regards,
>
> Alex
>
--- End Message ---
--- Begin Message ---
It sounds like a fairly common problem. You probably want to check the entry in your
PHP.INI file:
register_globals = Off
You might have had it turned ON before in which case you wouldn't have to use $_POST
or $_GET to get the values of the variables, they're automatically assigned to
whatever the $_POST or $_GET variable name is.
For security reasons, you really should set it to OFF (as illustrated above). Sample
code/example follows:
------------- Before Reinstall (assuming "register_globals = ON") ---------------
HTML:
<input type="text" name="testvariable" value="50">
PHP:
Echo "Value of testvariable is: $testvariable";
Output: Value of testvariable is: 50
------------- After Reinstall (assuming "register_globals = OFF") ----------
HTML:
<input type="text" name="testvariable" value="50">
PHP:
Echo "Value of testvariable is: $testvariable";
Output: Value of testvariable is:
(no value is present in $testvariable because it's not automatically assigned when
"register_globals" is turned off)
------------- After Reinstall ("register_globals = OFF") ----------
HTML:
<input type="text" name="testvariable" value="50">
PHP:
$testvariable = $_REQUEST["testvariable"];
Echo "Value of testvariable is: $testvariable";
Output: Value of testvariable is: 50
(no value is present in $testvariable because it's not automatically assigned when
"register_globals" is turned off)
Try something like that.
-TG
> -----Original Message-----
> From: Alejandro C�sar Garrammone [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 13, 2004 12:39 AM
> To: Gryffyn, Trevor
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] I've found the cause of the error but
> I cant fix it.
>
>
> I understands you well but the problem is a week ago with a
> OS Win98 all the pages funcioned very well, but when I install
> WinXP, and configure the mysql, apache and php and I tested with
> the same pages I've used on W98 it's not working.
> Where is the configuring problem?
>
> If you need some of the files like php.ini and httpd.conf,
> tell me and I'll send you those files.
>
> Thxs for helping me!!!
>
> Alex
> ----- Original Message -----
> From: "Gryffyn, Trevor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: "Alejandro C�sar Garrammone" <[EMAIL PROTECTED]>
> Sent: Thursday, May 13, 2004 1:18 PM
> Subject: RE: [PHP-WIN] I've found the cause of the error but
> I cant fix it.
>
>
> If you're used to running on a system with register_globals
> turned ON then
> you might run into a snag with something like this since the
> GET and POST
> values aren't automatically assigned to the variables you're
> trying to echo.
>
> You need to do:
>
> $variablename = $_GET["variablename"];
>
> Or...
>
> $variablename = $_POST["variablename"];
>
> Or..
>
> $variablename = $_REQUEST["variablename"];
>
>
> The last one (REQUEST) will populate the $variablename
> variable with either
> GET or POST data so can be used for either. I forget the
> order that it
> takes it though, I believe it essentially does:
>
> If (isset($_POST["variablename"])) $variablename =
> $_POST["variablename"];
> If (isset($_GET["variablename"])) $variablename =
> $_GET["variablename"];
>
> (or vice versa)
>
> So if both $_POST["variablename"] and $_GET["variablename"]
> are both set,
> then the data stored in the GET overwrites the POST data
> previously assigned
> to $variablename.
>
>
> It IS possible to pass both POST and GET data at the same time:
>
> <form action="index.php?GETVARIABLE=testget" method="POST">
> <input type="text" name="POSTVARIABLE" value="testpost">
> </form>
>
>
> Var_dump($_REQUEST) will have both GETVARIABLE and POSTVARIABLE values
> ("testget" and "testpost" respectively) available where as
> $_GET only has
> the GETVARIABLE value ("testget") and $_POST only has the
> POSTVARIABLE value
> ("testpost")
>
> -TG
>
>
>
> > -----Original Message-----
> > From: Alejandro C�sar Garrammone [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 12, 2004 11:48 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] I've found the cause of the error but I
> > cant fix it.
> >
> >
> > Hi all,
> > The problem is the GET and the POST method.
> > I've create a simple form and I pass my name on it, on the
> > other hand, on the file referenced in the form, I put an echo
> > with the variable, and it doesn't print it. (I use GET, on
> > the link it shows it, but the variable is empty).
> >
> > How can I fix it?
> >
> > Best Regards,
> >
> > Alex
> >
>
>
>
--- End Message ---
--- Begin Message ---
What versions of PHP are/were you running? The newest versions install with
globals not automatically being registered by default as opposed to the
older versions that by default registered globals. Perhaps that is the
problem, that you have an older version on 98 where globals are
automatically registered so your POST variables are available but in the
newest version you've installed on XP doesn't do that by default.
Check the register_globals variable in your phpinfo() output. Is it on or
off?
----- Original Message -----
From: "Alejandro C�sar Garrammone" <[EMAIL PROTECTED]>
To: "Gryffyn, Trevor" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 13, 2004 12:38 AM
Subject: Re: [PHP-WIN] I've found the cause of the error but I cant fix it.
> I understands you well but the problem is a week ago with a OS Win98 all
the
> pages funcioned very well, but when I install WinXP, and configure the
> mysql, apache and php and I tested with the same pages I've used on W98
it's
> not working.
> Where is the configuring problem?
>
> If you need some of the files like php.ini and httpd.conf, tell me and
I'll
> send you those files.
>
> Thxs for helping me!!!
>
> Alex
> ----- Original Message -----
> From: "Gryffyn, Trevor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: "Alejandro C�sar Garrammone" <[EMAIL PROTECTED]>
> Sent: Thursday, May 13, 2004 1:18 PM
> Subject: RE: [PHP-WIN] I've found the cause of the error but I cant fix
it.
>
>
> If you're used to running on a system with register_globals turned ON then
> you might run into a snag with something like this since the GET and POST
> values aren't automatically assigned to the variables you're trying to
echo.
>
> You need to do:
>
> $variablename = $_GET["variablename"];
>
> Or...
>
> $variablename = $_POST["variablename"];
>
> Or..
>
> $variablename = $_REQUEST["variablename"];
>
>
> The last one (REQUEST) will populate the $variablename variable with
either
> GET or POST data so can be used for either. I forget the order that it
> takes it though, I believe it essentially does:
>
> If (isset($_POST["variablename"])) $variablename = $_POST["variablename"];
> If (isset($_GET["variablename"])) $variablename = $_GET["variablename"];
>
> (or vice versa)
>
> So if both $_POST["variablename"] and $_GET["variablename"] are both set,
> then the data stored in the GET overwrites the POST data previously
assigned
> to $variablename.
>
>
> It IS possible to pass both POST and GET data at the same time:
>
> <form action="index.php?GETVARIABLE=testget" method="POST">
> <input type="text" name="POSTVARIABLE" value="testpost">
> </form>
>
>
> Var_dump($_REQUEST) will have both GETVARIABLE and POSTVARIABLE values
> ("testget" and "testpost" respectively) available where as $_GET only has
> the GETVARIABLE value ("testget") and $_POST only has the POSTVARIABLE
value
> ("testpost")
>
> -TG
>
>
>
> > -----Original Message-----
> > From: Alejandro C�sar Garrammone [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 12, 2004 11:48 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] I've found the cause of the error but I
> > cant fix it.
> >
> >
> > Hi all,
> > The problem is the GET and the POST method.
> > I've create a simple form and I pass my name on it, on the
> > other hand, on the file referenced in the form, I put an echo
> > with the variable, and it doesn't print it. (I use GET, on
> > the link it shows it, but the variable is empty).
> >
> > How can I fix it?
> >
> > Best Regards,
> >
> > Alex
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
--- End Message ---
--- Begin Message ---
Alejandro c�sar garrammone wrote:
Hi all,
The problem is the GET and the POST method.
I've create a simple form and I pass my name on it, on the other hand, on the file
referenced in the form, I put an echo with the variable, and it doesn't print it. (I
use GET, on the link it shows it, but the variable is empty).
How can I fix it?
Best Regards,
Alex
Well Alex, first of all I wouldn't suggest sending your pw / user info
as plain text, as a packet sniffer could just grab those and connect to
your database. You can store that information in the PHP script itself.
What's the code you're using to pass the login info?
--- End Message ---
--- Begin Message ---
I did this...
<?php
$my_email = 'myID;
$my_password = 'myPW';
$mystr = "EMail=$my_email&passwd=$my_password";
$url = "https://www.homier.com/security.asp?a=v&$mystr";
echo URLopen($url);
// code from PHP docs...
function URLopen($url)
{
// Fake the browser type
ini_set('user_agent','MSIE 4\.0b2;');
$dh = fopen("$url",'r');
$result = fread($dh,8192);
return $result;
}
?>
What I get back is this...
Unable to find wrapper "https"
- did you forget to enable it when you configured PHP?
I can't find any (real) reference to this anywhere.
Anyone have any ideas?
I'm on an NT, PHP 4.3.2
Walter Torres
======================================================================
Torres Development Group Systems Design & Development Services
web.torres.ws C++ Perl PHP
V:708-288-5859 F:714-908-8403 [d]HTML CSS Javascript
======================================================================
--- End Message ---
--- Begin Message ---
What I get back is this...
Unable to find wrapper "https"
- did you forget to enable it when you configured PHP?
You'll need to look at the openSSL for Windows. Someone at PHP's site
said they openSSL has a bug in it, you should try using this to support
https:
http://ftp.proventum.net/pub/php/win32/misc/openssl/
The original manual / posting where I gleaned this information:
http://www.php.net/manual/en/wrappers.php
--- End Message ---
--- Begin Message ---
Hello,
On 05/13/2004 01:57 PM, Walter wrote:
Unable to find wrapper "https"
- did you forget to enable it when you configured PHP?
I can't find any (real) reference to this anywhere.
Anyone have any ideas?
I'm on an NT, PHP 4.3.2
It seems that the OpenSSL extension is not enabled.
You may want to try this class that will try either the OpenSSL or CURL
extensions to access https pages:
http://www.phpclasses.org/httpclient
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--- End Message ---
--- Begin Message ---
even if the openssl extension is enabled, on windows ssl will still not
be available in the streams code (fopen, fsockopen, ftp, etc).
the only way to make this work is to statically link openssl when
compiling on windows. there's a link on the streams documentation page
to a patch that does this.
-d
Manuel Lemos wrote:
Hello,
On 05/13/2004 01:57 PM, Walter wrote:
Unable to find wrapper "https"
- did you forget to enable it when you configured PHP?
I can't find any (real) reference to this anywhere.
Anyone have any ideas?
I'm on an NT, PHP 4.3.2
It seems that the OpenSSL extension is not enabled.
You may want to try this class that will try either the OpenSSL or CURL
extensions to access https pages:
http://www.phpclasses.org/httpclient
--- End Message ---
--- Begin Message ---
Well it sounds as if your server is set up ok with support for MySQL.
Have you tried to login as the MySQL user using the command prompt (just
to be sure that you have the right permissions)? Also, please tell us
the error message(s) that you receive when trying to do mysql_connect.
--- End Message ---
--- Begin Message ---
Thxs guys (Gerardo, Trevor, Steve, Luis), the problem is like Trevor and
Steve says...the famous register_global variable
Thxs again,
Alex
----- Original Message -----
From: "Gryffyn, Trevor" <[EMAIL PROTECTED]>
To: "Alejandro C�sar Garrammone" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 13, 2004 2:08 PM
Subject: RE: [PHP-WIN] I've found the cause of the error but I cant fix it.
It sounds like a fairly common problem. You probably want to check the
entry in your PHP.INI file:
register_globals = Off
You might have had it turned ON before in which case you wouldn't have to
use $_POST or $_GET to get the values of the variables, they're
automatically assigned to whatever the $_POST or $_GET variable name is.
For security reasons, you really should set it to OFF (as illustrated
above). Sample code/example follows:
------------- Before Reinstall (assuming "register_globals =
ON") ---------------
HTML:
<input type="text" name="testvariable" value="50">
PHP:
Echo "Value of testvariable is: $testvariable";
Output: Value of testvariable is: 50
------------- After Reinstall (assuming "register_globals = OFF") ----------
HTML:
<input type="text" name="testvariable" value="50">
PHP:
Echo "Value of testvariable is: $testvariable";
Output: Value of testvariable is:
(no value is present in $testvariable because it's not automatically
assigned when "register_globals" is turned off)
------------- After Reinstall ("register_globals = OFF") ----------
HTML:
<input type="text" name="testvariable" value="50">
PHP:
$testvariable = $_REQUEST["testvariable"];
Echo "Value of testvariable is: $testvariable";
Output: Value of testvariable is: 50
(no value is present in $testvariable because it's not automatically
assigned when "register_globals" is turned off)
Try something like that.
-TG
> -----Original Message-----
> From: Alejandro C�sar Garrammone [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 13, 2004 12:39 AM
> To: Gryffyn, Trevor
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] I've found the cause of the error but
> I cant fix it.
>
>
> I understands you well but the problem is a week ago with a
> OS Win98 all the pages funcioned very well, but when I install
> WinXP, and configure the mysql, apache and php and I tested with
> the same pages I've used on W98 it's not working.
> Where is the configuring problem?
>
> If you need some of the files like php.ini and httpd.conf,
> tell me and I'll send you those files.
>
> Thxs for helping me!!!
>
> Alex
> ----- Original Message -----
> From: "Gryffyn, Trevor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: "Alejandro C�sar Garrammone" <[EMAIL PROTECTED]>
> Sent: Thursday, May 13, 2004 1:18 PM
> Subject: RE: [PHP-WIN] I've found the cause of the error but
> I cant fix it.
>
>
> If you're used to running on a system with register_globals
> turned ON then
> you might run into a snag with something like this since the
> GET and POST
> values aren't automatically assigned to the variables you're
> trying to echo.
>
> You need to do:
>
> $variablename = $_GET["variablename"];
>
> Or...
>
> $variablename = $_POST["variablename"];
>
> Or..
>
> $variablename = $_REQUEST["variablename"];
>
>
> The last one (REQUEST) will populate the $variablename
> variable with either
> GET or POST data so can be used for either. I forget the
> order that it
> takes it though, I believe it essentially does:
>
> If (isset($_POST["variablename"])) $variablename =
> $_POST["variablename"];
> If (isset($_GET["variablename"])) $variablename =
> $_GET["variablename"];
>
> (or vice versa)
>
> So if both $_POST["variablename"] and $_GET["variablename"]
> are both set,
> then the data stored in the GET overwrites the POST data
> previously assigned
> to $variablename.
>
>
> It IS possible to pass both POST and GET data at the same time:
>
> <form action="index.php?GETVARIABLE=testget" method="POST">
> <input type="text" name="POSTVARIABLE" value="testpost">
> </form>
>
>
> Var_dump($_REQUEST) will have both GETVARIABLE and POSTVARIABLE values
> ("testget" and "testpost" respectively) available where as
> $_GET only has
> the GETVARIABLE value ("testget") and $_POST only has the
> POSTVARIABLE value
> ("testpost")
>
> -TG
>
>
>
> > -----Original Message-----
> > From: Alejandro C�sar Garrammone [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 12, 2004 11:48 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] I've found the cause of the error but I
> > cant fix it.
> >
> >
> > Hi all,
> > The problem is the GET and the POST method.
> > I've create a simple form and I pass my name on it, on the
> > other hand, on the file referenced in the form, I put an echo
> > with the variable, and it doesn't print it. (I use GET, on
> > the link it shows it, but the variable is empty).
> >
> > How can I fix it?
> >
> > Best Regards,
> >
> > Alex
> >
>
>
>
--- End Message ---
--- Begin Message ---
I'm fairly new to php, hoping someone can help. I have a webpage that
displays records from a table. The problem is that viewing the page on via
any browser other than a browser directly on the server gives me a timeout
error. When run on the server, it's extremely fast. What am I doing wrong?
(I tried indexing the city fields). This is on a win2003 server.
The code is below.
<?
// open database connection
db_connect();
// generate and execute query
$query = "SELECT * FROM milage ORDER BY city";
$result = mysql_query($query) or die ("Error in query: $query. " .
mysql_error());
// if records present
if (mysql_num_rows($result) > 0)
{
// iterate through resultset
// print title with links to edit and delete scripts
while($row = mysql_fetch_object($result))
{
?>
<tr><td>
<font size="2"><b><? echo $row->city; ?></b></font></td>
<td>
<font size="2"><b><? echo $row->miles; ?></b></font></td>
<td><font size="2"><a href="edit.php?id=<? echo $row->cityid;
?>">Edit</a></td>
<td><a href="delete.php?id=<? echo $row->cityid;
?>">Delete</a></font></td>
</tr>
<?
}
}
// if no records present
// display message
else
{
?>
<font size="-1">No Locations Listed</font><p>
<?
}
// close connection
?>
--- End Message ---
--- Begin Message ---
Is the web server (IIS) giving you a timeout or is PHP? If it's PHP,
you can change your max execution time with "set_time_limit" or I
believe you can change it in your PHP.INI
If it's IIS, then I'm very familiar with the error. Hah. I work doing
data analysis and sometimes we deal with very large sets of data. I
think our IIS servers timeout after 10 minutes or so (CGI Timeout..blah
blah.. Script terminated).
Indexing should definitely help on the database side.
I don't see anything major with your script below (quick glance) except
for the fact that you don't have a beginning or ending <TABLE> tag. But
if all the data is sent, then IE is usually smart enough to make up for
a coding faux pas like that.
It's very odd that it runs fast on the server but times out on other
systems unless the other systems are significantly lesser machines than
the server. If it's a large table being sent, it can take a while to
render the table on the client side.
I guess what I'd do at this point is to try breaking it up a little.
Toss a WHERE clause in there and limit your recordset. Put some breaks
in the middle of the code to see if there's a certain segment of it
that's causing issues (You could try installing Zend Studio client and
server component and seeing if it's Profiler can show you were the
bottleneck is.. It's pretty slick. http://www.zend.com free trial on
the client and server).
Good luck though.. It's going to end up being something silly that
you're going to kick yourself for.. Hah..
-TG
> -----Original Message-----
> From: Andrew Staples [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 13, 2004 2:26 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Windows speed issue
>
>
> I'm fairly new to php, hoping someone can help. I have a webpage that
> displays records from a table. The problem is that viewing
> the page on via
> any browser other than a browser directly on the server gives
> me a timeout
> error. When run on the server, it's extremely fast. What am
> I doing wrong?
> (I tried indexing the city fields). This is on a win2003 server.
>
> The code is below.
>
> <?
> // open database connection
> db_connect();
> // generate and execute query
> $query = "SELECT * FROM milage ORDER BY city";
> $result = mysql_query($query) or die ("Error in query: $query. " .
> mysql_error());
> // if records present
> if (mysql_num_rows($result) > 0)
> {
> // iterate through resultset
> // print title with links to edit and delete scripts
> while($row = mysql_fetch_object($result))
> {
> ?>
> <tr><td>
> <font size="2"><b><? echo $row->city; ?></b></font></td>
> <td>
> <font size="2"><b><? echo $row->miles; ?></b></font></td>
> <td><font size="2"><a href="edit.php?id=<? echo $row->cityid;
> ?>">Edit</a></td>
> <td><a href="delete.php?id=<? echo $row->cityid;
> ?>">Delete</a></font></td>
> </tr>
> <?
> }
> }
> // if no records present
> // display message
> else
> {
> ?>
> <font size="-1">No Locations Listed</font><p>
> <?
> }
> // close connection
> ?>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Andrew Staples wrote:
I'm fairly new to php, hoping someone can help. I have a webpage that
displays records from a table. The problem is that viewing the page on via
any browser other than a browser directly on the server gives me a timeout
Out of curiosity, what is your time limit? It shouldn't matter, but I
was just curious.
error. When run on the server, it's extremely fast. What am I doing wrong?
(I tried indexing the city fields). This is on a win2003 server.
The code is below.
<?
// open database connection
db_connect();
// generate and execute query
$query = "SELECT * FROM milage ORDER BY city";
$result = mysql_query($query) or die ("Error in query: $query. " .
mysql_error());
// if records present
if (mysql_num_rows($result) > 0)
{
// iterate through resultset
// print title with links to edit and delete scripts
This loop is likely your culprit. How many rows are you returning? Is
it the result set that you expected to have?
while($row = mysql_fetch_object($result))
{
?>
<tr><td>
<font size="2"><b><? echo $row->city; ?></b></font></td>
<td>
<font size="2"><b><? echo $row->miles; ?></b></font></td>
<td><font size="2"><a href="edit.php?id=<? echo $row->cityid;
?>">Edit</a></td>
<td><a href="delete.php?id=<? echo $row->cityid;
?>">Delete</a></font></td>
</tr>
<?
}
}
--- End Message ---
--- Begin Message ---
> If it's IIS, then I'm very familiar with the error. Hah.
> I work doing data analysis and sometimes we deal with very
> large sets of data. I think our IIS servers timeout after
> 10 minutes or so (CGI Timeout..blah blah.. Script terminated).
IIS times out CGI application after 5 minutes - no matter weather
they sleep or not - you can't change this with php and you can't
change it in the IIS manager - it is coded into the MetaBase of
IIS, and PHP - as far as I know - does not support changes of the
MetaBase. Maybe something to suggest to the dev team?
--- End Message ---
--- Begin Message ---
Friends,
I have a dude, I can�t do make a PING to a server using PHP and
SHELL_EXEC command
The following code that i use is this
<!-- monitor.php -->
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="60">
</head>
<body>
<h2>Monitoring de Servers</h2>
<table border=1 cellspacing=3>
<tr>
<?php
$servidores = array (
"server1.com" => "200.215.128.83",
"server2.com" => "200.215.128.241"
);
while (list($site,$ip) = each($servidores)) {
$comando = "ping -n 1 " . $ip;
$salida = shell_exec($comando);
echo "<td>".$site."<br>".$ip."<br>"."Estado:";
if ( ereg("bytes of",$salida) ) {
echo "<b>online</b></td>";
} else {
echo "<font color=red><b>not in line</b></font></td>";
}
}
?>
</tr>
</table>
</body>
</html>
<!-- end -->
In Advance , Thanks
--- End Message ---