[PHP] same php file, different day...worked 3-4 times in the past in the past

2013-01-20 Thread Fred Silsbee
Fatal error:  Call to undefined function mysqli__connect() in 
/var/www/html/log_book_MySQLnew_i.php on line 116

phpinfo.php shows mysqli

Additional .ini files parsed 

/etc/php.d/curl.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/json.ini,
/etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/pdo.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/phar.ini,
/etc/php.d/sqlite3.ini,
/etc/php.d/zip.ini
 

maybe a mysqli.ini is required containing mysqli.so

but 

[root@localhost php.d]# locate mysqli.so
[root@localhost php.d]# 
  
[root@localhost php.d]# locate mysqli
/usr/bin/mysqlimport
/usr/share/man/man1/mysqlimport.1.gz
[root@localhost php.d]# 



[PHP] away from Fedora linux for a while and now this ...HELP

2012-08-24 Thread Fred Silsbee
Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0



Fatal error:  Unknown: Failed opening required 
'/var/www/html/log_book_MySQL.php' 
(include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0

had to use Fedora yumex(yum) to install php

PHP Version 5.4.5 is seen in phpinfo
before now,  php was there and ready after Fedora install



Re: [PHP] windows 5.2.10 PHP not working with phpinfo

2009-10-03 Thread Fred Silsbee


--- On Mon, 8/31/09, hack988 hack988 hack...@dev.htwap.com wrote:

 From: hack988 hack988 hack...@dev.htwap.com
 Subject: Re: [PHP] windows 5.2.10 PHP not working with phpinfo
 To: Fred Silsbee fredsils...@yahoo.com
 Cc: php-general@lists.php.net
 Date: Monday, August 31, 2009, 6:35 AM
 Please set
 log_error=on,error_reporting=E_ALL,error_log=syslog in
 php.ini and then,see error detail in syslog.
 
 2009/8/31 Fred Silsbee fredsils...@yahoo.com:
  I got 5.3 working but found out there was no
 php_mssql.dll for it.
  Somebody (who didn;t know) said I had to return to
 5.2.8 but I found no 5.2.8 so I am trying 5.2.10
  _problem:
  under IE8:
  http://72.47.28.128:8080/phpinfo.php
  with:
      ?php
        phpinfo();
      ?
 
  I get :
  The website cannot display the page
  HTTP 500
    Most likely causes:
  •The website is under maintenance.
  •The website has a programming error.
  ___
 
  I installed :
  php-5.2.10-Win32-VC6-x86.zip and put php.ini in C:\PHP
 and C:\PHP\ext
  AND C:\WINDOWS, C:\WINDOWS\system and
 C:\WINDOWS\system32
 
  I installed FastCGI 1.5 !
 
  In php.ini I put :
  
 
  cgi.force_redirect = 0                  //
 for CGI
 
  extension_dir =  C:\PHP\ext
 
  commented out
  ;doc_root = C:\inetpub\wwwroot // for IIS/PWS
  leaving
  doc_root =
  _
  IIS 5.1 properties-configuration I added .php
  C:\PHP\php5ts.dll
  GET,HEAD,POST,DEBUG
 
  Maybe php-win.exe
  _
 
  I added to the XP Prof environment path
 ;C:\PHP\;C:\PHP\ext\
 
  I created an environment variable (and rebooted) PHPRC
 = C:\PHP;C:\PHP\ext
 
 
  I never found any statement of the necessity of
 requiring CGI
 
  The instructions ramble around
 
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 



thanks! Weeks back I got it to work by retreating to 5.2.6

and altering permissions in admin. This alteration may open the way for 

5.3 to work!

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com

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



[PHP] looking through old posts/emails

2009-09-13 Thread Fred Silsbee
enclosed is a php for oracle that worked on Windows AND Fedora 9

?php
/*
Oracle 11g1 version handle_log_book11g1.php
 drop sequence log_id;
 create sequence log_id
 increment by 1
 start with 1;

drop table log_book_id;

create table log_book_id ( log_id number primary key, fdate date, actype 
varchar2(16), acid varchar(16), nlandings number, nhoursnumber);

insert into log_book_id values (logid.nextval, 
TO_DATE('08/12/1973','MM/dd/'),'C150','N5787G',1,1.8);

insert into log_book_id values (logid.nextval, 
TO_DATE('08/17/1973','MM/dd/'),'C150','N5787G',3,1.5);

insert into log_book_id values (logid.nextval, 
TO_DATE('08/26/1973','MM/dd/'),'C150','N5787G',10,1.8);

insert into log_book_id values (logid.nextval, 
TO_DATE('09/01/1973','MM/dd/'),'C150','N5293S',9,1.7);
*/
//construct a global variable for the form profile
$fields = array(fdate, actype, acid, nlandings, nhours);

global $connection;
session_start();
$db = (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = landon)(PORT = 1521))
   (CONNECT_DATA =
 (SERVER = DEDICATED)
 (SERVICE_NAME = LMKGDN)
   )
 );

$user = $_SESSION['userx'] ;
$password = $_SESSION['passwordx'] ;
$user = lmkiii;
$password = x ;


if(!$connection  $user  $password)
{
if ($connection=oci_connect($user, $password, $db))
{
 echo Successfully connected to Oracle.\n;
}
else
{
 $err = OCIError();
 echo Oracle Connect Error  . $err['message'];
}
}

if(isset($_POST['delete'])){
deleteRecords();
} elseif(isset($_POST['login'])){
loginOracle();
} elseif (isset($_POST['continue'])){
displayDeleteForm();
} elseif (isset($_POST['new'])){
displayEntryForm();
} elseif (isset($_POST['update'])){
showRecord();
} elseif (isset($_POST['timeInType'])){
timeInType();
} else {

//first time execution
echo HTML
form action={$_SERVER['PHP_SELF']} method=post
p
Oracle User Name:br /
input type=text size=20 maxlength=40 name=user
value=$user /
/p
p
Oracle Password:br /
input type=password size=20 maxlength=40 name=password
value=$password /
/p
button type=submit name = login value=bLogin!/b
style=color:maroon font:18pt Courier; font-weight:bold LOGIN
/button
/form
HTML;
 $_SESSION['userx'] =  $_POST[$user] ;
 $_SESSION['passwordx'] = $_POST[$password] ;
}


//...function
 loginOracle()

function loginOracle(){
global $connection;


$db = (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = LANDON)(PORT = 1521))
   (CONNECT_DATA =
 (SERVER = DEDICATED)
 (SID = LMKGDN)
   )
 );
$_SESSION['userx'] = $_POST['user'];
$_SESSION['passwordx'] = $_POST['password'];
$connection=oci_pconnect($_POST['user'], $_POST['password'], $db);
if ($connection)
{
echo Successfully connected to Oracle.\n;
//default action

displayDeleteForm();
}
else
{
 $err = OCIError();
 echo Oracle Connect Error  . $err['message'];
}
}

//...function
 displayDeleteForm()

function displayDeleteForm(){
//get $fields into the function namespace
global $fields;
global $connection;


/* Create and execute query. */
// Loop through each row, outputting the actype and name
 echo HTML
Pilots Logbook entries stored in Oracle Relational Database
under Redhat Fedora 9 Linux
form action={$_SERVER['PHP_SELF']} method=post
table width=50% align=center border=1
tr
td colspan=7
input type=submit name=delete value=delete checked 
items/nbsp;
input type=submit name=update value=update checked 
items/nbsp;
input type=submit name=new value=new log entry/nbsp;
input type=submit name=timeInType value=Time In Type /
/td
/tr
tr
thchecked/th
throwID/th
thfdate/th
thactype/th
thacid/th
thnlandings/th
thnhours/th
/tr
HTML;

//get log_book_id table information
$user = select * from log_book_id order by log_id;
$result = oci_parse($connection, $user);
$r = oci_execute($result);

//display log_book_id information

while ($newArray = oci_fetch_assoc($result)) {
foreach ($fields as $field){
$fieldx = strtoupper($field);
${$field} = $newArray[$fieldx];
}
$rowID = $newArray['LOG_ID'];

echo HTML
TR
td
input type=checkbox name=checkbox[$rowID] value=$rowIDCheck 
to select record
/td
TD$rowID/TD
TD$fdate/TD
TD$actype/TD
TD$acid/TD
TD$nlandings/TD
TD$nhours/TD
/TR

HTML;

}// while
echo HTML
/table
/form

HTML;
}//close function

// . function 
timeInType()
//

function 

[PHP] need php_mssql so I retreated to 5.2.10

2009-09-07 Thread Fred Silsbee

under IE8:
http:// 209.33.25.167:8080/phpinfo.php
with:
 ?php
   phpinfo();
 ?

I get :
The website cannot display the page
HTTP 500 
   Most likely causes:
•The website is under maintenance.
•The website has a programming error.

under Firefox 3.5.2
___
The specified procedure could not be found.
___

I installed :
php-5.2.10-Win32-VC6-x86.zip and put php.ini in C:\PHP and C:\PHP\ext
AND C:\WINDOWS, C:\WINDOWS\system and C:\WINDOWS\system32

I installed FastCGI 1.5 !

In php.ini I put :


cgi.force_redirect = 0  // for CGI

extension_dir =  C:\PHP\ext   (not trying to use any extension ...just 

   get phpinfo to work)


doc_root = C:\inetpub\wwwroot // for IIS/PWS
an earlier post recommended:
doc_root =
_
IIS 5.1 properties-configuration I added .php  C:\PHP\php5.dll
GET,HEAD,POST,DEBUG

_

I added to the XP Prof environment path ;C:\PHP;C:\PHP\ext

I created an environment variable (and rebooted) PHPRC = C:\PHP;C:\PHP\ext
_
From the unzipped download,
I copied ntwdblib.dll to C:\PHP and C:\PHP\ext
AND C:\WINDOWS, C:\WINDOWS\system and C:\WINDOWS\system32


I never found any statement of the necessity of requiring CGI

The instructions ramble around







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



Re: [PHP] windows 5.2.10 PHP not working with phpinfo

2009-09-02 Thread Fred Silsbee
*$ana)*$fac;
$b0=($b1+$b0*$ana)*$fac;
$anf=$an*$fac;
$a1=$x*$a0+$anf*$a1;
$b1=$x*$b0+$anf*$b1;
if ($a1) {
$fac=1.0/$a1;
$g=$b1*$fac;
if (abs(($g-$gold)/$g)  EPS) {
$gammcf=exp(-$x+$a*log($x)-($gln))*$g;
return;
}
$gold=$g;
}
}
echo a too large, ITMAX too small in routine GCF
;
}
function gammp($a,$x)
{

if ($x  0.0 || $a = 0.0) {
echo Invalid arguments in routine GAMMP
;
return 0.;
}
if ($x  ($a+1.0)) {
gser($gamser,$a,$x,$gln);
return $gamser;
} else {
gcf($gammcf,$a,$x,$gln);
return 1.0-$gammcf;
}
}

function gammq($a,$x)
{

if ($x  0.0 || $a = 0.0) echo Invalid arguments in routine GAMMQ
;
if ($x  ($a+1.0)) {
gser($gamser,$a,$x,$gln);
return 1.0-$gamser;
} else {
gcf($gammcf,$a,$x,$gln);
return $gammcf;
}
}
function erfc($x)
{

return $x  0.0 ? 1.0+gammp(0.5,$x*$x) : gammq(0.5,$x*$x);
}
function erf($x)
{

return $x  0.0 ? -gammp(0.5,$x*$x) : gammp(0.5,$x*$x);
}
function myerf($argin) {
   return .5*(1.+erf($argin/sqrt(2.0)));
}

?

form action=new_black_scholes.php method=post
p
Black Scholes Option Price Calculator:

temp website under Redhat Fedora 9 Linux:

the first 5 boxes require input(try 100. 100. .12 .1 365.):

/p
p
StockPrice (required):

input type=text size=20 maxlength=40 name=StockPrice
value=?php echo $StockPrice;? /
/p
p
ExercisePrice (required):

input type=text size=20 maxlength=40 name=ExercisePrice
value=?php echo $ExercisePrice; ? /
/p
p
Risk Free Rate of Interest(required):

input type=text size=20 maxlength=40 name=RiskFreeRateInterest
value=?php echo $RiskFreeRateInterest; ? /
/p
p
Instantaneous Variance Rate of Stock's Return (required):

input type=text size=20 maxlength=40 
name=InstantaneousVarianceRateStocksReturn
value=?php echo $InstantaneousVarianceRateStocksReturn; ? /
/p
p
Time to Expiration of the Option(days) (required):

input type=text size=20 maxlength=40 
name=TimetoExpirationOption
value=?php echo $TimetoExpirationOption; ? /
/p
p
Values of the Call Option :

input type=text size=20 maxlength=40  name=ValueCallOption
VALUE=?php echo $ValueCallOption; ? /
/p
/p
p
Values of the Put option :

input type=text size=20 maxlength=40  name=ValuePutOption
VALUE=?php echo $ValuePutOption; ? /
/p
p
Delta(calls):

input type=text size=20 maxlength=40  name=DeltaCalls
VALUE=?php echo $DeltaCalls; ? /
/p
p
Delta(puts):

input type=text size=20 maxlength=40  name=DeltaPuts
VALUE=?php echo $DeltaPuts; ? /
/p
button type=submit name = submit value=Calculate!
style=color:maroon font:18pt Courier; font-weight:bold Calculate
/button
button type=submit name = reset value=Demo!
style=color:red font:18pt Courier; font-weight:bold Demo
/button
/form

_results

Please try the following:

Open the 207.254.225.224:8080 home page, and then look for links to the 
information you want.
Click the Refresh button, or try again later.

HTTP 403.1 Forbidden: Execute Access Forbidden
Internet Information Services



Technical Information (for support personnel)


Background:
You have attempted to execute a CGI, ISAPI, or other executable program from a 
directory that does not allow programs to be executed.


More information:
Microsoft Support

http://207.254.225.224:8080/handle_log_book_mssql.php
yields:

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: 
LANDON\SQLEXPRESSLMKIII in C:\Inetpub\wwwroot\handle_log_book_mssql.php on line 
8 (mssql_connect(...)
Something went wrong while connecting to MSSQL (my message)
___
all these worked before trying 5.3







--- On Wed, 9/2/09, hack988 hack988 hack...@dev.htwap.com wrote:

 From: hack988 hack988 hack...@dev.htwap.com
 Subject: Re: [PHP] windows 5.2.10 PHP not working with phpinfo
 To: Fred Silsbee fredsils...@yahoo.com
 Cc: php-general@lists.php.net
 Date: Wednesday, September 2, 2009, 6:03 AM
 Use Event Viewer and log type is
 :Application log
 
 2009/9/2 Fred Silsbee fredsils...@yahoo.com:
  I looked high and low

Re: [PHP] windows 5.2.10 PHP not working with phpinfo

2009-09-01 Thread Fred Silsbee
thanks! I am new to this science! where is syslog? XP Prof event log?

--- On Mon, 8/31/09, hack988 hack988 hack...@dev.htwap.com wrote:

 From: hack988 hack988 hack...@dev.htwap.com
 Subject: Re: [PHP] windows 5.2.10 PHP not working with phpinfo
 To: Fred Silsbee fredsils...@yahoo.com
 Cc: php-general@lists.php.net
 Date: Monday, August 31, 2009, 6:35 AM
 Please set
 log_error=on,error_reporting=E_ALL,error_log=syslog in
 php.ini and then,see error detail in syslog.
 
 2009/8/31 Fred Silsbee fredsils...@yahoo.com:
  I got 5.3 working but found out there was no
 php_mssql.dll for it.
  Somebody (who didn;t know) said I had to return to
 5.2.8 but I found no 5.2.8 so I am trying 5.2.10
  _problem:
  under IE8:
  http://72.47.28.128:8080/phpinfo.php
  with:
      ?php
        phpinfo();
      ?
 
  I get :
  The website cannot display the page
  HTTP 500
    Most likely causes:
  •The website is under maintenance.
  •The website has a programming error.
  ___
 
  I installed :
  php-5.2.10-Win32-VC6-x86.zip and put php.ini in C:\PHP
 and C:\PHP\ext
  AND C:\WINDOWS, C:\WINDOWS\system and
 C:\WINDOWS\system32
 
  I installed FastCGI 1.5 !
 
  In php.ini I put :
  
 
  cgi.force_redirect = 0                  //
 for CGI
 
  extension_dir =  C:\PHP\ext
 
  commented out
  ;doc_root = C:\inetpub\wwwroot // for IIS/PWS
  leaving
  doc_root =
  _
  IIS 5.1 properties-configuration I added .php
  C:\PHP\php5ts.dll
  GET,HEAD,POST,DEBUG
 
  Maybe php-win.exe
  _
 
  I added to the XP Prof environment path
 ;C:\PHP\;C:\PHP\ext\
 
  I created an environment variable (and rebooted) PHPRC
 = C:\PHP;C:\PHP\ext
 
 
  I never found any statement of the necessity of
 requiring CGI
 
  The instructions ramble around
 
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 




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



Re: [PHP] windows 5.2.10 PHP not working with phpinfo

2009-09-01 Thread Fred Silsbee
I looked high and low but no syslog

I am currently working under XP Prof SP3

--- On Mon, 8/31/09, hack988 hack988 hack...@dev.htwap.com wrote:

 From: hack988 hack988 hack...@dev.htwap.com
 Subject: Re: [PHP] windows 5.2.10 PHP not working with phpinfo
 To: Fred Silsbee fredsils...@yahoo.com
 Cc: php-general@lists.php.net
 Date: Monday, August 31, 2009, 6:35 AM
 Please set
 log_error=on,error_reporting=E_ALL,error_log=syslog in
 php.ini and then,see error detail in syslog.
 
 2009/8/31 Fred Silsbee fredsils...@yahoo.com:
  I got 5.3 working but found out there was no
 php_mssql.dll for it.
  Somebody (who didn;t know) said I had to return to
 5.2.8 but I found no 5.2.8 so I am trying 5.2.10
  _problem:
  under IE8:
  http://72.47.28.128:8080/phpinfo.php
  with:
      ?php
        phpinfo();
      ?
 
  I get :
  The website cannot display the page
  HTTP 500
    Most likely causes:
  •The website is under maintenance.
  •The website has a programming error.
  ___
 
  I installed :
  php-5.2.10-Win32-VC6-x86.zip and put php.ini in C:\PHP
 and C:\PHP\ext
  AND C:\WINDOWS, C:\WINDOWS\system and
 C:\WINDOWS\system32
 
  I installed FastCGI 1.5 !
 
  In php.ini I put :
  
 
  cgi.force_redirect = 0                  //
 for CGI
 
  extension_dir =  C:\PHP\ext
 
  commented out
  ;doc_root = C:\inetpub\wwwroot // for IIS/PWS
  leaving
  doc_root =
  _
  IIS 5.1 properties-configuration I added .php
  C:\PHP\php5ts.dll
  GET,HEAD,POST,DEBUG
 
  Maybe php-win.exe
  _
 
  I added to the XP Prof environment path
 ;C:\PHP\;C:\PHP\ext\
 
  I created an environment variable (and rebooted) PHPRC
 = C:\PHP;C:\PHP\ext
 
 
  I never found any statement of the necessity of
 requiring CGI
 
  The instructions ramble around
 
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 




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



[PHP] windows 5.2.10 PHP not working with phpinfo

2009-08-30 Thread Fred Silsbee
I got 5.3 working but found out there was no php_mssql.dll for it.
Somebody (who didn;t know) said I had to return to 5.2.8 but I found no 5.2.8 
so I am trying 5.2.10
_problem:
under IE8:
http://72.47.28.128:8080/phpinfo.php
with:
 ?php
   phpinfo();
 ?

I get :
The website cannot display the page 
HTTP 500  
   Most likely causes:
•The website is under maintenance.
•The website has a programming error. 
___

I installed :
php-5.2.10-Win32-VC6-x86.zip and put php.ini in C:\PHP and C:\PHP\ext
AND C:\WINDOWS, C:\WINDOWS\system and C:\WINDOWS\system32

I installed FastCGI 1.5 !

In php.ini I put :


cgi.force_redirect = 0  // for CGI

extension_dir =  C:\PHP\ext

commented out
;doc_root = C:\inetpub\wwwroot // for IIS/PWS
leaving
doc_root = 
_
IIS 5.1 properties-configuration I added .php  C:\PHP\php5ts.dll
GET,HEAD,POST,DEBUG

Maybe php-win.exe
_

I added to the XP Prof environment path ;C:\PHP\;C:\PHP\ext\

I created an environment variable (and rebooted) PHPRC = C:\PHP;C:\PHP\ext


I never found any statement of the necessity of requiring CGI

The instructions ramble around






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



[PHP] PHP 5.3 IIS 5.1 not working...help!

2009-07-30 Thread Fred Silsbee

http://72.47.28.125:8080/phpinfo.php not working
ERROR:
The website cannot display the page 
 HTTP 500  

IIS 5.1, PHP 5.3 XP Prof SP3 + all updates
PHP 5.2.8 worked great and took a few minutes to install

phpinfo.php is in C:\inetpub\wwwroot 

?php
phpinfo();
?

php.ini has:
doc_root = C:\inetpub\wwwroot // for IIS/PWS (tried removing the )
 extension_dir = ext
php.ini put into 

C:\php
C:\Windows
C:\Windows\system
C:\windows\system32
system variable PHPRC set = C:\php

http://72.47.28.125:8080/aspx/abc.aspx works great with IIS 5.1

IIS 5.1 application configuration mappings .php   C:\php\php5.dll (that is all 
there is)
There is no php5isapi file!
home directory = C:\inetpub\wwwroot
web site: IP all unassigned, TCP Port 8080
directory security unchanged: IUSR_machine name...allow IIS to control 
password

VC9 versions downloaded and put into C:\php
Microsoft 2008 C++ Runtime (x86) installed
VC9 x86 Non Thread Safe (2009-Jun-30 08:52:54)

C:\php;c:\php\ext put on the end of the path environmental
  system variable


yes I rebooted many times

command line (black window) 
cd C:\php
php -i   generates plenty stuff

I am administrator!







  


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



[PHP] pronlem with yum update and oci8

2009-04-17 Thread Fred Silsbee

 Fedora 9
 (1) all programs using oci8 working 100%
 (2) oci8 NOT installed using yum
 yumex not showing any reference to oci8
 
 php-pear installed using yumex(yum)
 (3) yum update errors below
 
 
 Loaded plugins: refresh-packagekit
 Setting up Update Process 
 Resolving Dependencies
 -- Running transaction check
 --- Package php-pear-HTML-Common.noarch 0:1.2.5-1.fc9
 set to be updated
 --- Package
 php-pear-HTML-QuickForm-advmultiselect.noarch 0:1.5.1-1.fc9
 set to be updated
 -- Finished Dependency Resolution
 
 Dependencies Resolved
 
 

  PackageArch   
Version  Repository  
Size
 

 Updating:
  php-pear-HTML-Common   noarch 
1.2.5-1.fc9  updates-newkey  
   9.7 k
  php-pear-HTML-QuickForm-advmultiselect noarch 
1.5.1-1.fc9  updates-newkey  
38 k
 
 Transaction Summary
 

 Install  0 Package(s)
 Update   2 Package(s)
 Remove   0 Package(s)
 
 Total download size: 48 k
 Is this ok [y/N]: y
 Downloading Packages:
 (1/2): php-pear-HTML-Common-1.2.5-1.fc9.noarch.rpm 
   | 9.7 kB
 00:00
 (2/2):
 php-pear-HTML-QuickForm-advmultiselect-1.5.1-1.fc9.noarch.rpm
  |  38 kB 00:00
 

 Total  
   52 kB/s |  48 kB
 00:00
 Running rpm_check_debug
 Running Transaction Test
 Finished Transaction Test
 Transaction Test Succeeded
 Running Transaction
   Updating   : php-pear-HTML-Common
 
 1/4
 PHP Warning:  PHP Startup: Unable to load dynamic library
 '/usr/lib/php/modules/php_oci8.dll' -
 /usr/lib/php/modules/php_oci8.dll: cannot open shared object
 file: No such file or directory in Unknown on line 0
 PHP Warning:  PHP Startup: Unable to load dynamic library
 '/usr/lib/php/modules/php_oracle.dll' -
 /usr/lib/php/modules/php_oracle.dll: cannot open shared
 object file: No such file or directory in Unknown on line 0
   Updating   : php-pear-HTML-QuickForm-advmultiselect  
 
 2/4
 PHP Warning:  PHP Startup: Unable to load dynamic library
 '/usr/lib/php/modules/php_oci8.dll' -
 /usr/lib/php/modules/php_oci8.dll: cannot open shared object
 file: No such file or directory in Unknown on line 0
 PHP Warning:  PHP Startup: Unable to load dynamic library
 '/usr/lib/php/modules/php_oracle.dll' -
 /usr/lib/php/modules/php_oracle.dll: cannot open shared
 object file: No such file or directory in Unknown on line 0
   Cleanup: php-pear-HTML-QuickForm-advmultiselect  
 
 3/4
   Cleanup: php-pear-HTML-Common
 
 4/4
 
 Updated:
   php-pear-HTML-Common.noarch 0:1.2.5-1.fc9 
 php-pear-HTML-QuickForm-advmultiselect.noarch 0:1.5.1-1.fc9
 
 Complete!



  


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



[PHP] how does one bind a gui representation and a container object.

2009-01-08 Thread Fred Silsbee
I have a Qt 4.4 C++ SQL offline program that displays an SQL table.

When I change a row-column cell, the change is instantly reflected in the 
database. Under Qt 4.4 I use:

QSqlTableModel

How does one do this in PHP for online use.

I've done this under C#.NET VS2008 using binding between a gui representation 
and the container object.


  


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



[PHP] Re: how does one bind a gui representation and a container object.

2009-01-08 Thread Fred Silsbee



--- On Thu, 1/8/09, Fred Silsbee fredsils...@yahoo.com wrote:

 From: Fred Silsbee fredsils...@yahoo.com
 Subject: how does one bind a gui representation and a container object.
 To: php...@lists.php.net, php-general@lists.php.net
 Date: Thursday, January 8, 2009, 10:41 PM
 I have a Qt 4.4 C++ SQL offline program that displays an SQL
 table.
 
 When I change a row-column cell, the change is instantly
 reflected in the database. Under Qt 4.4 I use:
 
 QSqlTableModel
 
 How does one do this in PHP for online use.
 
 I've done this under C#.NET VS2008 using
 binding between a gui representation and the
 container object.





error I get under Firefox 3.0.5 under Fedora 9 PHP 5.2.6
Unknown Renderer driver. Please specify an existing driver. 

Code:
?php
require 'Structures/DataGrid.php';

// Instantiate the DataGrid
$datagrid = new Structures_DataGrid();

// Setup your database connection
$options = array('dsn' = 'mysql://landon4:pwpwpwp...@localhost/landonx');

// Bind a basic SQL statement as datasource
$test = $datagrid-bind('SELECT * FROM log_book', $options);

// Print binding error if any
if (PEAR::isError($test)) {
echo $test-getMessage();
}

// Print the DataGrid with the default renderer (HTML Table)
$test = $datagrid-render(Structures_DataGrid_Renderer_HTMLTable);

// Print rendering error if any
if (PEAR::isError($test)) {
echo $test-getMessage();
}

?




  


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



[PHP] Re: Storing and then printing ANSI escape sequences in (and then from)variables

2009-01-07 Thread Fred Briand
Luke Slater a écrit :
 Hi,
 
 I'm storing ANSI escape sequences in an array, stored like this:
 
 $connections[$channel][2] = $info['colour'];
 
 $info['$colour'] would contain something like \033[33m
 
 Now, my problem is when I try and print it:
 
 $pstring = $connections[$channel][2] . $connections[$channel][1] .   .
 $buffer . chr(7);
 
 It will print as a literal string, actually printing \033[33m to the
 screen, so how do I make it work?
 
 I'm sure I'm missing something fatally simple here.
 
 Thanks for your help,
 
 Luke Slater


Hi,
this depends on your terminal and on your shell. So you have to execute
a shell command (/!\ security). With bash on linux with a color enabled
console, you can use this:

php -r 'print(`echo -e \033[0mTEST: \033[32mOK\033[0m`);'

which means that you execute a bash commande (between the 2 backticks
``), and you print the output of this commande.
echo -e  is the bash commande with escape sequences interpretation
enabled

But don't be surprised if it doesn't work, cause it depends on your
terminal (I can't make it run on cygwin for example)

Fred

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



Re: [PHP] Storing and then printing ANSI escape sequences in (andthen from) variables

2009-01-07 Thread Fred Briand
Paul M Foster a écrit :
 On Wed, Jan 07, 2009 at 11:11:53PM +, Luke Slater wrote:
 
 Hi,

 I'm storing ANSI escape sequences in an array, stored like this:

 $connections[$channel][2] = $info['colour'];

 $info['$colour'] would contain something like \033[33m

 Now, my problem is when I try and print it:

 $pstring = $connections[$channel][2] . $connections[$channel][1] .   .
 $buffer . chr(7);

 It will print as a literal string, actually printing \033[33m to the
 screen, so how do I make it work?

 I'm sure I'm missing something fatally simple here.

 Thanks for your help,

 Luke Slater
 
 What you're storing is human shorthand for bytes sent to the display.
 (I'm assuming you're working with the terminal here, not a browser
 window.) The \033 indicates an octal byte with that value. But when you
 send it, you're sending each character individually to the screeen. That
 is '\' is one byte, '0' is the next, '3' the next, etc. That '\033' (and
 subsequent codes) need to be coded as single bytes and sent bytewise to
 the terminal. And if your terminal isn't configured to accept ANSI
 excape codes, it won't work anyway.
 
 Your chr(7) is the clue. Your codes, if numeric, need to be converted to
 integers and given to the chr() function, and output using that
 function. Try converting some known codes into integers, outputting them
 via the chr() function, and seeing if the result is what you expected.
 
 You may need to use the inverse function, ord(), to get your codes into
 numeric form. For example, ord('m') will return decimal 109. That's only
 an example, since you should be able to send single characters to the
 terminal as is.
 
 Paul


Hi,
Interesting and so easy solution, last time I tried it I had to
re-initialize my console!! It sure works better and is also much more
secured. I'll give it a try on bsd and solaris consoles too (still
doesn't work on cygwin)

fred

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



[PHP] php beautify downloaded...great how does one run the program???

2009-01-05 Thread Fred Silsbee
I looked at all the downloaded docs


  


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



[PHP] If I make a mistake logging in, the error shows again even if I enter the right values

2009-01-03 Thread Fred Silsbee
my PHP programs are working great to access Oracle 11g1 and MySQL 5.1

I entered a bad value for user name /passwordand got a message 
Could not connect: Access denied for user 'landon'@'localhost' (using password: 
YES)

I restarted the script under Firefox 3.0.5 and got the same error message 
without a chance to enter username/password 

If I clean the cache, it works OK

This problem only occurs with the MySQL script that is nearly identical to the 
Oracle script that doesn't show the problem.

This must be a familiar problem with you web programmers!


  


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



[PHP] Re: If I make a mistake logging in, the error shows again even if I enter the right values

2009-01-03 Thread Fred Silsbee



--- On Sun, 1/4/09, Fred Silsbee fredsils...@yahoo.com wrote:

 From: Fred Silsbee fredsils...@yahoo.com
 Subject: If I make a mistake logging in, the error shows again even if I 
 enter the right values
 To: php...@lists.php.net, php-general@lists.php.net
 Date: Sunday, January 4, 2009, 2:45 AM
 my PHP programs are working great to access Oracle 11g1 and
 MySQL 5.1
 
 I entered a bad value for user name /passwordand got a
 message 
 Could not connect: Access denied for user
 'landon'@'localhost' (using password: YES)
 
 I restarted the script under Firefox 3.0.5 and got the same
 error message without a chance to enter username/password 
 
 If I clean the cache, it works OK
 
 This problem only occurs with the MySQL script that is
 nearly identical to the Oracle script that doesn't show
 the problem.
 
 This must be a familiar problem with you web programmers!

The problem is correctable with ordinary programming logic.


  


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



Re: [PHP] errors still being displayed even if variables in php.ini set to off

2008-12-28 Thread Fred Silsbee



--- On Sun, 12/28/08, Ashley Sheridan a...@ashleysheridan.co.uk wrote:

 From: Ashley Sheridan a...@ashleysheridan.co.uk
 Subject: Re: [PHP] errors still being displayed even if variables in php.ini 
 set to off
 To: fredsils...@yahoo.com
 Cc: php-general@lists.php.net
 Date: Sunday, December 28, 2008, 12:01 PM
 On Sat, 2008-12-27 at 16:23 -0800, Fred Silsbee wrote:
  on page 1
  Notice: Undefined index: in
 C:\Inetpub\wwwroot\handle_log_book_MySQL.php on
 line 71
  
  Notice: Undefined index: in
 C:\Inetpub\wwwroot\handle_log_book_MySQL.php on
 line 72
  
  in php.ini:
  
  error_reporting  =  Off
  
  display_errors = Off (in 2 places)
  
  display_startup_errors = Off
  
  
  
  
  

  
  
 What does phpinfo() tell you? Don't forget that there
 are several places
 where this can be set; the php.ini file, the .htaccess
 file, and within
 the PHP code itself. If phpinfo() tells you that both
 settings are for
 errors off, then it's most likely that a line in your
 PHP code is
 turning them back on
 
 
 Ash
 www.ashleysheridan.co.uk

sincere thanks mate...I'm sure there is a good reason for having flags all over 
the place somewhat mislabelled or ill described in the php.ini

Surely I thought there'd be a master-turn off all the  errors!

The php.ini describes good sense security know how in affirming the need for 
no errors!

here in the colonies I have become addicted to Eastenders on tonight at 10 pm

Here in Houston...should the program ever get messed up somehow, there are 
hundreds of calls, emails, bottle throwing, diesel locos being overturned

Bennie Hill should have been knighted!!!

sure and you'd be goin for a pint uf the dark


  


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



[PHP] how to update PHP 5.2.6 to 5.2.8 under Fedora Redhat Linux 9

2008-12-27 Thread Fred Silsbee
there are many php related files.

yumex or yum don't seem to be alternatives since there are many files that may 
or may not require updating...which one

yum remove php-5.2.6
yum install php-5.2.8

5.2.8 may not be in the repositories yet

so rpm seems to be an alternative with a remove - reinstall


  


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



[PHP] errors still being displayed even if variables in php.ini set to off

2008-12-27 Thread Fred Silsbee
on page 1
Notice: Undefined index: in C:\Inetpub\wwwroot\handle_log_book_MySQL.php on 
line 71

Notice: Undefined index: in C:\Inetpub\wwwroot\handle_log_book_MySQL.php on 
line 72

in php.ini:

error_reporting  =  Off

display_errors = Off (in 2 places)

display_startup_errors = Off





  


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



[PHP] Re: Screen Shots

2006-10-22 Thread Fred Moses

Mark McWhirter wrote:
Is there any way that I can get a script to take a screen shot every minute 
of all the users using my php website? 


Why not add a state capture inclusion (require) to each of your pages? 
Have it grab, for instance, the user's IP address, the session ID, the 
URL of page, and the user's login information if that's available.  Dump 
the result into a tracking table in your database.  In the admin part of 
your site, add a page which formats the tracking info nicely, perhaps 
selected by time period.  There's no need to do a screen capture.


You own the information.  I don't see why it shouldn't be legal to 
capture it and display it to yourself considering all the folks who do 
full click tracking.


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



Re: [PHP] Re: Screen Shots

2006-10-22 Thread Fred Moses

Dotan Cohen wrote:

On 22/10/06, Fred Moses [EMAIL PROTECTED] wrote:

Mark McWhirter wrote:
 Is there any way that I can get a script to take a screen shot every 
minute

 of all the users using my php website?

Why not add a state capture inclusion (require) to each of your pages?
Have it grab, for instance, the user's IP address, the session ID, the
URL of page, and the user's login information if that's available.  Dump
the result into a tracking table in your database.  In the admin part of
your site, add a page which formats the tracking info nicely, perhaps
selected by time period.  There's no need to do a screen capture.

You own the information.  I don't see why it shouldn't be legal to
capture it and display it to yourself considering all the folks who do
full click tracking.



And how does that produce a screenshot?

Dotan Cohen

http://what-is-what.com/what_is/virus.html


It doesn't.  Why do you need a screen shot when you can get a history 
page any time you want to?


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



[PHP] IP Address

2006-10-21 Thread Fred Moses
Is there a function which returns the IP address of the requestor of the 
current page?


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



Re: [PHP] Re: postback for php

2006-10-18 Thread Fred Moses

Miles Thompson wrote:

At 11:48 AM 10/18/2006, M.Sokolewicz wrote:


Ross wrote:
Looked on google and not found a satisfactory answer. Doies anyone 
have a funtion to do this?


R.
please explain, in details, what it is you're looking for. postback 
for php - a function to do this doesn't mean squat to most people. 
Please EXPLAIN.


- tul


Yes, not a helpful description. Maybe he means a callback function which 
would do something like

echo 'a href='. $_SERVER['PHP_SELF'] .'Please try again/a';
and he may have to pass a variable string.

M.




First approximation:
Postback is an ASP.NET mechanism for running server side code as part of 
  a page execution cycle when the user clicks a control which has been 
set up for this.  a href='. $_SERVER['PHP_SELF']... is an example. 
A more general example in the PHP world is creating a form with the 
action referring to the same page.  At the beginning of the page, one 
checks for an action field the value of which is used to dispatch to 
some code relevant to the action.  Both systems can yield similar effects.


For more info, just Google postback.

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



[PHP] Re-arranging elements in an associative array

2006-03-24 Thread Fred Riley
Hi

This is my first question to these NGs, so please be gentle with me in any 
replies :). I've crossposted it as I'm not sure which is the more appropriate 
group. 

I'm a relative newbie to PHP, and my Q in short is: is there an easy way to 
manually change the arrangement of elements in an associative array? 

I'll use an example from the PHP manual:

$a = array( 'color' = 'red',
'taste' = 'sweet',
'shape' = 'round',
'name'  = 'apple',
  );

If you then iterate through this with foreach() to print it out then the keys 
and values will be printed in the order above. What I'd like to do is, say, 
move $a['name'] up to 2nd place, so that it would print in the order:

'color'
'name'
'shape'
'name'

I don't want to sort the array, just rearrange it a bit. I've looked in the 
array function list in TFM but can't see anything appropriate, and I couldn't 
see anything on PX or phpbuilder. 

The reason I want to do this is to arrange the values in a row extracted from 
mySQL. If you click on any of the titles in my test database browse page at 
http://www.nottingham.ac.uk/~ntzfr/rlos/database/rlo_titles.php you should get 
a 'full record' page. The fields from RLO No. down to Record last updated 
are extracted from a single table 'RLO' with a simple SELECT query and their 
names and values are stuck into the associative array $record. The fields below 
(Author, Developer, etc) are extracted from junction tables by separate join 
queries, and also assigned to $record. The table is then printed with a simple 
foreach loop. What I'd like to do is shift, say, Author after RLO title, 
Developer after Stage, and so on.

I could do this the clunky way, by manually assigning each key and value from 
the queries into an array with the elements in the required order, and I'll do 
that if there's no easy way of rearranging elements. I suppose I could use some 
complex combination of shift(), pop(), merge() and whatnot, but that would 
probably take up more time than the clunky way. TIA for any suggestions/tips.

Cheers

Fred
Learning Technologist
School of Nursing, University of Nottingham

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



Re: [PHP] clear the page and continue

2005-07-04 Thread Fred
OK that works as well. Thanks again.

James [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Fred wrote:
 Outstanding James! A different approach to get a more flexible result.
 Fred.

 or document.getElementById(blah).style.display = 'none';


 That would also work well.

 innerHTML is not supported by many browsers


 I wasn't aware of this, thanks!

 Cheers,
 James Relyea. 

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



[PHP] clear the page and continue

2005-07-03 Thread Fred
I have managed using php to:
1/ send some html to the client requesting patience
2/ execute some external process
3/ send results to the client so it appears further down the same page

What I would like to do is:
1/ send some html to the client requesting patience
2/ execute some external process
3/ clear the clients page
4/ send results to the client so it appears as the only content on the page
but do it without loading a second page client side via javascript or 
whatever.

The reason for the same page is so that if the client bookmarks the results 
4/, a new visit via the bookmark will start at 1/

Is possible? 

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



Re: [PHP] clear the page and continue

2005-07-03 Thread Fred
Outstanding James! A different approach to get a more flexible result.
Fred.

James [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Yes, you can use something like span id=blahSome stuff/span and use 
 javascript to alter the element's value (the contents between the span 
 tags).

 document.getElementById(blah).innerHTML=some new stuff

 Hope that is what you wanted,
 James Relyea.

 - Original Message - 
 From: Fred [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Sent: Sunday, July 03, 2005 11:41 PM
 Subject: [PHP] clear the page and continue


I have managed using php to:
 1/ send some html to the client requesting patience
 2/ execute some external process
 3/ send results to the client so it appears further down the same page

 What I would like to do is:
 1/ send some html to the client requesting patience
 2/ execute some external process
 3/ clear the clients page
 4/ send results to the client so it appears as the only content on the 
 page
 but do it without loading a second page client side via javascript or 
 whatever.

 The reason for the same page is so that if the client bookmarks the 
 results 4/, a new visit via the bookmark will start at 1/

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

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



Re: [PHP] [SOLVED] Function shall receive Pointer to Array

2005-05-05 Thread Fred Rathke
Thanks, Chris. You have been right. It worked already. I still remove 
all my typing errors in the original version. For this list I wrote a 
new version of it. Should have tried it first.

Sorry.
Greatings
*I should not work after midnight*
Liebe Grüße
Fred Rathke
[EMAIL PROTECTED]
http://communicationrational.de/kontakt/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Function shall receive Pointer to Array

2005-05-04 Thread Fred Rathke
Hello,
how can a function get a pointer to an array? This does not work. I use 
PHP4.

$t = array(test = unchanged);
echo brtestarray unchanged:\.$t['test'].\;
changearray($t);
echo brtestarray hopefully changed:\.$t['test'].\;
function changearray($myarray) {
$myarray['test'] = changed;
}
Before I tried it on my own I read this page:
http://de2.php.net/manual/en/language.references.whatdo.php
Be so nice to search for this string: The second thing references do 
is to pass variables  by-reference. This is done by making a local 
variable in a function and  a variable in the calling scope reference 
to the same content. Example:

The following example I used. I only tried to do it with an array 
instead of a variable.

What I need to read again to find my own mistake? I know some of php's 
commands work with an internal copy of a content.

Thanks for your help and advice.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: sessions handling

2004-06-09 Thread Fred
Dmitry Ruban wrote:
Hi folks,
We have two instances of apache/mod_php running on 80 and 443 ports
accordingly. For both mod_php we have the same dir (/tmp) to store session
information. Is it possible to mix sessions data up if user switches between
80 and 443 ports? I mean what if when user surfs over 80 port and has
already sessionID in this mod_php context(PHPSESSID stores in cookie), then
he jumps to 443 instance, would that mod_php correctly find proper session
file? Is it possible that PHPSESSID in 443 context hasn't been initialized
and mod_php won't get proper file?
Regards,
Dima Ruban
Check your COOKIE root settings, and make sure the root domain name for 
the cookie is common to both the 443 and 80 connections.

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


[PHP] Better Speedbar support in Emacs for PHP?

2004-06-09 Thread Fred
Does anyone know of any efforts (or code!) to better support Class 
browsing in the Speedbar for PHP? The only one I know of does a very 
poor job at tracking classes and their methods in PHP.

Emacs is such a powerful and capable text editor. The removal of this 
one wrinkle would make my development environment complete.

I'd write a module myself, but don't have time to get good at writing 
Lisp!

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


Re: [PHP] previous page

2004-06-09 Thread Fred
Larry E . Ullman wrote:
Thanks all makes sense, but, if I add this:
?php
echo($_SERVER['HTTP_REFERRER']);
?
I don't get anything back when the page is called?

Yes, that can happen, which is why I said it wasn't perfect. I think 
using some sort of form to go through is the better option.

Larry
You can use session tracking to accomplish this goal. Simply have the 
required page set a variable in the session that the protected page 
checkes for.

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


[PHP] preg_match and regular expression

2003-12-08 Thread fred
Hi

I have problems with a regular expression.

I have a html file like this:

body
divHello/div
br
br
divsomthing/div
br
/body


And i want to use preg_match to get a list of all the div tags in the
file:
result:
$list[0] = divHello/div
$list[1] = divsomthing/div

I have tryed this:
preg_match('/.*(\div\.*\\/div\).*/', $contents, $list);

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



[PHP] preg_match and regular expression

2003-12-08 Thread fred
Hi

I have problems with a regular expression.

I have a html file like this:

body
divHello/div
br
br
divsomthing/div
br
/body


And i want to use preg_match to get a list of all the div tags in the
file:
result:
$list[0] = divHello/div
$list[1] = divsomthing/div

I have tryed this:
preg_match('/.*(\div\.*\\/div\).*/', $contents, $list);

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



[PHP] post an array into another site

2003-12-08 Thread fred
Hi

I have an array in php like this:

$arr[0][0] = Something;
$arr[0][1] = Hello;
$arr[0][2] = Hi;

It is possible to post this array to another site in a form? Or how can i do
this?

Fred

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



Fwd: Re: [PHP] Re: your method for validating forms

2003-10-02 Thread Fred T Sanders


--  Forwarded Message  --

Subject: Re: [PHP] Re: your method for validating forms
Date: Thursday 02 October 2003 06:46 pm
From: Fred T Sanders [EMAIL PROTECTED]
To: Richard Baskett [EMAIL PROTECTED]

Actually if you need client side javascript form validation the qForms API
just pisses all over everything else I've ever seen.

http://www.qForms.org

On Thursday 02 October 2003 05:11 pm, Richard Baskett wrote:
 on 10/2/03 2:05 PM, Chris W. Parker at [EMAIL PROTECTED] wrote:
  Robert Cummings mailto:[EMAIL PROTECTED]
 
on Thursday, October 02, 2003 12:15 PM said:
  Heeey, a great little response like this to see an alternative
  to a popup and no link for us to check it out *pffft* Where'd
  you learn your posting manners? Were you brought up in a web barn?
  *grin*. Wouldn't happen to know the URL still would ya?
 
  Haha... ummm... I... uhh... don't have a link because I made a mistake.
 
  What really happened was when I clicked on a product on the site a small
  popup window appeared. This window had very little information on it and
  so was very light. When I clicked Add to Cart it submitted and refreshed
  so fast I didn't see a flicker, and therefore it looked like it was
  using some kind of client-side validation.
 
  I rechecked it just now and noticed the flicker so that's how I knew I
  was wrong.
 
  But still this sort of client-side validation is something that will go
  onto my long term todo list. And it's like Curt described, instead of
  popping a window you make a div or span or something like that
  appear.
 
 
  Chris.
 
  p.s. Just in case you want to see the site I'm talking about it's
  http://www.prana.com/.

 Whew! I was beginning to think you were leaving us out in the cold again!

 :)

 I regard as a mortal sin not only the lying of the senses in matters of
 love, but also the illusion which the senses seek to create where love is
 only partial. I say, I believe, that one must love with all of one's being,
 or else live, come what may, a life of complete chastity. - George Sand

---

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



[PHP] Re: date calculation

2003-02-16 Thread Fred Merritt
Qt,
	The easiest way is to convert your dates into a serial day number(i.e. 
the number of days that have elapsed between your date, and some 
arbitrary date in the dim and distant past - I think PHP uses 25th 
November, -4714).  There are some calendar functions in php that will do 
this for you.  Once you have your dates as a numeric offset, you can 
subtract them to get a the number of days between the dates, or you can 
add or subtract a number of days to get a new offset.  Once you have the 
new offset, there are reverse calendar functions in php, to convert your 
new offset back to a calendar date.

Check out the functions GregorianToJD(), and JDToGregorian(), in the 
Calendar functions of the PHP manual.  If you do not have access to the 
calendar functions in your version of php, there are also a couple of 
examples how to do one of the conversions written in PHP, in the user 
contributed notes of the manual.  There are also many published articles 
describing algorithms on how to do this.  I can remember implementing 
these functions in 1977(Not in PHP of course), from an article published 
in the journal of the ACM, in 1963.

Hope this helps. . . Fred

Qt wrote:
Dear Sirs,

How can I add or subtract two date easily. Is therea any lib or function
about this. I can not find any easy way in the manual

Best Regards





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




[PHP] Re: recursion?????

2003-02-15 Thread Fred Merritt
Alex,
		as a general rule of thumb, try to do as much checking as you can with 
JavaScript.  For those checks such as is the field a valid date, is 
the field numeric and so on, it is much faster to check on the client, 
than to send the data back to the server and check it there.  Probably 
the best way to do this is with an onSubmit clause on the form. 
Something like:

form name='RegisterForm' action='register.php' method='post' 
onSubmit='return checkRegisterScreen(this)'

Some things you cannot check on the client, for example does the value 
of the field already exist in a data store on the server.  There are 
many ways in which you could check these fields.  On of the easiest to 
understand ways would be to name your submit field something like 
Register, and use code something like the following in register.php:

switch ($_POST['submit']) {
	case a;
		processA();
	break;
	case b;
		processB();
	break;
	case Register;
		checkFormAndRedisplay();
	break;
	default;
		processDefault();
	break;
}

In the procedure checkFormAndRedisplay(), you can write code to check 
your fields, and the relationships between them, and then redisplay the 
form with appropriate error messages, and highlighting, to guide the end 
user to correct his errors.

Hope this helps. . . Fred

Alex Davis wrote:

Ok ... here is the sitituation... I am creating a registration form.
What I have so far works ... the user registers using this form and the
form calls another page that will check the validity of the data
(checking for username availability, etc...). If there is an error,
display the error and have the user GO BACK AND TRY AGAIN - This is
the problem I want to fix.

What I want to do is have the registration form, on submit, check the
data validity right then, if there is an error, redisplay the form with
an * next to the field that is incorrect. This way the user does not
have to go back and try again, it will be there in front of them.

Basically, have the form action call itself  hince the recursion.

Any suggestion/examples?

Thanks,

-Alex





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




[PHP] Re: Recursion?????

2003-02-15 Thread Fred Merritt
Alex, and Michael,
			here is a code fragment which I have cut and simplified from one of 
my working scripts, that does some simple javascript checking of a form. 
 It should give you an idea of how to do it.  There is a lot of 
documentation, and examples of javascript on the web.  Try a google 
search.  At this level it is relatively easy(well at least it is after 
you have done it once).  When you get into more complicated javascripts, 
you have to take into account that because of different document object 
models, some things are implemented differently in different browsers.

. . .
?
head
script LANGUAGE=JavaScript
!-- Hide from older browsers

var whitespace =  \t\n\r;

function isEmpty(s) {
// +--+
// | Return true if the string s is empty |
// +--+
return ((s == null) || (s.length == 0))
}

function isWhitespace (s) {
// +---+
// | Return true if s is empty or contains only whitespace |
// +---+
var i;
if (isEmpty(s)) {
	return true;
}
for (i = 0; i  s.length; i++) {
	var c = s.charAt(i);
	if (whitespace.indexOf(c) == -1) return false;
}
return true;// must be whitespace
}

function checkRegisterScreen (form) {
// +---+
// | Return true if all fields on screen are valid |
// +---+
if (isWhitespace(form.userid.value)) {
	alert(Userid may not be blank);
	form.userid.focus();
	return false;
}
if (isWhitespace(form.username.value)) {
	alert(User name may not be blank);
	return false;
}
return true;
}
// End of hidden section --
/script
/head
body
form  name='RegisterForm' action='Register.php' method=post 
onSubmit='return checkRegisterScreen(this)' 
?php
. . .

The key thing to notice here, is that the submit will only happen if the 
onSubmit returns true.

Hope this helps. . . Fred


Michael Eacott wrote:
Alex

Like you I have php scripts that validate the contents of registration 
and other forms. I'm new to php and do not have a clue about client side 
(java) scripting. Yes and the GO BACK AND TRY AGAIN process is what my 
php scripts do. All very messy. I'll have to learn javascript but 
currently I have a deadline to meet with the php implementation.Be 
interested to see sometime in the future the javascripts you write to 
validate you forms.

Regards

Mike Eacott

rentAweek Ltd
http://www.rentaweek.org



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




Re: [PHP] Re: recursion?????

2003-02-15 Thread Fred Merritt
David,
	of course.  You always should check in the server, even if javascript 
is working.  You have to protect your data integrity.  Sorry I did not 
make this clear.

The benefit of checking in javascript(which I suspect is enabled in most 
browsers these days), is that the client gets an instant response for 
the out of line situation.

Best regards. . . Fred


David Freeman wrote:
  		as a general rule of thumb, try to do as much
  checking as you can with
  JavaScript.  For those checks such as is the field a valid
  date, is
  the field numeric and so on, it is much faster to check on
  the client,
  than to send the data back to the server and check it there.

Except, of course, that you need to check it AGAIN in your php script in
case the browser has javascript disabled - because if it's disabled
you'll end up with unchecked form data.

CYA, Dave






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




[PHP] Smart Navigation

2002-05-22 Thread Fred Forsyth

Is there any way to emulate ASP.NET's smartNavigation trick? What it does it
to maintain control state and scroll position between postbacks, as well as
stopping the page from flickering when reloading. It makes a mostly static
page look very cool.

Anyone done this in PHP, or know how to use IFRAMEs to do it manually?

Cheers
Fred Forsyth.
Senior Software Engineer





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




[PHP] Max execution time error after script ends

2002-05-14 Thread Fred

I am using PHP 4.1.2 in standalone (cgi binary)  mode on linux so that I can
use PHP for shell scripts related to large socket and database operations.

In php.ini I have max_execution_time set to 0 and memory limit set to
104857600 (100MB).

The script successfully fills a very large array with information fetched
from a lengthy socket operation (nntp).  The socket operation takes several
minutes, but appears to be relatively fast.

After completing the socket operation, the contents of the array are output
to the screen for debugging purposes.  This operation appears terribly slow,
but still takes less than a minute for around 100,000 records.

The last line of the script executes successfully (as indicated by debug
output) and then the script hangs for a moment and then outputs the
following error:

PHP Fatal error: Maximum execution time of 30 seconds exceeded in Unknown on
line 0

This seems very odd to me for two reasons:

First, the max_execution_time is set to 0 (no limit).
Second, the script has otherwise executed successfully and should simply
terminate.

Has anyone had similar experiences?  Any advice on how to correct this
problem?

Fred



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




[PHP] mail() problem with email mail@dom.com

2002-04-29 Thread fred

Hello,

I have a pb with mail() function.
my script run ok on a linux but not on a nt:
?
ini_set(SMTP, 192.168.0.126);
ini_set(sendmail_from, info [EMAIL PROTECTED]);
mail(fred [EMAIL PROTECTED], the subject, message);
?

On my windows nt server I can only run:
?
ini_set(SMTP, 192.168.0.126);
ini_set(sendmail_from, [EMAIL PROTECTED]);
mail([EMAIL PROTECTED], the subject, message);
?

I have an error as soon as i use eaml like: mail [EMAIL PROTECTED]
It is allways the same smtp server.

Is someone have an idea ??

Thanks for your support.

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




[PHP] Re: File Access Security Issues

2002-02-14 Thread Fred

A good hacker can get access no matter what precautions you take.  No
computer system is totally secure, the only thing you can do is take all
possible precautions and keep current on security risks.  If your algorithms
are really valuable, then you may want to invest in the ZEND Encoder
(http://www.zend.com/store/products/zend-encoder.php) which allows you to
deploy your scripts without revealing the source code.  That way, even if
someone manages to get access to the scripts, they will not have access to
the actual code.

Fred

Steven Walker [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 How assured can I be that people will NOT be able to view my php code?

 I'm creating an e-commerce site that will contain sensitive information
 and algorithms. I want to to take every precaution possible to protect
 that data and code.

 One concern in particular is the ability to view the contents of a file
 through PHP, rather than through HTTP. I've noticed that many file
 functions do not work for non-local files, which is good. But can a good
 hacker still get access some indirect way?

 Thank you!

 Steven J. Walker
 Walker Effects
 www.walkereffects.com
 [EMAIL PROTECTED]




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




[PHP] php_hostconnect: connect failed

2002-02-12 Thread Fred

I had been developing a script which needs to include the output of a perl
cgi script.

Using the rpm versions of Apache 1.3.19 and PHP 4.0.6 I had no problem using
the following syntax:

$url = http://my.host.com/search.cgi? . $QUERY_STRING;
include ($url);

Notice that I used the fully qualified url so that Apache would parse the
cgi and php would include the result of the cgi script rather than the text
of the script.


I recently compile Apache 1.3.23 and PHP 4.1.1 from source and now the
script generates this error:
php_hostconnect: connect failed
when I attempt to include the file.  I have allow_url_fopen = On in the
php.ini, so I would expect the script to continue to function as it did
previously.  Unfortunately, it does not.

I have been unable to find a solution in the list archives or elsewhere and
I hope someone here knows how I can fix this problem.

Note:  Other than compiling from source (rather than installing from rpm)
and using the most recent versions, the only differences between my old
installation and my new installation is that apache no longer includes ssl
support and php is now compiled with--mnogosearch.

Any assistance is appreciated.

Fred



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




[PHP] Re: php_hostconnect: connect failed

2002-02-12 Thread Fred

After further testing, it appears that the function works as expected if I
use the IP address rather than the hostname.  Perhaps this is an Apache
problem, rather than a PHP problem, but I cannot see how.  The ServerName is
correct in apache and apache responds correctly with redirects etc.

Any ideas?

Fred

Fred [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I had been developing a script which needs to include the output of a perl
 cgi script.

 Using the rpm versions of Apache 1.3.19 and PHP 4.0.6 I had no problem
using
 the following syntax:

 $url = http://my.host.com/search.cgi? . $QUERY_STRING;
 include ($url);

 Notice that I used the fully qualified url so that Apache would parse the
 cgi and php would include the result of the cgi script rather than the
text
 of the script.


 I recently compile Apache 1.3.23 and PHP 4.1.1 from source and now the
 script generates this error:
 php_hostconnect: connect failed
 when I attempt to include the file.  I have allow_url_fopen = On in the
 php.ini, so I would expect the script to continue to function as it did
 previously.  Unfortunately, it does not.

 I have been unable to find a solution in the list archives or elsewhere
and
 I hope someone here knows how I can fix this problem.

 Note:  Other than compiling from source (rather than installing from rpm)
 and using the most recent versions, the only differences between my old
 installation and my new installation is that apache no longer includes ssl
 support and php is now compiled with--mnogosearch.

 Any assistance is appreciated.

 Fred





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




Re: [PHP] PHP and MYSQL Security`

2002-01-27 Thread Fred

If this file has a .php extension remote users will not have access to the
variables because the file is parsed by php and they never see the actual
file contents when requesting the document via the web.  If you are
concerned with users on localhost having access to the file, simply give it
the correct permissions so that no one else has read access.

If you are concerned about web users having access, if, for example, the php
parser crashed and apache tried to pass the file through without parsing,
you can put the default server, user and pass variables in the php.ini file
which is not in the document root for apache.  Of course, this only works if
all of your scripts use the same server, user and password.

Fred

Duky Yuen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 How can I secure my username and password? In 1 of my files, it contains
 the following:

 $conn = mysql_connect( 12.34.56.78, username, password);
 mysql_select_db(database,$conn);

 What should I do, so people can't get this information?

 Duky




-- 
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: Variable referencing/substitution

2002-01-19 Thread Fred

See the manual on references:
http://php.he.net/manual/en/language.references.php
$vNames[1] = $variable

Fred

Gaylen Fraley [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 How can this be done?

 If I have the name of a variable that is stored in an array, how do I use
 the stored value to represent the actual variable?

 Example:

 $variable = old value;
 $vNames[1] = '$variable';  //literal $variable

 I want to say $vNames[1] = new value;  /and have $variable actually
 change.

 How?

 --
 Gaylen
 [EMAIL PROTECTED]
 Home http://www.gaylenandmargie.com/
 PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/






-- 
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 scripts timeout

2002-01-03 Thread Fred

First of all, there is no need to worry about database connections, PHP does
not count the time that it is waiting for database connections to complete.
The best suggestion I can make is to try to determine if the scripts that
time out have been passed a common post or get variable, that may be
upsetting your code.

Fred

Charlesk [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Every once in a while, maybe 10 times a day, scripts timeout.  Different
scripts, different places in the script, different IP addresses.
 I wrote an auto_append script that dumps the phpinfo to a file if the
script ran longer than 30 seconds, and nothing is odd  in those phpinfo's.
 Sometimes the same IP address gets the script fast sometimes timeout.  I
have increased the timeout from 60 to 120 then to 240.  I still get a few
timeouts.
 I have looked through the code and it cant be a database connection
because some of the scripts don't use a database.  It doesn't look like it
can be an infinite loop either.

 Does anyone have any thoughts?

 Charles Killmer
 NetgainTechnology.com
 IIS 5.0 Win2000 Server PHP 4.1.0

 -- Original Message --
 From: Henning Sprang [EMAIL PROTECTED]
 Date: 03 Jan 2002 15:33:31 +0100

 Am 03 Jan 2002 08:10:08 -0600 schrieb charlesk :
  Is the php engine slowed by users with a slow connection?
 it _should_ not under normal circumstances - but what problems are you
 exactly experiencing?

 henning






-- 
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: page expired

2001-12-26 Thread Fred

This has nothing to do with mysql or sessions.  Your form is sent using the
POST method.  For security reasons, browsers (by default) will not resend
POST information to a page when you hit the back button.

Fred

Php Guy [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I have problem in that my webpage in which I use sessions and MySql gives
 a warning paged expired error when the user presses back button on the
 browser.  Basically, the function of the webpages will be to store user
 enquiries in the Mysql database until the user presses a send email
 enquiry button in which afterwards the accumulated enquiries (recognized
 by the sessionid) of the session will be sent to the relevant person.  The
 pages are modularized.  All of the pages start off by including a
 sessions.php which has the following:

 session_start();
 $connection = mysql_connect(localhost, root, password) or die
 (Couldn't connection to database);
 $db = mysql_select_db(micromotor, $connection) or die
 (Couldn't select database.);
 ?


 The pages also include a form.php file which has the following to enter
 data into the Mysql database.  A few lines from this file are as follows:

 else
 {
 $insert_sql = INSERT INTO test VALUES('$sessionid', '$modelno', '$qty',
 '$purpose', '$comments', $date');
 mysql_query($insert_sql) or die (could not insert records);


 After I enter information into the form , I find that if I want to use the
 back button on the browser, the browser displays a warning page
 expired.  Then I have to press back one more time before I can get to
 the page that I want.

 I was wondering am I registering my sessions id the wrong way?

 Thanks.

 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]




[PHP] Re: linux help

2001-12-26 Thread Fred

Some tips on asking for help:

1. ask in the right place (this is not it)
2. it does no good to say you received an error unless you put the error
message in the post
3. research first...there are nearly 55,000 search results on this subject
at google
4. combine steps 2 and 3...search for the error message on google..this will
usually lead to quick results

Fred

Melih Onvural [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 i know this isn't a linux newsgroup or listing, but i've seen
configuration
 problems in the past
 so i was wondering if anyone could fix mine now.

 I have the server, ssl, php, mySql, the whole deal, but we have an Intel
 wireless network at home which, as it turns out, has only windows drivers.
I
 found a driver (Tulip) that apparently works with the card I have, but I
 can't get beyond the point of ./make

 there's always an error. If someone knows existing problems, or good
 documentation on how to complete this installion process, that information
 would be greatly appreciated.

 Melih





-- 
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: problems with urlencoding

2001-12-26 Thread Fred

Why not get rid of the stuff you do not need to send?

Just send the client number and then add the Client like%% stuff on the
other end.

Fred

[EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 I try to send the content of a variable about the url to the next
php-page.
 The content of the variable is:
 Client like '%4022720893%'
 I have tried urlencode and urldecode, but this does not work
 If I put this variable to an url, I got always
 Client like '@22720893%'
 (depending from the number after the first %),
 I also have tried to mask with slashes and stripslashes. But this does
also
 not work.
 Who can help and has the best way to send this content thru an url
 best regards
 christian




-- 
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] fsockopen nntp stalls

2001-12-26 Thread Fred

I am attempting to use fsockopen to connect to a news server.  I am able to
successfully connect and authenticate.  In fact, I can issue many commands
without a hitch.

I do, however, have a problem with commands which require multiline results.
For instance, issuing the list command and echoing the results to the
browser invariably results in the browser stalling.  There is no timeout
error from php, but after an arbitrary number of lines the browser stalls
and does not receive the rest of the stream.

I first thought this was some type of timeout error, but the odd thing is
that the amount of data successfully recieves varies depending on the nntp
server.

For example: server A may have 90,000 groups to list and stalls after
transferring 70,000 or so.  On the other hand, server B may have only 300
groups to list and stalls after 250.

If anyone has had any experience with this problem, please let me know what
you did to resolve it.

Fred



-- 
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] fsockopen nntp stalls

2001-12-26 Thread Fred

Good suggestion, in fact I just recompiled to include the IMAP extensions
for just that purpose.  Unfortunately, I was unable to get a decent
understanding of how to use the IMAP extensions with NNTP, and since I have
implemented connection level NNTP sessions in a number of languages I
thought it may be easier.

If you are aware of a good example or tutorial for implementing NNTP with
IMAP I would appreciate a link.

P.S. Thanks for this wonderful tool.

Fred

Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Why not just use the imap extension which supports the NNTP protocol
 natively?

 On Wed, 26 Dec 2001, Fred wrote:

  I am attempting to use fsockopen to connect to a news server.  I am able
to
  successfully connect and authenticate.  In fact, I can issue many
commands
  without a hitch.
 
  I do, however, have a problem with commands which require multiline
results.
  For instance, issuing the list command and echoing the results to the
  browser invariably results in the browser stalling.  There is no timeout
  error from php, but after an arbitrary number of lines the browser
stalls
  and does not receive the rest of the stream.
 
  I first thought this was some type of timeout error, but the odd thing
is
  that the amount of data successfully recieves varies depending on the
nntp
  server.
 
  For example: server A may have 90,000 groups to list and stalls after
  transferring 70,000 or so.  On the other hand, server B may have only
300
  groups to list and stalls after 250.
 
  If anyone has had any experience with this problem, please let me know
what
  you did to resolve it.
 
  Fred
 
 
 
 




-- 
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: installing php with apache rpm???

2001-12-26 Thread Fred

This guy has some great modular php rpms that will do the trick:
http://rpms.arvin.dk/php/

Fred

Duane Douglas [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 hello,

 i have an apache rpm installed.  stuff will break if i uninstall it.  how
 do i install php to work with it?

 tia

 Duane Douglas
 ASP / SQL Server Tutoring and Training




-- 
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: Generate Alphabet

2001-12-25 Thread Fred

for ($Character = 65; $Character  91; $Character++)
{
echo chr($Character);
}

Fred

Daniel Harik [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello Guys,

 Just a stupid question how can i make php show from a-z with a for
 loop, don't want to make 26 hard coded links

 Thank You very much

 --
 Best regards,
  Daniel  mailto:[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: Help with Sessions - Should be easy =]

2001-12-20 Thread Fred

Why don't you give us a code snippet so we know how you are trying to do it.

Fred

Tomasz Jachimczak [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am coming from an asp background, and am used to setting session
variables
 very easily, but I cannot work them out here with all the different
 commands.

 I would like to store in a session variable output from a mysql db (Got
the
 db bit working fine) but cannot for the life of me store or retrieve
 anything from a session variable.

 (more information if required)

 I am retreiving user information from a database after verification, and
 would like to place certain feilds into a session variable for easy
 access/retreival. I can get the information out of the database, but
cannot
 place it into any sort of variable that will store on the page.

 I have the latest official PHP, running with IIS on a Windows 2K server
with
 IIS.

 More questions to follow no doubt,

 Thanks in advance,

 - Tomasz





-- 
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] Error while calling a function

2001-12-18 Thread Fred

Steve is right on the money.

Your function definitions are inside a conditional if statement which means
that they may or may not be parsed.  Your call to the function, on the other
hand, is not within that same conditional if statement.  That means your
functions is getting called unconditionally, but the function has not yet
been defined because the condition failed (!Phone) and the code was skipped.

Rule of thumb:

Don't put your function definitions inside of conditionals.

Fred

Steve Cayford [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I don't know all the details about how PHP compiles a program, but
 having your function definitions in an if-else statement that may not be
 executed looks suspicious to me.

 You've got
 if(!$Phone)
 {
  do something
 }
 else
 {
  function is_phone() { ...blah, blah...}
 }

 is_phone($Phone);

 If you don't hit the else block, your is_phone function is probably not
 defined.

 -Steve

 On Tuesday, December 18, 2001, at 07:26  AM, J.F.Kishor wrote:

  hi all,
 
  I have got a problem, when I execute the following script it gives
  a Fatal error, could any one tell me why is it ?, If this is a silly
  problem please execuse me but, plz do reply me.
 
  The script is
  -
  html
  body
  ?
  if(!$Phone)
  {
?
   form action=?echo $PHP_SELF? method=post
  br
  Telephone Number : input type=text name=Phone value=
  br
  input type=submit
  script language=php
  }
  else
  {
 
function is_allnumbers ($text)
  {
if( (gettype($text)) == integer)
  {
  print the value is an integer;
return true;
  }
 
$Bad = $this-strip_numbers($text);
 
if(empty($Bad))
  {
  print the value is  empty;
return true;
  }
return false;
  }
 
function clear_error ()
  {
$this-ERROR = this is an error;
  }
 
 
function is_phone ($Phone =)
  {
if($this-CLEAR)
  {
$this-clear_error();
  }
 
if(empty($Phone))
  {
$this-ERROR = is_phone: No Phone number
  submitted;
return false;
  }
 
$Num = $Phone;
$Num = $this-strip_space($Num);
$Num = eregi_replace((\(|\)|\-|\+),,$Num);
if(!$this-is_allnumbers($Num))
  {
$this-ERROR = is_phone: bad data in phone
  number;
return false;
  }
 
if ( (strlen($Num))  7)
  {
  print the number is less then 7;
$this-ERROR = is_phone: number is too short
  [$Num][$Phone];
return false;
  }
 
if( (strlen($Num))  13)
  {
  print the number is  then 13;
$this-ERROR = is_phone: number is too long
  [$Num][$Phone];
return false;
  }
 
return true;
  }
  }
  $result = is_phone($Phone);
  if($result == true)
  {
   echo success;
  }
  else
  {
echo failure;
  }
 
  /script
  /body
  /html
 
  The error is
  
  Fatal error: Call to undefined function: is_phone() in
  /home/kuruvi1/kishor/public_html/IMS/ADMIN/test/is_phone.php on line 87
 
 
  Thanks for your tolerance,
 
  - JFK
   kishor
 
 
 
  --
  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] Working with designers...

2001-12-18 Thread Fred

Yikes!  You mean they don't use a text editor to for html?

Seriously, you do have two choices here and I certainly prefer the one
suggested below.  You may have to talk to the project manager about the
designer's refusal to allow thier precious dreamweaver source files to be
chopped up.  On the other hand, their insistance on using CSS is ideal.

If the project manager does not want the html chopped up then it is not the
end of the world.

I recently completed a project where the designer insisted on using
dreamweaver and leaving the html as single files.  I wrote the functions for
everything I needed and placed them in include files.  I then replaced his
sample data with ?= ? statements and all is well.  I'd give you the URL to
see how seemlessly it works, but it is a porn site and i'd rather not link
it on the list.

The moral is that you can certainly be successful in approaching the project
this way.  Personally, I do not like wading through all that html to figure
out where to put my precious php code, but then again they were paying the
bills that month.

Fred


Mike Eheler [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 They sound like good ideas, with one quisp.. the sites are currently
 being designed in *shudder* Dreamweaver.

 They absolutely refuse to chop files up into header/footer includes, and
 they want to be able to do all their colour customisation through their
 beloved .css files.

 Mike

 Jimtronic wrote:

 
  I try to seperate the php code from the html as much as possible. So, if
  a page is dynamic, have php figure out the dynamic parts first, put them
  into variables such as $html, or $pull_down_menu, or whatever. Then all
  that needs to replaced in the html is that section. HTML coders aren't
  dumb, so they can be trusted with a simple ?= $html ? placement.
 
  Additionally, I try to seperate php logic from php presentation as much
  as possible. This means creating as many variables as possible that
  affect how things look and then including a conf.php file that the
  coders can also change pretty easily with good documentation.
 
  Moving even further in this direction, my logic code calls many
  presentation functions which I find HTML coders can also decipher rather
  well. You can put these in another include file so your designers don't
  ever have to touch any of your precious logic.
 
  Then ... if you have time ... you can make an admin screen to change,
  edit, and preview the finished product.
 
  Jim
 
  Hi There,
 
  I'm looking for some community feedback on being a coder working with
  designers. Techniques that work that allow my php-inept page/graphic
  designer comrade make changes to the layout of the page without
  destroying my code, or requiring me to make any changes whatsoever.
 
  Or what is the best process? Code the dynamicity (heh -- sad thing is
  you know what i mean by it) of the site, then integrate a designers
  HTML into your code, *or* the other way around.. have the designer
  create the site using all static html files, then go in and remove
  sample data to be replaced with dynamic data (pulled from a DB, for
  example).
 
  I'm about to enter a very large project working with about 3 or 4
  designers and 2 other coders and any suggestions on making this
  relationship work is greatly appreciated.
 
  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] Working with designers...

2001-12-18 Thread Fred


Mark [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
well, you don't have to wade through all that html, just put an
include() in there to a file that has all the php in it. then
dreamweaver should leave it alone.

Huh?

Obviously the logic can be included, but the output functions need to be
burried deep in dreamweaver created nested tables and javascripts.

Fred



-- 
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] Working with designers...

2001-12-18 Thread Fred

Maybe you have never had to deal with a dreamweaver created web page, but it
deposits little javascript code all over the page for decoration.
Apparently the dreamweaver designers pick components like rollover menu
images etc and dreamweaver gladly disperses the javascript code throughout
the document.  Assuming the href's are going to be dynamic to account for
GET variables then the php coder has to dig through the javascript to place
a php element or generate the javascript dynamically, which is apparently
what these designers were trying to avoid.  i.e. they did not want anyone
touching their beautifully created dreamweaver document.

Fred

Mark [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Tue, 18 Dec 2001 16:00:09 -0800, Fred wrote:

Mark [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
well, you don't have to wade through all that html, just put an
include() in there to a file that has all the php in it. then
dreamweaver should leave it alone.

Huh?

Obviously the logic can be included, but the output functions need
to be
burried deep in dreamweaver created nested tables and javascripts.

hmm,
I'm assuming that javascript is the programmer's responsibility, not
the designer's. Maybe the javascript needs to be dynamically
generated, probably it doesn't. either way it's in a separate file
doesn't get edited in dreamweaver.

I understand that the php will probably have to be in a table and the
designer's will want to be able to change it's appearance, and that's
where css comes in. i.e.:

table class=php_table_class
  tr class=php_tr_class
td class=php_td_class
  div class=php_content_class?echo $dynamic_content?/div
/td
  /tr
/table

yes, there's some html in the included file, but the designer's don't
need to have access to it because they can just change how it looks
in the stylesheet.




-- 
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: Question

2001-12-18 Thread Fred

Don't recall seeing them here, but many of us have read their book if that
is of any help.

Fred

Phillip B. Bruce [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

By any chance that Luke Welling or Laura Thomson is on this list?

 --
 
 *** Phillip B. Bruce ***
 *** http://pbbruce.home.mindspring.com   ***
 *** [EMAIL PROTECTED]   ***
 ***  ***
 *** Have you ever noticed? Anybody going slower than***
 *** you is an idiot, and anyone going faster than you***
 *** is a maniac. - George Carlin***
 






-- 
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] Checking a frames url..

2001-12-17 Thread Fred

This will not work.  JavaScript is a client side language and will not have
the frame information until the browser has the web page, at which time all
parsing of the php code (done on the server side) is already complete.

Fred

Richard Black [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 You can get the URL of a frame using JavaScript - maybe you could pass
this in somehow to the PHP script???

 -Original Message-
 From: Necro [SMTP:[EMAIL PROTECTED]]
 Sent: 17 December 2001 08:59
 To: [EMAIL PROTECTED]
 Subject: [PHP] Checking a frames url..

 Lo all,

 I am trying to write a script that will output to a frame the current
 location within a site..
 like Home :: Contact
 I need PHP to be able to check the url of the frame main and then parse
 out anything after the domain to decide what to output as the location.
 e.g. http://domain.com/contact/index.html
 (http://domain.com) -- forgotten
 (contact/index.html)
 If URL = contact/index.html {
 echo('Home :: Contact'); }
 If URL = business/index.html {
 echo('Home :: Business'); }

 Am I on the correct track with most of it?? I just cant work out how to
grab
 the URL of a single frame.

 Thanx

 Andrew


 --
 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: Newsgroups????

2001-12-17 Thread Fred

Seems to be working fine from here.

Fred

Eddie Shipman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Just signed up for the mailing list because I couldn't
 access the newsgroups, what's going on there?



 __
 Do You Yahoo!?
 Check out Yahoo! Shopping and Yahoo! Auctions for all of
 your unique holiday gifts! Buy at http://shopping.yahoo.com
 or bid at http://auctions.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]




[PHP] Re: TN3270 socket

2001-12-17 Thread Fred

http://www.faqs.org/rfcs/rfc1576.html

Google Search took 0.3 seconds.

Fred

Brendan [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 does anyone know of how or where I can find info on, accessing a IBM
 mainframe which uses the TN3270 protocol via a socket?
 TN3270 isnt ordinary telnet so I assume the existing telnet socket info
 isnt helpful
 ta
 brendan




-- 
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: Displaying html

2001-12-17 Thread Fred

It depends on how you have magic quotes set up in your php.ini file.  Mine
are set up as follows:
magic_quotes_gpc On On
magic_quotes_runtime Off Off
which I believe is the default, because I certainly never changed them.

I have never had a problem simply inserting or selecting html without the
need for using any of the escape functions.  In other words, I do it just
like I would any other data and it works well.

Fred

Steve Osborne [EMAIL PROTECTED] wrote in message
000f01c18753$e8d086e0$[EMAIL PROTECTED]">news:000f01c18753$e8d086e0$[EMAIL PROTECTED]...
 Does anyone know of an easy way to store html code in a mysql database,
and
 then retreive it, in such a way that it can display the page as if it were
a
 standard html page?  Would using php be of benefit to me?

 Steve Osborne
 [EMAIL PROTECTED]

 ?php
 /* Happy Holidays */
 mysql_select_db('North_Pole');
 mysql_query('SELECT reindeer FROM stable WHERE nose_color=red');
 ?*

 *(borrowed from Paul)




-- 
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: Post Variable Problem

2001-12-13 Thread Fred

You can create a hidden form variable with the value of user to pass with
the rest of the post data, or (preferably) you can use:

cookies: http://php.he.net/manual/en/function.setcookie.php
or, even better,
sessions: http://php.he.net/manual/en/ref.session.php

Fred

Jack [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Dear all
 I had a Form Called Login.php, this form will pass the login Username to
 Main.php.

 For the Main.php i create a form for user to choose what they want to do
 from the List/Menu. Once they had select the choose and press the Option,
 the value of the Selected choose will pass back to Main.php to perform
some
 task.

 The step is when Login.php had submitted , the Username ($user) is passed
to
 Main.php, so in Main.php i had a script
 ?
 print (Hello!$user);
 ?
 and the below i had a  List Select Menu which let user to Choose what they
 want to do. Once they selected , press the Submit button, the form will
pass
 back to itself! which is Post=$php_self. here the problem appear, once
it
 post back the value to itself, the $user will be gone, which i understand
 why, but is there anyway that once the $user had passed to main.php, the
 $user's variable will be hold constant in main.php?

 I really waiting for your help!

 Jack
 [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: cross server sessions????

2001-12-13 Thread Fred

This question has been asked many times on this list (several times in the
last month).  Search the archive and you will find several solutions:

http://marc.theaimsgroup.com/?l=php-generalw=2r=1s=session+different+serv
erq=b

Fred

Prolog [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 hello all,

 Two questions

 1) Is it possible to pass a session to another server?  I'm creating a
 secure order form for a shopping cart but the ssl service of my provider
is
 on a different server.  Is there anyway to carry a users session over to
 this box?

 2) If it is not possible to carry a session...is there anyway I could
 include this page on the ssl server into my main server from my host?  If
I
 could do an include I could continue the session and use it's stored
 variables.

 Thank you for the help.

 -Jordan





-- 
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: Permission denied, although permissions are right

2001-12-12 Thread Fred

Your PHP script may be owned by zapman, but it is run as nobody.  Therefore
your file that you need to access also needs to be owned by nobody.

Fred

Wim Godden [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I'm trying to open a file (using fopen) in the /tmp directory which is
 owned by user 'zapman'. The php script is also owned by user 'zapman'.
 However, when I try to run it, I get :
 Warning: fopen(/tmp/1.dat,r) - Permission denied in
 /documents/zapman/html/openfile.php on line 5

 If I do a ps auwx | grep http, I get :
 root 20341  0.0  0.0 15100   56 ?S12:46   0:02
 /usr/local/apache/bin/httpd -DSSL
 nobody   20342  0.6  3.3 18276 4184 ?S12:46   0:26
 /usr/local/apache/bin/httpd -DSSL
 nobody   20343  0.8  4.6 20008 5936 ?S12:46   0:35
 /usr/local/apache/bin/httpd -DSSL
 nobody   20344  0.3  3.2 16100 4108 ?S12:46   0:15
 /usr/local/apache/bin/httpd -DSSL

 So the main process is running as root, the rest is running as nobody...
 that's the way to do it, right ? Or should I run Apache as root (which I
 don't like at all !) ?

 Greetings,

 Wim Godden




-- 
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: passing form values

2001-12-09 Thread Fred

This is precisely the type of situation session variables are designed for.
I'm not sure why you would think that using sessions is overkill.  You can
accomplish your task with sessions in less lines of code than it would take
to implement another solution and the sessions solution is more elegant.

Fred

Aaustin [EMAIL PROTECTED] wrote in message
000a01c180ef$51d7a2b0$[EMAIL PROTECTED]">news:000a01c180ef$51d7a2b0$[EMAIL PROTECTED]...
Hi

I have a slight design problem. I have some form values (user details) which
I want to pass to a web page which is two pages away. I.e. I have the
variables as hidden values in a form (username, address, password etc) and
the user submits these and cc details. If the credit card processing centre
gives a yes answer to processing the cc transaction the address details are
added to the db   if not they are lost. At present the cc script is a single
include on a blank page which runs for a couple of seconds and then the user
is transferred to a success or failure page depending on the cc transaction
processing companies answer.

Problem is how do I maintain state of the users address... values for the
two pages.

1. make them session- global values which seems a bit overkill
2. Make the cc an include and post back to itself.
3. Is it possible to have a hidden form which runs itself so carrying the
form values to the final page.

I am sure there is a simple answer and thanks in advance. Hope I have
explained it OK.

Andrew




-- 
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: SQL Query Question

2001-12-09 Thread Fred

You could simply execute a second query where score  $score and return the
number of rows in the result + 1.

For instance:

$return = mysql_query(select ID, Name, Score, COUNT(Name) as total from
members where ID = '$ID');
$row = mysql_fetch_assoc($return);
extract ($row);
$return = mysql_query(select * from members where Score  '$Score');
$rank = mysql_num_rows($return) + 1;
echo $Name is ranked $rank of  $total;

Fred


Andrew Brampton [EMAIL PROTECTED] wrote in message
00c101c18029$8b2ed040$2528260a@STUDENT5830">news:00c101c18029$8b2ed040$2528260a@STUDENT5830...
Hi,
This isn't a php question, more of a SQL question, but I don't know any
where better to send it, and I guess its trival enough for someone here to
answer.

Anyway, I have a list of members each with a score field. How can I say that
Member 3 is ranked 10 out of 100 members for example.

Here is the layout of the members table:
ID, Name, Score

I can get the total count of members in the table, but I don't know how to
determine what rank they are, unless I return all the rows in the table
(sorted), and cycle through them until I find the member I want, counting
how many people are above him... This method would work, but would be slow
(and wastful), is there a better way to determine his position with a SQL
Query?

Thanks in advance
Andrew

P.S
If it matters I'm using MySQL  PHP 4.0.6 on WinXP under Apache 1.3.22




-- 
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: Doing statistics with MySql data?

2001-12-09 Thread Fred

There are built in functions in mysql for just this sort of thing.  There
are AVG() and COUNT() functions as well as many more.  Read up on them here:

http://www.mysql.com/doc/F/u/Functions.html

Fred

Daniel alsén [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 i have a MySql table with five columns that are filled with different
 numerical values. I need some pointers to where i can learn how to build
 statistics out of this data (ie the average value of a column, how many
 instances there is of a certain value etc).

 Regards
 # Daniel Alsén| www.mindbash.com #
 # [EMAIL PROTECTED]  | +46 704 86 14 92 #
 # ICQ: 63006462   | +46 8 694 82 22  #
 # PGP: http://www.mindbash.com/pgp/  #




-- 
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: Bug #14360: Script ends on

2001-12-07 Thread Fred

Just out of curiosity, what makes you think the scripting engine stopped at
that particular spot?

Fred

Thomas Seuring [EMAIL PROTECTED] wrote in message
005744005865206102L412*@MHS">news:005744005865206102L412*@MHS...
Dear friends,

I've opened a Bug I think I've found on PHP, but there I was recommended to
ask
you.

Below you'll find the Mail I wrote and I hope, that you can help me.


[2001-12-06 06:30:32] [EMAIL PROTECTED]
I'm using a generated Script of the PHAKT-Software on a Windows 2000 and
Apache
Server.

The complete Script is:

?php
// *** Restrict Access To Page: Grant or deny access to this page
$KT_authorizedUsers= a;
$KT_authFailedURL= ../ierraccess.php;
$KT_grantAccess=0;
session_start();
if (isset($HTTP_SESSION_VARS[KT_Username])) {
  if (false || !(isset($HTTP_SESSION_VARS[KT_UserAuthorization])) ||
$HTTP_SESSION_VARS[KT_UserAuthorization]== ||
strpos($KT_authorizedUsers, $HTTP_SESSION_VARS[KT_UserAuthorization])) {
$KT_grantAccess = 1;
  }
}
if (!$KT_grantAccess) {
  $KT_qsChar = ?;
  if (strpos($KT_authFailedURL, ?)) $KT_qsChar = ;
  $KT_referrer = $PHP_SELF;
  if (strlen($QUERY_STRING)  0) $KT_referrer .= ? . $QUERY_STRING;
  $KT_authFailedURL = $KT_authFailedURL . $KT_qsChar . accessdenied= .
urlencode($KT_referrer);
  header(Location: $KT_authFailedURL);
  exit;
}
?

On

if (strlen($QUERY_STRING)  0) $KT_referrer .= ? . $QUERY_STRING;

The PHP Engine ends after the  of (strlen($QUERY_STRING)  0).

I think PHP interpretes the  as end of the Scripting Section.

I hope you could help me on this.

Yours

Tom


[2001-12-06 06:36:40] [EMAIL PROTECTED]
Ask for support questions at [EMAIL PROTECTED] .

This is most likely a programming error.

Bogus.

Thank you very much for your Feedback.

Yours,

Tom


Thomas W. Seuring
Senior Manager Corporate IT
DaimlerChrysler Capital Services
Europe  South Africa

HPC 0635
Epplestrasse 225
70546 Stuttgart
Germany

E-Mail: [EMAIL PROTECTED]

Phone: +49 (711) 17 94 783
Fax: +49 (711) 17 91 698

Mobile:+49 (171) 370 71 84
Mobile Fax: +49 (171) 37 48 158
- Forwarded by Thomas Seuring/DEBIS/debis/DCX on 07.12.2001 08:04 -

[EMAIL PROTECTED]
06.12.2001 15:14
Please respond to php-dev

To: Thomas Seuring/DEBIS/debis/DCX@WK-EMEA1
bcc:
Subject: Bug #14360: Script ends on 

From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:  4.0.6
PHP Bug Type: Scripting Engine problem
Bug description:  Script ends on 

I'm using a generated Script of the PHAKT-Software on a Windows 2000 and
Apache Server.

The complete Script is:

?php
// *** Restrict Access To Page: Grant or deny access to this page
$KT_authorizedUsers= a;
$KT_authFailedURL= ../ierraccess.php;
$KT_grantAccess=0;
session_start();
if (isset($HTTP_SESSION_VARS[KT_Username])) {
  if (false ¦¦ !(isset($HTTP_SESSION_VARS[KT_UserAuthorization])) ¦¦
$HTTP_SESSION_VARS[KT_UserAuthorization]== ¦¦
strpos($KT_authorizedUsers, $HTTP_SESSION_VARS[KT_UserAuthorization]))
{
$KT_grantAccess = 1;
  }
}
if (!$KT_grantAccess) {
  $KT_qsChar = ?;
  if (strpos($KT_authFailedURL, ?)) $KT_qsChar = ;
  $KT_referrer = $PHP_SELF;
  if (strlen($QUERY_STRING)  0) $KT_referrer .= ? . $QUERY_STRING;
  $KT_authFailedURL = $KT_authFailedURL . $KT_qsChar . accessdenied= .
urlencode($KT_referrer);
  header(Location: $KT_authFailedURL);
  exit;
}
?

On

if (strlen($QUERY_STRING)  0) $KT_referrer .= ? . $QUERY_STRING;

The PHP Engine ends after the .

I think PHP interpretes the  as end of the Scripting Section.

I hope you could help me on this.

Yours

Tom


--
Edit bug report at: http://bugs.php.net/?id=14360edit=2


=



-- 
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: Comparison between string failing

2001-12-07 Thread Fred

I would like to start by saying that your code is horribly confusing.  Try
taking all those commented out parts out of the script before you post to
the group.

That said, your problem is that you left out a closing curly brace.  Try
this:

 global $MYFILES;
 $MYFILES['file_recensione']['tmp_name'][1] = 'image/pjpeg';
 if ($MYFILES['file_recensione']['tmp_name'][1] == 'image/pjpeg') {print
OK
 HEREHR;}
 print VALUE 0:.$MYFILES['file_recensione']['tmp_name'][1].;HR;
 if (/*is_uploaded_file($MYFILES['file_recensione']['tmp_name'][1])*/
 //($VAL == 1)  (
 ($MYFILES['file_recensione']['type'][1] == 'image/jpeg') ||
 ($MYFILES['file_recensione']['type'][1] == 'image/pjpeg') ||
 ($MYFILES['file_recensione']['type'][1] == 'image/gif')
 //)
 ) {
 $EXTGIF = 'jpg';
 if (substr($MYFILES['file_recensione']['type'][1], -3) =='peg') {
 $EXTGIF = 'jpg';}
 if (substr($MYFILES['file_recensione']['type'][1], -3) =='gif') {
 $EXTGIF = 'gif';}} // **ADDED CLOSING BRACE***
 print ESTENSIONE = $EXTGIF;BR;
 } else {print UPLOAD
 FAILEDBR.$MYFILES['file_recensione']['type'][1].;BR;}
 print VALUE =1:.$MYFILES['file_recensione']['tmp_name'][1].;HR;

Mweb [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Hello,

 I can't understand why the piece of test code below produces the output :
 OK HERE
 VALUE 0:image/pjpeg;
 UPLOAD FAILED = ;
 VALUE =1:image/pjpeg;

 Basically I use or print several times the value
 $MYFILES['file_recensione']['tmp_name'][1]
 and it looks like it changes values from line to line (it's not a scope
 thing, I'm almost sure in this case: what is below is the whole file).
Look
 at the line below with the string ESTENSIONE, it should be printed
instead
 of UPLOAD FAILED, right?
 Why doesn't it happen?

 mweb


//
 global $MYFILES;
 $MYFILES['file_recensione']['tmp_name'][1] = 'image/pjpeg';
 if ($MYFILES['file_recensione']['tmp_name'][1] == 'image/pjpeg') {print
OK
 HEREHR;}
 print VALUE 0:.$MYFILES['file_recensione']['tmp_name'][1].;HR;
 if (/*is_uploaded_file($MYFILES['file_recensione']['tmp_name'][1])*/
 //($VAL == 1)  (
 ($MYFILES['file_recensione']['type'][1] == 'image/jpeg') ||
 ($MYFILES['file_recensione']['type'][1] == 'image/pjpeg') ||
 ($MYFILES['file_recensione']['type'][1] == 'image/gif')
 //)
 ) {
 $EXTGIF = 'jpg';
 if (substr($MYFILES['file_recensione']['type'][1], -3) =='peg') {
 $EXTGIF = 'jpg';}
 if (substr($MYFILES['file_recensione']['type'][1], -3) =='gif') {
 $EXTGIF = 'gif';}
 print ESTENSIONE = $EXTGIF;BR;
 } else {print UPLOAD
 FAILEDBR.$MYFILES['file_recensione']['type'][1].;BR;}
 print VALUE =1:.$MYFILES['file_recensione']['tmp_name'][1].;HR;



-- 
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: Re:[PHP] USERNAME

2001-12-06 Thread Fred

If you simply want to find out the username of someone who has logged in
using apache htaccess authentication, that information is contained in the
global variable $PHP_AUTH_USER

Fred

Chamarty Prasanna Kumar [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


Hi Rasmas and All,

   Thanks very much for the reply, Rasmas.

To use Hyperwave functions does I need to download

software and install it or it will work with php

intallation.

Or is there any way to find the login username from

the web page using php and that login authentication

is being done by the apache server.ie., we are using

password protecting directory by apache.


Thanks in advance,

Kumar.


On Fri, 07 Dec 2001 Rasmus Lerdorf wrote :
 Not that I have ever used HyperWave, but a 3 second
 glimpse at the manual
 would seem to indicate that you get a HyperWave connect
 by calling
 hw_connect().

 -Rasmus

 On 7 Dec 2001, Chamarty Prasanna Kumar wrote:

 
 
  Hi All,
 
 Want to know the usage of
 
  hw_getusername(int connection); function
 
 
  specifically, what connection refers to !!
 
 
  Thanks in advance,
 
  Kumar.
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
 php.net
  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]
 p.net
 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: Re:USERNAME

2001-12-06 Thread Fred

You would normally access this via:
$HTTP_REMOTE_USER or
$PHP_AUTH_USER
but these variables are only available (and thus only show up in phpinfo) if
you have actually logged in via apache htaccess authentication.

Fred

Chamarty Prasanna Kumar [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


Hi Rasmas and All,

  Thanks very much for the prompt reply.

 phpinfo() shows only

REMOTE_ADDR
REMOTE_HOST
REMOTE_PORT

but not $REMOTE_USER.

Even I tried using $REMOTE_USER alone, but no response.

Please suggest a way.


Kumar.



  On Fri, 07 Dec 2001 Rasmus Lerdorf wrote :
 To use the HyperWave functions you need to download and
 install HyperWave,
 whatever it is.

 And your second question has nothing to do with
 HyperWave.  Simply check
 $REMOTE_USER.  phpinfo() would have shown you this.

 -Rasmus

 On 7 Dec 2001, Chamarty Prasanna Kumar wrote:

 
 
  Hi Rasmas and All,
 
 Thanks very much for the reply, Rasmas.
 
  To use Hyperwave functions does I need to download
 
  software and install it or it will work with php
 
  intallation.
 
  Or is there any way to find the login username from
 
  the web page using php and that login authentication
 
  is being done by the apache server.ie., we are using
 
  password protecting directory by apache.
 
 
  Thanks in advance,
 
  Kumar.
 
 
  On Fri, 07 Dec 2001 Rasmus Lerdorf wrote :
   Not that I have ever used HyperWave, but a 3 second
   glimpse at the manual
   would seem to indicate that you get a HyperWave
 connect
   by calling
   hw_connect().
  
   -Rasmus
  
   On 7 Dec 2001, Chamarty Prasanna Kumar wrote:
  
   
   
Hi All,
   
   Want to know the usage of
   
hw_getusername(int connection); function
   
   
specifically, what connection refers to !!
   
   
Thanks in advance,
   
Kumar.
   
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail:
 [EMAIL PROTECTED]
   php.net
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: php-general-unsubscribe@list-
 s.ph-
   p.net
   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]
 p.net
 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] Large file uploads timeout - ouch!

2001-12-05 Thread fred

I'm designing a simple content management system with PHP, and it is
going great, except...

I do seem to have one problem - I'm trying to use PHP's copy function to
upload files through a web browser.  It works fine on small files, but
times out on large ones, like a 20 MB file I'm sending.  I'm on a 1Mbps
DSL connection, and routinely download 600MB iso images with no problem,
and seem to be having no connection problems on this end.  My client is
also getting timeouts on large files, and they're on a different network.

The web server is running Debian Linux kernel 2.2.19; Apache/1.3.9; PHP
4.0.6 at a web hosting company.

I checked the PHP manual, it said that the default maximum file upload
size is 2MB.  I used phpinfo() to show the server settings, and it reports
that it is:

upload_max_filesize=2M
post_max_size=8M
max_execution_time=30

which is the global file upload maximum and POST maximum and execution
limit.  I changed /cgi-bin/php.ini to include the lines

upload_max_filesize=200M
post_max_size=200M
max_execution_time=2400
memory_limit=120M

and saved it.  I tried my upload again, but it still times out. Does
Apache need to be restarted for the change to take effect?  I ran
phpinfo() again, and it shows

upload_max_filesize=200M
post_max_size=200M
max_execution_time=2400

so it looks like it took the change to php.ini.

I successfully uploaded a 1.8MB file, a 2.2MB file, a 4.1MB file, a 5.4MB
file, a 6.1MB file, a 6.9MB file, and a 7.05MB file, but a 7.248MB file
and a 7.6MB file timed out like the larger one.

I'm doing the upload from IE 6.0 on Windows 2000 (running on my Linux box
with VMware). I got the same results on Mozilla 0.9.6 on Mandrake Linux
8.0.

I've read that PHP file uploads are done in RAM, so perhaps that is part
of the problem?

Unfortunately, my client plans to upload ~90MB files this way, and I'd
like to leave PHP file upload as the only method needed.

Here's part of the page using the upload/rename/delete script.  It works
flawlessly on smaller files.

The only timeout (that I *know of!*) that I don't know how to change is the
Apache timeout of 300 seconds.  It appears that it is indeed timing out
after 300 seconds (five minutes). It shows as HTTP_KEEP_ALIVE = 300 in
phpinfo().

All of this is done on a virtual server at a web host, so I don't have
access to the httpd.conf for Apache, although they *might* change it if I
know what to ask them...  ;-)

TIA

Fred

/* New to Linux (nine months) and PHP (2 weeks) but loving it! */

==

TABLE BORDER=0 WIDTH=100% CELLSPACING=2 CELLPADDING=2 ALIGN=CENTER

?php
//print(\$Clientcode = $Clientcode, \$Usercode = $Usercode\n);
/* This file lists all the information for files in a directory and allows the user to 
delete, upload and rename files. 
*/

if ($Upload) { // Handle file uploads.
print (TRTD COLSPAN=4 ALIGN=CENTERUploaded file name: 
$File_name/TD/TR\n);
print (TRTD COLSPAN=4 ALIGN=CENTERUploaded file size: 
$File_size/TD/TR\n);
if (copy ($File, documents/$Folder/$File_name)) {
print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $File_name, was 
successfully uploaded!/TD/TR\n);
} else {
print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $File_name, could 
not be copied./TD/TR\n);
}
unlink ($File);
print (TRTD COLSPAN=4 ALIGN=CENTERnbsp;/TD/TR\n);
}

if ($Delete) { // Handle file deletions.
for ($i = 0; $i  count ($Delete); $i++) {
if ( unlink (documents/$Folder/$Delete[$i]) ) {
print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $Delete[$i], 
was successfully deleted!/TD/TR\n);
} else {
print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $Delete[$i], 
could not be deleted./TD/TR\n);
}
}
print (TRTD COLSPAN=4 ALIGN=CENTERnbsp;/TD/TR\n);
}

if ($Rename) { // Handle file renaming.
for ($n = 0; $n  count ($Rename); $n++) {
$OldFilename = $Rename[$n];
$Old = documents/$Folder/$OldFilename;
$New = documents/$Folder/$NewName[$OldFilename];
if ( rename ($Old, $New) ) {
print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $Rename[$n], 
was successfully renamed!/TD/TR\n);
} else {
print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $Rename[$n], 
could not be renamed./TD/TR\n);
}
}
print (TRTD COLSPAN=4 ALIGN=CENTERnbsp;/TD/TR\n);
}

// Start the form.
$HTTP_KEEP_ALIVE = 2400;
print (FORM METHOD=POST ENCTYPE=\multipart/form-data\ ACTION=\files.php\\n);
print (input type=\hidden\ name=\MAX_FILE_SIZE\ value=\2\\n); // max 
file size set to
200 MB
print (TRTDh2Folder bi$Folder/i/b:/h2/TD/TR\n);
print (TRTDBFile Name/B/TDTDBFile 
Size/B/TDTDBDelete/B/TDTDBRename/B (Enter the New Name in the 
Box)/TD/TR\n);

// Read the files from

Re: [PHP] Uploading to Apache server from VB

2001-12-05 Thread fred

See my post today about a file upload problem, which includes a complete
script to do this (and more).  My script works, but
times out on very large files, otherwise it is a champ...

Fred

On Mon, 03 Dec 2001 15:16:09 -0500, Jim wrote:


 http://www.php.net/manual/en/features.file-upload.php
 
 I've done this successfully both with PHP and VB/ASP. I think PHP is the
 easiest, but there are several things that could go wrong.
 
 There is usually a 2MB limit to the file size and the safe mode setting
 also affects the outcome.
 
 On the HTML side, you must include ENCTYPE=multipart/form-data in your
 form tag.
 
 Once the file is uploaded (you can verify through phpinfo() command) you
 have to move it someplace. This can be tricky depending on how your
 server is set up. As a security, some servers do not allow scripts to
 save files.
 
 One solution is to have your script open an ftp socket and put the file
 in the right place. This way, the script has the ftp password which
 should be kept secret from the user.
 
 
Hello,

I have a VB program which can download files from a web-site. The
webserver is running Apache where we use PHP scripting. That is all
working OK.

Now I want to let certain people upload data from their PC's. I don't
want to use FTP, because I don't want to hand out password's (also not
in the code we are distributing). Anonymous FTP is not possible.

I can upload files to the site from a browser, but I would to make it
(very) easy for people to upload their data: a number of them are not
very familiar with computers.

I have seen (www.google.com) references to uploading from VB to IIS
servers, but how about to Apache/PHP? I've tried some examples with the
MicroSoft Internet Control and executing the POST command, but the
file would not be uploaded (the PHP script did not get it anyway).

Should it be possible?
If so, can somebody point in the right direction/example? If not, could
somebody please explain why not?

Thanks in advance for your help,

henk sandkuyl


--
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] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Sorry, no can do, I can't stand SPAM, and I don't need any more email. 
Just reply to the newsgroup.  I can read it there, and it may help others
- that is what newsgroups are for!;-)

On Wed, 05 Dec 2001 03:57:05 -0500, Mirek Novak wrote:

 fix your email to receive answers FIRST!
 
 M.N.




-- 
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] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Now that you've helped me, go and help someone else...please.

And yes, I did read the manual and several books on PHP already.

Have you?

On Wed, 05 Dec 2001 04:09:00 -0500, Mirek Novak wrote:

 so, RTFM
 
 HTH
 
 M.N.


-- 
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] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Now that you've helped me, go and help someone else...please.

And yes, I did read the manual and several books on PHP already.

Have you?

On Wed, 05 Dec 2001 04:09:00 -0500, Mirek Novak wrote:

 so, RTFM
 
 HTH
 
 M.N.


-- 
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] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Now that you've helped me, go and help someone else...please.

And yes, I did read the manual and several books on PHP already.

Have you?

On Wed, 05 Dec 2001 04:09:00 -0500, Mirek Novak wrote:

 so, RTFM
 
 HTH
 
 M.N.


-- 
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] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Sorry, I don't know where you are coming from.  You don't know me, and are
assuming things that just aren't true, calling me lazy?

Thank you for the info. Now to answer your accusation...

I searched the newsgroups all day and never found that function, and
scoured php.net.  I searched the PHP bugs forum.  Sorry I missed that one
function in the 1,259 page PHP manual.  I did find the other six items I
listed, which stumped a lot of other people, 100's of them in fact, for
many reasons.  I tested and debugged that script.  I posted it for the
benefit of others, as well as to give all info about my problem. So,
according to you, not only am I lazy, but I guess all the others with the
file upload problem must be lazy too.

Is that work *your* definition of lazy?  It isn't mine.

If you want to help people, help them, otherwise, find something else to
do.

I saw your post here in May asking for help. I guess you're glad someone
helped *you* when you asked here, hmm?

On Wed, 05 Dec 2001 04:19:51 -0500, Mirek Novak wrote:


 fred wrote:
 
 Now that you've helped me, go and help someone else...please.

 And yes, I did read the manual and several books on PHP already.

 Have you?
 
 and have you seen function set_time_limit() while u were reading the
 manual?. BTW - this was on the list many times and as u were noting '...
 that is what are the newsgroupf for' instead of this they are for to be
 searched TOO! Just don't be lazy!
 
 HTH
 M.N.
 


-- 
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] Large file uploads timeout - ouch!

2001-12-05 Thread fred

After all of this, and you give me the wrong answer.  If you read the PHP
manual, you will see that set_time_limit falls defaults to
max_execution_time, which I already have set to 2400, so your answer is
irrelevant.  That is not controlling HTTP_KEEP_ALIVE, which is defaulting
to 300 seconds somewhere - probably httpd.conf.

Now who is lazy?

On Wed, 05 Dec 2001 04:25:15 -0500, Fred wrote:

 Sorry, I don't know where you are coming from.  You don't know me, and
 are assuming things that just aren't true, calling me lazy?
 
 Thank you for the info. Now to answer your accusation...
 
 I searched the newsgroups all day and never found that function, and
 scoured php.net.  I searched the PHP bugs forum.  Sorry I missed that
 one function in the 1,259 page PHP manual.  I did find the other six
 items I listed, which stumped a lot of other people, 100's of them in
 fact, for many reasons.  I tested and debugged that script.  I posted it
 for the benefit of others, as well as to give all info about my problem.
 So, according to you, not only am I lazy, but I guess all the others
 with the file upload problem must be lazy too.
 
 Is that work *your* definition of lazy?  It isn't mine.
 
 If you want to help people, help them, otherwise, find something else to
 do.
 
 I saw your post here in May asking for help. I guess you're glad someone
 helped *you* when you asked here, hmm?
 
 On Wed, 05 Dec 2001 04:19:51 -0500, Mirek Novak wrote:
 


-- 
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: select join table on mysql

2001-12-05 Thread Fred

The most common couse of this problem is that your query generated an mysql
error.  To find out what the error is use this instead:

 $t2=mysql_db_query($db, SELECT
radacct.UserName,sum(radacct.AcctSessionTime)
 as t1,usergroup.GroupName .
from radacct LEFT JOIN  usergroup ON
 radacct.UserName=usergroup.UserName where.
usergroup.GroupName='unlimited' AND
 radacct.AcctStartTime='2001-$month-01 00:00:00'.
AND AcctStopTime='2001-$month-31 23:59:59' group by UserName)
or die(mysql_error());

Yamin Prabudy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 hi i have to select this :

 $t2=mysql_db_query($db, SELECT
radacct.UserName,sum(radacct.AcctSessionTime)
 as t1,usergroup.GroupName .
from radacct LEFT JOIN  usergroup ON
 radacct.UserName=usergroup.UserName where.
usergroup.GroupName='unlimited' AND
 radacct.AcctStartTime='2001-$month-01 00:00:00'.
AND AcctStopTime='2001-$month-31 23:59:59' group by UserName);



 when i do it in mysql database it already give me result and thereis about
 400 rows.
 but when i want to generate it fetch the array there is a error
 Supplied argument is not a valid MySQL result resource in
b./stats.php/b
 on line (bellow is the line

 $x=mysql_fetch_array($t2);


 what might be possible wrong with the code..(it just a simple one)


 Yamin Prabudy



-- 
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] Large file uploads timeout - ouch!

2001-12-05 Thread fred

Did you read my post?  I did all of that *before* I posted my question.

Anyone else have a suggestion?

TIA

Fred

On Wed, 05 Dec 2001 05:16:38 -0500, Mirek Novak wrote:

 fred wrote:
 
 After all of this, and you give me the wrong answer.  If you read the
 PHP manual, you will see that set_time_limit falls defaults to
 max_execution_time, which I already have set to 2400, so your answer is
 irrelevant.  That is not controlling HTTP_KEEP_ALIVE, which is
 defaulting to 300 seconds somewhere - probably httpd.conf.

 Now who is lazy?
 
 it was ONE question to google.com:  +large file uploads +php results
 in
 http://www.phpbuilder.com/forum/read.php3?num=2id=137901loc=0thread=118340
 
 -X-
 
 


-- 
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] Large file uploads timeout - ouch!

2001-12-05 Thread Fred

I believe that you must normally restart apache for php.ini changes to take
affect.  The fact that the changes show up in phpinfo() may or may not
indicate that the changes are actually in effect.  If your ISP has not
restarted apache, you may want to ask them to do so in order to save
yourself a lot of head aches.  If that is not the problem, then read on.

In your initial request you mentioned that you suspected that
HTTP_KEEP_ALIVE was suspect and you asked for information on how to change
that environmental variable.  The HTTP_KEEP_ALIVE setting in apache controls
how long the server wait for a second request on a single connection before
closing the connection.  This setting is typically set to something like 15
seconds and would not affect the behavior of your script.

If you look at your phpinfo() under the apache heading you will notice a row
called Timeouts.  There are two settings listed here.  The first is
Connection which is typically 300 and the second is keep-alive which is
typically 15.

If your ISP has 300 set for keep-alive then you may want to advise them to
change it because it leaves unused connections open for 5 minutes clogging
up memory and child processes.

I suspect, however, that it is the Connections setting that is set to 300.
If that is the case then your ISP can open httpd.conf and edit the line that
says:

timeout 300

and change it to a larger number.  They could also change this setting to
0 which means there is no timeout.  That could also cause problems,
however, because abandoned connections could tie up system resources.

This may solve your problem, but I dount it.  This timeout setting controls
the amount of time that apache waits for three things:

1. The total amount of time it takes to receive a GET request.
2. The amount of time between receipt of TCP packets on a POST or PUT
request.
3. The amount of time between ACKs on transmissions of TCP packets in
responses.

In other words, as long as data is flowing apache will not timeout.  I have
a script that automatically generates 20MB word files and apache has no
problem keeping the connection alive for the 30 minutes it takes to download
the data over a slow connection despite the fact that Timeout is set to
300.

If your php.ini settings are indeed correct, it may well be that apache is
timing out for some reason, but if that is the case it is caused by one of
the three reasons above.

The first reason is not the issue because you are not using the GET method.
The third reason is not the issue because ACKs are sent by the receiving
host rather than the sender, so apache is not expecting ACKs.

That leaves only the second reason:

The amount of time between receipt of TCP packets on a POST or PUT request.

If this is the problem, it would indicate that your browser has stopped
sending packets for more than 300 seconds.  If you have not done so, you may
wish to monitor the data flow to determine if this is the case.  If so, then
your browser is timing out for some reason unrelated to apache or php and
you may want to try another browser.

If this is not the problem then you have me stumped.

Fred

Fred [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Did you read my post?  I did all of that *before* I posted my question.

 Anyone else have a suggestion?

 TIA

 Fred

 On Wed, 05 Dec 2001 05:16:38 -0500, Mirek Novak wrote:

  fred wrote:
 
  After all of this, and you give me the wrong answer.  If you read the
  PHP manual, you will see that set_time_limit falls defaults to
  max_execution_time, which I already have set to 2400, so your answer is
  irrelevant.  That is not controlling HTTP_KEEP_ALIVE, which is
  defaulting to 300 seconds somewhere - probably httpd.conf.
 
  Now who is lazy?
 
  it was ONE question to google.com:  +large file uploads +php results
  in
 
http://www.phpbuilder.com/forum/read.php3?num=2id=137901loc=0thread=11834
0
 
  -X-
 
 
 



-- 
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: Extract all fields of a table to vars of same name

2001-12-04 Thread Fred

If you have this select statement:
$Query = SELECT First, Second, Third FROM Table1;
and you execute the statement like this:
$Result = mysql_query($Query);
and retrieve a row like this:
$Row = mysql_fetch_assoc($Result);
then extract the row like this:
extract ($Row);
you end up with these variables:
$First, $Second, $Third
containing the value of the respective fields.

Fred

Baloo :0) [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Someone came with a very clever solution to simplify the extraction of
 all
 fields when doing aselect * from table

 it's a command that passes all values from the fields on the table to
 variables
 of the same name than the field on that table.  No need to program it
 manually,
 creates all variables with same names as the table fields.

 Could someone tell me how to do this?

 Alfredo




-- 
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: CURL functions

2001-12-04 Thread Fred

It would be difficult at best to answer your question without first knowing
two things:

1.  What did you expect it to do?
2.  What did it actually do?

Fred

Stefan Isarie [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hey,

 I'm trying to use CURL for sending some headers to paypal. Can anyone tell
 me why this code below doesn't work as expected???

 $ch = curl_init();

 curl_setopt($ch,
 CURLOPT_URL,https://www.paypal.com/cgi-bin/webscr;);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_POSTFIELDS,
 cmd=_cartupdate=Update$vard=1);

 curl_exec ($ch);
 curl_close ($ch);

 PS: $vard is defined.

 Thanks in advance

 Stefan - Romania



-- 
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: Simple Question: PHP, MySQL, HTML Form and NULL

2001-12-04 Thread Fred

Your form returns the date as an empty string  which is an invalid date.
MySQL sets all invalid dates to -00-00.  There is a big difference
between an empty string and NULL.  If you want to insert NULL into the MySQL
date field you will need to insert /0 which is the escape sequence for
NULL.

In the script that inserts the form data just add something like:
if ($Date == ) $Date = /0;
somewhere before the insert.

Fred

[EMAIL PROTECTED] wrote in message
BB6D932A42D6D211B4AC0090274EBB1DA0F139@GLOBAL1">news:BB6D932A42D6D211B4AC0090274EBB1DA0F139@GLOBAL1...
 I have added a new column in an existing MYSQL table called
event_date  -
 type: DATE, NULL default.

 This database field will be filled if and when the field in the HTML form
is
 complete.   When I added the new field to MySQL, it automatically assigned
 NULL to all the existing records - which is what I wanted it to do.

 I tested the HTML form, and when someone enters a date in the HTML form,
the
 date appears correctly in the table field.  Perfect.

 Now my question: When the HTML form date field is left blank  and the form
 is submitted, instead of putting NULL in the MySQL event_date field, I
 found: -00-00.  Is this because the form is submitting an   to the
 database field?

 Is there some kind of if/then statement I should use so that when the
field
 is empty,  NULL will be entered into that table field?

 Thank  you, Shawna



-- 
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: problems with looping array

2001-12-03 Thread Fred

Strings in your sql query must be quoted.  Try this instead:

$result = mysql_query(SELECT * FROM ar
LEFT JOIN company on ar.company_id=company.company_id
LEFT JOIN scale on ar.scale_id=scale.scale_id
WHERE item_number = \$item[$index]\);

Fred

Jordan [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 here's the situation.  I'm making a shopping cart, when an item is added
 it's item number is added into an array.  I then want this array's items
to
 be compared agains the database.  Unfortunately I haven't been able to use
a
 variable in the query string of MySQL.  something along the lines of


 ?PHP

include ('connect.php');

$result = mysql_query(SELECT * FROM ar
LEFT JOIN company on ar.company_id=company.company_id
LEFT JOIN scale on ar.scale_id=scale.scale_id
WHERE item_number = . $item[$index]);

 ?

 where $item is the array of item numbers and $index is an auto
incrementing
 number that increments at the end of the loop.  Please help if you know of
 anyway to use this variable.  Also, I can post my whole script if
needed...I
 just didn't want unneeded info posted.  Thanks in advance.

 -Jordan





-- 
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: Something wrong with the file() command.

2001-12-03 Thread Fred

When you attempt to print or echo an array the result is simply array.
You have to iterate through the elements of the array to see what each
element contains.  Read the array chapter in the manual for more
information.

Fred

Jose [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I try to give it a value with a var, but it doesn't work.

 The code is something like this.

 $y=str_pad($y,5,.txt); \\ To give it a filename from a var that contains
 only 1 number (with 1 digit)
 If in this step I do a echo $y, it shows the correct string. Suposing it
is
 2, it shows 2.txt

 $temp[]=file($y); \\ To load the file into the array.

 But after the file nothing happens, the array only contains Array.

 Sorry for my bad english.
 Jose.

 Olinet S.L.





-- 
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: best way to handle a form with 60 fields !!!

2001-12-02 Thread Fred

First, if your goal is to enter the form information into a database, there
is no need to ever register the form data as session variables.  Simply
insert the data into the database from the form and if you need some or all
of the data on other pages pull it back out of the database.

Second, it is never quicker or more efficient to store data in a file than a
database.

Third, it is ineffecient and unneccessary to put 60 fields in a single form.
If you are using the GET method it probably will not work since it passes
the variable names and values in the URL, which has a maximum length of 255
characters.  52 of your fields could be one character long (A,a,B,b...) and
the remaining 8 would need to be two characters (aa,bb...), which takes up
68 characters.  Then there are 60 's and 60 ='s which brings your total to
188 characters.  Even if your data was all sinlge characters your total will
now be 248 characters, leaving only 7 characters for your domain name, path
and script name.

You could, of course, use the POST method, but I would still not recommend
this simbly because it is a nightmare for both the user entering the data
and the person writing the script.

Break the form up into smaller pieces along logical boundaries.  For
example, submit contact information first and then move on to a form which
submits qualification information and so on.

Third, your database should probably not consist of a single table with 60
fields.  There is rarely an occasion where it is necessary or desirable to
have a 60 field table.  Break your tables up into logic groups along the
same lines as your forms.  You could have, for example, a table for contact
information and a table for qualification information.  Each table would
contain a unique id field that related to the other tables.

Find a tutorial on the web about database normalization to learn how to best
design your databases.  This should be the first step in the application
design process and all other work should be based on it.

Good luck and happy PHPing.

Fred

Masudi Olivier [EMAIL PROTECTED] wrote in message
004e01c17b29$db1756e0$[EMAIL PROTECTED]">news:004e01c17b29$db1756e0$[EMAIL PROTECTED]...
What is the best way to handle a form with 60 fields ?
Is it a maximum number of var that i can regisister in a session ? is it
possible to configure this number in php.ini ?
I dont'host my web site I use a hoste company where my site is hosted on an
linux/apache server with php4.
Is it a good idea to register  the 60 vars in my session and then to insert
them into a databes or is it better to insert only somme of them and make a
link to a file where i store all the others fields ?

What pissed me off most is to declare and handle so many vars.
It' s a form for a congress registration and users have to enter a lot of
information.


I hope that some kind php master will give me some good tip to speed up my
dev. time

Thanks and Peace




-- 
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 Bulletin Boards...how they work.

2001-12-02 Thread Fred

If you are new to PHP and/or MySQL then you are asking more than you think.
It is much more difficult for a newbie to analyze someone else's code than
it is to learn from scratch.  Do yourself a favor and read the PHP and MySQL
manual several time.  Start by writing simple scripts to enter and extract
database info and display it on the page.  In the process of learning, you
can come to this list and ask questions that you cannot find answers to in
the manuals or list archives.

It will be much less frustrating for you and those on this list if you take
this approach.  Although bulletin boards are not the most complex of
applications, they require a knowledge of many many PHP and MySQL basics.
Take the time to learn those basics before trying to swallow the whole
thing.

Good luck.

Fred

Anthony Ritter [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm using Windows 98 with Apache, mysql and PHP.

 I'm in the process of learning PHP and would like to find a few tutorials
on
 PHP/mysql bulletin boards.

 I know that there are a few that you can download but I am trying to find
a
 tutorial that will let me anylaze the syntax and logic of the code so that
I
 can understand and breakdown the steps in how a BB program works.

 Any URL's will be helpful.

 Thanking all in advance.
 Tony Ritter







-- 
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] content disposition and internet exploder

2001-12-02 Thread Fred

I am attempting to allow users to download csv files that are created
dynamically from a database.  In order to do so  I use:

header( Content-Disposition: attachment, filename=query.csv);

This works fine in NS, but not in IE, as it always attempts to save the file
using the script name instead of the filename in the header.  I have read
numerous posts and articles on MS site as well as this list about bugs in MS
4.01 5.0 and 5.5, but each article claims that the problem is fixed with SP2
etc.  I have installed each of the service packs and have not been able to
get this to work correclty on any of them.

Has anyone had success in getting IE to use the correct filename when
downloading dynamically generated files?

Fred



-- 
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] content disposition and internet exploder

2001-12-02 Thread Fred

LOL
Of course it worked.  Open Source outwits MS yet again.

Fred

Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 You could just trick it with a URL like:

 http://your.domain.com/script.php/query.csv

 IE will think your script is called query.csv while Apache is smart enough
 to run script.php.

 -Rasmus

 On Sun, 2 Dec 2001, Fred wrote:

  I am attempting to allow users to download csv files that are created
  dynamically from a database.  In order to do so  I use:
 
  header( Content-Disposition: attachment, filename=query.csv);
 
  This works fine in NS, but not in IE, as it always attempts to save the
file
  using the script name instead of the filename in the header.  I have
read
  numerous posts and articles on MS site as well as this list about bugs
in MS
  4.01 5.0 and 5.5, but each article claims that the problem is fixed with
SP2
  etc.  I have installed each of the service packs and have not been able
to
  get this to work correclty on any of them.
 
  Has anyone had success in getting IE to use the correct filename when
  downloading dynamically generated files?
 
  Fred
 
 
 
 




-- 
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] content disposition and internet exploder

2001-12-02 Thread Fred

That works fine in IE but does not work in NS, undoubtedly because it does
not conform to the RFC.

Fred

Jason Murray [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I am attempting to allow users to download csv files that are created
  dynamically from a database.  In order to do so  I use:
 
  header( Content-Disposition: attachment, filename=query.csv);
 [snip]
  Has anyone had success in getting IE to use the correct filename when
  downloading dynamically generated files?

 I just use:

  Header(Content-disposition: filename=.$filename);

 ... ie, no attachment.

 Jason

 --
 Jason Murray
 [EMAIL PROTECTED]
 Web Developer, Melbourne IT
 Work now, freak later!



-- 
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: file_exists problems

2001-12-01 Thread Fred

file_exists takes a string argument.
/images/$filename is not a string.
try images/ . $filename instead.

Fred

Prolog [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I had a script that was running beautiful that simply called up a database
 and displayed the results in tables.  I went to add images to this script
 and all hell broke loose.  This is the portion of the script that I added:


 --

 file://filename is the item number + t.jpg -- t shorthand for thumbnail

   $itemnumber = $myrow[item_number];
   $filename = $itemnumber t.jpg;

 echo trtdcenter;

 file://if the file exists then print it.  Otherwise print a generic image
saying
 it doesn't exist.

  if(file_exists(/images/$filename))
  {
   readfile(/images/$filename);
  }
  else
  {
   readfile(images/npat.jpg);
  }

 -

 Is there anything I need to know about file_exists that I'm not doing.
 for some reason when this code is added it gives me an error on the line
 after the close of the else statement.  That line was perfectly fine
before
 the addition.  Please help.

 -Jordan





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