Re: [PHP] Accessing SMB (Samba perhaps) resources

2004-02-24 Thread Howard Miller
Well, mainly because PHP doesn't (I think) have a mount function. It would mean executing an external command. I always regard that as living a bit dangerously - it can be difficult to write robust code that will recover from a problem that way. Adam Voigt wrote: > Why can't you just mount the s

[PHP] Re: regexp appears to be faulty!?

2004-02-24 Thread Henry Grech-Cini
I came accross this link http://www.alpha-geek.com/2003/12/31/do_not_do_not_parse_html_with_regexs.html "> http://www.alpha-geek.com/2003/12/31/do_not_do_not_parse_html_with_regexs.html Do we all agree or should I keep trying? Henry -- PHP General Mailing List (http://www.php.net/) To unsubsc

RE: [PHP] MySQL update

2004-02-24 Thread Howard Miller
I am prepared to be wrong (but I'm too lazy to go and try it)... does MySql return a detailed enough error message to detect *which* field caused the problem. IIRC, I don't think it does. Anyway *if* it does it will be in here... http://www.mysql.com/doc/en/Error-returns.html DUP UNIQUE I guess

[PHP] Re: MySQL update

2004-02-24 Thread Howard Miller
You can't well, not via PHP anyway. You would need to do a select first to establish if any of these values exist in the database. Something like... select first,last,email from mytable where first=x or last=y or email=z; then check which one of first,last,email is non-empty. BUT.. do you *

RE: [PHP] MySQL update

2004-02-24 Thread Jay Blanchard
[snip] How can I improve on the above to give specific error information. [/snip] Use mysql_error() http://www.php.net/mysql_error -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] MySQL update

2004-02-24 Thread Matthew Oatham
Hi, I have an update statement that tries to update a number of values - these values have unique value constraint so when I do the update it will either succeed or fail. If it fails how can I determine where the update failed. i.e. pinpoint the value that was not unique? At the moment I am do

Re: [PHP] Accessing SMB (Samba perhaps) resources

2004-02-24 Thread Adam Voigt
Why can't you just mount the share on-the-fly when they enter the username and pass? On Tue, 2004-02-24 at 06:11, Howard Miller wrote: > Hi, > > I want to be able to manipulate files that are on my samba file server from > my PHP application. These shares are not normally mounted on my web serve

Re: [PHP] Working with MS-SQL

2004-02-24 Thread Adam Voigt
http://www.freetds.org Enjoy. On Tue, 2004-02-24 at 08:53, [EMAIL PROTECTED] wrote: > Hello, > > How can we connect to MS-SQL Server ? > What tools ( where can we download ) must be installed ? > > Thank a lots. > > PS : the php programs under Linux / Unix... > > Ed. -- Adam Voigt [EMAIL PR

Re: [PHP] regexp appears to be faulty!?

2004-02-24 Thread Henry Grech-Cini
Thanks for that Mike, I was getting lost. Is there anyway to say Any characters excluding the sequence so I could do something like /]*)>(.* whilst not <\/fieldset>)<\/fieldset>/i Or alternatively is there a switch to say get the smallest sequence Thanks Henry "Mike Ford" <[EMAIL PROTECTE

Re: [PHP] About php and mysql

2004-02-24 Thread Jason Wong
On Tuesday 24 February 2004 22:47, [EMAIL PROTECTED] wrote: > Does older than php 4.2.2 support with this function ? As has already been suggested, could you try reading the manual? Please? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web De

[PHP] Re: regexp appears to be faulty (DONT actually think so)

2004-02-24 Thread Henry Grech-Cini
Thanks Sven, You are quite right with your "some probs" comment. Do you know what the the switch is that catches only the least result? I now get (0)= (0)=[hello legendcontent of helloblahgoodbye] (1)= (0)=[ attribute="hello"] (2)= (0)=[hello legendcontent of helloblahgoodbye] as we can see

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

2004-02-24 Thread Victor Spång Arthursson
Hi! Been trying all day to be able to fire off a load data local infile using php, but haven't yet succeded… The setup is as follows: the client should upload a .csv-file to the webserver. Here, php shall issue a load data local infile…-statement to load the data into a mysql-database. The da

[PHP] Re: regexp appears to be faulty (DONT actually think so)

2004-02-24 Thread Sven
Henry Grech-Cini schrieb: ... $regexp="/]*)>[^(<\/fieldset>)]*/i"; ... $result=extractFieldsets('testcontent of helloblahgoodbye'); ... And it produced; (0)= (0)=[con] (1)=[goo] (1)= (0)=[ attribute="hello"] (1)=[ attribute="goodbye"] hi, as it is defined in regex-spec: a '^' inside a char-group

Re: [PHP] About php and mysql

2004-02-24 Thread edwardspl
Does older than php 4.2.2 support with this function ? Matt Matijevich wrote: > > I want to know how to control php program connect to MySQL Database > System ( another computer machine ) ? > > > http://www.php.net/manual/en/function.mysql-connect.php > http://www.php.net/manual/en/function.mys

Re: [PHP] Re: session expired -> how to know if the session is new or old

2004-02-24 Thread Seba
"in the first page of your website, or when you connect for the firs time to it" $_SESSION['first_session_value'] = session_id(); "others pages" if($_SESSION['first_session_value'] != session_id()){ echo "The session has a new value"; } Seba Il mar, 2004-02-24 alle 15:16, Jakes ha s

RE: [PHP] regexp appears to be faulty!?

2004-02-24 Thread Ford, Mike [LSS]
On 24 February 2004 12:40, Henry Grech-Cini wrote: > Hi All, > > function extractFieldsets($subject) > { >$regexp="/]*)>[^(<\/fieldset>)]*/i"; This: [^(<\/fieldset>)] will match any *single* character except the ones listed -- i.e. any character that isn't one of: ()<>/defilst So this: [^(

Re: [PHP] Working with MS-SQL

2004-02-24 Thread Matt Matijevich
But, I want to know is there any tools similar with "php-mssql" for php connect with MS-SQL ? Any other can help ? 1. look at the manual http://php.net/mssql 2. try google 3. search the list archives -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

[PHP] Re: session expired -> how to know if the session is new or old

2004-02-24 Thread Jakes
What do you need this for.? You session is only suppose to last for one browser session "Catalin Trifu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Here is the problem: > > The session gc runs and deletes the session data. This is good, > but calling s

Re: [PHP] Storing Arrays?

2004-02-24 Thread Jakes
rather just serialize() it. didnt read your question properly "Jakes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > depending how long you want to keep it, wrap the array in a object and > then serialize the object in a session variable. > > "Nick Wilson" <[EMAIL PROTECTED]> wrot

Re: [PHP] Storing Arrays?

2004-02-24 Thread Jakes
depending how long you want to keep it, wrap the array in a object and then serialize the object in a session variable. "Nick Wilson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > * and then Jay Blanchard declared > > [snip] > > If I wanted to store an array for future use i

[PHP] session expired -> how to know if the session is new or old

2004-02-24 Thread Catalin Trifu
Hi, Here is the problem: The session gc runs and deletes the session data. This is good, but calling session_start in PHP obviously creates a new session. How can I know if the session was created after an old one was deleted because gc has invalidated it or it is a compl

[PHP] Re: Working with MS-SQL

2004-02-24 Thread Jakes
Make sure you have the dll or so loaded. mssql_connect("IP#", "username", "password"); <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > How can we connect to MS-SQL Server ? > What tools ( where can we download ) must be installed ? > > Thank a lots. > > PS : the php prog

Re: [PHP] Working with MS-SQL

2004-02-24 Thread edwardspl
I know there is a package for Linux / Unix : php-mysql But, I want to know is there any tools similar with "php-mssql" for php connect with MS-SQL ? Any other can help ? Thank for your help ! Ed. Jay Blanchard wrote: > [snip] > How can we connect to MS-SQL Server ? > What tools ( where can w

Re: [PHP] Working with MS-SQL

2004-02-24 Thread Ben Ramsey
As Jay said, check through the manual. The answers you're looking for may be found right here: http://www.php.net/mssql Jay Blanchard wrote: [snip] How can we connect to MS-SQL Server ? What tools ( where can we download ) must be installed ? Thank a lots. PS : the php programs under Linux / U

[PHP] Re: About php and mysql

2004-02-24 Thread Jakes
mysql_connect("IP", "username", "password"); <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > I want to know how to control php program connect to MySQL Database > System ( another computer machine ) ? > > Thank a lots. > > Ed. > > -- PHP General Mailing List (http://www

RE: [PHP] Working with MS-SQL

2004-02-24 Thread Jay Blanchard
[snip] How can we connect to MS-SQL Server ? What tools ( where can we download ) must be installed ? Thank a lots. PS : the php programs under Linux / Unix... [/snip] I usually connect to my servers using cables, but YMMV. Might I suggest that you read some manuals and books? The questions that

[PHP] Working with MS-SQL

2004-02-24 Thread edwardspl
Hello, How can we connect to MS-SQL Server ? What tools ( where can we download ) must be installed ? Thank a lots. PS : the php programs under Linux / Unix... Ed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] About php and mysql

2004-02-24 Thread Matt Matijevich
I want to know how to control php program connect to MySQL Database System ( another computer machine ) ? http://www.php.net/manual/en/function.mysql-connect.php http://www.php.net/manual/en/function.mysql-pconnect.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: session timeout?

2004-02-24 Thread Catalin Trifu
Hi, You have to make the code yourself, After session_start you should check the session for some variable you use to check if the user is logged in eg: C. "Jake McHenry" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] How can I make my site auto log out a use

[PHP] About php and mysql

2004-02-24 Thread edwardspl
Hello, I want to know how to control php program connect to MySQL Database System ( another computer machine ) ? Thank a lots. Ed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Finding out the local path to a file.

2004-02-24 Thread Stuart
Simon Fredriksson wrote: Sadly, none of your tips works. __FILE__ shows the script filename, not to the path of the current dir. Where can I find out more about this kind of constants? Can't see it anywhere in the manual. The problem is this: DocumentRoot (/): D:/Web/htdocs/ Users (/~x/):

[PHP] Re: regexp appears to be faulty (DONT actually think so)

2004-02-24 Thread Henry Grech-Cini
Hi All, I don't actually think regexp is fault. But if anyone could explain this or give me some example code that will extract the attributes and data between a "fieldset" tag pair I would be appreciated. Henry "Henry Grech-Cini" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi

Re: [PHP] where is my uploaded file ?

2004-02-24 Thread Jakes
var_dump($_FILES); "Mike Ford" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 24 February 2004 06:58, adwinwijaya wrote: > > > > > > $uploadfile = $uploaddir . $_FILES['userfile']['name']; > > > Array > > ( > > [image] => Array > > Hint: "image"!="userfile"

[PHP] regexp appears to be faulty!?

2004-02-24 Thread Henry Grech-Cini
Hi All, function extractFieldsets($subject) { $regexp="/]*)>[^(<\/fieldset>)]*/i"; $replacement; $matches=array(); preg_match_all($regexp, $subject, $matches); return ($matches); } $result=extractFieldsets('testcontent of helloblahgoodbye'); echo ""; foreach($result as $key=>$str

RE: [PHP] where is my uploaded file ?

2004-02-24 Thread Ford, Mike [LSS]
On 24 February 2004 06:58, adwinwijaya wrote: > > $uploadfile = $uploaddir . $_FILES['userfile']['name']; > Array > ( > [image] => Array Hint: "image"!="userfile" Cheers! Mike - Mike Ford, Electronic In

RE: [PHP] Security Question

2004-02-24 Thread Ford, Mike [LSS]
On 20 February 2004 22:29, Ed Lazor wrote: > PHP include statements default to the current directory. If > the path to > my PHP files is /home/osmosis/public_html, why would users visiting my > site occasionally get an error that the include file wasn't found in > /home/budguy/public_html? > >

[PHP] Re: Encrypted Zip Files

2004-02-24 Thread Michael Nolan
Howard Miller wrote: Hi (again), I need to unzip (in/from PHP) files that have been zipped using pkzip on a windows machine using a password. Has anybody any thoughts on how to do this. I was just going to call a command line program (if I can find one!), but thought I would ask if there is someth

Re: [PHP] GZIP Question

2004-02-24 Thread Richard Davey
Hello Karl, Tuesday, February 24, 2004, 5:11:40 AM, you wrote: KT> I am using fsockopen with fputs to send some headers to a HTTP server, KT> and I say I accept gzip encoding. The data gets returned and I put it KT> in a variable. However, whichever gzip command I try using in PHP to KT> decompre

Re: [PHP] Finding out the local path to a file.

2004-02-24 Thread Simon Fredriksson
Sadly, none of your tips works. __FILE__ shows the script filename, not to the path of the current dir. Where can I find out more about this kind of constants? Can't see it anywhere in the manual. The problem is this: DocumentRoot (/): D:/Web/htdocs/ Users (/~x/): D:/Web/users/ Stuff1 (/s1

[PHP] Encrypted Zip Files

2004-02-24 Thread Howard Miller
Hi (again), I need to unzip (in/from PHP) files that have been zipped using pkzip on a windows machine using a password. Has anybody any thoughts on how to do this. I was just going to call a command line program (if I can find one!), but thought I would ask if there is something cleverer. Thank

[PHP] Accessing SMB (Samba perhaps) resources

2004-02-24 Thread Howard Miller
Hi, I want to be able to manipulate files that are on my samba file server from my PHP application. These shares are not normally mounted on my web server and it would be inconvenient and yet another administative maintenance task to do so. So... I want to be able to present a form to the user wh

[PHP] Accessing SMB (Samba perhaps) resources

2004-02-24 Thread Howard Miller
Hi, I want to be able to manipulate files that are on my samba file server from my PHP application. These shares are not normally mounted on my web server and it would be inconvenient and yet another administative maintenance task to do so. So... I want to be able to present a form to the user wh

Re: [PHP] newbie question

2004-02-24 Thread Chris Hayes
could it be that this is an old script that requires register_globals to be turned ON or so? if you can read Dutch, read http://www.phpfreakz.nl/artikelen.php?aid=88 At 12:25 24-2-04, you wrote: hi - i don't know much about php, but somehow i managed to install a simple php-guestbook on my webs

[PHP] Your request is being processed

2004-02-24 Thread michael . fdo
You are bad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] newbie question

2004-02-24 Thread wannes
hi - i don't know much about php, but somehow i managed to install a simple php-guestbook on my website: http://www.maanzand.be/guestbookk/readbook.php unfortunately, i cannot get it to work everything seems fine, but i can't manage to write to the guestbook.txt file (permissions are read&write

Re: [PHP] Storing Arrays?

2004-02-24 Thread Chris Hayes
At 11:10 24-2-04, you wrote: Hi all, If I wanted to store an array for future use in a MySQL TEXT Column (dont ask, it's complicated... hehe!) how would I go about it? you could consider serialize() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

Re: [PHP] Storing Arrays?

2004-02-24 Thread Nick Wilson
* and then Jay Blanchard declared > [snip] > If I wanted to store an array for future use in a MySQL TEXT Column > (dont ask, it's complicated... hehe!) how would I go about it? > > I thought of just putting the results of print_r($myarray); into the > text field and using eval() to get at it

RE: [PHP] Storing Arrays?

2004-02-24 Thread Jay Blanchard
[snip] If I wanted to store an array for future use in a MySQL TEXT Column (dont ask, it's complicated... hehe!) how would I go about it? I thought of just putting the results of print_r($myarray); into the text field and using eval() to get at it later... is that the right way to go? [/snip] Yes

RE: [PHP] XML Tool Needed

2004-02-24 Thread Jay Blanchard
[snip] I'm looking for a tool that will parse an xml doc into somthing like an associative array for me. Basically somthing to make life simple when dealing with Amazon XML docs. I have been all thru hotscripts and even tried doing it myself but my time is limited and the tools out there are w

RE: [PHP] RE: Record Counts

2004-02-24 Thread Jay Blanchard
[snip] I did RTFM...I always RTFM first. That was the example in the F Book!. Mark Roberts, Roberts Computing Systems Webmaster Services $29.50/mo $reccount = @mysql_query("select count(*) from mytable where user = 'testuser'); I try this from mysql and get the correct response ( 1 ). However, w

[PHP] Storing Arrays?

2004-02-24 Thread Nick Wilson
Hi all, If I wanted to store an array for future use in a MySQL TEXT Column (dont ask, it's complicated... hehe!) how would I go about it? I thought of just putting the results of print_r($myarray); into the text field and using eval() to get at it later... is that the right way to go? Many tha

[PHP] XML Tool Needed

2004-02-24 Thread Nick Wilson
Hi all, I'm looking for a tool that will parse an xml doc into somthing like an associative array for me. Basically somthing to make life simple when dealing with Amazon XML docs. I have been all thru hotscripts and even tried doing it myself but my time is limited and the tools out there are wa

RE: [PHP] beginners question

2004-02-24 Thread Jason Merrique
So you don't want the form data to be encoded in the url? Something like this would probably do it: That'll just display a button that when pressed will pass $var to input.php > -Original Message- > From: Steve [mailto:[EMAIL PROTECTED] > Sent: 24 February 2004 05:16 > To: [EMAIL

RE: [PHP] PHP Alternative to IFRAME?

2004-02-24 Thread Jason Merrique
You could do it this way: Put the content of the file into a variable: "; if($fp) { while(! feof($fp)) { $content .= fread($fp, 1024); } } ?> Insert the variable into a div tag: Then create a style sheet that defines the properties of the content DIV: