php-windows Digest 26 Feb 2003 21:36:28 -0000 Issue 1607
Topics (messages 18708 through 18721):
Re: newbie BASIC sessions...
18708 by: Robert Nürnberg
Re: Disable FTP in Win32 Binary ?
18709 by: speedfreak.chello.be
Re: Subject: Disable FTP in Win32 Binary ?
18710 by: Neil Smith
18712 by: Per Lundberg
Re: Duplicate entry removal
18711 by: Michael Power
newbie: installing php_gd
18713 by: Anthony Ritter
18715 by: Rich Gray
18716 by: Anthony Ritter
18717 by: Rich Gray
18719 by: Anthony Ritter
Is ASP.NET faster than php?
18714 by: Charles P. Killmer
Installing php_domxml.dll extension
18718 by: Richard Shearn
Send mail
18720 by: Orlando Castañeda
not serving css styles?, css not showing up on local dev box
18721 by: Beach, Jim
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 ---
>From php.net ():
http://www.php.net/manual/en/function.session-is-registered.php
Note: If $_SESSION (or $HTTP_SESSION_VARS for PHP 4.0.6 or less) is
used, use isset() to check a variable is registered in $_SESSION
The code that should work:
(You may not need to add SID to your link, depending on your php config)
S1.PHP:
<?php
session_start();
$_SESSION['userid']="joe";
echo ("<A HREF=\"s2.php?".SID."\">s1</A></P>");
?>
S2.PHP:
<?php
session_start();
if (!isset($_SESSION['userid'])) {
echo "userid not set";
} else {
echo ($_SESSION['userid']." is the NAME");
}
?>
-----Original Message-----
From: Leo G. Divingracia III [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 1:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] newbie BASIC sessions...
okay, i'm stumped as heck. i cant seem to get it this to work. using
win2k, apache 1.3.x, php4.3.0, registers_globals OFF.
S1.PHP:
<?php
session_start();
//$userid = "blow";
//session_register ('userid');
$_session['userid']="joe";
echo (' <A HREF="s2.php">s1</A></P>');
?>
S2.PHP:
<?php
session_start();
if (!session_is_registered ("userid"))
{
echo ("not registered");
}
else
{
if (!isset($_session['userid']))
{echo "userid not set";}
else
{
echo ($_session['userid']." is the NAME");
session_unregister ('userid');
}
}
?>
result is "userid not set" each time.
am i missing something so basic here?
i've read through the RTFMs, various web sites describing sessions,
etc...
thanks...
--
Leo G. Divinagracia III
[EMAIL PROTECTED]
zzzzz
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Greg wrote:
> Hi!
>
> Can someone provide guidance on how to disable FTP in the Win32 Binary
> version?
>
> (The IT Security team at my workplace does not permit FTP. We may not be
> able to use PHP unless FTP is disabled, but haven't figured out how to do it
> on the Win32 binary version.)
>
> Any assistance would be greatly appreciated.
>
> Thanks,
>
> Greg
Take a look at php.ini. There's a directive called 'disable_functions' which
allows you to disable certain functions for security reasons. It receives a
comma separated list of function names. This directive is *NOT* affected by
whether Safe Mode is turned on or off.
Cheers!
speedfreak at chello dot be
--- End Message ---
--- Begin Message ---
Easy enough to do (my ISP does this) : Look up disable_functions in
http://www.php.net/manual/en/features.safe-mode.php
You need to set in your php.ini file a list of disallowed functions (just
add the function_name for FTP functions to the list). You can of course do
this better by per-site configuration in Apache httpd.conf
phpinfo() will also list the disabled functions which have been set, so
your users are informed what is and is not available.
Hope that helps,
Regards - Neil Smith.
At 06:57 26/02/2003 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
From: "greg" <[EMAIL PROTECTED]>
Date: Tue, 25 Feb 2003 15:28:14 -0500
Subject: Disable FTP in Win32 Binary ?
Hi!
Can someone provide guidance on how to disable FTP in the Win32 Binary
version?
(The IT Security team at my workplace does not permit FTP. We may not be
able to use PHP unless FTP is disabled, but haven't figured out how to do it
on the Win32 binary version.)
Any assistance would be greatly appreciated.
Thanks,
Greg
--- End Message ---
--- Begin Message ---
On Wed, 2003-02-26 at 10:48, Neil Smith wrote:
> Easy enough to do (my ISP does this) : Look up disable_functions in
> http://www.php.net/manual/en/features.safe-mode.php
>
> You need to set in your php.ini file a list of disallowed functions (just
> add the function_name for FTP functions to the list). You can of course do
> this better by per-site configuration in Apache httpd.conf
This is not enough to stop FTP; it is easy to write an FTP client in PHP
if someone wanted to. What you would effectively need to stop is all
socket access from PHP.
--
Best regards,
Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.capio.com
signature.asc
Description: This is a digitally signed message part
--- End Message ---
--- Begin Message ---
Better yet define the required dataset with SQL to speed the whole process
up:
"SELECT YEAR(your_date) FROM table_name GROUP BY your_date";
Cheers
Mike
> "Matt Hillebrand"
> array_unique()
>
> |-----Original Message-----
> |From: Per Christian [mailto:[EMAIL PROTECTED]
> |
> |Hi
> |
> |I'm building a PHP project for fun, and are going to get some
> |dates from my database (mysql). The problem is that I only
> |want the year, but the date is in the format YYYY-MM-DD so I
> |get the whole column and remove the -MM-DD part, but now I
> |have a lot of the same year Is there a function or some code
> |that removes duplicate entries from a array?
> |
> |Best Regards,
> |Per Christian
--- End Message ---
--- Begin Message ---
Using MS Win 98 / PHP 4 and Apache.
I tried running the following script but got an undefined call to:
ImageCreate()
The following copy is located in my php.ini file...one of which is:
..............
;extension=php_gd.dll
..................
I tried uncommenting this line to no avail.
What is the best way to install php_gd.dll so that I can make use of the
image library.
Many thanks.
Tony Ritter
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; if you wish to have an extension loaded automaticly, use the
; following syntax: extension=modulename.extension
; for example, on windows,
; extension=msql.dll
; or under UNIX,
; extension=msql.so
; Note that it should be the name of the module only, no directory
information
; needs to go here. Specify the location of the extension with the
extension_dir directive above.
;Windows Extensions
;extension=php_mysql.dll
;extension=php_nsmail.dll
;extension=php_calendar.dll
;extension=php_dbase.dll
;extension=php_filepro.dll
;extension=php_gd.dll
;extension=php_dbm.dll
;extension=php_mssql.dll
;extension=php_zlib.dll
;extension=php_filepro.dll
;extension=php_imap4r2.dll
;extension=php_ldap.dll
;extension=php_crypt.dll
;extension=php_msql2.dll
;extension=php_odbc.dll
--- End Message ---
--- Begin Message ---
Tony
Is the php.ini directive extensions_dir set correctly?
Rich
> Using MS Win 98 / PHP 4 and Apache.
>
> I tried running the following script but got an undefined call to:
>
> ImageCreate()
>
> The following copy is located in my php.ini file...one of which is:
>
> ..............
> ;extension=php_gd.dll
> ..................
>
> I tried uncommenting this line to no avail.
>
> What is the best way to install php_gd.dll so that I can make use of the
> image library.
> Many thanks.
>
> Tony Ritter
>
--- End Message ---
--- Begin Message ---
In my php.ini file, this is what it looks like:
..........................
extension_dir = C:\php4\extensions\ ; directory in which the loadable
extensions (modules) reside
extension=php_gd.dll
...........................
Thank you,
TR
--- End Message ---
--- Begin Message ---
Does it work if you have it like this...
extension_dir = C:/php4/extensions
Rich
> -----Original Message-----
> From: Anthony Ritter [mailto:[EMAIL PROTECTED]
> Sent: 26 February 2003 16:58
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] newbie: installing php_gd
>
>
> In my php.ini file, this is what it looks like:
> ..........................
>
> extension_dir = C:\php4\extensions\ ; directory in which the loadable
> extensions (modules) reside
>
> extension=php_gd.dll
> ...........................
>
> Thank you,
> TR
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
Rich,
On MS Win 98 / Apache / PHP 4
If somebody out there using Win can check my php.ini file and advise me what
I'm doing wrong.
I have uncommented:
..............
extension=php_gd.dll
..................
and have included:
..................
extension_dir = C:\php4\extensions
....................
I run the php script:
<?
header("Content-type:image/png");
$image=imagecreate(200,200);
imagepng($image);
?>
....................
I receive:
X-Powered-By: PHP/4.0.0 Content-type:image/png
Fatal error: Call to undefined function: imagecreate() in c:\program
files\apache group\apache\htdocs\image.php on line 3
Thank you.
TR
...........................................
// this is in my php.ini file:
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
include_path = ; UNIX: "/path1:/path2" Windows:
"\path1;\path2"
doc_root = ; the root of the php pages, used only if nonempty
user_dir = ; the directory under which php opens the script using
/~username, used only if nonempty
;upload_tmp_dir = ; temporary directory for HTTP uploaded
files (will use system default if not specified)
upload_max_filesize = 2097152 ; 2 Meg default limit on file uploads
extension_dir = C:\php4\extensions ; directory in which the loadable
extensions (modules) reside
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; if you wish to have an extension loaded automaticly, use the
; following syntax: extension=modulename.extension
; for example, on windows,
; extension=msql.dll
; or under UNIX,
; extension=msql.so
; Note that it should be the name of the module only, no directory
information
; needs to go here. Specify the location of the extension with the
extension_dir directive above.
;Windows Extensions
;extension=php_mysql.dll
;extension=php_nsmail.dll
;extension=php_calendar.dll
;extension=php_dbase.dll
;extension=php_filepro.dll
extension=php_gd.dll
;extension=php_dbm.dll
;extension=php_mssql.dll
;extension=php_zlib.dll
;extension=php_filepro.dll
;extension=php_imap4r2.dll
;extension=php_ldap.dll
;extension=php_crypt.dll
;extension=php_msql2.dll
;extension=php_odbc.dll
....................................
//this is the php script:
<?
header("Content-type:image/png");
$image=imagecreate(200,200);
imagepng($image);
?>
...............................
//this is what I get:
X-Powered-By: PHP/4.0.0 Content-type:image/png
Fatal error: Call to undefined function: imagecreate() in c:\program
files\apache group\apache\htdocs\image.php on line 3
--- End Message ---
--- Begin Message ---
I love php but I must choose the fastest scripting language. Without
going to extremes like c++ compiled. At least not until I get a library
that provides most of the things that make php convenient.
Does anyone have any thoughts about PHP vs ASP.NET?
Charles Killmer
--- End Message ---
--- Begin Message ---
I am trying to install php_domxml.dll and get the error:
Unknown(): Unable to load dynamic library
'c:\php\extensions\php_domxml.dll' - The specified procedure could not
be found.
libxml2.dll and iconv.dll are in my c:\windows\system32 directory
I have edited php.ini setting extension_dir = "c:\php\extensions" and
"extension=php_domxml.dll".
I have searched the archives and seen this problem reported many times
but have not seen a resolution posted
Can anyone help?
Richard
--- End Message ---
--- Begin Message ---
I am trying to send an e-mail like this:
<?php
$to = "[EMAIL PROTECTED]";
$subject = "xsubject";
$message = "x data";
mail ($to, $subject, $message);
?>
There are no errors, but the e-mail is never sent !
I apreciate any help !
Tito
[EMAIL PROTECTED]
[EMAIL PROTECTED]
ICQ # 32019090
--- End Message ---
--- Begin Message ---
Win98, Apache 1.3.20, PHP 4.06.
I realize this isn't an Apache forum but you folks are a very helpful
bunch and PHP and Apache are like peas in a pod so I though I'd give it
a try here.
My CSS styles don't display on my dev box but they show up just fine
from my web host. In other words, the assigned font style for a link is
verdana, black, 9px, no underline. At home it shows up as the default
Times New Roman, black, size 2, blue underline. But when uploaded and
served from my web host it displays properly in any browser.
My default browser for development is Mozilla but the same problem
occurs when I try it with IE6. That makes me think it's an Apache config
thing.
I've searched all topics in a couple of forums and the Apache.org docs.
Does anyone have an idea?
Thank you for your indulgence.
Jim
--- End Message ---