php-windows Digest 1 Nov 2001 21:40:17 -0000 Issue 833
Topics (messages 10144 through 10165):
Apache not running correctly
10144 by: Laura Varney
10145 by: Ross Fleming
10146 by: Svensson, B.A.T.
10147 by: Svensson, B.A.T.
10149 by: DL Neil
File Upload on Win2K
10148 by: Joseph Koenig
10161 by: Joseph Koenig
Utility script: dates
10150 by: DL Neil
10151 by: Michel Laine
POST & REFERER problem
10152 by: Michel Laine
10162 by: Ross Fleming
4.0.6 mssql.dll Extension load failure
10153 by: Mike
10154 by: Erik H. Mathy
10155 by: Mize, Robert
10156 by: Mike
storing multidimensional array
10157 by: afan
include("remote host") under w2k problem
10158 by: Marek Wysmulek
10160 by: Ross Fleming
a'propos: include("remote host") under w2k problem
10159 by: Marek Wysmulek
Re: PHP.ini problems
10163 by: Jason Wood
Login-System
10164 by: Karl S. Løland
ADODB - FieldCount? Where is it????
10165 by: Asendorf, John
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]
----------------------------------------------------------------------
I have installed apache onto my machine (W2K)
but when i type "localhost" in IE5 it says page
cannot be found, apache is running as a console window
I think this means Apache is not running correctly
I have added these lines to my httpd.conf file:
LoadModule php4_module /php/sapi/php4apache.dll
AddType application/x-httpd-php .php4 .php .phtml
AddType application/x-httpd-php-source .phps
PHP is installed in the above location e:/php
I have done this process before but i never encountered this problem.
Any suggestions/ideas?
What port have you got apache set up to use? What "file not found" page
are you getting?
Ross
Laura Varney wrote:
>
> I have installed apache onto my machine (W2K)
> but when i type "localhost" in IE5 it says page
> cannot be found, apache is running as a console window
>
> I think this means Apache is not running correctly
>
> I have added these lines to my httpd.conf file:
> LoadModule php4_module /php/sapi/php4apache.dll
> AddType application/x-httpd-php .php4 .php .phtml
> AddType application/x-httpd-php-source .phps
>
> PHP is installed in the above location e:/php
>
> I have done this process before but i never encountered this problem.
>
> Any suggestions/ideas?
Does 'ping localhost' work?
-----Original Message-----
From: Laura Varney
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 2001-11-01 11:24
Subject: [PHP-WIN] Apache not running correctly
I have installed apache onto my machine (W2K)
but when i type "localhost" in IE5 it says page
cannot be found, apache is running as a console window
On second thought: which pages do you excatly try to access?
The defualt? Is there any defualt pages set, and does the page exist?
-----Original Message-----
From: Laura Varney
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 2001-11-01 11:24
Subject: [PHP-WIN] Apache not running correctly
I have installed apache onto my machine (W2K)
but when i type "localhost" in IE5 it says page
cannot be found, apache is running as a console window
I have installed apache onto my machine (W2K)
but when i type "localhost" in IE5 it says page
cannot be found, apache is running as a console window
I think this means Apache is not running correctly
I have added these lines to my httpd.conf file:
LoadModule php4_module /php/sapi/php4apache.dll
AddType application/x-httpd-php .php4 .php .phtml
AddType application/x-httpd-php-source .phps
PHP is installed in the above location e:/php
Laura,
What is on the Apache.conf "DirectoryIndex" line?
Also do you have a ScriptAlias /php/ "e:/PHP/" somewhere?
=dn
Hi,
I know this is a question asked all the time and but this one's got me
confused. I'm attempting to have a form upload an image. Simple enough.
The file gets moved up to the temp directory just fine. If I echo the
file, I get something like "F:\PHP\uploadtemp\php56.tmp", which is right
where it should be. Everything is fine till I try to move the uploaded
file. I'm using:
$move = move_uploaded_file($values["image"][$i],
"F:/www.riverotters.com/admin/pics/db/emails/$media_name");
and, yes, the file will come in an array called "image" inside an array
called "values". Is there a problem with passing it via a
multidimensional array like that? I just can't figure out why this one
isn't working. Any clues would be greatly appreciated. Please CC me on
any responses. Thanks,
Joe
I've been working on this all day and still am no further than I was
this morning. I'm pulling my hair out. In php.ini, the upload_tmp_dir is
set to "F:\PHP\uploadtemp", which is right where it should be. When I
upload a file, if I echo it, I get the path to the file, however, when I
go into the server to view the file, it's not there. It's nowhere to be
found. Doing a search on the server won't even bring up the file. It's
like it's going up to temp and then being removed immediately. If I try
and move it, it just disappears, too. Is there some funky permissions
thing or something I'm missing? Thanks (please CC me on all replies),
Joe
> > Hi,
> >
> > I know this is a question asked all the time and but this one's got me
> > confused. I'm attempting to have a form upload an image. Simple enough.
> > The file gets moved up to the temp directory just fine. If I echo the
> > file, I get something like "F:\PHP\uploadtemp\php56.tmp", which is right
> > where it should be. Everything is fine till I try to move the uploaded
> > file.
Somewhere on my travels around the many PHP/script sites, I'm sure that at one time I
noticed a date-display
utility. I cannot find it again. Please would someone point the way...
What I'm looking for:
displays a form with a variety of date/time fields, user enters a date/time into
various fields -
utility returns with equivalent values/formats, eg timestamp to calendar, local to
GMT, date to day of week,
etc.
Please advise,
=dn
Is this what you needed?
Don't remember where i found this - so i attached it to this email.
--
Michel Laine
************************************
DESCRIPTION:
What is Date_Calc?
Date_Calc is a calendar class used to calculate and
manipulate calendar dates and retrieve dates in a calendar
format. It does not rely on 32-bit system date stamps, so
you can display calendars and compare dates that date
pre 1970 and post 2038.
Some of Date_Calc's features:
* comparing number of days between arbitrary dates
* validating dates
* calculating leap years
* calculating the day of the week
* calculating week of the year
* calculating first and last days of the month
* calculating next/prev week day
* calculating arrays of days for use in calendar displays
CLASS METHODS:
dateNow($format="%Y%m%d")
isValidDate($day,$month,$year)
isLeapYear($year="")
isFutureDate($day,$month,$year)
isPastDate($day,$month,$year)
dayOfWeek($day="",$month="",$year="")
weekOfYear($day,$month,$year)
julianDate($day="",$month="",$year="")
quarterOfYear($day="",$month="",$year="")
beginOfNextMonth($day="",$month="",$year="",$format="%Y%m%d")
endOfNextMonth($day="",$month="",$year="",$format="%Y%m%d")
beginOfPrevMonth($day="",$month="",$year="",$format="%Y%m%d")
endOfPrevMonth($day="",$month="",$year="",$format="%Y%m%d")
nextWeekday($day="",$month="",$year="",$format="%Y%m%d")
prevWeekday($day="",$month="",$year="",$format="%Y%m%d")
function
nextDayOfWeek($dow,$day="",$month="",$year="",$format="%Y%m%d",$onOrAfter=false)
function
prevDayOfWeek($dow,$day="",$month="",$year="",$format="%Y%m%d",$onOrAfter=false)
function nextDayOfWeekOnOrAfter($dow,$day="",$month="",$year="",$format="%Y%m%d")
function prevDayOfWeekOnOrBefore($dow,$day="",$month="",$year="",$format="%Y%m%d")
nextDay($day="",$month="",$year="",$format="%Y%m%d")
prevDay($day="",$month="",$year="",$format="%Y%m%d")
defaultCentury($year)
dateDiff($day1,$month1,$year1,$day2,$month2,$year2)
daysInMonth($month="",$year="")
weeksInMonth($month="",$year="")
firstOfMonthWeekday($month="",$year="")
beginOfMonth($month="",$year="",$format="%Y%m%d")
beginOfWeek($day="",$month="",$year="",$format="%Y%m%d")
endOfWeek($day="",$month="",$year="",$format="%Y%m%d")
beginOfNextWeek($day="",$month="",$year="",$format="%Y%m%d")
beginOfPrevWeek($day="",$month="",$year="",$format="%Y%m%d")
getCalendarWeek($day="",$month="",$year="",$format="%Y%m%d")
getCalendarMonth($month="",$year="",$format="%Y%m%d")
getCalendarYear($year="",$format="%Y%m%d")
dateToDays($day,$month,$year)
daysToDate($days,$format="%Y%m%d")
NWeekdayOfMonth($occurance,$dayOfWeek,$month,$year,$format="%Y%m%d")
dateFormat($day,$month,$year$format)
getYear()
getMonth()
getDay()
getMonthFullname($month)
getMonthAbbrname($month,$length=3)
getWeekdayFullname($day="",$month="",$year="")
getWeekdayAbbrname($day="",$month="",$year="",$length=3)
*******************************
Dl Neil wrote:
> Somewhere on my travels around the many PHP/script sites, I'm sure that at one time
>I noticed a date-display
> utility. I cannot find it again. Please would someone point the way...
>
> What I'm looking for:
> displays a form with a variety of date/time fields, user enters a date/time into
>various fields -
> utility returns with equivalent values/formats, eg timestamp to calendar, local to
>GMT, date to day of week,
> etc.
>
> Please advise,
> =dn
Date_Calc-1.2.4.tar.gz
I need some guidance on the following problem.
I have a setup where the usage flow is (kinda) like this:
Page A ----\ /----\
| ---- Login -+-- [done login]
Page B ----/ |
\ \ (back to calling page) /
--------------------------------
Nice ascii art, heh?
Description:
I have a working session / authorization system which i want to add a
feature to.
A user who (either from page A or B) wants to login.
The user (if not logged in allready) gets presented a loginscreen
(login).
To login the user POST the login & pwd to the login page (to itself) for
validation.
If the login is successful i want to present the user with a link back
to the initial page (A or B).
How can i do this?
All i get from $HTTP_REFERER after the login page is - the login page.
I know that i must save the reference as the login page gets called the
first time, but i haven't managed to get something to work yet.
Any helpful soul out there?
--
Michel Laine
Right if I understand this right, then I think this should do the trick:
In your href tags to the login page (say login.php) should look like this:
<A HREF="login.php?came_from=A">Click to login</A> for page A and
<A HREF="login.php?came_from=B">Click to login</A> for page B.
Your login page will now have a variable called $came_from containing either
A or B. Now you just want to test this variable and print out another href
depending on what came_from is:
if ($came_from=="A") print("<A HREF=\"pageA.html\">Click here to be
returned</A>");
if ($came_from=="B") print("<A HREF=\"pageB.html\">Click here to be
returned</A>");
Will that do?
Ross
-----Original Message-----
From: Michel Laine [mailto:[EMAIL PROTECTED]]
Sent: 01 November 2001 16:31
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] POST & REFERER problem
I need some guidance on the following problem.
I have a setup where the usage flow is (kinda) like this:
Page A ----\ /----\
| ---- Login -+-- [done login]
Page B ----/ |
\ \ (back to calling page) /
--------------------------------
Nice ascii art, heh?
Description:
I have a working session / authorization system which i want to add a
feature to.
A user who (either from page A or B) wants to login.
The user (if not logged in allready) gets presented a loginscreen
(login).
To login the user POST the login & pwd to the login page (to itself) for
validation.
If the login is successful i want to present the user with a link back
to the initial page (A or B).
How can i do this?
All i get from $HTTP_REFERER after the login page is - the login page.
I know that i must save the reference as the login page gets called the
first time, but i haven't managed to get something to work yet.
Any helpful soul out there?
--
Michel Laine
--
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]
We have PHP installed as an ISAP module on our W2K IIS5 server and
its operational with no problems - phpinfo() runs just fine.
But - When I uncomment the php_mssql.dll extension in php.ini I get an error
when PHP starts up saying it cannot find the .dll file.
The extension directory is correctly set to, c:\php\extensions
and the actual file itself is in that directory as wells as
c:\winnt\system32 and MSSQL client libraries are loaded and operational.
Cant think of anything else I need to do - does the .dll file need
be registered with regsrvr or something ??
Can anybody give me some pointers please this problem is driving me nuts -
I even tried reversing the slashes to the UNIX way !
Thanks & rgds
Mike
[EMAIL PROTECTED]
Do you have the MSSQL client installed on that box?
- Erik
> -----Original Message-----
> From: Mike [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 01, 2001 10:45 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP-WIN] 4.0.6 mssql.dll Extension load failure
>
>
> We have PHP installed as an ISAP module on our W2K IIS5 server and
> its operational with no problems - phpinfo() runs just fine.
>
> But - When I uncomment the php_mssql.dll extension in php.ini I
> get an error
> when PHP starts up saying it cannot find the .dll file.
>
> The extension directory is correctly set to, c:\php\extensions
> and the actual file itself is in that directory as wells as
> c:\winnt\system32 and MSSQL client libraries are loaded and operational.
>
> Cant think of anything else I need to do - does the .dll file need
> be registered with regsrvr or something ??
>
> Can anybody give me some pointers please this problem is driving
> me nuts -
> I even tried reversing the slashes to the UNIX way !
>
> Thanks & rgds
>
> Mike
> [EMAIL PROTECTED]
>
>
>
>
> --
> 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]
>
check to make sure you have extension_dir = c:\php\extensions or
c:\winnt\system32 (whereever you are loading the dlls) in php.ini
-----Original Message-----
From: Mike [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 01, 2001 11:45 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-WIN] 4.0.6 mssql.dll Extension load failure
We have PHP installed as an ISAP module on our W2K IIS5 server and
its operational with no problems - phpinfo() runs just fine.
But - When I uncomment the php_mssql.dll extension in php.ini I get an
error
when PHP starts up saying it cannot find the .dll file.
The extension directory is correctly set to, c:\php\extensions
and the actual file itself is in that directory as wells as
c:\winnt\system32 and MSSQL client libraries are loaded and operational.
Cant think of anything else I need to do - does the .dll file need
be registered with regsrvr or something ??
Can anybody give me some pointers please this problem is driving me
nuts -
I even tried reversing the slashes to the UNIX way !
Thanks & rgds
Mike
[EMAIL PROTECTED]
--
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]
Finally realised what was wrong - You need to manually copy ALL the SQL
Server client network files from the sqlServer box into the system32
directory on the PHP/IIS server box. - then magically the module loads and
works - Using a regular SQL client install some of the files tha PHP needs
dont get installed.
This was NOT straightforward to fix.
On researching this problem - there are lots and lots of people who have had
this error - how do we get the fix posted to an FAQ for php/IIS/SQLServer
configs ?
Thanks to all those who helped out on this.
Rgds
Mike
"Dl Neil" <[EMAIL PROTECTED]> wrote in message
news:0f9701c162f7$f7170650$a516100a@jrbrown...
> Mike,
>
> > We have PHP installed as an ISAP module on our W2K IIS5 server and
> > its operational with no problems - phpinfo() runs just fine.
> >
> > But - When I uncomment the php_mssql.dll extension in php.ini I get an
error
> > when PHP starts up saying it cannot find the .dll file.
> >
> > The extension directory is correctly set to, c:\php\extensions
> > and the actual file itself is in that directory as wells as
> > c:\winnt\system32 and MSSQL client libraries are loaded and operational.
>
> I found that PHP was adding the slash between the dir name and the
extension's filename, and that caused a
> problem such as you have described - so did adding a slash as the final
character. Here is the code that works
> on my WinNT4.0/Apache set up (watch the dir diff):
>
> extension_dir = C:/program files/php/extensions
>
> > Cant think of anything else I need to do - does the .dll file need
> > be registered with regsrvr or something ??
>
> =no
>
> > Can anybody give me some pointers please this problem is driving me
nuts -
> > I even tried reversing the slashes to the UNIX way !
>
> =um, don't like the sound of that...
> =dn
>
>
Hi to all,
I created the way to set multidimensional array into database using
serialize function. Code looks like:
$person = array("afan", "pasalic", "pasa", "123456789");
$home = array("home address comes here", "home city", "home state", "home
zip code");
$work = array("work address comes here", "work city", "work state", "work
zip code");
$numbers = array("1111", "2222", "3333", "4444", "5555");
$person_ser = serialize($person);
$home_ser = serialize($home);
$work_ser = serialize($work);
$numbers_ser = serialize($numbers);
$full_info = array($person_ser, $home_ser, $work_ser, $numbers_ser);
$full_info_ser = serialize($full_info);
Result is:
a:4:{i:0;s:74:"a:4:{i:0;s:4:"afan";i:1;s:7:"pasalic";i:2;s:4:"pasa";i:3;s:9:
"123456789";}";i:1;s:108:"a:4:{i:0;s:23:"home address comes
here";i:1;s:9:"home city";i:2;s:10:"home state";i:3;s:13:"home zip
code";}";i:2;s:108:"a:4:{i:0;s:23:"work address comes here";i:1;s:9:"work
city";i:2;s:10:"work state";i:3;s:13:"work zip
code";}";i:3;s:81:"a:5:{i:0;s:4:"1111";i:1;s:4:"2222";i:2;s:4:"3333";i:3;s:4
:"4444";i:4;s:4:"5555";}";}
it looks ok and "supported". But I would like to know if this is a really
correct way or there is better solution?
Thanks for any help.
Afan
Hi all.
I have searched almost everything on the net regarding php and windows
focusing on one thing.
How to include to php script started on apache on w2k external sript placed
on some URL.
Source of test script (http://mylocalhost/marek.php)
<?
include("http://hermes.com.pl/test.php");
?>
and answer viewed in browser
"Warning: Failed opening 'http://hermes.com.pl/test.php' for inclusion
(include_path='') in c:\www\hermes\windykacja\marek.php on line 2"
I know that parser sayes that include_path is not correctly set but, when
I'm trying do the same under Linux - works perfectly. So (I'm sure -because
Include_path has other adaptation) it is not the reason.
Will be wery glad for answer. Even "Leave it !" - but with explanation ;-)))
Marek.
I would assume, that because linux is built around networking, making a
reference to http://whatever would tell linux to look on the internet for
the file. window isn't built the same way, so it doesn't know to look
beyond it's filing system. As to a solution, I'm not sure.
I'd look into fopen perhaps? You could copy the external script to your
local drive, then include it. However, I've just had a though, surely when
you request the .php file the http server it is held on will parse it and
return the output of it. If that's OK, then the following code should do
it.
<?
$ExternalFile="http://whatever/file.xyz";
$LocalFile="localname.html";
$fp = @fopen($ExternalFile,"r");
if ($fp)
{
$outhandle=fopen ($LocalFile,"w");
while (!feof($fp)) {
$buffer=fread($fp,4096);
fputs($outhandle,$buffer);
}
fclose($fp);
fclose($outhandle);
include("$LocalFile");
exec("delete.bat");
}
?>
and delete.bat contains just del localname.html
That works for me (just tested it).
Anyone know a neater way?
Ross
-----Original Message-----
From: Marek Wysmulek [mailto:[EMAIL PROTECTED]]
Sent: 01 November 2001 17:46
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] include("remote host") under w2k problem
Hi all.
I have searched almost everything on the net regarding php and windows
focusing on one thing.
How to include to php script started on apache on w2k external sript placed
on some URL.
Source of test script (http://mylocalhost/marek.php)
<?
include("http://hermes.com.pl/test.php");
?>
and answer viewed in browser
"Warning: Failed opening 'http://hermes.com.pl/test.php' for inclusion
(include_path='') in c:\www\hermes\windykacja\marek.php on line 2"
I know that parser sayes that include_path is not correctly set but, when
I'm trying do the same under Linux - works perfectly. So (I'm sure -because
Include_path has other adaptation) it is not the reason.
Will be wery glad for answer. Even "Leave it !" - but with explanation ;-)))
Marek.
--
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]
Hi.
I forget that any answers please send to group cause I'm sitting behind
modem ;-)))) and got no incomin mail configured.
Marek.
He already stated that he used phpinfo(); and it was looking in c:\winnt.
as to your question.... im not really sure. I think there's a way that you
can tell PHP to use a certain ini file, im not sure though. Double check to
make sure you used the php.ini-dist and not the optimized one. Had that
happen to someone at work here ;)
Jason
"Justin Garrett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Use phpinfo() to see where PHP is looking for its config file.
>
> --
> Justin Garrett
>
> "Harry Blohm" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi,
> >
> > I'm running PHP4.06 on win2k server.. and PHP seems to work fine.
> > I'm running a Vbulletin and that mostly works like a pro. I find my that
> > I can't use any email function under Vbulletin. After chasing this
> > around for many day I believe the problem is that php.ini file is not
> > being read. When I use the phpinfo function it shows my SMTP set
> > localhost and does not reflect the sendmail_from email address I've
> > used. Either the phpinfo does not report accurately or my php.ini file
> > is not being read.
> >
> > I have searched for a day thru all manner of PHP related sites and
> > have found others asking about this problem but whenever the problem
> > pertains to a win2k machine no one responds. According to phpinfo it is
> > looking for php.ini in the
> > c:\winnt directory ..which is where the dumb thing is and always has
> > been. I have removed ALL other files with a php and an .ini in the
> > name. The only thing I see.. and it seems nearly impossible is the fact
> > that technically my the directory is name C:\WINNT all in uppercase and
> > the phpinfo refers to it in lowercase. Those are the same directories in
> > NT but not in unix.
> > I'm thinking that php was born of unix and somehow that is the root of
> > the problem.
> >
> > HELP this is an absurd problem! Does anyone know where to find the
> > setting that controls what directory php.ini is expected to live ??
> >
> > Help ?????
> >
> > Harry
> >
>
>
English:
i wonder about how i can make a login-system to my page. and this should
work in a forum-system.
could enyone help me?
Mvh
Karl S. Løland
----------------------------------------------------------
Norsk:
jeg lurer på om hvordan man kan lage et login/registerings system til et
forum på en side. kunne noen hjelpe meg med dette?
Mvh
Karl S. Løland
I'm getting calls to an undefined function in ADODB called FieldCount but it
doesn't seem to be in the adodb.inc.php
Does anyone know where I can find it?
Thanks,
John
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit