RE: [PHP] Re:[PHP] Installation on win32

2001-02-13 Thread Maxim Maletsky

have you read my previouse post?

I bet - That's the problem

Cheers,
Maxim Maletsky



-Original Message-
From: Sean Kennedy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 5:02 PM
To: PHP Mailing List
Subject: [PHP] Re:[PHP] Installation on win32


Nah, I have windows showing me the extentions, so that wouldn't be a
problem.  (Though I checked, cause you never know...)

And I restart apache.  Actually, I restarted my machine, no dice.  This is
driving me crazy.  I have followed the instructions TO THE LETTER.

Several Times I might add.  I just can't get this to work.  GAARRRG!

Sorry, had to let that out...

-Make sure you do not have a hidden file extension of *.txt on the end of
-your script.  If you don't, then the problem is in httpd.conf, or you
-didn't restart Apache after making changes to httpd.conf.

-Sounds silly, but that ol' hidden file extension thing gets people ALL
-the time. Swear.





-- 
PHP General 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]

-- 
PHP General 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]




RE: [PHP] about session

2001-02-13 Thread Maxim Maletsky

go to PHP.net/downloads.php
download the newest version and install it.

Follow all the instruction in install file VERY carefully so nothing funny
happens.

Cheers,
Maxim Maletsky

-Original Message-
From: JW [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 4:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] about session


how can i update the php3 to php4 in linux?
thx!









-- 
PHP General 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]

-- 
PHP General 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]




[PHP] Want alumini software

2001-02-13 Thread Ripal Kadakia

Hey guys, where can i find php program for alumini.

Ripal




RE: [PHP] Installation on win32

2001-02-13 Thread Maxim Maletsky

add this into your httpd.conf file:

## PHP 4.0.3pl1 
AddType application/x-httpd-php .php .phtml .php3 .html .inc
AddType application/x-httpd-php-source .phps


Cheers,
Maxim Maletsky



-Original Message-
From: Sean Kennedy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 4:32 PM
To: PHP Mailing List
Subject: [PHP] Installation on win32


Ok, I am trying to install php4 on a win32 system as a module for apache.  I
have followed all the instructions for both apache and php.  Now, when I
load up a page, it is blank, and when I view the source, I see my php file.
For example...



Now, when I load this in my browser, I see this as the source, but nothing
displays on the page.  Anybody recognize this?  Can anybody point me in the
right direction?

Thank you in advance.

Sean Kennedy


-- 
PHP General 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]

-- 
PHP General 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]




[PHP] Re:[PHP] Installation on win32

2001-02-13 Thread Sean Kennedy

Nah, I have windows showing me the extentions, so that wouldn't be a
problem.  (Though I checked, cause you never know...)

And I restart apache.  Actually, I restarted my machine, no dice.  This is
driving me crazy.  I have followed the instructions TO THE LETTER.

Several Times I might add.  I just can't get this to work.  GAARRRG!

Sorry, had to let that out...

-Make sure you do not have a hidden file extension of *.txt on the end of
-your script.  If you don't, then the problem is in httpd.conf, or you
-didn't restart Apache after making changes to httpd.conf.

-Sounds silly, but that ol' hidden file extension thing gets people ALL
-the time. Swear.





-- 
PHP General 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]




Re: [PHP] about session

2001-02-13 Thread JW

how can i update the php version 3 to version 4 in linux?
whether should i update Apache and SSL too?
thank you!



-- 
PHP General 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]




[PHP] about session

2001-02-13 Thread JW

how can i update the php3 to php4 in linux?
thx!









-- 
PHP General 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]




Re: [PHP] Installation on win32

2001-02-13 Thread Julie Meloni

Make sure you do not have a hidden file extension of *.txt on the end of 
your script.  If you don't, then the problem is in httpd.conf, or you 
didn't restart Apache after making changes to httpd.conf.

Sounds silly, but that ol' hidden file extension thing gets people ALL 
the time. Swear.


> Now, when I load this in my browser, I see this as the source, but nothing
> displays on the page.  Anybody recognize this?  Can anybody point me in the
> right direction?


-- 
++
| Julie Meloni ([EMAIL PROTECTED]) |
||
| "PHP Essentials" and "PHP Fast & Easy" |
|   http://www.thickbook.com |
++


-- 
PHP General 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]




[PHP] SOAP

2001-02-13 Thread Christopher Cheng

Is there any development of SOAP extension to PHP?



-- 
PHP General 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]




[PHP] SOAP

2001-02-13 Thread Christopher Cheng

Is there any development of SOAP extension to PHP?



-- 
PHP General 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]




Re: [PHP] about session

2001-02-13 Thread Ankur Verma

No!

 php sessions functions won't work before Version 4

to implement sessions in versions of php before version 4, you could use
phplib

best regards

Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India

- Original Message -
From: "JW" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 14, 2001 12:04 PM
Subject: [PHP] about session


> i want to know whether session is not work before the version php4?
> thx!
>
>
>
> --
> PHP General 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]


-- 
PHP General 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]




[PHP] Installation on win32

2001-02-13 Thread Sean Kennedy

Ok, I am trying to install php4 on a win32 system as a module for apache.  I
have followed all the instructions for both apache and php.  Now, when I
load up a page, it is blank, and when I view the source, I see my php file.
For example...



Now, when I load this in my browser, I see this as the source, but nothing
displays on the page.  Anybody recognize this?  Can anybody point me in the
right direction?

Thank you in advance.

Sean Kennedy


-- 
PHP General 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]




RE: [PHP] about session

2001-02-13 Thread Maxim Maletsky

Sessions were introduces in PHP4. In PHP3 only PHPLIB could do this kind of
job which wasn't a part of the package.

Cheers,
Maxim Maletsky



-Original Message-
From: JW [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 3:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] about session


i want to know whether session is not work before the version php4?
thx!



-- 
PHP General 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]

-- 
PHP General 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]




[PHP] about session

2001-02-13 Thread JW

i want to know whether session is not work before the version php4?
thx!



-- 
PHP General 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]




Re: [PHP] re:linebreak

2001-02-13 Thread Steve Werby

"Deependra B. Tandukar" <[EMAIL PROTECTED]> wrote:
> I did with . "\r\n" too is not giving a new line.

Actually "\n" does create a newline.  If you view the source code of the web
page from the browser you'll see that it works.  "\n" is not an HTML tag.
It's not designed to create a newline in the HTML output sent to the
browser.  As you discovered, the  tag will do that.  Hope that is clear.
"\n" is typically used in PHP code so that when one looks at the HTML code
sent to the browser one doesn't have to look at lines of HTML code that
contain hundreds upon hundreds of characters.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/


-- 
PHP General 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]




[PHP] mail not sending to multiple address

2001-02-13 Thread Peter Houchin

Can some one please have a look through this and give me a step in the right
direction asto why my mail script won't cc or bcc.  I've checked with the
mail server admin and he said as far as the email server is concerned it
supports multiple email address.. it will only send  to the $address but not
any other address..

/* recipients */

$address .= "$email"  ;//note the comma

// Subject

$subject = "ABC Calculation Results";

//Body of email

$body = "Thank you $user,\n Your Rental Monthly Figures are as follows:\n
\n 24 Months = $ $m2 \n 36 Months = $ $m3 \n 48 Months = $ $m4 \n
Your Quartly Figures are: \n $ $q2 Over 24 Months \n $ $q3 Over 36 Months \n
$ $q4 Over 48 Months\n
\n\n\n\n
Thank you again from VFSA-eRentals";

//Where the email is from


$headers .= "From: ABC <[EMAIL PROTECTED]>\n";
$headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: <[EMAIL PROTECTED]>\n";  // Return path for
errors

/* If you want to send html mail, uncomment the following line */
//$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type

$headers .= "cc:[EMAIL PROTECTED]\n"; // CC to
$headers .= "bcc:[EMAIL PROTECTED]\n"; // BCCs to

//send the email

$mailsend = mail("$address", "$subject", "$body.", "$headers \nContent-Type:
text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" );
print ("$mailsend");
?>

Thanks

Peter



Re: [PHP] Include

2001-02-13 Thread Ankur Verma

you should try the setting for include_path in php.ini as

include_path =" /usr/share/php:./"


note the addition of './' in the include path.

this would allow php to include the files in the current directory as well,
which is the case I guess with the phorum scripts.

regards

best regards

Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India

- Original Message -
From: "Fabian Fabela" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 11:08 PM
Subject: [PHP] Include


Hello,

I have php 4.0.3pl1.

I am trying to install phorum (phorum.org).

In a php file (index.php in admin) there is the function include for a file
(common.php), I get the following error.

Warning: Failed opening 'common.php' for inclusion
(include_path='/usr/share/php') in
/home/web/vacagorda/jeans/htdocs/foro/administration/index.php on line 28

Why I can't include that file without putting it in the /usr/shar/php
diretory?

Thank you

Fabian Fabela
[EMAIL PROTECTED]

"La información transmitida en el presente mensaje tiene la intención de
estar dirigida únicamente a la persona o entidad que se refiere y puede
contener información privilegiada y/o confidencial. Cualquier, revisión,
retransmisión, diseminación o cualquier uso impropio o relacionado con dicha
información por persona alguna distinta a la que fue dirigido este mensaje
queda estrictamente prohibido. Si Usted ha recibido  este mensaje o sus
anexos por error, favor de contactar al remitente y elimine el material de
cualquier computadora."

"The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer."



-- 
PHP General 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]




Re: [PHP] PHP 4 on RedHat 7

2001-02-13 Thread scottrus

Mike -

As root run /sbin/ldconfig -v > /tmp/libs.txt then check the /tmp/libs.txt
file to ensure that xmltoc was actually found. If it's not and it is on your
drive then verify the paths in /etc/ld.so.config and run /sbin/ldconfig -v again
after making any changes.

libxml != xmltok afaik.

-- Scott

On Tue, Feb 13, 2001 at 10:55:24PM -0500, Michael Stearne wrote:
> That's crazy because I am doing the same exact thing right now (compile with
> PDF on RH 7 and having problems.)
> 
> Anyway PDF and everything compiles fine on RH 6.2 but I have had some problems
> on 7.

[snip]

> Then when I try to add the pdflib options, the make dies at:
> make[1]: Entering directory `/home/blaze/WebServerSources/php-4.0.4pl1'
> /bin/sh /home/blaze/WebServerSources/php-4.0.4pl1/libtool --silent --mode=link
> gcc  -I. -I/home/blaze/WebServerSources/php-4.0.4pl1/
> -I/home/blaze/WebServerSources/php-4.0.4pl1/main
> -I/home/blaze/WebServerSources/php-4.0.4pl1 -I/www/include
> -I/home/blaze/WebServerSources/php-4.0.4pl1/Zend
> -I/usr/local/mysql/include/mysql -I/usr/local/include
> -I/home/blaze/WebServerSources/php-4.0.4pl1/ext/xml/expat/xmltok
> -I/home/blaze/WebServerSources/php-4.0.4pl1/ext/xml/expat/xmlparse
> -I/home/blaze/WebServerSources/php-4.0.4pl1/TSRM  -DLINUX=22 -DUSE_HSREGEX
> -DUSE_EXPAT -DXML_BYTE_ORDER=12 -g -O2   -o libphp4.la -rpath
> /home/blaze/WebServerSources/php-4.0.4pl1/libs -avoid-version
> -L/usr/local/mysql/lib/mysql -L/usr/local/lib  -R /usr/local/mysql/lib/mysql -R
> /usr/local/lib stub.lo  Zend/libZend.la sapi/apache/libsapi.la main/libmain.la
> regex/libregex.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/pdf/libpdf.la
> ext/posix/libposix.la ext/sablot/libsablot.la ext/session/libsession.la
> ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -lpam -ldl
> -lxmltok -lxmlparse -lsablot -lz -ljpeg -lpng -ltiff -lpdf -lmysqlclient
> -lresolv -lm -ldl -lcrypt -lnsl -lresolv
> /usr/bin/ld: cannot find -lxmltok
> collect2: ld returned 1 exit status
> make[1]: *** [libphp4.la] Error 1
> make[1]: Leaving directory `/home/blaze/WebServerSources/php-4.0.4pl1'
> make: *** [all-recursive] Error 1
> 
> It says it cannot find xmltok, but its installed in /usr/lib where everything
> else is.

-- 
PHP General 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]




Re: [PHP] Cookies

2001-02-13 Thread Ankur Verma

when the cookie is not set, the $HTTP_COOKIE_VARS will not have an index
'getdwgnum'

maybe you should try it this way

 "")
  {
 $str = "where Cook = $cookieinfo";
 $cx=odbc_pconnect("doc","","");
   }
   else
  setcookie ("getdwgnum", $cook,time()+28800);

?>

this code is not checked by executing. but I guess this should be the
reason.

hope that helps

best regards

Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India.


"Gary" <[EMAIL PROTECTED]> wrote in message
96bo38$1j7$[EMAIL PROTECTED]">news:96bo38$1j7$[EMAIL PROTECTED]...
> I am getting the following error message from the code below.
>
> Warning: Undefined index: getdwgnum in d:\apache\htdocs/getdwgnum.php on
> line 4
>
>
> 
>  $cook = mt_rand (5, 5) ;
>  $cookieinfo = $HTTP_COOKIE_VARS["getdwgnum"];
>  if ($cookieinfo > "")
>  {
> $str = "where Cook = $cookieinfo";
> $cx=odbc_pconnect("doc","","");
>   }
>   else
>  setcookie ("getdwgnum", $cook,time()+28800);
>
> ?>
>
>
> I want to look for a cookie and if it is not there I want to set one. Any
> ideas?
>
> Thanks, Gary
>
>
>
> --
> PHP General 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]


-- 
PHP General 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]




Re: [PHP] Any image drawing tutorials anywhere?

2001-02-13 Thread Ankur Verma

you might want to take a look at imagemagick

http://www.wizards.dupont.com/cristy/ImageMagick.html

regards

Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India

- Original Message - 
From: "Lucas Persona" <[EMAIL PROTECTED]>
To: "Php (E-mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 7:25 PM
Subject: Re: [PHP] Any image drawing tutorials anywhere?


> Hello,
> 
> I've seen this 'text images generators' but I would like to know where
> I can find some explanation about image manipulation like merging/mixing
> two or more images.
> Something like, I have a background image and some small image elements
> that will be somewher on that background image...for example, my
> background image is a table and I have some images like a book, a pen, a
> paper..and so on, and what I want to do is to create a final image where
> sometimes it will show two books and three pens on the table...sometimes
> it will be just a pen on the table...
> Have you ever seen something like that and where I can find information
> about that?
> 
> Thanks,
> Lucas Persona
> [EMAIL PROTECTED]
> 
> -- 
> PHP General 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]


-- 
PHP General 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]




Re: [PHP] PHP 4 on RedHat 7

2001-02-13 Thread Michael Stearne

That's crazy because I am doing the same exact thing right now (compile with
PDF on RH 7 and having problems.)

Anyway PDF and everything compiles fine on RH 6.2 but I have had some problems
on 7.

What I did is:
Install mySQL
Configure and install Apache (my configure looks like this):
./configure \
"--with-layout=Apache" \
"--prefix=/www" \
"--with-perl=/usr/bin/perl" \
"--enable-module=so" \
"$@"
Configure and install PdfLib (my configure looks like this):
./configure  --enable-cxx --with-tiffauxlib=-ljpeg --with-tifflib --with-zlib
--with-pnglib=no --enable-shared --enable-static --enable-shared-pdflib


After that point I have been fooling around with the PHP configure.  What works
for me so far is:

./configure --with-mysql=/usr/local/mysql --with-apxs=/www/bin/apxs
--with-sablot

(I have installed Sablot XSLT lib)

This compiles and installs fine.

Then when I try to add the pdflib options, the make dies at:

./configure --with-mysql=/usr/local/mysql --with-apxs=/www/bin/apxs
--with-sablot --with-zlib-dir=/usr/lib --with-jpeg-dir=/usr/lib
--with-tiff-dir=/usr/lib --with-pdflib

./configure --with-mysql=/usr/local/mysql --with-apxs=/www/bin/apxs
--with-sablot --with-zlib-dir=/usr/lib --with-jpeg-dir=/usr/lib
--with-tiff-dir=/usr/lib --with-pdflib

make[1]: Entering directory `/home/blaze/WebServerSources/php-4.0.4pl1'
/bin/sh /home/blaze/WebServerSources/php-4.0.4pl1/libtool --silent --mode=link
gcc  -I. -I/home/blaze/WebServerSources/php-4.0.4pl1/
-I/home/blaze/WebServerSources/php-4.0.4pl1/main
-I/home/blaze/WebServerSources/php-4.0.4pl1 -I/www/include
-I/home/blaze/WebServerSources/php-4.0.4pl1/Zend
-I/usr/local/mysql/include/mysql -I/usr/local/include
-I/home/blaze/WebServerSources/php-4.0.4pl1/ext/xml/expat/xmltok
-I/home/blaze/WebServerSources/php-4.0.4pl1/ext/xml/expat/xmlparse
-I/home/blaze/WebServerSources/php-4.0.4pl1/TSRM  -DLINUX=22 -DUSE_HSREGEX
-DUSE_EXPAT -DXML_BYTE_ORDER=12 -g -O2   -o libphp4.la -rpath
/home/blaze/WebServerSources/php-4.0.4pl1/libs -avoid-version
-L/usr/local/mysql/lib/mysql -L/usr/local/lib  -R /usr/local/mysql/lib/mysql -R
/usr/local/lib stub.lo  Zend/libZend.la sapi/apache/libsapi.la main/libmain.la
regex/libregex.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/pdf/libpdf.la
ext/posix/libposix.la ext/sablot/libsablot.la ext/session/libsession.la
ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -lpam -ldl
-lxmltok -lxmlparse -lsablot -lz -ljpeg -lpng -ltiff -lpdf -lmysqlclient
-lresolv -lm -ldl -lcrypt -lnsl -lresolv
/usr/bin/ld: cannot find -lxmltok
collect2: ld returned 1 exit status
make[1]: *** [libphp4.la] Error 1
make[1]: Leaving directory `/home/blaze/WebServerSources/php-4.0.4pl1'
make: *** [all-recursive] Error 1


It says it cannot find xmltok, but its installed in /usr/lib where everything
else is.

I don't know either.  This worked no problem on 6.2.  BTW I have the most
recent version of GCC according to Redhat Up2Date

Michael




Mike Tuller wrote:

> I'm at a loss for this one. I can't seem to get PHP 4 on RedHat 7. I can get
> the rpm to install and work, but if I try to configure myself, it never
> works. Everything says to configure with apxs, but there is no apxs. What is
> strange though is if I look at how the rpm configures PHP, it configures it
> with apxs and it works!
>
> I want to configure PHP with PDF support, so I can't just use the rpms. If
> anyone has any suggestions, let me know. That is other that trying to
> configure apache manually. I've been down that road before, and don't want
> to do it again.
>
> Mike
>
> --
> PHP General 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]


-- 
PHP General 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]




[PHP] re:linebreak

2001-02-13 Thread Deependra B. Tandukar

Thanks!

I did with . "\r\n" too is not giving a new line. 

DT



Re: [PHP] Line Break

2001-02-13 Thread John Monfort



  try \r

   "\r\n" is equivalent to you pressing the return key.


__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Wed, 14 Feb 2001, Deependra B. Tandukar wrote:

> Greetings!
>
> I know "\n" gives the new line and "\t" gives the tab. Is there any other
> code for them because this is not working in the web server where I host my
> web pages?
>
> Looking froward to hearing from you.
>
> Regards,
> DT
>
>
> --
> PHP General 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]
>
>


-- 
PHP General 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]




Re: [PHP] Line Break

2001-02-13 Thread David Robley

On Wed, 14 Feb 2001 14:04, Deependra B. Tandukar wrote:
> Greetings!
>
> I know "\n" gives the new line and "\t" gives the tab. Is there any
> other code for them because this is not working in the web server where
> I host my web pages?
>
> Looking froward to hearing from you.
>
> Regards,
> DT

When you say 'not working' , do you mean that you don't see a line break 
in your browser where the \n has been inserted?

This is correct behaviour - \n, \t and multiple space characters are all 
treated as white space by browsers and rendered as a single space. If you 
want to insert a line break you need to use , and you can use a 
series of   to mimic a tab. There are better ways of handling this 
using CSS.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
PHP General 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]




Re: [PHP] file upload temp file is and isn't there

2001-02-13 Thread Aaron D. Turner

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Ah, figured out the problem.  MAX_FILE_SIZE is in BYTES not
Kilobytes.  Any file >5K was killed.

- -- 
Aaron Turner <[EMAIL PROTECTED]|synfin.net|linuxkb.org>  URI:www.synfin.net
They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety. -- Benjamin Franklin

pub 1024D/F86EDAE6  Sig: 3167 CCD6 6081 0FFC B749  9A8F 8707 9817 F86E DAE6
All emails by me are PGP signed; a lack of a signature indicates a forgery.
I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80  596E 60BF 451B 20E8 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc

iEYEARECAAYFAjqJ/gsACgkQhweYF/hu2ubzAACfRt9l+TvifIobJyOqs5UlvAA1
uS0AniXKKTuvazWZHCZeW5QZyXpHztnZ
=Zpnk
-END PGP SIGNATURE-



-- 
PHP General 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]




[PHP] Line Break

2001-02-13 Thread Deependra B. Tandukar

Greetings!

I know "\n" gives the new line and "\t" gives the tab. Is there any other
code for them because this is not working in the web server where I host my
web pages?

Looking froward to hearing from you.

Regards,
DT


-- 
PHP General 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]




Re: [PHP] is the list still up?

2001-02-13 Thread Toby Butzon

Check out php.net/round and it's relatives

--Toby

LDL Enterprise wrote:
> 
> I am having trouble getting this peice of code to only show 2 decimal
> places.
> 
> echo $cart->cart_total($table, $scid) * .0625;
> 
> The class returns 100.50 and the above code returns 6.28125
> 
> Any help taking the 125 off would be appreciated. Thanks.
> 
>  _ ___
> | |   |   \ | |
> | |__ | |> || |__
> |||___/ ||
> 
> Larry L.
> [EMAIL PROTECTED]
> www.ldlenterprise.com
> 
> --
> PHP General 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]

-- 
PHP General 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]




[PHP] ezmlm response (fwd)

2001-02-13 Thread John Monfort


   Hello everyone,

   I've just joined this list, so I thought I'll introduce myself. I won't
   bore you with the long life story, so here's the quick summary:

-Electrical + Computer Engineering student
-web development for 6+ years (started out with the VI editor)
-HTML,C/C++,PERL,PHP,ASM,Jscripts,...I learn them as I need them...
 and forget them until I need them.

  My questions:

  I want to make an e-commerce like transaction  with a remote file,
  similar to how a merchant account process a credit card. The concept is
  very similar.

  Basically, I have two servers in two different cities.
  I have a web interface on server A, and DB on server B.
  Server A is a membership site.

  If someone tries to access a members-feature from site A, then site A
  will
  contact site B, run a cgi script (which returns YES or NO), then proceed
  according to the answer from B.

  [It's not possible for the user to connect to site B, then transfer to
   site A]

  I want this to be invisible to the user, so I'm using

   $fp = fopen(http://.../file.cgi?var=value);

  to run the remote script.

  Now, if the remote script returns a value, like

return ($va1, $var2);

=
 How can I read these value, from site A?
=

  If the function was in the same file, then it would be no problem.
  For example, with

   $var1 = function_name();

  $var1 would contain any value returned by function_name().

=
  Does that same concept holds, if the files are different?


=== How can I capture the returned value of the remote file?

=== Is there a better way to do this?


Any and all suggestions are welcome. I would appreciate any help,
comments, directions, that can provide.

Thanks in advance.

-John M.
pepiedesigns




-- 
PHP General 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]




Re: [PHP] mysql_error() not really helping

2001-02-13 Thread David Robley

On Wed, 14 Feb 2001 13:01, Christian Dechery wrote:
> I'm having a little trouble here developing and running queries.
>
> I spent some time developing in ASP, and whenever there was something
> wrong with a query, the script halted, and the error message - from
> ODBC, tye sql syntax error - was printed along with the line of code.
>
> In PHP that's not how it goes, it doesn't tell me when theres an error
> with a mysql_query unless I place a call to mysql_error() after each
> executed query right?
>
> That's exactly what I'm doing, but again, it doesn't do all I want, cuz
> it doesn't tell me the line of code, and I don't know where is the
> error, unless I start printing everything on error handling.

There is a PHP constant __LINE__ which you may find useful.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
PHP General 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]




[PHP] is the list still up?

2001-02-13 Thread LDL Enterprise

I am having trouble getting this peice of code to only show 2 decimal
places.

echo $cart->cart_total($table, $scid) * .0625;

The class returns 100.50 and the above code returns 6.28125

Any help taking the 125 off would be appreciated. Thanks.

 _ ___
| |   |   \ | |
| |__ | |> || |__
|||___/ ||

Larry L.
[EMAIL PROTECTED]
www.ldlenterprise.com




-- 
PHP General 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]




[PHP] is the list still up?

2001-02-13 Thread LDL Enterprise



 _ ___
| |   |   \ | |
| |__ | |> || |__
|||___/ ||

Larry L.
[EMAIL PROTECTED]
www.ldlenterprise.com




-- 
PHP General 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]




Re: [PHP] Random String of n Length

2001-02-13 Thread Randall Blaine Goguen



Generate a Random Password with PHP
http://www.linuxguruz.org/z.php?id=305

# Note: 1. You can add more charactors, numbers or lower case charactors
# to '$possible_charactors' is you wish.
#   2. You can change the string length, for example,
# echo 'Random_Password(16);' for 16 charactors.


[EMAIL PROTECTED]
#PHP IRC EfNet
#LinuxSupport IRC EfNet
http://www.LinuxGuruz.org


On Tue, 13 Feb 2001, Jonathan Sharp wrote:

> I want to generate a random string of characters of n Length...what's the
> easiest way to do this?
> 
> Thanks,
> -Jonathan
> 
> 
> -- 
> PHP General 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]
> 


-- 
PHP General 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]




Re: [PHP] passthru environment variables

2001-02-13 Thread Rich Puchalsky

OK, I finally found it.  Someone else here recommended setenv -- it's
actually putenv.  putenv was *not* found through any search I could make on
the PHP Web site involving the word environment and so on, I found it
through Google.  And it's apparently documented under "PHP Options and
Information" where I wouldn't have thought to look for it for a thousand
years.



-- 
PHP General 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]




[PHP] Random String of n Length

2001-02-13 Thread Jonathan Sharp

I want to generate a random string of characters of n Length...what's the
easiest way to do this?

Thanks,
-Jonathan


-- 
PHP General 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]




[PHP] Short tags - proper name?

2001-02-13 Thread Toby Butzon

Greetings,

I was just wondering if there's a "proper" name for what I've been
calling the "short equals tag" ( 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]




Re: [PHP] Bad Practices

2001-02-13 Thread Mark Charette

From: "Philip Olson" <[EMAIL PROTECTED]>
> They're very useful.  Also, regarding SQL, don't do "SELECT * ..." all the
> time as it's overkill if not all fields are being used.

And, in fact, doing a "SELECT *" ends up precluding most optimizations
within a query engine! Selecting only what you really need can give speedups
in queries in the order of 3 orders of magnitude (where the query results
can be satisfied via indices).

Mark [EMAIL PROTECTED]
Former (and still occasionally) Oracle performance guy.
---
"When the unknown is thought to be unknowable, gaps in knowledge are too
readily filled by fancy, so long as the fancy is consistent with faith." --
Sherwin B. Newland, M.D., "The Mysteries Within".


-- 
PHP General 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]




Re: [PHP] mysql_error() not really helping

2001-02-13 Thread scottrus

Christian -

You need to be checking the return values of the mysql_*() functions. Make
sure you're not calling them with a @mysql_*() as that will disable error
reporting.

Perhaps you should give us some examples of what's failing and how?

Also, if the server isn't yours the server admin may have turnd down the
level of error reporting in php so errors never even show up. See
http://www.php.net/manual/en/configuration.php and look at display_errors and
error_reporting then check your server settings with phpinfo().

-- Scott

On Tue, Feb 13, 2001 at 11:31:09PM -0300, Christian Dechery wrote:
> I'm having a little trouble here developing and running queries.
> 
> I spent some time developing in ASP, and whenever there was something wrong 
> with a query, the script halted, and the error message - from ODBC, tye sql 
> syntax error - was printed along with the line of code.
> 
> In PHP that's not how it goes, it doesn't tell me when theres an error with 
> a mysql_query unless I place a call to mysql_error() after each executed 
> query right?
> 
> That's exactly what I'm doing, but again, it doesn't do all I want, cuz it 
> doesn't tell me the line of code, and I don't know where is the error, 
> unless I start printing everything on error handling.
> 
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer
> 
> 
> -- 
> PHP General 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]

-- 
 Scott

-- 
PHP General 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]




Re: [PHP] PHP 4 on RedHat 7

2001-02-13 Thread scottrus

Mike -

You're not 100% specfic (or I'm not 100% clear) on what you've tried to do
to fix this but here's a basic recipie which should work for you. (it has
for me.)

1) Get the current php src.rpm file from the Red Hat 7 errata and install it.
2) cd /usr/src/redhat/SPEC/ and edit the php.spec file. Fine the configure
   section and ensure that the proper --with option is enabled for PDF
   support. You may also want to rev the minor version of the RPM so you 
   know it's yours vs the default Red Hat version.
3) Save the file and then run rpm -ba php.spec and sit back. When done
   you'll have several packages in /usr/src/redhat/RPMS/i386 waiting for
   you to install.
   

You may find that after you do a rpm -ba php.spec that the build fails
because several devel packages are not installed (ie openssl-devel,
openldap-devel, etc). Make sure you have them installed before building.

Good luck.

-- Scott


On Tue, Feb 13, 2001 at 07:47:03PM -0600, Mike Tuller wrote:
> I'm at a loss for this one. I can't seem to get PHP 4 on RedHat 7. I can get
> the rpm to install and work, but if I try to configure myself, it never
> works. Everything says to configure with apxs, but there is no apxs. What is
> strange though is if I look at how the rpm configures PHP, it configures it
> with apxs and it works!
> 
> I want to configure PHP with PDF support, so I can't just use the rpms. If
> anyone has any suggestions, let me know. That is other that trying to
> configure apache manually. I've been down that road before, and don't want
> to do it again.
> 
> Mike
> 
> 
> -- 
> PHP General 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]

-- 
PHP General 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]




RE: [PHP] Upload form

2001-02-13 Thread Maxim Maletsky

You can't do it (at least not that I know)

How will you make a default value not knowing the File System of a user's
local machine?

Try something different...

Cheers,
Maxim Maletsky



-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 8:04 AM
To: PHP User Group
Subject: [PHP] Upload form


Hello,

This is off topic, but I have been working on it all day with php and can't
seem to figure it out. Does anyone know how to give a file field in a form a
default value?  I am trying to have a script automatically fill in some
upload fields on my form.

Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com



-- 
PHP General 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]

-- 
PHP General 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]




RE: [PHP] Using a variable in a variable

2001-02-13 Thread Maxim Maletsky

Often people try to do that ...  but I also know that, array variables were
invented exactly for doing this kind of jobs.

Try to implement Arrays more often..
www.php.net/array

Cheers,
Maxim Maletsky

-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 6:07 AM
To: PHP User Group
Subject: [PHP] Using a variable in a variable


Hello,

Is there a way to use a variable in the middle of a variable?

## START EXAMPLE ##



## END EXAMPLE ##


$test($i)text = "$i";
  ^^--I want this variable to get bigger while the
loop is going but I can't figure out how to make the $test#text variable to
read it correctly.

I hope someone can understand what I am saying.

Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com



-- 
PHP General 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]

-- 
PHP General 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]




RE: [PHP] Would Like to know

2001-02-13 Thread Maxim Maletsky

If you run it from command line then yes. If you instead doing it from your
browser then this is where it will be sent.

You could use a $variable .= 'staff' system, so before an echo $variable you
can also precreate a file.

Cheers,
Maxim Maletsky



-Original Message-
From: Barry Fawthrop [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 5:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Would Like to know


Can PHP direct the output to a file
eg send the HTTP_USER_AGENT information to a file ??

Barry


-- 
PHP General 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]




RE: [PHP] ereg_replace

2001-02-13 Thread Maxim Maletsky

it replaces 'This' with 'That', some you tell to ereg what he should think
'This' is and what to replace it with.

It does only one replacement at a time.

Cheers,
Maxim Maletsky


-Original Message-
From: Brian V Bonini [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 5:31 AM
To: PHP Lists
Subject: [PHP] ereg_replace


I know you can replace A or B or C with D
but can you replace A with B and C with D
exclusively with one call to ereg_replace
or does this need to be done seperately?

-Brian



-- 
PHP General 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]

-- 
PHP General 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]




RE: [PHP] parse speed vs require speed

2001-02-13 Thread Maxim Maletsky

My advise to you is to care about the portability of software rather then
it's speed.
include() and require() are not too painful, not too slow. You can easily
have 10 of them and by that your page will be slower by only few dozens of
milliseconds. However doing so you could reuse some parts of your code
having your software more dynamic.

Cheers,
Maxim Maletsky 

-Original Message-
From: Soma Interesting [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 5:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP] parse speed vs require speed



I'm wondering if I should organize the functions for my project into a 
single large file and have only one include/require, or break the code out 
into separate function library files and use a number of includes/requires.

With a single large function library I'm guessing PHP would parse this 
every time a page is called. So I could loose some overhead by separating 
my database functions into one file, my administration functions into 
another, my presentation functions into another, etc... then only including 
the function pages necessary - likely cutting the amount of code being 
parsed in half for any given page.

But then I begin wondering about the speed of making a require() to each of 
these files. maybe three to five requires per page.

Lastly, what about caching or compiling the function libraries so they're 
not being parsed each time?

Any advice on this?


-  -  -  -  -  -  - 
  -  -  -  -
WARNING: Some experts believe that use of any keyboard may cause
serious injury. Consult Users Guide.
 
[EMAIL PROTECTED]


-- 
PHP General 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]

-- 
PHP General 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]




RE: [PHP] Include

2001-02-13 Thread Maxim Maletsky

You need to add a . (dot) to your include path in PHP.ini...

Cheers,
Maxim Maletsky



-Original Message-
From: Fabian Fabela [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 2:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Include


Hello,

I have php 4.0.3pl1.

I am trying to install phorum (phorum.org).

In a php file (index.php in admin) there is the function include for a file
(common.php), I get the following error.

Warning: Failed opening 'common.php' for inclusion
(include_path='/usr/share/php') in
/home/web/vacagorda/jeans/htdocs/foro/administration/index.php on line 28

Why I can't include that file without putting it in the /usr/shar/php
diretory?

Thank you

Fabian Fabela
[EMAIL PROTECTED]

"La información transmitida en el presente mensaje tiene la intención de
estar dirigida únicamente a la persona o entidad que se refiere y puede
contener información privilegiada y/o confidencial. Cualquier, revisión,
retransmisión, diseminación o cualquier uso impropio o relacionado con dicha
información por persona alguna distinta a la que fue dirigido este mensaje
queda estrictamente prohibido. Si Usted ha recibido  este mensaje o sus
anexos por error, favor de contactar al remitente y elimine el material de
cualquier computadora."

"The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer."

--
PHP General 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]




RE: [PHP] hidden form field.

2001-02-13 Thread Maxim Maletsky

I'll give you an example of it's use:

You have a submission form where you need to confirm:

you have a form on page 1:

field 1...
field 2...
field 3...

and submit button..
When people submit the data it goes to page 2 where a loop will take all
that, create a hidden forms and will also list the data submitted as text so
you can ask the user: "are you sure this info is correct?" If not they click
back-button and if yes they continue clicking submit again and at that point
all these hidden fields are going into your database.

Hope it explains you a bit.

Cheers,
Maxim Maletsky

-Original Message-
From: Angerer, Chad [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 12:15 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] hidden form field.


Hello list,

Can someone please explain to me in simple terms.  What the exact reason is
for putting hidden form fields into an html document that uses PHP to
connect to a mySQL db .. or any db for that matter.  I have looked around
and have not gotten a good clear answer?

Thanks.

Chad Angerer


-- 
PHP General 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]

-- 
PHP General 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]




[PHP] PHP 4 on RedHat 7

2001-02-13 Thread Mike Tuller

I'm at a loss for this one. I can't seem to get PHP 4 on RedHat 7. I can get
the rpm to install and work, but if I try to configure myself, it never
works. Everything says to configure with apxs, but there is no apxs. What is
strange though is if I look at how the rpm configures PHP, it configures it
with apxs and it works!

I want to configure PHP with PDF support, so I can't just use the rpms. If
anyone has any suggestions, let me know. That is other that trying to
configure apache manually. I've been down that road before, and don't want
to do it again.

Mike


-- 
PHP General 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]




RE: [PHP] rename?

2001-02-13 Thread Maxim Maletsky

I think you can rename it by using a full path. Have you tried it yet?

Cheers,
Maxim Maletsky




-Original Message-
From: Miguel Loureiro [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 12:02 AM
To: php-gen
Subject: [PHP] rename?


Hi ,
having a hierarchy of directories, like A\b\d, A\c, I would like to move
directory A\b\d to A\c\d , to (try) to get it I test something like
rename(d,".. / c/d"), but I get " Warning: Rename failed (No such file or
directory) in  ", it's necessary create the directory first, I mean ,
Mkdir(second_d) ? but the command its RENAME... or there are other, better ,
ways to do what I want. Consider that the directory d have lots of things
(files and directories...).
T.Y
Best Regards
Miguel Loureiro <[EMAIL PROTECTED] >






-- 
PHP General 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]




[PHP] Fast Template woes

2001-02-13 Thread Joseph H Blythe

Hey all,

I got a rather strange probelm with fast template, I won't go into great detail unless 
someone has had a simular experience while using define_dynamic. Basically I have 
written a site which totally uses Fast Templates and some sections use define_dynamic 
which work perfectly, my problem is I have just added a new section which refuses to 
acknowledge the:




tags (they appear in the final output) I have read all the documentation and am really 
sure that I have done this correctly, even checked the other pages which *are* 
working, no matter what I do this refuses to work, has anyone else run into a simular 
problem?

Any help would be mutch appreciated, I am really stuck on this.

Regards,

Joseph

-- 
PHP General 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]




[PHP] mysql_error() not really helping

2001-02-13 Thread Christian Dechery

I'm having a little trouble here developing and running queries.

I spent some time developing in ASP, and whenever there was something wrong 
with a query, the script halted, and the error message - from ODBC, tye sql 
syntax error - was printed along with the line of code.

In PHP that's not how it goes, it doesn't tell me when theres an error with 
a mysql_query unless I place a call to mysql_error() after each executed 
query right?

That's exactly what I'm doing, but again, it doesn't do all I want, cuz it 
doesn't tell me the line of code, and I don't know where is the error, 
unless I start printing everything on error handling.

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


-- 
PHP General 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]




Re: [PHP] Re:LOCK TABLES x COMMIT/ROLLBACK

2001-02-13 Thread Christian Dechery

At 11:51 14/2/2001 +1300, Phil Daintree wrote:
>This also troubles me i have read and read the docs on this. It seems that 
>Lock tables
>prevents other threads interfering with your transaction  your inserts 
>will not be
>compromised by another thread deleting or updating data inconsistent with 
>your SQL. The
>snag for me is that all obscure input from the user and every other 
>eventuality has to be
>trapped prior to avoid sending dud SQL to MySQL, other wise the 
>inserts/updates will fail.
>The TO DO list talks about atomic inserts/updates which would solve my 
>problems ie they
>all happen or all do NOT happen. If MySQL can do this then I don't care 
>about rollback. I
>would dearly like to use the fast tables rather than compromise speed 
>using DBD tables but
>as I see it we are stuck with them or Postgres until the atomic updates 
>code is completed.
>
>Be interested to know if anyone has got atomic updates sorted.

tomorrow I'll try to compile BDB, in my Win9x... and get it to work... if 
it does REAL transaction than I can develop nicely with mysql... I'll let u 
know...

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


-- 
PHP General 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]




[PHP] Re: [PHP-WIN] INSERT into MSSQL Server

2001-02-13 Thread Frank M. Kromann

It is only the ' charactor there has a "problem" you have to excape any special 
character before inserting.

the text Joe's should be inserted like this"

INSERT INTO table1 (int_field, char_field) VALUES (1, 'Joe''s')

A single quote is escaped by an extra single quote.

- Frank

>I trying to insert some data into a MSSQL Server 7.0 database from Php. Some
>of the data has various characters ', >  . How can I tell SQL Server to
>treat these characters as part of the input.
>
>Ryan Conover
>
>-- 
>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]
>
>
>




-- 
PHP General 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]




Re: [PHP] Newbie -- tutorial exercises reveal too much -- pdf download not "saveable"

2001-02-13 Thread David Robley

On Wed, 14 Feb 2001 07:20, Info wrote:
> Hi,
>
> I don't have adequate space to have PHP and MySQL on my local machine. 
> Yes, need a new and better box.  So, used my net site for some
> exercises.  That is not satisfactory because I must reveal password and
> such in plain text to execute a php/mysql script.
>
> Maybe only a resource poor newbie could have this problem -- means I
> need to have some hurry up instruction on getting those secret words
> hidden -- or I should not continue with exercises and tutor.  There is
> nothing on my site or in my database that is sensitive in any way --
> but don't want to find it all gone or altered.
>
> Also, I can download some manuals, but I cannot save the .pdf variety
> or find the temp file to save it. Any suggestion? I'm on WIN95 with a
> Toshiba Laptop and do have the adobe acrobat reader and MS Office.
>
> Is there a tutorial on this "include" subject that I can find and use?
> I'm on digest mode so please CC or direct to me.
>

There's not much to it - the docs are failry explanatory. Just remeber 
that when you include or require a file, the contents of that file are 
'placed' in the current file at the location of the function call. If 
there is PHP syntax in the included file, it must have PHP start/finish 
tags () around it for the PHP to be run.

You can include a file from pretty much anywhere, including especially 
outsite your webserver document root. So for some security, put your 
passwords etc outside the web root. Also, see the php.ini file if you 
have access to it for how to define a search path for include files.

As for downloading the manuals, try right clicking and choosing the 'Save 
Link as' function - or however it's called under Exploder.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
PHP General 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]




Re: [PHP] Going backwards with sessions.

2001-02-13 Thread Doug Budny

Basically I'm trying to get 3 session vars on a page in a sub directory, 
clientid, clientname and rnum.  I do a session_start() at the beginning of 
every page, I also do a session_id($HTTP_COOKIE_VARS['sessId']) on each 
page, with the sessid being the same.  But when I do "echo session_id()" on 
the second page after setting it and starting the session, it comes back 
blank, as thought the session was being destroyed or just not starting.

I've tried registering the variable on the second page, and it still 
doesn't work

At 2/13/2001 04:20 PM, you wrote:
>mine is alot simpler and works fine, try this.
>
> session_start();
>
> if (!isset($HTTP_SESSION_VARS['SessionID']))
> {
> $SessionID = mtime();
> session_register('SessionID');
> }
>?>
>
>
>--
>
>
>Chris Lee
>Mediawaveonline.com
>
>em. [EMAIL PROTECTED]
>
>ph. 250.377.1095
>ph. 250.376.2690
>fx. 250.554.1120
>
>
>"Doug Budny" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I'm having a strange problem with sessions, it appears that they are not
> > propagating to the next page.  When I run the login page the sess vars get
> > registered, the session_id() get's set, and the cookie sessId get's
> > set.  However when I go to the order page in a subdirectory only the
>cookie
> > sessId comes over correctly.  It will not set the session_id().  The only
> > thing that prints as expected is the cookie var and $sessionId.
> >
> > I'm using 4.0.4pl1 on Redhad 6.2 apache 1.3.9 .  enable_track_vars is
> > enabled and so is register_globals.  Am I doing something wrong or is
> > Sessions broken in pl1?
> >
> >  >
> > // login page
> >
> > srand((double)microtime()*100);
> > $sessionId = md5(uniqid(rand()));
> > session_id($sessionId);
> > session_start();
> > setcookie("sessId", $sessionId);
> >
> > session_register('clientid');
> > session_register('clientname');
> > session_register('rnum');
> >
> > ?>
> >
> >
> >  >
> > // order page
> >
> > $sessionId = $HTTP_COOKIE_VARS['sessId'];
> >
> > session_id($sesssionId);
> > session_start();
> >
> >
> > //global $clientname;
> > //global $clientid;
> >
> > echo ('Client ID :' . $clientid);
> > echo ('Rnumber   :' . $rnum);
> > echo ('SessCli Name  :' . $HTTP_SESSION_VARS['clientname']);
> >
> > echo ('Session_Id() :' . session_id());
> > echo ('Session_name() :' . session_name());
> > echo ('sessId :' . $HTTP_COOKIE_VARS['sessId']);
> >
> > ?>
> >
> >
> > --
> > PHP General 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]
> >
>
>
>
>--
>PHP General 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]



Atheism is a non-prophet organization.


-- 
PHP General 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]




Re: [PHP] GD library

2001-02-13 Thread Michael McGlothlin

Have you tried Apache Toolbox? If building under Unix w/ Apache as your 
web server it can be a great time saver and if your running into 
problems you can look how it builds something and see how to make it 
work so you'll know later. You can find it easily from Freshmeat.net.

David Robley wrote:

> On Wed, 14 Feb 2001 00:23, Rahul Hari Bhide wrote:
> 
>> Hi ,
>> I am configuring php with the  --with-gd option .
>> My libgd.a is sitting in /usr/local/lib and other header files in
>> /usr/local/include .
>> 
>> ./configure --with-gd=/usr/local/lib gives me the following error :
>> 
>> checking whether to include GD support... configure: error: Unable to
>> find libgd.(a|so) anywhere under /usr/local/lib
>> 
>> though the file is very much existant.
>> 
>> Any ideas what is wrong???
>> 
>> ~Rahul
> 
> 
> Try ./configure --with-gd=/usr/local
> 
> Then configure will look in lib under that path for the libraries and 
> include for the include files.
> 



-- 
PHP General 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]




Re: [PHP] file upload temp file is and isn't there

2001-02-13 Thread Aaron D. Turner

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



On Tue, 13 Feb 2001, jason cox wrote:

> Aaron,
> 
> Are you processing the file on the page you're
> "posting" to? 

Yep.  A little more info this time.  Ok this makes no freaking sense to
me:

I can upload my /etc/passwd file
- -rw-r--r--1 root root  998 Dec  9 01:44 /etc/passwd

I can't upload other random files in my home directory which I own/have
read access to.
- -rw-rw-r--1 aturner  aturner 84558 Jan  9 17:01 /home/aturner/1323.txt

>  Could you send your processing code so
> we can have a look?  If you're still having problems,
> I can send you an example.

Sure:

$message";
  unlink ($HTTP_POST_FILES[userfile][tmp_name]);
  phpinfo();
  echo "";
  exit;
}
?>


 
  Sunnyvale Staging Server
 

 
[ Main Index ]




Choose upload location: 
Files
Documentation
\n";
 echo $line;
 echo "Link Description: \n";
 echo "Detailed Description:\n";
 echo "";
 echo "Active: YesNoSubmitted\n";

 $result = mysql_query("SELECT * FROM groups");
 $line = "";
 while ($row = mysql_fetch_array($result)) {
   $line .= "$row[groupname] ($row[page])";
 }
 $line .= "\n";
# echo "Group: $line";
 echo "";
 echo "Choose File: \n";
 echo "";

} else {

$location = "";
if ($HTTP_POST_VARS[directory] = "Files") {
$location = "/usr/local/apache1.3.14/htdocs/Files";
} elseif ($HTTP_POST_VARS[directory] = "Docs") {
$location = "/usr/local/apache1.3.14/htdocs/Docs";
} else {
abortupload ("Error!  Invalid Directory value: $HTTP_POST_VARS[directory]");
}

if ($description == "") {
abortupload("Error!  Please provide a description for this document");
} elseif ($info == "") {
abortupload("Error!  Please provide information for this document");
}

if ($uploadfile = is_an_uploaded_file($userfile)) {
$uploadfile = $location . "/" . $HTTP_POST_FILES[userfile][name];
copy ($userfile, $uploadfile);

$result = mysql_query("SELECT * FROM users WHERE LoginName = '$loginname' 
LIMIT 1");
$userrow = mysql_fetch_array($result);

$url = "/" . $HTTP_POST_VARS[directory] . "/" . 
$HTTP_POST_FILES[userfile][name];
$mirror = 0;
$result = mysql_query("SELECT * FROM urls WHERE url = '$url'");
if ($existing = mysql_fetch_array($result)) {
  if ($existing[owner] != $userrow[UserID]) {
abortupload("Error: Your user ID doesn't have permission to modify 
this file.");
  } 
} else {
$result = mysql_query("INSERT INTO urls (owner, urlgroup, url, urldesc, info, 
active, mirror, urltype) VALUES ('$userrow[UserID]', '$HTTP_POST_VARS[urlgroup]', 
'$url', '$HTTP_POST_VARS[description]', '$HTTP_POST_VARS[info]', 
'$HTTP_POST_VARS[active]', '$mirror', '$HTTP_POST_VARS[urltype]')");

echo "File upload complete!";
}
} else {
  abortupload("Possible file upload attack: filename: " . 
$HTTP_POST_FILES["userfile"]["name"] . ".");
}

}

?>


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc

iEYEARECAAYFAjqJ08sACgkQhweYF/hu2ubukACbBij1wtVYr1gTngdHsXgrKmOr
ai8AnicSOVkP6OS1qiwfSQBBPqmL566k
=kNOr
-END PGP SIGNATURE-



-- 
PHP General 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]




Re: [PHP] GD library

2001-02-13 Thread David Robley

On Wed, 14 Feb 2001 00:23, Rahul Hari Bhide wrote:
> Hi ,
> I am configuring php with the  --with-gd option .
> My libgd.a is sitting in /usr/local/lib and other header files in
> /usr/local/include .
>
> ./configure --with-gd=/usr/local/lib gives me the following error :
>
> checking whether to include GD support... configure: error: Unable to
> find libgd.(a|so) anywhere under /usr/local/lib
>
> though the file is very much existant.
>
> Any ideas what is wrong???
>
> ~Rahul

Try ./configure --with-gd=/usr/local

Then configure will look in lib under that path for the libraries and 
include for the include files.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
PHP General 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]




RE: [PHP] Upload form

2001-02-13 Thread Brandon Orther

I am trying to do that with a file input not a text box.  So if anyone has
done this with a file input box please e-mail me!

-Original Message-
From: jason cox [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 4:24 PM
To: Brandon Orther
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Upload form


Brandon,

You can set a default value for a form field by doing
something like the following:





Hope that helps,

Jason

--- Brandon Orther <[EMAIL PROTECTED]> wrote:
> Hello,
>
> This is off topic, but I have been working on it all
> day with php and can't
> seem to figure it out. Does anyone know how to give
> a file field in a form a
> default value?  I am trying to have a script
> automatically fill in some
> upload fields on my form.
>
> Thank you,
>
> 
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> 
>
>
> --
> PHP General 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]
>


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/


-- 
PHP General 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]




Re: [PHP] could anyone please help me with this date coding?

2001-02-13 Thread David Robley

On Wed, 14 Feb 2001 09:26, Charles Mulford wrote:
> Hi all!  could anybody help me? I am fairly new to PHP and I inherited
> these scripts from someone who doesn't work with me anymore. They seem
> to puke on this portion while running them on win2k, latest php4 and
> mysql. On Linux platform they work as they are supposed to.
> thanks in advance!
>
> Charles Mulford
>
> -
>
> $max_date = 90;
> $ini_date = 0;
> echo("\t \n");
>  do {
>  $dis_date = date("D\. M\. d\, Y", strtotime ("+$ini_date day"));
>  $val_date = date("Y-m-d", strtotime ("+$ini_date day"));
>  echo("\t[$ini_date]
> $dis_date\n");
> }
> while (++$ini_date <= $max_date);
>
> -

Can you be a little more specific? Details of the error message and the 
line to which it refers might help diagnosis.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
PHP General 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]




Re: [PHP] file upload temp file is and isn't there

2001-02-13 Thread jason cox

Aaron,

Are you processing the file on the page you're
"posting" to?  Could you send your processing code so
we can have a look?  If you're still having problems,
I can send you an example.

Jason

--- "Aaron D. Turner" <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> 
> Solaris 7
> Apache 1.3.14
> PHP 4.0.4p1
> 
> For the life of me I can't figure out what's going
> on.  I have:
> 
>  action='/admin/upload.php' method='post'>
>  value=5000>
>  value=true>
> Choose File:  type=file>
> 
> 
> and I can try to upload a file, but then the
> HTTP_POST_FILES hash doesn't
> get properly populated and no file is stored in the
> upload
> directory.  Basically:
> 
> 
> HTTP_POST_FILES["userfile"]
> Array
>  (
>  [name] =>1323.txt
>  [type] =>text/plain
>  [tmp_name] =>none
>  [size] => 0
>  )
> I've set my php.ini with: upload_tmp_dir  = /tmp 
> and nothing gets put in there (I've verified that
> the dir has world r/w w/
> suid).
> 
> Any ideas of how to debug this futher?
> 
> - -- 
> Aaron Turner
> <[EMAIL PROTECTED]|synfin.net|linuxkb.org> 
> URI:www.synfin.net
> They that can give up essential liberty to obtain a
> little temporary safety 
> deserve neither liberty nor safety. -- Benjamin
> Franklin
> 
> pub 1024D/F86EDAE6  Sig: 3167 CCD6 6081 0FFC B749 
> 9A8F 8707 9817 F86E DAE6
> All emails by me are PGP signed; a lack of a
> signature indicates a forgery.
> I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80
>  596E 60BF 451B 20E8 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: Public key at:
> http://www.synfin.net/aturner/pgpkey.asc
> 
>
iEYEARECAAYFAjqJwWEACgkQhweYF/hu2uYnjgCfbXQVLYBwVnmAE5RHRxeTtdFI
> YgAAoIf9w7fNcbFmxyT/LlRUHa3lHfqB
> =Jqdm
> -END PGP SIGNATURE-
> 
> 
> 
> -- 
> PHP General 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]
> 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

-- 
PHP General 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]




Re: [PHP] Upload form

2001-02-13 Thread jason cox

Brandon,

You can set a default value for a form field by doing
something like the following:





Hope that helps,

Jason

--- Brandon Orther <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> This is off topic, but I have been working on it all
> day with php and can't
> seem to figure it out. Does anyone know how to give
> a file field in a form a
> default value?  I am trying to have a script
> automatically fill in some
> upload fields on my form.
> 
> Thank you,
> 
> 
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> 
> 
> 
> -- 
> PHP General 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]
> 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

-- 
PHP General 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]




Re: [PHP] Going backwards with sessions.

2001-02-13 Thread Chris Lee

I dont have to call session_register() on every page, should have to, just
call session_start() thats it.


--


Chris Lee
Mediawaveonline.com

em. [EMAIL PROTECTED]

ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120


"Michael McGlothlin" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I think you might need to session_register () the variables on each page
> you want to use them, not just once per session.
>
> Doug Budny wrote:
>
> > I'm having a strange problem with sessions, it appears that they are
> > not propagating to the next page.  When I run the login page the sess
> > vars get registered, the session_id() get's set, and the cookie sessId
> > get's set.  However when I go to the order page in a subdirectory only
> > the cookie sessId comes over correctly.  It will not set the
> > session_id().  The only thing that prints as expected is the cookie
> > var and $sessionId.
> >
> > I'm using 4.0.4pl1 on Redhad 6.2 apache 1.3.9 .  enable_track_vars is
> > enabled and so is register_globals.  Am I doing something wrong or is
> > Sessions broken in pl1?
> >
> >  >
> > // login page
> >
> > srand((double)microtime()*100);
> > $sessionId = md5(uniqid(rand()));
> > session_id($sessionId);
> > session_start();
> > setcookie("sessId", $sessionId);
> >
> > session_register('clientid');
> > session_register('clientname');
> > session_register('rnum');
> >
> > ?>
> >
> >
> >  >
> > // order page
> >
> > $sessionId = $HTTP_COOKIE_VARS['sessId'];
> >
> > session_id($sesssionId);
> > session_start();
> >
> >
> > //global $clientname;
> > //global $clientid;
> >
> > echo ('Client ID :' . $clientid);
> > echo ('Rnumber   :' . $rnum);
> > echo ('SessCli Name  :' . $HTTP_SESSION_VARS['clientname']);
> >
> > echo ('Session_Id() :' . session_id());
> > echo ('Session_name() :' . session_name());
> > echo ('sessId :' . $HTTP_COOKIE_VARS['sessId']);
> >
> > ?>
> >
> >
>
>
>
> --
> PHP General 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]
>



-- 
PHP General 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]




RE: [PHP] session encode

2001-02-13 Thread Peter Houchin

Its sort of what i wondered when the session is started it makes a file
in say c:/temp (in NT machine) what i wondered is how do you encode the
information in there ... the info in the file is something like
user|s:6:"username";pass|s:6:"password";email|s:6:"email address";

and also i can't get a value for the email ...  so the
session_register('email') returns nothing ... do you have any ideas?

-Original Message-
From: Michael McGlothlin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 10:35 AM
To: Peter Houchin
Cc: PHP MAIL GROUP
Subject: Re: [PHP] session encode


You don't need to use session_encode () in most situations. You can use
sessions and they'll automaticlly encode your variables. Is that what
you wondered?

Peter Houchin wrote:

> With session incode do you have to have it on every page where you have a
> session_start() ?
>
> Peter
>




-- 
PHP General 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]




Re: [PHP] Going backwards with sessions.

2001-02-13 Thread Chris Lee

mine is alot simpler and works fine, try this.




--


Chris Lee
Mediawaveonline.com

em. [EMAIL PROTECTED]

ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120


"Doug Budny" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm having a strange problem with sessions, it appears that they are not
> propagating to the next page.  When I run the login page the sess vars get
> registered, the session_id() get's set, and the cookie sessId get's
> set.  However when I go to the order page in a subdirectory only the
cookie
> sessId comes over correctly.  It will not set the session_id().  The only
> thing that prints as expected is the cookie var and $sessionId.
>
> I'm using 4.0.4pl1 on Redhad 6.2 apache 1.3.9 .  enable_track_vars is
> enabled and so is register_globals.  Am I doing something wrong or is
> Sessions broken in pl1?
>
> 
> // login page
>
> srand((double)microtime()*100);
> $sessionId = md5(uniqid(rand()));
> session_id($sessionId);
> session_start();
> setcookie("sessId", $sessionId);
>
> session_register('clientid');
> session_register('clientname');
> session_register('rnum');
>
> ?>
>
>
> 
> // order page
>
> $sessionId = $HTTP_COOKIE_VARS['sessId'];
>
> session_id($sesssionId);
> session_start();
>
>
> //global $clientname;
> //global $clientid;
>
> echo ('Client ID :' . $clientid);
> echo ('Rnumber   :' . $rnum);
> echo ('SessCli Name  :' . $HTTP_SESSION_VARS['clientname']);
>
> echo ('Session_Id() :' . session_id());
> echo ('Session_name() :' . session_name());
> echo ('sessId :' . $HTTP_COOKIE_VARS['sessId']);
>
> ?>
>
>
> --
> PHP General 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]
>



-- 
PHP General 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]




Re: [PHP] Going backwards with sessions.

2001-02-13 Thread Michael McGlothlin

I think you might need to session_register () the variables on each page 
you want to use them, not just once per session.

Doug Budny wrote:

> I'm having a strange problem with sessions, it appears that they are 
> not propagating to the next page.  When I run the login page the sess 
> vars get registered, the session_id() get's set, and the cookie sessId 
> get's set.  However when I go to the order page in a subdirectory only 
> the cookie sessId comes over correctly.  It will not set the 
> session_id().  The only thing that prints as expected is the cookie 
> var and $sessionId.
> 
> I'm using 4.0.4pl1 on Redhad 6.2 apache 1.3.9 .  enable_track_vars is 
> enabled and so is register_globals.  Am I doing something wrong or is 
> Sessions broken in pl1?
> 
>  
> // login page
> 
> srand((double)microtime()*100);
> $sessionId = md5(uniqid(rand()));
> session_id($sessionId);
> session_start();
> setcookie("sessId", $sessionId);
> 
> session_register('clientid');
> session_register('clientname');
> session_register('rnum');
> 
> ?>
> 
> 
>  
> // order page
> 
> $sessionId = $HTTP_COOKIE_VARS['sessId'];
> 
> session_id($sesssionId);
> session_start();
> 
> 
> //global $clientname;
> //global $clientid;
> 
> echo ('Client ID :' . $clientid);
> echo ('Rnumber   :' . $rnum);
> echo ('SessCli Name  :' . $HTTP_SESSION_VARS['clientname']);
> 
> echo ('Session_Id() :' . session_id());
> echo ('Session_name() :' . session_name());
> echo ('sessId :' . $HTTP_COOKIE_VARS['sessId']);
> 
> ?>
> 
> 



-- 
PHP General 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]




[PHP] Going backwards with sessions.

2001-02-13 Thread Doug Budny

I'm having a strange problem with sessions, it appears that they are not 
propagating to the next page.  When I run the login page the sess vars get 
registered, the session_id() get's set, and the cookie sessId get's 
set.  However when I go to the order page in a subdirectory only the cookie 
sessId comes over correctly.  It will not set the session_id().  The only 
thing that prints as expected is the cookie var and $sessionId.

I'm using 4.0.4pl1 on Redhad 6.2 apache 1.3.9 .  enable_track_vars is 
enabled and so is register_globals.  Am I doing something wrong or is 
Sessions broken in pl1?




Client ID :' . $clientid);
echo ('Rnumber   :' . $rnum);
echo ('SessCli Name  :' . $HTTP_SESSION_VARS['clientname']);

echo ('Session_Id() :' . session_id());
echo ('Session_name() :' . session_name());
echo ('sessId :' . $HTTP_COOKIE_VARS['sessId']);

?>


-- 
PHP General 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]




Re: [PHP] converting a date to a string format

2001-02-13 Thread Jared Howard

date("Ymd", mktime(0,0,0,date("d"),date("m")-14,date("Y")));

At 03:57 PM 2/13/01 -0500, Don wrote:
>Does someone have a snippet of code that retrieves today's date,
>subtracts 14 days and converts the result to a string in the form
>"MMDD"?
>
>If possible, please reply to my email.
>
>Thanks,
>Don
>
>
>-- 
>PHP General 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]
>


-- 
PHP General 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]




Re: [PHP] file upload temp file is and isn't there

2001-02-13 Thread Aaron D. Turner

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Tue, 13 Feb 2001, Michael McGlothlin wrote:

> A lil clip from Devedge.. you need a VALUE="" field along w/ a NAME="" 
> maybe?

A VALUE= isn't required for TYPE=file (and adding it didn't solve my
problem). 
 
> This places an element on an HTML form that lets the user supply a file 
> as input. When the form is submitted, the content of the specified file 
> is sent to the server as the value portion of the name/value pair for 
> this input element. Netscape Navigator displays a "Browse" button next 
> to the file input element that lets users select a file from their 
> system to use as the value of the file input element. *Navigator 2.0*

Yep, and if you look at the HTTP_POST_FILES hash you'll see that the
browser/form properly sent the filename.  The problem is with the
temporary file that isn't created/stored.  More specifically,
HTTP_POST_FILES[userfile][tmp_name] is set to 'none' when it should be
something like /tmp/abc123 and the size is 0.

- -- 
Aaron Turner <[EMAIL PROTECTED]|synfin.net|linuxkb.org>  URI:www.synfin.net
They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety. -- Benjamin Franklin

pub 1024D/F86EDAE6  Sig: 3167 CCD6 6081 0FFC B749  9A8F 8707 9817 F86E DAE6
All emails by me are PGP signed; a lack of a signature indicates a forgery.
I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80  596E 60BF 451B 20E8 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc

iEYEARECAAYFAjqJyJEACgkQhweYF/hu2ua1gwCfU6P+ScZCxAKlOFqlAzcZLkX7
KoEAoJDPG7AvelXPlLusT3BME1EZQQX/
=is6w
-END PGP SIGNATURE-



-- 
PHP General 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]




Re: [PHP] Here you have, ;o)

2001-02-13 Thread Josh G

Definitely, I agree, but I think it would be better if WSH was simply
patched, perhaps with a way to sign scripts, and non-expert users
can't give them root permissions, and that scripts should not
ever be able to send emails without a user confirmation, no matter
what permissions they have. Perhaps do the same thing with trying
to run a program or load a COM component.

My .02 :)

Gfunk -  http://www.gfunk007.com/

I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.


- Original Message -
From: "Thor M. Steindorsson" <[EMAIL PROTECTED]>
To: "Josh G" <[EMAIL PROTECTED]>
Sent: Wednesday, February 14, 2001 10:15 AM
Subject: RE: [PHP] Here you have, ;o)


> I agree with the vbs part, unfortunately windows is set by default to hide
> file extensions of known file types, meaning the person would only see the
> .jpg extension and not the .vbs.  Since most computer users are not as
> computer savvy as we are, they don't know any better.
>
> As far as the WSH, I removed mine months ago, and have yet to find a
program
> or website that has a problem with it not being there.  IMHO WSH is the
> biggest security threat ever released by a big computer corporation, since
> it essentially gives all scripts the same permissions the user has, and
> since 98% of windows 9x users essentially have admin permissions on their
> machines, the WSH basically gives admin access to anyone with a little bit
> of VB knowledge and a mean streak.
> I've created a couple of WSH scripts for clients, so I know how
ridiculously
> open this thing is.  From an email it's possible to execute ANY program
> installed on that machine, including all windows commands (even Format C:
is
> possible).
>
> Again, I agree with most of your vbs point (I am a sysadmin and we
filtered
> out .jpg.vbs attachments months ago (along with a ton of other
> attachements), so none of our customers were affected), but unfortunately
> the problem is primarily two fold:
>
> 1. People open attachments without knowing what they are.
> 2. Windows Scripting Host is a major security breach.
>
> Of course, this is just my opinion...



-- 
PHP General 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]




Re: [PHP] session encode

2001-02-13 Thread Michael McGlothlin

You don't need to use session_encode () in most situations. You can use 
sessions and they'll automaticlly encode your variables. Is that what 
you wondered?

Peter Houchin wrote:

> With session incode do you have to have it on every page where you have a
> session_start() ?
> 
> Peter
> 



-- 
PHP General 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]




Re: [PHP] file upload temp file is and isn't there

2001-02-13 Thread Michael McGlothlin

A lil clip from Devedge.. you need a VALUE="" field along w/ a NAME="" 
maybe?


This places an element on an HTML form that lets the user supply a file 
as input. When the form is submitted, the content of the specified file 
is sent to the server as the value portion of the name/value pair for 
this input element. Netscape Navigator displays a "Browse" button next 
to the file input element that lets users select a file from their 
system to use as the value of the file input element. *Navigator 2.0*

If a a form contains a file input element, the value of the ENCTYPE 
attribute of the FORM tag should be |"multipart/form-data"|.


Syntax

||

*/ NAME=name/*

specifies the name of the input element. This value is used as the
name portion of the name/value pair for this element that is sent to
the server when the form is submitted. The name is not displayed on
the form. 

*/ VALUE=filename/*

specifies the initial value of the input element. 


|
 File name:
 
|


Aaron D. Turner wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> 
> Solaris 7
> Apache 1.3.14
> PHP 4.0.4p1
> 
> For the life of me I can't figure out what's going on.  I have:
> 
> 
> 
> 
> Choose File: 
> 
> 
> and I can try to upload a file, but then the HTTP_POST_FILES hash doesn't
> get properly populated and no file is stored in the upload
> directory.  Basically:
> 
> 
> HTTP_POST_FILES["userfile"]
> Array
>  (
>  [name] =>1323.txt
>  [type] =>text/plain
>  [tmp_name] =>none
>  [size] => 0
>  )
> I've set my php.ini with: upload_tmp_dir  = /tmp 
> and nothing gets put in there (I've verified that the dir has world r/w w/
> suid).
> 
> Any ideas of how to debug this futher?
> 
> - -- 
> Aaron Turner <[EMAIL PROTECTED]|synfin.net|linuxkb.org>  URI:www.synfin.net
> They that can give up essential liberty to obtain a little temporary safety 
> deserve neither liberty nor safety. -- Benjamin Franklin
> 
> pub 1024D/F86EDAE6  Sig: 3167 CCD6 6081 0FFC B749  9A8F 8707 9817 F86E DAE6
> All emails by me are PGP signed; a lack of a signature indicates a forgery.
> I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80  596E 60BF 451B 20E8 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc
> 
> iEYEARECAAYFAjqJwWEACgkQhweYF/hu2uYnjgCfbXQVLYBwVnmAE5RHRxeTtdFI
> YgAAoIf9w7fNcbFmxyT/LlRUHa3lHfqB
> =Jqdm
> -END PGP SIGNATURE-
> 
> 
> 



-- 
PHP General 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]




[PHP] session encode

2001-02-13 Thread Peter Houchin

With session incode do you have to have it on every page where you have a
session_start() ?

Peter



[PHP] Still can't talk to the Oracle

2001-02-13 Thread Kristofer Widholm

I'm setting up a back end production system for a television show, 
and have been given space on a development server with PHP 4 and 
Oracle support compiled in (but not the OCI libraries). The Oracle 
admin have given me my user name (let's say ora_user), a TNS name 
(tns_name), and a password (ora_pass).

So I write code as follows...

if ($conn=ora_logon("ora_user@tns_name","ora_pass")) {
echo "SUCCESS ! Connected to database\n";
} else {
echo "Failed :-( Could not connect to database\n";
echo ora_errorcode($conn).": ".ora_error($conn)."";
}

In response to this code, I get the following error:
ORA-12154 "Supplied argument is not a valid Oracle-Connection/Cursor 
resource in "

 From reading php.net documentation on ora_logon, it seemed that maybe 
the ORACLE_HOME environment variable simply hadn't been set.

I had the sys admins set it.

And I still get the error.

Any ideas from an experienced PHP/Oracle developer?

Kristofer

-- 
PHP General 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]




Re: [PHP] URGENT! Regarding file writing

2001-02-13 Thread Michael McGlothlin

Without knowing exactly what you're doing I'd say it's easiest to read 
the entire file into an array, modify the line you want, and write the 
file back out. Then you could easily modify any line you wanted. 
Otherwise check out fseek () in the PHP manual.

whatever wrote:

> How to do that? I mean how to set file pointer to certain line?
> I've tried ftel() but it returns starnge number like 17534
> decrementing it causes file-handle error
> Yes i do have adequate permissions to modify the file in question on
> Win2000
> 
> 10x in advance
> Nemanja
> NOTE: My email is incorrect. Please remove nospam part.
> 
> On 13 Feb 2001 14:55:11 -0800, [EMAIL PROTECTED] (Michael
> McGlothlin) wrote:
> 
>> Did you try taking the line you wanted to change and doing a minus one 
>> to get the right line number? Not sure why windows won't change the 
>> file. I'm assuming you have the proper permissions to do what your 
>> trying to do?
>> 



-- 
PHP General 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]




[PHP] file upload temp file is and isn't there

2001-02-13 Thread Aaron D. Turner

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Solaris 7
Apache 1.3.14
PHP 4.0.4p1

For the life of me I can't figure out what's going on.  I have:




Choose File: 


and I can try to upload a file, but then the HTTP_POST_FILES hash doesn't
get properly populated and no file is stored in the upload
directory.  Basically:


HTTP_POST_FILES["userfile"]
Array
 (
 [name] =>1323.txt
 [type] =>text/plain
 [tmp_name] =>none
 [size] => 0
 )
I've set my php.ini with: upload_tmp_dir  = /tmp 
and nothing gets put in there (I've verified that the dir has world r/w w/
suid).

Any ideas of how to debug this futher?

- -- 
Aaron Turner <[EMAIL PROTECTED]|synfin.net|linuxkb.org>  URI:www.synfin.net
They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety. -- Benjamin Franklin

pub 1024D/F86EDAE6  Sig: 3167 CCD6 6081 0FFC B749  9A8F 8707 9817 F86E DAE6
All emails by me are PGP signed; a lack of a signature indicates a forgery.
I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80  596E 60BF 451B 20E8 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc

iEYEARECAAYFAjqJwWEACgkQhweYF/hu2uYnjgCfbXQVLYBwVnmAE5RHRxeTtdFI
YgAAoIf9w7fNcbFmxyT/LlRUHa3lHfqB
=Jqdm
-END PGP SIGNATURE-



-- 
PHP General 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]




Re: [PHP] URGENT! Regarding file writing

2001-02-13 Thread whatever

How to do that? I mean how to set file pointer to certain line?
I've tried ftel() but it returns starnge number like 17534
decrementing it causes file-handle error
Yes i do have adequate permissions to modify the file in question on
Win2000

10x in advance
Nemanja
NOTE: My email is incorrect. Please remove nospam part.

On 13 Feb 2001 14:55:11 -0800, [EMAIL PROTECTED] (Michael
McGlothlin) wrote:

>Did you try taking the line you wanted to change and doing a minus one 
>to get the right line number? Not sure why windows won't change the 
>file. I'm assuming you have the proper permissions to do what your 
>trying to do?
>


-- 
PHP General 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]




[PHP] Upload form

2001-02-13 Thread Brandon Orther

Hello,

This is off topic, but I have been working on it all day with php and can't
seem to figure it out. Does anyone know how to give a file field in a form a
default value?  I am trying to have a script automatically fill in some
upload fields on my form.

Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com



-- 
PHP General 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]




Re: [PHP] URGENT! Regarding file writing

2001-02-13 Thread Michael McGlothlin

Did you try taking the line you wanted to change and doing a minus one 
to get the right line number? Not sure why windows won't change the 
file. I'm assuming you have the proper permissions to do what your 
trying to do?

whatever wrote:

> Hi!
> I would like to know how to overwrite line in file which matches
> certain condition. Best thing i managed so far is to write line AFTER
> the line i wanted to overwrite under Linux. No such luck under Win2000
> which refuses to write anything to a file but file date/time property
> has been changed.
> 
> File is open using $fp=fopen("$file", "r+");
> Writing is done using fputs or fwrite($fp, $data);
> 
> In question is PHP standalone executable. Version i 4.0.3pl1(win2000)
> and 4.0.0(linux)
> 
> Any suggestions are welcome.
> 
> 10x
> Nemanja
> 
> NOTE: My email is incorrect. Please remove nospam part.
> 
> 



-- 
PHP General 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]




[PHP] could anyone please help me with this date coding?

2001-02-13 Thread Charles Mulford

Hi all!  could anybody help me? I am fairly new to PHP and I inherited these
scripts from someone who doesn't work with me anymore. They seem to puke on
this portion while running them on win2k, latest php4 and mysql. On Linux
platform they work as they are supposed to.
thanks in advance!

Charles Mulford

-

$max_date = 90;
$ini_date = 0;
echo("\t \n");
 do {
 $dis_date = date("D\. M\. d\, Y", strtotime ("+$ini_date day"));
 $val_date = date("Y-m-d", strtotime ("+$ini_date day"));
 echo("\t[$ini_date]
$dis_date\n");
}
while (++$ini_date <= $max_date);

-

-- 
PHP General 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]




[PHP] URGENT! Regarding file writing

2001-02-13 Thread whatever

Hi!
I would like to know how to overwrite line in file which matches
certain condition. Best thing i managed so far is to write line AFTER
the line i wanted to overwrite under Linux. No such luck under Win2000
which refuses to write anything to a file but file date/time property
has been changed.

File is open using $fp=fopen("$file", "r+");
Writing is done using fputs or fwrite($fp, $data);

In question is PHP standalone executable. Version i 4.0.3pl1(win2000)
and 4.0.0(linux)

Any suggestions are welcome.

10x
Nemanja

NOTE: My email is incorrect. Please remove nospam part.


-- 
PHP General 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]




[PHP] Re:LOCK TABLES x COMMIT/ROLLBACK

2001-02-13 Thread Phil Daintree

This also troubles me i have read and read the docs on this. It seems that Lock tables
prevents other threads interfering with your transaction  your inserts will not be
compromised by another thread deleting or updating data inconsistent with your SQL. The
snag for me is that all obscure input from the user and every other eventuality has to 
be
trapped prior to avoid sending dud SQL to MySQL, other wise the inserts/updates will 
fail.
The TO DO list talks about atomic inserts/updates which would solve my problems ie they
all happen or all do NOT happen. If MySQL can do this then I don't care about 
rollback. I
would dearly like to use the fast tables rather than compromise speed using DBD tables 
but
as I see it we are stuck with them or Postgres until the atomic updates code is 
completed.

Be interested to know if anyone has got atomic updates sorted.

Phil Daintree




-- 
PHP General 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]




Re: [PHP] SELECT statement

2001-02-13 Thread Michael McGlothlin

Try or print mysql_error ()  rather than or die ( print mysql_error () )?

Peter Houchin wrote:

> I've tried this but mysql_error() doesn't give me any errors, i tried my sql
> line at the command line with success here is my code if some one could have
> a look at it and give some suggestions as to how i can get the email ...
> 
> Thanks again
> 
> Peter
> 
>  session_start();
> if ($REQUEST_METHOD=='POST')
> {
> header('Expires: ' . gmdate("D, d M Y H:i:s", time()+1000) . ' GMT');
> header('Cache-Control: Private');
> }
> session_register('user');
> session_register('pass');
> session_register('email');
> $session = session_id();
> $userid = '$user';
> 
> 
> ?>
> 
> 
> 
>   eRentals
> 
> 
> 
>  // connect to data base
> $open = mysql_connect("localhost", "root", "password")
> or die (" color=\"#006699\">Unable to connect to server.");
> mysql_select_db("rentdb")
> or die (" color=\"#006699\">Unable to select database.");
> 
> // select id & email from  table matching the user name and password
> inputted
> 
> $sql = "SELECT id, email FROM users WHERE user='$user' and pass='$pass'";
> $result = mysql_query($sql)
> or die (print mysql_error());
> 
> // if unsuccessfull do this
> 
> $num = mysql_numrows($result)
> or die ("
> 
>   You're
> not authorized to be here.  If you feel you have recieved this
> message in error, please contact the  href=\"mailto:[EMAIL PROTECTED]\">webmaster
> 
>   ");
> // if successful then do this
> if ($num == 1) {
> 
> 
> 
> include "quote2.php"; //has a hidden field referencing the user & the email
> address .. user shows up but again email does not
> }
> 
> ?>
> 
> 
> 
> 
> 
> -Original Message-
> From: Philip Olson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 13, 2001 4:59 PM
> To: Peter Houchin
> Cc: PHP MAIL GROUP
> Subject: RE: [PHP] SELECT statement
> 
> 
> A possible way to find out :
> 
> $result = mysql_query($sql) or die(mysql_error());
> 
> Does it say anything?  mysql_error() is your friend, it can be printed
> anywhere within the script and will print the last mysql error.  So
> perhaps :
> 
> print mysql_error();
> 
> Right before the query or ...
> 
> Regards,
> 
> Philip
> 
> On Tue, 13 Feb 2001, Peter Houchin wrote:
> 
>> 
>> 
>> 
>> ok I've changed my code to
>> 
>> $sql = "SELECT id, email FROM users WHERE user='$user' and pass='$pass'";
>> but still no joy can any one suggest why?
>> 
>> (& Yes email is a field in the table)
>> 
>> Peter
>> 
>>> Hi,
>>> 
>>> Can you have a SELECT statement (using mysql) that goes something like
>>> 
>>> $sql="SELECT id && email FROM table WHERE user='$user' and
>> 
> pass='$pass'";
> 
>> 
>> --
>> PHP General 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]
>> 



-- 
PHP General 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]




Re: [PHP] Piping/parsing Apache logs though PHP?

2001-02-13 Thread Kurth Bemis

At 04:17 PM 2/13/2001, Michael McGlothlin wrote:

can i ask why you're doing this - it seems like a waste of resources to me.

~kurth

>I'd like to pipe and parse my Apache logs through PHP into a MySQL db. Is 
>there a way to do this automaticlly for each entry and would that cause a 
>major performance loss to the web server? If not does anyone know the best 
>way to parse the server log? I'd like to do somerthing like move the 
>server log to a temp file, Restart Apache so the logs will keep being 
>written, and parse the log and save it's values in a database but this has 
>the obvious problem of what happens to PHP when Apache is restarted in the 
>manner the Apache logs specify. Any suggestions? Thanks.
>
>
>--
>PHP General 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]
>


-- 
PHP General 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]




RE: [PHP] Piping/parsing Apache logs though PHP?

2001-02-13 Thread Thor M. Steindorsson

try this script:

http://www.wokzilla.com/usage/usage.php3


-Original Message-
From: Michael McGlothlin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 1:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Piping/parsing Apache logs though PHP?


I'd like to pipe and parse my Apache logs through PHP into a MySQL db. 
Is there a way to do this automaticlly for each entry and would that 
cause a major performance loss to the web server? If not does anyone 
know the best way to parse the server log? I'd like to do somerthing 
like move the server log to a temp file, Restart Apache so the logs will 
keep being written, and parse the log and save it's values in a database 
but this has the obvious problem of what happens to PHP when Apache is 
restarted in the manner the Apache logs specify. Any suggestions? Thanks.


-- 
PHP General 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]



-- 
PHP General 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]




[PHP] Re: [PHP-DB] installing MySQL with PHP4.0.3pl1

2001-02-13 Thread Darryl Friesen

> I'm trying to get MySQL to work with php, however I'm running php on a
WinNT
> box and I was wondering if I needed to install MySQL in a specific
location
> on the hard drive?  The reason I as is that when I try to connect to a
> database I create in MySQL in php it doesn't find any database.  I'm
totally
> lost on this and don't have a clue as what to do.  Any help will be
greatly
> appreciated.

If you pick a directory other than the default, I think you need to create a
file called my.cnf in the root of C: indicating where mysql is.  Mine looks
like this:

[mysqld]
basedir = e:/mysql/


I needed to do this before mysqld would even start.


- Darryl

 --
  Darryl Friesen, B.Sc., Programmer/Analyst[EMAIL PROTECTED]
  Education & Research Technology Services, http://gollum.usask.ca/
  Department of Computing Services,
  University of Saskatchewan
 --
  "Go not to the Elves for counsel, for they will say both no and yes"



-- 
PHP General 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]




Re: [PHP] Would Like to know

2001-02-13 Thread Chris Lee




--


Chris Lee
Mediawaveonline.com

em. [EMAIL PROTECTED]

ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120

""Barry Fawthrop"" <[EMAIL PROTECTED]> wrote in message
00ad01c095fc$d6865940$[EMAIL PROTECTED]">news:00ad01c095fc$d6865940$[EMAIL PROTECTED]...
Can PHP direct the output to a file
eg send the HTTP_USER_AGENT information to a file ??

Barry





-- 
PHP General 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]




Re: [PHP] converting a date to a string format

2001-02-13 Thread Philip Olson

try something like :


function pastDate($days,$format='Ymd')
{
$secs = ( $days * 86400 );

return date( $format,time()-$secs );
}

print pastDate(14);

Regards,


Philip Olson
http://www.cornado.com/

On Tue, 13 Feb 2001, Don wrote:

> Does someone have a snippet of code that retrieves today's date,
> subtracts 14 days and converts the result to a string in the form
> "MMDD"?
> 
> If possible, please reply to my email.
> 
> Thanks,
> Don
> 
> 
> -- 
> PHP General 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]
> 


-- 
PHP General 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]




RE: [PHP] SELECT statement

2001-02-13 Thread Peter Houchin


I've tried this but mysql_error() doesn't give me any errors, i tried my sql
line at the command line with success here is my code if some one could have
a look at it and give some suggestions as to how i can get the email ...

Thanks again

Peter





eRentals



Unable to connect to server.");
mysql_select_db("rentdb")
or die ("Unable to select database.");

// select id & email from  table matching the user name and password
inputted

$sql = "SELECT id, email FROM users WHERE user='$user' and pass='$pass'";
$result = mysql_query($sql)
or die (print mysql_error());

// if unsuccessfull do this

$num = mysql_numrows($result)
or die ("

You're
not authorized to be here.  If you feel you have recieved this
message in error, please contact the mailto:[EMAIL PROTECTED]\">webmaster

");
// if successful then do this
if ($num == 1) {



include "quote2.php"; //has a hidden field referencing the user & the email
address .. user shows up but again email does not
}

?>





-Original Message-
From: Philip Olson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 4:59 PM
To: Peter Houchin
Cc: PHP MAIL GROUP
Subject: RE: [PHP] SELECT statement


A possible way to find out :

$result = mysql_query($sql) or die(mysql_error());

Does it say anything?  mysql_error() is your friend, it can be printed
anywhere within the script and will print the last mysql error.  So
perhaps :

print mysql_error();

Right before the query or ...

Regards,

Philip

On Tue, 13 Feb 2001, Peter Houchin wrote:

>
>
>
>
> ok I've changed my code to
>
> $sql = "SELECT id, email FROM users WHERE user='$user' and pass='$pass'";
> but still no joy can any one suggest why?
>
> (& Yes email is a field in the table)
>
> Peter
>
> > Hi,
> >
> > Can you have a SELECT statement (using mysql) that goes something like
> >
> > $sql="SELECT id && email FROM table WHERE user='$user' and
pass='$pass'";
>
>
> --
> PHP General 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]
>



-- 
PHP General 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]




[PHP] Piping/parsing Apache logs though PHP?

2001-02-13 Thread Michael McGlothlin

I'd like to pipe and parse my Apache logs through PHP into a MySQL db. 
Is there a way to do this automaticlly for each entry and would that 
cause a major performance loss to the web server? If not does anyone 
know the best way to parse the server log? I'd like to do somerthing 
like move the server log to a temp file, Restart Apache so the logs will 
keep being written, and parse the log and save it's values in a database 
but this has the obvious problem of what happens to PHP when Apache is 
restarted in the manner the Apache logs specify. Any suggestions? Thanks.


-- 
PHP General 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]




Re: [PHP] php and xml

2001-02-13 Thread Chris Lee

testing
testing");
?>

works for me on my linux box. have you checked your permisions ?


--


Chris Lee
Mediawaveonline.com

em. [EMAIL PROTECTED]

ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120



""Jan Grafström"" <[EMAIL PROTECTED]> wrote in message
96c6t7$52l$[EMAIL PROTECTED]">news:96c6t7$52l$[EMAIL PROTECTED]...
> Hi!
> I have this php:
> $message = ereg_replace("\r","", $message);
> $message =
> "$message$name$adress$tele";
> $fp = fopen (basename($PHP_SELF) . ".comment", "a");
> fwrite ($fp, $message);
> fclose ($fp);
> There must be something wrong in first line beacause the value of message
is
> not writed.
> I also want the output to contain a in beginning.
>
> Thanks for any help
> Jan Grafstrom
>
>
>
> --
> PHP General 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]
>



-- 
PHP General 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]




[PHP] RE: [PHP-DB] installing MySQL with PHP4.0.3pl1

2001-02-13 Thread Thor M. Steindorsson

a rule of thumb with windows boxes:
always install software in the default location :)

in this case that would be c:\mysql

cheers,
Thor.

-Original Message-
From: Paulson, Joseph V. "Jay" [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 2:19 PM
To: PHP-DB-LIST; [EMAIL PROTECTED]
Subject: [PHP-DB] installing MySQL with PHP4.0.3pl1


Hello everyone-
I'm trying to get MySQL to work with php, however I'm running php on a WinNT
box and I was wondering if I needed to install MySQL in a specific location
on the hard drive?  The reason I as is that when I try to connect to a
database I create in MySQL in php it doesn't find any database.  I'm totally
lost on this and don't have a clue as what to do.  Any help will be greatly
appreciated.
Regards,
Jay

--
PHP Database 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]



-- 
PHP General 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]




Re: [PHP] php and xml

2001-02-13 Thread Nathan Cassano

Steve,
Did you take a look at the raw data returned by the fsockopen file pointer.
There may be some http headers that are tripping up the xml parser.

-Original Message-
From: Steve Haemelinck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 12:07 PM
To: PHP Mailing Listl (E-mail)
Subject: [PHP] XML Parsing through Proxy


Hi Anybody got an idea?

I am sitting behind a proxy and I want to able to parse an XML.
So I have to use fsockopen() to get through my firewall and get the page.
So far, everything goes wel, but I am not able to parse the file, because I
think it is not in XML format if I use "GET http:// "
Does anyone has an idea how I can solve this?

My code so far (bits and pieces of anywhere :) )


Steve


 "HEADER_TAG",
"ISSUE-NAME" => "STOCK_NAME",
"LAST-SALE-PRICE" => "LAST_SALE",
"PREVIOUS-CLOSE-PRICE" => "PREVIOUS_SALE",
"NET-CHANGE-PRICE" => "CHANGE",
"NET-CHANGE-PCT" => "CHANGE_PCT",
"TODAYS-HIGH-PRICE" => "TODAYS_HIGH",
"TODAYS-LOW-PRICE" => "TODAYS_LOW",
);

# XML File to Parse
$xmlFile_Location="http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&sy
mbol=NETA";


// Functions

# StartElement Of Parser
function startElement($parser, $name, $attrs=''){
global $map_array, $temp, $current_tag;

$current_tag = $name;
if ($format = $map_array[$name]){
switch($name){
case 'NASDAQAMEX-DOT-COM':
//echo $HTTP_GET_VARS['ticker'];
break;
default:
break;
}
}
}

# EndElement Of Parser
function endElement($parser, $name, $attrs=''){
global $map_array, $temp, $current_tag;

if ($format = $map_array[$name]){
switch($name){
case 'NASDAQAMEX-DOT-COM':
return_page($temp);
$temp = '';
break;
default:
break;
}
}
}

# Process the Data between XML-Tags
function characterData($parser, $data){
global $current_tag, $temp, $catID;

switch($current_tag){
case 'ISSUE-NAME':
$temp['STOCK_NAME'] = $data;
$current_tag = '';
break;
case 'LAST-SALE-PRICE':
$temp['LAST_SALE'] = $data;
$current_tag = '';
break;
default:
break;
}
}

# Create the XML Parser and set options
$type="UTF-8";
$xml_parser = xml_parser_create($type);
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);
xml_set_element_handler($xml_parser, 'startElement','endElement');
xml_set_character_data_handler($xml_parser, 'characterData');

/* Open a connection through Proxy with Nasdaq and start parsing */
$sockPointer = fsockopen($proxy_ip,$proxy_port, $errNo, $errStr,30);
//Connect to Proxy

if( !$sockPointer ){
echo "$errStr Proxy not Available \n\n";
exit();
}
else{
fputs($sockPointer,"GET $xmlFile_Location/ \n\n");
while (!feof($sockPointer)){
$Data = fgets($sockPointer, 10);
$tag= "\n\n";
if( eregi("xml version",$Data) ){
$Parse=1;
}
if($Parse==1){
if (!($Data = utf8_encode($Data))){
echo 'ERROR'."\n";
}
if (!xml_parse($xml_parser, $Data, feof($sockPointer))){
die(sprintf( "XML error: %s at line %d\n\n",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
}
}
fclose($sockPointer);
}

xml_parser_free($xml_parser);

?>


-- 
PHP General 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]




[PHP-CVS] cvs: php4 /pear/Crypt CBC.php

2001-02-13 Thread Colin Viebrock

cmv Tue Feb 13 13:53:48 2001 EDT

  Modified files:  
/php4/pear/CryptCBC.php 
  Log:
  initialize two variables
  
  
Index: php4/pear/Crypt/CBC.php
diff -u php4/pear/Crypt/CBC.php:1.5 php4/pear/Crypt/CBC.php:1.6
--- php4/pear/Crypt/CBC.php:1.5 Fri Feb  2 13:52:21 2001
+++ php4/pear/Crypt/CBC.php Tue Feb 13 13:53:48 2001
@@ -36,7 +36,7 @@
 * the author of libcrypt decides to name things internally.
 *
 *
-* @version  $Id: CBC.php,v 1.5 2001/02/02 21:52:21 cmv Exp $
+* @version  $Id: CBC.php,v 1.6 2001/02/13 21:53:48 cmv Exp $
 * @author   Colin Viebrock <[EMAIL PROTECTED]>
 * @author   Mike Glover <[EMAIL PROTECTED]>
 *
@@ -230,6 +230,9 @@
 $crypt = substr($crypt, $iv_offset+$this->blocksize);
 
 /* decrypt the message */
+
+$start = 0;
+$clear = '';
 
 while ( $cblock = substr($crypt, $start, $this->blocksize) ) {
 $start += $this->blocksize;



-- 
PHP CVS 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]




Re: [PHP] INSERT into MSSQL Server

2001-02-13 Thread Michael McGlothlin

Have you tried addslashes () on the input lines before the insert?

Conover, Ryan wrote:

> I trying to insert some data into a MSSQL Server 7.0 database from Php. Some
> of the data has various characters ', >  . How can I tell SQL Server to
> treat these characters as part of the input.
> 
> Ryan Conover
> 



-- 
PHP General 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]




[PHP] XML parsing problems..

2001-02-13 Thread Michael McGlothlin

I didn't see any responses to this the other day when I asked so this 
time I'll include source.. just cutting and pasting so hopefully nothing 
gets clobbered..

When I parse this lil bit of raw data it parses properly. You can trace 
it and see that it opens and closes the tags properly and that it writes 
the $this->dom variable properly in the parsers close_tag () function. 
However when you return the $this->dom value afterwards the variables 
previous value is returned rather than the current value. Any ideas what 
I am doing wrong? Thanks.

Howdy!";
$raw .= "My dog is cute. My cat is cute.";

$xml_parser = new xml_parser;
$document = $xml_parser->parse ( $raw );

print "";
print_r ( $document );
print "";

?>

encoding = $encoding;

   if ( $this->parser = xml_parser_create () ) {
   xml_set_object ( $this->parser, $this );
   xml_set_element_handler ( $this->parser, 
"tag_open", "tag_close" );
   xml_set_character_data_handler ( $this->parser, 
"cdata");
   }
   }

   function parse ( $data )
   {
   xml_parse ( $this->parser, $data );
   }

   function tag_open ( $parser, $tag, $attributes )
   {
   foreach ( $attributes as $key => $value ) {
   $attrib_str .= ", $key=$value";
   }

   print "\n";
   print "Open: $tag$attrib_str\n";
   }

   function cdata ( $parser, $cdata )
   {
   print "Data: $cdata\n";
   }

   function tag_close ( $parser, $tag )
   {
   print "Close: $tag\n";
   print "\n";
   }
}


class xml_parser
{
   var $encoding;
   var $parser;
   var $opened_tags = array ();
   var $dom;

   function xml_parser ( $encoding = 'ISO-8859-1' )
   {
   $this->encoding = $encoding;

   $this->create ();
   $this->configure ();
   }

   function create ()
   {
   $this->parser = xml_parser_create ( $this->encoding );
   }

   function configure ()
   {
   xml_set_object ( $this->parser, $this );
   xml_set_element_handler ( $this->parser, "open_tag", 
"close_tag" );
   xml_set_character_data_handler ( $this->parser, "cdata" );
   }

   function parse ( $data )
   {
   xml_parse ( $this->parser, $data );

   return $this->dom;
   }

   function open_tag ( $parser, $tag_type, $attributes )
   {
   $tag = new xml_tag ( $tag_type, $attributes );
   $this->opened_tags[] = $tag;
   }

   function close_tag ( $parser, $tag_type )
   {
   $tag = array_pop ( $this->opened_tags );
   $mother_tag = array_pop ( $this->opened_tags );

   if ( $mother_tag ) {
   $mother_tag->add_tag ( $tag );
   $this->opened_tags[] = $mother_tag;
   } elseif ( $tag ) {
   $this->dom = $tag;

   function cdata ( $parser, $cdata )
   {
   $this->open_tag ( $parser, 'cdata', $cdata );
   $this->close_tag ( $parser, 'cdata' );
   }
}


class xml_tag
{
   var $tag;
   var $arguments;
   var $contents = array ();

   function xml_tag ( $tag, $arguments = array() )
   {
   // Name of the tag.
   $this->tag = $tag;

   // Array of argument/value pairs.
   $this->arguments = $arguments;
   }

   function add_tag ( $tag )
   {
   $this->contents[] = $tag;
   }
}

?>


-- 
PHP General 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]




RE: [PHP] Piping/parsing Apache logs though PHP?

2001-02-13 Thread Balak, Frank

I don't know if this will do it for you, but try mod_log_mysql. This module
logs all request to tables of your definition. It doesn't do the error log
though. 

Frank
--
Franklin J. Balak Jr.
Quality Assurance Data Analyst
Brown Printing Company
Waseca Division
Waseca, MN. 56093
Voice: 507-835-0253
Fax: 507-835-0293
-- 

-Original Message-
From: Michael McGlothlin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 15:17
To: [EMAIL PROTECTED]
Subject: [PHP] Piping/parsing Apache logs though PHP?


I'd like to pipe and parse my Apache logs through PHP into a MySQL db. 
Is there a way to do this automaticlly for each entry and would that 
cause a major performance loss to the web server? If not does anyone 
know the best way to parse the server log? I'd like to do somerthing 
like move the server log to a temp file, Restart Apache so the logs will 
keep being written, and parse the log and save it's values in a database 
but this has the obvious problem of what happens to PHP when Apache is 
restarted in the manner the Apache logs specify. Any suggestions? Thanks.


-- 
PHP General 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]

-- 
PHP General 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]




[PHP] installing MySQL with PHP4.0.3pl1

2001-02-13 Thread Paulson, Joseph V. \"Jay\"

Hello everyone-
I'm trying to get MySQL to work with php, however I'm running php on a WinNT
box and I was wondering if I needed to install MySQL in a specific location
on the hard drive?  The reason I as is that when I try to connect to a
database I create in MySQL in php it doesn't find any database.  I'm totally
lost on this and don't have a clue as what to do.  Any help will be greatly
appreciated.
Regards,
Jay

-- 
PHP General 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]




RE: [PHP] INSERT into MSSQL Server

2001-02-13 Thread Peter Houchin

in mysql i'd treat them as a char or varchar i would assume it would be the
same in MSSQL

-Original Message-
From: Conover, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 9:32 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] INSERT into MSSQL Server


I trying to insert some data into a MSSQL Server 7.0 database from Php. Some
of the data has various characters ', >  . How can I tell SQL Server to
treat these characters as part of the input.

Ryan Conover

--
PHP General 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]



-- 
PHP General 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]




[PHP] INSERT into MSSQL Server

2001-02-13 Thread Conover, Ryan

I trying to insert some data into a MSSQL Server 7.0 database from Php. Some
of the data has various characters ', >  . How can I tell SQL Server to
treat these characters as part of the input.

Ryan Conover

-- 
PHP General 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]




[PHP] RE: Would Like to know

2001-02-13 Thread Sam Leibowitz

> Can PHP direct the output to a file
> eg send the HTTP_USER_AGENT information to a file ??


Sure. Read the documentation for fopen(), flock(), and fwrite(). Then
fwrite() out $HTTP_SERVER_VARS["HTTP_USER_AGENT"].

Sam


-- 
PHP General 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]




Re: [PHP] RE: Your Opinion?! PHP4 coding style - Comment and Splitting source code

2001-02-13 Thread Mark Maggelet

On Tue, 13 Feb 2001 16:48:10 -0500, Sam Leibowitz
([EMAIL PROTECTED]) wrote:
>My personal opinions:
>
>The effect of comments in code parsing speed is negligable. Never
>hesitate
>to put in a comment because you think it's going to slow down the
>procedure.
>If your speed requirements were that down to the wire, you should
>have gone
>with a compiled app anyway. Or a faster server.  Or anything other
>than not
>putting in comments.
>
>That said, it's rare that I've written 2 lines of comments for every
>1 line
>of code, and I tend to be fairly rigorous (on good days, anyway)
>about
>commenting completely.  You may want to consider putting some of
>those
>comments in seperate design documentation.
>
>Finally, I tend to break up my source code into several files,
>usually
>around the class definitions (I like object orientation).  I usually
>wind up
>with one file for the database interface, a few files containing
>class
>definitions corresponding to the business logic, and an included
>fragment
>for each block of HTML which needs to interact heavily with the PHP
>(for
>example, pre-populated form fields).  This is purely for
>ease-of-maintenance.
>
>Where you can, you should replace calls to include() with calls to
>require(), because require() is a bit faster.  The catch is that you
>can't
>place require() calls in conditional blocks, so:
>
> if ($something) include($foo); // this is okay
> if ($something) require($bar); // this is not.

if ($something) { include($foo); } // this is okay
if ($something) include($foo); // this is not.



--
PHP General 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]




  1   2   3   >