[PHP] mysql problem

2002-10-03 Thread BB

I seem to have a php-mysql problem on my new Sun Qube3 (RH Linux).
php works fine, mysql works fine, apache works fine, only the combination of
the three seems troublesome.
php does not recognize commands like mysql_connect()
when trying to start phpMyAdmin I get: "cannot load MySQL extension"
In my php.ini
extension_dir is set correctly
and I un-commented
extension=mysql.so
What more is there I could try?
Thank you.
Bert Bulder, Amsterdam NL



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




[PHP] socket_read

2002-09-04 Thread BB

I'm having a problem with socket read, it's only reading one character.
This may not sound so bad, but when you think that while it's reading all
those one characters, it cannot read anyone else's (it blocks).

Can anyone explain, or have a better way of doing this?

Code below:




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




[PHP] Re: Dos Paths

2002-07-10 Thread BB

Thanks to all, I actually found a work around with the program I am using
and I'm much happier!

Thanks for all your input, it'll be useful if i ever need to convert long
names to 8.3 :oP

--BB

"Bb" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've got an application that requires dos folder names (8.3 standard) as
> input.
>
> I also have PHP, which quite happily can cope with both.
>
> Can someone help me write a function to translate full paths to dos paths
>
> Thanks
>
>



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




Re: [PHP] Dos Paths

2002-07-10 Thread BB

It doesn't matter how fast it does it.  It matters what language it does it.
C and C++ are a big no no as our company doesn't have a compiler (winblows).

Thanks for the pointer

"David Otton" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wed, 10 Jul 2002 13:14:44 +0100, you wrote:
>
> >I've got an application that requires dos folder names (8.3 standard) as
> >input.
> >
> >I also have PHP, which quite happily can cope with both.
> >
> >Can someone help me write a function to translate full paths to dos paths
>
> You may have to drop down to C/C++ and ask the OS to lookup the short
> version of the path for you (GetShortPathName and GetShortPathNameW).
> But if you want to do it "by hand", Knowledge Base article Q142982
> might be a place to start.
>



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




[PHP] Dos Paths

2002-07-10 Thread BB

I've got an application that requires dos folder names (8.3 standard) as
input.

I also have PHP, which quite happily can cope with both.

Can someone help me write a function to translate full paths to dos paths

Thanks



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




[PHP] Re: Executing Script through image

2002-07-09 Thread BB

$filename = "your/file.gif";
header("Content-Type: image/gif");
header("Content-length:".filesize($filename));
$fn=fopen($filename,"rb");
while(!feof($fn)) {
 echo fread($fn, 4096);
}

in fopen( , "");
the b denotes to read as binary and is only nessecary on a windows system

"Jj Harrison" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am making a stats program.
>
> When the nessicary include file is included it does a reverse-DNS lookup
to
> find the remote host's DNS name. The problem with this is that is seems
> slow(at least on my test server with a DSL connection). I thought the best
> way to speed things up would be putting the entire script into a file and
> then using  within the page. The problem is that I
> don't know how to output the image with PHP.
>
> The image would not be dynamic just a file on the server.
>
> I would appreciate peoples comments or other suggestions
>
> JJ Harrison
> [EMAIL PROTECTED]
> www.tececo.com
>
>
>
>
>



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




[PHP] Re: Converting PCX to ...

2002-07-09 Thread BB

I got a problem with that!

I've written a batch file that sits in the same dir as the PHP script and
when I exec it, it doesn't work!  I've thouroghly thrashed the batch file
for errors and it came up ok every time.  if I echo the exec it only returns
the first line of the batch file.

Anyone?

"Richard Lynch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> >I'm writing a reporting system and I have a problem.
> >
> >I need to insert PCXs into a PDF (using PDFLib), but it doesn't support
> >PCXs.
> >
> >So, to get round the problem, I need to convert the PCXs to JPGs or GIFs
> >
> >Does anyone know of a piece of PHP that can do this inline, (by that I
mean,
> >can be called and run in PHP script), because the images will have
additions
> >and modifications on a regular basis; and they come as PCXs.
>
> I think you will be stuck with using http://php.net/exec to run some
> external process to convert them.
>
> Image Magik seems to convert almost every format known to man...
>
> --
> Like Music?  http://l-i-e.com/artists.htm
>



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




Re: [PHP] Converting PCX to ...

2002-07-09 Thread BB

batch files rock!

:o)

"Bb" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> im having problem getting this converter to work, im running the following
> code:
>
> exec("cmd /c f:; cd \Products\legacyipc\ipc_dev\Chapter 21; convert
test.pcx
> PDF_Cache\test.gif");
>
> which is built from a load of data from a database.
>
> Unfortunatly, nothing happens.
>
> I don't see the new gif, and I don't get any errors.  Nothing
>
> Someone please help,
>
> note: the location of the images cannot be changed
>
> "Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > On Mon, 8 Jul 2002, BB wrote:
> > > I'm writing a reporting system and I have a problem.
> > >
> > > I need to insert PCXs into a PDF (using PDFLib), but it doesn't
support
> > > PCXs.
> > >
> > > So, to get round the problem, I need to convert the PCXs to JPGs or
GIFs
> > >
> > > Does anyone know of a piece of PHP that can do this inline, (by that I
> mean,
> > > can be called and run in PHP script), because the images will have
> additions
> > > and modifications on a regular basis; and they come as PCXs.
> >
> > You can do it with Imagemagick. As I recall, there used to be direct PHP
> > functions for Imagemagick but they have disappeared many versions ago,
so
> > you'll have to run it via system() et al.
> >
> > miguel
> >
>
>



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




Re: [PHP] Converting PCX to ...

2002-07-09 Thread BB

im having problem getting this converter to work, im running the following
code:

exec("cmd /c f:; cd \Products\legacyipc\ipc_dev\Chapter 21; convert test.pcx
PDF_Cache\test.gif");

which is built from a load of data from a database.

Unfortunatly, nothing happens.

I don't see the new gif, and I don't get any errors.  Nothing

Someone please help,

note: the location of the images cannot be changed

"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mon, 8 Jul 2002, BB wrote:
> > I'm writing a reporting system and I have a problem.
> >
> > I need to insert PCXs into a PDF (using PDFLib), but it doesn't support
> > PCXs.
> >
> > So, to get round the problem, I need to convert the PCXs to JPGs or GIFs
> >
> > Does anyone know of a piece of PHP that can do this inline, (by that I
mean,
> > can be called and run in PHP script), because the images will have
additions
> > and modifications on a regular basis; and they come as PCXs.
>
> You can do it with Imagemagick. As I recall, there used to be direct PHP
> functions for Imagemagick but they have disappeared many versions ago, so
> you'll have to run it via system() et al.
>
> miguel
>



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




Re: [PHP] Converting PCX to ...

2002-07-09 Thread BB

Thanks, installed and working

"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mon, 8 Jul 2002, BB wrote:
> > I'm writing a reporting system and I have a problem.
> >
> > I need to insert PCXs into a PDF (using PDFLib), but it doesn't support
> > PCXs.
> >
> > So, to get round the problem, I need to convert the PCXs to JPGs or GIFs
> >
> > Does anyone know of a piece of PHP that can do this inline, (by that I
mean,
> > can be called and run in PHP script), because the images will have
additions
> > and modifications on a regular basis; and they come as PCXs.
>
> You can do it with Imagemagick. As I recall, there used to be direct PHP
> functions for Imagemagick but they have disappeared many versions ago, so
> you'll have to run it via system() et al.
>
> miguel
>



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




Re: Re[2]: [PHP] Session variables

2002-07-08 Thread BB

and to bring it up another level:
>
>

:oP

"Michal Dvoracek" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > 
> >  > ?>>
> > >
> >  > ?>>
> >  > } ?>>
> >  > ?>>
> > >
> > 
>
> better is (IMHO):
> >
> >
>
> Regards,
> Michal Dvoracek  [EMAIL PROTECTED]
>



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




[PHP] Converting PCX to ...

2002-07-08 Thread BB

I'm writing a reporting system and I have a problem.

I need to insert PCXs into a PDF (using PDFLib), but it doesn't support
PCXs.

So, to get round the problem, I need to convert the PCXs to JPGs or GIFs

Does anyone know of a piece of PHP that can do this inline, (by that I mean,
can be called and run in PHP script), because the images will have additions
and modifications on a regular basis; and they come as PCXs.

Anyone?
--BB




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




Re: [PHP] strip_tags

2002-07-01 Thread BB

Well, this is the solution we are providing, I found the error to be because
word is such a wonderful program it puts XML in the middle of HTML, so I
preg'd that out and all was good again!

Thanks anyway peeps

"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mon, Jul 01, 2002 at 04:09:04PM +0100, BB wrote:
>
> Dude, c'mon!  I asked for a "_sample_" for a reason.  First, I didn't want
> to have to wade through a ton of HTML.  Second, it'd help you isolate the
> problem so you could formulate an accurate question and/or figure out the
> answer for yourself.
>
> If you examined where the string got cut off, you'd be able to come up
> with a short sample like this:
>
> #! /usr/local/bin/php -q
> 
> $txt = <<  color=#00>this = "urn:schemas-microsoft-com:office:office"
> />
> sample;
>
> echo "$txt\n";
> echo
strip_tags($txt,"");
> echo "\n";
>
> ?>
>
>
> The output from the sample is...
>
>  face="Times New Roman">this "urn:schemas-microsoft-com:office:office" />
>
> this
>
>
> So, clearly, the  arise in the setting of $txt because echoing $txt comes through fine.
> Therefore the problem is with strip_tags().
>
> Do you want to keep the XML or strip the XML?  I'm guessing you want it
> taken out.  Now, it's time to ask the rest of the folks on the list:
>
> "strip_tags() is being tripped up by  cause strip_tags() to stop processing the rest of the string.  I want the
> XML tags, along with all of the other unwanted HTML tags, ripped out.  Is
> this a bug in strip_tags() or do I need to go about this in anther way?"
>
> --Dan
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



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




Re: [PHP] strip_tags

2002-07-01 Thread BB

OK, this is a 3x3 table pasted in from word! This is the raw HTML

this  is  A   table  pasted  From   a  word  document

This is what happens to it after $txt =
strip_tags($txt,"");

   this

Cut off after the first cell

Help

Thanks in advance

"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mon, Jul 01, 2002 at 12:35:53PM +0100, BB wrote:
> > I'm having a problem using strip_tags.
>
> Sounds like you're using it wrong.  Re-read
> http://www.php.net/manual/en/function.strip-tags.php.  Then fix your code
> accordingly.
>
> If that doesn't work, post a _sample_ of your HTML and PHP that don't
> work.
>
> --Dan
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



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




[PHP] strip_tags

2002-07-01 Thread BB

I'm having a problem using strip_tags.

When I try and run a table through strip_tags with the following vars, it
looses everything after the first cell with content in, i.e: nothing after
the first cell is returned, not even a 

can anyone help?

is this a PHP bug?



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




[PHP] Re: HTML formatting

2002-06-28 Thread BB

THANKS!!!

great help! :oP

"Liljim" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Actually, I just threw in this amendment:
>
> function CleanUpHtml($var)
> {
>
>  $var = preg_replace("!!is", "",
> $var);
>  $var = preg_replace("!!is", " bordercolor='#66' cellpadding=3 cellspacing=0>", $var);
>  $var = str_replace("", "", $var);
>  $var = str_replace("", "", $var);
>  $var = str_replace("", "", $var);
>  $var = str_replace("", "", $var);
>
>  preg_match_all("!<(/?t.*?)>!is", $var, $output);
>
>  if (count($output[0]) > 0)
>  {
>   for($i=0; $i   {
>$var = str_replace($output[0][$i], strtolower($output[0][$i]), $var);
>   }
>  }
>
>  return $var;
> }
>
> and now all of the table tags are lowercase. Much nicer.
>
> -J
>
>



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




[PHP] HTML formatting

2002-06-28 Thread BB

I have assembled a rich text html editor for the web and the code returned
can be quite horrid.

When pasteing from word (as our client wants to), the code returned looks
something like this:





In Waste Management:


Who collects my waste?

Collection Authority

District Councils


Who deals with disposal?

Disposal Authority

County Council


Who plans for the provision of waste sites?

Planning Authority

County Council


Who \'polices\' the waste sites? 

Regulation Authority
 

Environment Agency

Which is grossly OTT.

I would like to extract all the data from a tag and put back in the buts i
want; i.e, get rid of all properies except things like colspan and rowspan,
etc.

I wrote this simple routine to take out ALL the properties but this mucks up
a lot!

$str = preg_replace("/]*)>/i","\\1",$str);
$str = preg_replace("/]*>)/i","\\1",$str);
$str = preg_replace("/]*)>/i","\\1",$str);

can anyone help?



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




[PHP] Re: Fork Or Cron?

2002-06-27 Thread BB

what would the adult/child be doing?

"Apokalyptik" <[EMAIL PROTECTED]> wrote in message
1025128477.26152.23.camel@BlackHole">news:1025128477.26152.23.camel@BlackHole...
> I'm the author of a little used, little cared about ftp indexing script
> (http://www.apokalyptik.com/ftp/) and i'm working on - slowly -
> releasing version 2.0.  Version 1 runs as a cron job (or a daemon) and
> its one monolithic piece of code that handles managing of the queue of
> new and old sites to be scanned, as well as the scanning of these
> sites...
>
> In version 2 I'm looking to seperate these functions into seperate
> mother/daughter daemon processes, and I'm not sure whether it's worth
> the time messing around with the process forking functions in php, or i
> should just make truly seperate file/processes...
>
> Any input would be greatly appreciated.
>
> Thanks in advance!
>



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




Re: [PHP] MySQL Problem with PHP

2002-06-26 Thread BB

I understand about the concat function, but that doesn't really fit into my
scheme of things

I run all text for the web through a function SafeSQL so that values from
the web don't make SQL error or potential hacks occur.

All SafeSQL was doing (for mssql, access and just about any other db) was
$text = preg_replace("/\'/","' + CHAR(39) + '",$text) so when SQL added the
rows with a value of 0 instead of the string I was baffled.

Shame mysql doesn't support inline concatenation

"John Holmes" <[EMAIL PROTECTED]> wrote in message
000701c21d14$fc054370$b402a8c0@mango">news:000701c21d14$fc054370$b402a8c0@mango...
> > INSERT INTO `contracts` (`key`, `content`) VALUES (1,'blah blah blah
> > character 39 is a single speach mark '+CHAR(39)+' blah blah blah')
>
> That's because you are adding strings together, not concatenating them
> (this isn't javascript!)
>
> Use CONCAT() in MySQL to join strings together.
>
> mysql> select 'this'+char(39)+'that';
> ++
> | 'this'+char(39)+'that' |
> ++
> |  0 |
> ++
> 1 row in set (0.03 sec)
>
> mysql> select concat('this',char(39),'that');
> ++
> | concat('this',char(39),'that') |
> ++
> | this'that  |
> ++
> 1 row in set (0.01 sec)
>
> ---John Holmes...
>



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




[PHP] Re: MySQL Problem with PHP

2002-06-26 Thread BB

I just preg_replace("/\'/","\'",$text) and all was good :o)

"David Robley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] says...
> > I am using PHP and MySQL on a 2k dev box to be uploaded to a linux box
> >
> > I have a piece of SQL
> >
> > INSERT INTO `contracts` (`key`, `content`) VALUES (1,'blah blah blah
> > character 39 is a single speach mark '+CHAR(39)+' blah blah blah')
> >
> > Instead of inserting: 'blah blah blah character 39 is a single speach
mark '
> > blah blah blah
> > It inserts 0
> > All variations work fine when there is no single speachies
> >
> > help?
>
> Look into addslashes and the various magic_quotes settings in you r
> php.ini.
>
>
> --
> David Robley
> Temporary Kiwi!
>
> Quod subigo farinam



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




[PHP] MySQL Problem with PHP

2002-06-26 Thread BB

I am using PHP and MySQL on a 2k dev box to be uploaded to a linux box

I have a piece of SQL

INSERT INTO `contracts` (`key`, `content`) VALUES (1,'blah blah blah
character 39 is a single speach mark '+CHAR(39)+' blah blah blah')

Instead of inserting: 'blah blah blah character 39 is a single speach mark '
blah blah blah
It inserts 0
All variations work fine when there is no single speachies

help?



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




[PHP] Re: [PHP-DEV] singleton feature

2002-06-25 Thread BB

I would like to know too,

"Purushotham Komaravolu" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Singleton means only one instance.. i.e. instance of a class per
> webserver... all application scripts should talk only to that same
instance
> irrespective of the request.
> p
>
> - Original Message -
> From: "Alexander Skwar" <[EMAIL PROTECTED]>
> To: "Purushotham Komaravolu" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, June 24, 2002 2:53 PM
> Subject: Re: [PHP-DEV] singleton feature
>
>
> So sprach Purushotham Komaravolu am 2002-06-24 um 11:39:36 -0700 :
> >
> > Hi ,
> >   I have a small suggestion. I guess it is a good feature to
> > have a provision to have a Singleton class per webserver instance. This
is
> > especially useful for maintain user defined connection pools, loggers
etc.
>
> Uhm, what's a "Singleton class"?
>
> Alexander Skwar
> --
> How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
> Homepage: http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
>iso-top.de - Die günstige Art an Linux Distributionen zu kommen
>Uptime: 1 day 11 hours 5 minutes
>
> --
> PHP Development Mailing List 
> 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] Re: PHP and COM

2002-06-24 Thread BB

$DBCon = new COM("ADODB.Connection");
$DBCon->Open('PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=your.mdb');

Function CloseSQL() {
  global $DBCon;
  $DBCon->Close();
  $DBCon = "";
}

Function ExecSQL($SQL) {
  global $DBCon;
  $rs = @$DBCon->Execute($SQL);
  if (!$rs) {
Kill("Error in $SQL");
  } else {
return $rs;
  }
}


"Mindhunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am looking for more examples on PHP and COM.  I've got all the stuff
from
> the manual and the tutorials, but I want more.  Anyone that can help plz?
>
> Tx
> MH
>
>



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




[PHP] Re: php & JavaScript

2002-06-24 Thread BB

Javascript is client side and is not parsed by the server at all

If you are generating javascript with PHP, and it is in an external file, it
still needs a .php extension

Can you be more specific to the problem, paste some code?

"Luis Miguel N. Tavora" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there.
>
> I've tried to include a simple javascript in a .php file,
> but couldn't get it to work.
>
> Actually not even the php code worked at all...
>
> Is there any specific configuration flag that needs to be
> set up in the Apache server so that the javascripts work
> correctly?
>
> Thanks in advance
>
> Luis
>
> PS- Btw, I use an Apache server on a RH72 machine
>
>
>
> --
>Luis Miguel N. Távora
>[EMAIL PROTECTED]
>
>   Message sent via Sylpheed
> sylpheed-claws.sourceforge.net
> --



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




Re: [PHP] URGENT!!! File Uplaod

2002-06-24 Thread BB

It does depend on the usage, but general files are better

"John Holmes" <[EMAIL PROTECTED]> wrote in message
000a01c21b69$74acc170$b402a8c0@mango">news:000a01c21b69$74acc170$b402a8c0@mango...
> > You're completely right - as usual - now for the file handling...
> what's
> > better? Storing it to the DB or as file??
>
> File
>



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




[PHP] Re: Removing Empty Lines from Text??

2002-06-24 Thread BB

$var = preg_replace("/[\r\n]+/","\n",$var);
"Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> neither worked.  any other suggestions?
>
>
> "Bb" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > replace that with
> > $var = preg_replace("/\n+/","\n",$var);
> >
> > "Bb" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > $var = preg_replace("/\n*/","\n",$var);
> > > "Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > Is there an elegant way to remove excess blank lines from my form
> data?
> > > >
> > > > For example;  if someone enters the following text and then press'
the
> > > > Submit button:
> > > >
> > > > 
> > > > This is a some text
> > > >
> > > >
> > > > This is more text, and yet even more
> > > > 
> > > >
> > > > What I want to do is remove the excess white space and make it look
> like
> > > > this?
> > > >
> > > > 
> > > > This is a some text
> > > >
> > > > This is more text, and yet even more
> > > > 
> > > >
> > > > My users may press  too many times and I want to ensure clean
> > text
> > > > and formatting.
> > > >
> > > > Thanks.
> > > > Jason
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



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




[PHP] Re: Removing Empty Lines from Text??

2002-06-24 Thread BB

replace that with
$var = preg_replace("/\n+/","\n",$var);

"Bb" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> $var = preg_replace("/\n*/","\n",$var);
> "Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Is there an elegant way to remove excess blank lines from my form data?
> >
> > For example;  if someone enters the following text and then press' the
> > Submit button:
> >
> > 
> > This is a some text
> >
> >
> > This is more text, and yet even more
> > 
> >
> > What I want to do is remove the excess white space and make it look like
> > this?
> >
> > 
> > This is a some text
> >
> > This is more text, and yet even more
> > 
> >
> > My users may press  too many times and I want to ensure clean
text
> > and formatting.
> >
> > Thanks.
> > Jason
> >
> >
> >
> >
>
>



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




[PHP] Re: === and @

2002-06-24 Thread BB

== compares 2 variables regardless of type ("1" == 1)
=== compares 2 variables with type in mind ("1" !== 1)
@ supresses errors in functions

"Phil Schwarzmann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> What exactly happens when you put three equal-signs together instead of
> just one or two?  I've seen this in other people's code, then search
> php.net and found nothing.
>
> Also, what happens when you put a @ thingy in front of a function?  Does
> it surpress the errors?
>
> Thanks!!
>



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




[PHP] Re: Removing Empty Lines from Text??

2002-06-24 Thread BB

$var = preg_replace("/\n*/","\n",$var);
"Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there an elegant way to remove excess blank lines from my form data?
>
> For example;  if someone enters the following text and then press' the
> Submit button:
>
> 
> This is a some text
>
>
> This is more text, and yet even more
> 
>
> What I want to do is remove the excess white space and make it look like
> this?
>
> 
> This is a some text
>
> This is more text, and yet even more
> 
>
> My users may press  too many times and I want to ensure clean text
> and formatting.
>
> Thanks.
> Jason
>
>
>
>



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




[PHP] Re: URGENT!!! File Uplaod

2002-06-24 Thread BB

http://www.php.net/manual/en/function.is-uploaded-file.php

"César aracena" <[EMAIL PROTECTED]> wrote in message
000901c21b5a$e1aea180$cdc405c8@gateway">news:000901c21b5a$e1aea180$cdc405c8@gateway...
Hi all.

Sorry for this, but a couple of hours ago (imagine. Monday at 3 in the
morning) one of my clients called and asked me to put a Photography
upload for each member of his business and the dead line is in 2 hours.

I've been messing around for the first time with file uploading, but it
seems I keep doing something wrong. I'm using:





Select Photography: 



but phpinfo tells me (Under HTTP_POST_FILES["userfile"]):

Array
(
[name] => picture.jpg
[type] => image/pjpeg
[tmp_name] => none
[size] => 0
)

Why is this??? Also, this is going to be the first time I deal with file
managing. so if you please throw some bones at me.

Thanks very3 much. I'm on dial-up but will stay connected though.

  Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621





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




[PHP] Re: getting the value of a javascript variable

2002-06-24 Thread BB

http://www.mattkruse.com/javascript/dynamicoptionlist/source.html

hope this helps

"Otteneder Hermann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

hi everybody,

i have a short problem:
i have two drop down menues in a form. the content of the second dropdown is
dependent from the selection in the first dropdown menue. now i want write a
short javascript which runs on the onSelect - event of the first dropdown.
this script gives me the selected entry of the first dropdown menue. now i
have to give this value somehow into the PHP-environment for a DB-Query.
The feched data i want dynamically fill into the second dropdown. But how do
I get the value from the javascript variable into the php environment
without an submit of the form?? has enybody a solution for this?

thanx so far - hermann...






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




[PHP] Re: Forum with php

2002-06-19 Thread BB

PHPBB

Use google to search :o)

"Martin Thoma" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello! I saw a lot of forums (or boards) which looks almost the same and
> they are done in php. Is there a free forum-software in php?
>
> Martin
>
>



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




[PHP] Re: parse text

2002-06-19 Thread BB

At a guess, without trying it out

$fp = fopen("your file") or echo "Cant open your file";
$tmp = fread($fp,1024);
preg_match("/(.{8}).(.{5})/",$tmp,$matches);
then $matches[1] will have the first part
and $matches[2] will have the second

note: $matches[0] = whole preg'd text

"Sonjaya" <[EMAIL PROTECTED]> wrote in message
000301c21763$2c10b9d0$c800a8c0@sicute">news:000301c21763$2c10b9d0$c800a8c0@sicute...
> i want read some tex like this
>
> here contens file text
>
> 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
>
>
> 1. i want read from first left until eight caracter (12345678  <--
> caracter i cant read )
> it can be use fread
> 2. i want read 5 from nine (9) caracter  from left  ( 0ABCD <--the
> caracter must i read )
> so anybody can help me
>



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




Re: [PHP] Small CGI Serve

2002-06-19 Thread BB

Because that's how they get there!

"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hail, BB:
>
> On Tue, Jun 18, 2002 at 12:37:29PM +0100, BB wrote:
> >
> > Having finally found out how to pass the Environment vars onto PHP, I am
> > stumpted to find that PHP wasn't reading them and putting them in their
> > place (GET vars).
>
> Why do you think environment variables would wind up in the get variables?
>
>
> > I tried changing the exe from the php-cli to just php.  This now brings
up a
> > security error and I cannot find a solution
>
> And exactly what does the error say?  Contrary to the widely spread
> rumor, we're not psychic.
>
> --Dan
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



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




[PHP] Re: phpmyadmin - moving data from one database to another

2002-06-18 Thread BB

dump all the data to csv and read it in the other end!

"Phil Schwarzmann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> The lazy and worthless a-holes at www.infinitehost.com (my host server)
> are forcing me to move all my MySQL data from one server to another
> because they are too dumb to fix it.
>
> I need to use phpmyadmin to move the data but i'm not %100 sure how to
> do it.  There are some "view dump" commands.  It looks like I can
> somehow download all the data and structure to my local computer, then
> upload it to the new server.
>
> Anyone have any info on this?
>
> THanks!
>



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




[PHP] Re: Sessions : see also "Tracking file downloads"

2002-06-18 Thread BB

This really is like life, PHP Sessions aren't particularly secure, just make
a form to post PHPSESSID of a true session to one of ya pages and you can
"steal" a session!

Its possible to check IPs and so on,

PHP's sessions use text files (by default), and pre-populate
$_SESSION/$HTTP_SESSION_VARS.  They use cookies, if no cookies are allowed,
they append to forms and a hrefs.  This makes them very easy to integrate
into a website because they do it seemlessly.

"Phpcoder" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> HI
> While waiting for responses on my first question, I've done some reading
> on sessions, and came up with the following questions:
> First, I have been coding with PHP for a while without knowing about
> sessions, and have completed a couple of rather large projects without
> using sessions as such, yet, much of what I have read on sessions, I
> have done "manually" already by creating my own unique "id's" and
> passing them on via url to the subsequent pages.
> So, here is my question.
> Is sessions basically just that, made "easier" , or are there
> fundamental differences/advantages. I know (now after reading a bit)
> about the use of cookies etc if availale when using sessions, and that
> you cannot "overwrite" a session variable by passing it via url, but are
> those the only differences? So, basically, do you really HAVE to use
> sessions, or is it like most other things in life; "there are more than
> one way to skin a cat". Are there set "rules" or guidelines to when one
> would definately absolutely have to use sessions?
>
> Thanks
> Hope I make sense...
>
>
>



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




[PHP] Small CGI Serve

2002-06-18 Thread BB

I am trying to write a small CGI webserver.

Having finally found out how to pass the Environment vars onto PHP, I am
stumpted to find that PHP wasn't reading them and putting them in their
place (GET vars).

I tried changing the exe from the php-cli to just php.  This now brings up a
security error and I cannot find a solution

Can anyone help?




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