php-windows Digest 18 Jul 2003 07:30:37 -0000 Issue 1828
Topics (messages 20816 through 20827):
Sessions...
20816 by: Brian McGarvie
Re: open source php cms
20817 by: insite.zonnet.nl
20826 by: Stephen March
php, iis, securty warning
20818 by: Shena Delian O'Brien
20821 by: Shena Delian O'Brien
help with multiple select
20819 by: Fernando Soto
20820 by: John Ellingsworth
php4apache2.dll
20822 by: jsWalter
Re: Newbie Q
20823 by: Gabriel_k
Re: Fatal error with 'DB.php' - solution
20824 by: jsWalter
PHP and mod_perl and Apache2
20825 by: jsWalter
detect corrupt pdf
20827 by: Zac Barton
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 ---
I use a session for a syste to varify login...
However sometimes the session seems to timeout (as I'd expect) however it
seems random, sometimes it's within a few mins of 'inactivity' and other
times i have seen it not timing out if left 'logged in' overnight and
continue work in the morning.
How can I stop this and/or bring some kind of consistency?
Below is the session part of my php.ini with the comments stripped out to
save needless text :)
Thanks In Advance....
OS: Xeon 2Ghz, 1gb Ram, Windows 2000 Server - SP 4, NTFS disks types, PHP
Version 4.3.0RC3, IIS (4 is it that's on Win 2000).
[Session]
session.save_handler = files
session.save_path = C:\PHP\sessiondata ; argument passed to save_handler
session.use_cookies = 1
; session.use_only_cookies = 1
; Name of the session (used as cookie name).
session.name = PHPSESSID
session.auto_start = 0
; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0
session.cookie_path = /
; The domain for which the cookie is valid.
session.cookie_domain =
; Handler used to serialize data. php is the standard serializer of PHP.
session.serialize_handler = php
session.gc_probability = 1
session.gc_dividend = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
; Set to {nocache,private,public,} to determine HTTP caching aspects or
leave this empty to avoid sending anti-caching headers.
session.cache_limiter = nocache
; Document expires after n minutes.
session.cache_expire = 180
session.use_trans_sid = 0
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
--- End Message ---
--- Begin Message ---
Hi,
I am working with eZpublish.
http://www.ez.no
Not easy to get into but worth while.
Cheers,
Doris
Citeren "Croskerry, Dan" <[EMAIL PROTECTED]>:
> Can anyone recommend a good open source content management system? There
> are
> lots on the net but I would like to hear if anyone recommends one in
> particular.
>
> Many Thanks,
> Dan
>
--
_____________________________________________________________________
2x sneller ADSL met Zon Breedband Family. In combinatie met ZonTel
nu voor maar 29 euro per maand. Bestel nu op www.zonnet.nl/breedband
Bovendien met gratis modem en geen aansluitkosten!
--- End Message ---
--- Begin Message ---
I think "good" is a relative term in terms of what you are doing :)
I've been using PHP Nuke for a while (http://www.phpnuke.org), and it's
does have it's advantages.
*shrugs*
It's got a pretty huge user-base.
~Steve
[EMAIL PROTECTED] wrote:
Hi,
I am working with eZpublish.
http://www.ez.no
Not easy to get into but worth while.
Cheers,
Doris
Citeren "Croskerry, Dan" <[EMAIL PROTECTED]>:
Can anyone recommend a good open source content management system? There
are
lots on the net but I would like to hear if anyone recommends one in
particular.
Many Thanks,
Dan
--- End Message ---
--- Begin Message ---
Hi -
On my dev machine I have WinXP Pro, IIS, PHP4, mysql. I am using it to
test development before I upload it to the linux box (production server).
Everything seemed to be working great, all my pages serve just fine,
etc. Then I decide to add a new directory called "directory-dev" and
copy all the contents of "directory" over into that one, so that I can
make some serious changes on a "test" site.
So before I even make any changes I browse over to
http://localhost/directory-dev/login.php to log in and test to make sure
that it's working .. I get flummoxed immediately by a string of errors.
A popup window opens and says:
Unknown(): Unable to load dynamic library '/usr/lib/php4\imap.so' - the
specified module could not be found.
I read this and go "Of course it would not be found, because this is
WinXP and not linux. There's no /usr/lib/ anything!"
A succession of similar errors/popups ensue for the files ldap.so and
pgsql.so (may I reiterate that I'm using MySQL, not postgres?)
After the popup windows, it settles on this message:
Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This
means that a page will only be served up if the REDIRECT_STATUS CGI
variable is set, e.g. via an Apache Action directive.
For more information as to why this behaviour exists, see the manual
page for CGI security.
For more information about changing this behaviour or re-enabling this
webserver, consult the installation file that came with this
distribution, or visit the manual page.
PHP Warning: Unknown(): Unable to load dynamic library
'/usr/lib/php4\imap.so' - The specified module could not be found. in
Unknown on line 0 PHP Warning: Unknown(): Unable to load dynamic library
'/usr/lib/php4\ldap.so' - The specified module could not be found. in
Unknown on line 0 PHP Warning: Unknown(): Unable to load dynamic library
'/usr/lib/php4\pgsql.so' - The specified module could not be found. in
Unknown on line 0
So I look into the links... check out C:\Windows\php.ini and look for
the CGI-force_redirect and it is indeed set to zero, as it should.
Look.. no directory pointers to weird directories...
So.. I figure.. what the heck.. try renaming the directory from
"directory-dev" to "directory_dev", "directorydev"... to no avail... did
I mention that these same scripts work fine at "directory"????
Anybody willing to assist me in debugging this...??
--- End Message ---
--- Begin Message ---
Hi again -
The problem was that I'd backed up a previous (linux) copy of php.ini
into the "directory-dev" directory. I did not realize that php.ini files
inside of a particular directory overrode the c:/windows/php.ini file.
(I thought it would be ignored.)
So I deleted that file and now it all works as it should.
Shena Delian O'Brien wrote:
Hi -
On my dev machine I have WinXP Pro, IIS, PHP4, mysql. I am using it to
test development before I upload it to the linux box (production server).
Everything seemed to be working great, all my pages serve just fine,
etc. Then I decide to add a new directory called "directory-dev" and
copy all the contents of "directory" over into that one, so that I can
make some serious changes on a "test" site.
So before I even make any changes I browse over to
http://localhost/directory-dev/login.php to log in and test to make sure
that it's working .. I get flummoxed immediately by a string of errors.
A popup window opens and says:
Unknown(): Unable to load dynamic library '/usr/lib/php4\imap.so' - the
specified module could not be found.
I read this and go "Of course it would not be found, because this is
WinXP and not linux. There's no /usr/lib/ anything!"
A succession of similar errors/popups ensue for the files ldap.so and
pgsql.so (may I reiterate that I'm using MySQL, not postgres?)
After the popup windows, it settles on this message:
Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This
means that a page will only be served up if the REDIRECT_STATUS CGI
variable is set, e.g. via an Apache Action directive.
For more information as to why this behaviour exists, see the manual
page for CGI security.
For more information about changing this behaviour or re-enabling this
webserver, consult the installation file that came with this
distribution, or visit the manual page.
PHP Warning: Unknown(): Unable to load dynamic library
'/usr/lib/php4\imap.so' - The specified module could not be found. in
Unknown on line 0 PHP Warning: Unknown(): Unable to load dynamic library
'/usr/lib/php4\ldap.so' - The specified module could not be found. in
Unknown on line 0 PHP Warning: Unknown(): Unable to load dynamic library
'/usr/lib/php4\pgsql.so' - The specified module could not be found. in
Unknown on line 0
So I look into the links... check out C:\Windows\php.ini and look for
the CGI-force_redirect and it is indeed set to zero, as it should.
Look.. no directory pointers to weird directories...
So.. I figure.. what the heck.. try renaming the directory from
"directory-dev" to "directory_dev", "directorydev"... to no avail... did
I mention that these same scripts work fine at "directory"????
Anybody willing to assist me in debugging this...??
--- End Message ---
--- Begin Message ---
Hello there....
I'm trying to get the options selected from a multiple select list, but the
only one thing that i get is the first letter from one element, check this
please....
This is the form code.
<form name="form1" method="post" action="checaMultiple.php">
<p>
<select name="Multiplo" multiple size="3">
<option value="Fernando">Fernando</option>
<option value="Felipe">Felipe</option>
<option value="Felix">Felix</option>
<option value="Carlos">Carlos</option>
<option value="Eli">Eli</option>
</select>
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
and this is the code where i try to get the options selected
$multiplo = $_POST['Multiplo'];
echo "Cuantos seleccionados: " . count($multiplo); // In this line I
always get 1
$j = 0;
while($j<count($multiplo)){
echo "No: " . $j . ", " . $multiplo[$j];
$j++;
}
If I select only one element, i get the first letter of that element, but if
I select two or more elements i get the first letter of the last element
selected.
Can somebody tell me what's wrong?
Thanks in advance..
eLFeR....
--- End Message ---
--- Begin Message ---
>From the page where I allow multiple keyword submissions:
echo "<SELECT MULTIPLE SIZE=10 name=keyword[] class=select>\n";
$sql->Query("SELECT idKeyword AS idKeyword, keyword AS keyword FROM
Keyword WHERE (keyword <> '') ORDER BY keyword");
$rowcount = $sql->rows;
for ($i=0; $i < $rowcount; $i++) {
$sql->Fetch($i);
$thumbkeyword = $sql->data["keyword"];
$thumbkeywordUpper = ucwords($sql->data["keyword"]);
echo "<option value=\"$thumbkeyword\">$thumbkeywordUpper\n";
}
echo "</SELECT><BR /><BR />\n";
// NOTE THE name=keyword[] in the SELECT line
The page that retrieves the values:
$keyword = $_POST["keyword"];
if(is_array($keyword))
{
for($i=0; $i<count($keyword); $i++)
{
SQL COMMAND here
}
}
Hope this helps.
Thanks,
John Ellingsworth
http://ellingsworth.org/john/
-----Original Message-----
From: Fernando Soto [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 11:41 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] help with multiple select
Hello there....
I'm trying to get the options selected from a multiple select list, but the
only one thing that i get is the first letter from one element, check this
please....
This is the form code.
<form name="form1" method="post" action="checaMultiple.php">
<p>
<select name="Multiplo" multiple size="3">
<option value="Fernando">Fernando</option>
<option value="Felipe">Felipe</option>
<option value="Felix">Felix</option>
<option value="Carlos">Carlos</option>
<option value="Eli">Eli</option>
</select>
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
and this is the code where i try to get the options selected
$multiplo = $_POST['Multiplo'];
echo "Cuantos seleccionados: " . count($multiplo); // In this line I
always get 1
$j = 0;
while($j<count($multiplo)){
echo "No: " . $j . ", " . $multiplo[$j];
$j++;
}
If I select only one element, i get the first letter of that element, but if
I select two or more elements i get the first letter of the last element
selected.
Can somebody tell me what's wrong?
Thanks in advance..
eLFeR....
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
What part of phpinfo.php tells me that mod_php4 is loaded and running on my
Apache2/PHP 4.3.2 Win 2k system?
php.conf (apache conf):
# Windows Win32 version
LoadModule php4_module modules/php4apache2.dll
LoadFile "/etc/php/php4ts.dll"
NOTE: pls, no comments on the lack of volume letter,
this works if Apache *and* php are on the same volume.
phpinfo - apache2handler: Loaded Modules:
core mod_win32 mpm_winnt
http_core mod_so mod_access
mod_actions mod_alias mod_asis
mod_auth mod_autoindex mod_cgi
mod_dir mod_env mod_imap
mod_include mod_isapi mod_log_config
mod_mime mod_negotiation mod_setenvif
mod_userdir sapi_apache2 mod_ssl
thanks
walter
--- End Message ---
--- Begin Message ---
Hey man, I tried using PHP_SELF and PATH_INFO, but they both got this error
message:
Notice: Use of undefined constant PHP_INFO - assumed 'PHP_INFO' in
C:\Fedde\Share\Bilder- Resa\Tyskland-Alemania\Tisdag-Martes\Index.php on
line 46
I found path_info when using phpinfo(), but not php_info.
What am I doing wrong?
/Gabbah
"H Marc Bower" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Well, if you want the path as far as the website is concerned, use
> dirname($PHP_SELF). If you want the absolute file system path, use
> getcwd().
>
> Example:
>
> Files located on server at
> D:\wwwroot\files\uploads\here
> By website address at:
> http://yourserver.com/files/uploads/here
> File being accessed:
> http://yourserver.com/files/uploads/here/file.php
>
> <?php
> $title = dirname($PHP_SELF);
> ?>
>
> This will set $title to
> /files/uploads/here
>
> <?php
> $title = getcwd();
> ?>
>
> This will set $title to
> D:\wwwroot\files\uploads\here
>
> Depends on what value you actually want to use.
>
> (V)
>
> ----- Original Message -----
> From: "Gabriel_k" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 16, 2003 8:18 AM
> Subject: Re: [PHP-WIN] Re: Newbie Q
>
>
> > Well, I want my php script to put the TITLE of a html page to the name
of
> > the directory the script is in.
> >
> > /Gabbah
> >
> > "H Marc Bower" <[EMAIL PROTECTED]> skrev i meddelandet
> > news:[EMAIL PROTECTED]
> > > Um... the file in which you put that command should be there... :)
> > >
> > > What is the purpose for knowing the directory name? Maybe there is
> > > something else you can tell us that will get you the answer you're
> looking
> > > for.
> > >
> > > (V)
> > >
> > > ----- Original Message -----
> > > From: "Gabriel_k" <[EMAIL PROTECTED]>
> > > > What if there is no file?
> > > > "Heyz" <[EMAIL PROTECTED]> skrev i meddelandet
> > > > > It's simple.
> > > > >
> > > > > dirname(__FILE__)
> > >
> > >
> > >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
--- End Message ---
--- Begin Message ---
"Jswalter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> OK, I solved it.
>
> It seems that I **HAVE TO**, **MUST**, **NO CHOICE** place my php.ini in
> C:\WINNT (for NT and 2k) or PHP will not find it. This is a hardcoded path
> done at compile time.
OK, correction, if your interested.
By placing an environmental variable in your system PHPRC and then placing
%PHPRC% in your PATH, Windows will now let PHP open the php.ini in the php
directory! Either from Apache *or* php.exe!
OK, now I'm happy. the ini is now OUT of the windows directory.
Thanks for all who gave advice.
Walter
--- End Message ---
--- Begin Message ---
Anyone have any idea why I can't run PHP and mod_perl in the same web
structure?
I am getting this in my error log...
[Thu Jul 17 14:02:07 2003] [error] 2508: ModPerl::Registry:
Unterminated <> operator at G:/home/walter/htdocs/test.php line 1.
Why would Apache be trying to run mod_perl for PHP scripts?
This is my php file...
<?php
echo "My simple little PHP test page!", "<p>";
?>
Any ideas?
And yes, it worked before I installed mod_perl
thanks
walter
--
In heaven an angel is nobody in particular.
- George Bernard Shaw
--- End Message ---
--- Begin Message ---
hey there
i was wondering if anyone knows how to detect that a dynamic generated pdf
(php 4.3 with pdflib) is corrupt?
it seems that if u use pdf_open_file($pdf,"c:\winnt\temp\test.pdf"); and
there is a fatal error in the script that the pdf file is actually generated
(when infact you dont want it to be, hence detecting that the pdf file is
corrupt)
i have tried to delete the pdf file (as i can assume that if the file is not
created, or not there, there was an error) when an error is encountered with
set_error_handler("catcherror"); but it doesnt seem to be doing the job,
prolly because you cant capture E_ERROR's.
i also thought of using pdf_open_pdi(); function, but it doesnt seem to be
included in the php_pdf.dll.
so does anyone have any ideas on how to check if a pdf file is corrupt?
also does anyone know how to capture ALL errors, even fatal ones
(E_ERROR's)?
thanks
Zac
--- End Message ---