Re: [PHP] REGEX Question

2003-06-18 Thread Don Read

On 17-Jun-2003 Ron Dyck wrote:
 I need to match text between two html comment tags.
 
 I'm using: preg_match(/!--start_tag--(.*)!--end_tag--/, $data,
 $Match)
 
 Which work fine until I have carriage returns. The following doesn't
 match:
 

Use the m (multiline) modifier:

preg_match(/!--start_tag--(.*)!--end_tag--/m, ...

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
   

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



php-general Digest 18 Jun 2003 07:36:47 -0000 Issue 2124

2003-06-18 Thread php-general-digest-help

php-general Digest 18 Jun 2003 07:36:47 - Issue 2124

Topics (messages 151886 through 151931):

PHP.net Manual Magic?
151886 by: Mark D Hiatt
151889 by: CPT John W. Holmes

Re: Translate easy the language of the web site
151887 by: Jacob Marble

Re: Password generator
151888 by: Andrei BEJENARU

Re: Redirecting to index.php from index.html
151890 by: Ralph
151894 by: Michael
151896 by: Jay Blanchard
151898 by: Michael
151909 by: Ralph
151913 by: David Nicholson
151914 by: Michael
151916 by: Ralph
151917 by: David Otton

refreshing fopen
151891 by: Bryan Koschmann - GKT
151893 by: Terje Torkelsen
151902 by: Bryan Koschmann - GKT
151908 by: Lars Torben Wilson

Re: Difference between $_POST[foo] and $_POST['foo']?
151892 by: Ralph
151907 by: Philip Olson

Re: error with null $HTTP_GET_VARS['field']
151895 by: Lars Torben Wilson

Re: bcmod()
151897 by: Lars Torben Wilson

Re: Problems passing variables from Javascript to PHP
151899 by: Daniel

print_r recursion/depth problem
151900 by: jef.eyeintegrated.com

Re: Ini_set with mutiple include directories
151901 by: Jason Wong
151906 by: Mike Morton
151911 by: Lars Torben Wilson

Re: php editor?
151903 by: o_j_p_p.icnet.com.ve
151905 by: Chris Sherwood

Re: need help on coding
151904 by: o_j_p_p.icnet.com.ve

Re: Form Elements - user adding dynamically
151910 by: Nelson Goforth

Re: functions, opinion...
151912 by: Hugh Bothwell

Re: max_execution_time
151915 by: Yann Larrivee

MySQL Connection
151918 by: moses.johnson.btopenworld.com
151919 by: Lars Torben Wilson
151921 by: moses.johnson.btopenworld.com
151923 by: daniel.electroteque.org
151927 by: Lars Torben Wilson

Quick SQL Question
151920 by: Vernon
151922 by: Greg Donald
151924 by: Vernon
151925 by: Greg Donald

Add new loadable module in php
151926 by: Skon Lapamnuaypol

Debuging PHP script
151928 by: Skon Lapamnuaypol

Re: Good Hosting company
151929 by: Cornelius Engelbrecht

Re: REGEX Question
151930 by: Don Read

Re: [PHP-WIN] Password generator
151931 by: Svensson, B.A.T. (HKG)

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---
One of the coolest things I have seen online, and some of you may not even 
know this works, but if you type in the url: http://www.php.net/foo; 
you'll be taken straight to the foo page of the php manual, if one exists. 
If foo doesn't exist, you pull up a Google search-within-the-site page.
 
I haven't been messing with php for very long, but I haven't been able to 
put together all of the pieces for something like this. Is it hugely 
complicated? There's definitely a lot more here than a simple .htaccess 
rewrite. Has anyone thought of any other uses this kind of thing could be 
put to?
 
Mark D Hiatt
Better Documentation Through Science
---End Message---
---BeginMessage---
 One of the coolest things I have seen online, and some of you may not even
 know this works, but if you type in the url: http://www.php.net/foo;
 you'll be taken straight to the foo page of the php manual, if one exists.
 If foo doesn't exist, you pull up a Google search-within-the-site page.

 I haven't been messing with php for very long, but I haven't been able to
 put together all of the pieces for something like this. Is it hugely
 complicated? There's definitely a lot more here than a simple .htaccess
 rewrite. Has anyone thought of any other uses this kind of thing could be
 put to?

It's a custom 404 page, IIRC. Your 404 page simply looks at the URL, grabs
the last part and forwards (using header(), I imagine) to the appropriate
page.

Many other uses for it, too. One that's written about on PHP.net is using
this to make static HTML pages. You have a URL such as domain.com/1234.html,
where that page doesn't exist. Your 404 page looks up product 1234 from the
database, writes an HTML page to disk called 1234.html, then redirects back
to the page. Now subsequent requests for 1234.html pull up the page just
created and do not hit the database at all. To clear everything, simply
delete all of the .html files and they'll be regenerated as they're needed.

I'm sure there are other uses...

---John Holmes...

---End Message---
---BeginMessage---
Exactly, thanks.  Have you guys tried those on-line translators like
Google's?  Another big problem is conjugated verbs in Spanish.  They remind
me of those wacky mad-libs books in elementary school...  :-)
John Hicks [EMAIL PROTECTED] wrote in message

Re: [PHP] php editor?

2003-06-18 Thread Zeev Suraski
This list is not owned by Zend.  One should still not be talking about 
cracking software (Zend or otherwise) on it, though...

Zeev

At 14:51 14/06/2003, Ryan A wrote:
What can i say?
 if you aint living on the edge you're taking up too much space
 I reccomend you don't talk about cracking Zend software on a list owner
 by Zend...


--
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] preg_match warning under windows

2003-06-18 Thread Armand Turpel
Hi,
The following preg_match work fine under linux but under windows I get a 
warning. Why?
  
preg_match([EMAIL PROTECTED]:space:]]?connect[[:space:]]?\([[:space:]]?[\'\]([[:graph:]]*)[\'\][[:space:]]?,[[:space:]]?[\'\]([[:graph:]]*)[\'\][[:space:]]?,[[:space:]]?[\'\]([[:graph:]]*)[\'\][[:space:]]?,[[:space:]]?[\'\]([[:graph:]]*)[\'\][[:space:]]?,[[:space:]]?[\'\]([[:graph:]]*)[\'\][[:space:]]?\)°i,$connect_str,$con))

Warning: Unknown modifier '?'

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


[PHP] odbc_connect

2003-06-18 Thread Wim Paulussen
LS,

I try to get connected to a MSSQL via ODBC (setup with Windows
authentication) , but this is the error I get.

Warning: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login
failed for user 'NT AUTHORITY
\ANONYMOUS LOGON'., SQL state 28000 in SQLConnect


Anyone any ideas ?

Thx,
Wim



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



RE: [PHP] php editor?

2003-06-18 Thread Wim Paulussen
Well said !
More in general , I would like to take the opportunity to thank you and the
Zend team for your contribution with regards to the complete PHP project.

Wim

-Oorspronkelijk bericht-
Van: Zeev Suraski [mailto:[EMAIL PROTECTED]
Verzonden: Wednesday, June 18, 2003 9:50 AM
Aan: Ryan A
CC: [EMAIL PROTECTED]
Onderwerp: Re: [PHP] php editor?


This list is not owned by Zend.  One should still not be talking about
cracking software (Zend or otherwise) on it, though...

Zeev

At 14:51 14/06/2003, Ryan A wrote:
What can i say?
  if you aint living on the edge you're taking up too much space


  I reccomend you don't talk about cracking Zend software on a list owner
  by Zend...



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


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




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



[PHP] Re: chmod?

2003-06-18 Thread Giuliano
Hi Other PHP Users,

i am a new PHP programmer and i love it; I am really at the beginning,
and i have dowloaded some scripts and programs to begin understand
how it works...
(I have installed PHP + MySql + Apache on a Win98 machine).


To install 1 of those programs, the instructions say that I have to:

2. chmod the following:

   store_dir/images chmod to 777
   store_dir/admin/backup to 777
   store_dir/admin/config.php to 777
   store_dir/images/makethumb.txt to 644


What does it means?  chmod? what do i have to do?

Thanks for every help, bye,

Giuliano



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



Re: [PHP] REGEX Question

2003-06-18 Thread SLanger
Hello

Two things:
First wouldn't it be faster to use strpos and substr if you simply have to 
find the literate !-- start_tag -- and !-- end_tag --.
Second: If you use your regex and you have something like
!-- start_tag -- This is some text to grasp!-- end_tag -- this is 
text I don't want !-- start_tag -- This is some other text I want!-- 
end_tag --
The result would be  This is some text to grasp!-- end_tag -- this is 
text I don't want !-- start_tag -- This is some other text I want. 
You should use the  *+ quantifier in order to only grab the content  
This is some text to grasp. 

Regards
Stefan Langer

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



Re: [PHP] Re: chmod?

2003-06-18 Thread Jason Wong
On Wednesday 18 June 2003 16:30, Giuliano wrote:

 i am a new PHP programmer and i love it; I am really at the beginning,
 and i have dowloaded some scripts and programs to begin understand
 how it works...
 (I have installed PHP + MySql + Apache on a Win98 machine).


 To install 1 of those programs, the instructions say that I have to:

 2. chmod the following:

store_dir/images chmod to 777
store_dir/admin/backup to 777
store_dir/admin/config.php to 777
store_dir/images/makethumb.txt to 644


 What does it means?  chmod? what do i have to do?

On a Win98 system there is no need for chmod, you can safely ignore it. To 
find out what chmod is, ask google.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
To err is human, but when the eraser wears out before the pencil,
you're overdoing it a little.
*/


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



[PHP] Problems with quotes in URL

2003-06-18 Thread Petre Agenbag
Hi List

I don't know what I'm doing wrong:

Firstly, I upgraded from 4.0.1 to 4.3.1 and made sure that I have
similar settings in php.ini wrt register_globals and magic_quotes.

I now have problems with some of my apps:


For instance:

IN a mysql db, I would have a name like :[  whatever whatever  ]

I do a select on the table and then echo the name on a page, as well as
add it to a url:

page.php?myvar=$myvar

where $myvar contains the [ whatever whatever ]

Now, when I try to echo $myvar on the page.php, I don't get the entire
story.

I tried to addslashes() before the url line, I tried urlencode() and
htmlspecialchars, all causes an echo  of $myvar on the page.php page to
only display whatever , or, whatever \ but NEVER, whatever whatever


What am I doing wrong?

Thanks



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



[PHP] Re: need help on coding

2003-06-18 Thread Mark Clarkstone

Shien Hang Low [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]



 From: Gabor Hojtsy [EMAIL PROTECTED]
 To: Shien Hang Low [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: Re: need help on coding
 Date: Sun, 15 Jun 2003 12:26:53 +0200

 Please ask support questions at [EMAIL PROTECTED]

 Goba

 Shien Hang Low :
 hi there,
 i am very sorry, previously i have send you an email but it is the email
 wich code is wrong, so this is the correct one. thank you
 i am a php code user and i have below questions and problems
 wish you could help me out and i think it is very easy for you.
 thank you .
 
 problem :
 
 code :
 ?
 $data= message;
 echo $data;
 ?
 
 output :
 message
 ---
 if i want the output to be :
 message
 
 i try to used the below code but fail:
 ?
 $data = message;
 echo $data;
 ?
 
 so i wonder if i want to get the output that with the
 'quatation' mark  how can i do it, your help means alot to me
 thank you for your time and patient .
 
 best regards,
 shienhang
 
 _
 Are you in love? Find a date on MSN Personals http://match.msn.com.my/
 
 

 _
 Download ringtones, logos and picture messages from MSN Malaysia
 http://www.msn.com.my/mobile/ringtones/default.asp




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



Re: [PHP] Problems with quotes in URL

2003-06-18 Thread Chris Hayes

IN a mysql db, I would have a name like :[  whatever whatever  ]

I do a select on the table and then echo the name on a page, as well as
add it to a url:
page.php?myvar=$myvar

where $myvar contains the [ whatever whatever ]

Now, when I try to echo $myvar on the page.php, I don't get the entire
story.
I tried to addslashes() before the url line, I tried urlencode() and
htmlspecialchars, all causes an echo  of $myvar on the page.php page to
only display whatever , or, whatever \ but NEVER, whatever whatever


What does your link in which 'whatever' is look like ?
How do you test to see what is in the variable?
This does the job for me:

?PHP

if ($_GET['x']=='')
{$i='whatever Whatever';
echo 'a href=get.php?x='.urlencode($i).'link/a';
}
else
echo 'x is '.urldecode($_GET['x']);

?

and the url looks like:http://www.X.nl/get.php?x=whatever+%22Whatever%22







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


Re: [PHP] Problems with quotes in URL

2003-06-18 Thread Marek Kilimajer
  ?PHP
if ($_GET['x']=='')
{$i='whatever Whatever';
echo 'a href=get.php?x='.urlencode($i).'link/a';
}
else
echo 'x is '.urldecode($_GET['x']);
Incomming GET values are urldecoded automaticaly, no need to do this.

?

and the url looks 
like:http://www.X.nl/get.php?x=whatever+%22Whatever%22









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


[PHP] RE: [PHP-WIN] Password generator

2003-06-18 Thread Svensson, B.A.T. (HKG)

Create a string which is six char long,
(for instance shop the head and tail
of the first string if you are not able
to generate a six char string)

If you chop an 8 char string and MUST have
the special chars in the string then check
that the chopped char's is not a memember of
the special char's- If they are, regenerate a
new string an loop until they are not

Finally randomize the head and the tail with
you custom algorithm. E.g. an algoritm that
does not contain your 


Med vanliga halsningar fran Amsterdam. =) ;)


-Original Message-
From: Davy Obdam
To: PHP; PHP-WIN; PHP-DB
Sent: 2003-06-17 11:45
Subject: [PHP-WIN] Password generator

Hi people,

I have to make a password generator, but i have a little problem.

- It needs to generate password 8 characters long, and including 1 or 2 
special characters(like #$%*@).
- Those special characters can never appear as the first or last 
character in the string... anywhere between is fine.

I have a password generator script now that does the first thing... but 
the special character can be in front or back of the string wich it 
shouldnt.. i have been looking on the web for this but i havent found 
the answer. Below is my scripts so far.. 

Any help is appreciated, thanks for your time,

Best regards,

Davy Obdam




?php
// A function to generate random alphanumeric passwords in PHP
// It expects to be passed a desired password length, but it
// none is passed the default is set to 8 (you can change this)
function generate_password($length = 8) {

// This variable contains the list of allowable characters
// for the password.  Note that the number 0 and the letter
// 'O' have been removed to avoid confusion between the two.
// The same is true of 'I' and 1
$allowable_characters =
abcdefghefghijklmnopqrstuvwxyz0123456789%#*;
   
// We see how many characters are in the allowable list
$ps_len = strlen($allowable_characters);

// Seed the random number generator with the microtime stamp
// (current UNIX timestamp, but in microseconds)
mt_srand((double)microtime()*100);

// Declare the password as a blank string.
$pass = ;

// Loop the number of times specified by $length
for($i = 0; $i  $length; $i++) {
   
// Each iteration, pick a random character from the
// allowable string and append it to the password.
$pass .= $allowable_characters[mt_rand(0,$ps_len-1)];
   
}

// Retun the password we've selected
return $pass;
}

$password = generate_password();
echo $password;

?

-- 
---
Davy Obdam 
Web application developer

Networking4all
email: [EMAIL PROTECTED]
email: [EMAIL PROTECTED]
internet: http://www.networking4all.com
---




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

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



Re: [PHP] Add new loadable module in php

2003-06-18 Thread Marek Kilimajer
What platform are you running, where did you get php, do you have 
imap.so in the extension directory, did you restart webserver after 
changing its configuration?

Skon Lapamnuaypol wrote:
Hi,
I'm newbie in PHP and tried to install webmail appliction on PHP engine.
That webmail require a module IMAP,but my engine haven't have it yet. I
tried to put a extenstion = imap.so in php.ini. But, the application still
can't detect this module. Can I add php module without recompile PHP source.
Thanks in advance,
Skon L.






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


RE: [PHP] Q : HELP HTML forms parsed into an array for PHP

2003-06-18 Thread Ow Mun Heng
Hi Jason,

Sorry but your code doesn't work. I tried fiddling with it but since
I'm a newbie, I'm a bit lost.


for lines that has '$isbn - should it read '$isbn'?

After submitting the form to itself, I tried to echo the $status, $newisdn
but nothing comes out. 

For The Javascript, can I ask you if it's possible for the focus to go from
Input1 to input2 consequtively? eg:

|-| |-| 
| ISBN Box| | SKU number|  SUBMIT
|-| |-|

Scan at 'ISBN Box', focus goes to 'SKU number' and then subsequently it
submits the data into the server.

Okay.. here's what I'm trying to prove.

I have a bunch of books, which I need to scan in the ISBN  the
corresponding SKU number and then submit it to mySQL.

@ 1st i was thinking I can just scan in the list of ISBN numbers and then go
to another box and scan in the SKU numbers and then input them into MySQL
together(but then I'll be opening up another can of worms to match ISBN to
SKU for each line!). If I do that, I won't be able to determine if there's
duplicate entries before I submit it.

John Holmes solution worked but needed a few tweaks for the \n and \r the
scanner puts in automatically.

If anyone can point me in the right direction, please help. 


Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia 
DID : 03-7870 5168


-Original Message-
From: Jason Paschal [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 17, 2003 11:54 AM
To: Ow Mun Heng
Subject: Re: [PHP] Q : HELP HTML forms parsed into an array for PHP


from what i've experienced w/ bar code scanners, they send a carriage return

after inputting the numbers, so why not just have a page w/ a single input 
text field and a submit button that submits to itself? i threw in some 
javascript, also, that should set focus to the text field when the page 
loads, so if you are scanning in a bunch of items, you scan, it 
automatically submits, and is ready for the next one.
that's the idea, anyway, assuming your bar code scanner is setup to send a 
carriage return signal.

name of page is form.php:

?php
$cn = mysql_connect(localhost,username,password);
$db = mysql_select_db(mydatabase);

if ($status==newisbn) {
  $isbn= trim($isbn);
  $sql = select * from table where isbn = '$isbn;
  $q = mysq_query($sql);
  $nr = mysql_num_rows($q);
  if ($nr  1) {
 $sql = insert into table (isbn) values ('$isbn);
 $q = mysql_query($sql);
 echo Successful insert.br;
  } else {
 echo ISBN already exists.  $newisbnbr;
  }
}
?

html
body onLoad=document.getElementById('isbn').focus()
form name=myform method=post action=form.php
Input:input type=text id=isbn name=isbn
input type=hidden name=status value=newisbn
input type=submit name=submit value=Submit
/form
/body
/html

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 17, 2003 10:34 AM
To: Ow Mun Heng
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Q : HELP HTML forms parsed into an array for PHP

$isbn_string = (' . str_replace(\n,'),\n(',$_POST['isbn']) . ');
$query = INSERT INTO table VALUES $isbn_string;

-- 
---John Holmes...

From: Ow Mun Heng [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] Q : HELP HTML forms parsed into an array for PHP
Date: Tue, 17 Jun 2003 10:27:46 +0800

Hi all,

   Really hope someone can help me out.

What I would like to do is to input multiple isbn numbers into a form, get
PHP to parse it into an array so that I can build the SQL query for 
multiple
insert. Currently I'm able to perform single inputs, one at a time, which 
is
time consuming.

I want to have a formtextarea name=isbn row=10 col=13 set up to get user
input (multiline, each line separated by a carriage return - actually it's
barcode is scanned in)
   eg : ISBN - 1-111-2-1
   1-111-2-2
   1-111-2-3

I would like to parse this data into PHP and get PHP to use a foreach loop
(or a for loop) so that I can build up the $query to form ('isbn1')
('isbn2') ('isbn3').

I'm trying to insert into mySQL a multiple value insert sort of like

$query =   insert into table values
   ('isbn1')
   ('isbn2')
   ('isbn3');


Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168


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


_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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



RE: [PHP] error with null $HTTP_GET_VARS['field']

2003-06-18 Thread Ford, Mike [LSS]
 -Original Message-
 From: Logan McKinley [mailto:[EMAIL PROTECTED]
 Sent: 17 June 2003 19:55
 
 right now if a the 'field' key does not exist at all in the 
 querystring it
 returns the following error:
 Notice: Undefined index: Register in 
 c:\inetpub\wwwroot\PHP\Register.php on
 line 3
 I think i can use the empty function but i pass in 11 
 different variables
 and it seems like there must be a more eligant way to prevent 
 the error then
 with 11 individual if statements.  Is there a way in which it 
 will return a
 value even if the key does not exist in the querystring.

Yes -- you can use the @ silence operator:

   @$_GET['field']

will silently return NULL if the index 'field' doesn't exist in the $_GET
array (or if the $_GET array itself doesn't exist!).

Some might regard this as a kludge, but I don't see it that way -- if the
operator is provided as part of the language, using it knowledgeably and
judiciously seems like a perfectly valid technique to me.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

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



[PHP] strip tags not working - any ideas ?

2003-06-18 Thread Neil
Hello all

I am trying to strip all HTML and other tags from a document, I have 
read the docs and written a 4 line script that should do the job (from 
my point of view ! ). However it seems to have literally no effect.

Heres the script :

?
$file=readfile(http://namx.co.uk/webstats/;);
if (!($string = strip_tags($file))) print br error ! br;
$strings = strtolower($string);
print strings: $strings;
?
It doesnt lower case anything and it no strips no tags at , bascially 
its still the same source as it was unchanged. Obviously theres 
something I am missing here, but what ?

Thanks for your thoughts

Neil

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


RE: [PHP] Installation

2003-06-18 Thread esctoday.com | Wouter van Vliet
If you're using a RedHat linux distribution .. have you also installed the
php-mysql package .. I'm not totally sure about it's name, just give a
search for either mysql or php on the redhat network (rhn.redhat.com) and
you'll see that there's a package for php to connect with mysql ... Not sure
if it will help you, but you can at least try ... or smth,

Wouter

-Oorspronkelijk bericht-
Van: Anand Tomar [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 17 juni 2003 18:01
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Installation


Hi,

i tried installing mysql-4.1.0-alpha, apache, php4.3.2. now the issue is
that i have all the 3 application running and interacting with each other in
sync but every time i try to connect to mysql through php it gives me
this error:

Warning: mysql_connect(): Client does not support authentication protocol
requested by server. Consider upgrading MySQL client

this is the 1st time i am trying to set up a server i will really appreciate
your helpthanks

--anand


--
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] Help needed

2003-06-18 Thread Shishir Kumar Mishra
Hi List,

Is it possible to read XML data and return as string to browser (as string)?  
I do have css file but I need to get data from database and create a XML string  (with 
the css file). This xml string has to be returned in browser(I.E.) rather than as XML 
file. 

regards.. 
Shishir Kumar Mishra




Re: [PHP] strip tags not working - any ideas ?

2003-06-18 Thread Jason Wong
On Wednesday 18 June 2003 18:27, Neil wrote:

 I am trying to strip all HTML and other tags from a document, I have
 read the docs and written a 4 line script that should do the job (from
 my point of view ! ). However it seems to have literally no effect.

 Heres the script :


 ?
 $file=readfile(http://namx.co.uk/webstats/;);

$file is an array ...

 if (!($string = strip_tags($file))) print br error ! br;
 $strings = strtolower($string);

.. you're trying to perform string ops on an array.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Every path has its puddle.
*/


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



Re: [PHP] Add new loadable module in php

2003-06-18 Thread Skon Lapamnuaypol
We use PHP 4.3.1 on Apache 1.3.27 (RedHat 7.3).  We got a binary PHP rpm
package from rpmfind.com. The problem occurred on v-webmail from
phpguru.org. I already copied imap.so into /usr/lib/php4 and add an
extension of imap.so on /etc/php.ini, then restart httpd. But, the
application still can't see the imap module.
I wonder that in the extension of php.ini, all of extension (.dll - windows
platform) was commmented only mysql.so and imap.so were added. But, phpinfo
command show a lot of loadable module. Just curious that where does phpinfo
get the information from.

- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Skon Lapamnuaypol [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 4:43 PM
Subject: Re: [PHP] Add new loadable module in php


 What platform are you running, where did you get php, do you have
 imap.so in the extension directory, did you restart webserver after
 changing its configuration?

 Skon Lapamnuaypol wrote:
  Hi,
  I'm newbie in PHP and tried to install webmail appliction on PHP engine.
  That webmail require a module IMAP,but my engine haven't have it yet. I
  tried to put a extenstion = imap.so in php.ini. But, the application
still
  can't detect this module. Can I add php module without recompile PHP
source.
 
  Thanks in advance,
  Skon L.
 
 
 
 
 



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



[PHP] Sharing Encrypted (TripleDES) Token between PHP .NET

2003-06-18 Thread Skex
Can anyone shed any light on why when I encrypt a string $str using
Initialisation Vector $iv TripleDES (ECB mode)
 I get different results on .NET platform when compared to php?

I am attempting to interface to a third party (.NET) host and we need to be
able to both create shared secret tokens but we keep getting different
results which are unusable...

Any thoughts or anybody got any experience trying this?

Much appreciated

Skex



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



Re: [PHP] strip tags not working - any ideas ?

2003-06-18 Thread Neil
Jason Wong wrote:
On Wednesday 18 June 2003 18:27, Neil wrote:


I am trying to strip all HTML and other tags from a document, I have
read the docs and written a 4 line script that should do the job (from
my point of view ! ). However it seems to have literally no effect.
Heres the script :

?
$file=readfile(http://namx.co.uk/webstats/;);


$file is an array ...


if (!($string = strip_tags($file))) print br error ! br;
$strings = strtolower($string);


.. you're trying to perform string ops on an array.

Normally if you to to print() an array, you get Array returned.
This is not the case, I know that file() returns arrays, but i think 
readfile() returns a string.

any other ideas ?

Neil

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


Re: [PHP] strip tags not working - any ideas ?

2003-06-18 Thread John W. Holmes
Jason Wong wrote:
On Wednesday 18 June 2003 18:27, Neil wrote:
I am trying to strip all HTML and other tags from a document, I have
read the docs and written a 4 line script that should do the job (from
my point of view ! ). However it seems to have literally no effect.
Heres the script :

?
$file=readfile(http://namx.co.uk/webstats/;);
$file is an array ...
Actually, it's an integer telling how many bytes was read by readfile().

us2.php.net/readfile


if (!($string = strip_tags($file))) print br error ! br;
$strings = strtolower($string);


.. you're trying to perform string ops on an array.

you mean an integer...

Use fopen() or file() to actually read the file data into a variable.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





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


Re: [PHP] strip tags not working - any ideas ?

2003-06-18 Thread John W. Holmes
Neil wrote:
 I know that file() returns arrays, but i think
readfile() returns a string.
Stop thinking and read the manual. :)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals  www.phparch.com





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


[PHP] CSS help

2003-06-18 Thread Angelo Zanetti
Hi guys sorry for the off topic post.

i am not getting any success with Css @ the moment.

What I need is basically a class in my CSS file that defines everything about A links.

I have this class but it aint working (i know its wrong):

.sideMenu {

hover{color:white};
visited  {color: black};
visited:hover {color:white};
a:text-decoration : none;

}
 
should this be:

.sideMenu{
 
a-hover color:white;
 
}

??? 

please help me.

thanx.


Re: [PHP] strip tags not working - any ideas ?

2003-06-18 Thread Neil
John W. Holmes wrote:
Jason Wong wrote:

On Wednesday 18 June 2003 18:27, Neil wrote:

I am trying to strip all HTML and other tags from a document, I have
read the docs and written a 4 line script that should do the job (from
my point of view ! ). However it seems to have literally no effect.
Heres the script :

?
$file=readfile(http://namx.co.uk/webstats/;);


$file is an array ...


Actually, it's an integer telling how many bytes was read by readfile().

us2.php.net/readfile


if (!($string = strip_tags($file))) print br error ! br;
$strings = strtolower($string);


.. you're trying to perform string ops on an array.

you mean an integer...

Use fopen() or file() to actually read the file data into a variable.

Indeed fopen and fread works fine. Thanks for the heads up

Neil

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


Re: [PHP] Add new loadable module in php

2003-06-18 Thread Neil
Skon Lapamnuaypol wrote:
We use PHP 4.3.1 on Apache 1.3.27 (RedHat 7.3).  We got a binary PHP rpm
package from rpmfind.com. The problem occurred on v-webmail from
phpguru.org. I already copied imap.so into /usr/lib/php4 and add an
extension of imap.so on /etc/php.ini, then restart httpd. But, the
application still can't see the imap module.
I wonder that in the extension of php.ini, all of extension (.dll - windows
platform) was commmented only mysql.so and imap.so were added. But, phpinfo
command show a lot of loadable module. Just curious that where does phpinfo
get the information from.
- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Skon Lapamnuaypol [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 4:43 PM
Subject: Re: [PHP] Add new loadable module in php


What platform are you running, where did you get php, do you have
imap.so in the extension directory, did you restart webserver after
changing its configuration?
Skon Lapamnuaypol wrote:

Hi,
I'm newbie in PHP and tried to install webmail appliction on PHP engine.
That webmail require a module IMAP,but my engine haven't have it yet. I
tried to put a extenstion = imap.so in php.ini. But, the application
still

can't detect this module. Can I add php module without recompile PHP
source.

Thanks in advance,
Skon L.








Hello

Where modules are concerned , you will need to stop and then start 
apache , as a reload/restart does not check for modules changes . I am 
not 100% sure of my explanation, but i know in pratice this is the case.

Cheers

Neil

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


RE: [PHP] Add new loadable module in php

2003-06-18 Thread Brian S. Drexler
I've run into a similar situation before because my default PHP install was
not using the php.ini in /etc/ .  In your phpinfo() does it list
/etc/php.ini for the ini file or is something else listed?

-Original Message-
From: Neil [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 7:19 AM
To: [EMAIL PROTECTED]; Skon Lapamnuaypol
Cc: Marek Kilimajer
Subject: Re: [PHP] Add new loadable module in php


Skon Lapamnuaypol wrote:
 We use PHP 4.3.1 on Apache 1.3.27 (RedHat 7.3).  We got a binary PHP rpm
 package from rpmfind.com. The problem occurred on v-webmail from
 phpguru.org. I already copied imap.so into /usr/lib/php4 and add an
 extension of imap.so on /etc/php.ini, then restart httpd. But, the
 application still can't see the imap module.
 I wonder that in the extension of php.ini, all of extension (.dll -
windows
 platform) was commmented only mysql.so and imap.so were added. But,
phpinfo
 command show a lot of loadable module. Just curious that where does
phpinfo
 get the information from.

 - Original Message -
 From: Marek Kilimajer [EMAIL PROTECTED]
 To: Skon Lapamnuaypol [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2003 4:43 PM
 Subject: Re: [PHP] Add new loadable module in php



What platform are you running, where did you get php, do you have
imap.so in the extension directory, did you restart webserver after
changing its configuration?

Skon Lapamnuaypol wrote:

Hi,
I'm newbie in PHP and tried to install webmail appliction on PHP engine.
That webmail require a module IMAP,but my engine haven't have it yet. I
tried to put a extenstion = imap.so in php.ini. But, the application

 still

can't detect this module. Can I add php module without recompile PHP

 source.

Thanks in advance,
Skon L.









Hello

Where modules are concerned , you will need to stop and then start
apache , as a reload/restart does not check for modules changes . I am
not 100% sure of my explanation, but i know in pratice this is the case.

Cheers

Neil


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


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



Re: [PHP] CSS help

2003-06-18 Thread Lowell Allen
 From: Angelo Zanetti [EMAIL PROTECTED]
 
 Hi guys sorry for the off topic post.
 
 i am not getting any success with Css @ the moment.
 
 What I need is basically a class in my CSS file that defines everything about
 A links.
 
 I have this class but it aint working (i know its wrong):
 
 ..sideMenu {
 
 hover{color:white};
 visited  {color: black};
 visited:hover {color:white};
 a:text-decoration : none;
 
 }
 
 should this be:
 
 ..sideMenu{
 
 a-hover color:white;
 
 }
 
 ??? 
 
 please help me.

Yes, this is very off-topic. You should post to the css-d list --
http://www.css-discuss.org/mailman/listinfo/css-d. Meanwhile, try
something like this:

a  { font-weight: bold; text-decoration: none }
a:link{ color: #339; text-decoration: none }
a:visited   { color: #036; text-decoration: none }
a:hover{ color: #fff; text-decoration: none; background-color: #339 }
a:active{ color: #fff; text-decoration: none }

--
Lowell Allen



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



Re: [PHP] Add new loadable module in php

2003-06-18 Thread Marek Kilimajer
Check apache logs, or run php from command line.

Skon Lapamnuaypol wrote:
We use PHP 4.3.1 on Apache 1.3.27 (RedHat 7.3).  We got a binary PHP rpm
package from rpmfind.com. The problem occurred on v-webmail from
phpguru.org. I already copied imap.so into /usr/lib/php4 and add an
extension of imap.so on /etc/php.ini, then restart httpd. But, the
application still can't see the imap module.
I wonder that in the extension of php.ini, all of extension (.dll - windows
platform) was commmented only mysql.so and imap.so were added. But, phpinfo
command show a lot of loadable module. Just curious that where does phpinfo
get the information from.
- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Skon Lapamnuaypol [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 4:43 PM
Subject: Re: [PHP] Add new loadable module in php


What platform are you running, where did you get php, do you have
imap.so in the extension directory, did you restart webserver after
changing its configuration?
Skon Lapamnuaypol wrote:

Hi,
I'm newbie in PHP and tried to install webmail appliction on PHP engine.
That webmail require a module IMAP,but my engine haven't have it yet. I
tried to put a extenstion = imap.so in php.ini. But, the application
still

can't detect this module. Can I add php module without recompile PHP
source.

Thanks in advance,
Skon L.









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


Re: [PHP] go through array

2003-06-18 Thread Diana Castillo
thanks, now if I want to take off the first element how can I do it and also
get the key back as well ? If I do an array shift that resets the keys and I
dont want to do that.


David Nicholson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello,


This is a reply to an e-mail that you wrote on Tue, 17 Jun 2003 at 17:43,
lines prefixed by '' were originally written by you.

 I have this array:
 Array ( [2] = 6 [1] = 2 [3] = 2 )
 how do I go through it and get the key and the value in this order?

Use the foreach construct, it is documented at:
http://uk2.php.net/foreach

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

  Professional Web Development by David Nicholson
http://www.djnicholson.com/

QuizSender.com - How well do your friends actually know you?
 http://www.quizsender.com/
(developed entirely in PHP)



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



[PHP] AOL and PHP

2003-06-18 Thread rml
I have recently created a site that has some PHP in it.  It works fine in
all browsers except AOL.  I can see some of the PHP page in AOL except the
one that fetches information from MySQL database.  I also host my own server
for this site.  Maybe this is a server setting or securtity issue.  Anyone
see this before?

Thanks.



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



RE: [PHP] AOL and PHP

2003-06-18 Thread Jay Blanchard
[snip]
I have recently created a site that has some PHP in it.  It works fine
in
all browsers except AOL.  I can see some of the PHP page in AOL except
the
one that fetches information from MySQL database.  I also host my own
server
for this site.  Maybe this is a server setting or securtity issue.
Anyone
see this before?
[/snip]

Since PHP and MySQL are server-side technologies there should be no
browser conflict. I would suggest looking closely at your HTML, CSS,
JavaScript, and anything else that you may be using client-side for
code.

HTH!

Jay

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



[PHP] array_shift

2003-06-18 Thread Diana Castillo
how can I do an array shift without reseting the keys?
how can I get the key of the first element removed with an array _shift?
thanks.



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



Re: [PHP] Problems with quotes in URL

2003-06-18 Thread Petre Agenbag
OK, this is the URL that my code produces after it get's the my_var from
the mysql table.
my_var in the table is = whatever whatever  whatever whatever

So I do a select and I do a $my_var = $myrow['my_var'] (after all the
proper mumbo jumbo about the $myrow = mysql_fetc_assoc...etc.)

I then do a $my_var = addslashes($my_var)as well as $my_var =
urlencode($my_var).
 Then I simply create a link like so:

echo 'a href=page.php?my_var='.$my_var.'next_var=blablalink/a';

Clicking on that link displays exactly the following in the browser's
URL location:

page.php?my_var=whatever+whatever++%5C%22whatever+whatever%5C%22next_var=blabla

And now, on page.php

If I do an 

echo stripslashes($my_var);

I get exactly this:

whatever whatever \


What am I missing?





On Wed, 2003-06-18 at 11:18, Chris Hayes wrote:
 IN a mysql db, I would have a name like :[  whatever whatever  ]
 
 I do a select on the table and then echo the name on a page, as well as
 add it to a url:
 
 page.php?myvar=$myvar
 
 where $myvar contains the [ whatever whatever ]
 
 Now, when I try to echo $myvar on the page.php, I don't get the entire
 story.
 
 I tried to addslashes() before the url line, I tried urlencode() and
 htmlspecialchars, all causes an echo  of $myvar on the page.php page to
 only display whatever , or, whatever \ but NEVER, whatever whatever
 
 
 What does your link in which 'whatever' is look like ?
 How do you test to see what is in the variable?
 
 
 This does the job for me:
 
 ?PHP
 
 if ($_GET['x']=='')
 {$i='whatever Whatever';
 echo 'a href=get.php?x='.urlencode($i).'link/a';
 
 }
 else
 
 echo 'x is '.urldecode($_GET['x']);
 
 ?
 
 and the url looks like:http://www.X.nl/get.php?x=whatever+%22Whatever%22
 
 
 
 
 
 


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



Re: [PHP] Re: php editor?

2003-06-18 Thread Alberto Ferrer
im use PHPcoder too, and the best :) http://devphp.sourceforge.net/ , and in
Linux Zend Studio :)

--
--
Alberto Ferrer
[EMAIL PROTECTED]
  http://www.barrahome.org
--
Syntax Error in KITCHEN.H: COFFEE not found.
Chris Sherwood [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 I use PHPCoder Pro and it works great... hook it into your php and apache
 engines and you can run and debug while coding


 - Original Message -
 From: Noel Wade [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, June 16, 2003 9:57 AM
 Subject: Re: [PHP] Re: php editor?


  My favorite little gem is a shareware program called Code-Genie
  (www.code-genie.com).  Its cheap, fast, a slim app, provides tons of
  useful little features, and has TOTALLY user-configurable text-coloring.
  You can specify a particular coloring scheme for each file extension, so
 it
  automatically picks the scheme for the type of programming you're
doing -
  very handy!  Comes with schemes for all of the most common / simple
  programming languages, plus plenty of user-made files for download, too!
 
  It doesn't have any real debugging features, nor can it do fancy things
 like
  track your custom object-functions and color them or present their
  arguments - but for a quick, simple, helpful tool - its just perfect!
 
  Take care,
 
  --Noel
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 




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



Re: [PHP] Problems with quotes in URL

2003-06-18 Thread Chris Hayes
(cutted the part about sending a var as get)

page.php?my_var=whatever+whatever++%5C%22whatever+whatever%5C%22next_var=blabla
ok so here the variable is still complete, including slashes and quotes.


And now, on page.php

If I do an

echo stripslashes($my_var);

I get exactly this:

whatever whatever \
i get better results with

echo stripslashes(urldecode($_GET['my_var']));
(or in your version
echo stripslashes(urldecode($my_var));
)
this even though Marek  said Incomming GET values are urldecoded 
automaticaly, no need to do this. (this=urldecode)



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


Re: [PHP] Install

2003-06-18 Thread Chris Hayes
At 14:39 18-6-03, you wrote:
Hi,

i tried installing mysql-4.1.0-alpha, apache, php4.3.2 on windows2000Pro.
now the issue is that i have all the 3 application running and interacting
with each other in
sync but every time i try to connect to mysql through php it gives me
this error:
Warning: mysql_connect(): Client does not support authentication protocol
requested by server. Consider upgrading MySQL client
this is the 1st time i am trying to set up a server i will really appreciate
your helpthanks
--anand
If this is your first time, let's start by getting mysql's stable version 
and not the alpha (alpha is even more testphase than beta!)



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


Re: [PHP] Problems with quotes in URL - SOLVED - plz FLAME me!!!

2003-06-18 Thread Petre Agenbag
Hi lists ( and all the guys trying to help me)

Firstly

SORRY, I oversimplified my examples that I posted in the hope that I
would get to the solution faster.

What i failed to mention in my stupidity, was that I echoed the variable
as the value of a form input text field, so I actually messed up the
HTML, and I just realized it, and a simple $var = htmlspecialchars($var)
does the trick beautifully.

Again
Sorry guys, I really should have known better than to post stripped down
code as the problem is usually a simple thing like this...

Just for the by-and-by, my previous claims to having a perfectly
working application before upgrading to 4.3.1 was also then a load of
bull, and I only realized now that my app had this bug in it all the
time!

Just goes to show.

Anyway, I deserve a good flaming for this one! 

I'm ready;)




On Wed, 2003-06-18 at 14:39, Chris Hayes wrote:
 (cutted the part about sending a var as get)
 
 page.php?my_var=whatever+whatever++%5C%22whatever+whatever%5C%22next_var=blabla
 ok so here the variable is still complete, including slashes and quotes.
 
 
 And now, on page.php
 
 If I do an
 
 echo stripslashes($my_var);
 
 I get exactly this:
 
 whatever whatever \
 
 i get better results with
 
 echo stripslashes(urldecode($_GET['my_var']));
 (or in your version
 echo stripslashes(urldecode($my_var));
 )
 
 
 this even though Marek  said Incomming GET values are urldecoded 
 automaticaly, no need to do this. (this=urldecode)
 
 


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



Re: [PHP] CSS help

2003-06-18 Thread Brian V Bonini
On Wed, 2003-06-18 at 07:14, Angelo Zanetti wrote:
 Hi guys sorry for the off topic post.
 
 i am not getting any success with Css @ the moment.
 
 What I need is basically a class in my CSS file that defines everything about A 
 links.
 
 I have this class but it aint working (i know its wrong):
 
 .sideMenu {
 
 hover{color:white};
 visited  {color: black};
 visited:hover {color:white};
 a:text-decoration : none;
 
 }
  
 should this be:
 
 .sideMenu{
  
 a-hover color:white;
  

I'm not exactly sure what your tying to do, your example it too poor to
accurately interpret but

To define styles for the 'a' element with a class identifier of
'sideMenu':

a.sideMenu:link,a.sideMenu:active,a.sideMenu:visited {
color: #00;
text-decoration: none;
}

a.sideMenu:hover { color: #ff; }


http://www.w3.org/TR/REC-CSS2/selector.html#link-pseudo-classes


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



RE: [PHP] Problems with quotes in URL - SOLVED - plz FLAME me!!!

2003-06-18 Thread Aaron Gould
Oh come on now, we don't flame people, or even engage in name-calling for
that matter on this list...  :)

We all learn our lessons.

--
Aaron Gould
Web Developer
Parts Canada

 

-Original Message-
From: Petre Agenbag [mailto:[EMAIL PROTECTED] 
Sent: June 18, 2003 8:49 AM
To: Chris Hayes
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Problems with quotes in URL - SOLVED - plz FLAME me!!!


Hi lists ( and all the guys trying to help me)

Firstly

SORRY, I oversimplified my examples that I posted in the hope that I
would get to the solution faster.

What i failed to mention in my stupidity, was that I echoed the variable
as the value of a form input text field, so I actually messed up the
HTML, and I just realized it, and a simple $var = htmlspecialchars($var)
does the trick beautifully.

Again
Sorry guys, I really should have known better than to post stripped down
code as the problem is usually a simple thing like this...

Just for the by-and-by, my previous claims to having a perfectly
working application before upgrading to 4.3.1 was also then a load of
bull, and I only realized now that my app had this bug in it all the
time!

Just goes to show.

Anyway, I deserve a good flaming for this one! 

I'm ready;)




On Wed, 2003-06-18 at 14:39, Chris Hayes wrote:
 (cutted the part about sending a var as get)
 

page.php?my_var=whatever+whatever++%5C%22whatever+whatever%5C%22next_var=b
labla
 ok so here the variable is still complete, including slashes and quotes.
 
 
 And now, on page.php
 
 If I do an
 
 echo stripslashes($my_var);
 
 I get exactly this:
 
 whatever whatever \
 
 i get better results with
 
 echo stripslashes(urldecode($_GET['my_var']));
 (or in your version
 echo stripslashes(urldecode($my_var));
 )
 
 
 this even though Marek  said Incomming GET values are urldecoded 
 automaticaly, no need to do this. (this=urldecode)
 
 


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


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



Re: [PHP] Problems with quotes in URL - SOLVED - plz FLAME me!!!

2003-06-18 Thread CPT John W. Holmes
No, I'm all for a public flaming... let him serve as an example to others!!
:)

In all honesty, I have posted about the htmlentities/htmlspecialchars()
requirement when putting data in form inputs quite a lot recently. You
should have picked up on it sooner. :) Oh well, though... at least you know
now... AND KNOWING IS HALF THE BATTLE!

---John Holmes...

- Original Message - 
From: Aaron Gould [EMAIL PROTECTED]
To: 'Petre Agenbag' [EMAIL PROTECTED]; 'Chris Hayes'
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 8:59 AM
Subject: RE: [PHP] Problems with quotes in URL - SOLVED - plz FLAME me!!!


Oh come on now, we don't flame people, or even engage in name-calling for
that matter on this list...  :)

We all learn our lessons.

--
Aaron Gould
Web Developer
Parts Canada



-Original Message-
From: Petre Agenbag [mailto:[EMAIL PROTECTED]
Sent: June 18, 2003 8:49 AM
To: Chris Hayes
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Problems with quotes in URL - SOLVED - plz FLAME me!!!


Hi lists ( and all the guys trying to help me)

Firstly

SORRY, I oversimplified my examples that I posted in the hope that I
would get to the solution faster.

What i failed to mention in my stupidity, was that I echoed the variable
as the value of a form input text field, so I actually messed up the
HTML, and I just realized it, and a simple $var = htmlspecialchars($var)
does the trick beautifully.

Again
Sorry guys, I really should have known better than to post stripped down
code as the problem is usually a simple thing like this...

Just for the by-and-by, my previous claims to having a perfectly
working application before upgrading to 4.3.1 was also then a load of
bull, and I only realized now that my app had this bug in it all the
time!

Just goes to show.

Anyway, I deserve a good flaming for this one!

I'm ready;)




On Wed, 2003-06-18 at 14:39, Chris Hayes wrote:
 (cutted the part about sending a var as get)


page.php?my_var=whatever+whatever++%5C%22whatever+whatever%5C%22next_var=b
labla
 ok so here the variable is still complete, including slashes and quotes.


 And now, on page.php
 
 If I do an
 
 echo stripslashes($my_var);
 
 I get exactly this:
 
 whatever whatever \

 i get better results with

 echo stripslashes(urldecode($_GET['my_var']));
 (or in your version
 echo stripslashes(urldecode($my_var));
 )


 this even though Marek  said Incomming GET values are urldecoded
 automaticaly, no need to do this. (this=urldecode)




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


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


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



[PHP] RE: your mail

2003-06-18 Thread Lambrecht Joris
Hi People,

The below output is quite strange since i think to have set up php.ini
correctly. I simply ran a php_w32api demo script and took care of all i know
wich had to be configured. I'm not sure what this message really means, is
it either the dl() function i should be paying attention to or is it
something with the php_w32api.dll extension ? Maybe i need to upgrade
something here ?

Somehow it 'feels' to be related to the netdll.dll not executing the example
script as well.

Can someone please supply me with some feedback on this dl()/w32api issue ?

Thank You.

-- output ---

Warning: dl() [function.dl.html]: Not supported in multithreaded Web servers
- use extension statements in your php.ini in
c:\inetpub\intranet\php\info.php on line 7

Fatal error: Call to undefined function: w32api_register_function() in
c:\inetpub\intranet\php\info.php on line 9

-/- output -/-

--- php.ini ---

; Directory in which the loadable extensions (modules) reside.
extension_dir = c:\appserv\php\extensions\

; Whether or not to enable the dl() function.  The dl() function does NOT
work
; properly in multithreaded servers, such as IIS or Zeus, and is
automatically
; disabled on them.
enable_dl = Off

;extension=php_sybase_ct.dll
extension=php_w32api.dll
;extension=php_xmlrpc.dll

-/- php.ini -/-

--- version ---

PHP 4.3.1 (cli) (built: Feb 15 2003 23:07:00)
Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies

-/- version -/-


Greetings,

Joris

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



Re: [PHP] RE: your mail

2003-06-18 Thread Marek Kilimajer
Check the logs if php_w32api.dll extension is really loaded.

Lambrecht Joris wrote:
Hi People,

The below output is quite strange since i think to have set up php.ini
correctly. I simply ran a php_w32api demo script and took care of all i know
wich had to be configured. I'm not sure what this message really means, is
it either the dl() function i should be paying attention to or is it
something with the php_w32api.dll extension ? Maybe i need to upgrade
something here ?
Somehow it 'feels' to be related to the netdll.dll not executing the example
script as well.
Can someone please supply me with some feedback on this dl()/w32api issue ?

Thank You.

-- output ---

Warning: dl() [function.dl.html]: Not supported in multithreaded Web servers
- use extension statements in your php.ini in
c:\inetpub\intranet\php\info.php on line 7
Fatal error: Call to undefined function: w32api_register_function() in
c:\inetpub\intranet\php\info.php on line 9
-/- output -/-

--- php.ini ---

; Directory in which the loadable extensions (modules) reside.
extension_dir = c:\appserv\php\extensions\
; Whether or not to enable the dl() function.  The dl() function does NOT
work
; properly in multithreaded servers, such as IIS or Zeus, and is
automatically
; disabled on them.
enable_dl = Off
;extension=php_sybase_ct.dll
extension=php_w32api.dll
;extension=php_xmlrpc.dll
-/- php.ini -/-

--- version ---

PHP 4.3.1 (cli) (built: Feb 15 2003 23:07:00)
Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
-/- version -/-

Greetings,

Joris



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


[PHP] Session filesize limit

2003-06-18 Thread Hardik Doshi
Hi Group,

Does anyone know about the ideal session filesize
limit? I am using the common functionality in the
entire application. So i am thinking to store data
into the session file once user logs into the system
rather retrieving the information from database on
each user request. But i dont know what should be the
filesize limit. I am just trying to save database
calls on each request. If anyone has other suggestions
then please let me know.

Thanks

Hardik Doshi


-

Hardik K. Doshi
Web Application Developer

Institute of Design
Illinois Institute of Technology
350, North Lasalle Street
Chicago, Illinois 60610

312.595.4907 (direct)
312.595.4901 (fax)

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: [PHP] Session filesize limit

2003-06-18 Thread Jay Blanchard
[snip]
Does anyone know about the ideal session filesize limit? I am using the
common functionality in the
entire application. So i am thinking to store data into the session file
once user logs into the system
rather retrieving the information from database on each user request.
But i dont know what should be the
filesize limit. I am just trying to save database calls on each request.
If anyone has other suggestions
then please let me know.
[/snip]

If you are storing session information on your system then you have to
determine what the limit is for the filesize. If you're storing session
information on the user's system the filesize limit is 4k...and it is
called a cookie.

HTH!

Jay

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



Re: [PHP] Session filesize limit

2003-06-18 Thread CPT John W. Holmes
 Does anyone know about the ideal session filesize
 limit? I am using the common functionality in the
 entire application. So i am thinking to store data
 into the session file once user logs into the system
 rather retrieving the information from database on
 each user request. But i dont know what should be the
 filesize limit. I am just trying to save database
 calls on each request. If anyone has other suggestions
 then please let me know.

2GB is the limit on most OS. Have fun. I hope  you know what you're doing.
:)

---John Holmes...


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



[PHP] Install

2003-06-18 Thread Anand Tomar
Hi,

i tried installing mysql-4.1.0-alpha, apache, php4.3.2 on windows2000Pro.
now the issue is that i have all the 3 application running and interacting
with each other in
sync but every time i try to connect to mysql through php it gives me
this error:

Warning: mysql_connect(): Client does not support authentication protocol
requested by server. Consider upgrading MySQL client

this is the 1st time i am trying to set up a server i will really appreciate
your helpthanks

--anand


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



[PHP] Re: [PHP-WIN] Install

2003-06-18 Thread Per Lundberg
On Wed, 2003-06-18 at 14:39, Anand Tomar wrote:
 i tried installing mysql-4.1.0-alpha, apache, php4.3.2 on windows2000Pro.
 now the issue is that i have all the 3 application running and interacting
 with each other in
 sync but every time i try to connect to mysql through php it gives me
 this error:
 
 Warning: mysql_connect(): Client does not support authentication protocol
 requested by server. Consider upgrading MySQL client

This is because MySQL 4.1 has a new protocol that is not compatible with
the old (3.23 and 4.0) protocol.

There is no support for this protocol in PHP 4.3.2 and will unlikely
ever be in the 4.3.x series of PHP.  PHP5 already includes it but it is
not ready yet.

So, in other words, you have two opportunities:

1) Revert back to MySQL 3.23 or 4.0
2) Use the (unstable and not yet released) PHP5 from CVS. 
http://snaps.php.net have pre-compiled snapshots for Windows.  Beware!
that this is a CVS snapshot we are talking about.  You should not expect
it to be bug-free.  You should not expect to even install properly.  You
are totally on your own, and you are expected to fix problems that you
find in the C source code yourself.

But then again, that doesn't mean that it cannot work.  I have had it
running on Linux for quite a while now with very few problems.


I recommend going with option (1) since you seem to say you don't have
very much experience setting PHP up.
--
Best regards,

Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.nobolt.com


signature.asc
Description: This is a digitally signed message part


RE: [PHP] Session filesize limit

2003-06-18 Thread Hardik Doshi
Hi Jay,

Thanks for your quick reply. I am storing the session
file on the server. 

Once user logs into the system, i am storing username
and his/her roles (status) in the session files and on
each page request i am retrieving the information from
the session files. Now i need to add some more
functionality in the system and for that i need to add
some more information in the session files. So i was
just worrying about the size of these files. 

Anyway let me know if i am wrong or if you have any
suggestions.

Thanks again.

Hardik Doshi

--- Jay Blanchard
[EMAIL PROTECTED] wrote:
 [snip]
 Does anyone know about the ideal session filesize
 limit? I am using the
 common functionality in the
 entire application. So i am thinking to store data
 into the session file
 once user logs into the system
 rather retrieving the information from database on
 each user request.
 But i dont know what should be the
 filesize limit. I am just trying to save database
 calls on each request.
 If anyone has other suggestions
 then please let me know.
 [/snip]
 
 If you are storing session information on your
 system then you have to
 determine what the limit is for the filesize. If
 you're storing session
 information on the user's system the filesize limit
 is 4k...and it is
 called a cookie.
 
 HTH!
 
 Jay
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



[PHP] Fatal error: Call to undefined function: str_word_count()

2003-06-18 Thread nabil
when i use str_word_count()  i got the following :
Fatal error: Call to undefined function: str_word_count()

and my PHP is Version 4.2.3

What is the problem ???

thanks in advance



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



[PHP] Re: Fatal error: Call to undefined function: str_word_count()

2003-06-18 Thread CPT John W. Holmes
nabil [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...

 when i use str_word_count()  i got the following :

 Fatal error: Call to undefined function: str_word_count()



 and my PHP is Version 4.2.3



 What is the problem ???



Reading English?



us2.php.net/str_word_count



PHP 4.3.0 and greater...



---John Holmes...


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



[PHP] Connecting to MSSQL Using PHP on Apache 2.X.X Windows Machine

2003-06-18 Thread Gary Ogilvie
Hi everyone,
 
I am trying to connect to MSSQL and create a table in a database using
PHP.
 
Here is my code:
 
?php
 
$myServer = 192.92.0.248; 
$myUser = repro; 
$myPass = repro; 
$myDB = repro;
 
print (Attempting to connect to MSSQL - br);
 
$s = @mssql_connect($myServer, $myUser, $myPass)
or die(Couldn't connect to SQL Server on $myServer);
 
print (stage2);
 
$d = @mssql_select_db($myDB, $s) 
or die(Couldn't open database $myDB);
 
#this is the create bit
print (Connected trying to send the query!br);
 
$query = CREATE TABLE customer (id bigint NULL, cus_name char(100)
NULL, address1 char(100) NULL, address2 char(100) NULL, town char(50)
NULL, county char(50) NULL, postcode char(30) NULL, tel char(30) NULL,
fax char(30) NULL, mobile char(30) NULL, email char(50) NULL, notes
char(250) NULL)
or die(Creating table failed);
 
$result = mssql_query($query); 
 
print (Tables Created);
 
?
 
When viewing the page I only get the first print line displayed in the
browser. When I check MSSQL no table has been added. Does anyone know
how I can fix this? I am running Apache 2.X.X on Windows 2000 Server (on
my local machine) using PHP 4.X.X.
 
Any help is appreciated
 
Gary Ogilvie


[PHP] Calling c function from php

2003-06-18 Thread Mignon Hunter
hello,

I thought I posted this yesterday but accidentally posted to php-db.  

Anyway, can any make a suggestion on how to connect to a c function from
a php app?

I have to connect to a sales tax calculation software.  The function
is being written for me but I have to figure how to call it - get the
variable - and use it again in my php app.

I've been told there's an api or module on the php site with
documentation that I am trying to research.

Has anybody ever done this ?

Thx

-- 
M Hunter


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



RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X Windows Machine

2003-06-18 Thread Jay Blanchard
[snip]
?php
 
$myServer = 192.92.0.248; 
$myUser = repro; 
$myPass = repro; 
$myDB = repro;
 
print (Attempting to connect to MSSQL - br);
 
$s = @mssql_connect($myServer, $myUser, $myPass)
or die(Couldn't connect to SQL Server on $myServer);
 
print (stage2);
 
$d = @mssql_select_db($myDB, $s) 
or die(Couldn't open database $myDB);
 
#this is the create bit
print (Connected trying to send the query!br);
 
$query = CREATE TABLE customer (id bigint NULL, cus_name char(100)
NULL, address1 char(100) NULL, address2 char(100) NULL, town char(50)
NULL, county char(50) NULL, postcode char(30) NULL, tel char(30) NULL,
fax char(30) NULL, mobile char(30) NULL, email char(50) NULL, notes
char(250) NULL)
or die(Creating table failed);
 
$result = mssql_query($query); 
 
print (Tables Created);
 
?
[/snip]

See anything wrong here...
$s = @mssql_connect($myServer, $myUser, $myPass)
$d = @mssql_select_db($myDB, $s) 

??? Remove the '@' signs and you should go just fine if your user has
permissions to create tables;

HTH!

Jay

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



RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X WindowsMachine

2003-06-18 Thread Adam Voigt
Actually the @ just supress's error messages.
And even then, the or die part would still get
executed if the function error'd out.


On Wed, 2003-06-18 at 10:51, Jay Blanchard wrote:
 [snip]
 ?php
  
 $myServer = 192.92.0.248; 
 $myUser = repro; 
 $myPass = repro; 
 $myDB = repro;
  
 print (Attempting to connect to MSSQL - br);
  
 $s = @mssql_connect($myServer, $myUser, $myPass)
 or die(Couldn't connect to SQL Server on $myServer);
  
 print (stage2);
  
 $d = @mssql_select_db($myDB, $s) 
 or die(Couldn't open database $myDB);
  
 #this is the create bit
 print (Connected trying to send the query!br);
  
 $query = CREATE TABLE customer (id bigint NULL, cus_name char(100)
 NULL, address1 char(100) NULL, address2 char(100) NULL, town char(50)
 NULL, county char(50) NULL, postcode char(30) NULL, tel char(30) NULL,
 fax char(30) NULL, mobile char(30) NULL, email char(50) NULL, notes
 char(250) NULL)
 or die(Creating table failed);
  
 $result = mssql_query($query); 
  
 print (Tables Created);
  
 ?
 [/snip]
 
 See anything wrong here...
 $s = @mssql_connect($myServer, $myUser, $myPass)
 $d = @mssql_select_db($myDB, $s) 
 
 ??? Remove the '@' signs and you should go just fine if your user has
 permissions to create tables;
 
 HTH!
 
 Jay
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP] Calling c function from php

2003-06-18 Thread CPT John W. Holmes
 Anyway, can any make a suggestion on how to connect to a c function from
 a php app?

 I have to connect to a sales tax calculation software.  The function
 is being written for me but I have to figure how to call it - get the
 variable - and use it again in my php app.

 I've been told there's an api or module on the php site with
 documentation that I am trying to research.

 Has anybody ever done this ?

I'm sure you could compile it into PHP somehow, if you wanted to go that
route. I can't help you there, though.

Or, you could just compile your C function into a stand-alone program and
call it through exec(), passing the parameters it needs and then retrieving
the output.

Why not just port the C code over to PHP??

---John Holmes...


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



RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X WindowsMachine

2003-06-18 Thread Jay Blanchard
[snip]
Actually the @ just supress's error messages.
And even then, the or die part would still get
executed if the function error'd out.
[/snip]

Well, if that is the case then his script is 'hanging up'  during the
mssql_connect phase. Add this line to the top of the script

error_reporting(E_ALL);

Jay

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



RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X Windows Machine

2003-06-18 Thread Gary Ogilvie
If I take out the @ sign I get the following error:

Fatal error: Call to undefined function: mssql_connect() in F:\Program
Files\Apache Group\Apache2\htdocs\REPRO\reprotables.php on line 10

Any more ideas? =)

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: 18 June 2003 15:51
To: Gary Ogilvie; [EMAIL PROTECTED]
Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X Windows
Machine

[snip]
?php
 
$myServer = 192.92.0.248; 
$myUser = repro; 
$myPass = repro; 
$myDB = repro;
 
print (Attempting to connect to MSSQL - br);
 
$s = @mssql_connect($myServer, $myUser, $myPass)
or die(Couldn't connect to SQL Server on $myServer);
 
print (stage2);
 
$d = @mssql_select_db($myDB, $s) 
or die(Couldn't open database $myDB);
 
#this is the create bit
print (Connected trying to send the query!br);
 
$query = CREATE TABLE customer (id bigint NULL, cus_name char(100)
NULL, address1 char(100) NULL, address2 char(100) NULL, town char(50)
NULL, county char(50) NULL, postcode char(30) NULL, tel char(30) NULL,
fax char(30) NULL, mobile char(30) NULL, email char(50) NULL, notes
char(250) NULL)
or die(Creating table failed);
 
$result = mssql_query($query); 
 
print (Tables Created);
 
?
[/snip]

See anything wrong here...
$s = @mssql_connect($myServer, $myUser, $myPass)
$d = @mssql_select_db($myDB, $s) 

??? Remove the '@' signs and you should go just fine if your user has
permissions to create tables;

HTH!

Jay

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


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



RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X WindowsMachine

2003-06-18 Thread Adam Voigt
Uncomment the extension in your php.ini,
usually in:

c:\winnt\php.ini


On Wed, 2003-06-18 at 10:57, Gary Ogilvie wrote:
 If I take out the @ sign I get the following error:
 
 Fatal error: Call to undefined function: mssql_connect() in F:\Program
 Files\Apache Group\Apache2\htdocs\REPRO\reprotables.php on line 10
 
 Any more ideas? =)
 
 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
 Sent: 18 June 2003 15:51
 To: Gary Ogilvie; [EMAIL PROTECTED]
 Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X Windows
 Machine
 
 [snip]
 ?php
  
 $myServer = 192.92.0.248; 
 $myUser = repro; 
 $myPass = repro; 
 $myDB = repro;
  
 print (Attempting to connect to MSSQL - br);
  
 $s = @mssql_connect($myServer, $myUser, $myPass)
 or die(Couldn't connect to SQL Server on $myServer);
  
 print (stage2);
  
 $d = @mssql_select_db($myDB, $s) 
 or die(Couldn't open database $myDB);
  
 #this is the create bit
 print (Connected trying to send the query!br);
  
 $query = CREATE TABLE customer (id bigint NULL, cus_name char(100)
 NULL, address1 char(100) NULL, address2 char(100) NULL, town char(50)
 NULL, county char(50) NULL, postcode char(30) NULL, tel char(30) NULL,
 fax char(30) NULL, mobile char(30) NULL, email char(50) NULL, notes
 char(250) NULL)
 or die(Creating table failed);
  
 $result = mssql_query($query); 
  
 print (Tables Created);
  
 ?
 [/snip]
 
 See anything wrong here...
 $s = @mssql_connect($myServer, $myUser, $myPass)
 $d = @mssql_select_db($myDB, $s) 
 
 ??? Remove the '@' signs and you should go just fine if your user has
 permissions to create tables;
 
 HTH!
 
 Jay
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP] Calling c function from php

2003-06-18 Thread Terje Torkelsen

if you want to integrate the c/c++ codes in php you can use the build_skel 
that follows php to do this. write:

./build_skel --extname=calculate --proto=/path/to/calculate.proto 
--assign-params

where extname is the extension name and proto is a file containing the 
prototypes of the functions to create. something like this:

void calc_over( double value )
double calc_under( double value, double type )

and so on... im sure there are howtos and such on the net, so i dont botter 
writing it all down. 

Terje

On Wed, 18 Jun 2003 16:56:52 +0200, Cpt John W. Holmes wrote
(in message [EMAIL PROTECTED]):

 Anyway, can any make a suggestion on how to connect to a c function from
 a php app?
 
 I have to connect to a sales tax calculation software.  The function
 is being written for me but I have to figure how to call it - get the
 variable - and use it again in my php app.
 
 I've been told there's an api or module on the php site with
 documentation that I am trying to research.
 
 Has anybody ever done this ?
 
 I'm sure you could compile it into PHP somehow, if you wanted to go that
 route. I can't help you there, though.
 
 Or, you could just compile your C function into a stand-alone program and
 call it through exec(), passing the parameters it needs and then retrieving
 the output.
 
 Why not just port the C code over to PHP??
 
 ---John Holmes...
 



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



RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X WindowsMachine

2003-06-18 Thread Gary Ogilvie
I have tried it on a different machine and it is working... so maybe its
something to do with the setup of my computer?

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: 18 June 2003 15:59
To: [EMAIL PROTECTED]
Cc: Gary Ogilvie; [EMAIL PROTECTED]
Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X
WindowsMachine

[snip]
Actually the @ just supress's error messages.
And even then, the or die part would still get
executed if the function error'd out.
[/snip]

Well, if that is the case then his script is 'hanging up'  during the
mssql_connect phase. Add this line to the top of the script

error_reporting(E_ALL);

Jay

-- 
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] Help with my code

2003-06-18 Thread Mark Clarkstone
why won't this write?

?
require (config.php);
if ($action) {

If ($name==) {
echo Form Error  No Name;
echo $errorbk;
}
else if ($email==) {
echo Form Erorr  No e-mail;
echo $errorbk;
}
else if ($input==) {
echo Form Error  No Comment found;
echo $errorbk;
}
else if ($wb==1) {
mail($webemail, $subject, $input);
}
if ($action) {
$data = $name\n$email\n$input;
$fp = fopen(messages.txt,'a');
$fw = fwrite($fp,$data,$subject);
fclose($fp);
echo Thank you;
}
}
else if (!$action) {
echo html

head
meta name='GENERATOR' content='Microsoft FrontPage 5.0'
meta name='ProgId' content='FrontPage.Editor.Document'
meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'
title$pagetitle/title
/head

body

form method='POST' action='?action=send'
p align='left'font face='Tahoma'font size='2'Commentie Version
1.0/fontbr
font size='2'Your Name /font
input type='text' name='name' size='20' style='font-family: Tahoma;
font-size: 10pt'br
font size='2'Your E-mail/fontinput type='text' name='email' size='20'
style='font-family: Tahoma; font-size: 10pt'br
font size='2'Your msg / comment/fontbr
textarea rows='2' name='input' cols='20' style='font-family: Tahoma;
font-size: 10pt'/textareabr
/font
font size='2' face='Tahoma'e-mail amp; save /fontfont face='Tahoma'
select size='1' name='wb' style='font-family: Tahoma; font-size: 10pt'
option selected value='1'Yes/option
option value='0'No/option
/select/font/p
/p
p align='left'
font face='Tahoma'
input type='submit' value='Submit' name='B1' style='font-family: Tahoma;
font-size: 10pt'input type='reset' value='Reset' name='B2'
style='font-size: 10pt; font-family: Tahoma'/font/p
/form

/body

/html;
}
?





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



RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X WindowsMachine

2003-06-18 Thread Jay Blanchard
[snip]
I have tried it on a different machine and it is working... so maybe its
something to do with the setup of my computer?
[/snip]

Check your php.ini as Adam suggested...I strongly suspect that the 

;extension=php_mssql.dll

line is still commented out.

Jay

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



RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X WindowsMachine

2003-06-18 Thread Gary Ogilvie


-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: 18 June 2003 16:14
To: Gary Ogilvie; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X
WindowsMachine

[snip]
I have tried it on a different machine and it is working... so maybe its
something to do with the setup of my computer?
[/snip]

Check your php.ini as Adam suggested...I strongly suspect that the 

;extension=php_mssql.dll

line is still commented out.

Jay


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



RE: [PHP] Help with my code

2003-06-18 Thread Edward Peloke
what is it not doing?  I see you are referencing the variables directly, is
register globals 'on'?  Are you getting errors?

-Original Message-
From: Mark Clarkstone [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 11:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Help with my code


why won't this write?

?
require (config.php);
if ($action) {

If ($name==) {
echo Form Error  No Name;
echo $errorbk;
}
else if ($email==) {
echo Form Erorr  No e-mail;
echo $errorbk;
}
else if ($input==) {
echo Form Error  No Comment found;
echo $errorbk;
}
else if ($wb==1) {
mail($webemail, $subject, $input);
}
if ($action) {
$data = $name\n$email\n$input;
$fp = fopen(messages.txt,'a');
$fw = fwrite($fp,$data,$subject);
fclose($fp);
echo Thank you;
}
}
else if (!$action) {
echo html

head
meta name='GENERATOR' content='Microsoft FrontPage 5.0'
meta name='ProgId' content='FrontPage.Editor.Document'
meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'
title$pagetitle/title
/head

body

form method='POST' action='?action=send'
p align='left'font face='Tahoma'font size='2'Commentie Version
1.0/fontbr
font size='2'Your Name /font
input type='text' name='name' size='20' style='font-family: Tahoma;
font-size: 10pt'br
font size='2'Your E-mail/fontinput type='text' name='email' size='20'
style='font-family: Tahoma; font-size: 10pt'br
font size='2'Your msg / comment/fontbr
textarea rows='2' name='input' cols='20' style='font-family: Tahoma;
font-size: 10pt'/textareabr
/font
font size='2' face='Tahoma'e-mail amp; save /fontfont face='Tahoma'
select size='1' name='wb' style='font-family: Tahoma; font-size: 10pt'
option selected value='1'Yes/option
option value='0'No/option
/select/font/p
/p
p align='left'
font face='Tahoma'
input type='submit' value='Submit' name='B1' style='font-family: Tahoma;
font-size: 10pt'input type='reset' value='Reset' name='B2'
style='font-size: 10pt; font-family: Tahoma'/font/p
/form

/body

/html;
}
?





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


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



RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X WindowsMachine

2003-06-18 Thread Gary Ogilvie
How do I comment out a line in an ini file...

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: 18 June 2003 16:14
To: Gary Ogilvie; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X
WindowsMachine

[snip]
I have tried it on a different machine and it is working... so maybe its
something to do with the setup of my computer?
[/snip]

Check your php.ini as Adam suggested...I strongly suspect that the 

;extension=php_mssql.dll

line is still commented out.

Jay


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



RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.XWindowsMachine

2003-06-18 Thread Adam Voigt
Take the semicolon off the start of the line
to uncomment it.


On Wed, 2003-06-18 at 11:18, Gary Ogilvie wrote:
 How do I comment out a line in an ini file...
 
 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
 Sent: 18 June 2003 16:14
 To: Gary Ogilvie; [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X
 WindowsMachine
 
 [snip]
 I have tried it on a different machine and it is working... so maybe its
 something to do with the setup of my computer?
 [/snip]
 
 Check your php.ini as Adam suggested...I strongly suspect that the 
 
 ;extension=php_mssql.dll
 
 line is still commented out.
 
 Jay
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



RE: [PHP] Help with my code

2003-06-18 Thread James E Hicks III
What is the value of $subject? fwrite() expects the third 
value passed to it to be the number of bytes to write.

James


-Original Message-
From: Mark Clarkstone [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 11:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Help with my code 


why won't this write?

?
require (config.php);
if ($action) {

If ($name==) {
echo Form Error  No Name;
echo $errorbk;
}
else if ($email==) {
echo Form Erorr  No e-mail;
echo $errorbk;
}
else if ($input==) {
echo Form Error  No Comment found;
echo $errorbk;
}
else if ($wb==1) {
mail($webemail, $subject, $input);
}
if ($action) {
$data = $name\n$email\n$input;
$fp = fopen(messages.txt,'a');
$fw = fwrite($fp,$data,$subject);
fclose($fp);
echo Thank you;
}
}
else if (!$action) {
echo html

head
meta name='GENERATOR' content='Microsoft FrontPage 5.0'
meta name='ProgId' content='FrontPage.Editor.Document'
meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'
title$pagetitle/title
/head

body

form method='POST' action='?action=send'
p align='left'font face='Tahoma'font size='2'Commentie Version
1.0/fontbr
font size='2'Your Name /font
input type='text' name='name' size='20' style='font-family: Tahoma;
font-size: 10pt'br
font size='2'Your E-mail/fontinput type='text' name='email' size='20'
style='font-family: Tahoma; font-size: 10pt'br
font size='2'Your msg / comment/fontbr
textarea rows='2' name='input' cols='20' style='font-family: Tahoma;
font-size: 10pt'/textareabr
/font
font size='2' face='Tahoma'e-mail amp; save /fontfont face='Tahoma'
select size='1' name='wb' style='font-family: Tahoma; font-size: 10pt'
option selected value='1'Yes/option
option value='0'No/option
/select/font/p
/p
p align='left'
font face='Tahoma'
input type='submit' value='Submit' name='B1' style='font-family: Tahoma;
font-size: 10pt'input type='reset' value='Reset' name='B2'
style='font-size: 10pt; font-family: Tahoma'/font/p
/form

/body

/html;
}
?





-- 
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] Re: Help with my code

2003-06-18 Thread Terje Torkelsen

To echo multiple lines you have to write 

echo END


html
headtitle 


...
..

END;

and in the beginning you have

if( $action ) {
 if...
 elseif ..
 elseif..
 
 if( $action ) {  = why this? you have already checked if $action is true 
earlier...

 }

}

(nb! posting the what the error is might help solve a problem)


On Wed, 18 Jun 2003 17:09:18 +0200, Mark Clarkstone wrote
(in message [EMAIL PROTECTED]):

 why won't this write?
 
 ?
 require (config.php);
 if ($action) {
 
 If ($name==) {
 echo Form Error  No Name;
 echo $errorbk;
 }
 else if ($email==) {
 echo Form Erorr  No e-mail;
 echo $errorbk;
 }
 else if ($input==) {
 echo Form Error  No Comment found;
 echo $errorbk;
 }
 else if ($wb==1) {
 mail($webemail, $subject, $input);
 }
 if ($action) {
 $data = $name\n$email\n$input;
 $fp = fopen(messages.txt,'a');
 $fw = fwrite($fp,$data,$subject);
 fclose($fp);
 echo Thank you;
 }
 }
 else if (!$action) {
 echo html
 
 head
 meta name='GENERATOR' content='Microsoft FrontPage 5.0'
 meta name='ProgId' content='FrontPage.Editor.Document'
 meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'
 title$pagetitle/title
 /head
 
 body
 
 form method='POST' action='?action=send'
 p align='left'font face='Tahoma'font size='2'Commentie Version
 1.0/fontbr
 font size='2'Your Name /font
 input type='text' name='name' size='20' style='font-family: Tahoma;
 font-size: 10pt'br
 font size='2'Your E-mail/fontinput type='text' name='email' size='20'
 style='font-family: Tahoma; font-size: 10pt'br
 font size='2'Your msg / comment/fontbr
 textarea rows='2' name='input' cols='20' style='font-family: Tahoma;
 font-size: 10pt'/textareabr
 /font
 font size='2' face='Tahoma'e-mail amp; save /fontfont face='Tahoma'
 select size='1' name='wb' style='font-family: Tahoma; font-size: 10pt'
 option selected value='1'Yes/option
 option value='0'No/option
 /select/font/p
 /p
 p align='left'
 font face='Tahoma'
 input type='submit' value='Submit' name='B1' style='font-family: Tahoma;
 font-size: 10pt'input type='reset' value='Reset' name='B2'
 style='font-size: 10pt; font-family: Tahoma'/font/p
 /form
 
 /body
 
 /html;
 }
 ?
 
 
 
 



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



RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.XWindowsMachine

2003-06-18 Thread Gary Ogilvie
Now I get an error message when going to load the page:

Unknown(): Unable to load dynamic library './php_mssql.dll' - The
specified module could not be found.

-Original Message-
From: Adam Voigt [mailto:[EMAIL PROTECTED] 
Sent: 18 June 2003 16:29
To: Gary Ogilvie
Cc: 'Jay Blanchard'; [EMAIL PROTECTED]
Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache
2.X.XWindowsMachine

Take the semicolon off the start of the line
to uncomment it.


On Wed, 2003-06-18 at 11:18, Gary Ogilvie wrote:
 How do I comment out a line in an ini file...
 
 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
 Sent: 18 June 2003 16:14
 To: Gary Ogilvie; [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X
 WindowsMachine
 
 [snip]
 I have tried it on a different machine and it is working... so maybe
its
 something to do with the setup of my computer?
 [/snip]
 
 Check your php.ini as Adam suggested...I strongly suspect that the 
 
 ;extension=php_mssql.dll
 
 line is still commented out.
 
 Jay
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



RE: [PHP] Connecting to MSSQL Using PHP on Apache2.X.XWindowsMachine

2003-06-18 Thread Adam Voigt
Copy all the dll's in the dll folder, which is inside the PHP
folder, to c:\winnt\system32, as well as the php_mssql.dll out
of the extensions folder, to the same path. Then change the line
in the php.ini that says extension_path to: c:\winnt\system32.



On Wed, 2003-06-18 at 11:23, Gary Ogilvie wrote:
 Now I get an error message when going to load the page:
 
 Unknown(): Unable to load dynamic library './php_mssql.dll' - The
 specified module could not be found.
 
 -Original Message-
 From: Adam Voigt [mailto:[EMAIL PROTECTED] 
 Sent: 18 June 2003 16:29
 To: Gary Ogilvie
 Cc: 'Jay Blanchard'; [EMAIL PROTECTED]
 Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache
 2.X.XWindowsMachine
 
 Take the semicolon off the start of the line
 to uncomment it.
 
 
 On Wed, 2003-06-18 at 11:18, Gary Ogilvie wrote:
  How do I comment out a line in an ini file...
  
  -Original Message-
  From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
  Sent: 18 June 2003 16:14
  To: Gary Ogilvie; [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X
  WindowsMachine
  
  [snip]
  I have tried it on a different machine and it is working... so maybe
 its
  something to do with the setup of my computer?
  [/snip]
  
  Check your php.ini as Adam suggested...I strongly suspect that the 
  
  ;extension=php_mssql.dll
  
  line is still commented out.
  
  Jay
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



RE: [PHP] Connecting to MSSQL Using PHP on Apache2.X.XWindowsMachine

2003-06-18 Thread Gary Ogilvie
It appears  don't have a extension_path line in my ini file

-Original Message-
From: Adam Voigt [mailto:[EMAIL PROTECTED] 
Sent: 18 June 2003 16:35
To: Gary Ogilvie
Cc: 'Jay Blanchard'; [EMAIL PROTECTED]
Subject: RE: [PHP] Connecting to MSSQL Using PHP on
Apache2.X.XWindowsMachine

Copy all the dll's in the dll folder, which is inside the PHP
folder, to c:\winnt\system32, as well as the php_mssql.dll out
of the extensions folder, to the same path. Then change the line
in the php.ini that says extension_path to: c:\winnt\system32.



On Wed, 2003-06-18 at 11:23, Gary Ogilvie wrote:
 Now I get an error message when going to load the page:
 
 Unknown(): Unable to load dynamic library './php_mssql.dll' - The
 specified module could not be found.
 
 -Original Message-
 From: Adam Voigt [mailto:[EMAIL PROTECTED] 
 Sent: 18 June 2003 16:29
 To: Gary Ogilvie
 Cc: 'Jay Blanchard'; [EMAIL PROTECTED]
 Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache
 2.X.XWindowsMachine
 
 Take the semicolon off the start of the line
 to uncomment it.
 
 
 On Wed, 2003-06-18 at 11:18, Gary Ogilvie wrote:
  How do I comment out a line in an ini file...
  
  -Original Message-
  From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
  Sent: 18 June 2003 16:14
  To: Gary Ogilvie; [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] Connecting to MSSQL Using PHP on Apache 2.X.X
  WindowsMachine
  
  [snip]
  I have tried it on a different machine and it is working... so maybe
 its
  something to do with the setup of my computer?
  [/snip]
  
  Check your php.ini as Adam suggested...I strongly suspect that the 
  
  ;extension=php_mssql.dll
  
  line is still commented out.
  
  Jay
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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


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



Re: [PHP] Help with my code

2003-06-18 Thread Mark Clarkstone
Ok thanks everyone I found out the problem
James E Hicks III [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 What is the value of $subject? fwrite() expects the third
 value passed to it to be the number of bytes to write.

 James


 -Original Message-
 From: Mark Clarkstone [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2003 11:09 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Help with my code


 why won't this write?

 ?
 require (config.php);
 if ($action) {

 If ($name==) {
 echo Form Error  No Name;
 echo $errorbk;
 }
 else if ($email==) {
 echo Form Erorr  No e-mail;
 echo $errorbk;
 }
 else if ($input==) {
 echo Form Error  No Comment found;
 echo $errorbk;
 }
 else if ($wb==1) {
 mail($webemail, $subject, $input);
 }
 if ($action) {
 $data = $name\n$email\n$input;
 $fp = fopen(messages.txt,'a');
 $fw = fwrite($fp,$data,$subject);
 fclose($fp);
 echo Thank you;
 }
 }
 else if (!$action) {
 echo html

 head
 meta name='GENERATOR' content='Microsoft FrontPage 5.0'
 meta name='ProgId' content='FrontPage.Editor.Document'
 meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'
 title$pagetitle/title
 /head

 body

 form method='POST' action='?action=send'
 p align='left'font face='Tahoma'font size='2'Commentie Version
 1.0/fontbr
 font size='2'Your Name /font
 input type='text' name='name' size='20' style='font-family: Tahoma;
 font-size: 10pt'br
 font size='2'Your E-mail/fontinput type='text' name='email' size='20'
 style='font-family: Tahoma; font-size: 10pt'br
 font size='2'Your msg / comment/fontbr
 textarea rows='2' name='input' cols='20' style='font-family: Tahoma;
 font-size: 10pt'/textareabr
 /font
 font size='2' face='Tahoma'e-mail amp; save /fontfont face='Tahoma'
 select size='1' name='wb' style='font-family: Tahoma; font-size: 10pt'
 option selected value='1'Yes/option
 option value='0'No/option
 /select/font/p
 /p
 p align='left'
 font face='Tahoma'
 input type='submit' value='Submit' name='B1' style='font-family: Tahoma;
 font-size: 10pt'input type='reset' value='Reset' name='B2'
 style='font-size: 10pt; font-family: Tahoma'/font/p
 /form

 /body

 /html;
 }
 ?





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




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



RE: [PHP] Connecting to MSSQL Using PHP on Apache2.X.XWindowsMachine

2003-06-18 Thread Jay Blanchard
[snip]
It appears  don't have a extension_path line in my ini file
[/snip]

it may say extension_dir

Jay

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



[PHP] My Problem

2003-06-18 Thread Gary Ogilvie
Don't worry all - its all been fixed now - thanks for the help :)


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



RE: [PHP] My Problem

2003-06-18 Thread Gary Ogilvie
After changing the dir to f:\php\exstensions all was ok =)

-Original Message-
From: Gary Ogilvie [mailto:[EMAIL PROTECTED] 
Sent: 18 June 2003 16:40
To: 'Terje Torkelsen'; [EMAIL PROTECTED]
Subject: [PHP] My Problem

Don't worry all - its all been fixed now - thanks for the help :)


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


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



RE: [PHP] My Problem

2003-06-18 Thread Jay Blanchard
[snip]
Don't worry all - its all been fixed now - thanks for the help :)
[/snip]
:7)

Hey Gary, can you do us a favor? When something gets cleaned up like
this change the title of the thread to add SOLVED to it, such as this

RE: [PHP] Connecting to MSSQL Using PHP on Apache2.X.XWindowsMachine
SOLVED

and perhaps be somewhat verbose, stating the changes made to solve the
problem? It helps others who might be looking in the archives for
solutions.

And remember...It's hip to snip!

Jay

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



RE: [PHP] Software Testing and Internationalization - Free book by LISA/Lemoine International

2003-06-18 Thread Alex Lam
 LISA, in collaboration with Lemoine International has made Software
 Testing and Internationalization  by Galileo Computing freely
 available for download.
 [snip]
 To download a copy, please visit
 http://www.lisa.org/interact/2003/swtestregister.html

How about a privacy statement on the page where you collect all of our
info?

John, 

A privacy statement has been placed on the page. We will also be putting
up a statement on the other pages.

Thank you.

Alex Lam




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



Re: [PHP] Re: Help with my code

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 08:23, Terje Torkelsen wrote:
 To echo multiple lines you have to write 
 
 echo END
 
 
 html
 headtitle 
 
 
 ...
 ..
 
 END;

No offense, but this is completely false. Double-quotes will work just
fine.


-- 
 Torben Wilson [EMAIL PROTECTED]+1.604.709.0506
 http://www.thebuttlesschaps.com  http://www.inflatableeye.com
 http://www.hybrid17.com  http://www.themainonmain.com
 - Boycott Starbucks!  http://www.haidabuckscafe.com -




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



[PHP] print all variables

2003-06-18 Thread Matt Palermo
Could anyone tell me how to print all the variables and values from a submitted form, 
so that I can check them? 

Thanks,

Matt 


Re: [PHP] Software Testing and Internationalization - Free book by LISA/Lemoine International

2003-06-18 Thread CPT John W. Holmes
  LISA, in collaboration with Lemoine International has made Software
  Testing and Internationalization  by Galileo Computing freely
  available for download.
  [snip]
  To download a copy, please visit
  http://www.lisa.org/interact/2003/swtestregister.html
 
 How about a privacy statement on the page where you collect all of our
 info?

 John,

 A privacy statement has been placed on the page. We will also be putting
 up a statement on the other pages.

 Thank you.

Sounds great. Just trying to make sure you stay honest. I still don't know
if I'll give you all of that info or not, though... :)

---John Holmes...


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



Re: [PHP] print all variables

2003-06-18 Thread Adam Voigt
print_r($_POST) OR print_r($_GET)


On Wed, 2003-06-18 at 11:51, Matt Palermo wrote:
 Could anyone tell me how to print all the variables and values from a submitted 
 form, so that I can check them? 
 
 Thanks,
 
 Matt 
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



[PHP] Re: print all variables

2003-06-18 Thread Skex
Depending on Form Method (example uses POST METHOD)

echo PRE;
print_r($HTTP_POST_VARS);
echo /PRE;



Matt Palermo [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Could anyone tell me how to print all the variables and values from a
submitted form, so that I can check them?

Thanks,

Matt



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



[PHP] Re: array_shift

2003-06-18 Thread Diana Castillo
never mind I found the answer, use key(arrayname) to get the key and
next(arrayname) to move to next element without reseting the keys.

Diana Castillo [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 how can I do an array shift without reseting the keys?
 how can I get the key of the first element removed with an array _shift?
 thanks.





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



Re: [PHP] Re: Help with my code

2003-06-18 Thread Terje Torkelsen
hehe.. know, i seem to write it a little fast.. it a _long_ time since ive 
use this notation.. :)

im gonna check it to be sure next time..

On Wed, 18 Jun 2003 17:45:26 +0200, Lars Torben Wilson wrote
(in message [EMAIL PROTECTED]):

 Organization:
 MIME-version: 1.0
 X-Mailer: Ximian Evolution 1.2.3
 Content-type: text/plain
 Content-transfer-encoding: 7BIT
 References: [EMAIL PROTECTED]
  [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: Help with my code
 From: [EMAIL PROTECTED] (Lars Torben Wilson)
 
 On Wed, 2003-06-18 at 08:23, Terje Torkelsen wrote:
 To echo multiple lines you have to write 
 
 echo END
 
 
 html
 headtitle 
 
 
 ...
 ..
 
 END;
 
 No offense, but this is completely false. Double-quotes will work just
 fine.
 
 
 



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



Re: [PHP] print all variables

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 08:51, Matt Palermo wrote:
 Could anyone tell me how to print all the variables and values from a submitted 
 form, so that I can check them? 
 
 Thanks,
 
 Matt 

  print_r($_REQUEST);

...or, depending on the method your form is using, one of:

  print_r($_POST);
  // or
  print_r($_GET);


This information, for the record, is readily available in the manual.



Good luck,

Torben


-- 
 Torben Wilson [EMAIL PROTECTED]+1.604.709.0506
 http://www.thebuttlesschaps.com  http://www.inflatableeye.com
 http://www.hybrid17.com  http://www.themainonmain.com
 - Boycott Starbucks!  http://www.haidabuckscafe.com -




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



[PHP] Random CGI Errors

2003-06-18 Thread Adam Voigt
We have a server running Windows 2000 with IIS, and
PHP 4.2.3 and we are having a fairly continuous stream
of the standard CGI Application Misbehaved errors
(like every 5 pages). There doesn't seem to be any pattern
in relation to code or particular page.

Upgrading versions of PHP would be my first thing to try
but that is not currently an option.

Any ideas?


-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



RE: [PHP] Random CGI Errors

2003-06-18 Thread Jay Blanchard
[snip]
We have a server running Windows 2000 with IIS, and
PHP 4.2.3 and we are having a fairly continuous stream
of the standard CGI Application Misbehaved errors
(like every 5 pages). There doesn't seem to be any pattern
in relation to code or particular page.

Upgrading versions of PHP would be my first thing to try
but that is not currently an option.
[/snip]

JTMS...you are running PHP in the CGI mode?

Jay

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



RE: [PHP] Random CGI Errors

2003-06-18 Thread Adam Voigt
Affirmative.

On Wed, 2003-06-18 at 12:53, Jay Blanchard wrote:
 [snip]
 We have a server running Windows 2000 with IIS, and
 PHP 4.2.3 and we are having a fairly continuous stream
 of the standard CGI Application Misbehaved errors
 (like every 5 pages). There doesn't seem to be any pattern
 in relation to code or particular page.
 
 Upgrading versions of PHP would be my first thing to try
 but that is not currently an option.
 [/snip]
 
 JTMS...you are running PHP in the CGI mode?
 
 Jay
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



[PHP] mySQL: Rows and columns

2003-06-18 Thread zavaboy
I know this is more of a mySQL question but, how do I delete and add rows
and columns?

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



RE: [PHP] mySQL: Rows and columns

2003-06-18 Thread Aaron Gould
A search on mysql.com reveals.

http://www.mysql.com/search/index.php?q=DELETEfrom=%2Fdocumentation%2Findex
.html

--
Aaron Gould
Web Developer
Parts Canada

 

-Original Message-
From: zavaboy [mailto:[EMAIL PROTECTED] 
Sent: June 18, 2003 1:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] mySQL: Rows and columns


I know this is more of a mySQL question but, how do I delete and add rows
and columns?

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.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



Re: [PHP] mySQL: Rows and columns

2003-06-18 Thread bbonkosk
http://www.mysql.com/doc/en/ALTER_TABLE.html


 I know this is more of a mySQL question but, how do I delete and add rows
 and columns?
 
 -- 
 
 - Zavaboy
 [EMAIL PROTECTED]
 www.zavaboy.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



Re: [PHP] mySQL: Rows and columns

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 10:03, zavaboy wrote:
 I know this is more of a mySQL question but, how do I delete and add rows
 and columns?
 
 -- 
 
 - Zavaboy
 [EMAIL PROTECTED]
 www.zavaboy.com

Using the mysql_*() function and the SQL language. The mysql_*()
functions are documented here:

   http://www.php.net/mysql

You can find a PHP/SQL tutorial here:

   http://phpdev.gold.ac.uk/tutorial/sql/

There are likely a bunch more on Google.


Good luck,

Torben


-- 
 Torben Wilson [EMAIL PROTECTED]+1.604.709.0506
 http://www.thebuttlesschaps.com  http://www.inflatableeye.com
 http://www.hybrid17.com  http://www.themainonmain.com
 - Boycott Starbucks!  http://www.haidabuckscafe.com -




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



[PHP] working with forms

2003-06-18 Thread Matt Palermo
I have a forms page that a user will fill out.  When it is submitted, it checks to see 
if any of the field entries entries are empty, and if so, it has a die() statement 
that has a link (javascript:history.back()) which sends the user back to the form 
page.  However, when they go back to the form page, all the entries they made are 
erased and they need to redo everything.  Is there and easy way to have them go back 
with all their previously inputted data still filled in?  Let me know.

Thanks,

Matt


[PHP] Need someone with a fresh mind on tacking this array problem...

2003-06-18 Thread Scott Fletcher
Hi, need someone with a fresh mind on tacking this problem.  I haven't
gotten this to work right for 1 1/2 days now.

In the sample script, you will noticed that the php variable, '$ODBC_RESULT'
represent a year in 4 digit, like 2003, 2002, 2001, 2000, etc...  When I
grab the data from the database and put it into a loop, the only thing I
need to do is to have PHP spit out the javascript code if the year is a
first time use and have PHP not to spit out the javascript code if the same
year is being repeated...  Just like that.

 I don't know what I am doing wrong.  I did declare the $ArrayDataCount
before the start of the loop.  This sample code is inside the loop.

--clip--
 $ODBC_RESULT = trim(odbc_result($result,2));

 $ArrayCheck = $ArrayDataCount['$ODBC_RESULT'];
 $ArrayCheck += 0;

 if (strlen(trim($ArrayCheck)) == 0) {
$ArrayCheck = 0;
 } else {
$ArrayCheck = $ArrayDataCount['$ODBC_RESULT'];
 }

 if ($ArrayCheck == 0) {
$ArrayDataCount['$ODBC_RESULT'] = 0;
 } else {
$ArrayCheck++;
$ArrayDataCount['$ODBC_RESULT'] = $ArrayCheck;
 }

 if ($ArrayCheck == 0) {
echo  jsTimeRange['.trim(odbc_result($result,2)).'] = new
Array(new Array(),new Array());\n;
 }
--clip--

Thanks!
  Scott



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



[PHP] Re: print all variables

2003-06-18 Thread Scott Fletcher
If you want to see any data beside the form, then you can do this...

print_r($GLOBALS);

Only if you want to see data beside the submitted form.

Matt Palermo [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Could anyone tell me how to print all the variables and values from a
submitted form, so that I can check them?

Thanks,

Matt



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



Re: [PHP] Need someone with a fresh mind on tacking this arrayproblem...

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 10:32, Scott Fletcher wrote:

[snip]

  if ($ArrayCheck == 0) {
 $ArrayDataCount['$ODBC_RESULT'] = 0;

What happens when you remove the single-quotes? You're currently
defining only one array value, with the key being the literal string
'$ODBC_RESULT'--when you probably want to be using the contents of
$ODBC_RESULT.

I haven't tested it, but it's the first thing I see. 


Hope this helps,

Torben


-- 
 Torben Wilson [EMAIL PROTECTED]+1.604.709.0506
 http://www.thebuttlesschaps.com  http://www.inflatableeye.com
 http://www.hybrid17.com  http://www.themainonmain.com
 - Boycott Starbucks!  http://www.haidabuckscafe.com -




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



  1   2   >