RE: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working

2010-01-07 Thread Vernon Webb
It's the oddest thing. I've found the logs but there is no error at all, the 
server just hangs and the only way to get it back is to restart Apache.
 



From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thu 1/7/2010 9:04 AM
To: Vernon Webb
Cc: php-general@lists.php.net
Subject: RE: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no 
longer working


On Thu, 2010-01-07 at 08:57 -0500, Vernon Webb wrote: 

Didn't know there were php logs, I thought they would be included in 
the Apache logs, where do I find the php logs?
 
~V



From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thu 1/7/2010 8:42 AM
    To: Vernon Webb
Cc: php-general@lists.php.net
Subject: RE: [PHP] Site Moved From PHP4 to PHP5 Server - header, 
location no longer working


On Thu, 2010-01-07 at 08:40 -0500, Vernon Webb wrote: 

That's the odd thing, there is nothing being indicated in the 
error logs the server just hangs and I have to restart apache in order to get 
the site back up. First I thought it might be the server so I move over to a 
different server, but I still have the same issue. What I feel is really odd is 
the fact that it worked in a previous version of php, so waht's changed?
 
~V



From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thu 1/7/2010 7:52 AM
To: James McLean
    Cc: Vernon Webb; php-general@lists.php.net
Subject: Re: [PHP] Site Moved From PHP4 to PHP5 Server - 
header, location no longer working


On Thu, 2010-01-07 at 16:50 +1030, James McLean wrote: 

On Thu, Jan 7, 2010 at 1:35 PM, Vernon Webb 
 wrote:
> I move a number of sites from one server to another 
and one the one server we had php4 and now we have php5 and since then my 
server seems to hang every time there is a header, location redirect. Anyone 
have any ideas on how to resolve this? Is there something I can easily change 
in the php.ini file that will resolve this issue?

Off the top of my head it sounds like something is 
being output before
the header, which causes an error. If you also have 
error display
turned off, you will likely just see a white screen 
with no useful
information.

Make sure none of your includes have trailing 
whitespace or are trying
to print out information before the header itself.

Best bet is to turn on errors and log them, then you 
will see where
the output started if infact that is your issue.

Cheers



Don't turn on errors if this machine is public, as it could 
potentially give out more information to people than you want. First, look at 
the error logs for PHP, which record all the errors you've had with the site, 
whether you have them displayed or not.


Thanks,
Ash
http://www.ashleysheridan.co.uk 
<http://www.ashleysheridan.co.uk/>  <http://www.ashleysheridan.co.uk/>  
<http://www.ashleysheridan.co.uk/> 






Have you checked both the PHP and Apache error logs? Things like 
invalid commands in an .htaccess file can cause server crashes.


Thanks,
Ash
http://www.ashleysheridan.co.uk <http://www.ashleysheridan.co.uk/>  
<http://www.ashleysheridan.co.uk/> 






They could be in a variety of places depending on how your system is set up. It 
should show you if you do a phpinfo(); in a page on its own.


Thanks,
Ash
http://www.ashleysheridan.co.uk <http://www.ashleysheridan.co.uk/> 




-- 
This message has been scanned for viruses and 
dangerous content by comp-wiz.com <http://comp-wiz.com/> , and is 
believed to be clean. 


RE: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working

2010-01-07 Thread Vernon Webb
Didn't know there were php logs, I thought they would be included in the Apache 
logs, where do I find the php logs?
 
~V



From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thu 1/7/2010 8:42 AM
To: Vernon Webb
Cc: php-general@lists.php.net
Subject: RE: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no 
longer working


On Thu, 2010-01-07 at 08:40 -0500, Vernon Webb wrote: 

That's the odd thing, there is nothing being indicated in the error 
logs the server just hangs and I have to restart apache in order to get the 
site back up. First I thought it might be the server so I move over to a 
different server, but I still have the same issue. What I feel is really odd is 
the fact that it worked in a previous version of php, so waht's changed?
 
~V



From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thu 1/7/2010 7:52 AM
To: James McLean
    Cc: Vernon Webb; php-general@lists.php.net
Subject: Re: [PHP] Site Moved From PHP4 to PHP5 Server - header, 
location no longer working


On Thu, 2010-01-07 at 16:50 +1030, James McLean wrote: 

On Thu, Jan 7, 2010 at 1:35 PM, Vernon Webb 
 wrote:
> I move a number of sites from one server to another and one 
the one server we had php4 and now we have php5 and since then my server seems 
to hang every time there is a header, location redirect. Anyone have any ideas 
on how to resolve this? Is there something I can easily change in the php.ini 
file that will resolve this issue?

Off the top of my head it sounds like something is being output 
before
the header, which causes an error. If you also have error 
display
turned off, you will likely just see a white screen with no 
useful
information.

Make sure none of your includes have trailing whitespace or are 
trying
to print out information before the header itself.

Best bet is to turn on errors and log them, then you will see 
where
the output started if infact that is your issue.

Cheers



Don't turn on errors if this machine is public, as it could potentially 
give out more information to people than you want. First, look at the error 
logs for PHP, which record all the errors you've had with the site, whether you 
have them displayed or not.


Thanks,
Ash
http://www.ashleysheridan.co.uk <http://www.ashleysheridan.co.uk/>  
<http://www.ashleysheridan.co.uk/> 






Have you checked both the PHP and Apache error logs? Things like invalid 
commands in an .htaccess file can cause server crashes.


Thanks,
Ash
http://www.ashleysheridan.co.uk <http://www.ashleysheridan.co.uk/> 




-- 
This message has been scanned for viruses and 
dangerous content by comp-wiz.com <http://comp-wiz.com/> , and is 
believed to be clean. 


RE: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working

2010-01-07 Thread Vernon Webb
That's the odd thing, there is nothing being indicated in the error logs the 
server just hangs and I have to restart apache in order to get the site back 
up. First I thought it might be the server so I move over to a different 
server, but I still have the same issue. What I feel is really odd is the fact 
that it worked in a previous version of php, so waht's changed?
 
~V



From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thu 1/7/2010 7:52 AM
To: James McLean
Cc: Vernon Webb; php-general@lists.php.net
Subject: Re: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no 
longer working


On Thu, 2010-01-07 at 16:50 +1030, James McLean wrote: 

On Thu, Jan 7, 2010 at 1:35 PM, Vernon Webb  wrote:
> I move a number of sites from one server to another and one the one 
server we had php4 and now we have php5 and since then my server seems to hang 
every time there is a header, location redirect. Anyone have any ideas on how 
to resolve this? Is there something I can easily change in the php.ini file 
that will resolve this issue?

Off the top of my head it sounds like something is being output before
the header, which causes an error. If you also have error display
turned off, you will likely just see a white screen with no useful
information.

Make sure none of your includes have trailing whitespace or are trying
to print out information before the header itself.

Best bet is to turn on errors and log them, then you will see where
the output started if infact that is your issue.

Cheers



Don't turn on errors if this machine is public, as it could potentially give 
out more information to people than you want. First, look at the error logs for 
PHP, which record all the errors you've had with the site, whether you have 
them displayed or not.


Thanks,
Ash
http://www.ashleysheridan.co.uk <http://www.ashleysheridan.co.uk/> 




-- 
This message has been scanned for viruses and 
dangerous content by comp-wiz.com <http://comp-wiz.com/> , and is 
believed to be clean. 


[PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working

2010-01-06 Thread Vernon Webb
I move a number of sites from one server to another and one the one server we 
had php4 and now we have php5 and since then my server seems to hang every time 
there is a header, location redirect. Anyone have any ideas on how to resolve 
this? Is there something I can easily change in the php.ini file that will 
resolve this issue?

Thanks
~V



[PHP] Display Image

2009-05-25 Thread Vernon St . Croix

I am trying to send images to my browser using the header function, but keep on 
getting 'No image Available'.

Can someone please help!!
_
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Check out system for Shopping Cart

2009-05-21 Thread Vernon St . Croix


Can you please help with my checkout script. I have been getting errors as 
shown below:

Warning:  mysqli_query() expects parameter 1 to be mysqli, object given in 
C:\wamp\www\draft\checkout.php on line 26



Warning:  mysqli_affected_rows() expects parameter 1 to be mysqli, object given 
in C:\wamp\www\draft\checkout.php on line 28



Warning:  mysqli_rollback() expects parameter 1 to be mysqli, object given in 
C:\wamp\www\draft\checkout.php on line 77

System error

Warning:  mysqli_close() expects parameter 1 to be mysqli, object given in 
C:\wamp\www\draft\checkout.php on line 83

for the script

 $item){

$qty = $item['quantity'];
$price = $item['price'];

mysqli_stmt_execute($stmt);

$affected += mysqli_stmt_affected_rows($stmt);

}

mysqli_stmt_close($stmt);

if ($affected ==count($_SESSION['cart'])) {

mysqli_commit($con);

echo'Thank you for your order';

}else{

mysqli_rollback($con);

echo'Your order could not be processed';

}

}else{

mysqli_rollback($con);

echo'System error';

}

mysqli_close($con);



include ("footer.html");


?>

Many Thanks




VEE
VEE



_
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Shopping Cart

2009-05-16 Thread Vernon St Croix
Hi,

I am pretty new to PHP and I am trying to create a shopping cart. 

I keep on getting the below error when trying to show the shopping list. 

Any guidance that can be provided will be very much appreciated

Fatal error: Call to a member function query() on a non-object in 
C:\wamp\www\draft\basket.php on line 36

mysql_connect.php


basket.php

 
Rum Basket

 

  Rum on Offer
  query($sql);
 $output[]= '';
 while ($row = $result->fetch()) {
 $output[] = ''.$row['name'].': £'.$row['price'].'Add to Cart';
}
$output[] = '';
  echo join ('', $output);
   ?>
  





cart.php

$value) {
   if (stristr($key,'qty')) {
$id = str_replace('qty','',$key);
$items = ($newcart != '') ? explode(',',$newcart) : explode(',',$cart);
$newcart = '';
foreach ($items as $item) {
 if ($id != $item) {
  if ($newcart != '') {
   $newcart .= ','.$item;
  } else {
   $newcart = $item;
  }
 }
}
for ($i=1;$i<=$value;$i++) {
 if ($newcart != '') {
  $newcart .= ','.$id;
 } else {
  $newcart = $id;
 }
}
   }
  }
 }
 $cart = $newcart;
 break;
}
$_SESSION['cart'] = $cart;

?>



Rum Basket







Please Check Quantities...



Back to Rum List








functions.php

There is no alcohol in your Rum Basket';
 } else {
  // Parse the cart session variable
  $items = explode(',',$cart);
  $s = (count($items) > 1) ? 's':'';
  return 'There are'.count($items).' item'.$s.' in your 
rum basket';
 }
}
  
 function showCart() {
 $cart = $_SESSION['cart'];
 if ($cart) {
  $items = explode(',',$cart);
  $contents = array();
  foreach ($items as $item) {
   $contents[$item] = (isset($contents[$item])) ? $contents[$item] + 1 : 1;
  }
  $output[] = '';
  $output[] = '';
  foreach ($contents as $id=>$qty) {
   $sql = 'SELECT * FROM spirits WHERE id = '.$id;
   $result = $con->query($sql);
   $row = $result->fetch();
   extract($row);
   $output[] = '';
   $output[] = 'Remove';
   $output[] = ''.$name.'';
   $output[] = '£'.$price.'';
   $output[] = '';
   $output[] = '£'.($price * $qty).'';
   $total += $price * $qty;
   $output[] = '';
  }
  $output[] = '';
  $output[] = 'Grand total: £'.$total.'';
  $output[] = 'Update cart';
  $output[] = '';
 } else {
  $output[] = 'You shopping cart is empty.';
 }
 return join('',$output);
}

?>




Many Thanks

Vee

Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon

That worked great. Thanks.

"Micah Gersten" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

http://us3.php.net/basename



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



Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon

SOLVED!

I made the following change as well to fix the file name:

BEFORE:
echo date("m-d-Y", $entry['filemtime']) . " {$file}\n";
AFTER:
echo date("m-d-Y", $entry['filemtime']) . $entry['filename'] . " />\n";


One last question.
The $entry['filename'] is the file name and path:
   /home/website/public_html/resumes/1218044880/filename.htm

How do I get it to display filename.htm only?

Thanks for all your help Jim. 



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



Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon

All is weel except for 2 things:

   1. $filemtime = filemtime( $dir . $file ); needed to be changed to > 
$filemtime = filemtime( $file );

   2. The filename is the same filename over and over again.



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



Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon
I'm really starting to feel incompitant here. Sorry to ask, but could you 
show me what you mean? 



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



Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon
Ok, I've gotten the following so far, which is giving me the results, except 
it is still sorting by file name and not the file's date.



 $file, 'filemtime' => $filemtime);
 # This is the list of filemtimes to sort by later
 $filemtimes[] = $filemtime;
 # Sort array based on $filemtimes
 # http://php.net/array-multisort Example #3
 if (array_multisort($filemtimes, SORT_DESC, $sorting_list) ) {
  echo date("m-d-Y", filemtime($file)) . " " . $file . "\n";
 }
}
} else {
echo 'Directory listing call failed!';
}
?>


Thanks 



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



Re: [PHP] PHP: Mulitiple Arrary Sort

2008-09-03 Thread Vernon
This may be a stupid question, but I am sick and under the guy and am 
wondering if you could you show me how to simply echo each file name using 
the exmaple below?


Thanks

"Jim Lucas" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Jim Lucas wrote:
ok, here would be my version of this code.

 $file,
'filemtime' => $filemtime,
);

# This is the list of filemtimes to sort by later
$filemtimes[] = $filemtime;

}

# Sort array based on $filemtimes
# http://php.net/array-multisort Example #3
if ( array_multisort($filemtimes, SORT_DESC, $sorting_list) ) {
echo "List was sorted by filemtime\n";
} else {
echo "List was not sorted by filemtime\n";
}

var_dump($sorting_list);

} else {

echo 'Directory listing call failed!';

}

?>



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



[PHP] PHP: Mulitiple Arrary Sort

2008-09-02 Thread Vernon
I've gotten the one array down and I've figured out how to sort that array, 
however, I need to sort the array by the modified date of the file. Here's 
what I got so far:


";
}
}

}
?>

Any ideas on how to fix this? Thanks 



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



[PHP] After Upgrade to php 5 unlink fails

2006-11-14 Thread Vernon Webb
I've just upgraded to php 5 and am now getting the following error:

Warning: 
unlink(/home/mywebsite/public_html/resumes/travelport_holiday_rev1.html) 
[function.unlink]: No such file or directory 

This worked fine prior to the upgrade and obviously the file does exist. 

What has changed and how can I correct this?

Thanks

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



Re: [PHP] php 3 to 5 upgrade: foreach loop no longer working

2006-04-18 Thread Vernon Webb
> Register Globals?

You got it. Is there any advantage to having this turned off?

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



[PHP] php 3 to 5 upgrade: foreach loop no longer working

2006-04-18 Thread Vernon Webb
I've recently upgraded a server from Fedora Core 3 to Core 5 in the process php 
had 
been upgraded from either 3 or 4 to php 5. In doing so I had to do a major 
overhaul of 
a web site as many things stopped working (.i.e $HTTP_POST_VAR, etc). Haven't 
gotten 
through most of that I know have a problem with a page that is being submitted 
to 
another page which contains different values for checkboxes. I would pull the 
values 
from each checkbox using a foreach loop as such: 

foreach ($checkbox as $value) {
echo "Value: $value\n";
}

however the value is no longer being echoed to the page. 

What am I missing here?

This is the code that is being submitted, $num being an incremented value:



Thanks in advance

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



[PHP] Having problems connecting to MS SQL2000 server on PHP5

2005-04-29 Thread Vernon Jenewein
Hi,
Follwoing is a problem I'm having following some advice in a book called 
"PHP5 in easy steps" written by Mike McGrath:
This is a connection that seems not to work according to the writer of "PHP 
5 in easy steps" :


 MS SQL2000 Connection Test 





 

He originally wrote  (for line 6) $connection = mysql_connect ( "localhost", 
"root", "" )
or die ("Sorry - unable to connect to connect to MySQL");

All I am doing is trying to use MS SQL2000 which I have running on my 
comptuer, along with Apache Server (1.3.33)and  PHP5 (5.0.4)  And get a 
result that does not connect.  Give it a try and you will see.  I created a 
file in the htdocs folder of Apache and it is named mssqltest.php  and has 
the above scripts.  Rather than using the MySQL that the author has 
suggested to use, I'm using my exisiting MS SQL2000 that is up and running.

Also I have not had much success with Apache Server 2.0.54 as yet.. any one 
else?

Would be nice if authors would not assume that you ALWAYS want to use MySQL 
or any other database manager, and just put in a few examples from different 
angles.

thanks in advance if you have some ideas for me.
CHEERS!!
Vernon



Flintknapper Forums at:
http://scottieluvr.com/v-web/bulletin/bb/index.php

Vernon Jenewein

6658 116th Ave.
Fennville, MI 49408
269-227-8748
"You will know the truth, and the truth will set you free." (Jn 8:23)

[EMAIL PROTECTED]
[EMAIL PROTECTED]   (secondary) 

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



[PHP] Snyc Outlook Calendar with Website

2004-12-05 Thread Steve Vernon
Hiya,

Any help or advice would be great.

At the moment I sync my mobile with my computer (Microsoft Outlook), with
all my tasks and calendar entries.

I have made a PHP website with my own coded calendar system. The entries in
the calendar are stored in a MySQL database.

At the moment every day I go to my website and updated the calendar, so the
information on my website is the same as in Outlook.

This takes time so I would like to be able to automate this!

What I would like to be able to do is automatically say once a day is send
all my calendar entries to my website. Has anyone done anything like this?

What I was thinking of was:

On my localhost having PHP link to Outlook and get the next weeks 
Sending them as POST data from my computer to my website, this is
received by a PHP script on my website
The PHP script then adds the new entries to the database (the
database will automatically ignore duplicates)

Guess this will work but I haven't tried anything like this, especially the
PHP talking to Outlook. Can a PHP script send POST data to another one
simply? 

Am I in the right direction? Is there anything I should know or think about?
Is there a good example already made?

Don't mind making this, or even trying parts of it, if I know this will
work!

Thanks!

Steve

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



[PHP] File Handing Windows / Linux

2004-11-14 Thread Steve Vernon
Hiya!

I am trying to make some code which gets a handle to a directory, but has
different code for my localhost (Windows) and for online (Linux server). 

Basically, I want either of the below lines. Say if the first fails, it must
be on Linux and then it uses the line below. 

The two example lines are:

  @ $handle =
opendir("c:/websites/mywebsite/extra/photos/".$_GET['page']."/");
  @ $handle =
opendir("/home/mywebsite/public_html/extra/photos/".$_GET['page']."/");

Had a search on google, but not really sure what to look for!

Love,

Steve
XxX

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



Re: [PHP] Re: Upload file field not working as a form element

2004-03-21 Thread Vernon
> The uploaded file name will be $HTTP_POST_FILES["filename"]["name"] -- use
> that rather than $_POST["filename"].

I'm sorry I don't understand. What is the extra ["name"] for? When I use
this in the insert into the value that is inserted into the database is
Array, as opposed to the actual filename.

Thanks
 -V


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



[PHP] Re: Upload file field not working as a form element

2004-03-21 Thread Vernon
All I am trying to do is insert the file name, not the file. The file is
being uploaded to the server in a specific location. All I need is the
filename inserted into the database. I've gotten the upload part to work and
everything I just can't get the file name inserted for God knows what
reason. I removed the upload code and am simply trying to insert the
filename and userid into the database. The userid goes in but I cannot get
the file name inserted.

Here is the form:
 




  

and here is the php code

http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Upload file field not working as a form element

2004-03-20 Thread Vernon
As much as I try I cannot get a file field in a form inserted into a MySQL
record. I've even tried to get it to echo to the page when the page is
submitted to itself and it's not reading the field.

What am I missing here?

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



[PHP] Replace space from form field using preg_replace

2004-03-17 Thread Vernon
I want to be able to replace a space that comes from a form field (such as
in 123 My Street) with a + sign.

Can anyone help me with this?

Thanks

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



[PHP] Re: Session not working...

2004-01-25 Thread Vernon
Figured it out.

Had to turn on RegisterGolbals (which I had, but didn't restart Apache).

Thanks

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



[PHP] Session not working...

2004-01-25 Thread Vernon
I'm in the process of moving to a new server and no sessions are working.
Does something need to be set in the php.ini file? Why would sessions not be
working?

Thanks

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



[PHP] Re: str_replace and TABS

2004-01-21 Thread Vernon
In case anyone wanted to know I found it:

$replacement = array("\"", ",", ".", "!", "?",";", ":",")","(","\n", "\t",
"\v");

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



[PHP] str_replace and TABS

2004-01-21 Thread Vernon
I'm using the following to replace certain characters but am having troubles
with TABS. How do I find them?

$replacement = array("\"", ",", ".", "!", "?",";", ":",")","(","\n");

Thanks

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



[PHP] Re: Identifiying multiple records for databse submission

2004-01-07 Thread Vernon
Sure glad I figured it out myself. :(

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



[PHP] Identifiying multiple records for databse submission

2004-01-06 Thread Vernon
I'm creating a resume database where I am having resumes submitted to this
database and keyword searches done. All works. Now I need to have a way of
tagging items found in the database much like a shopping cart.

So, I have a unique ID created each time someone does a search on the page
which is based on the time and date. Each time a search is done the old one
is destroyed and a new ID created. Users will search the database and select
resumes they think are suitable and tag them, before doing a new search they
will submit the resumes (actually the IDs of the resumes) to a table. I'm
wondering what is the best way to do something like this. Each resume needs
to be tagged when a popup window of the resume is open.

Any ideas?

Thanks

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



Re: [PHP] str_replace to ignore commas

2004-01-06 Thread Vernon
> Nowhere in your replacement array do you check for, or remove,
> carriage returns.
> Add this \n to it:
> $replacement = array("\"", "\,", ".", "!", "?", "\n");
> Your exploded array should now be correct.

When I do this I get some really unexpected results. Almost everything comes
up bold.

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



Re: [PHP] str_replace to ignore commas

2004-01-06 Thread Vernon
> could the problem be that you explode on " " so the phrase 'New York',
> having a space, is split up?

Could be. Some times the New is on one line and the York is on the next
line. I need for it to explode no matter what. How would I do that?

For instance the print_r for the array shows me this in one instance. None
of which is hightlighted (and should be) in other words all of these where
skipped and the New York should have been selected. I know that the comma is
causing trouble as well.

/> New [913] => York, [914] => New [915] => York
/> Dear [917] => Mr. [918] => Conlin:

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



[PHP] str_replace to ignore commas

2004-01-06 Thread Vernon
I'm trying to use str_replace to ignore sertain characters from a recordset
field and it seems I am having difficulties with ignoring commas and
carriage returns. I've gotten the following but when searching for, let's
say, New York. When York is at the end of a sentence from a recordset field
it is skipped and if it has a comma like York, it is skipped. Any ideas?
Here's the code I'm using so far

//IGNORED CHARACTERS
$replacement = array("\"", "\,", ".", "!", "?");

//CREATE THE ARRAY OF WORDS
//STRIP SLASHES, IGNORE CAPS, IGNORE REPLACEMET CHARACTERS
//$keywords = form field value
$words=explode(" ", stripslashes(strtolower(str_replace($replacement, "",
$keywords;

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



Re: [PHP] Remove quotes from form field

2004-01-05 Thread Vernon
The search is already completd. The previous response answered my question.

Thanks

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



[PHP] Remove quotes from form field

2004-01-05 Thread Vernon
I'm having trouble returning the value less the quatation marks from the
following:

 $words=explode(" ", strtolower($keywords));

I'm having the words from the form field put into an array. Problem is if
the field contains something like

 trackworker AND "New York"

It seperates the words into the array as follows:

   Array ( [0] => trackworker [1] => "new [2] => york" )

Therefore not finding the words "new york" because they don't exist like
that but rather without the quotaions. Question is how do I remove the
quatation marks so it returns?

   Array ( [0] => trackworker [1] => new [2] => york )

Thanks

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



[PHP] Question about an array

2004-01-03 Thread Vernon
I want to create an array with some text. Let's say the following:

$sometext = array(explode(" ", "Objective: Position as a Machine Attendant
and or Operator Summary - Over 16 years experience in packaging and
maintenance of various operating machinery. - 13 years experience in cutting
steel and operating a steel press. - Part time experience in packaging and
shipping bread for a bakery."));

I can easily return that text using:

print_r($sometext);

However I want loop through that text for to bold certain words in the
array. In any event I've tried using the following but it only returns
"sometext at[0] is: [Array]" which is not want I want, I want it to show me
each word in the array through the loop. Any ideas what I am doing wrong?

$arrayLength = count($sometext);

for ($i = 0; $i < $arrayLength; $i++){
   echo "sometext at[" . $i . "] is: [" .$sometext[$i] . "]\n";
}

Thanks

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



[PHP] MySQL Sub search - Is there such a thing?

2003-12-30 Thread Vernon
Some one is asking me to create a sub search on a search that has already
been done. For instance, the database has 50,000  records, a user does a
search for two keywords which yielded 1700 records. They want to now filter
that list with other keywords. The logic is that searching 1700 records has
got to be faster than searching 50,000 records.

The only way I know how to do this is to save the results of the pervious
search to hidden fields and allow the user to add more keywords, which in
essence isn't doing other than adding more keywords to the search doing the
same exact thing they did before with new keywords. Is this logic correct or
is there a way to save that queries results and search only that?

Thanks

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



[PHP] HELP NEEDED PLEASE - IMAP, MySQL and PHP

2003-12-28 Thread Vernon
Hello all,

I have been struggling for some time now to develop or find some product
that will allow me to scan documents (I have that part down no problem,
using OMNIPAGE 14.0) and put then into a searchable database with a copy of
it in some form that is readable like a formatted txt file.

I am looking for the easiest way to do this. I'm thinking if I can have the
files emailed into a MySQL database that would work expect the programs I
have found, however,will not allow me to bring the attachments into the
database. I've tried Xeoport which uses IMAP to access the email records and
pull all but the attachments in. Anyone know of anything that will help me
do this?

Thanks

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



[PHP] Boolean Searches using PHP and using File System fgetss

2003-12-22 Thread Vernon
I'm wondering if anyone knows of a good file system script that allows some
one to do searches on files in a directory. For instance I'm storing resumes
in folder defined on upload dates and so forth and want to be able to do
searches through these files for keywords and would like to be able to do
Boolean searches and hopefully return a brief description and perhaps a
percentage relevance. What is very important is the Boolean thing as I need
to be able to do searches like "this AND that" OR "this AND NOT that"

Any ideas?

Thanks

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



[PHP] Max Upload FIle Size

2003-12-05 Thread Steve Vernon
Hello,

I have search google, and PHP but I cannot find properly how to set the
maximum post upload size as 200Kb?

Do I use 200K or 200KB for post_max_size?

THANKS

Steve

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



[PHP] Search File

2003-11-21 Thread Vernon Webb
I'm trying to find a way to search text files in a directory using php. I've
done some researching under the filesystem section on php.net but seem to
have come up empty handed. Is there a way to do keyword searches on a txt
file in a directory hopefully with some type of relevance ranking?

Thanks

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



[PHP] COM and PHP.ini

2003-11-07 Thread Steve Vernon
(PHP 4.3.0, Windows XP Pro, Office 2000 Pro)

Hello,

Just playing around with COM, and I got the error below.

Searching on google it mentions something about a DLL error.

Iv'e enabled dcom in php.ini.

What have I missed!

Line 2 says $excel = new COM("Excel.Application") or die("Excel could not be
started");

THANK!


Warning: (null)(): Unable to obtain IDispatch interface for CLSID
{00024500---C000-0046}: Server execution failed in
c:\websites\excel.php on line 2

Fatal error: Maximum execution time of 30 seconds exceeded in
c:\websites\excel.php on line 2

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



[PHP] Color / Colour on the command line

2003-10-29 Thread Steve Vernon
Hiya,

I have quite a few maitenence php scripts I run on the command line in
windows. I realise there are ways to alter the look of the DOS command
prompt in windows. But if I reinstall windows, or use the script on another
machine they will be lost.

I'm thinking of letting users download it as well.

So basically, I can't find anything about how to change colours using a
command line script.

Just getting very boored of white text on a black background- very booring!

THANKS!

Steve

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



Re: [PHP] MP3 Ripping

2003-10-27 Thread Steve Vernon
erythros and Burhan,

Thanks for the reply.

Basically I started putting my music into a program , and the program I did
it on didn't like the amount of tracks (kept crashing), and didn't give me
as many options as I would like. I'm not worried about a fancy interface and
graphical displays of the music.

What I could do is make a folder inside a folder with the artist name and
the CD, and then the MP3 files inside with the name (and possibly mix) as
part of the name. But what if the CD has music from different artists? What
if the program does not like a high number of files? What if the file name
gets to be more than 255 characters? What if I want to do something bit more
advanced with a catelouged set of data.

The last sentence relates to a project I did at Uni, to do with automatic
mixing between tracks. I realise the code I did then is copyright, but I
have a few ideas I want to try out. I sometimes do a bit of DJing at a local
bar/club, but for the first couple of hours we just play a couple of mix
CD's, before I get up and DJ. What I was thinking was letting the computer
DJ itself, and letting people using a simple interface select some songs.
But I would want to limit the type of songs, because some songs don't work
at certain times of the night. Just would be nice to have it all using
MySQL, so people can see pics of the artists etc. There are some quiet
nights where basically either mix cd's or the radio is used all night.

A database is there to hold your data, and basically display it in a format
when asked, that you asked for. (Ok not a dictionary definition). Basically
a file system is a simple database, but just to hold files. I know the load
on the server would be crazy, but I'm not worried about that. All I plan to
do at the moment is to output to a tempoary file, and then feed it into a
program such as WinAmp to play the file. I don't want to do any Streaming-
well perhaps some screaming!

Ideally there would be a software product out there to do all this, but I
don't think so, not with some of the ideas I have which I haven't even
listed!!! So is there ANY way from PHP to read a CD, rip the tracks and
place them in BLOB fields in MySQL? Or do I have to write something in C++
or Java? Just would be nice if there was something in PHP.

Thanks,

Steve

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



[PHP] MP3 Ripping

2003-10-27 Thread Steve Vernon
(Windows 2k, Apache, PHP, MySQL, Large Computer with Raid Array and Big
Drives!!!)
(Appology if this is been asked before, but I couldnt see it)

Hello,

First of all I had better say I don't think I am doing anything illegal. I
have over a thousand origional CD's, and would basically like not having to
swap the CD's etc. It's amazing some of the tracks I love but never play. I
end up playing the albums, and not the singles etc. What I basically would
like is to have a form of automatic jukebox on my computer.

So what I have done is made a MySQL database with all the Artist, Genre,
CD's and Tracks (including mixes). I have typed in all the information into
this, and checked it as much as possible.

What I would like is to put the music track in a blob field, rather than a
file. Is there someway that PHP can read the CD and rip the files??? Or
would I need to rip the tracks in a program, and then basically upload them
in a form? (The second option would take longer for me of course)

Now I could write some sort of C++ or Java program that uses this data and
plays the CDs with some fancy choosing of artists and genre etc. But can
anyone think of a way to do it from PHP? Someone said WinAmp had a command
line interface, perhaps send it tracks from a PHP file. Not sure if it
returns informaiton to PHP.

One thing I did think was learning the PHP-GTK, with this project as a goal.
But I know I can do what I want to do in Java, just not sure if there are
any good mp3 modules etc for PHP.

Any help would be appreciated!

Steve

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



[PHP] German Date - GMDATE Function

2003-10-22 Thread Steve Vernon
Hello,

When I use the gmdate function, I get the English date, e.g. October. Is it
possible to get the date in German or another language? I really need the
server setting up so that it can handle different languages.

I suppose I could get the month as a number, and then convert the number,
but this seems a bit tacky!

Any help would be much appreciated!

I have tried to look at the German mannual, but I think they use the same
calls to gmdate, and that PHP is different. Is this so? How would I get
around this?

I don't know much, if any, German, so would need to use the English PHP.

THANKS!

Steve

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



Re: [PHP] Text boxes posted to MySQL record that contain quotes

2003-07-08 Thread Vernon
OK when I use the mysql_escape_string() it adds the slashes so that the
message will have \"the message\" so I've tried using the stripslashes() as
such:

$message =
stripslashes(mysql_escape_string($HTTP_POST_VARS['message']));

which then causes the orginal problem, so it seems that I keep trying to
reverse each other.

I don't want the slashes and I need the quotes.



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



[PHP] Text boxes posted to MySQL record that contain quotes

2003-07-08 Thread Vernon
I know that using stripslashes will remove \ using php but I'm having
trouble with posting quotation marks in a text record field. Anyone know how
I can get them to post to the database? It's basically like an email and I'd
like anything written to be able to post.

Thanks



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



Re: [PHP] User's Screen Resolution Size

2003-06-18 Thread Vernon
Missing the point all tighter.

The point now is merely that courtesy goes a long way. Why some one needs to
respond in such a fashion is beyond me.

I think it's pretty simple, if I'm posting to a php group, then obviously
I'm using php. Also very simple, yet again, is if you don't want to waste
your time responding then why do you? Some one else answered with a good
response. I do my home work. I Google but don't always know how to phrase
the question in Google, forgive me! But when I ask a human being, more than
likely they know what I'm asking and as in this case I got my answer.



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



Re: [PHP] User's Screen Resolution Size

2003-06-18 Thread Vernon
Not for nothing, but every time I post to this group I get treated poorly.
It has to do with php and I've already gotten an answer from this group, off
the PHP web site no less!

http://www.php.net/manual/en/faq.html.php#faq.html.javascript-variable

Doesn't take much to spread a little kindness. If you didn't want to
respond, nothing making you.



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



Re: [PHP] User's Screen Resolution Size

2003-06-18 Thread Vernon
Thats' great!

Thanks



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



Re: [PHP] User's Screen Resolution Size

2003-06-18 Thread Vernon
The point is I don't know how to do that. That's why I was asking. :)

Vern



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



[PHP] User's Screen Resolution Size

2003-06-18 Thread Vernon
I what to be able to set a variable based on user's screen resolution.

Can anyone tell me who to do that?

Thanks



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



Re: [PHP] Quick SQL Question

2003-06-17 Thread Vernon
Here it is:

SELECT penpals.username, penpals.zoneid, penpals_photos.album,
penpals_photos.rating, zones.zone_id, zones.zone_code,
penpals_photos.filename, penpals.city
FROM penpals, penpals_photos, zones
WHERE penpals.username = penpals_photos.album AND penpals_photos.rating !=
'X' AND penpals.zoneid = zones.zone_id
ORDER BY RAND() LIMIT 0,1



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



[PHP] Quick SQL Question

2003-06-17 Thread Vernon
I'm using the "ORDER BY RAND() LIMIT 0,1" to give be a random record from a
recordset but it seems like it puts a real heavy load on the server. Is
there a better way to pull a random record from a database?

Thanks



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



[PHP] File lsiting exec(ls... using variables.

2003-06-13 Thread Vernon
I'm trying to add a variable to the end of a directory listing.

This will give me the root directory and show me all the files
exec('ls /home/httpd/vhosts/sitename.com/httpdocs/resumes/',
$filelist);

I figured I could do this but it shows me all the files in the root of the
site not of the folder I want. So what it seems is that it is ignoring the
$path variable all together.
   $folder = $HTTP_GET_VARS['id'];
   $path = "/home/httpd/vhosts/sitename.com/httpdocs/resumes/$folder/";
exec('ls $path', $filelist);

I've even tried to add echo but then nothing at all is listed:
exec('ls ', $filelist);

Any ideas?



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



[PHP] Re: Web Server Firewall Suggested

2003-06-07 Thread Vernon
I am very big on Internet security and anyone running a web server should
know IPChains and IPTables. If you don't get a couple of books and learn.
Once you understand how things work you we will be much better equipped to
handle any security issues that may come up.

Having said that you don't really need to know these items (but again anyone
running a web server that does not, IMHO, is crazy) when using
Bastille-Linux (http://www.bastille-linux.org/). This is lock down yor box
very well and create the scripts needed to protect your system. Be careful
though and read all prompts carefully as it can lock the box down so tight
it won't let you in. ;)

V



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



[PHP] GNU Distance Calculation - for the world in php

2003-06-07 Thread Vernon
I have a way of getting the distances from one zip code to the next in the
US, but I need to be able to do that for other countries as well.

I've found a web site on the net that sells a database of all postal codes
and their longitude and latitudes but they want a $1000 which I am not
willing to pay, especially since I got all the US zips for free.

Anyone know where I can get a database with all the postal codes and so
forth or perhaps a couple different ones and hopefully the code in php to
calculate the distances. I need to be able to at least do major countries in
the world from one place in that country to the next.

Thanks



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



[PHP] Do not display page errors...

2003-06-06 Thread Vernon
Not sure if there is an html tag or php that will tell a page not to display
any errors on the page, but does anyone know how to do that? I want to hide
any error that might be displayed, JavaScript or otherwise.

Thanks



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



[PHP] Re: Wild Card with unlink

2003-05-27 Thread Vernon
Figured it out thanks anyway for looking.

:)



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



[PHP] Wild Card with unlink

2003-05-27 Thread Vernon
I'm trying to delete two files in on fell shoop. One is defined with $file2

// returns "filename without extension"
$filename_small = substr($file1, 8, 10);
// returns define location and file name to delete
$file2 =
"/home/httpd/vhosts/servername/httpdocs/photoalbum/$filename_small";
// the other file name has _small appended to it with it's owen extension
(png, jpg, gif, etc.)
// I thought it would be this but it doesn't work
unlink("$file2"."_small.*");

Thanks



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



[PHP] Webtrends

2003-04-04 Thread Vernon
I know this is sort of off topic but I was wondering it any one knew if
there was a GNU version of Webtrends or perhaps a GNU equivalent, maybe in
php to use on an Apache Linux Red Hat server?

Thanks



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



[PHP] Uploading Files Via PHP

2003-03-26 Thread Vernon
Is there some thing that needs to be turned on in the php.ini in order to be
able to upload photos VIA php? I have the same script on one machine with
the right permissions on the upload dirs on one machine and am moving to
another machine which is not being uploaded. Funny thing is I'm not getting
any errors in the Apache logs.

Thanks



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



[PHP] Using includes with page locations

2003-03-26 Thread Vernon
Please forgive the ignorance of this question but I am trying to use an
include for a site navigation menu and am having a hard time figuring out
how to point at the route of the site.

For instance I may have home set as index.php, but if my users are in
messages/index.php that will always bring that back to the same page. I know
in ASP there is a way to set the root directory, how do I do that in PHP.

Thanks



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



Re: [PHP] Sorting Recordset by a calculation between 2 Records

2003-03-18 Thread Vernon
> When you say "using php" I'm assuming that this means you are not doing
> the calculation at the database, but rather in your PHP code.

Correct.

> Use the distance you've calculated as the numeric index of an array,
pointing to
> the record that corresponds to that distance.

Can you please expalin this statement? Perhaps a tutorial somewhere?

Thanks



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



[PHP] Sorting Recordset by a calculation between 2 Records

2003-03-18 Thread Vernon
I am calculating distances between to record's zip codes using php and have
a need to sort the recordset by that value. How do I do something like this?
I mean it's not a value in the table that I can use the SQL ORDER BY
statement. I want to be able to have the distances closest to the individual
first.

Any ideas?

Thanks



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



[PHP] Email always set to server's email, why?

2003-03-17 Thread Vernon
All the email coming from a web site, even though I have set the Reply-To,
have the Reply-To set to [EMAIL PROTECTED] Anyone have any ideas why? I
want the reply-to set to somethign else.

Here is what I have:

mail("$clubemail", "$subject", "$message" , "From: $email\r\n","Reply-To:
$email");



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



[PHP] Convert Date to MySQL format

2003-03-14 Thread Vernon
I've had to convert times in a MySQL field to a normal date, but never in
reverse. How to I convert a date in this format, 03/14/2003, to MySQL format
so it can be posted to a date field?

Thanks



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



Re: [PHP] SQL DISTINCT with MYSQL

2003-03-13 Thread Vernon
The problem is

> a f1
> a f2
> b f1
> b f2

Where I need it to return the a only once and the b only once. For instance
the vlaues may be:

jimmy login.php
jimmy successfullogin.php
susan  default.php
susan  search.php

Since the records are order the way I need them to be (or else I could use a
ORDER BY command) the last one is the only one I want and only want to
return:

jimmy successfullogin.php
susan  search.php

make sense?

"Arturo Barajas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Vernon,
>
> Don't know if I get it right, but:
>
> SELECT DISTINCT uname, file
> FROM useronline
>
> should do that.
>
> I mean, if you have something like:
>
> uname file
> a f1
> a f2
> a f1
> a f2
> b f1
> b f2
> b f1
>
> the query should deliver:
>
> uname file
> a f1
> a f2
> b f1
> b f2
>
> Is that what you're looking for?
> --
> Un gran saludo/Big regards...
>Arturo Barajas, IT/Systems PPG MX (SJDR)
>(427) 271-9918, x448
>
> > -Original Message-
> > From: Vernon [mailto:[EMAIL PROTECTED]
> > Sent: Jueves, 13 de Marzo de 2003 06:24 p.m.
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] SQL DISTINCT with MYSQL
> >
> >
> > I'm setting up a user online system using MySQL where I have
> > 4 fields, all
> > of which is working fine.
> >
> > I need the information from all the fields but want only
> > distinct values
> > based on the uname column. If I use the:
> >
> > SELECT DISTINCT uname
> > FROM useronline
> >
> > of course I come back with the values I desire, but only the
> > user names.
> >
> > As I am also tracking the page they are on I need other
> > columns in the table
> > as well. So the question is, using an SQL statement, how do I
> > return only
> > distinct useronline.uname values from the database as well as the
> > useronline.file column?
> >
> > Thanks
> >
> >
> >
> >
> >
> > --
> > 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] SQL DISTINCT with MYSQL

2003-03-13 Thread Vernon
I'm setting up a user online system using MySQL where I have 4 fields, all
of which is working fine.

I need the information from all the fields but want only distinct values
based on the uname column. If I use the:

SELECT DISTINCT uname
FROM useronline

of course I come back with the values I desire, but only the user names.

As I am also tracking the page they are on I need other columns in the table
as well. So the question is, using an SQL statement, how do I return only
distinct useronline.uname values from the database as well as the
useronline.file column?

Thanks





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



[PHP] Converting HMLT to Text in PHP

2003-03-13 Thread Steve Vernon
Hiya,
I'm working on an email part of a site, normally I just send in text,
but for this site I need to send HTML and text.

Now I have made the HTML ones, that work fine. Is there a PHP way to
convert this to a normal text file for the text emails?

It dosent need to be that preety or layed out nice, but id prefer it to
be better than just removing the tags.

Thanks,

Steve


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



[PHP] Resizing Images Uploaded to Web Page

2003-03-08 Thread Vernon
I have users uploading images to a server and need to have those files
resized on upload. I looked under filesystem, but found nothing like that.
Anyone?

Thanks



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



[PHP] Deleting Files

2003-03-08 Thread Vernon
I need to have files that exist within a folder on my server based on the a
MySQL record that contains it's name. What command would I be looking for in
the php functions list? Anyone?

Thanks



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



Re: [PHP] Threading

2003-02-22 Thread Steve Vernon
Hiya Greg or anyone else!
I realise that PHP does not have inherent thread support as yet. But is
it possible to simulate threads?

What I would like is for the user in a web site in a rare condition to
cause a long script to be completed. Now as far as I can make out you can
make it not time out, but the user will sit there being boored.

Is it possible to call a URL from PHP? And just ignore it? I mean call
another PHP script that takes ages, but wont affect he initial script
ending?

Steve
- Original Message -
From: "Greg Donald" <[EMAIL PROTECTED]>
To: "Bruce Miller" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 8:03 PM
Subject: Re: [PHP] Threading


> On Tue, 18 Feb 2003, Bruce Miller wrote:
>
> >Will PHP allow multiple-thread execution?
>
> PHP4 does not have thread support.
>
>
> --
> Greg Donald
> http://destiney.com
>
>
> --
> 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] Web Based Video Conferencing Solution

2003-02-18 Thread Vernon
Anyone know of a video conferencing solution (hopefully GNU) for use within
a php web site? I'm looking to do something where a number of people can
video conference at the same time.

Thanks



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




[PHP] MD5 Password Login Driving me Crazy

2003-02-17 Thread Vernon
For what ever reason I cannot seem to get a user to login using MD5. The
user creates the password on log and it works fine, password encrypted and
all. I test to see if the process is working ok on creation by using the

UPDATE penpals SET password = MD5(password)

and the encrypted passwords match.

When the user goes to login into the page though I have the encrypted
password echo to the page and they match except a 52 on the end of it which
I am assuming is a space or something being picked up on submit or
something. I recall there is a way to trim the field so that it doesn't pick
up spaces but can't recall what it is. Anyone know what it is and if it
could be that?

Thanks



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




[PHP] MD5 Passwords (How it works?)

2003-02-17 Thread Vernon
I'm thinking that the MD5 function more than likely encrypts a password to
store into a database, and when you log in using the MD5 function it will
simply encrypt the value being passed along again the same way. Now I'm
wondering what happens when I user has lost there password and needs to
retrieve it, there is no way to reverse the process is there?

Thanks



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




[PHP] MD5 login troubles

2003-02-17 Thread Vernon
Hey all,

I'm using the following code to save an MD5 password into a database along
with an unencrypted username and email address:

$insertSQL = sprintf("INSERT INTO penpals (email, password, username) VALUES
(%s, MD5(%s), %s)",

All seems to have worked well, the password is encrypted and so forth. I
have also attempted to use the following MySQL command to encrypt the
password and came up with the same result:

UPDATE penpals SET password = MD5(password) WHERE ID = 1

So the trouble seems to be with the login where I am using the following
code:

SELECT email, password, access FROM penpals WHERE email= '%s' AND password =
MD5('%s')

Am I missing something here? Am I some how double encrypting the password?
Is there a de-encrypt function or something I'm missing?

Thanks



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




[PHP] Converting a large number of passwords to MD5 at once.

2003-02-16 Thread Vernon
I made the mistake of opening a web site with encrypting the passwords
stored in the database and want to encrypt them all in one fell swoop. Any
ideas on how to do that?

Thanks



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




[PHP] Threads in PHP? URL call from PHp?

2003-02-14 Thread Steve Vernon
Hiya,
Perhaps I don't mean threads!

Basically I have a PHP script which is in a website, and runs when a
certain input is recieved and it is quite complicated, and may take quite a
time to finish, as it will be sending quite a few emails. The emails do not
have to be sent straight away, and the emails are all customised with date
from the database.

What I could do I suppose is to call set_time_limit(0) to stop the
script timing out, but I don't want to have the user waiting for the script
to finish before he/she sees the next page.

What are the options? I was thinking I could:

1- Run another script using the command line version, system call.
But it is going live on Linux, but tested on Windows. And don't want to have
to alter the code for the live version. Think you have to call PHP
differently on the two platforms.
2- Do some sort of URL call from the PHP code? Is this possible. I
mean like call a script, and pass arguements in the URL. And just ignore it,
it can take as long as it wants, sort of do it in a seperate thread.
3- Somehow ask for some specific PHP code to work in a seperate
thread.

Is this possible? Any other ideas? Which is the best way? What is the
PHP way!

If I was doing something like this in Java, probably set a class running
in another thread.

Many thanks,

Steve




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




[PHP] Re: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
I finally got it!

I had to downgrade to an older verison of the php-mysql for God know what
reason. I am back up now.



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




Re: [PHP] Re: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
OK, I looked up that file and found that I needed to install the
MySQL-shared-3.23.51-1.i386.rpm which I did and realized that I already have
the php-mysql installed. But am still getting the same erro message when
restarting.

However I did find the file you were asking about but in the /usr/lib/php
folder and here is what I got:

ldd /usr/lib/php/mysql.so
libmysqlclient.so.10 => /usr/lib/libmysqlclient.so.10 (0x40026000)
libc.so.6 => /lib/i686/libc.so.6 (0x40057000)
libz.so.1 => /usr/lib/libz.so.1 (0x40193000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x401a1000)
libnsl.so.1 => /lib/libnsl.so.1 (0x401ce000)
libm.so.6 => /lib/i686/libm.so.6 (0x401e5000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x8000)



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




Re: [PHP] Re: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
When I try to install that I am told:
libmysqlclient.so.10   is needed by php-mysql-4.1.2-7.2.6



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




Re: [PHP] Re: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
There is no mysql.so file

"Lucas Lain" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ldd /usr/lib/php4/mysql.so?
>
> Vernon wrote:



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




[PHP] Re: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
When I try to restart Apche I get the following error:

PHP Warning:  Unable to load dynamic library '/usr/lib/php4/mysql.so' -
/usr/lib/php4/mysql.so: cannot open shared object file: No such file or
directory in Unknown on line 0

Any ideas, pleas ethis thing is still down.



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




Re: [PHP] Re: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
I'm sorry I have no idea what that means.

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> try
> ldd /usr/lib/php4/mysql.so



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




[PHP] Re: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
I think the point is here that I can connect with a MySQL client, so MySQL
is running.

I cannot however connect using PHP. What would cause this?




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




Re: [PHP] URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
For some reason I do not see any error logs for today.



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




Re: [PHP] URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
This is not helping me. I know very well that I should not and I tried the
upgrade on two other machines and all went wll.

My problem still stands and a search does ntohiong but tell me to check that
the path is correct. If it worked before then obviously the path is fine,
unless something has changed.

Please I need help getting this thing up now.



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




Re: [PHP] URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
Yes



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




[PHP] Re: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
Just so you know, MySQL is working.



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




[PHP] URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2

2003-02-13 Thread Vernon
After upgrading to MySQL 4.0.1.2 I ma getting the message :

Fatal error: Call to undefined function: mysql_connect() in
/home/penpals/pub/mysql.php on line 3

Please help my production server is down!



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




Re: [PHP] Search Results - Web Page has Expired after Viewing Results

2003-02-11 Thread Vernon
That did it. Thanks (in all the years I have been doing this you think I
would have learned that already)

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Changing the method also implies changing $_POST to $_GET in your code.



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




Re: [PHP] Search Results - Web Page has Expired after Viewing Results

2003-02-11 Thread Vernon
When I do that I get syntax errors in the SQL

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Simple answer is - use GET method instead of POST for your searches



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




[PHP] Search Results - Web Page has Expired after Viewing Results

2003-02-11 Thread Vernon
I've successfully created a search and result page for a dating site which
off of the result page is a detail page for reviewing the profile online and
so forth.

The problem I'm having is once a user does his/her search they may come up
with a number of results which after reviewing one of the members details
the search has to be done over again. If a user uses the back arrow or if I
use a javascript that causes the user to go back one page they get the
typical "Web Page has Expired after Viewing Results" message.

Now I that I can create profiles that are viewed from a pop-up window, but
that's really not convent. Is there any way to for go the expired page
message so that a user can go back to their results? Or does anyone have any
suggestions on better handling this?

Thanks



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




[PHP] Who's Online

2003-02-10 Thread Vernon
I have a membership base that is logging into a php and MySQL based web site
and am wanting to be able to create a who's online (and perhaps an ability
to contact that person, but that's later) so that that person's profile is
available.

Anyone have any ideas where I could download a quick script someone to plug
it in or if not a tutorial on how to make that happen?

Thanks



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




[PHP] Searching MySQL 'text' field

2003-02-06 Thread Vernon
I've setup a search page using PHP which when searching a MySQL 'varchar'
field it works just fine, but I'm trying to extend the search to include a
field that is a 'text' field and it keeps coming back with no results.

Is searching text fields allowed? It would seem that it only be logical that
it would be. Is there something special I have to do to have this field
searched?

Thanks



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




Re: [PHP] Creating an Array from a Recordset

2003-02-06 Thread Vernon
That gives me something that looks like this:
Array ( [0] => 34 [1] => 31 [2] => 16 [3] => 16 [4] => 6 [5] => 4 [6] => 4
[7] => 3 [8] => 2 [9] => 2 [10] => 2 [11] => 2 [12] => 2 [13] => 2 [14] => 2
[15] => 2 [16] => 1 [17] => 1 [18] => 1 [19] => 1 [20] => 1 [21] => 1 [22]
=> 1 [23] => 1 [24] => 1 [25] => 1 [26] => 1 [27] => 1 [28] => 1 [29] => 1
[30] => 1 [31] => 1 [32] => 1 [33] => 1 [34] => 1 )

when what I need is set the variable $datay to be something like this

$datay=array(12,8,19,3,10,5,55,88,3);



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




[PHP] Creating an Array from a Recordset

2003-02-06 Thread Vernon
I'm trying to create an array from a rocordset that will do somethingt like
this:
$datay=array(12,8,19,3,10,5,55,88,3);

the following is the code I have attempted to create, which is not working:

do {
$dat = ($row_rsCOUNTRY['CountryCount'] & ","
$row_rsCOUNTRY['CountryCount']);
} while ($row_rsCOUNTRY = mysql_fetch_assoc($rsCOUNTRY));

$datay=array($dat);

Can anyone help?

Thanks



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




[PHP] Graphic Pie Charts

2003-02-02 Thread Vernon
How do I create a graphic pie chart on the fly with PHP. I have already
figured out how to get the variables from the database and so forth am just
looking to create the graphics.

Thanks



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




  1   2   >