Re: [PHP] Re: How do I keep a page from caching in I.E

2002-09-06 Thread Casey Allen Shobe

I know this problem.  Konqueror, Netscape, Mozilla, and Opera are all broken.  
They use cache regardless of whether or not they should when you use the back 
button.  I know of no way around it.

What especially pisses me off is that Mozilla, shortly before 1.0, worked 
properly, even when you used the back button, as IE does.  But the 1.0 
release broke it, as though they did it intentionally.

Here's what I use, though it really only works in IE where the back button is 
concerned:

// Don't allow browsers to cache data
header ('Last-Modified: '.gmdate(D, d M Y H:i:s).' GMT');
header ('Expires: '.gmdate(D, d M Y H:i:s).' GMT');
header ('Cache-Control: no-cache, must-revalidate');
header ('Pragma: no-cache');

If anyone has any further information, I would appreciate it.  Are there 
workarounds in PHP?  Or do I need to complain to the web browser makers?

- Casey

On Friday 06 September 2002 05:44 am, Krzysztof Dziekiewicz wrote:
 4.09.2002, 17:48, Victor V. Evtushenko wrote:
  Donpro wrote:
  Hi,
 
  Using I.E. 5.5. I can't seem to keep a page from caching.  When I click
  on
 
  Have you read HOWTO: Prevent Caching in Internet Explorer?
  http://support.microsoft.com/default.aspx?scid=kb;EN-US;q234067

 According to the description I inserted header('Expires: -1');
 It is fine if it is Internet Explorer.
 But e.g. Opera ignore the header. After BACK it displays old
 content. I even switched off all cache options in preferences but it
 does not help.

  the browser BACK button, I get the cached page so I have to click on
  Refresh to get the actual page content.  I've placed the following at
  the top of the HTML file but it doesn't seem to do anything. Any help
  would be appreciated.

 Krzysztof Dziekiewicz

-- 
Casey Allen Shobe / Network Security Analyst  PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
[EMAIL PROTECTED] / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

Lost Terminal.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Apache module failure

2002-08-25 Thread Casey Allen Shobe

root@epona:/etc# apachectl start
Syntax error on line 14 of /etc/httpd.conf:
Cannot load /usr/lib/libphp4.so into server: /usr/lib/libphp4.so: undefined 
symbol: alloc_globals
/usr/sbin/apachectl start: httpd could not be started

root@epona:/etc# head -n 14 /etc/httpd.conf | tail -n 1
LoadModule php4_module  lib/libphp4.so

Installation process used:
  ./configure --prefix=/usr --sysconfdir=/etc --without-mysql
--with-pgsql --enable-memory-limit --with-zlib --with-bz2
--with-openssl --with-config-file-path=/etc --enable-track-vars
--enable-bcmath --enable-calendar --with-gdbm --with-gmp
--with-apxs=/usr/sbin/apxs 
  make 
  make install

PHP version: 4.2.2

Apache version: 1.3.26 compiled as follows:
  ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
--localstatedir=/var --libexecdir=/usr/lib --datadir=/var/www/default
--with-layout=GNU --enable-module=so --enable-module=speling
--enable-module=unique_id --enable-module=usertrack
--enable-module=vhost_alias
--enable-module=log_agent --enable-module=info 
  make 
  make install

root@epona:/etc# ldd /usr/lib/libphp4.so
libdl.so.2 = /lib/libdl.so.2 (0x4016a000)
libpq.so.2 = /usr/lib/libpq.so.2 (0x4016e000)
libgmp.so.3 = /usr/lib/libgmp.so.3 (0x40182000)
libgdbm.so.2 = /usr/lib/libgdbm.so.2 (0x401bb000)
libbz2.so.1.0 = /lib/libbz2.so.1.0 (0x401c1000)
libz.so.1 = /usr/lib/libz.so.1 (0x401d1000)
libcrypt.so.1 = /lib/libcrypt.so.1 (0x401e2000)
libssl.so.0.9.6 = /usr/lib/libssl.so.0.9.6 (0x4020f000)
libcrypto.so.0.9.6 = /usr/lib/libcrypto.so.0.9.6 (0x4024)
libresolv.so.2 = /lib/libresolv.so.2 (0x4030f000)
libm.so.6 = /lib/libm.so.6 (0x40322000)
libnsl.so.1 = /lib/libnsl.so.1 (0x40345000)
libc.so.6 = /lib/libc.so.6 (0x4035b000)
/lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000)

I would much rather be using Apache 2.0.40, however PHP would not build at all 
with --with-apxs2=/usr/sbin/apxs on another machine with Apache 2.0.40 
installed.

In any case, I really need to get something working.  Any advice is 
appreciated.

-- 
Casey Allen Shobe / Network Security Analyst  PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
[EMAIL PROTECTED] / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Additional: [PHP] Apache module failure

2002-08-25 Thread Casey Allen Shobe

On Sunday 25 August 2002 06:10 am, Casey Allen Shobe wrote:
 I would much rather be using Apache 2.0.40, however PHP would not build at
 all with --with-apxs2=/usr/sbin/apxs on another machine with Apache 2.0.40
 installed.

I was stupid in saying that without mentioning any further detail...here 
follows what I should have mentioned previously:

package php:/usr/src/php/php-4.2.2 ./configure --prefix=/usr 
--sysconfdir=/etc --without-mysql --with-pgsql --enable-memory-limit 
--with-zlib --with-bz2 --with-openssl --with-config-file-path=/etc 
--enable-track-vars --enable-bcmath --enable-calendar --with-gdbm --with-gmp 
--with-apxs2=/usr/sbin/apxs
[...configure completes successfully...]
package php:/usr/src/php/php-4.2.2 make
[...snip...]
Making all in apache2filter
make[2]: Entering directory `/usr/src/php/php-4.2.2/sapi/apache2filter'
make[3]: Entering directory `/usr/src/php/php-4.2.2/sapi/apache2filter'
/bin/sh /usr/src/php/php-4.2.2/libtool --silent --mode=compile gcc  -I. 
-I/usr/src/php/php-4.2.2/sapi/apache2filter -I/usr/src/php/php-4.2.2/main 
-I/usr/src/php/php-4.2.2 -I/usr/include/apache2 -I/usr/src/php/php-4.2.2/Zend 
-I/usr/src/php/php-4.2.2/ext/xml/expat  -D_REENTRANT 
-I/usr/src/php/php-4.2.2/TSRM -O3 -march=i686 -mcpu=i686 -funroll-loops 
-ffast-math -pthread -DZTS -prefer-pic  -c sapi_apache2.c
sapi_apache2.c: In function `php_register_hook':
sapi_apache2.c:534: warning: passing arg 3 of `ap_register_output_filter' 
makes pointer from integer without a cast
sapi_apache2.c:534: too few arguments to function `ap_register_output_filter'
sapi_apache2.c:535: warning: passing arg 3 of `ap_register_input_filter' makes 
pointer from integer without a cast
sapi_apache2.c:535: too few arguments to function `ap_register_input_filter'
make[3]: *** [sapi_apache2.lo] Error 1
make[3]: Leaving directory `/usr/src/php/php-4.2.2/sapi/apache2filter'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/php/php-4.2.2/sapi/apache2filter'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/php/php-4.2.2/sapi'
make: *** [all-recursive] Error 1
package php:/usr/src/php/php-4.2.2

Again, thanks in advance for any advice.

-- 
Casey Allen Shobe / Network Security Analyst  PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
[EMAIL PROTECTED] / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] publicfile

2002-05-23 Thread Casey Allen Shobe

Hey,

Anybody gotten PHP to work with Publicfile?  Is there documentation somewhere?

Thanks,

--
Casey Allen Shobe / Network Security Analyst  PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
[EMAIL PROTECTED] / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Running out of sockets! Help!

2002-05-20 Thread Casey Allen Shobe

Since compiling PHP --with-sybase-ct, I get the following errors in the
error_log after several days of webserver uptime:
socket: Too many open files in system
socket: Too many open files in system
socket: Too many open files in system
socket: Too many open files in system
socket: Too many open files in system

I don't know how to track this down - any help would be appreciated.  The
operating system is Linux; the webserver Apache.

I cannot connect to the database when I start seeing these.  Restarting Apache
makes the problem go away for a few days.

--
Casey Allen Shobe / Network Security Analyst  PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
[EMAIL PROTECTED] / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Running out of sockets! Help!

2002-05-20 Thread Casey Allen Shobe

On Monday 20 May 2002 05:59 pm, Miguel Cruz wrote:
 Some time studies of lsof output could provide clues. The brute force
 bandaid solution would be to recompile your kernel with lots more
 filehandles, but that just prolongs the problem (and could lead to other
 problems, like running out of memory).

Fixed.  I downloaded lsof, and determined that every httpd process had a lot
of /tmp/freetds.log handles open, so I disables logging in the freetds.conf
file.

Excellent.  I love UNIX.

--
Casey Allen Shobe / Network Security Analyst  PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
[EMAIL PROTECTED] / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] jklingler@secureworks.com

2002-04-18 Thread Casey Allen Shobe


--
Casey Allen Shobe / Network Security Analyst  PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
[EMAIL PROTECTED] / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP Work in New York

2002-02-13 Thread Casey Allen Shobe

Why not start a php-jobs mailing list?

It would be an ideal place for employers and job seekers alike, just like the 
SecurityFocus security-jobs mailing list.

- Casey

On Tuesday 12 February 2002 17:28, you wrote:
 On Tuesday, February 12, 2002, at 05:17  PM, NDPTAL85 wrote:
  You know at most places thats a great strategy for getting fired? Have
  any others? :)

 Maybe, it depends on where you work.  I don't work for a tech company
 per se -- and the MIS guys here have no problem with my server (after
 all, I do all the administration of it).  It's just that somewhere, in
 some book, or some document, it says that the official supported
 language is ASP.  Actually the boss etc -do- know that I'm using PHP,
 just not that there's a difference between one scripting language or
 another.

 To clear my name, here:  the fact is that I suggested this project,
 explained that it would cost very little money by using PHP/MySQL/Linux,
 and it was approved.  So I'm doing it.  I just don't rub it in anyone's
 face that I don't toe the MS party line.


 Erik



 

 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]

-- 
Casey Allen Shobe
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Database query failure! (multiple datasources)

2002-01-30 Thread Casey Allen Shobe

Ok.  Here's the deal...I have two databases that I access via ODBC, DB2, and 
MSSQL, through unixODBC.

If I run MSSQL queries before DB2 queries, everything works fine.
If I run DB2 queries before MSSQL queries, only the DB2 queries are 
successful, and the MSSQL query returns an empty array.

I need to sometimes use either order.

$db2_alias = 'sw_p';
$db2_username = 'db2inst1';
$db2_passwd = '';
$db2_conn = odbc_connect ($db2_alias, $db2_username, $db2_passwd);

$piv_alias = 'pivotal';
$piv_username = 'cshobe';
$piv_passwd = '';
$piv_conn = odbc_connect ($piv_alias, $piv_username, $piv_passwd);

function db_query($db_conn, $db_query) {
$result = odbc_exec($db_conn, $db_query);
$data[0] = get_data ($result);
$data[1] = odbc_num_rows ($result);
odbc_free_result ($result);
return $data;
}

$num_queue_alerts = db_query ($db2_conn, 'select count(*) from alerts where 
egad=-1');
$company_name = db_query ($piv_conn, 'select company.company_name from 
registration,company where company.company_id=registration_id and 
registration.sw_nibc=\'955\'');

echo $num_queue_alerts.$company_name;

If I execute the above, the output is '15Secureworks'.  If I put the query 
lines in this order:

$company_name = db_query ($piv_conn, 'select company.company_name from 
registration,company where company.company_id=registration_id and 
registration.sw_nibc=\'955\'');
$num_queue_alerts = db_query ($db2_conn, 'select count(*) from alerts where 
egad=-1');

...then the output is '15'.  What is the logic here?  I see none... Does 
anyone else use multiple data sources?

-- 
Casey Allen Shobe
[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] Setting cookie very broken! Please help!

2002-01-15 Thread Casey Allen Shobe

I've set up a new machine in a production environment to roll over an 
existing PHP script onto.  Unfortunately, I'm running into a strange error:

I have a login form, using fields named 'username' and 'password'.  These are 
also used as variables.  Using IE, the cookie never shows up as I would 
expect it to in the cookies directory.  Additionally, I can't login as the 
variables are returned as null values to the script.

Even stranger...I made a test.php that just echoes $username.  I call it with 
?username=test, and it works.  Then I try the script that sets cookies, and 
it doesn't work.  Then I go back to the same test.php request, and it doesn't 
show the value I passed to it (though it will show ones of other names that I 
didn't try to set in a cookie)!

I know the code is valid, as it's working fine on 2 other production machines.

I had PHP compiled into Apache, and just rebuilt both using APXS...same 
results.

This is the code that I'm passing $username to, that totally screws things 
up, but works on other machines:

if ($username != null) {
$time = mktime()+3600;
$date = gmdate(D, d-M-Y H:i:s, ($time));
header ('Set-Cookie: username='.$username.'; expires='.$date.' GMT; path=/;
 
domain='.$SERVER_ADDR);
}

Restarting IE makes the test.php page work again...nothing else.  Please, if 
anybody could assist or ask me for any other information required to 
diagnose, I would be very thankful.  I need to get this working ASAP, and 
have been fighting it to no avail for the past few hours.

-- 
Casey Allen Shobe
[EMAIL PROTECTED]

'Why do people with closed minds always open their mouths?'

-- 
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] Setting cookie very broken! Please help!

2002-01-15 Thread Casey Allen Shobe

The server is not the client.  I've tried the same code on two different 
servers, browing with various versions of IE, Netscape, Mozilla, and 
Konqueror.

However, I can live with this, because I put the beta version (a rewrite) of 
the code on the new webserver, and it works.  I find it very odd that the old 
one doesn't though, considering that it's the same Apache/PHP configuration, 
and the same code, on both machines.  Only difference is PHP v4.0.6 on the 
old one, vs. PHP v4.1.1 on the new one.

If anyone is interested, I can send a tarball of the old code.

- Casey

On Tuesday 15 January 2002 10:22 am, Richard Crawford wrote:
 On the new machine, does your code work in Netscape or Mozilla or Opera?

 Does it work in IE on other machines?

 If yes, then double-check the security settings in the new installation
 of IE on the new computer.

 Casey Allen Shobe wrote:
  I've set up a new machine in a production environment to roll over an
  existing PHP script onto.  Unfortunately, I'm running into a strange
  error:
 
  I have a login form, using fields named 'username' and 'password'.  These
  are also used as variables.  Using IE, the cookie never shows up as I
  would expect it to in the cookies directory.  Additionally, I can't login
  as the variables are returned as null values to the script.
 
  Even stranger...I made a test.php that just echoes $username.  I call it
  with ?username=test, and it works.  Then I try the script that sets
  cookies, and it doesn't work.  Then I go back to the same test.php
  request, and it doesn't show the value I passed to it (though it will
  show ones of other names that I didn't try to set in a cookie)!
 
  I know the code is valid, as it's working fine on 2 other production
  machines.
 
  I had PHP compiled into Apache, and just rebuilt both using APXS...same
  results.
 
  This is the code that I'm passing $username to, that totally screws
  things up, but works on other machines:
 
  if ($username != null) {
  $time = mktime()+3600;
  $date = gmdate(D, d-M-Y H:i:s, ($time));
  header ('Set-Cookie: username='.$username.'; expires='.$date.' GMT;
  path=/; domain='.$SERVER_ADDR);
  }
 
  Restarting IE makes the test.php page work again...nothing else.  Please,
  if anybody could assist or ask me for any other information required to
  diagnose, I would be very thankful.  I need to get this working ASAP, and
  have been fighting it to no avail for the past few hours.

-- 
Casey Allen Shobe
[EMAIL PROTECTED]

'Why do people with closed minds always open their mouths?'

-- 
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] setcookie()

2002-01-06 Thread Casey Allen Shobe

Here's a compilation of some recent conclusions I've gotten from the same 
discussion:

This is how I chose to set the variables:

// $username and $password are passed from a previous page's form.
$time = mktime()+1800;
$date = gmdate(D, d-M-Y H:i:s, ($time));
$password = md5 ($password);

header ('Set-Cookie: username='.$username.'; expires='.$date.' GMT; path=/; 
domain='.$SERVER_ADDR);
header ('Set-Cookie: password='.$password.'; expires='.$date.' GMT; path=/; 
domain='.$SERVER_ADDR);

Produces:

Set-Cookie: username=Rasmus; expires=Wed, 12-Dec-2001 21:58:55 GMT; path=/;
domain=www.php.net
Set-Cookie: password=d41d8cd98f00b204e9800998ecf8427e;
expires=Wed, 12-Dec-2001 21:58:55 GMT; path=/; domain=www.php.net

Whereas these two calls (per Rasmus Lerdorf):

SetCookie('username',$username,time()+1800,'/',$SERVER_ADDR);
SetCookie('password',$password,time()+1800,'/',$SERVER_ADDR);

Produce:

Set-Cookie: username=Rasmus; expires=Wed, 12-Dec-01 21:58:55 GMT; path=/;
domain=www.php.net
Set-Cookie: password=d41d8cd98f00b204e9800998ecf8427e;
expires=Wed, 12-Dec-01 21:58:55 GMT; path=/; domain=www.php.net

Putting them side by side to make it easier to compare:

Set-Cookie: username=Rasmus; expires=Wed, 12-Dec-2001 21:58:55 GMT; path=/;
domain=www.php.net
Set-Cookie: username=Rasmus; expires=Wed, 12-Dec-01 21:58:55 GMT; path=/; 
domain=www.php.net

Ramsus wrote:
 They are identical except for the PHP SetCookie() version using a 2-digit
 year (which can be changed in your php.ini file with the y2k directive).

-- 
Casey Allen Shobe
[EMAIL PROTECTED]

'Why do people with closed minds always open their mouths?'

-- 
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] If/else conditional statement ...

2001-12-23 Thread Casey Allen Shobe

On Sunday 23 December 2001 03:11 pm, Robert Dyke wrote:
 % If $varA == True Then %
 Straight HTML in here that only displays if $varA == True
 % Else %
 Straight HTML in here that only displays if $varA != True
 % End if %

?php if $varA == true) { ?
b$varA was true./b
?php } else { ?
b$varA was false./b
?php } ?

I heavily dislike this coding style, however, and personally would use 
something like this:

?php
print ('b$varA was ');
if ($varA == true) {
print ('true');
} else {
print ('false');
}
print ('./b'.\n);
?

-- 
Casey Allen Shobe
[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] Searching for a new provider

2001-12-12 Thread Casey Allen Shobe

I offer dedicated machines (P233 or Celeron 433ish, 128mb ram, 2-4gb hdd) 
running linux 2.4.16, apache 1.3.22, and php 4.1.0 on a static IP address for 
$20/month.  They are on a reliable SDSL 1.1Mb connection.

The default setup only has http and ssh ports open.

You'd have admin rights on the box, and it's accessible via SSH.  You would 
be free to install anything else you need.

The only thing I ask to offer this price is that you allow me to run 
seti@home on the machine.

I'm trying to offset the cost of the connection and hardware that I have...

If interested, please contact me privately at [EMAIL PROTECTED]

- Casey

On Wednesday 12 December 2001 16:06, Andy wrote:
 Hi there, I am searching for a provider who fullfills those criterias and

 does not cost a fortune:
  - PHP = 4.06 bzw. PHP 4.x mit GDLibrary ab 2.0
 
  - GDLibrary = 2.0
 
   - PHP installed as module
 
  - mind 5 Subdomains
 
  - mind 100 MB Speicherplatz
 
  - evtl. Java VM
 
  - MySQL

 Thanx andy

-- 
Casey Allen Shobe
[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] Setting Cookies

2001-12-10 Thread Casey Allen Shobe

On Monday 10 December 2001 14:39, Steve Osborne wrote:
 Warning: Cannot add header information - headers already sent by
 (reference to current page)...

 At this point I have authenticated the user, and am trying to set the
 cookie before redirecting them to the registered users section.  Should I
 be setting the cookie on the top of the page that I am sending them to?

Yes, or do what I do and redirect to a dologin page that sets the cookie and 
autorefreshes after one second to the real page, which requires the cookie to 
be set already.

-- 
Casey Allen Shobe
[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 access to MS SQL Server 2000

2001-11-28 Thread Casey Allen Shobe

I need to somehow enable PHP on my unix server to connect to SQL Server 2000, 
running on a Windows machine on the same network.  I have been unsuccessful 
in all attempts.  Has anybody ever done this?

'Extreme gratitude' would not sufficiently express my feelings if I could 
find a way...

-- 
Casey Allen Shobe
[EMAIL PROTECTED]
GCS/CM d+ s+:-+: a-- C++() ULU$ P- L+++ E- W++ N++ !o K- w-- !O
M V- PS++ PE Y+ PGP++ t+ 5+ X R+ tv-- b++ DI+ D G++ e h-(*) r--- z--

-- 
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-11-27 Thread Casey Allen Shobe

On 27 November 2001 12:45, Urb LeJeune wrote:
 Speaking of cookies, is there a way using session control
 to modify the expiration date of a cookie? I would like to add
 a check box in a login dialog that says remember me

The checkbox is a form field, and thusly passes it's value to the page that 
loads when you submit the form.

So in the page that sets the cookie:

if ($checkbox == 1 ) {
setcookie (whatever);
} else {
setcookie (whateverelse);
}

-- 
Casey Allen Shobe
[EMAIL PROTECTED]
GCS/CM d+ s+:-+: a-- C++() ULU$ P- L+++ E- W++ N++ !o K- w-- !O
M V- PS++ PE Y+ PGP++ t+ 5+ X R+ tv-- b++ DI+ D G++ e h-(*) r--- z--

-- 
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] setcookie BUG w/ IE 5.5, 6.0 Netscape!

2001-11-27 Thread Casey Allen Shobe

On 29 December 2001 13:35, Kris Wilkinson spaketh unto ye recipient:
 setcookie (myCookie,Blah,time()+7201);

For some reason, you must specify the domain, and make sure you use *exact* 
formatting on the time, including the GMT suffix.

I gave up on setcookie and started using this:

$date = gmdate(D, d-M-Y H:i:s, ($time));

header ('Set-Cookie: username='.$username.'; expires='.$date.' GMT; path=/; 
domain='.$SERVER_ADDR);

Problem is, I just upgraded a machine to Netscape 6.2 from 6.1, and now it 
won't set the cookie :(

-- 
Casey Allen Shobe
[EMAIL PROTECTED]
GCS/CM d+ s+:-+: a-- C++() ULU$ P- L+++ E- W++ N++ !o K- w-- !O
M V- PS++ PE Y+ PGP++ t+ 5+ X R+ tv-- b++ DI+ D G++ e h-(*) r--- z--


-- 
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 to ASP ?

2001-11-26 Thread Casey Allen Shobe

This is a PHP mailing list, I doubt you'll find anyone who knows, or wants to 
know ASP.  Why not use PHP for this, and dump ASP (along with the slow, 
bug-ridden webserver it runs on [unless you're using Apache::ASP])?  

On 26 November 2001 9:00, Jean-Arthur Silve wrote:
 Hi !

 I work with someone who use ASP :-(( ...
 Is someone could translate this function to ASP ??
 I don't think it's hard, but when you don't know ASP...

 function encrypt($str)
 {
 global $STRCRYPT;

 $i = strlen($str);
 $newstr=;
 for ($j=0;$j$i;$j++)
 {
 $car = substr($str,$j,1);
 $car = ord($car);
 $car = $car + ord(substr($STRCRYPT,$j,1));
 $car = sprintf(%03d,$car);
 $newstr.=$car;
 }
 return $newstr;
 }



 
 EuroVox
 4, place FĂ©lix Eboue
 75583 Paris Cedex 12
 Tel : 01 44 67 05 05
 Fax : 01 44 67 05 19
 Web : http://www.eurovox.fr
 

-- 
Casey Allen Shobe
[EMAIL PROTECTED]
GCS/CM d+ s+:-+: a-- C++() ULU$ P- L+++ E- W++ N++ !o K- w-- !O
M V- PS++ PE Y+ PGP++ t+ 5+ X R+ tv-- b++ DI+ D G++ e h-(*) r--- z--

-- 
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] Can php do this?

2001-11-24 Thread Casey Allen Shobe

On 24 November 2001 23:45, Michael Sims spaketh unto ye recipient:
 It sure can.  There's a couple of ways to accomplish this.  I personally
 think the easiest way is to code your page like normal, then call it in a
 cron job via lynx.  Let's say you have a page called page.php that
 connects to your database, retrieves the email addresses, and sends the
 emails.  To call it from a cron job add the following to your crontab:

 0 8 * * * /usr/bin/lynx -dump http://localhost/page.php 
 /path/to/logfile/or/dev/null

Nice tip!  Another alternative is using wget on the URL, or links -dump if 
you have that instead.

Or if your script has #!/usr/bin/php or whatever path at the top and is made 
executable, you can just call that script without relying on the webserver.

I think, even if it's just a normal php file you could cron it as 
/usr/bin/php scriptpath/name.

-- 
Casey Allen Shobe
[EMAIL PROTECTED]
GCS/CM d+ s+:-+: a-- C++() ULU$ P- L+++ E- W++ N++ !o K- w-- !O
M V- PS++ PE Y+ PGP++ t+ 5+ X R+ tv-- b++ DI+ D G++ e h-(*) r--- z--


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