RE: [PHP] Mail Function

2002-04-03 Thread Mark Roedel


Have you verified that the mail settings in your php.ini are correct?

---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell


 -Original Message-
 From: Chiew, Richard [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, April 03, 2002 11:45 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Mail Function
 
 
 
 
  Can someone please tell me what did i do wrong in the following php
  mail function?
  
  I created the following php file using the mail() function 
  but i keep getting the 'failed to connect.unable to send your
  mail.' message. Can anyone please tell me what did i do wrong?
  
  [snip]

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




RE: [PHP] PHP - mssql

2002-03-20 Thread Mark Roedel

 -Original Message-
 From: chris [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, March 20, 2002 3:38 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP - mssql
 
 
 ?PHP
 $link = mssql_connect($hostname,$username,$password);
 $dblink = mssql_select_db($dbname, $link);
 if ( $link  $dblink )
 {
 $query = select * from members where user = '$user' and pass 
 = '$pass';
 $result = mssql_query( $query );
 if ( $result ) echo correct login;
 else echo wrong login;
 }
 ?
 
 This is not working... i have tried everything i can think of 
 that can work but with no luck.

In what way isn't it working?  Do you get an error message, or just not
the result you were expecting?

If it's the latter (in particular, if you're getting correct login no
matter what values you use for $user and $pass), the issue is likely
related to the fact that mssql_query() returns a result identifier which
doesn't necessarily have any correlation to the contents of the result
set -- it'll only return false if there's an error in your query (and a
query can be error-free and still not return data).

For what you're doing, you'll probably want to take a look at
mssql_num_rows().


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell


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




RE: [PHP] How do I get htaccess files to take effect?

2002-02-04 Thread Mark Roedel

 -Original Message-
 From: Neil Freeman [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, February 04, 2002 4:45 AM
 To: PHP General
 Subject: [PHP] How do I get htaccess files to take effect?
 
 
 This is my first time attempting to use htaccess files. I am 
 running Apache 1.3.20 with PHP v4.0.6 installed as a module.
 Within Apache's httpd.conf file I have the following value set:
 
 [snip]
 
 What I am attempting to do is alter PHP's include path 'on 
 the fly' rather than specifying an overall value within php.ini.
 The problem I have though is that the 'include_path' value does
 not appear to be picked up. Am I using htaccess files correctly
 or do I need to alter some other values within Apache's
 httpd.conf file??

What you've got so far looks fine.

The other thing that you'll need, though, is an appropriate
AllowOverride value in your httpd.conf for the server or directories
in question.  

http://httpd.apache.org/docs/mod/core.html#allowoverride


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell


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




RE: [PHP] How do I get htaccess files to take effect?

2002-02-04 Thread Mark Roedel

 -Original Message-
 From: Neil Freeman [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, February 04, 2002 10:36 AM
 To: Mark Roedel
 Cc: PHP General
 Subject: Re: [PHP] How do I get htaccess files to take effect?
 
 
 Thanks for the reply Mark,
 
 I am fairly new to this :) Here is a snippet of what I have 
 set up so far

 [snip]

  php_value include_path = .;P:/Projects/Sandboxes/Stratos/asa_php
 
 When I access the URL http://localhost/sandbox though I receive the
 message Internal Server Error

Yay!  That's progress.  *grin*  (At least now we can see that it's
attempting to use the htaccess file, not ignoring it.)

Internal Server Error almost always means See your error logs for
more information.
 
In this case, I think the first thing I'd try, unless the errorlog info
indicates otherwise, is losing the = sign.


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell


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




RE: [PHP] add on's to php

2002-01-31 Thread Mark Roedel

 -Original Message-
 From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 31, 2002 9:22 AM
 To: php-list
 Subject: [PHP] add on's to php
 
 
 I was wondering, if it would be possible to work on a add on
 the fly approach for php modules like zlib, imap, gd etc.
 There are a lot of people who dont compile these in there
 installation by default, which makes it very difficult to work
 on programs which utilize these modules.  Coz there are a lot
 of ppl who are fussy abt recompiling php all the time.

Y'mean something like the php.ini extension directive, or the dl()
function?

See

http://www.php.net/manual/en/configuration.php#ini.sect.extension
and
http://www.php.net/manual/en/function.dl.php

for more info on those.  Note, though, that this functionality won't be
enabled on every server, often for security reasons.

I'm not sure how much of an issue it really needs to be, though.  Are
you running into people who are surprised that your programs won't work
on their server?  (Could this mean that you need to take a look at how
clearly the requirements are communicated?)


---
Mark Roedel   | A modern US Navy cruiser now requires
Systems Programmer|  26 tons of manuals.  This is enough
LeTourneau University |  to affect the vessel's performance.
Longview, Texas  USA  |-- New Scientist magazine


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP Graphics Support

2002-01-31 Thread Mark Roedel


You might try throwing together a quick phpinfo() page to see if it
matches what you're expecting.  (Paying particular attention to the
configure string and build date that it reports.)

Once in a while, I get into a case where, even after I've done a fresh
configure and make/make install, I still end up with my previous version
of the PHP binary.  A 'make clean' (and, sometimes, an 'rm
/usr/local/apache/libexec/libphp4.so') followed by another make/make
install is usually enough to set this straight.


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell


 -Original Message-
 From: Ed Lazor [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 31, 2002 10:01 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP Graphics Support
 
 
 I must be doing something wrong and I'm wondering if someone 
 here can help me figure out what it is.  The goal is to add
 graphics support to my PHP installation.  The test is a web
 page with the imagecreate function.  Right now I receive
 Fatal Error:  call to undefined function.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] strerror and PHP 4.1.1

2002-01-28 Thread Mark Roedel

 -Original Message-
 From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, January 28, 2002 9:30 AM
 To: PHP-General
 Subject: [PHP] strerror and PHP 4.1.1
 
 
 Is strerror function removed from PHP 4.1.1 ?

The manual at http://www.zend.com/manual/function.strerror.php says it
existed for 4.0.2-4.0.6 only, and includes this notice: 

WARNING: This function is EXPERIMENTAL. The behaviour of this function,
the name of this function, and anything else documented about this
function may change in a future release of PHP without notice. Be warned
and use this function at your own risk.

It looks as if the function has, in fact, been renamed to
socket_strerror() for versions of PHP = 4.1.0, although the same
warning apparently applies.


---
Mark Roedel   | You know, Hobbes, some days even
Systems Programmer|  my lucky rocketship underpants
LeTourneau University |  don't help.
Longview, Texas  USA  | -- Calvin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Passing variables with include()

2002-01-14 Thread Mark Roedel

 -Original Message-
 From: Imar de Vries [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, January 14, 2002 5:53 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Passing variables with include()
 
 
 at this moment I am working on a script that calculates 
 standings of our online racing competition. In order to
 do that, I have to connect to a database on a remote server.
 
 I have read in the php manual that
 
 [quote]
 When a file is include()ed, the code it contains inherits the
 variable scope of the line on which the include() occurs. Any 
 variables available at that line in the calling file will be
 available within the called file. If the include() occurs inside
 a function within the calling file, then all of the code contained
 in the called file will behave as though it had been defined inside
 that function.
 [/quote]

This is only true for include()s that occur on a local file.  

The next paragraph from the manual contains the information that you'll
actually need:

[quote]
If the include()ed file is called via HTTP using the fopen wrappers, and
if the target server interprets the target file as PHP code, variables
may be passed to the include()ed file using an URL request string as
used with HTTP GET. This is not strictly speaking the same thing as
include()ing the file and having it inherit the parent file's variable
scope; the script is actually being run on the remote server and the
result is then being included into the local script. 
[/quote]
 
The distinction is:

When you include() a local file, the parser will insert the *code* from
that file into your script, and it will behave just as if the code
itself was typed in at that point.

When you include() a remote file, all the parser has access to is the
*results* of the remote file request.


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] database with php code

2001-12-07 Thread Mark Roedel


I vaguely remember there being something about this in the user notes at
http://php.net/eval

If I remember correctly, it was something along the lines of adding a ?
to the beginning of your string, and a ? to the end.


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

 -Original Message-
 From: Sergio Mergen [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 07, 2001 2:08 PM
 To: Andrey Hristov
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] database with php code
 
 
 thanks guys..
 
 your suggestion worked.. but there´s a problem..
 the code i´m storing on a database mixs phpcode with html, like this:
 
 ?echo php code?
 br
 now it´s html
 br
 ?echo now it´s php again?
 
 how can i deal with that??
 one solution would be to split the string into
 a php code array and a html code array, and then,
 depending on the case, use echo or eval..
 but that´s is too much trouble...
 could it be an easier way to work these thing around??
 
 thanks again for the replies
 
 
 Sérgio Mergen
 
 
  strip the ? and ? from the strings and do
  eval();
 
  HTH
 
  Regards,
  Andrey Hristov
  - Original Message -
  From: Sergio Mergen [EMAIL PROTECTED]
  To: php List (E-mail) [EMAIL PROTECTED]
  Sent: Friday, December 07, 2001 9:39 PM
  Subject: [PHP] database with php code
 
 
 
  Hello
 
 
  in my database i have records that contain php code.
  i want to put these content on a php file.
  Here´s the problem:
  Suppose the content returned from the Db is:
  $codeFromDB = ?do some processing?;
 
 
  if i do:
  echo $codeFromDB;
 
  i´d be writing the content to the returned html file, bu i´d like
  the content to be processed by php. I suppose echo is not 
 the way to do
 it..
  So what can i do??
 
  thanks for your time
 
 
 
  Sérgio Mergen
  Web developer VIAVALE Internet
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] 1 is not a valid MySQL-Link resource in /home/guestbook.php on line 112

2001-12-04 Thread Mark Roedel

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, December 04, 2001 1:42 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] 1 is not a valid MySQL-Link resource in 
 /home/guestbook.php on line 112
 
 
 any one here can help my problem? 
 (I 'am using hypermart.net hosting, so i am not sure which 
 php version that they 
 provided) 
 
 Here are the problems:
  
 $sqlshow = SELECT * FROM $table ORDER BY id DESC LIMIT 
 $show, $maxshow; 
 $result = mysql_db_query($database, $sqlshow); 
  
  produce: 1 is not a valid MySQL-Link resource in 
 /home/guestbook.php on line 
 112 

Where is your $database variable getting its value?
  
---
Mark Roedel   | Nothing in life is so bad that it cannot be
Systems Programmer|   made much, much worse by the addition of
LeTourneau University |lots of spikes and razors.
Longview, Texas, USA  |-- Sean Kozma 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] SQL in Function

2001-11-26 Thread Mark Roedel

 -Original Message-
 From: Oosten, Sjoerd van [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, November 22, 2001 2:01 AM
 To: '[EMAIL PROTECTED]'
 Subject: [PHP] SQL in Function
 
 
 function Activeyesno($month,$day,$year,$Project_id){
 $dayactief = mktime(0, 0, 0, $month, $day, $year);
 $daytemp = date(Y-m-d, $dayactief);
 $resultactive = mysql_query(SELECT * FROM EIAProjecten WHERE
 ((Project_begindatum = '$daytemp' AND Project_id = '$Project_id') OR
 (Project_einddatum = '$daytemp' AND Project_id =
'$Project_id')),$db);

 $num_rows = mysql_num_rows($resultactive);
 if ($num_rows == '1'){
 return red; }
 }

 1. Is it possible to make a sql connection in my function

Yes.

 2. did i do something wrong?

Yes.

The thing you have to remember is that your database link identifiers,
etc., follow the same rules of scope as any other variable (and thus,
need to either be passed into your function as parameters or declared as
global).

Specifically, in your case, the $db variable referenced in your
mysql_query() call  doesn't appear to have a value that's local to this
function.


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] First CGI, then PHP

2001-11-15 Thread Mark Roedel

 -Original Message-
 From: Berthold [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, November 15, 2001 9:11 AM
 To: PHP General
 Subject: [PHP] First CGI, then PHP
 
 
 Is it possible to add PHP-code into the html-templates of
 ht://dig?
 
 The problem is the execution after or before the CGI-prog
 has run.  Of course I need 'after'. But how can I do that?
 
 What is the default order in a builtin-PHP?

See http://www.htdig.org/FAQ.html#q4.7 for information on incorporating
PHP or other external CGI scripts into your ht://dig results pages.

For a more detailed writeup of integrating ht://dig and PHP, see the
Search This! article at
http://www.devshed.com/Server_Side/PHP/Search_This/  It's written for
PHP3, but as I recall everything worked pretty much the same when I
moved from PHP3 to PHP4.


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Looking for security annoucements

2001-11-09 Thread Mark Roedel

 -Original Message-
 From: Jimmy [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, November 09, 2001 2:41 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Looking for security annoucements
 
 
 I'm running phpBB not phpNuke and I'm subcribed to Buftraq, 
 hope the others are more helpful for me...

What version of phpBB?  I know there were a number of security fixes in
the last few releases (current looks to be 1.4.4)...


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Problem with date_format() in indirect MySQL query...

2001-11-01 Thread Mark Roedel

 -Original Message-
 From: Ryan Fischer [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, November 01, 2001 5:37 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Problem with date_format() in indirect MySQL query...
 
 
 $res = $this-query(select *, date_format(thedate, 'M d, Y') as dt,
 date_format(thedate, 'l:i p') as tm from thetable where foo = 
 '$bar');
 
 Every other query I've executed in this fashion, I've been 
 successful in retrieving the results.  But, when I try doing
 something with the date_format function, when I try to print
 out the formatted date and time returned, I get the formats
 instead.
 
 Does anyone have any idea why, and any idea what I can do to rectify
 this?  TIA!  :)

Perhaps a quick re-read of the date_format() section of
http://www.mysql.com/doc/D/a/Date_and_time_functions.html
is in order?  (Hint: the % characters mean something.)


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Problem writing to file, can't find the error

2001-11-01 Thread Mark Roedel

 -Original Message-
 From: Jeff Lewis [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, November 01, 2001 7:21 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Problem writing to file, can't find the error
 
 
 I have this code in my program but I fail to find the error, 
 does anyone see it after a quick glance?
 
 ?php
 if ($action == save_filter) {
 $fh = fopen (./filters.data.php, r+b) or die (couldnt open);
 $file = fread($fh, filesize(./filters.data.php));
 $file = stripslashes($file);
 $array = unserialize($file);
 $array[] = array($filter, $name);
 
 $out = serialize($array);
 fwrite($fh, $out) or die;
 
 fclose($fh);
 
 }
 ?

Sorry...my internal PHP parser is just a little rusty.  Does this code
produce an error message?  (If so, what does it say?)  Or just not the
results you were expecting?  (In which case, what results were you
expecting, and how did the actual results differ?)


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Problem with fopen() when php is in safe_mode

2001-11-01 Thread Mark Roedel

 -Original Message-
 From: Daniel Bergqvist [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, November 01, 2001 9:57 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Problem with fopen() when php is in safe_mode
 
 
   if($dir = @opendir(/home/d5051/public_html/test)){

You're getting filenames from
/home/d5051/public_html/test

$fd = fopen($file,r);
 [snip]

 Warning: fopen(testar.txt,r) - No such file or directory in 
 /home/d5051/public_html/mail.php on line 17

But your script is apparently running in
/home/d5051/public_html
And trying to open the file in that same directory.

Try changing the fopen line to

$fd = fopen(test/$file,r);
Or
$fd = fopen(/home/d5051/public_html/test/$file,r);


---
Mark Roedel   | The most overlooked advantage to owning a
Systems Programmer|  computer is that if they foul up there's no
LeTourneau University |  law against whacking them around a little.
Longview, Texas, USA  |  -- Owen Porterfield 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Help with an error I can't find!

2001-11-01 Thread Mark Roedel

 -Original Message-
 From: Lic. Carlos A. Triana Torres [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, November 01, 2001 4:25 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Help with an error I can't find!
 
 
 Can some one help fix this error?
 
 Warning: Variable passed to each() is not an array or object in
 /usr/local/.test.php on line 14
 
 Here is the line:
 
 while(list ($key, $mid) = each ($HTTP_POST_VARS)) {

Is that line inside a function?  If so, have a look through

http://php.net/manual/en/language.variables.scope.php

for information on how to access global-scope variables from inside a
function.


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] I cannot figure this one out! I'm going crazy! :)

2001-10-29 Thread Mark Roedel

 -Original Message-
 From: Richard Marks [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, October 29, 2001 9:49 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] I cannot figure this one out! I'm going crazy! :)
 
 
 mebbe you can figure out why this dont work! :)
 
 Parse error: parse error, expecting `')'' in /(PATH NOT SHOWN 
 TO PUBLIC,SORRY) /www.gzmsoftware.f2s.com/php/fractal.php on line 2
 
 --
 --
 
 ?
 function box( int $im,int $x,int $y,int $x2,int $y2,int $color )

Try changing this to

  function box ($im, $x, $y, $x2, $y2, $color)

(Also in your other function definition.)


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] apache1.3.22 won't start with php4.0.6

2001-10-29 Thread Mark Roedel

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, October 29, 2001 11:29 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] apache1.3.22 won't start with php4.0.6
 
 
 Does anyone know how to get round this problem? I have just 
 installed Apache 1.3.22 but when I load php4.0.6 it won't run. 

Does it give you any messages when it fails to run?  Put anything useful
in your Apache error logs?


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] help!! ¡¡ayuda!!

2001-10-25 Thread Mark Roedel

 -Original Message-
 From: Sebas [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, October 25, 2001 12:19 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] help!! ¡¡ayuda!!
 
 
 I need to open a dbase file, so I use the dbase_open 
 function and then I compile it but it tells me
 
  Fatal error: Call to undefined function: dbase_open()
 
 it seems like this function does not exists!.Does anybody 
 could help me?

There aren't any additional libraries needed for the dbase functions,
but they'll only be available if '--with-dbase' was included in the
parameters when 'configure' was run.

If they're not there, I believe your copy of PHP will need to be rebuilt
to get them.


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Update Query - Urgent

2001-10-23 Thread Mark Roedel

 -Original Message-
 From: Srinivasan Ranganathan [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, October 23, 2001 7:22 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Update Query - Urgent
 
 
 I have a php script generate a sql update statement.
 when i query the database, the update doesn't happen.
 but when i echo the sql string and copy and paste it
 in my mysql client window, the update happens like it
 should!

After the update fails, does an 'echo mysql_error()' tell you anything
useful?


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] format date

2001-10-23 Thread Mark Roedel

 -Original Message-
 From: Caleb Carvalho [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, October 23, 2001 2:53 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] format date
 
 
 I am inserting into table
 values('$product','$title,'$date')
 
 the date field gets added by default, like time stamp,

Does $date have a value at this point?  What is it?
 
 when i view the contents added to database i see date field showing
 ex:
 
 display.php
 
 $product, $title,   $date
 
 mango good fruit  Jan 1 1900 12:00:00:000AM

This looks to me suspiciously like Sybase is seeing either an empty/zero
value or one that it's not able to parse as a date and time.  Are you
*sure* that the column type you're using is supposed to automagically
insert a current timestamp?  If so, you might double-check your
documentation to see under what circumstances it will do so...it might
only do it, for example, if you insert a NULL value (which is not the
same as an empty string).  If not, you could try using the now()
function in your insert query instead of specifying a '$date' value.


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




FW: [PHP] format date

2001-10-23 Thread Mark Roedel

 -Original Message-
 From: Caleb Carvalho [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, October 23, 2001 2:53 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] format date
 
 
 I am inserting into table
 values('$product','$title,'$date')
 
 the date field gets added by default, like time stamp,

Does $date have a value at this point?  What is it?
 
 when i view the contents added to database i see date field showing
 ex:
 
 display.php
 
 $product, $title,   $date
 
 mango good fruit  Jan 1 1900 12:00:00:000AM

This looks to me suspiciously like Sybase is seeing either an empty/zero
value or one that it's not able to parse as a date and time.  Are you
*sure* that the column type you're using is supposed to automagically
insert a current timestamp?  If so, you might double-check your
documentation to see under what circumstances it will do so...it might
only do it, for example, if you insert a NULL value (which is not the
same as an empty string).  If not, you could try using the now()
function in your insert query instead of specifying a '$date' value.


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Warning: Sybase message: Incorrect syntax near 't'.

2001-10-01 Thread Mark Roedel

 -Original Message-
 From: Caleb Carvalho [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, October 01, 2001 4:04 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Warning: Sybase message: Incorrect syntax near 't'. 
 
 
 Hi am trying to add data from html form,  and it seems like 
 the line 14 in my script,
 
 $sybase_query=INSERT into problem 
 VALUES('$product','$pro_title','$description','$solution');
 $sybase_result=sybase_query($sybase_query);
 
 Warning: Sybase message: Incorrect syntax near 't'. (severity 15) in 
 /var/www/html/process.php on line 14
 
 Problem Title : Doesn\'t work

If I'm remembering right, Sybase would prefer to see this as
Problem Title : Doesn''t work

(That is, a single-quote within a string that you're passing off to
Sybase should be escaped by another single-quote, not by a slash.)


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] what does this mean?

2001-09-24 Thread Mark Roedel

 -Original Message-
 From: Jay Paulson [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, September 24, 2001 3:09 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] what does this mean?
 
 
 Warning: Cannot use a scalar value as an array
 what does that mean?
 
 i have in my code this:
 $errorMsg[error] = ;

It means, in this case, that it doesn't think that $errorMsg is an
array.

And that, in turn, makes me think that you've probably already done
something with the $errorMsg variable...perhaps assigned it a string
value?


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP parser BUG - comments

2001-09-24 Thread Mark Roedel

 -Original Message-
 From: Krzysztof Kocjan [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, September 24, 2001 9:32 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP parser BUG - comments
 
 
 I'm using PHP/4.0.6. I suppose I found bug in PHP parser. There is PHP
 code:
 ?php
 
 print( 'test' );
 //print( ?php print( 'aaa' ); ? );

According to
http://www.php.net/manual/en/language.basic-syntax.comments.php, a
one-line comment only extends to the end of the line or the current
block of PHP code, whichever comes first.

In this case, that'd mean that the comment doesn't include the  );

And since the ? on that line ends the current code block...

 /*print( ?php print( 'aaa' ); ? );*/
 ?

...then these two lines would not be processed by PHP at all, but would
be passed to the browser as text.

So it appears to me it's working as documented, if not 100%
intuitively...
 

---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP isn't reading the php.ini

2001-09-24 Thread Mark Roedel

 -Original Message-
 From: Brandon Orther [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, September 24, 2001 1:50 PM
 To: PHP User Group
 Subject: [PHP] PHP isn't reading the php.ini
 
 
 When I uncomment the line for php_mssql.dll it doesn't seem 
 to do anything.  It just says call to undifiened function. 

Probably a silly question, but you *are* restarting Apache after
changing your php.ini file, right?

 I removed the php.ini from the winnt folder and still php runs. 
 I am wondering if php is even reading the php.ini.  Is it
 possible for it to run with out it?

Yep...PHP is built with a set of default values that get used if it
doesn't see a php.ini in the directory that it was expecting, or if a
particular option isn't specified in the file that's there.


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] error message

2001-09-22 Thread Mark Roedel

 -Original Message-
 From: Peter [mailto:[EMAIL PROTECTED]] 
 Sent: Saturday, September 22, 2001 12:10 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] error message
 
 
 I was wondering does anyone know what this particular error 
 message means:
 
 Warning: Use of undefined constant submit - assumed 'submit' in
 /usr/local/apache/htdocs/mm2/mymarket/privatedirectory/db/newt
 hread.php on
 line 110
 
 But I already defined submit button as shown in the php script here:
 
 centerinput type=submit name=submit value=Enter your news
 
 But for some reason when it goes to line 110 as shown just 
 below, it says that it is undefined:
 
 if(!submit) {

Try changing this to

if (!$submit) {


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Is it a mysql AND/OR php BUG???

2001-09-12 Thread Mark Roedel

 -Original Message-
 From: Augusto Cesar Castoldi [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, September 12, 2001 9:46 AM
 To: Schill, Johannes
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Is it a mysql AND/OR php BUG???
 
 
 the function isn't decoding right.
 
   function decode($decode_str, $pass_str)
   {
 $encode_str = addslashes($encode_str);
 $sql=select decode(\$decode_str\,
   \$pass_str\);
 echo htmlspecialchars($sql).br;
 $data = mysql_query($sql) or die (Erro crypt
  2.);
 $row = mysql_fetch_row($data);
 return $row[0];
   }

Should you maybe be using $decode_str instead of $encode_str in the
first line of this function?


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] what will be the output for this pgm?

2001-09-05 Thread Mark Roedel

 -Original Message-
 From: Balaji Ankem [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, September 04, 2001 3:36 PM
 To: Renze Munnik
 Cc: [EMAIL PROTECTED]
 Subject: [PHP] what will be the output for this pgm?
 
 
 what will be the output for the following program?
 
 
 ?php
  $foo=$HTTP_SERVER_VARS[HTTP_REFERER];
  echo $foo;
 ?
 
 
 
 For me it is printing the blank value.

That's what I'd expect, if you're running that script directly.  The
referrer variable generally only gets a value if you reached the script
by clicking on a link.


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] MDB

2001-09-03 Thread Mark Roedel

 -Original Message-
 From: Alfredo Yong [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, September 03, 2001 11:05 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] MDB
 
 
 2. The page at http://odbc.linuxave.net/, stated as the 
 source for the ODBCSocketServer server, is not on-line
 now. Does anybody knoes if this will be fixed soon? Is
 there another source for the ODBCSocketServer server?

http://odbc.sourceforge.net/

---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] What is it with _vti?

2001-08-27 Thread Mark Roedel

 -Original Message-
 From: Seb Frost [mailto:[EMAIL PROTECTED]] 
 Sent: Sunday, August 26, 2001 6:49 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] What is it with _vti?
 
 
 I have these _vti_pvt _vti_cnf directories on my website.  
 Why?  I never put them there... can I delete them?
 
 I tried searching for this but it's impossible to search for 
 since it seems a lot of website have these directories and it
 just comes up with them :-)

FrontPage droppings.  *grin*

And yes, assuming you're not doing anything FrontPage-specific, you can
safely remove them.  (They will, of course, be recreated if you publish
your site again using FrontPage.)


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Problems compiling with Apache 2.0 Alpha 22

2001-08-23 Thread Mark Roedel

 -Original Message-
 From: The Doctor [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, August 22, 2001 10:40 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Problems compiling with Apache 2.0 Alpha 22
 
 
 Can anyone explain what I am getting this?
 
 [snip]

 checking for Apache 2.0 module support via DSO through APXS... 
 
 Usage: apxs -g [-S var=val] -n modname
apxs -q [-S var=val] query ...
apxs -c [-S var=val] [-o dsofile] [-D name[=value]]
[-I incdir] [-L libdir] [-l libname] 
 [-Wc,flags]
[-Wl,flags] files ...
apxs -i [-S var=val] [-a] [-A] [-n modname] dsofile ...
apxs -e [-S var=val] [-a] [-A] [-n modname] dsofile ...
 
 configure: error: Sorry, I cannot run apxs. Either you need 
 to install Perl or you need to pass the absolute path of apxs 
 by using --with-apxs2=/absolute/path/to/apxs

That looks exactly like the output I get when I run the apxs that came
with Apache 1.3.20.  Are you really *really* sure you're pointing to the
right copy of apxs?


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Is this a bug?

2001-08-20 Thread Mark Roedel

 -Original Message-
 From: Ratko [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, August 20, 2001 1:40 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Is this a bug?
 
 
 Please try this:
 ?
 echo 996448234192168122==996448234192168125;
 ?
 
 I get true as a result. How's that possible?
 But if I do:
 echo 996448234192168122===996448234192168125;
 then I get false as expected.

A couple of snippets from the PHP manual:

http://www.php.net/manual/en/language.types.integer.php:
The size of an integer is platform-dependent, although a maximum value
of about two billion is the usual value (that's 32 bits signed)...If you
specify a number beyond the bounds of the integer type, it will be
interpreted as a float instead

...and...

http://www.php.net/manual/en/language.types.float.php
The size of a float is platform-dependent, although a maximum of
~1.8e308 with a precision of roughly 14 decimal digits is a common
value...Never trust floating number results to the last digit, and never
compare floating point numbers for equality.  If you really need higher
precision, you should use the arbitrary precision math functions or gmp
functions instead.


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] new one is it ??

2001-08-13 Thread Mark Roedel

 -Original Message-
 From: Tim [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, August 13, 2001 9:38 AM
 To: Mark Lo
 Cc: php general
 Subject: Re: [PHP] new one is it ??
 
 
 Boy that looks familiar...my (apache) logs are full of 'em.
 
 I wonder if we can make a PHP script called default.ida that 
 sends back a big chunk of data and causes the worm to get a
 buffer overflow? :) :)

I rather liked this approach that I saw posted in another list:

http://www.klippan.seths.se/default.phps

(Does some hostname/whois lookups on the infected server and attempts to
email some people who might be able to do something about it.)


---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP 4 released date

2001-08-08 Thread Mark Roedel

 -Original Message-
 From: Deependra B. Tandukar [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 08, 2001 4:31 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP 4 released date
 
 
 Can anybody give me, PHP4 released date?

The NEWS file in your PHP directory gives the date of each release.  The
first PHP4 Beta came out July 19th, 1999; the 4.0.0 release was May
22nd, 2000; and the current (4.0.6) release was June 23rd, 2001.


---
Mark Roedel ([EMAIL PROTECTED]) | There cannot be a crisis next week.
Systems Programmer / WebMaster |  My schedule is already full.
 LeTourneau University |   -- Henry Kissinger 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] 3rd include

2001-08-08 Thread Mark Roedel

 -Original Message-
 From: Drew P. Vogel [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 07, 2001 8:51 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] 3rd include
 
 
 Has the 3rd include bug (where variable definitions are 
 lost at the 3rd include), been fixed yet?

The obvious way to answer this question would be to look it up in the
database at bugs.php.net.  Any idea whether it's actually gotten entered
there?  (I tried searching for '3rd', 'third', and 'three' -- 'include'
just got way more results than I was interested in sifting through --
and didn't see anything that appeared to match what you're describing...


---
Mark Roedel   | This is the perversity of software.  It
Systems Programmer|  is *always* more complex than you
LeTourneau University |  anticipate, even when you know this and
Longview, Texas, USA  |  compensate for it. --Robert Martin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] 3rd include

2001-08-08 Thread Mark Roedel

I don't see anything in the annotations for include() about losing
variable definitions...the notes that I see that look remotely relevant
are those regarding what PHP considers to be the current directory
when doing nested includes, which would cause problems in locating the
include files themselves, not in losing their contents.

If that's what you're referring to, see bug#11362 - per Zeev, the
current CVS  (as well as PHP 4.0.7 when it's released), has changed to a
behavior that should be more likely to do WhatTheScriptProgrammerMeant
in most cases.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger



 -Original Message-
 From: Drew P. Vogel [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 08, 2001 12:13 PM
 To: Mark Roedel
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] 3rd include
 
 
 I searched the database and did not find anything. I was not 
 sure if the
 bug could possibly be entered under a different title, though. It is
 discussed in the manual errata for the include() function, so I would
 assume the developers at least know of it.
 
 --Drew Vogel
 
 On Wed, 8 Aug 2001, Mark Roedel wrote:
 
  -Original Message-
  From: Drew P. Vogel [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, August 07, 2001 8:51 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] 3rd include
 
 
  Has the 3rd include bug (where variable definitions are
  lost at the 3rd include), been fixed yet?
 
 The obvious way to answer this question would be to look it up in the
 database at bugs.php.net.  Any idea whether it's actually 
 gotten entered
 there?  (I tried searching for '3rd', 'third', and 'three' 
 -- 'include'
 just got way more results than I was interested in sifting through --
 and didn't see anything that appeared to match what you're 
 describing...
 
 
 ---
 Mark Roedel   | This is the perversity of software.  It
 Systems Programmer|  is *always* more complex than you
 LeTourneau University |  anticipate, even when you know this and
 Longview, Texas, USA  |  compensate for it. --Robert Martin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] 3rd include

2001-08-08 Thread Mark Roedel

 -Original Message-
 From: Drew P. Vogel [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 08, 2001 2:19 PM
 To: Mark Roedel
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] 3rd include
 
 
 You're right. It is not discuessed there. My memory served me 
 incorrectly.
 
 In index.php (the file loaded by php), 
   echo( $HTTP_POST_VARS[last_name] );
 will print the variable contents, but in save_script.php 
 (the 3rd file included) the same function call will print
 nothing.

Are you quite sure there's not something else going on here?  (An issue
of the $HTTP_POST_VARS array being out-of-scope inside a function, for
example?)  I'm sure I would have run into this behavior by now if it
were a system bug.

For whatever it's worth, I just did a test, with includes nested ten
deep, and $HTTP_POST_VARS kept its value at every level.  (PHP 4.0.6,
Apache 1.3.20, FreeBSD 4-Stable)


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] 3rd include

2001-08-08 Thread Mark Roedel

 -Original Message-
 From: Drew P. Vogel [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 08, 2001 3:14 PM
 To: Mark Roedel
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] 3rd include
 
 
 If a file is included from within a function, this would limit the
 variable cope of this file, correct?

Yes it would.  (Specifically, it would mean that everything in that file
operates at the same scope as the function in which it's included.
That, in turn, means that $HTTP_POST_VARS is likely only available if
it's been declared as global within that function.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger



 On Wed, 8 Aug 2001, Mark Roedel wrote:
 
  -Original Message-
  From: Drew P. Vogel [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, August 08, 2001 2:19 PM
  To: Mark Roedel
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] 3rd include
 
 
  You're right. It is not discuessed there. My memory served me
  incorrectly.
 
  In index.php (the file loaded by php),
 echo( $HTTP_POST_VARS[last_name] );
  will print the variable contents, but in save_script.php
  (the 3rd file included) the same function call will print
  nothing.
 
 Are you quite sure there's not something else going on here? 
  (An issue
 of the $HTTP_POST_VARS array being out-of-scope inside a 
 function, for
 example?)  I'm sure I would have run into this behavior by now if it
 were a system bug.
 
 For whatever it's worth, I just did a test, with includes nested ten
 deep, and $HTTP_POST_VARS kept its value at every level.  (PHP 4.0.6,
 Apache 1.3.20, FreeBSD 4-Stable)
 
 
 ---
 Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a 
 crisis next week.
 Systems Programmer / WebMaster  ||   My schedule is already full.
  LeTourneau University  ||-- 
 Henry Kissinger
 
 
 
 
 
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Insecurity with PHP authorization

2001-08-07 Thread Mark Roedel

 -Original Message-
 From: Stefen Lars [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 07, 2001 3:03 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Insecurity with PHP authorization
 
 
 I do realize that if I were to place a .htaccess file in the 
 root of the intranet server, I could prevent the above from
 happening, but then I loose the advantage of having the users
 profile in a database, where a user can easily change her
 password. Allowing a web user to edit a password in the
 .htaccess file poses more problems than it solves, especially
 as it certainly could occur that more than one persons wants to 
 edit his password simultaneously.

If you control the server, have you considered something along the lines
of mod_auth_mysql (which would allow you to place a .htaccess file that
authenticates using the information stored in your mysql database)?
I've used it on a few projects here with good results.

You can pick up a copy from the contrib downloads at mysql.com.


---
Mark Roedel ([EMAIL PROTECTED]) | There cannot be a crisis next week.
Systems Programmer / WebMaster |  My schedule is already full.
 LeTourneau University |   -- Henry Kissinger 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Syntax

2001-08-04 Thread Mark Roedel

 -Original Message-
 From: BRACK [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 10:10 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Syntax
 
 
 I'm in a process of doing site with MySQL database, and most of 
 the code I plased in index.php3 (in one file) but I've got some 
 problems with statements:
 
 I have:

 [stuff snipped]

 IT DOESNT WORK!

In what way doesn't it work?  Do you get an error message (if so, what
does it say?) or just not the result you were expecting?


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] URGENT!!! Can't start Apache with php4 and mysql

2001-08-02 Thread Mark Roedel

 -Original Message-
 From: Richard Kurth [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 5:36 AM
 To: php
 Subject: [PHP] URGENT!!! Can't start Apache with php4 and mysql
 
 
 I have read the archives for this problem but I can't seam 
 to fix it.  This is on a RedHat 7.  I get this error when I
 try to start Apache

 Starting httpd: Syntax error on line 256 of /etc/httpd/conf
 /httpd.conf: Cannot load /etc/httpd/modules/libphp4.so into server:
  libmysqlclient.so.10: cannot open shared object file: No such file
   or directory
 
  What I have read is to add the path to libmysqlclient.so.10 to the
  /etc/ld.so.conf file and then run  ldconfig. at root

 I did this but ldconfig does not run.  I keep getting No such
 file or directory

If it's not in your normal search path, you might nead to provide the
full path to the ldconfig program.  I'm not sure where it normally lives
on a Redhat system, but on my FreeBSD box, it's in /sbin.

An alternative, of course, if you can't get things working the other
way, is simply to copy libmysqlclient.so.10 to one of the locations that
was already in your ld.so.conf (that is, somewhere that ld already knows
about)...


---
Mark Roedel   | The most overlooked advantage to owning a
Systems Programmer|  computer is that if they foul up there's no
LeTourneau University |  law against whacking them around a little.
Longview, Texas, USA  |  -- Owen Porterfield 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Trouble creating a list on months

2001-08-01 Thread Mark Roedel

 -Original Message-
 From: Mario A. Salinas [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 31, 2001 7:33 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Trouble creating a list on months
 
 
 The actual function is as follows:
 
 function month_select($default=1) {
 
$offset = date(n)-1;  // value used to be 'm'
 
echo (select name=month 
 style=\font-family:Verdana,Helvetica;font-size:8pt;\);
for($x=1;$x=12;$x++) {
  $month = $x + $offset;
  if($month12) $month -= 12;
  echo(option value=$month);
  if($month==$default) echo( selected);
  echo(.date(F,mktime(0,0,0,$month))./option);

Try changing this to

echo .date(F,mktime(0,0,0,$month,1))./option);

}
echo (/select);
 }
 
 
 Any Ideas what could be causing the problem?  I'm new to this
 and have been staring at it for a while.  Your help is greatly 
 appreciated.

Actually, I'd expect that if you try your code again today, it works
just like you'd expect.

Mktime() uses the current (local date/time) value for any parameters
that you leave out.  Since you were running this on July 31st, that
means your mktime call was trying to build timestamps for February 31st
(which is actually in March), April 31st (actually in May), and so on.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Connecting PHP to SQL Server

2001-07-30 Thread Mark Roedel

 -Original Message-
 From: webmaster uva [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 30, 2001 6:56 AM
 To: php
 Subject: [PHP] Connecting PHP to SQL Server
 
 
 I have to connect one Solaris computer (Netscape Enterprise
 Server) with PHP to another one with NT (database SQL Server).

 I have to get data from the SQL Server database using PHP.

 Is it possible?

Definitely possible.

You'll want to install the FreeTDS libraries (http://freetds.org/) on
the Solaris machine, then rebuild PHP using the --with-sybase option
when you run configure.  That'll enable a set of mssql functions for you
to use.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Syntax Eyes

2001-07-25 Thread Mark Roedel

 -Original Message-
 From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 24, 2001 10:53 PM
 To: Matthew Loff; 'Php-General'
 Subject: Re: [PHP] Syntax Eyes
 
 
 Okay, I figured out the @header will actually reset the 
 headers, but it still just prints the raw data to the
 screen instead of the actual image.  How can I fix this?

Errr...actually, no it won't.

@header(), as opposed to header(), simply says If you run into any
errors, don't bother telling me about them.  The fact that, as you say,
the raw data gets printed instead of an image, should tell you that the
header isn't having any effect.

The general rule is that you can't send headers once you've started
sending output to the browser.  In this case, I'm wondering why you want
image data and html tags in the same file anyway...is that really what
you intended?  (Remember, a web browser is basically going to be
expecting a single file in response to a single request...)


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


 
 echo /TDTD NOWRAP ALIGN=\LEFT\ BGCOLOR=\#C8CCC8\;
   if($db-f(bin_data))
   {
 /*
 This doesn't help...
 @header (Content-disposition: filename=.$filename);
 @header( Content-type: image/jpeg );
 */
  $db-p(bin_data);
 
 
   } else {
  echo No Picture Available;
 
 
 -Clayton
 
 
 
 - Original Message -
 From: Matthew Loff [EMAIL PROTECTED]
 To: 'Clayton Dukes' [EMAIL PROTECTED]; 'Php-General'
 [EMAIL PROTECTED]
 Sent: Tuesday, July 24, 2001 11:20 PM
 Subject: RE: [PHP] Syntax Eyes
 
 
 
  Output control functions will let you buffer the output, and you can
  decide to send a header instead of flushing the buffer to 
 the client:
 
  http://www.php.net/manual/en/ref.outcontrol.php
 
  ob_start()  flush()  should accomplish this all for you.
 
 
  -Original Message-
  From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 24, 2001 11:14 PM
  To: Php-General
  Subject: Re: [PHP] Syntax Eyes
 
 
  Nevermind, I got it...
 
  Now, how do you reset header information if you need to redclare the
  header(); 
 
  ie:
  Warning: Cannot add header information - headers already 
 sent by (output
  started at ...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Syntax Eyes

2001-07-25 Thread Mark Roedel

 -Original Message-
 From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 25, 2001 10:42 AM
 To: Mark Roedel; Php-General
 Subject: Re: [PHP] Syntax Eyes
 
 
 I have a row in sql that is binary data (a jpeg)
 I need to echo that data to a table on the web page in the form of the
 original jepg, when I echo it now, I just get the actual data stream.

 How can I fix this?

?php
   echo tdimg src=\/path/to/script/that/outputs.jpeg\/td;
?


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] URGENT... NEED HELP!!!

2001-07-24 Thread Mark Roedel

 -Original Message-
 From: Kyle Smith [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 24, 2001 9:34 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] URGENT... NEED HELP!!!
 
 
 What is wrong with this code?
 (note: the variables $email and $comments are sent from 
 another page but i get the error message from this page 
 saying Warning: Could not deliver email. You are over quota. 
 in /web/sites/197/lk6/www.stupeedstudios.f2s.com/email.php on 
 line 15 in which line 15 is the line under $message = 
 $email. $comments; saying just ?

I'd venture to guess there isn't anything in particular wrong with the
*code*, but that either the sending account has already sent as much
mail as it's allowed to, or the receiving account's mailbox is full.

Assuming (since it's your address) that you've already verified that the
latter isn't the case, I think your next step is probably to have a
little chat with your server admins.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Why wont this work?

2001-07-23 Thread Mark Roedel

 -Original Message-
 From: Dan Krumlauf [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 24, 2001 11:24 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Why wont this work?
 
 
 news_publish.php
 ***

 [snip]

  $templine = preg_replace(/(NEWS)(.*?)(\/NEWS)/i,\\1$news\\2,
 $templine));

Unless my counting skills have gone downhill lately, this line has more
)'s than ('s.


---
Mark Roedel ([EMAIL PROTECTED]) | There cannot be a crisis next week.
Systems Programmer / WebMaster |  My schedule is already full.
 LeTourneau University |   -- Henry Kissinger 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Single Digit in Double digit column

2001-07-23 Thread Mark Roedel

 -Original Message-
 From: Rehuel Lobato de Mesquita [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 23, 2001 12:00 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Single Digit in Double digit column
 
 
 I  have a mySQL table, where the ID field is an auto increment
 number (INT(2)). I have a query that selects 2 colunms in the
 table and the lists them, but only the items with a double digit
 id are displayd. it fails to display items with 1 digit!
 What did I do wrong
 I want to know where to look.

It's hard to say for sure what you did wrong, since you really haven't
given us much information on what you did.

My first thought, though, would be to take a closer look at your query
to see if you're perhaps filtering out more than you expected.  Perhaps
if you posted that, along with whatever parts of your source code seem
relevant...


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Networking

2001-07-23 Thread Mark Roedel

 -Original Message-
 From: ReDucTor [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 23, 2001 5:20 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Networking
 
 
 Hey does any one know if it is possible to do something like
 read stuff thro file and printer sharing on a remote pc, i tried
 \\computer\dir for the dirs but that didn't work any suggestions
 (btw i did addslashes :D )

Are you trying to access these resources from a Windows machine (in
which case I'd be surprised if something close to what you tried didn't
work), or from something Unix-y?

If it's the latter, probably your best bet is going to be to get a copy
of Sharity or Samba installed and mount the remote-machine resources so
that you can treat them as local resources.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] bug?

2001-07-20 Thread Mark Roedel

 -Original Message-
 From: Jeremy Morano [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, July 19, 2001 4:07 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] bug?
 
 
 Does anybody know of a common bug where a variable contains 
 what seems to be a generated random number instead of the
 input data that was given?
 
 I'm inputting all sorts of info and only one variable is acting
 strange..hmmm

*I* haven't seen behavior like that.

Is it possible you're accidentally assigning it a value by using a =
when you meant == at some point in your script?

Is there someplace that we might be able to look over your code and see
the results of running it?


---
Mark Roedel   | The most overlooked advantage to owning a
Systems Programmer|  computer is that if they foul up there's no
LeTourneau University |  law against whacking them around a little.
Longview, Texas, USA  |  -- Owen Porterfield 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] sql query successful

2001-07-18 Thread Mark Roedel

 -Original Message-
 From: Tyler Longren [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 18, 2001 1:25 PM
 To: php-general
 Subject: [PHP] sql query successful
 
 
 I've been writing database enabled site for quite a while 
 now.  One thing I have never figured out it how to determine
 if a sql query is successful.
 
 This works:
 if ($connection = mysql_connect(host,username,password)) {
 print Successful connection:
 }
 else {
 print No connection;
 }
 
 But this won't work:
 
 if ($sql = mysql_query(SELECT * FROM table ORDER BY rand())) {
 print SQL executed successfully.;
 }
 else {
 print SQL not executed successfully.;
 }

In what way doesn't this work?

The above code should tell you that the query was properly formed and
error-free, and was cheerfully accepted and processed by the database
server.  (You don't get much more successful than that...)

If what you're really looking for is whether there were any rows
returned by the query, then you'll want to look into the
mysql_num_rows() function.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] sql query successful

2001-07-18 Thread Mark Roedel

 -Original Message-
 From: Christopher Ostmo [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 18, 2001 2:43 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] sql query successful
 
 
 Your statement above is checking to see if the fact that $sql 
 is equal to mysql_query(SELECT * FROM table ORDER BY rand())
 is TRUE, but you're using an assignment operator (=) and not a
 comparison operator (==), so it should always return FALSE. (Can
 you use an assignment operator in an if() statement?)

Actually, you can.  (See
http://www.php.net/manual/en/language.operators.assignment.php)

An assignment operation will return the value that was assigned.

Thus, if we have

if ($sql = mysql_query($query_string))

and the mysql_query call returns a non-false value, the entire
expression will evaluate to true.


---
Mark Roedel   | The most overlooked advantage to owning a
Systems Programmer|  computer is that if they foul up there's no
LeTourneau University |  law against whacking them around a little.
Longview, Texas, USA  |  -- Owen Porterfield 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] sql query successful

2001-07-18 Thread Mark Roedel

 -Original Message-
 From: Tyler Longren [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 18, 2001 1:36 PM
 To: Mark Roedel; php-general
 Subject: Re: [PHP] sql query successful
 
 
 What about when DELETING from a table???  It always returns true.
 Example...the highest ID in this table is 10:
 
 ?
 if ($connection = mysql_connect(localhost,mysql,mysql)) {
 print Connection established;
 $db = mysql_select_db(aanr, $connection);
 if ($sql = mysql_query(DELETE FROM bullitens WHERE 
 id='1212')) {
 print Successful;
 }
 else {
 print Not successful.;
 }
 }
 else {
 print Connection NOT established.;
 }
 ?
 
 We try to delete the bulliten with id of 1212, but there is 
 not bulliten with that ID, and it says Successful.

 I know I could use mysql_affected_rows(), but why doesn't this work???

Because the query itself is still valid.  No syntax errors, no
connection errors, etc.  The fact that there wasn't any data that needed
to be deleted doesn't affect the validity of the query; just the results
of it.

Basically, what it boils down to is that There wasn't anything for me
to do is not an error.  It's a perfectly valid result.  :)


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Problem about PHP

2001-07-17 Thread Mark Roedel

 -Original Message-
 From: ChengWen_Yu [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 10:54 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Problem about PHP
 
 
 I want to write a library for the PHP on Solaris.  But I
 don't know how to do and where I should put this library
 than PHP could reach it.

That's going to depend on what you mean by a library:

If you want to write some functions in PHP and make them available to
other scripts, then it's just a matter of placing that file somewhere in
your include_path and calling it into your other scripts with include(),
require(), auto_prepend_file, etc.  You can find some information in the
manual on defining functions in PHP at
http://php.net/manual/en/functions.php

If you want to actually extend the capabilities of PHP by adding new
functions to the language, you'll want to start by reading
README.EXT_SKEL in the directory where PHP is installed.  That should, I
think, give you most of the information you need to get started.


---
Mark Roedel ([EMAIL PROTECTED]) | There cannot be a crisis next week.
Systems Programmer / WebMaster |  My schedule is already full.
 LeTourneau University |   -- Henry Kissinger 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP]I'm puzzled. TEXTAREA related.

2001-07-12 Thread Mark Roedel

 -Original Message-
 From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 11, 2001 5:40 PM
 To: PHP General List (E-mail)
 Subject: [PHP]I'm puzzled. TEXTAREA related.
 
 
 hey-
 
 i have a page containing a form with a textarea field. The 
 first part of the page is a quick IP check to make sure the
 request is coming from my computer. Here's the code I'm
 confused about:
 
 
 textarea rows=25 cols=80 name=news_info [snip]
 ?php
 readfile(lib/news_file.dat);
 ?
 /textarea
 brbr
 input type=submit name=submitnbsp;nbsp;
 input type=reset name=resetbr
 
 -this part above reads in data from the news file and it's 
 put in between the textarea tags, so editing it is easier,
 then there is this part:
 
 ?php
 }
 
 if($submit)
 {
 $fileh = fopen(lib/news_file.dat, w);
 fwrite($fileh, $news_info);
 fclose($fileh);
 }
 ?

Assuming the order of events in your script is as described above,
here's what's happening:

1st request: 
script displays textarea (blank, or with old contents)
$submit is unset, so no further action

2nd request:
script displays textarea (blank, or with old contents)
$submit is set, so *now* we write the new data out to the file

3rd request:
script displays textarea with updated contents

So...I'd expect the answer is to make sure you're updating the file
*before* you look at its contents.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] webmail

2001-07-09 Thread Mark Roedel

 -Original Message-
 From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 09, 2001 12:34 AM
 To: php general list
 Subject: [PHP] webmail
 
 
 I am trying to write a web-based email client for my site (or 
 are there any samples) using php4 and POP3.

There are a few classes for POP3 interaction using PHP's socket
functions at

http://px.sklar.com/section.html?section_id=10
 

---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] What does this error mean?

2001-06-30 Thread Mark Roedel

 -Original Message-
 From: Jimi Malcolm [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 28, 2001 2:17 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] What does this error mean?
 
 
 I'm trying to from a file in a directory called 'logs'.  I've 
 never seen
 this error before.  What does it mean?
 
 ERROR
 Warning: fopen(logs/993700800.log,w+) - Permission denied in
 /home/sites/site20/users/guide/web/counter.php on line 28

If this is a file that already exists, your script does not have
permission to write to it.  (Check file permissions.)

If the file doesn't already exist, your script does not have permission
to create a file in that location.  (Check directory permissions.)

In both cases, keep in mind that the script is most likely running as
whatever userID the web server runs as (commonly 'nobody'), not as your
own userID.  Make sure file and directory permissions are set
accordingly.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] FILE () STRIPS BLANKS FROM THE ARRAY - HOW CAN I STOP IT

2001-05-07 Thread Mark Roedel

 -Original Message-
 From: Jay Lepore [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, May 06, 2001 7:41 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] FILE () STRIPS BLANKS FROM THE ARRAY - HOW CAN 
 I STOP IT
 
 
 I have an ASCII fixed width text file I'm trying to convert 
 to an array of fields.  But I need to keep the spaces intact
 so I know exactly where one field ends and another begins.
 
 Do you know of any way to modify the default behavior of 
 file() which strips the blanks spaces out when returning the
 array?

I haven't ever seen file() work that way.  Are you sure this isn't a
simple case of the web browser collapsing whitespace when displaying an
HTML page?  (Hint: view source is your friend when you're wanting to
see exactly what the output of your script was.)


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Best Practice-HTML In Database

2001-05-01 Thread Mark Roedel

 -Original Message-
 From: John Monfort [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 30, 2001 5:08 PM
 To: Mark Roedel
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] Best Practice-HTML In Database
 
 
 Yes,  I will need to provide searching capabilities.
 
 Basically, I'm creating an online referencing system with a 
 db backend.  A user will be able to search for a manual,
 and/or browse to a particular  section of the manual.
 
 It's similar to the online PHP manual...at least, in concept.
 
 
 So, in the long run, which will be more beneficial:
 1) HTML code inside the db fields?
or
 2) HTML URL inside the field?

Well, I know I'm going against most of the rest of the responses you've
gotten, but if you think you're going to need to do databasey things
with the material, it makes sense to me to put it in a database.

Having said that, I do agree with a lot of what the other posters have
said regarding things like the impact on ease of maintenance, waste of
storage space, etc.

If it were me, I think I'd be looking for a way to only store the actual
text in the database, with some PHP scripting to apply whatever
formatting/template is needed to generate the page you want to present.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] opening files

2001-05-01 Thread Mark Roedel

 -Original Message-
 From: Joseph Bannon [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 01, 2001 2:33 PM
 To: PHP (E-mail)
 Subject: [PHP] opening files
 
 
 How do you open a text file and put all the contents into a 
 variable like $filecontent?

You use some combination of the commands presented at

http://www.php.net/manual/en/ref.filesystem.php

If you're just wanting something quick and simple, you might find the
file() function particularly useful.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] why isn't get_browser() not working?

2001-04-30 Thread Mark Roedel

 -Original Message-
 From: elias [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 30, 2001 1:05 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] why isn't get_browser() not working?
 
 
 hello.
 i'm trying to detect what browser version is there...i'm 
 using get_browser() as it was documented:
 
 $t = get_browser();
 
 var_dump($t);
 
 and all i can get like output is:
 bool(false)

According to http://php.net/manual/en/function.get-browser.php, the
get_browser() function looks up its information in a browscap.ini file.
I'd start by making sure that you actually have a browscap.ini, and that
your copy of PHP is configured properly to be able to locate it.


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Best Practice-HTML In Database

2001-04-30 Thread Mark Roedel

 -Original Message-
 From: John Monfort [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, April 29, 2001 10:40 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Best Practice-HTML In Database
 
 
 Hello everyone,
 
 I'm curious. Which is the better practice?

 1) Insert the HTML page (...HTML code) in the database ?
 
or
 
 2) Insert a URL in the database field, that points to the 
 HTML page?
 
 why?

Will you ever want to do database-ish things with the contents of the
page?  (Allow somebody to search for words or phrases in the body, for
example?)


---
Mark Roedel ([EMAIL PROTECTED])  ||  There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full.
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Sorry - Way OT but I need help

2001-04-09 Thread Mark Roedel

 -Original Message-
 From: Boget, Chris [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 09, 2001 1:57 PM
 To: 'Andy Woolley'; [EMAIL PROTECTED]
 Subject: RE: [PHP] Sorry - Way OT but I need help
 
 
  I know this has nowt to do with PHP so I'll keep it as short 
  as possible.
  My problem is, I'd like to get 404 error redirecting to work 
  in IE under Apache. I've set the ErrorDocument in apache.conf 
  and in .htaccess. It works in Netscape et al but not in IE.
  IE seems to be issuing it's own error page. I know there must 
  be a config somewhere other than the client side "Show friendly 
  error messages", but can't seem to find it. I have RTFM and 
  scanned the Web but still not found it. Hope you can help.
  Once again I apologize for being Off Topic.

MSIE will always (and there doesn't seem to be any way around it)
display its own error page if the error page returned by the server is
smaller than (if I'm remembering correctly) 512 bytes.

(The theory, presumably, being that if you're not going to offer at
least half a kilobyte back, then the browser's built-in error page is
probably more useful.)
 
 Does someone have an example of how to do this within .htaccess?
 I've tried everything and all I ever get is an Internal Server Error
 when the .htaccess file is in place... :/

I've found that my web server's error logs usually say interesting and
useful things when i get an "Internal Server Error" message.  Any clues
there?


---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Array problem

2001-04-06 Thread Mark Roedel

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 06, 2001 3:20 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Array problem
 
 
 I am having big problems with merging two arrays. I just 
 can't seem to get my head around it.
 
 I have two arrays which I wish to merge, but I want to 
 EXCLUDE duplicate values.
 
 Any suggestions, as my numerous attempts have proved
 unsuccessful.

I expect my approach would probably be to merge the two arrays together,
then call array_unique() on the result.


---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] equivalent of asp's %= strTest %

2001-04-04 Thread Mark Roedel

 -Original Message-
 From: Costas [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 04, 2001 8:08 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] equivalent of asp's %= strTest %
 
 
 Is there an equivalent in PHP of the following code:
 
 equivalent of asp's %= strTest %
 
 But not echo ""

If you've got asp-style tags enabled in your PHP configuration (see
http://www.php.net/manual/en/configuration.php#ini.asp-tags for more
info) then the syntax turns out to be just the same (see
http://www.php.net/manual/en/language.basic-syntax.php for more info on
that.)


---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Why does it work this way?

2001-04-03 Thread Mark Roedel

 -Original Message-
 From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 02, 2001 8:00 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Why does it work this way?
 
 
 I guess PHP is doing this
 
 $str = "a";
 $str++;
 
 as
 
 $str = "a";
 $str = $str + $str; // $str now stores "aa"

On my installation of PHP (4.0.4pl1, Apache 1.3.17, FreeBSD 4.2-STABLE),
the above snippet results in $str storing a zero value.  (Which makes
sense.  The numerical value of "a" is zero.)

However

$str = "a";
$str++;
 
results in $str storing the value "b".

It's

$str = "z";
$str++;

that results in "aa" being stored in $str.

(This behavior was, in fact, what started the thread you replied into.)


---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Why does it work this way?

2001-04-02 Thread Mark Roedel

-Original Message-
From: Boget, Chris [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 11:12 AM
To: Mark Roedel
Subject: RE: [PHP] Why does it work this way?


 Because "z"+1 turns out to be "aa" (which, if you ask me, 
 makes about as much sense as any of the alternatives), 

 How is it that "z" + 1 is "aa"?  What is PHP using behind the 
 scenes to get/generate this value? 

Let me start by correcting myself on a minor technicality.

"z"+1 turns out to be 1 (because "z" has an integer value of 0).  It's
"z"++ that turns out to be "aa".

Perhaps one of the core developers who has a better understanding of the
behind-the-scenes operations of PHP can elaborate on this, but what it
basically points out to me is that "incrementing" and "adding one"
aren't always the same thing.  I assume this behavior is tied closely to
what PHP determines the type of a variable at any given time to be.

If we take that as a starting point, then what I see happening is that,
for the purposes of incrementing, there are certain ranges defined
within PHP.  0-9 is one,  obviously.  a-z appears to be another.  If,
for the purposes of the increment operator only, you treat the letters
of the alphabet as a range of integers, then the result you're seeing
makes perfect sense.  You get to your highest digit, then go back to
zero and increment the next column.

The problem, in the "for" loop that we started out discussing, is that
there doesn't seem to be any way to make a comparison that follows those
same rules.  You can't treat them as integers, because "aa" and "z" have
the same integer-value -- zero.  Treating them as strings gives the
result we've already seen.

Other interesting sort-of-related notes:

While incrementing works (sort of) on strings, decrementing doesn't
appear to have any effect at all.

$test="z";
echo $test--;
echo $test;

results in "zz"

Incrementing only appears to work on strings within particular ranges of
characters.

$test="(";
echo $test++;
echo $test;

results in "(("


---
Mark Roedel   | "The most overlooked advantage to owning a
Systems Programmer|  computer is that if they foul up there's no
LeTourneau University |  law against whacking them around a little."
Longview, Texas, USA  |  -- Owen Porterfield 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] phpInfo() displays Local and Master configuration values.

2001-04-02 Thread Mark Roedel

 -Original Message-
 From: Diego Fulgueira [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 02, 2001 11:37 AM
 To: Php-General
 Subject: [PHP] phpInfo() displays Local and Master 
 configuration values.
 
 
 Does anyone knows why phpInfo() displays a Local and a Master 
 value for every configuration variable? (This is in the PHP
 Core section.)
 
As I understand it...

"Master" values are the settings made in your php.ini.

"Local" values are the settings which apply to scripts in the current
location.  In many cases, these will probably be the same as the
"Master" values.  However, they can be overridden by configuration
settings made in location-specific sections of your web server config
(for a particular virtual server or group of directories) or (if
allowed) in .htaccess files throughout your directory tree.


---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] MS SQL databse connecting

2001-03-19 Thread Mark Roedel

 -Original Message-
 From: Yoshi Melrose [mailto:[EMAIL PROTECTED]]
 Sent: Monday, March 19, 2001 4:38 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] MS SQL databse connecting
 
 
 Depends on whether or not you're using a windows server or 
 linux server.  I've found that it's much easier to use MSSQL
 from a windows server since you can use the mssql_connect
 commands. for some reason or another (probably lack of
 configuration knowledge in linux) i've had problems running the
 mssql_connect commands. I'd recommend using odbc for linux, 
 and mssql for windows. just my experience.

Just for the record (and for the mailing list archives, on the off
chance that somebody besides me uses them occasionally)...

I've successfully enabled the mssql* commands in PHP on FreeBSD
(presumably this would work under Linux just as well) by installing the
FreeTDS libraries (available from freetds.org), and then configuring PHP
"--with-sybase"


---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] separate php.ini files

2001-03-15 Thread Mark Roedel

 -Original Message-
 From: Kevin Porter [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 15, 2001 9:37 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] separate php.ini files
 
 
 I need to build two copies of a website on one machine - one 
 for development and one for a backup. I want to be able to use
 different php.ini files with each copy of the site. Can I do
 this without compiling two Apache/PHP excutables? ie can it be
 done with virtual hosting somehow or by any other means?

You can only have one php.ini for each instance of PHP.

However

You can also control the PHP settings for each copy of the site by using
php configuration directives in the relevant sections of your
httpd.conf.


---
Mark Roedel   | "I know the answer!  The answer lies within the
Systems Programmer|  heart of all mankind!  The answer is twelve?!?
LeTourneau University |  I think I'm in the wrong building."
Longview, Texas, USA  |   -- Peppermint Patty (Charles Schultz) 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] dates from db

2001-03-07 Thread Mark Roedel

 -Original Message-
 From: Matt Davis [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 07, 2001 7:35 AM
 To: Php Mailing List
 Subject: [PHP] dates from db
 
 
 I am calling on a number of fields from my db one of which is 
 a date. When the date displays it is in the following format
 
 -MM-DD 00:00:00
 
 I Want it to only display the date and not the time like this
 
 -MM-DD
 
 Is it possible to remove the time when calling on it from the db

Check the documentation for the database engine you're using.

MySQL, for example, has a date_format() function that you can use in
your query to specify what information you'd like displayed from a
date/time field, and how you'd like it presented.


---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP vs. FreeTDS

2001-02-21 Thread Mark Roedel

 -Original Message-
 From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 20, 2001 5:03 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] PHP vs. FreeTDS
 
 
 I can't user mssql_connect, I'm using odbc_connect!  Most of 
 the websites for my company use odbc_connect.  Because we sometime
 move the website from unix to windows and back.  So, it is more
 reliable that way.

If you're using the odbc functions, then what's the purpose of FreeTDS?


---
Mark Roedel| "A wise man once told me that everything in 
Systems Programmer |  life is either a lesson or a joke.  Our task
LeTourneau University  |  is to figure out which is which..."
Longview, Texas, USA   | -- Chris Savage

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]