Re: [PHP] Session timeout

2007-12-13 Thread Victor Matherly
You could always just set you own cookie that expires after 10 min. Have your 
script  redirect to a login page if the cookie has expired or reset the cookie 
if its still valid. 



- Original Message -
From: Dani Castaños [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, December 13, 2007 7:36:06 AM (GMT-0500) America/New_York
Subject: [PHP] Session timeout

Hi all!

I've read a bit about PHP session timeout. Is it configurable?? I mean, 
If i want user logged out after 10 minutes of innactivity... where i can 
to set it up?? Is it possible to expire session configuring php.ini.
I know i will have to write code to do whatever when the session expires...

Thank you in advance

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



-- 
Victor J. Matherly
Technical Services
Wave Communications, Inc
http://www.wave-communications.com

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



Re: [PHP] nested objects

2007-12-07 Thread Victor Matherly
Thanks that fixed it. That was so simple no wonder I was banging my head on the 
wall :-).




- Original Message -
From: Cesar D. Rodas [EMAIL PROTECTED]
To: Victor Matherly [EMAIL PROTECTED]
Sent: Friday, December 7, 2007 2:37:23 PM (GMT-0500) America/New_York
Subject: Re: [PHP] nested objects

Hello 

I hope this help you! 


On 07/12/2007, Victor Matherly  [EMAIL PROTECTED]  wrote: 



Hello list, 

I want to create a new object and nest the objects variable in an array of 
another object. I think I am going about it the correct way but the variable is 
not being stored or retrieved correctly from the main function. I can't figure 
out what I am doing wrong. Can anyone help? Here is an example of what I am 
trying to do: 



?php 


$html = table border='1' \n; 

$row = new htmlTableRow(); 

$cell1 = new htmlTableCell(); 
$cell1-setContent(test1); 
$cell1-setName(Left test); 
$row-AddCell($cell1); 

$cell2 = new htmlTableCell(); 
$cell2-setContent(test2); 
$cell2-setName(right test); 
$row-AddCell($cell2); 



$html .= $row-buildRow(); 


$html .= table\n; 

print HERE 
html 
body 

$html 

/body 
/html 



HERE; 



class htmlTableRow { 

var $class; 
var $cell_arr; 
var $the_row; 

function htmlTableRow(){ 
$this-cell_arr = array(); 

}//end construct 

function AddCell($cell) { 
$this-cell_arr = $cell; 

$this-cell_arr[] = $cell; 



} 

function buildRow(){ 
$temp = tr\n; 

foreach($this-cell_arr as $rowdata){ 

$temp .= \ttd . $rowdata-cell_content . /td\n; 

}//end foreach 
$temp .= /tr\n; 
return $temp; 
}//end build row funtion 

}// end htmlTableRow class 



class htmlTableCell { 
var $cell_width; 
var $cell_height; 
var $cell_colspan; 
var $cell_rowspan; 
var $css_class; 
var $cell_content; 
var $cell_name; 


function __construct($content = nbsp;){ 

$this-cell_content = $content; 


}// end construct 

function setContent($content){ 
$this-cell_content = $content; 

}//end setContent function 

function setName($name){ 
$this-cell_name = $name; 

}//end setContent function 


function getContent(){ 
return $this-cell_content; 

}//end setContent function 

} //end TableCell class 






? 

Best regards 



Victor J. Matherly 
Technical Services 
Wave Communications, Inc 
http://www.wave-communications.com 

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




-- 


Cesar D. Rodas 
http://www.cesarodas.com 
http://www.thyphp.com 
http://www.phpajax.org 
Phone: +595-961-974165 

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



Re: [PHP] nested objects

2007-12-07 Thread Victor Matherly
Actually it is academic intro to OO programing, the overkill html was just 
helping me understand the concept. Now I can put it to good use :-).


- Original Message - 
From: Jochem Maas [EMAIL PROTECTED]
To: Victor Matherly [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Friday, December 7, 2007 10:20:47 PM (GMT-0500) America/New_York
Subject: Re: [PHP] nested objects

Victor Matherly wrote:
 
 Hello list,
 
 I want to create a new object and nest the objects variable in an array of 
 another object.   
 I think I am going about it the correct way 


I think you are trying to swat a fly with a nuclear missle. in practice 
abstracting an HTML
table into a big collection of objects is total overkill (although it might 
make an interesting
accademic introduction into OO coding)

...

 
 class htmlTableCell {
  var $cell_width;
  var $cell_height;
  var $cell_colspan;
  var $cell_rowspan;
  var $css_class;
  var $cell_content;
  var $cell_name;
  
   
 function __construct($content = nbsp;){
 
  $this-cell_content = $content; 
   
   
 }// end construct 
 
 function setContent($content){
  $this-cell_content = $content;  
   
 }//end setContent function
 
 function setName($name){
  $this-cell_name = $name;
   
 }//end setContent function
 
 
 function getContent(){
  return $this-cell_content;  
   
 }//end setContent function
 
 } //end TableCell class
 
 
 
 
 
 
 ?
 
 
 
 
 
 
 Victor J. Matherly
 Technical Services
 Wave Communications, Inc
 http://www.wave-communications.com
 

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



[PHP] nested objects

2007-12-07 Thread Victor Matherly


Hello list,

I want to create a new object and nest the objects variable in an array of 
another object.   I think I am going about it the correct way but the variable 
is not being stored or retrieved correctly from the main function. I can't 
figure out what I am doing wrong. Can anyone help? Here is an example of what I 
am trying to do:



?php


$html = table border='1' \n;

   $row = new htmlTableRow();
   
   $cell1 = new htmlTableCell();
   $cell1-setContent(test1);
   $cell1-setName(Left test);
   $row-AddCell($cell1);
   
   $cell2 = new htmlTableCell();
   $cell2-setContent(test2);
   $cell2-setName(right test);
   $row-AddCell($cell2);
   
   
 
  $html .= $row-buildRow();


$html .= table\n;

print HERE
html
body

$html

/body
/html



HERE;



class htmlTableRow {
 
 var $class;
 var $cell_arr;
 var $the_row;
 
function htmlTableRow(){
 $this-cell_arr = array();

}//end construct

function AddCell($cell) {
 $this-cell_arr = $cell;
}

function buildRow(){
 $temp = tr\n;  

 foreach($this-cell_arr as $rowdata){

  $temp .= \ttd . $rowdata-cell_content . /td\n;

 }//end foreach
 $temp .= /tr\n;
 return $temp;  
}//end build row funtion

}// end htmlTableRow class



class htmlTableCell {
 var $cell_width;
 var $cell_height;
 var $cell_colspan;
 var $cell_rowspan;
 var $css_class;
 var $cell_content;
 var $cell_name;
 

function __construct($content = nbsp;){

 $this-cell_content = $content; 
  

}// end construct   

function setContent($content){
 $this-cell_content = $content;

}//end setContent function

function setName($name){
 $this-cell_name = $name;  

}//end setContent function


function getContent(){
 return $this-cell_content;

}//end setContent function

} //end TableCell class






?






Victor J. Matherly
Technical Services
Wave Communications, Inc
http://www.wave-communications.com

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



[PHP] Why create_element function always return false?

2007-05-04 Thread Victor
?php
$doc = domxml_new_doc(1.0);
$node = $doc-create_element(para);
$newnode = $doc-append_child($node);
$newnode-set_attribute(align, left);
?

I just run the example that is from php manual. But there is some error

--
Warning: domnode::append_child() expects parameter 1 to be object, null
given in C:\AppServ\www\tutorial\test.php on line 4

Fatal error: Call to a member function set_attribute() on a non-object
in C:\AppServ\www\tutorial\test.php on line 5
--


It is very strangeI found that create_element always return
falsenomatter what I dowhat example I tried...
Not only create_element return false but also create_coment do so...
Why???

I run php 5.2.2 with AppServ . The version of docmxl is 20626 (I just
call domxml_version() ). OS is Windows XP.

Would someone help me ,please?
Thanks a lot.

Victor.

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



[PHP] wsdl cache?

2005-08-15 Thread Victor Alvarez
Hello,
 I am experiencing a lot of difficulties working with Apache 5.0.4 and wsdl. I 
can publish a wsdl and work with it, but as soon as I want to add a new method 
to the wsdl, I have to change the directory to be able to use it. In some way, 
Apache kept the information for the wsdl and I am not able to update it! Could 
anybody explain me why and how could I avoid this problem?

Thanks.
Kind Regards,
 Victor.

[PHP] how to install phpize and php-config?

2005-07-25 Thread Victor Alvarez
Hi,
 I'm afraid I'm not sure about how to install phpize and php-config. 
 I used to install php using rpms, but this time I downloaded php5 from php.net 
and configure it with the following options:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --enable-soap 


The installation runs fine but phpize and php-config are required to install 
eaccelerator and now I don't know if I should add the pear module to the above 
line or It should be done another way.
 

locate phpize returns:
/usr/src/php-5.0.4/scripts/phpize.m4
/usr/src/php-5.0.4/scripts/phpize.in
/usr/src/php-5.0.4/scripts/phpize


locate php-config returns:
/usr/src/php-5.0.4/scripts/php-config.in
/usr/src/php-5.0.4/scripts/php-config


but I don't have the executables in  /usr/local/bin, as usual. What should I do?

What about php from the command line? What can I do to install the usual 
/usr/local/bin/php?



Thanks in advance,

  Victor.


[PHP] php5 built-in soap - apache performance wsdl generation

2005-07-14 Thread Victor Alvarez
Hello,
 
 I'm successfully playing with php 5 and Its built-in soap but I still have a 
couple of questions.

 The most important one is regarding the performance. It is something I also 
found using php 4 and nusoap. Most of the time for a call is being spend on 
loading the code. Aprox 0.25 sec per code line. This could be a problem if 
you have a lot of code for your server. Why Apache is loading all the code for 
each call? Is It possible to configure Apache to load the Soap Server just once?

 Second one is regarding wsdl generation. I unsuccessfully tried to find a tool 
to do it. I gave a try to Webservice Helper (jool.nl) and I didn't find the 
result convenient for my purpose. Is there any simple and useful tool to 
automatic generate the wsdl? I finally did it manually from scratch.

Thank you very much in advance.
Kind regards,
 Victor.


Re: [PHP] DOM: browse childnodes but not recursively

2005-05-30 Thread Victor Spång Arthursson


28 maj 2005 kl. 19.32 skrev Jared Williams:

childNodes contains the textnodes too, in this case the whitespace  
between each of element.




So, to put it in short words; how do I do to browse the
content of the element id=5 withuot doing it recursively? I
want to receive a list when I call childNodes (or equivalent)
that gives me the elements with id 51-56, and a length of 6.




for($child = $elements-item(0)-firstChild; $child; $child =  
$child-nextSibling)

if ($child-nodeType == XML_ELEMENT_NODE)
echo $child-getAttribute('id'), \n;


Thanks for the answer!

It doesn't really work in my case, since I'm trying to create a  
recursive function according the following:


1. I perform a search using xPath and get a search result as a  
DOMNodeList.


2. This list I send to a function that takes it as input, and whats  
function is to create a multidimensional array.


3. Foreach item in the list I check if it has any children.

4. If so, I do the recursive call, with the list of children as input.

So far so good, but when I come to the second loop, when the input is  
the list from the childNodes, everything stops working...


Sincerely

Victor


[PHP] DOM: browse childnodes but not recursively

2005-05-27 Thread Victor Spång Arthursson

Ciao!

I really hope someone can help me on this, since I have been putting  
in to much time in it now, and I have to show off some results ;)


The problem is that I can't browse nodelists in only one dimension,  
that is, whitout getting the sub-nodes of the nodes.


My XML reads:

element id=5
element id=51Still got the blues/element
element id=52Gary Moore/element
element id=53
element id=9
element id=531Maggie May/element
element id=532Rod Stewart/element
element id=533UK/element
element id=534Pickwick/element
element id=5358.50/element
element id=5361990/element
/element
   /element
element id=54Virgin records/element
element id=5510.20/element
element id=561990/element
/element

I get this as a DOMNodeList in the variable $elements. I will write  
some examples, to describe my problem.


echo $elements-length;
// outputs 1

var_dump($elements);
// outputs object(DOMNodeList)#5 (0) { }

var_dump($elements-item(0)); // contents of element with id=5
// outputs object(DOMElement)#4 (0) { }

Here I come to the problem. What I want is to get a list of the 6  
elements inside element id=5, but not with child-childs.


echo $elements-item(0)-childNodes-length;
// Outputs 13!

So, to put it in short words; how do I do to browse the content of  
the element id=5 withuot doing it recursively? I want to receive a  
list when I call childNodes (or equivalent) that gives me the  
elements with id 51-56, and a length of 6.


Really really thankful for any input on the matter

Sincerely

Victor

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



[PHP] Impossible to list attributes of xml-element?

2005-05-26 Thread Victor Spång Arthursson

Ciao!

I'm selecting an element in the xml using xpath. I know there is only  
one element matching the xpath-query, but still I get the result as a  
list. Nevermind.


This list is of the type domnodelist, on which only one action is  
allowed:  item()


Selecting [xpath-result]-item(0) gives me the only element in the  
result in the form of a domelement. This domelement should have a lot  
of attributes, but I cant find no way to get some kind of list over  
those attributes, to work further with.


Could someone please point me in the same direction?

Sincerely

Victor

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



[PHP] page redirect question

2004-11-09 Thread Victor C.
Hi,

Is there anyway to redirect php page other than using
HEADER(LOCATION:URL) ?
Header can only be called if nothing is written to HTML... Is there anyway
around it?

Thanks,

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



[PHP] php array question

2004-11-01 Thread Victor C.
Hi,
I have a line of php that I don't really understand.

foreach($this-orders as $OrderID = $value) {
echo $OrderID.BR;
$OrderObject =$this-orders[$OrderID=$value];
echo $OrderObject-OrderID.--all the sameBR;
}

I know that $this-orders is an array of order objects.

the result i get from this is:

line1. 388--OrderID.
line2. 389--all the same
line3. 389--OrderID.
line4. 389--all the same

I'm really confused about why line 1 and line 3 have different OrderID, but
line 2 and 4 have the same... I've been trying to fix this bug for 3 hrs
with no luck.
Any help would be really appreciated..

Thanks a lot

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



[PHP] Re: php array question

2004-11-01 Thread Victor C.
But why would the this line generate different OrderID on lines 1 and 3?
Ben Ramsey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Victor C. wrote:
  $OrderObject =$this-orders[$OrderID=$value];

 This line is confusing. $OrderID=$value is either a typo or is just
 plain wrong. It looks like what it's meant to say is:

 $OrderObject = $this-orders[$OrderID];

 But this will just set $OrderObject equal to $value, so you should just
use:

 $OrderObject = $value;

 Try that and see if it works.

 --
 Ben Ramsey
 Zend Certified Engineer
 http://benramsey.com

 ---
 Atlanta PHP - http://www.atlphp.org/
 The Southeast's premier PHP community.
 ---

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



[PHP] Re: php array question

2004-11-01 Thread Victor C.
I did a print_r(array_values)before calling the codes that had errors in
it.. the following content is contained in $this-orders;

Array ( [0] = order Object ( [UserObject] = user Object ( [UserID] =
E2401 [Pass] = [IsValid] = 1 [UserType] = AT [fonthtml] = [footerfile]
= resources/footer.php [headerfile] = resources/header.php [Email] =
[EMAIL PROTECTED] [FirstName] = Dennis [LastName] = 5
[Salutation] = [Phone] = 123-456-7890 [Fax] = 321-123-4567 [Address1] =
555 Testing Avenue [Address2] = Test 200 [City] = Orlando [State] = FL
[Zip] = 12345 [DisplayName] = 52II Rfc [Region] = WEST [OSJ] = 1
[Series7] = 1 [OSJAddress1] = Changed 9:55 Am [OSJAddress2] = [OSJCity]
= Des Moines [OSJState] = IA [OSJZip] =  [OSJPhone] = 43143431214
[existsindb] = 1 [firsttime] = 1 ) [OrderID] = 392 [CartID] = 90
[TemplateID] = 1 [UserID] = E2401 [completed] = 1 [ordername] = 4312
[existsindb] = 1 [cost] = 3665.2 [totalcopies] = [directmailquantity] =
[directshippingmethod] = [overprintquantity] = 4312
[overprintshippingmethod] = [rushoption] = Standard [dl1000instancefile]
=
0|C:/Inetpub/wwwroot/printsite/|0|C:/Inetpub/wwwroot/printsite/|0|0|Dennis
J. Cunningham II Rfc|Enter your company:|123-456-7890|321-123-4567|Changed
9:55 Am, Des Moines, IA,
|C:/Inetpub/wwwroot/printsite/|FALL|2004|C:/Inetpub/wwwroot/printsite/ae
gonresources/stockimages/highres/ISI_logo.jpg|Securities offered through
InterSecurities, Inc. Member NASD, SIPC and Registered Investment
Advisor|Changed 9:55 Am, Des Moines, IA, |C:/Inetpub/wwwroot/printsite/
[flashvars] = 0||0||0|0|341431|Enter your
company:|123-456-7890|321-123-4567|Changed 9:55 Am, Des Moines, IA,
||FALL|2004|http://69.44.155.247/printsite/aegonresources/stockimages/lo
wres/ISI_logo.jpg|Securities offered through InterSecurities, Inc. Member
NASD, SIPC and Registered Investment Advisor|Changed 9:55 Am, Des Moines,
IA, | [dbname] = [dbpath] = [age] = [zip] = [gender] = [income] =
[home] = [homevalue] = [length] = [children] = [childrenAge] =
[marital] = [networth] = [stock] = [listquantity] = )

[1] = order Object ( [UserObject] = user Object ( [UserID] = E2401 [Pass]
= [IsValid] = 1 [UserType] = AT [fonthtml] = [footerfile] =
resources/footer.php [headerfile] = resources/header.php [Email] =
[EMAIL PROTECTED] [FirstName] = Dennis [LastName] = Cunningham
[Salutation] = [Phone] = 123-456-7890 [Fax] = 321-123-4567 [Address1] =
555 Testing Avenue [Address2] = Test 200 [City] = Orlando [State] = FL
[Zip] = 12345 [DisplayName] = Dennis J. Cunningham II Rfc [Region] = WEST
[OSJ] = 1 [Series7] = 1 [OSJAddress1] = Changed 9:55 Am [OSJAddress2] =
[OSJCity] = Des Moines [OSJState] = IA [OSJZip] =  [OSJPhone] =
43143431214 [existsindb] = 1 [firsttime] = 1 ) [OrderID] = 392 [CartID]
= 90 [TemplateID] = 1 [UserID] = E2401 [completed] = 1 [ordername] =
4312 [existsindb] = 1 [cost] = 3665.2 [totalcopies] =
[directmailquantity] = [directshippingmethod] = [overprintquantity] =
4312 [overprintshippingmethod] = [rushoption] = Standard
[dl1000instancefile] =
0|C:/Inetpub/wwwroot/printsite/|0|C:/Inetpub/wwwroot/printsite/|0|0|Dennis
J. Cunningham II Rfc|Enter your company:|123-456-7890|321-123-4567|Changed
9:55 Am, Des Moines, IA,
|C:/Inetpub/wwwroot/printsite/|FALL|2004|C:/Inetpub/wwwroot/printsite/ae
gonresources/stockimages/highres/ISI_logo.jpg|Securities offered through
InterSecurities, Inc. Member NASD, SIPC and Registered Investment
Advisor|Changed 9:55 Am, Des Moines, IA, |C:/Inetpub/wwwroot/printsite/
[flashvars] = 0||0||0|0|432141 II Rfc|Enter your
company:|123-456-7890|321-123-4567|Changed 9:55 Am, Des Moines, IA,
||FALL|2004|http://69.44.155.247/printsite/aegonresources/stockimages/lo
wres/ISI_logo.jpg|Securities offered through InterSecurities, Inc. Member
NASD, SIPC and Registered Investment Advisor|Changed 9:55 Am, Des Moines,
IA, | [dbname] = [dbpath] = [age] = [zip] = [gender] = [income] =
[home] = [homevalue] = [length] = [children] = [childrenAge] =
[marital] = [networth] = [stock] = [listquantity] = ) ) 1Object--value.


391--OrderID.
392--going crazy
Object--value.
392--OrderID.
392--going crazy



Ben Ramsey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Ben Ramsey wrote:
  Victor C. wrote:
 
  $OrderObject =$this-orders[$OrderID=$value];
 
 
  This line is confusing. $OrderID=$value is either a typo or is just
  plain wrong. It looks like what it's meant to say is:
 
  $OrderObject = $this-orders[$OrderID];
 
  But this will just set $OrderObject equal to $value, so you should just
  use:
 
  $OrderObject = $value;
 
  Try that and see if it works.
 

 Nevermind. I read that wrong. $this-orders is an array of objects, like
 you said, which I glanced over too quickly.

 My statement above still holds, though. $this-orders[$OrderID=$value]
 still appears to be a typo to me. It might supposed to be:

 $OrderObject = $this-orders[$OrderID]

 which will return the order object at $OrderID location in the array
 ($OrderID being

[PHP] Re: php array question

2004-11-01 Thread Victor C.
Hi Ben,
I tried your portion of code and find out what was wrong... Apparently I
used  in adding order to the array and that was messing things up...
Everything is working now.
Thanks for all the help


Victor C. [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I did a print_r(array_values)before calling the codes that had errors
in
 it.. the following content is contained in $this-orders;

 Array ( [0] = order Object ( [UserObject] = user Object ( [UserID] =
 E2401 [Pass] = [IsValid] = 1 [UserType] = AT [fonthtml] = [footerfile]
 = resources/footer.php [headerfile] = resources/header.php [Email] =
 [EMAIL PROTECTED] [FirstName] = Dennis [LastName] = 5
 [Salutation] = [Phone] = 123-456-7890 [Fax] = 321-123-4567 [Address1]
=
 555 Testing Avenue [Address2] = Test 200 [City] = Orlando [State] = FL
 [Zip] = 12345 [DisplayName] = 52II Rfc [Region] = WEST [OSJ] = 1
 [Series7] = 1 [OSJAddress1] = Changed 9:55 Am [OSJAddress2] = [OSJCity]
 = Des Moines [OSJState] = IA [OSJZip] =  [OSJPhone] = 43143431214
 [existsindb] = 1 [firsttime] = 1 ) [OrderID] = 392 [CartID] = 90
 [TemplateID] = 1 [UserID] = E2401 [completed] = 1 [ordername] = 4312
 [existsindb] = 1 [cost] = 3665.2 [totalcopies] = [directmailquantity]
=
 [directshippingmethod] = [overprintquantity] = 4312
 [overprintshippingmethod] = [rushoption] = Standard [dl1000instancefile]
 =
 0|C:/Inetpub/wwwroot/printsite/|0|C:/Inetpub/wwwroot/printsite/|0|0|Dennis
 J. Cunningham II Rfc|Enter your company:|123-456-7890|321-123-4567|Changed
 9:55 Am, Des Moines, IA,

|C:/Inetpub/wwwroot/printsite/|FALL|2004|C:/Inetpub/wwwroot/printsite/ae
 gonresources/stockimages/highres/ISI_logo.jpg|Securities offered through
 InterSecurities, Inc. Member NASD, SIPC and Registered Investment
 Advisor|Changed 9:55 Am, Des Moines, IA,
|C:/Inetpub/wwwroot/printsite/
 [flashvars] = 0||0||0|0|341431|Enter your
 company:|123-456-7890|321-123-4567|Changed 9:55 Am, Des Moines, IA,

||FALL|2004|http://69.44.155.247/printsite/aegonresources/stockimages/lo
 wres/ISI_logo.jpg|Securities offered through InterSecurities, Inc. Member
 NASD, SIPC and Registered Investment Advisor|Changed 9:55 Am, Des Moines,
 IA, | [dbname] = [dbpath] = [age] = [zip] = [gender] = [income]
=
 [home] = [homevalue] = [length] = [children] = [childrenAge] =
 [marital] = [networth] = [stock] = [listquantity] = )

 [1] = order Object ( [UserObject] = user Object ( [UserID] = E2401
[Pass]
 = [IsValid] = 1 [UserType] = AT [fonthtml] = [footerfile] =
 resources/footer.php [headerfile] = resources/header.php [Email] =
 [EMAIL PROTECTED] [FirstName] = Dennis [LastName] = Cunningham
 [Salutation] = [Phone] = 123-456-7890 [Fax] = 321-123-4567 [Address1]
=
 555 Testing Avenue [Address2] = Test 200 [City] = Orlando [State] = FL
 [Zip] = 12345 [DisplayName] = Dennis J. Cunningham II Rfc [Region] =
WEST
 [OSJ] = 1 [Series7] = 1 [OSJAddress1] = Changed 9:55 Am [OSJAddress2]
=
 [OSJCity] = Des Moines [OSJState] = IA [OSJZip] =  [OSJPhone] =
 43143431214 [existsindb] = 1 [firsttime] = 1 ) [OrderID] = 392 [CartID]
 = 90 [TemplateID] = 1 [UserID] = E2401 [completed] = 1 [ordername] =
 4312 [existsindb] = 1 [cost] = 3665.2 [totalcopies] =
 [directmailquantity] = [directshippingmethod] = [overprintquantity] =
 4312 [overprintshippingmethod] = [rushoption] = Standard
 [dl1000instancefile] =
 0|C:/Inetpub/wwwroot/printsite/|0|C:/Inetpub/wwwroot/printsite/|0|0|Dennis
 J. Cunningham II Rfc|Enter your company:|123-456-7890|321-123-4567|Changed
 9:55 Am, Des Moines, IA,

|C:/Inetpub/wwwroot/printsite/|FALL|2004|C:/Inetpub/wwwroot/printsite/ae
 gonresources/stockimages/highres/ISI_logo.jpg|Securities offered through
 InterSecurities, Inc. Member NASD, SIPC and Registered Investment
 Advisor|Changed 9:55 Am, Des Moines, IA,
|C:/Inetpub/wwwroot/printsite/
 [flashvars] = 0||0||0|0|432141 II Rfc|Enter your
 company:|123-456-7890|321-123-4567|Changed 9:55 Am, Des Moines, IA,

||FALL|2004|http://69.44.155.247/printsite/aegonresources/stockimages/lo
 wres/ISI_logo.jpg|Securities offered through InterSecurities, Inc. Member
 NASD, SIPC and Registered Investment Advisor|Changed 9:55 Am, Des Moines,
 IA, | [dbname] = [dbpath] = [age] = [zip] = [gender] = [income]
=
 [home] = [homevalue] = [length] = [children] = [childrenAge] =
 [marital] = [networth] = [stock] = [listquantity] = ) )
1Object--value.


 391--OrderID.
 392--going crazy
 Object--value.
 392--OrderID.
 392--going crazy



 Ben Ramsey [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Ben Ramsey wrote:
   Victor C. wrote:
  
   $OrderObject =$this-orders[$OrderID=$value];
  
  
   This line is confusing. $OrderID=$value is either a typo or is just
   plain wrong. It looks like what it's meant to say is:
  
   $OrderObject = $this-orders[$OrderID];
  
   But this will just set $OrderObject equal to $value, so you should
just
   use:
  
   $OrderObject = $value;
  
   Try that and see if it works.
  
 
  Nevermind. I read

[PHP] PHP and send XML

2004-10-28 Thread Victor C.
Hi,

I'm trying to pass XML file from Site  A to Site B for Site B to parse.
Site B is maintained by other company, so I only need to worry about sending
over the XML file. I've been hinted that fsockopen() can do the job.

I've done the following through PHP:

$port=80;
$host=134.134.134.134
$data=

POST /folder1/ HTTP/1.0
Host: 134.134.134.134
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Content-Type: application/x-ddif
Content-Length: 301

blabla
version100/version
securityTYPE1/security
authrq
tsclient20041028065058:534Pacific Daylight TimeBR/tsclient
 appid/appid
appverappver
/authrq
profrq
localeen_CA/locale
/profrq
/blabla


then i wrote in PHP.

fclose($f);
$result=;
echo $f=fsockopen($host,$port, $errno, $errstr, 30);
fputs($f,$msg,$data);
while (!feof($f)) $result.=fread($f,32000);
fclose($f);
echo $result;

Since I still do not have the HOST info. on site B.  I'm doing testing by
setting the $host to be my own site (ie, Site A's)  host ip.
Right now when I execute the code, the page just keeps on running and
nothing shows up.. Is this how it's suppose to behave?

Thanks a lot.

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



[PHP] Millisecond in PHP

2004-10-27 Thread Victor C.
Hi,

I'm trying to get PHP to display the millisecond of current time.  I can't
find that option in Date().. Any hints?

Thanks a lot

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



Re: [PHP] Millisecond in PHP

2004-10-27 Thread Victor C.
Thank you all for answering! Really appreciate it.
John Nichel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Victor C. wrote:
  Hi,
 
  I'm trying to get PHP to display the millisecond of current time.  I
can't
  find that option in Date().. Any hints?
 
  Thanks a lot
 

 http://us4.php.net/manual/en/function.microtime.php

 --
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]

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



[PHP] Timezone

2004-10-27 Thread Victor C.
Is there a way to get PHP to display the full name of time zone?
date(t) only displays in the format of 'EDT', 'PDT', etc.. But I need the
full name of the timezone, ie. Pacific daylight saving time.
I know I can hard code all of these using switch statemetns.  I'm just
wondering if there is a function that's already build in.

Thanks

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



[PHP] file upload

2004-10-25 Thread Victor C.
Hi,

I'm trying to submit a file from index.php to index2.php. I know how to
do file upload in PHP. On index.php
I have:

FORM ACTION=index2.php METHOD=POST
 ENCTYPE=multipart/form-data
INPUT TYPE=file NAME=myfile SIZE=30
INPUT TYPE=submit NAME=Upload File
/FORM

The next page would only need to use $HTTP_POST_FILES['myfile'] to access
the submitted file.

My question is: if I already know which file I want to submit, say
file1.xml.  How can I just ask index.php
to submit file1.xml to index2.php?  Without asking the users to pick the
file to upload?

Thanks a lot in advance!

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



Re: [PHP] file upload

2004-10-25 Thread Victor C.
Thanks for answering Chris..
What if I want to send a file from my web server to another site for them to
parse?  I already know what file I want to send and I do not want to have to
select the file by doing browsing.

Chris [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 You can't, at least you SHOULDN'T. Just think about what you're asking
 for, you want to download a file from a users computer, without them
 knowing about it.

 Major security/privacy issues there that browsers try to prevent.

 Chris

 Victor C. wrote:

 Hi,
 
 I'm trying to submit a file from index.php to index2.php. I know how
to
 do file upload in PHP. On index.php
 I have:
 
 FORM ACTION=index2.php METHOD=POST
  ENCTYPE=multipart/form-data
 INPUT TYPE=file NAME=myfile SIZE=30
 INPUT TYPE=submit NAME=Upload File
 /FORM
 
 The next page would only need to use $HTTP_POST_FILES['myfile'] to access
 the submitted file.
 
 My question is: if I already know which file I want to submit, say
 file1.xml.  How can I just ask index.php
 to submit file1.xml to index2.php?  Without asking the users to pick
the
 file to upload?
 
 Thanks a lot in advance!
 
 
 

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



Re: [PHP] file upload

2004-10-25 Thread Victor C.
See... basically, I have two sites. One site provides user authentication
and another one requests the authentication. The requesting site need to
send to the authentication site its request in an XML.  The authentication
site is suppose to get the XML file using $HTTP_POST_FILES.  I'm using PHP
to dynamically generate the request XML file and I need to submit it to the
authenticating site; but I don't want to use file upload and browse
functionality, because the authentication process is suppose to be
transparent to the end users.

Again, thanx for the help and any insights would be greatly appreciated. :)
Chris [EMAIL PROTECTED]
??:[EMAIL PROTECTED]
 Server to Server transfers are a bit different. There are MANY ways to
 do it. You can put the file in the document root of one server, and
 download it with the other server. Or you could FTP the file from one
 server to the other. Just 2 examples.  And, you could even POST the file
 from one to the other.

 That solution seems a bit icky to me, but it all really depends on what
 you need. Pulling is generally easier than pushing.

 Chris

 Victor C. wrote:

 Thanks for answering Chris..
 What if I want to send a file from my web server to another site for them
to
 parse?  I already know what file I want to send and I do not want to have
to
 select the file by doing browsing.
 
 
 

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



Re: [PHP] how to execute a remote command from php [done]

2004-09-28 Thread Victor Alvarez

- Original Message - 
From: Sethi, Samir (IDS DMDS) [EMAIL PROTECTED]
To: Victor Alvarez [EMAIL PROTECTED]
Sent: Monday, September 27, 2004 5:47 PM
Subject: RE: [PHP] how to execute a remote command from php



Exactly, I had to generate keys for nobody and now I am able to execute
remote commands.

Thank you so much.
 Victor.




I think when you execute the command it is run as user nobody. You may
need to generate keys for the
nobody account and update the authorized keys on the remote system.

Samir.


-Original Message-
From: Victor Alvarez [mailto:[EMAIL PROTECTED]
Sent: Monday, September 27, 2004 12:35 PM
To: [EMAIL PROTECTED]
Subject: [PHP] how to execute a remote command from php


Hello,
 Since last week I am trying  to execute a remote machine command from
php without success. Since ssh ask for a password, I managed to use ssh
with dsa authentication so it's possible to call the remote command
without password and only with one line: ssh -l victor 192.168.129.211
-i /root/.ssh/id_dsa whoami. It works perfectly from command line but
I have nothing if I try to do the same from php: exec(ssh -l victor
192.168.129.211 -i /root/.ssh/id_dsa \whoami\,$results); $results is
empty after the execution.

I wonder if somebody could answer this question. I have found no
solution googling it.

Thank you.
Regards,
 Victor.


If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy, retain
or redistribute it. Click here for important additional terms relating to
this e-mail. http://www.ml.com/email_terms/


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



[PHP] Best way to save preferences?

2004-09-26 Thread Victor Spång Arthursson
Which is the best way to save preferences (for a site) to make them 
easily accessable for changes?

What I want is a way to save arrays and read them in again without 
having to use a database

Thankful for suggests,
sincerely
Victor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] php, mySQL query character problem

2004-09-22 Thread Victor C.
Hi,

I have a query to mysql basically saying:

 $query = select * from table1 where colum1 like '$email%';
//where $email is defined string.

When i  echo $query,  I get  the string : select * from table 1
where colum1 like 'testdata%'

If i copy paste the string into phpMyAdmin SQL, the query executes
successfully and returns one record.

However, when I just do$returnValue = QueryDatabase($query);
  echo
mysql_num_rows($returnValue);
I always get 0 for the # of records.

Does anyone know what causes this?

Also... the value i have for $email is from:
$email=explode(@,$emailAddress);

$email=$email[0];


Thanks,
Victor C.

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



Re: [PHP] very basic php mysql question

2004-09-20 Thread Victor Saldaña D.
On Mon, 20 Sep 2004 15:17:33 -0700, AMC [EMAIL PROTECTED] wrote:

 ? php

change that for ?php and try again

-- 
Victor Saldaña D.
User #330054 counter.li.org

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



[PHP] syntax questoin

2004-09-16 Thread Victor C.
Hi,
I just started with PHP.  (I used to work on ASP a lot)

What does  the syntax .= do?

i see a line of code that says

$Msg .= Test is complete

I'm thinking it means concatenate $Msg with Test is complete and then
store the new string into $Msg

Am I right?

Thanks.

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



[PHP] usage stats

2004-09-13 Thread Victor Saldaña D.
hi people,

i need to found usage stats for a paper in my work.

i found some stats, but the method is not very strong.

any link please

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



Re: [PHP] Users of RDBMS

2004-09-08 Thread Victor Saldaña D.
On Wed, 8 Sep 2004 12:01:55 -0700 (PDT), Pahlevanzadeh Mohsen
[EMAIL PROTECTED] wrote:
 Dears,
 I need to create user for MySQL.
 Please guide me..

Please RTFM

http://dev.mysql.com/doc/mysql/en/Adding_users.html

--
Victor Saldaña D.

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



Re: [PHP] PHP5, XPath and count()

2004-07-24 Thread Victor Boivie
Christian Stocker wrote:
var_dump($xpath-query(count(/catalog/cd)-item(0));

this doesn't work yet in DOM. The returned value has to be a nodeset.
Will be fixed some day ;)
Thanks, both Jason and Christian
I found something else that I think is strange.
  $dom = new DOMDocument();
  $root = $dom-createElement(test);
  $dom-appendChild($root);
  $node = $dom-createElement(foo, which entities idoes/i it 
escape  which doesn't it?);
  $root-appendChild($node);

  echo $dom-saveXML();
The result will be:
?xml version=1.0?
testfoowhich entities lt;igt;doeslt;/igt; it escape /foo/test
It stops at the , which I think is strange. It escapes the  to lt; 
and  to gt;, but not  to amp;. It would be better if it escaped none 
or all entites that can do harm.

Or what do you think?
regards,
Victor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP5, XPath and count()

2004-07-20 Thread Victor Boivie
Assume an XML file that looks like:
catalog
 cd
  ..
 /cd
 cd
  ..
 /cd
 ..
/catalog
... and that I would like to know the number of CDs. An xpath expression 
would look like count(/catalog/cd), but how do I run this expression?

$dom = new DOMDocument();
$dom-load(catalog.xml);
$xpath = new DOMXpath($dom);
var_dump($xpath-query(count(/catalog/cd)-item(0));
... returns NULL.
Any ideas?
Thanks in advance,
Victor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Want to save png to file

2004-07-19 Thread Victor Spång Arthursson
2004-07-16 kl. 15.12 skrev Jason Wong:
If you already have an image resource then calling imagepng() with a 
filename
will create and write the file for you.
Thanks!
Now my only problem is that it doesn't seem possible to use 
imagecopyresized() with a transparent png; it doesn't become 
transparent

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


[PHP] resize transparent png - impossible?

2004-07-19 Thread Victor Spång Arthursson
Hi everybody!
Is it really impossible to resize a transparent png? I've tried 
everything, but can't get the transparency (in the outputted image) to 
work either in Photoshop or in Internet Explorer (using filter)

Does anyone have some feedback on this, or is it a known bug in GD?
Sincerely
Victor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Transparent png and TrueColor?

2004-07-19 Thread Victor Spång Arthursson
Seems like the problem I'm experiencing with transparent png-files are 
that they are in TrueColor - is it not possible to create a 
trueColor-file and make it transparent?

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


Re: [PHP] Want to save png to file

2004-07-16 Thread Victor Spång Arthursson

2004-07-08 kl. 06.25 skrev Wudi:
int imagepng ( resource image [, string filename])
Back on track again!
What I don't know is how to save the file - do I read the datastream 
from imagepng and then create a file and write the stream to it?

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


[PHP] Want to save png to file

2004-07-06 Thread Victor Spång Arthursson
Hi!
Creating a transparent png using GD and PHP is (almost) no problem, but 
it's impossible to save

No matter what I try, the saved image wont remember that it's 
transparent. I suspect the reason it works on the fly is because I 
manually set the header to image/png, but if I try so save the stream 
to a file, the transparency disappears

Please please please somebody help!
Sincerely
Victor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Resize an image with transparency

2004-06-28 Thread Victor Spång Arthursson
Hi!
I'm having big GD-problems
I want to open, resize and output a png-file with transparency.
Ad I have undestood it, the steps to follow is:
* open the image
* read the size
* create new image
* copy the image resized/resampled to the new image
* output the new image
But the problem that occurs is that the new image is not transparent, 
even though I specify

ImageAlphaBlending($img_des,true);
The only way I've succeeded to make the background transparent is to 
fill the image with a color and explicitly tell GD that that color 
(black for example) is transparent. But then all black pixels in the 
finished image, the one for output, become transparent as well, which 
is not what I want

So, please, deadline before vacation, help if you know!
Sincerely
Victor Spng Arthursson / Denmark-Sweden
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Alternative to freetype?

2004-06-03 Thread Victor Spång Arthursson
Hi!
Since it's almost impossible to find a web server which has freetype 
installed, I wonder which the alternatives are to put text on an 
image?

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


[PHP] strange urlencode/decode problem

2004-04-21 Thread Victor Spång Arthursson
Perhaps I'm tired, perhaps I've missed something obvious, but I can't 
get this simple thing which I practically does every week to work

Ok, here is what I do:

?php

$foo = urlencode(Delete from whatever where ditten = 'datten');
echo 'a href=foo.php?strSQL=' . $foo . 'Click here to test/a';
?

I sidan foo.php skriver jag:

?php

echo urldecode($_GET[strSQL]);

?

and gets the result:

Delete from whatever where ditten = \'datten\'

The question is why PHP escapes the single qoutes? This has never 
happened to me before, except if I have been using addslashes() or 
similiar functions

And they occur even if I don't urlencode at all

Why!?!?!?!?

Sincerely

Victor Spng Arthursson - Copenhagen

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


[PHP] function for backing up mysql

2004-04-14 Thread Victor Spång Arthursson
Hi!

Wonder if anyone knows if there somewhere out there are any good 
functions that streams out data from mysql as a sql-file, like 
phpmyadmin does?

The best would be one which I told which database and which tables to 
dump, and which directly stared streaming the data

Sincerely

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


Re: [PHP] function for backing up mysql

2004-04-14 Thread Victor Spång Arthursson

2004-04-14 kl. 09.57 skrev Hawkes, Richard:
PhpMyAdmin (www.phpmyadmin.net) is a great MySQL admin tool, and 
utilises the MySQL backup functions.
Yes, and it is the same functionability I want. But I want a 
php-function to implement in various scripts I have, and since I 
probably aint the first to want this, I thought that there perhaps were 
some good scripts out there to use.

Sincerely

Victor

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


Re: [PHP] function for backing up mysql

2004-04-14 Thread Victor Spång Arthursson
2004-04-14 kl. 11.26 skrev Burhan Khalid:

Just redirect the output from mysqldump.

mysqldump -u username -ppassword database  dump.sql

and then send that dump.sql file. Or, you can just read the output 
from the mysqldump command directly, using output buffering to make 
sure your script doesn't just stall (if its a big database).
But the database is on a hotel to which I have no remote access to 
mysql My client want to be able to click a link and get a backup 
file in return

Is it possible to redirect the output from mysqldump using only php, 
and with no command line access?

Sincerely

Victor

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


[PHP] SNMP PLEASE HELPP!!!!!!!!!!

2004-03-30 Thread Victor
?
 $a = snmpwalk(216.18.74.170, public, );


  for($i=0; $i551; $i++)
  {
   print $a[$i];
   print br;
  }
  ? This is my code and i recieve a huge list. Some of it i understand but
i can't understand the OID part and all the ips there. Can you please help
me Thanks

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



[PHP] Major problems trying to use load data local infile

2004-02-24 Thread Victor Spång Arthursson
Hi!

Been trying all day to be able to fire off a load data local infile 
using php, but haven't yet succeded

The setup is as follows: the client should upload a .csv-file to the 
webserver. Here, php shall issue a load data local infile-statement to 
load the data into a mysql-database.

The database, on the other hand, is located on another server, which is 
the reason to do a local insert

So far I haven't managed to get it to work, other than from the 
terminal mysql client.

My SQL is as follows (works in the client, locally, when I connect to 
the remote server):

LOAD DATA LOCAL INFILE 
'd:\\home\\host\\www\\test\\ejerskifte\\output.txt' INTO TABLE table 
FIELDS TERMINATED BY '\\t' ESCAPED BY '\\' LINES TERMINATED BY '\r'

PHP-code:

?php
include(includes/settings.php);
include(includes/db_connect_and_choose.php);
$strSQL = LOAD DATA LOCAL INFILE ' . 
addslashes(realpath(output.txt)) . ' INTO TABLE table FIELDS 
TERMINATED BY ' .addslashes('\t') . ' ESCAPED BY '\\' LINES 
TERMINATED BY ' . '\r' . ';
echo $strSQL;
mysql_query($strSQL) or die (mysql_error());
?

Would be very thankful if anyone had any input on this,

sincerely

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


[PHP] PDFlib, transparency and TIFF images

2004-02-04 Thread Victor Spång Arthursson
Hi everyone - hope there's someone good at PDFlib out there

I'm trying to use a picture, a TIFF image, with transparency, in a PDF 
created by a PHP-script...

The manual says that only explicit transparency can be used when 
working with TIFF images, and that this operation requires two steps 
But then the manual loses me, and I don't understand what the two 
steps that seems to be required actually meens

Isn't it sufficiant to have a TIFF image with transparency, or do I 
have to have some kind of second image and use that as some kind of 
mask to acquire transparency effects? Will this, if so, require two 
image files per image instead as one?

Hope this is not OT, if so, i apologize

Sincerely

Victor Spng Arthursson
Sweden / Denmark
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Regexp help (simple)

2004-01-22 Thread Victor Spång Arthursson
2004-01-22 kl. 10.40 skrev Dagfinn Reiersl:

I assume you mean:

$test = split_bokid(12345);
Yes!

I don't know. It works fine on my computer. The letters display 
correctly on the command line and even in Mozilla.
Hmmm try the following: 
http://adversus.no-ip.com/function_split_bokid.php?bokid=12345

Sincerely:

Victor

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


Re: [PHP] Regexp help (simple)

2004-01-21 Thread Victor Spång Arthursson
2004-01-20 kl. 10.41 skrev Dagfinn Reiersl:

[EMAIL PROTECTED] wrote:

$string = 'ab12345-1';
if (preg_match('/^([a-z]{2,3})([0-9]{4,5}(\-[0-9]{1,2}){0,1})$/i',
$string,
$m='')) {
  echo $m[1]; // - ab
  echo $m[2]; // - 12345-1
}
g. martin luethi

You can replace {0,1} with a question mark and [0-9] with \d (digit).  
Also, and I
think this is not in the PHP documentation, you can use POSIX  
character classes
inside the brackets. If you want to match alphabetical characters  
including
the Swedish and various other international ones like  or , you can  
use [:alpha:].
You may not need it in this example, but it's excellent for  
internationalized regex matching.

if (preg_match('/^([[:alpha:]]{2,3})(\d{4,5}(\-\d{1,2})?)$/i',
Have been playing around a bit with this code, but I can't get it to  
work with international characters For example, if I feed my function:

	function split_bokid($bokid)
	{
		if  
(preg_match('/^([a-z]{2,3})([0-9]{4,5}(\-[0-9]{1,2}){0,1})$/ 
i',$bokid,$m='')) {
			return $m;
		}
		else
		{
			return false;
		}
	}

returns, with the following code:

$test = split_bokid(123);
echo $test[1];
echo $test[2];
the values:

12345
So, is there any way I can set the encoding on the incoming values,  
which will come from url's and databases, so that they don't fuck up?

Sincerely,

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


[PHP] Regexp help (simple)

2004-01-20 Thread Victor Spång Arthursson
Hi!

Anyone who could help me with this regexp problem?

I want to verify that a string is made up of 2-3 letters, (a-z + åäö, 
A-Z + ÅÖÄ), directly followed by 4 or 5 digits, which could, but may 
not, be followed by a minus and one or two digits.

Examples of valid strings:

abc12345
ABC12345
abc1234
ABC12345-1
ABC12345-01
I would also like to split them into an array consisting of 2 elements;

[0] = the first 2 or 3 letters
[1] = the rest
Example:

string = ab12345
[0] = ab
[1] = 12345
string = åäö1234-66
[0] = åäö
[1] = 1234-66
Lots of thanks in advance,

sincerely

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


Re: [PHP] connecting PHP to MS Access

2004-01-20 Thread Victor Spång Arthursson
Export the data you are interested in as comma separated file.

Then use the LOAD DATA INFILE - command in mysql, via the terminal or 
phpmyadmin.

From the manual:

13.1.5 LOAD DATA INFILE Syntax

LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name.txt'
[REPLACE | IGNORE]
INTO TABLE tbl_name
[FIELDS
[TERMINATED BY '\t']
[[OPTIONALLY] ENCLOSED BY '']
[ESCAPED BY '\\' ]
]
[LINES
[STARTING BY '']
[TERMINATED BY '\n']
]
[IGNORE number LINES]
[(col_name,...)]
Read more here: http://www.mysql.com/doc/en/LOAD_DATA.html

Sincerely

Victor

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


Re: [PHP] Re: XML, strings and foreign (swedish/danish) characters

2003-12-04 Thread Victor Spång Arthursson
2003-12-03 kl. 11.18 skrev Victor Spng Arthursson:

Temporarely solved the problem using substring to trim the crap-chars 
away, but I'ld prefer to solve it in a more beautiful way, but perhaps 
this behaviour is a bug and therefore not possible to solve in any 
other way
But do we think it works when uploaded to the production server? No It 
runs php on Wintendo though, but shouldn't make any difference - 
should it?

2 days just to apply a xsl-stylesheet on a xml file!? :(

If anyone successfully has succeeded doing this, please give me some 
hints.

Sincerely

Victor

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


Re: [PHP] Re: XML, strings and foreign (swedish/danish) characters

2003-12-04 Thread Victor Spång Arthursson
Here is the error message, that the code produces:

http://tosti.dk/xml/error.php

And here is a copy of the code:

http://tosti.dk/xml/error.txt

I really cant figure what is wrong, especially not since it works on 
the dev-server and the outputted xml is valid, at least as far as IE 
concerns

Sincerely

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


[PHP] Re: XML, strings and foreign (swedish/danish) characters

2003-12-03 Thread Victor Spång Arthursson
2003-12-02 kl. 12.23 skrev Manuel Lemos:

You just need to use the proper input/output encodings.
Doesn't work at all

The code

// Prepare the content of the xml-file to go to the xsl-parser
$xml = str_replace(?, chr(63), $contents);
$xml = str_replace(empty/, $kurt, $xml);
$xml = trim($xml);
$xml = utf8_encode($xml);
echo $xml;

makes the string
?xml version=1.0 encoding=utf-8?

become

?xml version=1.0 encoding=utf-8?

And the crap in fron of the string, which seems to come from nowhere, 
makes the parser complain about not well formed markup in the 
xml-source

Regards,

Victor

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


Re: [PHP] Re: XML, strings and foreign (swedish/danish) characters

2003-12-03 Thread Victor Spång Arthursson
2003-12-02 kl. 22.08 skrev Manuel Lemos:

The code
// Prepare the content of the xml-file to go to the xsl-parser
$xml = str_replace(empty/, $tempxml, $xml);
$xml = trim($xml);
$xml = utf8_encode($xml);
echo $xml;
makes the string
?xml version=1.0 encoding=utf-8?
become
?xml version=1.0 encoding=utf-8?
And the crap in fron of the string, which seems to come from nowhere, 
makes the parser complain about not well formed markup in the 
xml-source
I think it does not make any sense to do what you are doing. You 
should only encode XML data or attribute values. You should not encode 
the whole XML document.
Well, I have some xml in which I want to place som new xml-data, just 
for the specific output, which I does by replacing an empty dummy-tag.

After this, I want to send the xml to the parser.

Anyway, if you try this class, you can see that it generates correct 
XML code in UTF or even ISO-8859-1.
Well, but I don't want to download and evaluate classes, especially 
since they tend to be big and I just want to be able to do this with 
the few lines of code that should be enought

Should it really be this troublesome working with XML from PHP?

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


Re: [PHP] Re: XML, strings and foreign (swedish/danish) characters

2003-12-03 Thread Victor Spång Arthursson
2003-12-03 kl. 10.22 skrev Victor Spng Arthursson:

makes the string

?xml version=1.0 encoding=utf-8?

become

?xml version=1.0 encoding=utf-8?
Temporarely solved the problem using substring to trim the crap-chars 
away, but I'ld prefer to solve it in a more beautiful way, but perhaps 
this behaviour is a bug and therefore not possible to solve in any 
other way

Sincerely

Victor

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


[PHP] XML, strings and foreign (swedish/danish) characters

2003-12-02 Thread Victor Spång Arthursson
I'm on the point of almost giving up trying to get XML and PHP to sing 
along, but I'll throw out a question here first.

I'm having severe problems getting PHP and XML to work with XML-files 
that contains foreign characters. Doesnt matter if i type the foreign 
characters in by myself hardcoded in the PHP-script, or if I get them 
from external XML-files, or if I get them directly from the database.

utf8_encode() helps a bit, in the way that it makes the script work at 
least, but instead of the string mngde PHP outputs mngde

Is there any way to get XML to work together with PHP, or should I 
simply resign and try with ASP instead?

Very thankful for any help that points in the right direction

Sincerely

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


[PHP] include-problem

2003-12-01 Thread Victor Spång Arthursson
Hi!

I'm having a problem with including files. What I want to achieve is to 
execute a PHP-script on another server, and then to include the result 
(which will be XML-output) in another PHP-script (currently on my local 
computer).

On the server I have the file http://server.com/test/echo.php with the 
content

---
?php
echo 'xyz';
?
---
Locally I've a file with the following content:

---
?php
echo !!!;
include (http://server.com/test/echo.php;);
echo ???;
?
---
I was expecting the output from my locally testfile to be something 
like:

---
!!!???
---
but rather it is

---
!!!xyz???
---
I've also tried with a $fp = readfile(http) with the same result, 
which is output of the echo-statement in the remote file which I am 
expecting to be evaluated remotely.

How can I do to include the PHP-script and have it to be ran before it 
is included?

Sincerely

Victor

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


Re: [PHP] easy and simple way to read xml into array

2003-11-18 Thread Victor Spång Arthursson
2003-11-17 kl. 17.06 skrev Chris Hayes:

Need to read a xml-file into an array, but searching around I havent 
found a way that's easy and simple Arent there an easy way in PHP to 
accomplish this?
have you been at http://se.php.net/xml ?
Well, I've, and I also have to say that the XML-support in PHP lacks 
any usability

2 pages code later I still cannot get it to work, and the manual is 
pretty thin on this chapter...

For example, I've the following XML:

		ingrediens
			ingrediensnummer1234/ingrediensnummer
			maengde3,4/maengde
			enhedkg/enhed
		/ingrediens

Here I thought that the startelementfunction should be called upon 
every start tag, the character_data_handler on every text string and 
the endelement function on every endelement.

But what seems to happen is that the character data handler is called 
to randomly number of times, and if I output the current element every 
time it gets called I get the following output for the xml above:

ingrediens
ingrediens
ingrediens
ingrediensnummer
ingrediensnummer
ingrediensnummer
ingrediensnummer
maengde
maengde
maengde
maengde
enhed
enhed
enhed
enhed
enhed
enhed
What I expected to get was:

ingrediensnummer
maengde
enhed
So, couldnt anyone please bring some clarity into this matter?

Sincerely

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


[PHP] easy and simple way to read xml into array

2003-11-17 Thread Victor Spång Arthursson
Hi!

Need to read a xml-file into an array, but searching around I havent 
found a way that's easy and simple Arent there an easy way in PHP to 
accomplish this?

Sincerely

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


[PHP] XML and PHP

2003-11-06 Thread Victor Spång Arthursson
Hi!

I've been looking at the XML-parserfunctions in the manual, and they 
seems nice enough.

But I'm currently in a project where there is need to read from, write 
to and edit in XML-files, in some smart way. Our ISP is supporting the 
following:

xml

XML Support
active
XML Namespace Support
active
EXPAT Version
1.95.6
I suppose the answer to my questions lies in the expath-part, but where 
do I start, where can I read more about the above expat and which is 
the best approach for me in this project? We're going to import som 
data from Navision, XML-formatted, to postgresql, and meanwhile 
documents are edited they are, until finished, going to be saved as 
xml-documents on the server.

Sincerely

Victor

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


Re: [PHP] Re: XML and PHP

2003-11-06 Thread Victor Spång Arthursson
2003-11-06 kl. 13.42 skrev pete M:

http://www.zend.com/zend/art/parsing.php
http://www.zend.com/zend/tut/tutbarlach.php
in fact a google search for php,xml, expat, tutorial
Well, interesting articles but not really what I was searching for. I'm 
rather looking for something like the parser in Flash, which can open 
nodes like parent.nextsiebling.nextsibling

Anyone have an idea?

Sincerely

Victor

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


[PHP] replace special chars

2003-11-05 Thread Victor Spång Arthursson
Are there any good function to replace special characters, for example 
double qoutes, with something that are more html-safe?

For example:

option
label=Dekora Marilet Amerikano (9859)
value=98590
/option
The above is generated with PHP and fetched from a database 
(postgresql). I'ld like to have the double qoutes replaced with 
something else ;) There could be other strange characters as well 
that needs to be replaced, so some sort of universal function would be 
really nice to get tips on ;)

Sincerely

Victor

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


Re: [PHP] replace special chars

2003-11-05 Thread Victor Spång Arthursson

2003-11-05 kl. 16.07 skrev Pavel Jartsev:
Try htmlspecialchars() and/or htmlentities().
htmlentities() did it best!

Thanks,

/.v

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


[PHP] fetch entire mysql-result to an array immediately

2003-10-15 Thread Victor Spång Arthursson
Is that possible? The mysql_fetch_array fetches the result by one row 
each time, but I dont want to iterate through a result but only just 
fetch it right away

Regards

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


[PHP] provide flag -X when connecting to mysql

2003-10-13 Thread Victor Spång Arthursson
Using the command line client when connecting to mysql makes it 
possible to provide the flag -X to get the result as XML directly 
from mysql.

What I wonder is if its possible in some way to provide this flag via 
php to get the result as it appears in the command line client, that 
is, as xml?

Best regards from Copenhagen/Malmoe

Victor

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


Re: [PHP] provide flag -X when connecting to mysql

2003-10-13 Thread Victor Spång Arthursson

2003-10-13 kl. 16.39 skrev Marek Kilimajer:
No, it is not. But there are plenty of classes that can do it for you.
Can you recommend any?

Sincerely

Victor

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


[PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
Is it possible?

I have a file that takes 5 minutes to run, and I would like to be able 
to start it when loading a page. But I can't include it because it 
forces the browser to timeout

exec(script.php) doesn't seem to work

Sincerely

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


Re: [PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
måndagen den 22 september 2003 kl 14.31 skrev Jay Blanchard:

exec(php script.php); will run the script.
How does this look on a OSX/UNIX system? Can the path to php be found 
in a system variable, for convinience and portability of the script?

Sincerely

Victor

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


Re: [PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
måndagen den 22 september 2003 kl 14.52 skrev Jay Blanchard:

As usual for *nix type 'which php' which will return the path to the 
PHP executable. For portability you could then do something to the 
effect of (not tested)
which() doesn't resolve the path, but I found out it was 
/usr/local/php/bin/php.

But how do I make the call

		exec(/usr/local/php/bin/php process1.php);

so that the page from which the call is made doesnt wait for the result 
but instead just continues?

Sincerely,

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


Re: [PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
mndagen den 22 september 2003 kl 15.04 skrev Jay Blanchard:

use  (not tested, but runs other processes as background processes)

		exec(/usr/local/php/bin/php process1.php );
Think that works as well; my solution was  /dev/null 

Now the big question is if I will get it to work on a windows-server 
using exec(php script.php args NUL) ;)

Sincerely

Victor

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


Re: [PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
Ok, it works fine on my development server with Mac OS X. But the 
hosting server seems to be WinNT, and on this it doesnt work.

Anyone who can help me with some standard paths to php.exe? c:\php\ 
Doesnt work ;)

Sincerely

Victor

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


Re: [PHP] Start php-script with exec()?

2003-09-22 Thread Victor Spång Arthursson
måndagen den 22 september 2003 kl 16.11 skrev Marek Kilimajer:

Ask your hosting company. Are you sure they will allow you to execute 
commands? Check phpinfo - safe mode and disabled functions.
Asked them and they told it was a mistake we had php on the server - 
according to them it was either php OR asp. I quickly thanked and hung 
up.

So now the question stands to you folks on this list ;)

Sincerely

Victor

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


[PHP] posix_kill process group

2003-08-10 Thread Victor
Hi.

I am trying to use posix_kill(0, $signo); to signal children forked by 
the parent. All children seem to be in the processgroup of the parent, 
but sending either 0 or -10 does not seem to signal the children at all.

What am I doing wrong? I even tried setting the process group (didn't 
affect anything). It doesn't seem like sending the kill to 0 reaches the 
children.

Has anybody used pcntl and posix_kill with success and if so, could you 
provide me a code sniplet?

Here is my main:

   function main()
   {
  global $logfile;
  $logfile = /tmp/runner.log..date(Ymd:Hi);
  //posix_setsid();
  pcntl_signal(SIGINT,   array(runner,sig_handler_parent));
  pcntl_signal(SIGTERM,  array(runner,sig_handler_parent));
  pcntl_signal(SIGHUP,   array(runner,sig_handler_parent));
  pcntl_signal(SIGUSR1,  array(runner,sig_handler_parent));
  do {
 if ($this-numChildren = MAXCHILDREN  $this-count  0) {
$pid = pcntl_fork();
if ($pid  0) {
die(could not fork);
} elseif ($pid == 0) {
   $ret = $this-child($args);
   exit ($ret);
} else {
   $this-log(Child Started: [PID:$pid] - [JOB:test]);
   $this-numChildren++;
   // posix_setpgid($pid,posix_getpgid($this-pid));
   $this-count--;
}
 }
 // sleep(5);
 $out = pcntl_waitpid ( -1, $status, WNOHANG );
 if ($out  0) {
$this-numChildren--;
 }
  } while ($this-count  0 || $this-numChildren  1);

  echo Done \n;
   }
   function sig_handler_parent($signo)
   {
  switch($signo) {
 case SIGINT:
 case SIGUSR1;
 case SIGTERM:
 posix_kill(0, $signo);
 exit;
 break;
 case SIGHUP:
 // handle restart tasks
 echo SIGHUP\n;
 break;
 default:
 echo ANOTHER EVENT\n;
 // handle all other signals
  }
   }
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] php/GD/t1lib problem

2003-03-11 Thread Victor Spång Arthursson
God morning!

I'm creating a jpg in al folder locally on my webserver. There is no 
problems with this at all. But now I'm about to make some updates and 
have therefore made a copy of the folder just next to the original 
which is called something like foldercopy. But in this identical folder 
and subfolders GD/t1lib is not working anymore. It is the imagePsText 
thats failsError message:

Warning:  libt1 returned error 3 in 
/Users/user/Sites/katalogkopia/createjpg.php on line 124

What can be the problem? As far as I can see the folders and files have 
identical priviligies

Sincerely:

Victor

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


[PHP] Is this possible? Group related results from mysql to one field

2003-03-06 Thread Victor Spång Arthursson
Hi!

Perhaps this is a little bit of topic, but if it's not possible to fix 
directly when the result is returning from mysql I need some tips on an 
intelligent solution...

This is the problem: I'm searching the database for files and i get 
some results. In the sql I have a LIMIT to split the result up. Every 
file can have none, one or several categories associated with it. This 
is done by having an extra table between the table with the references 
to the files and the table with the categories. What I want to do is to 
get all categories associated with an file concatenated and returned in 
_one_ field together with the other data. Look below for visualisation.

I'm having this main table with references to files in it:

files
+-+-+
 |  id  |   filename   |
+-+-+
 |168 |v008-12.jpg|
+-+-+
Then I have this table to relate one file to one or several categories:

relatedtable
+-++--+
 |id   |   fromid   |   toid   |
+-++--+
 |4|   1   | 2 |
 |  257  |   2   | 2 |
+-++--+
Which lies in this table for categories:

categories
++--+
 |  id   |   categoryname   | stickword
++--+
 |   5   |   demonstrations |
 |   6   |people   |
++--+
The following sql:

SELECT DISTINCT
files.id, files.filename, categories.categoryname
FROM
files
LEFT JOIN
relatedtable
ON
files.id = relateratabell.fromid
LEFT JOIN
kategorier
ON
relatedtable.toid = categories.id
WHERE
(relatedtable.fromid IS NULL OR relatedtable.fromid IS NOT NULL)
AND
   files.stickword LIKE '%basta%' //for example
ORDER BY
filename;
Gives the following result:

+---+---+--+
 |  id  | filename |   categoryname|
+---+---+--+
 | 166| v007-86.jpg | demonstrations  |
 | 166| v007-86.jpg | people   |
 | 167| v008-03.jpg | demonstrations  |
 | 167| v008-03.jpg | people  |
+---+---+--+
This is what I expected it to, but I'ld rather get a result as this one:

+---+---+--+
 |  id  | filename |   categoryname|
+---+---+--+
 | 166| v007-86.jpg | demonstrations, people|
 | 167| v008-03.jpg | demonstrations, people|
+---+---+--+
Where the categories have been collected together into the same field, 
so that I don't get multiple rows for the same file Is this possible 
to achieve?

Many many thanks to the one who can give me some input!

Sincerely

Victor

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


[PHP] PHP on IIS session problems

2003-03-03 Thread Victor Stan
I get these errors from a simple session_start(); script.

Warning: session_start() [function.session-start]:
open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such
file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2

Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at
c:\inetpub\wwwroot\picoblog\admin.php:2) in
c:\inetpub\wwwroot\picoblog\admin.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache
limiter - headers already sent (output started at
c:\inetpub\wwwroot\picoblog\admin.php:2) in
c:\inetpub\wwwroot\picoblog\admin.php on line 2


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



RE: [PHP] PHP on IIS session problems

2003-03-03 Thread Victor Stan
Ok, thanks guys for your help, I sort of figured that's the problem, but I
didn't want to touch the ini settings without being sure, and getting some
advice from people that know. Thanks again, great help.

I made the changes, now how do I restart php? So the changes are used?

- Vic

-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 10:23 AM
To: Victor Stan; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP on IIS session problems

 I get these errors from a simple session_start(); script.

 Warning: session_start() [function.session-start]:
 open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such
 file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2

Do you have a /tmp folder on your computer? Probably not, so that's why PHP
is throwing a warning, because it can't write to a directory that doesn't
exist.

 Warning: session_start() [function.session-start]: Cannot send session
 cookie - headers already sent by (output started at
 c:\inetpub\wwwroot\picoblog\admin.php:2) in
 c:\inetpub\wwwroot\picoblog\admin.php on line 2

 Warning: session_start() [function.session-start]: Cannot send session
cache
 limiter - headers already sent (output started at
 c:\inetpub\wwwroot\picoblog\admin.php:2) in
 c:\inetpub\wwwroot\picoblog\admin.php on line 2

These are just by-products of the first error.

Set your session.save_path setting in php.ini to a folder that IIS can write
to.

---John Holmes...


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



RE: [PHP] PHP on IIS session problems

2003-03-03 Thread Victor Stan
K, thanks, I tried stopping just the web sites from the control panel, but I
guess I had to stop the whole thing and restart.

- Vic

-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 11:07 AM
To: Victor Stan; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP on IIS session problems

You need to restart IIS.

c:\ net stop iisadmin

c:\ net start w3svc

or use the control panel.

---John Holmes...

- Original Message -
From: Victor Stan [EMAIL PROTECTED]
To: 1LT John W. Holmes [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 12:54 PM
Subject: RE: [PHP] PHP on IIS session problems


 Ok, thanks guys for your help, I sort of figured that's the problem, but I
 didn't want to touch the ini settings without being sure, and getting some
 advice from people that know. Thanks again, great help.

 I made the changes, now how do I restart php? So the changes are used?

 - Vic

 -Original Message-
 From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 03, 2003 10:23 AM
 To: Victor Stan; [EMAIL PROTECTED]
 Subject: Re: [PHP] PHP on IIS session problems

  I get these errors from a simple session_start(); script.
 
  Warning: session_start() [function.session-start]:
  open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such
  file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2

 Do you have a /tmp folder on your computer? Probably not, so that's why
PHP
 is throwing a warning, because it can't write to a directory that doesn't
 exist.

  Warning: session_start() [function.session-start]: Cannot send session
  cookie - headers already sent by (output started at
  c:\inetpub\wwwroot\picoblog\admin.php:2) in
  c:\inetpub\wwwroot\picoblog\admin.php on line 2
 
  Warning: session_start() [function.session-start]: Cannot send session
 cache
  limiter - headers already sent (output started at
  c:\inetpub\wwwroot\picoblog\admin.php:2) in
  c:\inetpub\wwwroot\picoblog\admin.php on line 2

 These are just by-products of the first error.

 Set your session.save_path setting in php.ini to a folder that IIS can
write
 to.

 ---John Holmes...



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

__ 
Post your free ad now! http://personals.yahoo.ca

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



RE: [PHP] HELP PLEASE ! Need PHP Advice !!!

2003-02-27 Thread Victor Stan
First of all, are they paying you to automate or to repurpose the content
for the web? Taking a page designed for print and then automating it into
a page for the web is the wrong approach, your problem is not technical it
is a design problem. Technically it is easy, I think, does Quark not have
XML output? Or I think it is able to save document as HTML for the web too,
then if you want to automate all u have to do is make a script that
includes those pages inside a site shell. I actually wrote something like
this that one could save an html file from word and upload it and it would
be on the site, but again, I think it's a bad idea. You should NOT try to
automate this, you should look into hiring a fulltime repurposing designer,
at LEAST you should read designing Web Usability by Jacob Nielson, then
maybe u get a better idea of what you SHOULD do.

- Vic

-Original Message-
From: justin brenton [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 7:24 AM
To: [EMAIL PROTECTED]
Subject: [PHP] HELP PLEASE ! Need PHP Advice !!!

can anyone give me some good advise on how abouts I should go about
maintaining a newspaper website.

here is what is currently in place and how i want it to be managed

right now the newspapers are published in a quark file from that file
pictures have to be placed in photoshop and resized , croped and what not
and then inserted into a html page, the content i.e text is in this quark
file as well and is copied and pasted into a html file, what i want to do is
have the site automated to some extent so i do not have to be doing all this
copying and pasteing it's a total waste valueable time. what i would like to
have it some way to have a php script to take this info from the quark file
and the pictures and have them either transfered to a html page or to a
database from there i could call from the php script.



ANYONE HAVE ANY IDEAS ON A GOOD WAY TO GO ABOUT THIS ... PLEASE CONTACT ME

[EMAIL PROTECTED]

remove the NOSPAM from address



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

__ 
Post your free ad now! http://personals.yahoo.ca

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



[PHP] Best way to create a preference-file?

2003-02-13 Thread Victor Spång Arthursson
I would like to create a file that holds the preferences for a site, 
for example the name of the database, the size of thumbnail pictures 
etc… But which is the best way to do this and to access the file?

It would be nice with an xml-file, but perhaps it is an overkill… 
Anyway it must be possible to update the file in an easy way, that is, 
not rewrite it but update it…

Sincerely

Victor

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



RE: [PHP] any windows php developers out here?

2003-02-09 Thread Victor
Kk, I got it to work in apache 2.X on redhat 8.0 all I had to do is
start apache from the directory it resides in and then it work sfine,
but I will try your notes also and get it working on windows too.
Thanks, I'll see if I have more problems...

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 08, 2003 8:58 PM
To: 'Victor'; [EMAIL PROTECTED]
Subject: RE: [PHP] any windows php developers out here?

 So I guess I al looking to finding out what I need to configure IIS to
 to get the ISAPI module to work, etc.

1. Unzip the php .zip file to C:\php\

2. Copy c:\php\sapi\php4isapi.dll to c:\php\php4isapi.dll

3. Ensure the user IIS runs as, generally IUSR_computer_name, has read
permissions to C:\php\ and all subdirectories.

4. Follow directions as in the manual

5. Shut down IIS (net stop iisadmin)

6. Open up IIS control panel

7. Add ISAPI filter pointing to c:\php\php4isapi.dll

8. Add application mapping pointing to c:\php\php4isapi.dll

9. Start up IIS (net start w3svc)

That's it...

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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

__ 
Post your free ad now! http://personals.yahoo.ca

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




RE: [PHP] any windows php developers out here?

2003-02-09 Thread Victor
 So I guess I al looking to finding out what I need to configure IIS to
 to get the ISAPI module to work, etc.

1. Unzip the php .zip file to C:\php\

2. Copy c:\php\sapi\php4isapi.dll to c:\php\php4isapi.dll

3. Ensure the user IIS runs as, generally IUSR_computer_name, has read
permissions to C:\php\ and all subdirectories.

4. Follow directions as in the manual

5. Shut down IIS (net stop iisadmin)

6. Open up IIS control panel

7. Add ISAPI filter pointing to c:\php\php4isapi.dll

8. Add application mapping pointing to c:\php\php4isapi.dll

9. Start up IIS (net start w3svc)

That's it...

---John W. Holmes...

You are the best!

Thanks, BTW who is in charge of the PHP installation documentation, I
would like to slap them in the face with these instructions. I know that
IIS setup is not their domain but they are responsible for helping users
use PHP and facilitating that is made by clear documentation, this
documentation here is not perfect, but it's much more in depth and
clearer to the one who doesn't want to go to get a MSCSE degree so that
they know how to get PHP running on IIS...

- Vic

__ 
Post your free ad now! http://personals.yahoo.ca

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




[PHP] any windows php developers out here?

2003-02-08 Thread Victor
Hello, I am wondering if any of you got a reliable php and MySQL
installation (MySQL is easy) I am mostly wondering if there is a point
in tying to use windows as a development platform for PHP. I have a nice
and working red hat 8.0 installation, but I did an upgrade from 7.3 and
now apache doesn't work cuz it wants me to switch form apache 1.X to 2.X
and all I want is to erase the old apache and use the new one or erase
the new one and use the old one, whichever works. But anyway... I also
do design and I have people submit me illustrator and Photoshop files
and word docs, so for now I might have to stick to windows for work. BUT
what do u suggest? I it futile to try to get php to work in windows?
With IIS preferably so that I can play with ASP and Cold Fusion once in
a while. Please help if you are using windows with php and send me some
instructions if you feel like it, much appreciated.

- Vic

__ 
Post your free ad now! http://personals.yahoo.ca

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




RE: [PHP] any windows php developers out here?

2003-02-08 Thread Victor
I got IIS working fine, and I did I think, the steps in the php ISAPI
instaltion manual. I think. .. but when I call the php page, it tries to
download it, as far as I know that is a sign that is doesn't know how to
handle that file, whicth means that my instaltion is not that great.

So I guess I al looking to finding out what I need to configure IIS to
to get the ISAPI module to work, etc.

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 08, 2003 6:27 PM
To: 'Victor'; [EMAIL PROTECTED]
Subject: RE: [PHP] any windows php developers out here?

 Hello, I am wondering if any of you got a reliable php and MySQL
 installation (MySQL is easy) I am mostly wondering if there is a point
 in tying to use windows as a development platform for PHP. I have a
nice
 and working red hat 8.0 installation, but I did an upgrade from 7.3
and
 now apache doesn't work cuz it wants me to switch form apache 1.X to
2.X
 and all I want is to erase the old apache and use the new one or erase
 the new one and use the old one, whichever works. But anyway... I also
 do design and I have people submit me illustrator and Photoshop files
 and word docs, so for now I might have to stick to windows for work.
BUT
 what do u suggest? I it futile to try to get php to work in windows?
 With IIS preferably so that I can play with ASP and Cold Fusion once
in
 a while. Please help if you are using windows with php and send me
some
 instructions if you feel like it, much appreciated.

I've got PHP and IIS running on a production server and several
development servers with no issues. It takes all of 5 minutes to get
installed. Do you at least have IIS running yet? It's only a couple
steps after that, most of which are outlined in the manual. Contact me
off list if you want more help and let me know what point you're at
right now. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/


__ 
Post your free ad now! http://personals.yahoo.ca

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




RE: [PHP] any windows php developers out here?

2003-02-08 Thread Victor
How do I disable apache 2.0?

-Original Message-
From: Jason Sheets [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 08, 2003 6:33 PM
To: Victor
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] any windows php developers out here?

You can install PHP + Apache 1.3 on Windows pretty easily.  There are
instructions in the manual at http://www.php.net/manual and there are
also pre-constructed installers that other people make (try
www.hotscripts.com/PHP under applications).

If you just need to get apache 1.3 installed on redhat you just need to
either disable apache 2 or install apache 1.3 and make it listen on a
different port (8080 or something).  You can have both installed if you
configure them with a --prefix, something like ./configure
--prefix=/usr/local/apache13

Jason
On Sat, 2003-02-08 at 16:13, Victor wrote:
 Hello, I am wondering if any of you got a reliable php and MySQL
 installation (MySQL is easy) I am mostly wondering if there is a point
 in tying to use windows as a development platform for PHP. I have a
nice
 and working red hat 8.0 installation, but I did an upgrade from 7.3
and
 now apache doesn't work cuz it wants me to switch form apache 1.X to
2.X
 and all I want is to erase the old apache and use the new one or erase
 the new one and use the old one, whichever works. But anyway... I also
 do design and I have people submit me illustrator and Photoshop files
 and word docs, so for now I might have to stick to windows for work.
BUT
 what do u suggest? I it futile to try to get php to work in windows?
 With IIS preferably so that I can play with ASP and Cold Fusion once
in
 a while. Please help if you are using windows with php and send me
some
 instructions if you feel like it, much appreciated.
 
 - Vic
 
 __

 Post your free ad now! http://personals.yahoo.ca
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

__ 
Post your free ad now! http://personals.yahoo.ca

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




RE: [PHP] How to uncompress PHP

2003-02-08 Thread Victor
I think it's 

tar -xvf name 

-Original Message-
From: —Ñ ŒbŒQ [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 08, 2003 8:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to uncompress PHP

Hi, I am Lin.

When I execute a command

gzip -d php-4_3_0_tar.gz

on the linux. The system show the following error.

gzip: php-4_3_0_tar.gz: not in gzip format

How can I uncompress this file.

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/


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

__
Post your free ad now! http://personals.yahoo.ca

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




RE: [PHP] any windows php developers out here?

2003-02-08 Thread Victor
In GNU/Linux, chkconfig --level 35 httpd off

Wow man, that just SCREAMS apache off! How intuitive Linux is...
-
Vic

Thanks, I'll try it. 

But, what will that turn off? I have apache 1.X and apache 2.X on red
hat? I want to use either or, whichever works with the php 4.3 on red
hat. So ... what do I choose? How do I make the system use only one of
them, how do I erase the other one?

-Original Message-
From: Adolfo Bello [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 08, 2003 7:31 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] any windows php developers out here?

On Sat, 2003-02-08 at 20:18, Victor wrote:
 How do I disable apache 2.0?
In Windows, go to service-apache-manual start
In GNU/Linux, chkconfig --level 35 httpd off
-- 
__   
   / \\   @   __ __@   Adolfo Bello [EMAIL PROTECTED]
  /  //  // /\   / \\   // \  //   Bello Ingenieria S.A, ICQ: 65910258
 /  \\  // / \\ /  //  //  / //cel: +58 416 609-6213
/___// // / _/ \__\\ //__/ // fax: +58 212 952-6797
www.bisapi.com   //pager: www.tun-tun.com (# 609-6213)


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

__ 
Post your free ad now! http://personals.yahoo.ca

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




RE: [PHP] Why does this happen?

2003-02-08 Thread Victor
Maybe you should rename them differently/ or make then into an array?

-Original Message-
From: CF High [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, February 08, 2003 10:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Why does this happen?

Hey all.

Got a problem with I'm sure a simple solution::

In this test form when I submit and insert into my db, only the last
select
field get entered; i.e. in this case the day value of 25.

form name=form1 method=post action=

Year
select name=date onSelect=return check_submit()
option selected value=20022002/option
/select

Month
select name=date
option selected value=1212/option
/select

Day
select name=date
option selected value=2525/option
/select

input type=submit name=textfield

/form

Why does this happen?  In Cold Fusion I'm able to refer to the three
selects
as #date# and it returns 20021225 as expected.

Any ideas?

Thanks,

--Noah


--




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

__ 
Post your free ad now! http://personals.yahoo.ca

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




Re: [PHP] Socket error connecting to mySQL

2003-02-04 Thread victor
did u turn mysql on?

end of mysql installation output:

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root  password 'new-password'
/usr/bin/mysqladmin -u root -h 
CPE00022af118a5-CM024330008757.cpe.net.cable.rogers.com  password 
'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL = 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd / ; /usr/bin/safe_mysqld 

You can test the MySQL daemon with the benchmarks in the 'sql-bench' 
directory:
cd sql-bench ; run-all-tests

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

Bryan Lipscy wrote:
$db= @mysql_pconnect ( $DB_HOST , $DB_USER , $DB_PASS );
@mysql_select_db ( $DB_DB )  or die ( DATABASE ERROR!.mysql_error() );

Returns DATABASE ERROR!Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (2)

MySQL server exists on a Win2ksp3 box.
Apache with PHP 4.3.0 exists on a Slackware 8.1 box.

All parameters are correct.
Boxes can see each other.
All php scripts work when run on the Win2k box.


Any ideas why connecting to php/mysql would throw this error?

Bryan






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




[PHP] unexpected warnings - what do they mean? - phpMyAdmin - also postedon the phpMyAdmin mailing list...

2003-02-04 Thread victor
i am getting the following warnings after i try to inser data into some 
table cells i created. i have PHP Version 4.1.2 and MySQL 3.23.55. 
Apache 1.3.23. Redhat 7.3. oh, and i have php 4.3.0 installed, but i 
dont know how to make apche see it or use it. its ina different 
directory than the default redhat php which is what i am using now. 
anyway, anybody knwo what these warnings mean?

thanks,

- Vic

___

Warning: Undefined variable: goto in 
/var/www/html/phpMyAdmin/tbl_replace.php on line 34

Warning: Undefined variable: goto in 
/var/www/html/phpMyAdmin/tbl_replace.php on line 58

Warning: Variable passed to reset() is not an array or object in 
/var/www/html/phpMyAdmin/tbl_replace.php on line 63

Warning: Undefined variable: submit_type in 
/var/www/html/phpMyAdmin/tbl_replace.php on line 70

Warning: Variable passed to each() is not an array or object in 
/var/www/html/phpMyAdmin/tbl_replace.php on line 136

Warning: Undefined variable: table in 
/var/www/html/phpMyAdmin/tbl_replace.php on line 157

Warning: Undefined variable: db in 
/var/www/html/phpMyAdmin/tbl_replace.php on line 166

Warning: Cannot add header information - headers already sent by (output 
started at /var/www/html/phpMyAdmin/tbl_replace.php:34) in 
/var/www/html/phpMyAdmin/libraries/ob.lib.php on line 65

Warning: Cannot add header information - headers already sent by (output 
started at /var/www/html/phpMyAdmin/tbl_replace.php:34) in 
/var/www/html/phpMyAdmin/header.inc.php on line 27

Warning: Cannot add header information - headers already sent by (output 
started at /var/www/html/phpMyAdmin/tbl_replace.php:34) in 
/var/www/html/phpMyAdmin/header.inc.php on line 28

Warning: Cannot add header information - headers already sent by (output 
started at /var/www/html/phpMyAdmin/tbl_replace.php:34) in 
/var/www/html/phpMyAdmin/header.inc.php on line 29

Warning: Cannot add header information - headers already sent by (output 
started at /var/www/html/phpMyAdmin/tbl_replace.php:34) in 
/var/www/html/phpMyAdmin/header.inc.php on line 30

Warning: Cannot add header information - headers already sent by (output 
started at /var/www/html/phpMyAdmin/tbl_replace.php:34) in 
/var/www/html/phpMyAdmin/header.inc.php on line 32
Server localhost

Error

SQL-query :

INSERT INTO (
)
VALUES (
);

MySQL said:

You have an error in your SQL syntax near '() VALUES ()' at line 1


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



Re: [PHP] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...

2003-02-04 Thread victor
they the default lines of code form phpMyAdmin the newest one stable. 
just installed it today, the lines are not modified they what the devs 
made them...

- Vic

Steve Keller wrote:
At 2/4/2003 06:46 PM, you wrote:


i am getting the following warnings after i try to inser data into 
some table cells i created. i have PHP Version 4.1.2 and MySQL 
3.23.55. Apache 1.3.23. Redhat 7.3. oh, and i have php 4.3.0 
installed, but i dont know how to make apche see it or use it. its ina 
different directory than the default redhat php which is what i am 
using now. anyway, anybody knwo what these warnings mean?


It would help if we could see the affected lines of code.
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org






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




Re: [PHP] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...

2003-02-04 Thread victor
the error reportin value is marked specifically not to be touched, plus 
there are other things that are wroong like the values that i am 
inserting though the forms is not picked up...

- i will try an older relase see if it works better.

- vic

John W. Holmes wrote:
PHPMyAdmin probably requires a lower error_reporting level than you
have. You're just seeing NOTICES, not errors. Either adjust the
error_reporting in php.ini, an .htaccess file for this directory, or use
the error_reporting() function in the PHPMyAdmin script.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-Original Message-
From: victor [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 7:02 PM
To: Steve Keller
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] unexpected warnings - what do they mean? -


phpMyAdmin -


also posted on the phpMyAdmin mailing list...

they the default lines of code form phpMyAdmin the newest one stable.
just installed it today, the lines are not modified they what the devs
made them...

- Vic

Steve Keller wrote:


At 2/4/2003 06:46 PM, you wrote:



i am getting the following warnings after i try to inser data into
some table cells i created. i have PHP Version 4.1.2 and MySQL
3.23.55. Apache 1.3.23. Redhat 7.3. oh, and i have php 4.3.0
installed, but i dont know how to make apche see it or use it. its


ina


different directory than the default redhat php which is what i am
using now. anyway, anybody knwo what these warnings mean?



It would help if we could see the affected lines of code.
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org






--
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] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...

2003-02-04 Thread victor
WHOHOO!!! probme solved! (read: worked around)

i downloaded the older phpMyAdmin release and it worked perfectly!

could this be a bug in phpMyAdmin?

- Vic

victor wrote:

the error reportin value is marked specifically not to be touched, plus 
there are other things that are wroong like the values that i am 
inserting though the forms is not picked up...

- i will try an older relase see if it works better.

- vic

John W. Holmes wrote:

PHPMyAdmin probably requires a lower error_reporting level than you
have. You're just seeing NOTICES, not errors. Either adjust the
error_reporting in php.ini, an .htaccess file for this directory, or use
the error_reporting() function in the PHPMyAdmin script.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-Original Message-
From: victor [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 7:02 PM
To: Steve Keller
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] unexpected warnings - what do they mean? -



phpMyAdmin -


also posted on the phpMyAdmin mailing list...

they the default lines of code form phpMyAdmin the newest one stable.
just installed it today, the lines are not modified they what the devs
made them...

- Vic

Steve Keller wrote:


At 2/4/2003 06:46 PM, you wrote:



i am getting the following warnings after i try to inser data into
some table cells i created. i have PHP Version 4.1.2 and MySQL
3.23.55. Apache 1.3.23. Redhat 7.3. oh, and i have php 4.3.0
installed, but i dont know how to make apche see it or use it. its



ina


different directory than the default redhat php which is what i am
using now. anyway, anybody knwo what these warnings mean?




It would help if we could see the affected lines of code.
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org






--
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] unexpected warnings - what do they mean? - phpMyAdmin - also posted on the phpMyAdmin mailing list...

2003-02-04 Thread victor
And what do you know? it is. damn old redhat php.ini

. ok, no onto the next related question. i have installed php 4.30 but 
apache stilll uses the rpm default redhat php. how do i do this. also i 
remember that in the olden days i could type apachectl and control 
apache, but not so in redhat? why not?

someone please help me run the new php, thanks

- Vic

John W. Holmes wrote:
Is it a register_globals problem, then?

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-Original Message-
From: victor [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 7:48 PM
To: [EMAIL PROTECTED]
Cc: 'Steve Keller'; [EMAIL PROTECTED]
Subject: Re: [PHP] unexpected warnings - what do they mean? -


phpMyAdmin -


also posted on the phpMyAdmin mailing list...

the error reportin value is marked specifically not to be touched,


plus


there are other things that are wroong like the values that i am
inserting though the forms is not picked up...

- i will try an older relase see if it works better.

- vic

John W. Holmes wrote:


PHPMyAdmin probably requires a lower error_reporting level than you
have. You're just seeing NOTICES, not errors. Either adjust the
error_reporting in php.ini, an .htaccess file for this directory, or


use


the error_reporting() function in the PHPMyAdmin script.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your


copy


today. http://www.phparch.com/




-Original Message-
From: victor [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 7:02 PM
To: Steve Keller
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] unexpected warnings - what do they mean? -


phpMyAdmin -



also posted on the phpMyAdmin mailing list...

they the default lines of code form phpMyAdmin the newest one


stable.


just installed it today, the lines are not modified they what the


devs


made them...

- Vic

Steve Keller wrote:



At 2/4/2003 06:46 PM, you wrote:




i am getting the following warnings after i try to inser data into
some table cells i created. i have PHP Version 4.1.2 and MySQL
3.23.55. Apache 1.3.23. Redhat 7.3. oh, and i have php 4.3.0
installed, but i dont know how to make apche see it or use it. its


ina



different directory than the default redhat php which is what i am
using now. anyway, anybody knwo what these warnings mean?



It would help if we could see the affected lines of code.
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org






--
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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Strange_session-problem_with_php-file_in_img_src…

2003-02-01 Thread Victor Spång Arthursson

fredagen den 31 januari 2003 kl 18.08 skrev Chris Shiflett:



Instead of trying to tell us what the problem is, just
explain what trouble you are having. We can then tell *you*
what the problem is.


Could the problem have something to do with the fact that the function 
that returns the value of the session is called from within another 
function, and that it's defined outside this function?

Sincerely

Victor


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



Re: [PHP] Strange_session-problem_with_php-file_in_img_src…

2003-02-01 Thread Victor Spång Arthursson
Problem solved. The error came because I was calling the function 
inside another function, outside the latter it worked good. So I simply 
passed the variable with the second function - works great!

Thanks anyway for all your time trying to help me!

/V


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



[PHP] Strange session-problem with php-file in img src

2003-01-31 Thread Victor Spång Arthursson
Hi everyone!

I'm having a severe session problem. I'm having a file called 
createjpg.php that creates a jpg-image and returns it as a picture, 
with the correct header. This file is included on another php-file like 
this:

img src=createjpg.php?id=xyz

What I need the file createjpg.php to do is to check wether or not the 
user is logged in and if she is so, she should be able to see some 
other picture or something that will be processed in the file 
createjpg.php when it executes.

The problem is that since the file createjpg.php is'nt loaded in the 
browser as and ordinary file, it doesnt recognizes the session 
variable… I think it's because that the web server loads it or 
something like that and it does not know that a session variable 
belongs to the user who loaded the file with the img scr on…

Please, help! How can I overcome this?

Best regards,

Victor

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



Re: [PHP] Strange_session-problem_with_php-file_in_img_src…

2003-01-31 Thread Victor Spång Arthursson

fredagen den 31 januari 2003 kl 18.08 skrev Chris Shiflett:


Instead of trying to tell us what the problem is, just
explain what trouble you are having. We can then tell *you*
what the problem is.


Ok, first I have the function

	session_start();

	function return_session_raettighet($session = null)
	{
		if ( isset($session) )
		{
			return $session;
		}
		else
		{
			return 0;
		}
	}

I ask this function to return the value of a specifik session, that is, 
if the user is logged in the value is at least 10.

Then I perform

	if(return_session_raettighet($HTTP_SESSION_VARS[session_raettighet]) 
 10)
	{
		ImageAlphaBlending($img_des, true);
		$im_copy = imagecreatefrompng(const_picture_dir . /copyright.png);
		$copy_imgsize = GetImageSize(const_picture_dir . /copyright.png);
		$copyxloc = (($imgwidth + (2*$kant))/2)-($copy_imgsize[0]/2);
		$copyyloc = (($imgheight + (2*$kant))/2)-($copy_imgsize[1]/2);
		imagecopy($img_des, 
$im_copy,$copyxloc,$copyyloc,0,0,$copy_imgsize[0], $copy_imgsize[1]);
	}

this means, that if the user is not logged in, a copyright © sign will 
appear over the image.

And this fails… Don't know why because the same code works on other 
pages…

Sincerely

Victorr


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



[PHP] php ISA v.s. php CGI

2003-01-31 Thread Victor
What is the difference between PHP ISAPI filter and PHP CGI (which one
would be better to install on IIS 5?)

-thanks,

- vic

__ 
Post your free ad now! http://personals.yahoo.ca

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




[PHP] GD jpg thumbnail - ugly discollored

2003-01-25 Thread Victor
I have a script that takes uploaded images (jpeg only) and makes
proportionate thumbnails etc, and saves them in jpeg (.jpg) format again
(default compression of %75 I think) anyway, the thumbnails are UGLY.
Beauty of content aside, they are discolored, and usually one
predominant color takes over the entire picture so they come looking
like off-black and white thumbnails. WHY? And how can I fix this/get
around it?

This is some extra info.

GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled



__ 
Post your free ad now! http://personals.yahoo.ca

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




  1   2   3   >