[PHP] Antwort: Re: [PHP] How can MD5 HAsh be passed to db as pwd? was a Re: [PHP] SecuringPHP code

2003-06-27 Thread SLanger
 Set the column type of password to be a char(32). Then, pass the 
password
 through md5 to mysql to store it. To verify it, pass the password 
through
 md5 then compare it to what's in the database.

This is true for your own authentication but I mean how to connect to the 
database using md5. This would especially interest me with mysql since 
this is the db I use most often. 
THe problem is to store your password as a md5 hash in the database you 
have to connect to it.  As far as I know you can't pass the connection 
password as a md5 hash .

Regards
Stefan Langer


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



[PHP] PHP Programmer Needed!

2003-06-27 Thread Erica Ziegler-Roberts
I am swamped with work and need a php expert who is familiar with IC-Radius
to do the following project for me. If it can be done by Monday, I will be
willing to pay more. You must be able to accept payment through Paypal,
Yahoo Paydirect, or Check/Money Order. Project details are below.

This is a php or cgi script that listens on the proper ports for dialup
authentication requests and replys based on a DB either mysql or flat file
or whatever... just like Microsofts IAS radius server..

we have used this IAS but it is far to manual to be effective...hense this
script..

the radius script needs to be able to update its DB via a post to a URL or
networked to get from the main DB to the machine to be used to run this
script...

I.e..
ADDING...
http://radiusserver/radius.php or
cgi?action=add_usermethod=postradiusweb_username=ADMINUSERNAMEradiusweb_p
assword=ADMINPASSWORDdiapupusername=DIALUPPUSERNAMEdiapupuserpassword=DIAL
UPPUSERPASSWORD

DELETING..
http://radiusserver/radius.php or
cgi?Action=delete_usermethod=postradiusweb_username=ADMINUSERNAMEradiuswe
b_password=ADMINPASSWORDdialupusername=DIALUPPUSERNAMEconfirm=yes

The Idea is that as we add and remove customers from the main DB it will
auto add and remove the dialup from the radius DB so customers can login or
not respectivly..

The main DB is Filemaker Pro and we have it running scripts to add and
remove 'post a url' in this fashion to an outsourced Linux box running
ICRADIUS..

We simply want to move this setup or improve it but to run inhouse on
Windows NT 5 machines.. running perl 5.x and Php 4.x

let me know if you are unclear or need more explination on the setup...

--
Erica Ziegler-Roberts
[EMAIL PROTECTED]
Manager of Internet Technology
513-232-1689 (office)
513-232-1651 (fax)
FCS (Frizzy's Computer Services)
Customizing technology for you!




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



Re: [PHP] Sessions Question

2003-06-27 Thread Bob Irwin
Oops.

Forgot to remove the Re: - it was a new thread - I just replied to an old
message to get the php list email address then managed to stuff the subject
up.

Thanks for the help though!

Best Regards
Bob Irwin
*** Email [EMAIL PROTECTED] for speedy email response ***
- Original Message - 
From: - Edwin - [EMAIL PROTECTED]
To: Bob Irwin [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, June 27, 2003 2:39 PM
Subject: Re: [PHP] Sessions Question



 Bob Irwin [EMAIL PROTECTED] wrote:

  Aside from the fact that bad code can obviously make sessions hackable,
what
  does everyone think about the security of sessions?
 
  I rely on them fairly heavily for low-mid range security on some of my
  scripts, but if I was to do something that involved more sensitive info,
are
  sessions bullet proof?  Can someone forge them somehow?

 I think you'll find related info if you try Google or the archives for

   hijack sessions

 And, talking about hijacking, you just hijacked this thread which is not
good.

   http://marc.theaimsgroup.com/?l=php-generalm=105337989306112w=2

 - E -
 __
 Do You Yahoo!?
 Yahoo! BB is Broadband by Yahoo!
 http://bb.yahoo.co.jp/


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


 Scanned by PeNiCillin http://safe-t-net.pnc.com.au/



Scanned by PeNiCillin http://safe-t-net.pnc.com.au/

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



[PHP] Re: Cookoo clock

2003-06-27 Thread azero

Sparky Kopetzky [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I am in New Mexico and my php system is telling via date() that my timezone
is BST (British standard time) and not MST (Mountain Standard Time). Any
clue as to why it's doing this??


Or maybe there is wrong time zone setting on your server.



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



[PHP] Setting focus on a textfield

2003-06-27 Thread Angelo Zanetti
Hi guys how do I set the cursor to start in a particular textfield (password field) 
when my php page starts?

TIA


Re: [PHP] Setting focus on a textfield

2003-06-27 Thread Jason k Larson
This hardly belongs on the PHP list ... but try looking into JavaScript focus().

--
Jason k Larson
Angelo Zanetti wrote:

Hi guys how do I set the cursor to start in a particular textfield (password field) when my php page starts?

TIA



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


[PHP] Differences between classes on Linux and Windows ????

2003-06-27 Thread Dave Holmes
Guys,

Hope you can help, we are just porting one of our sites from Windows to
Linux and we are coming up with a
few funny problems with classes under Linux. This is code which works
perfectly on the Windows version of
PHP,  we are running version 4.3.2 of PHP on both servers.

This is an example of the code which is causing a problem

===

 //check to see if the user has specified the file format they wish to
download
 if (isset($variables['system_id']))
 {
  //The file format has been specified setup the current download object and
also
  //run the security check against the database.
  $_SESSION['data_download']-back_office_system-system_id =
$variables['system_id'];

  if (!$_SESSION['data_download']-back_office_system-check_security())
  {
   //The user does not have security rights to access this object
   header('location: data_download_fileformat.php');
   exit();
  }

 }
 else
 {
  //The file format must be specified before they can use this page, check
to see if the user
  //has already specified the file format, this may be the case where the
user has hit
  //the back button from the confirmation page
  if (!$_SESSION['data_download']-back_office_system-check_security())
  {
   //The user does not have security rights to access this object
   header('location: data_download_fileformat.php');
   exit();
  }
 }


===

This code generate the following problem

Fatal error: Call to undefined function: check_security() in
/home/atomic/public_html/data_download_xref.php on line 20

===

The function does exist and when under windows does indeed check the
security !

The problem appears to be caused by classes having other classes as
properties, in the above code

$_SESSION['data_download'] is a instantiated class stored in the session

$_SESSION['data_download']-back_office_system is an instantiated class
created when the data download class is constructed



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



[PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread PHPSpooky

Glory!

Warning: Cannot modify header information - headers already sent by 
(output started at /home/unbreaka/public_html/mjs/directory.php:3) 
in /home/unbreaka/public_html/mjs/global.inc.php on line 531

This is the error i'm getting.. when i upload the files on the internet
server and run it on the website.
However, when I run this application on my Apache Web Server on my
system.. same files, same code, same program.. there are no problems at
all. I dont get the error on my system.

I only get this error on the internet, on the website.. why is this? 

I'm getting the error for line 531, 532  533 on global.inc .. this the
function which includes the code for these 3 lines.. 

function login($username, $password)
{
setcookie(Links_Cookie_User, $username, time() + 3600);
setcookie(Links_Cookie_Pass, $password, time() + 3600);
header(Location: directory.php);
exit;
}

Help needed!!

Thanks,
PHPSpooky



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



RE: [PHP] Strange output issue

2003-06-27 Thread Ford, Mike [LSS]
 -Original Message-
 From: John Luxford [mailto:[EMAIL PROTECTED]
 Sent: 26 June 2003 18:15
 
 Thanks for the info.  The problem is that I'm trying to output an M3U 
 file to stream a series of MP3s, and some players won't 
 properly parse 
 the output due to the first line containing that chunk info.  
 Is there 
 a way to turn it on and off that you know of?

Well as this is an HTTP protocal layer setting, I'd guess it would have to be in your 
Web server configuration -- beyond that, I'm sorry I haven't a clue.

Cheers!

Mike

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

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



[PHP] unexpected return from $_POST['foo']

2003-06-27 Thread Kyle W. Cartmell
Given a page containing a form which posts data to another page...

HTML

BODY

Please enter a string.BR

FORM method=post action=nextpage.php
INPUT type=text name=wakka
INPUT type=submit name=submit
/FORM

/BODY

/HTML

And a page which accepts this data...

HTML

BODY

?PHP

   echo $_POST['wakka'];

?

/BODY

/HTML

If I type blueberry_muffins into the text field and click submit, the resulting 
output is as follows...

blueberry_muffinswakka=blueberry_muffins

However the output I expected was, of course...

blueberry_muffins

Have you ever seen anything like this?
Am I doing something wrong?
Do you need more information?

Thanks! :)

Kyle W. Cartmell
- a mildly confused PHP newb


[PHP] Re: Regex Help with - ?

2003-06-27 Thread sven
looks like id3v2 ;-)

how about this:
$string = [TIT2] ABC [TPE1] GHI [TALB] XYZ;
$pattern = /\[TIT2\]([^]*)/; // matches anything exept ''; till '' or
end of string
preg_match($pattern, $string, $match);
var_export($match);

hint to your regex:
either use quantifier '*' (0-n times) OR '?' (0-1 times)

ciao SVEN

Gerard Samuel [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 I have a string something like -
 [TIT2] ABC [TPE1] GHI [TALB] XYZ
 Im applying a regex as such -
 // Title/Songname/Content
 preg_match('/\[TIT2\](.*?)(\[)?/', $foo, $match);
 $title = trim( $match[1] );

 The above regex doesn't work.  At the end of the pattern Im using (\[)?
 The pattern may or may not end with [
 For example searching for - [TALB] XYZ
 The string, is *NOT* expected to hold a certain order as how it is
 retrieved.
 How does one go about to fix up this regex?

 Thanks




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



[PHP] Re: unexpected return from $_POST['foo']

2003-06-27 Thread sven
strange.

look into the sourcecode of your output-page, whether there is more
information (html-tags, i.e.).
and try var_export($_POST); instead of you echo to see what information come
with post.

maybe it's your server/php config. your code works for me.

ciao SVEN

Kyle W. Cartmell [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Given a page containing a form which posts data to another page...

HTML

BODY

Please enter a string.BR

FORM method=post action=nextpage.php
INPUT type=text name=wakka
INPUT type=submit name=submit
/FORM

/BODY

/HTML

And a page which accepts this data...

HTML

BODY

?PHP

   echo $_POST['wakka'];

?

/BODY

/HTML

If I type blueberry_muffins into the text field and click submit, the
resulting output is as follows...

blueberry_muffinswakka=blueberry_muffins

However the output I expected was, of course...

blueberry_muffins

Have you ever seen anything like this?
Am I doing something wrong?
Do you need more information?

Thanks! :)

Kyle W. Cartmell
- a mildly confused PHP newb



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



[PHP] Problem with compile with png

2003-06-27 Thread Bc. Radek Kreja
Hello,

  i can upgrade php from 4.3.1 to 4.3.2. I try to configure with the
  same command:
  ./configure --with-apxs=/usr/local/httpd/bin/apxs --enable-safe-mode --enable-bcmath 
--enable-calendar --enable-dbase --enable-ftp --with-gd --enable-gd-native-ttf 
--with-jpeg-dir=/usr/local/ --with-png-dir=/usr/local/ --with-ttf=/usr/local/ 
--with-zlib --with-imap --with-mysql --with-mcrypt --with-mhash --with-dbm

  With version 4.3.1 it works perfectly, but with 4.3.2 i got this
  message:

  configure: error: png.h not found.

  How can I fix it?

-- 
S pozdravem,
 Bc. Radek Kreja
 Starnet, s. r. o.
 [EMAIL PROTECTED]
 +420 608 470980
 http://www.ceskedomeny.cz
 http://www.skdomeny.com
 http://www.starnet.cz
 ICQ: 65895541 


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



RE: [PHP] Impossible bug! (fwd)

2003-06-27 Thread Ford, Mike [LSS]
 -Original Message-
 From: John Wulff [mailto:[EMAIL PROTECTED]
 Sent: 26 June 2003 22:14
 
 Hmph, just not quite doing the trick... If you'd be so kind 
 here is the
 complete source to give you a little bigger picture.  As you 
 can probably
 see the point of the script is to generate a bar chart of the array.

AAhh, well, now that's a useful clue.

 Thanks so much for the help, let me know what you think!

You've got a lot of near identical repetition -- once for each value in each
month array -- in the body of the loop; whenever I see this, my immediate
thought is arrays!.  You also store essentially Boolean values as
string-representations of integers(!), so here's my first reworking of your
code:

 ?php
 $height = 1;
 $width_bar = 25;
 $width_spacer = 15;
 $colors = array(blue, red, green, purple, yellow);
 
 $example_data = /* as before */;
 
 /* header HTML and initializations snipped */?

 while($num = 100  $num = 1)

Not sure why you have the = 1 test here -- are you expecting to get -ve
values of $num to suppress the chart?  And, in any case, why not:

  for ( ; $num=100; $num++)

 {
 
 ?
 
 tr
 
 ?php
 foreach ($example_data as $key=$value)
 {
 
  $month = shift($value);

  foreach ($value as $i=$val)
  {
 $percent = ($a / $high) * 100;
 $color = $percent = $num;
 /* I've switched the test round here -- seems to
  * me you were printing colour where you wanted
  * whitespace, and whitespace where you wanted
  * colour!
  */
 
 ?
td width=?php print($width_bar); ? height=?php
 print($height);
  ? ?php if($color) { ?bgcolor=?php print($color[$i]);
 ??php } ?nbsp;/td
 td width=?php print($width_spacer); ? 
 height=?php
 print($height);
 ?nbsp;/td
  ?php
  }
  ?
 td width=?php print($width_spacer); ? 
 height=?php
 print($height);
 ?nbsp;/td
 td width=?php print($width_spacer); ? 
 height=?php
 print($height);
 ?nbsp;/td
 ?php
 }
 ?
 /tr
 
 ?php
 $num = $num + 1;

Lose the above line if you use the for loop suggestion rather than while

 }
 ?

Furthermore, it seems to me that you have no real need to save the values of
$percent and $color ('cos if you did you'd need to save arrays of them, not
just singletons!), so I'd collapse all of the $percent/$color code into the
if() test further down -- so you'd end up with:

  foreach ($value as $i=$val)
  {
?
 td width=?php print($width_bar); ? height=?php
  print($height);
  ? ?php if(($a / $high) * 100 = $num)
{ ?bgcolor=?php print($color[$i]); ??php
}
  ?nbsp;/td

A couple of final observations:

(1) as written, this will produce vertical bars with 0 at the top -- if you
want zero at the bottom, you need to run the count in the opposite order,
from 100 to 1:

  for ($num=100; $num0; $num--)

(2) I feel sure there must be a method of doing this where you can just
calculate the size of bar required and then just display it all at once, but
I can't quite figure that out off the top of my head -- something to think
about, though!

Cheers!

Mike

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

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



Re: [PHP] Antwort: Re: [PHP] How can MD5 HAsh be passed to db as pwd? was a Re: [PHP] Securing PHP code

2003-06-27 Thread Jason Wong
On Friday 27 June 2003 15:01, [EMAIL PROTECTED] wrote:

 This is true for your own authentication but I mean how to connect to the
 database using md5. 

You can't. However starting with MySQL 4 you can connect using SSL encryption, 
but that would only be of significance if connection is remote.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
A lifetime isn't nearly long enough to figure out what it's all about.
*/


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



RE: [PHP] unexpected return from $_POST['foo']

2003-06-27 Thread Ford, Mike [LSS]
 -Original Message-
 From: Kyle W. Cartmell [mailto:[EMAIL PROTECTED]
 Sent: 27 June 2003 09:51
 
 If I type blueberry_muffins into the text field and click 
 submit, the resulting output is as follows...
 
 blueberry_muffinswakka=blueberry_muffins
 
 However the output I expected was, of course...
 
 blueberry_muffins
 
 Have you ever seen anything like this?

Yes.

 Am I doing something wrong?

Yes -- using the wrong combination of PHP and Apache versions -- this is a known bug 
with less-recent versions of Apache 2 (not sure if the version of PHP matters, other 
than that only certain version combinations work anyway).

I suggest you upgrade to the most recent release of PHP, 4.3.2, (if you're not already 
running it) and the latest compatible version of Apache 2 (check the PHP manual and 
installation instructions to see what that is).  Or upgrade to Apache 1.3.27 ;) -- 
Apache 2 is still considered to be only beta-quality (at least in combination with 
PHP).

Cheers!

Mike

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

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



[PHP] Re: unexpected return from $_POST['foo']

2003-06-27 Thread Kyle W. Cartmell
When I var_export, I get the following information...

array ( 'wakka' = 'blueberry_muffinswakka=blueberry_muffins', ).

There is no further useful information in the HTML code at all. It's pretty
empty in there.

I've been studying my configuration, but to no avail at this point. I'm not
sure where to even look for this crazy thing. Thinking about clobbering and
stepping back a version or something of that sort. But I'm in pain. :)

[tnx for the thoughts!!]


Sven [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 strange.

 look into the sourcecode of your output-page, whether there is more
 information (html-tags, i.e.).
 and try var_export($_POST); instead of you echo to see what information
come
 with post.

 maybe it's your server/php config. your code works for me.

 ciao SVEN

 Kyle W. Cartmell [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]
 Given a page containing a form which posts data to another page...

 HTML

 BODY

 Please enter a string.BR

 FORM method=post action=nextpage.php
 INPUT type=text name=wakka
 INPUT type=submit name=submit
 /FORM

 /BODY

 /HTML

 And a page which accepts this data...

 HTML

 BODY

 ?PHP

echo $_POST['wakka'];

 ?

 /BODY

 /HTML

 If I type blueberry_muffins into the text field and click submit, the
 resulting output is as follows...

 blueberry_muffinswakka=blueberry_muffins

 However the output I expected was, of course...

 blueberry_muffins

 Have you ever seen anything like this?
 Am I doing something wrong?
 Do you need more information?

 Thanks! :)

 Kyle W. Cartmell
 - a mildly confused PHP newb





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



Re: [PHP] unexpected return from $_POST['foo']

2003-06-27 Thread Kyle W. Cartmell
You all rule. Such fast answers. I might have to hang out here more often.
:)

Thanks so much!!



Mike Ford [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
  -Original Message-
  From: Kyle W. Cartmell [mailto:[EMAIL PROTECTED]
  Sent: 27 June 2003 09:51
 
  If I type blueberry_muffins into the text field and click
  submit, the resulting output is as follows...
 
  blueberry_muffinswakka=blueberry_muffins
 
  However the output I expected was, of course...
 
  blueberry_muffins
 
  Have you ever seen anything like this?

 Yes.

  Am I doing something wrong?

 Yes -- using the wrong combination of PHP and Apache versions -- this is a
known bug with less-recent versions of Apache 2 (not sure if the version of
PHP matters, other than that only certain version combinations work anyway).

 I suggest you upgrade to the most recent release of PHP, 4.3.2, (if you're
not already running it) and the latest compatible version of Apache 2 (check
the PHP manual and installation instructions to see what that is).  Or
upgrade to Apache 1.3.27 ;) -- Apache 2 is still considered to be only
beta-quality (at least in combination with PHP).

 Cheers!

 Mike

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



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



RE: [PHP] Sessions Question

2003-06-27 Thread Ford, Mike [LSS]
 -Original Message-
 From: Bob Irwin [mailto:[EMAIL PROTECTED]
 Sent: 27 June 2003 08:01
 
 Oops.
 
 Forgot to remove the Re: - it was a new thread - I just 
 replied to an old
 message to get the php list email address

That's exactly what you shouldn't do.  Most newsreaders, and some email
clients, are capable of tracking the thread no matter what you change the
subject to -- by replying to an existing thread with a new topic, people
usaing those clients see your new message in the middle of the old topic
thread.

If you're posting a new topic, do it with a completely new message.  (Why
not use your client's address book or nickname facility to give yourself an
easily-remembered alias for this list?)

Cheers!

Mike

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

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



Re: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread Jason Wong
On Friday 27 June 2003 16:01, PHPSpooky wrote:

 Warning: Cannot modify header information - headers already sent by

Search the archives for causes and resolutions.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Q:  What is purple and commutes?
A:  An Abelian grape.
*/


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



[PHP] Classes within classes

2003-06-27 Thread Dave Alger

Hiya,

It would be useful for me to be able to use a class within another class and
I don't know if that's permissable in PHP.

Here's an example of what I'm trying to do. Is it just simply not permitted
or am I going about it the wrong way?

Thanks in advance for any help,

Dave

Code follows:
=

class CSSFont
{
 var $family ='Arial';
 var $size ='12pt';
 var $style = 'none';
 function Output()
 {
   $out = \n;
   $out .= font-family:.$this-family.;\n;
   $out .= font-size:.$this-size.;\n;
   $out .= font-style:.$this-style.;\n;

   return $out;
 }
}

class CSSBorder
{

 var $font1= new CSSFont;
 var $font2= new CSSFont;
 function Output()
 {
  $out = $this-font1-Output();
  $out .=  other stuff goes here ;
  $out .= $this-font2-Output();

 }

}
=


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003



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



[PHP] Serving files with different filename from their own

2003-06-27 Thread Jason End
Is there a way to serve files with a different file
name than they actually have? 
Here's my situation:
Users can upload software manuals, which are then
saved with a unique name. Their title, filename, type
and id are then save into a db. 
But when they go to download a file, they'll of course
see a very cryptic filename in their save as dialog.
Lets say they aren't smart enough to change that name.

So would their be a way to serve a file with a
different name than it's actual one?

thanks,

Jay

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

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



[PHP] [] operator not supported for strings

2003-06-27 Thread Andrew McCombe
Hi

Can anyone tell me why i'm getting this error?

Fatal error: [] operator not supported for strings in 
c:\inetpub\wwwroot\Iweb-sites\Exp\menu2.php on line 41

[code]:


$rst2=sql_call(SELECT * FROM tmenu WHERE parent=.$r['id']);
// now have array of corporate, entertainment and identity

for ($i=0; $i  mysql_num_rows($rst2); $i++) {
 $r=mysql_fetch_array($rst2);
 $level2[$i] = $r['name'];
 $rst3 = sql_call(SELECT * FROM tmenu WHERE parent=.$r['id']);
 
 while ($a=mysql_fetch_array($rst3)) {
  $level2[$i][] = $a['name']; // giving error here
 }
 
}



[/code]


Regards
Andrew McCombe
Interactive Web Solutions (Stafford)
Tel: 01785 279921



-
The contents of this e-mail and any attachments are confidential and may
be legally privileged. If you have received this e-mail and you are not
a named addressee, please inform us as soon as possible on
+44 (0) 1785 279920  and then delete the e-mail from your system. If you are
not a named addressee you must not copy, use, disclose, distribute,
print or rely on this e-mail. Any views expressed in this e-mail or any
attachments may not necessarily reflect those of Interactive Web Solutions' management.
Although we routinely screen for viruses, addressees should scan this
e-mail and any attachments for viruses. Interactive Web Solutions makes no 
representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that for the protection of our business, we may monitor and
read e-mails sent to and from our server(s).

Re: [PHP] Setting focus on a textfield

2003-06-27 Thread Ernest E Vogelsinger
At 09:42 20.03.2003, Angelo Zanetti said:
[snip]

Hi guys how do I set the cursor to start in a particular textfield (password 
field) when my php page starts?

TIA
[snip] 

This is done with a JavaScript OnLoad handler:

body onload=forms[myform].elements[pass].focus();
...[page contents]...
form name=myform method=post ...
input type=password name=pass
/form
...[more page contents]...
/body


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



Re: [PHP] Serving files with different filename from their own

2003-06-27 Thread Jason Wong
On Friday 27 June 2003 18:11, Jason End wrote:
 Is there a way to serve files with a different file
 name than they actually have?
 Here's my situation:
 Users can upload software manuals, which are then
 saved with a unique name. Their title, filename, type
 and id are then save into a db.
 But when they go to download a file, they'll of course
 see a very cryptic filename in their save as dialog.
 Lets say they aren't smart enough to change that name.

 So would their be a way to serve a file with a
 different name than it's actual one?

On a un*x system you can use symlinks.

Otherwise you can have php handle the download, see archives for more info.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Carson's Consolation:
Nothing is ever a complete failure.
It can always be used as a bad example.
*/


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



RE: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread PHPSpooky

Glory!

I've already searched through the Archives and I got many results.. I
read through each one of those but I can't correct my problem even so. 

I'm using a simple function to login to the Admin section of a
site-index program.. using this function in a long and exhaustive
'global.inc' php page.. 

function login($username, $password)
{
setcookie(Links_Cookie_User, $username, time() + 3600);
setcookie(Links_Cookie_Pass, $password, time() + 3600);
header(Location: directory.php);
exit;
}

Over the course of the global.inc page, there's a lot of functions with
headers being passed.. none of them giving any problems. The only thing
unique to this function being the setcookie function.. 
I have not found any solution to this.. 

Secondly, why is it it's giving me the 'cannot modify headers' problem
on the internet server, but not on my computer?

Help still needed!

PHPSpooky



 -Original Message-
 From: Jason Wong [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 3:20 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] 'Cannot send Headers' Problem!!
 
 On Friday 27 June 2003 16:01, PHPSpooky wrote:
 
  Warning: Cannot modify header information - headers already sent by
 
 Search the archives for causes and resolutions.
 
 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development
*
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Q:What is purple and commutes?
 A:An Abelian grape.
 */
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 



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



RE: [PHP] [] operator not supported for strings

2003-06-27 Thread Ford, Mike [LSS]
 -Original Message-
 From: Andrew McCombe [mailto:[EMAIL PROTECTED]
 Sent: 27 June 2003 11:18
 
 Can anyone tell me why i'm getting this error?
 
 Fatal error: [] operator not supported for strings in 
 c:\inetpub\wwwroot\Iweb-sites\Exp\menu2.php on line 41
 
 [code]:
 
 
 $rst2=sql_call(SELECT * FROM tmenu WHERE parent=.$r['id']);
 // now have array of corporate, entertainment and identity
 
 for ($i=0; $i  mysql_num_rows($rst2); $i++) {
  $r=mysql_fetch_array($rst2);
  $level2[$i] = $r['name'];

$r['name'] will be a string -- and so, therefore, will $level2[$i] be.

  $rst3 = sql_call(SELECT * FROM tmenu WHERE parent=.$r['id']);
  
  while ($a=mysql_fetch_array($rst3)) {
   $level2[$i][] = $a['name']; // giving error here

$level2[$i] is still a string, and the [] notation when applied to a string
selects an individual character -- but you haven't specified which
character, so this is an error.

Did you mean the first assignment to $level2[$i] to start a new array that
you later add to in the loop?  In which case you might want to do

   $level2[$i] = array($r['name']);

If you meant something else, you probably need to tell us exactly what it is
you're trying to do, so we can suggest accurate solutions.

Cheers!

Mike

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


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



Re: [PHP] Binary data 65 kb have then as file: 536 KB ??? fwrite..

2003-06-27 Thread Marek Kilimajer
1. Check if the table column is large enough to store the image
2. fflush($FILEID); just before fclosing it.
Gerhard Knapp wrote:
hi, perhaps someone can help me ...

i store jpgs in a database, then i read them out
and write them to a tempfile, the sizeinformation says,
the binary blob = 65.535 bytes, but the jpg file has then
768.000 bytes, horrable do dl ...
i expect that i read 65 kb and write 65 kb, thats all ...


$TEMPFILE = tempnam(./,TMP);
$TEMPFILE .= .jpg;
$FILEID = fopen($TEMPFILE,wb);
$BLOBID = ibase_blob_open($R-GRUND_FOTO);
while ($PIC = ibase_blob_get($BLOBID,10240))
{
  fputs($FILEID,$PIC);
}
fclose($FILEID);
ibase_blob_close($BLOBID);
...
best regards
-Gerhard
B





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


[PHP] print array

2003-06-27 Thread Dore van Hoorn
First of all, I'd like to thank you all very much for helping me with my
arra-problem, array_count_values is exactly what i was looking for and it
is working perfectly! But.. print_r(array_count_values($array)) gives something
looking like this:

Array([computer] = 2 [harddrive] = 1 [crash] = 1)
etc..

I would off course like it even better when i was able to print to the values
(word and number) in an HTML table structure, or each new word on a new line
for instance, and without the [ ]  and =. Is this possible, and if so, how
do i solve this?

Thanks again for all you great help

Dore
+++
NDore van Hoorn
Ss1000454 AlfaInformatica-RuG
E[EMAIL PROTECTED]
Whttp://www.let.rug.nl/~s1000454
+++


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



Re: [PHP] print array

2003-06-27 Thread David Nicholson
Hello,


This is a reply to an e-mail that you wrote on Fri, 27 Jun 2003 at 12:10,
lines prefixed by '' were originally written by you.
 I would off course like it even better when i was able to print to the
 values
 (word and number) in an HTML table structure, or each new word on a
 new line
 for instance, and without the [ ]  and =. Is this possible, and if
 so, how
 do i solve this?

See www.php.net/foreach

echo TABLE\n;
foreach($yourarray as $word=$count){
echo TRTD$word/TDTD$count/TD/TR\n;
}
echo /TABLE\n;

HTH

David.


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

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

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

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



Re: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread Jason Wong
On Friday 27 June 2003 18:33, PHPSpooky wrote:

 Secondly, why is it it's giving me the 'cannot modify headers' problem
 on the internet server, but not on my computer?

Obviously there is a difference in the configuration of the two servers.

1) Check the actual output returned to the browser (view source)

2) Check your error reporting settings in PHP, specifically you should disable 
display errors and instead log them to a file.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Of all the tyrannies that affect mankind, tyranny in religion is the worst.
- Thomas Paine
*/


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



Re: [PHP] PHP Certification

2003-06-27 Thread Oscar F
Hello all,

Thanks for the answers and opinions. If you all put it that way, it 
really seems like certifications are just another way for big companies 
to make money :) I was not looking for a PHP one as an option to replace 
experience, in fact I've been working with PHP for about 3 years now and 
have what I consider a lot (maybe not as much as some of you out there) 
of experience with it and recently I got a full time job as a PHP 
developer and couldn't be hapier with my job :). I was just curious why 
the PHP developers or zend hadn't made plans for certifications, I guess 
the reason is cleared now. Thanks all!.

Oscar F.-

Warren Vail wrote:
A working public website, that solves a business problem, is a good
credential.  I can't help but wonder if it takes more hours to develop a
respectable site or to study and take an exam.  Do you suppose the
certification exam might actually be an easier option?
Warren Vail
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 8:59 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP] PHP Certification
yeh well these exams come in modules , and are extremely pricey , i think
good web examples, screenshots and experience should be enough, sadly i
have not done uni so am frowned upon when looking for work but have
experience in the work force, 4 years in IT now ok thats not enough but i
have fine tuned my programming skills, i am wanting to move in java also
now, i contract also but dont have much on my portfolio to show to get the
jobs , just starting the business side of things and may have to work for
near nothing just to get examples up, so i think portfolio examples are
more important than certification.


Certification programs, imho, exist primarily for two reasons;

1. it allows developers with little experience to add credibility to
their claims that they know how to develop software.
2. it allows non-technical people involved in the hiring chain to make
judgements when they have no clue at all how to judge good technical
competence.  Course, after you've been around a while, you learn that
you cannot do a proper job of judging anyone's competence, even after
many hours of interviews.  The proof is in the project outcome.
3. Ok, I forgot the third reason... Someone will make lots of money
selling training materials and administering the tests.  Did you really
think Microsoft got into this side of the business just to improve the
quality of technical consulting.
my 2 cents (ok, maybe 4 cents),

Warren Vail
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 8:15 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Certification
I find the value of such certification programs

extremely questionable.
here here :D


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


Re: [PHP] Setting focus on a textfield

2003-06-27 Thread Marek Kilimajer
A little corection

Ernest E Vogelsinger wrote:
At 09:42 20.03.2003, Angelo Zanetti said:
[snip]
Hi guys how do I set the cursor to start in a particular textfield (password 
field) when my php page starts?

TIA
[snip] 

This is done with a JavaScript OnLoad handler:

body onload=forms[myform].elements[pass].focus();
body onload=forms['myform'].elements['pass'].focus();
...[page contents]...
form name=myform method=post ...
input type=password name=pass
/form
...[more page contents]...
/body



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


RE: [PHP] Calling PHP from Java usign CGI...

2003-06-27 Thread Jay Blanchard
[snip]
Has anyone been able to call php from a servlet (JAVA) using CGI
interface? I am trying to do that here, and everything seems to work
without
problems, except that no data returns from the execution of my scripts.
Any
idea what could be happening? Is there information on how to configure
the
CGI variables in order to be able to call PHP? Thanx in advance...
[/snip]

Is the 'data' being returned to stdout? I suspect so, therefore the
servlet would have to get the returned information from stdout.

HTH!

Jay

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



RE: [PHP] Re: Seraching for good Hotel room booking program.....

2003-06-27 Thread Jay Blanchard
[snip]
Sorry, i try again...

 Hello, 
 i am serching for a good program (PHP) that i can use for
 a hotel and apartments booking and billing system.
 
 do you know some?  thank you very much in advance,
 
 Giulio
 
[/snip]

Google is your friend ...

http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=hotel+reservation
+system+PHP

HTH

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



RE: [PHP] PHP Certification

2003-06-27 Thread Jay Blanchard
[snip]
3. Ok, I forgot the third reason... Someone will make lots of money
selling
training materials and administering the tests.  Did you really think
Microsoft got into this side of the business just to improve the quality
of
technical consulting.
[/snip]

Perhaps we could band together and make money off of this! ***toungue
firmly in cheek*** 

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



RE: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread PHPSpooky
Glory,

On the internet server, apart from the beginning tables  html, this is
what I get .. 

bWarning/b:  Cannot modify header information - headers already sent
by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in
b/home/unbreaka/public_html/mjs/global.inc.php/b on line
b531/bbr /
br /
bWarning/b:  Cannot modify header information - headers already sent
by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in
b/home/unbreaka/public_html/mjs/global.inc.php/b on line
b532/bbr /
br /
bWarning/b:  Cannot modify header information - headers already sent
by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in
b/home/unbreaka/public_html/mjs/global.inc.php/b on line
b533/bbr /

And the code just ends here abruptly. Not a word after this.

On my server, I get the right thing, no problems at all. 
What could be different on the Internet Server or Right at my Server
causing this? I don't know if I can make changes to the Server Config on
my Hosting Companies Server.. 

PHPSpooky

 -Original Message-
 From: Jason Wong [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 4:50 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] 'Cannot send Headers' Problem!!
 
 On Friday 27 June 2003 18:33, PHPSpooky wrote:
 
  Secondly, why is it it's giving me the 'cannot modify headers'
problem
  on the internet server, but not on my computer?
 
 Obviously there is a difference in the configuration of the two
servers.
 
 1) Check the actual output returned to the browser (view source)
 
 2) Check your error reporting settings in PHP, specifically you should
 disable
 display errors and instead log them to a file.
 


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



[PHP] mssql_num_rows problem

2003-06-27 Thread Gary Ogilvie
Hello everyone,
 
I am trying to grab some data from a table in a database. Here is the
code I am using:
 
$myServer = 192.92.0.248;
$myUsername = Admin;
$myPassword = bluefish;
$myDB = COMPANY;
 
$myUser = $_GET['user'];
$myPass = $_GET['pass'];
 
#print ($myUserbr$myPass);
 
$s = mssql_connect($myServer, $myUsername, $myPassword)
or die;
 
$d = mssql_select_db($myDB, $s)
or die;
 
$query = SELECT * FROM users WHERE user = '$myUser';
 
print ($query);
 
$result = mssql_query($query)
or die;
 
$numRows = mssql_num_rows($result);
 
print ($numRows);
 
When printing out the query the correct statement is being sent to
MSSQL. The variable $myUser does in face match what is in the database.
However when I print the variable $numRows I am getting a 0. So no
rows are being sent back - how can this be so when what is being sent to
the database does in fact match a record in the table. I am mostly
puzzled - PHP is set up correctly as I have been using this sort of
thing with other projects.
 
All help is very deeply appreciated.
 
Gary


RE: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread Jay Blanchard
[snip]
On the internet server, apart from the beginning tables  html, this is
what I get .. 

bWarning/b:  Cannot modify header information - headers already sent
by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in
b/home/unbreaka/public_html/mjs/global.inc.php/b on line
b531/bbr /
br /
bWarning/b:  Cannot modify header information - headers already sent
by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in
b/home/unbreaka/public_html/mjs/global.inc.php/b on line
b532/bbr /
br /
bWarning/b:  Cannot modify header information - headers already sent
by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in
b/home/unbreaka/public_html/mjs/global.inc.php/b on line
b533/bbr /

And the code just ends here abruptly. Not a word after this.
[/snip]

Make ob_start() your first line of PHP code, and ob_end_flush() as the
last line of PHP code, place it on the server and test that. Your
global.inc.php is outputting a header on line 3. It is sending something
to the browser on line 3. What is line 3? If it is setting a cookie it
is outputting a header!

HTH!

Jay

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



Re: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread Marek Kilimajer
Simly go to mjs/directory.php, line 3, and remove any output that is 
there, mosty likely some white characters.

PHPSpooky wrote:
Glory,

On the internet server, apart from the beginning tables  html, this is
what I get .. 

bWarning/b:  Cannot modify header information - headers already sent
by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in
b/home/unbreaka/public_html/mjs/global.inc.php/b on line
b531/bbr /
br /
bWarning/b:  Cannot modify header information - headers already sent
by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in
b/home/unbreaka/public_html/mjs/global.inc.php/b on line
b532/bbr /
br /
bWarning/b:  Cannot modify header information - headers already sent
by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in
b/home/unbreaka/public_html/mjs/global.inc.php/b on line
b533/bbr /
And the code just ends here abruptly. Not a word after this.

On my server, I get the right thing, no problems at all. 
What could be different on the Internet Server or Right at my Server
causing this? I don't know if I can make changes to the Server Config on
my Hosting Companies Server.. 

PHPSpooky


-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]
Sent: Friday, June 27, 2003 4:50 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] 'Cannot send Headers' Problem!!
On Friday 27 June 2003 18:33, PHPSpooky wrote:


Secondly, why is it it's giving me the 'cannot modify headers'
problem

on the internet server, but not on my computer?
Obviously there is a difference in the configuration of the two
servers.

1) Check the actual output returned to the browser (view source)

2) Check your error reporting settings in PHP, specifically you should
disable
display errors and instead log them to a file.





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


RE: [PHP] mssql_num_rows problem

2003-06-27 Thread Jay Blanchard
[snip]
$numRows = mssql_num_rows($result);
 
print ($numRows);
[/snip]

A. print($query); //to make sure it is correct, double check
2. print($numRows); // no quotes, again to test

HTH

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



RE: [PHP] mssql_num_rows problem (Solved)

2003-06-27 Thread Gary Ogilvie
Thanks a lot Jay

It seems that when a password type of form is used then you must send
the password variable to the database instead of the user...Strange but
it works !!

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: 27 June 2003 13:45
To: Gary Ogilvie; PHP General
Subject: RE: [PHP] mssql_num_rows problem

[snip]
$numRows = mssql_num_rows($result);
 
print ($numRows);
[/snip]

A. print($query); //to make sure it is correct, double check
2. print($numRows); // no quotes, again to test

HTH


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



[PHP] Just a small question on if statement

2003-06-27 Thread Gary Ogilvie
Hi everyone,

I want to make an if statement that works only if the 2 conditions are
correct
 
It starts as:
 
If ($myUser == $myReturnedUser)
 
But I want to add another so that the if statement runs only if $myUser
is equal to $myReturnedUser AND $myPass is equal to $myReturnedPass. How
do I do this?
 
Thanks a lot =)
 
Gary


Re: [PHP] Just a small question on if statement

2003-06-27 Thread Adam Voigt
if($myUser == $myReturnedUser  $myPass == $myReturnedPass)
{
}


On Fri, 2003-06-27 at 08:51, Gary Ogilvie wrote:
 Hi everyone,
 
 I want to make an if statement that works only if the 2 conditions are
 correct
  
 It starts as:
  
 If ($myUser == $myReturnedUser)
  
 But I want to add another so that the if statement runs only if $myUser
 is equal to $myReturnedUser AND $myPass is equal to $myReturnedPass. How
 do I do this?
  
 Thanks a lot =)
  
 Gary
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



RE: [PHP] Just a small question on if statement

2003-06-27 Thread Jay Blanchard
[snip]
It starts as:
 
If ($myUser == $myReturnedUser)
 
But I want to add another so that the if statement runs only if $myUser
is equal to $myReturnedUser AND $myPass is equal to $myReturnedPass. How
do I do this?
[/snip]

if(($myUser == $myReturnedUser)  ($myPass == $myReturnedPass)){
 do stuff
}

HTH

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



RE: [PHP] Just a small question on if statement - Solved

2003-06-27 Thread Gary Ogilvie
Thanks that is great!!

-Original Message-
From: Adam Voigt [mailto:[EMAIL PROTECTED] 
Sent: 27 June 2003 13:55
To: Gary Ogilvie
Cc: 'PHP General'
Subject: Re: [PHP] Just a small question on if statement

if($myUser == $myReturnedUser  $myPass == $myReturnedPass)
{
}


On Fri, 2003-06-27 at 08:51, Gary Ogilvie wrote:
 Hi everyone,
 
 I want to make an if statement that works only if the 2 conditions are
 correct
  
 It starts as:
  
 If ($myUser == $myReturnedUser)
  
 But I want to add another so that the if statement runs only if
$myUser
 is equal to $myReturnedUser AND $myPass is equal to $myReturnedPass.
How
 do I do this?
  
 Thanks a lot =)
  
 Gary
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



[PHP] Using header in if statement

2003-06-27 Thread Gary Ogilvie
If I attempt to direct the user to a url with in a if statement using a
header I get the following error message:
 
Warning: Cannot modify header information - headers already sent by
(output started at c:\inetpub\wwwroot\company_search\admin\login.php:3)
in c:\inetpub\wwwroot\company_search\admin\login.php on line 48
 
The code I am trying :
 
if ($myUser == $myReturnedUser  $myPass == $myReturnedPass) {
(Location:
http://192.92.0.248/company_search/admin/admin2.php;);
} else {
 
Is there any other way I can try and do this?
 
Many thanks


Re: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread Jason Wong
On Friday 27 June 2003 20:35, PHPSpooky wrote:
 On the internet server, apart from the beginning tables  html, this is
 what I get ..

What do you mean 'apart from'? That is exactly what the errors below are 
complaining about.

 bWarning/b:  Cannot modify header information - headers already sent
 by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in
 b/home/unbreaka/public_html/mjs/global.inc.php/b on line

And a search of the archives would have told you exactly what could cause that 
to happen and how to solve it. But you've done that already though haven't 
you?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
The curse of the Irish is not that they don't know the words to a song --
it's that they know them *___all*.
-- Susan Dooley
*/


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



Re: [PHP] Using header in if statement

2003-06-27 Thread Adam Voigt
Just have it echo, example:

echo meta http-equiv=\refresh\
content=\0;url=http://192.92.0.248/company_search/admin/admin2.php\;;


On Fri, 2003-06-27 at 09:03, Gary Ogilvie wrote:
 If I attempt to direct the user to a url with in a if statement using a
 header I get the following error message:
  
 Warning: Cannot modify header information - headers already sent by
 (output started at c:\inetpub\wwwroot\company_search\admin\login.php:3)
 in c:\inetpub\wwwroot\company_search\admin\login.php on line 48
  
 The code I am trying :
  
 if ($myUser == $myReturnedUser  $myPass == $myReturnedPass) {
 (Location:
 http://192.92.0.248/company_search/admin/admin2.php;);
 } else {
  
 Is there any other way I can try and do this?
  
 Many thanks
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



[PHP] List of Variables

2003-06-27 Thread Thomas Weber
Hi,

is there any way to get a list of all defined variables?
It is intended to be used to get and identify all defined objects to call
some costum decunstructor at the scripts end.

Thanks!
Thomas 'Neo' Weber
---
[EMAIL PROTECTED]
[EMAIL PROTECTED]

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



[PHP] SORRY

2003-06-27 Thread Dore van Hoorn
i'm really sorry i have to send this email to the php list.
I received a reply to my email about printing the elements in an array in
an html table structure, i believe by someone called daniel. 
i accidently deleted your message, before i had copied your idea
So, to the person who was so kind to help me with my problem, could you PLEASE
send me that email again!?

sorry again, and thank you very much in advance!!

Dore.
+++
NDore van Hoorn
Ss1000454 AlfaInformatica-RuG
E[EMAIL PROTECTED]
Whttp://www.let.rug.nl/~s1000454
+++


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



RE: [PHP] Using header in if statement

2003-06-27 Thread Gary Ogilvie
I didn't realise you could use echo to run a URL. Thanks for your help
:)

-Original Message-
From: Adam Voigt [mailto:[EMAIL PROTECTED] 
Sent: 27 June 2003 14:08
To: Gary Ogilvie
Cc: 'PHP General'
Subject: Re: [PHP] Using header in if statement

Just have it echo, example:

echo meta http-equiv=\refresh\
content=\0;url=http://192.92.0.248/company_search/admin/admin2.php\;;


On Fri, 2003-06-27 at 09:03, Gary Ogilvie wrote:
 If I attempt to direct the user to a url with in a if statement using
a
 header I get the following error message:
  
 Warning: Cannot modify header information - headers already sent by
 (output started at
c:\inetpub\wwwroot\company_search\admin\login.php:3)
 in c:\inetpub\wwwroot\company_search\admin\login.php on line 48
  
 The code I am trying :
  
 if ($myUser == $myReturnedUser  $myPass == $myReturnedPass) {
 (Location:
 http://192.92.0.248/company_search/admin/admin2.php;);
 } else {
  
 Is there any other way I can try and do this?
  
 Many thanks
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP] List of Variables

2003-06-27 Thread Adam Voigt
print_r(get_defined_vars());


On Fri, 2003-06-27 at 09:07, Thomas Weber wrote:
 Hi,
 
 is there any way to get a list of all defined variables?
 It is intended to be used to get and identify all defined objects to call
 some costum decunstructor at the scripts end.
 
 Thanks!
 Thomas 'Neo' Weber
 ---
 [EMAIL PROTECTED]
[EMAIL PROTECTED]
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



RE: [PHP] Using header in if statement

2003-06-27 Thread Adam Voigt
Yep, or you could echo Javascript, or you could use output buffering,
any of these will get your pages redirecting.



On Fri, 2003-06-27 at 09:06, Gary Ogilvie wrote:
 I didn't realise you could use echo to run a URL. Thanks for your help
 :)
 
 -Original Message-
 From: Adam Voigt [mailto:[EMAIL PROTECTED] 
 Sent: 27 June 2003 14:08
 To: Gary Ogilvie
 Cc: 'PHP General'
 Subject: Re: [PHP] Using header in if statement
 
 Just have it echo, example:
 
 echo meta http-equiv=\refresh\
 content=\0;url=http://192.92.0.248/company_search/admin/admin2.php\;;
 
 
 On Fri, 2003-06-27 at 09:03, Gary Ogilvie wrote:
  If I attempt to direct the user to a url with in a if statement using
 a
  header I get the following error message:
   
  Warning: Cannot modify header information - headers already sent by
  (output started at
 c:\inetpub\wwwroot\company_search\admin\login.php:3)
  in c:\inetpub\wwwroot\company_search\admin\login.php on line 48
   
  The code I am trying :
   
  if ($myUser == $myReturnedUser  $myPass == $myReturnedPass) {
  (Location:
  http://192.92.0.248/company_search/admin/admin2.php;);
  } else {
   
  Is there any other way I can try and do this?
   
  Many thanks
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



RE: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread PHPSpooky
Glory!

Ok what you're saying made sense to me.. unfortunately the problem is
not going away.

I checked out my Directory.php file.. there's a bunch of HTML code that
is responsible for the HTML in that page before the PHP begins, and
before global.inc.php is included in the file. 

As I started to erase lines of code.. I quickly learnt that in this
Directory.PHP file.. wherever there is Quote ..  ... it gives that line
in the Warning code.. 
For example.. the 3rd line of my Directory.php is .. 

META http-equiv=Content-Type content=text/html; charset=windows-1252

And thus I get this.. 

Warning: Cannot modify header information - headers already sent by
(output started at /home/unbreaka/public_html/mjs/directory.php:3) in
/home/unbreaka/public_html/mjs/global.inc.php on line 531

If I remove the Meta tag there.. it takes the next line of code which
contains a Quote symbol.. which is quite necessary in our HTML tags.. 

So now how do I erase this problem. 

This is where my php code begins in the directory.php file.. 

?
include(global.inc.php); //Change this if global.inc.php is in a
different directory

This is something like line 53 in my Directory.php file.. 
I inserted this include code line at the top of the Directory.php file,
but that didn't make any different at all. It was still taking the first
line with Quotes and putting up the warning based on that line. 

Is there a replacement for Header that I can use in my function in my
global.inc.php page.. over here.. 

function login($username, $password)
{
setcookie(Links_Cookie_User, $username, time() + 3600);
setcookie(Links_Cookie_Pass, $password, time() + 3600);
header(Location: directory.php);
exit;
}

Which will do the same.. ? Just a thought.
And lastly, what qualifies for a White Character?

PHPSpooky


 -Original Message-
 From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 6:14 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] 'Cannot send Headers' Problem!!
 
 Simly go to mjs/directory.php, line 3, and remove any output that is
 there, mosty likely some white characters.
 


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



Re: [PHP] SORRY

2003-06-27 Thread Jason Wong
On Friday 27 June 2003 21:07, Dore van Hoorn wrote:
 i'm really sorry i have to send this email to the php list.
 I received a reply to my email about printing the elements in an array in
 an html table structure, i believe by someone called daniel.
 i accidently deleted your message, before i had copied your idea
 So, to the person who was so kind to help me with my problem, could you
 PLEASE send me that email again!?

Goto to the archives, link in my sig and browse through the recent posts.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Does the name Pavlov ring a bell?
*/


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



Re: [PHP] List of Variables

2003-06-27 Thread Marek Kilimajer
$GLOBALS

Thomas Weber wrote:
Hi,

is there any way to get a list of all defined variables?
It is intended to be used to get and identify all defined objects to call
some costum decunstructor at the scripts end.
Thanks!
Thomas 'Neo' Weber
---
[EMAIL PROTECTED]
[EMAIL PROTECTED]


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


Re: [PHP] SORRY

2003-06-27 Thread David Nicholson
Hello,


This is a reply to an e-mail that you wrote on Fri, 27 Jun 2003 at 14:08,
lines prefixed by '' were originally written by you.
 i'm really sorry i have to send this email to the php list.
 I received a reply to my email about printing the elements in an array
 an html table structure, i believe by someone called daniel.
 i accidently deleted your message, before i had copied your idea
 So, to the person who was so kind to help me with my problem, could
 you PLEASE
 send me that email again!?

I replied to you, and all my replies are copied to the group so you can
find it again in the groups archive at:

http://marc.theaimsgroup.com/?l=php-generalm=105671320623391w=2

David.

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

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

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

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



RE: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread Jay Blanchard
[snip]
I checked out my Directory.php file.. there's a bunch of HTML code that
is responsible for the HTML in that page before the PHP begins, and
before global.inc.php is included in the file. 
[/snip]

Sounds like you need to re-order your code or have the PHP output all of
the HTML.

[snip]
And lastly, what qualifies for a White Character?
[/snip]

spaces, line breaks, etc...

HTH

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



Re: [PHP] List of Variables

2003-06-27 Thread Thomas Weber
Yea thanks, we must have been blind when searching the php-docs ;)

Thomas 'Neo' Weber
---
[EMAIL PROTECTED]
[EMAIL PROTECTED]

- Original Message - 
From: Adam Voigt [EMAIL PROTECTED]
To: Thomas Weber [EMAIL PROTECTED]
Cc: PHP-List [EMAIL PROTECTED]
Sent: Friday, June 27, 2003 3:09 PM
Subject: Re: [PHP] List of Variables


 print_r(get_defined_vars());


 On Fri, 2003-06-27 at 09:07, Thomas Weber wrote:
  Hi,
 
  is there any way to get a list of all defined variables?
  It is intended to be used to get and identify all defined objects to
call
  some costum decunstructor at the scripts end.
 
  Thanks!
  Thomas 'Neo' Weber
  ---
  [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 -- 
 Adam Voigt ([EMAIL PROTECTED])
 Linux/Unix Network Administrator
 The Cryptocomm Group


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



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



RE: [PHP] 'Cannot send Headers' Problem!! MOre..

2003-06-27 Thread PHPSpooky
Glory!

Just to check .. I removed all HTML code from the directory.php page..
and just left the PHP code.. and it worked fine!!
So the problem is with the HTML code.. whatever HTML is outputting..
somehow it's taking it as the output and this generating the Warning! 
But I need the HTML in the directory.php for the page.. so what do I do?

PHPSPooky


 -Original Message-
 From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 6:14 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] 'Cannot send Headers' Problem!!
 
 Simly go to mjs/directory.php, line 3, and remove any output that is
 there, mosty likely some white characters.
 


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



RE: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread PHPSpooky

Glory!

You mean for testing I make a new page and put these two functions? Or
do you want me to place these on the top and bottom of my existing
global.inc.php page?

PHPSpooky

And PS : what is HTH ?


 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 6:11 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: [PHP] 'Cannot send Headers' Problem!!
 
 [snip]
 On the internet server, apart from the beginning tables  html, this
is
 what I get ..
 
 bWarning/b:  Cannot modify header information - headers already
sent
 by (output started at /home/unbreaka/public_html/mjs/directory.php:3)
in
 b/home/unbreaka/public_html/mjs/global.inc.php/b on line
 b531/bbr /
 br /
 bWarning/b:  Cannot modify header information - headers already
sent
 by (output started at /home/unbreaka/public_html/mjs/directory.php:3)
in
 b/home/unbreaka/public_html/mjs/global.inc.php/b on line
 b532/bbr /
 br /
 bWarning/b:  Cannot modify header information - headers already
sent
 by (output started at /home/unbreaka/public_html/mjs/directory.php:3)
in
 b/home/unbreaka/public_html/mjs/global.inc.php/b on line
 b533/bbr /
 
 And the code just ends here abruptly. Not a word after this.
 [/snip]
 
 Make ob_start() your first line of PHP code, and ob_end_flush() as the
 last line of PHP code, place it on the server and test that. Your
 global.inc.php is outputting a header on line 3. It is sending
something
 to the browser on line 3. What is line 3? If it is setting a cookie it
 is outputting a header!
 
 HTH!
 
 Jay
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 



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



RE: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread Jay Blanchard
[snip]
You mean for testing I make a new page and put these two functions? Or
do you want me to place these on the top and bottom of my existing
global.inc.php page?

And PS : what is HTH ?
[/snip]

I mean that instead of

html
head/head

you do

?php
print(html);
print(head/head);
?

Hope This Helps

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



[PHP] ignored php.ini?

2003-06-27 Thread user
Hello,
   I have php 4.3.2 running as isapi module on windows 2000.
I have a php.ini in d:\winnt

but when I edit it the output from

 ? phpinfo(); ?

is as before.

Any hints? Many thanks in advance, bye
_

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



RE: [PHP] 'Cannot send Headers' Problem!! MOre..

2003-06-27 Thread Adam Voigt
Headers can't be sent after HTML output, it's as simple
as it sounds. What that means is, if you suddenly decide
you want to send a Location header to redirect the browser,
you can't if you outputted any HTML before the line that
outputs the location, unless ofcourse your using Output
Buffering.


On Fri, 2003-06-27 at 09:17, PHPSpooky wrote:
 Glory!
 
 Just to check .. I removed all HTML code from the directory.php page..
 and just left the PHP code.. and it worked fine!!
 So the problem is with the HTML code.. whatever HTML is outputting..
 somehow it's taking it as the output and this generating the Warning! 
 But I need the HTML in the directory.php for the page.. so what do I do?
 
 PHPSPooky
 
 
  -Original Message-
  From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
  Sent: Friday, June 27, 2003 6:14 PM
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] 'Cannot send Headers' Problem!!
  
  Simly go to mjs/directory.php, line 3, and remove any output that is
  there, mosty likely some white characters.
  
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



RE: [PHP] PHP Certification

2003-06-27 Thread Dan Joseph
Hi,

 basis is way beyond what any of us have time for and personally I find the
 value of such certification programs extremely questionable.

Questionable?  Did you mean useless?  Honestly, I've got a friend with a
CCNA, he's sitting in an ISP's call center answering phones.  He doesn't
have a degree, and no one wants to talk to him.  I also have a relative who
recruits for Microsoft.  They told me that the MCSD is meaningless.

On a more positive note, there are several sites that I've run accross that
offer PHP certifications.  I believe www.brainbench.com is still around.
They're the only one that I can think of off hand.

-Dan Joseph


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



Re: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread Marek Kilimajer
Move include(global.inc.php); to the top of any file that includes it. 
Always do it this way, it can spare you lots of trouble.

PHPSpooky wrote:
Glory!

Ok what you're saying made sense to me.. unfortunately the problem is
not going away.
I checked out my Directory.php file.. there's a bunch of HTML code that
is responsible for the HTML in that page before the PHP begins, and
before global.inc.php is included in the file. 

As I started to erase lines of code.. I quickly learnt that in this
Directory.PHP file.. wherever there is Quote ..  ... it gives that line
in the Warning code.. 
For example.. the 3rd line of my Directory.php is .. 

META http-equiv=Content-Type content=text/html; charset=windows-1252

And thus I get this.. 

Warning: Cannot modify header information - headers already sent by
(output started at /home/unbreaka/public_html/mjs/directory.php:3) in
/home/unbreaka/public_html/mjs/global.inc.php on line 531
If I remove the Meta tag there.. it takes the next line of code which
contains a Quote symbol.. which is quite necessary in our HTML tags.. 

So now how do I erase this problem. 

This is where my php code begins in the directory.php file.. 

?
include(global.inc.php); //Change this if global.inc.php is in a
different directory
This is something like line 53 in my Directory.php file.. 
I inserted this include code line at the top of the Directory.php file,
but that didn't make any different at all. It was still taking the first
line with Quotes and putting up the warning based on that line. 

Is there a replacement for Header that I can use in my function in my
global.inc.php page.. over here.. 

function login($username, $password)
{
setcookie(Links_Cookie_User, $username, time() + 3600);
setcookie(Links_Cookie_Pass, $password, time() + 3600);
header(Location: directory.php);
exit;
}
Which will do the same.. ? Just a thought.
And lastly, what qualifies for a White Character?
PHPSpooky



-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
Sent: Friday, June 27, 2003 6:14 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] 'Cannot send Headers' Problem!!
Simly go to mjs/directory.php, line 3, and remove any output that is
there, mosty likely some white characters.





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


Re: [PHP] ignored php.ini?

2003-06-27 Thread Adam Voigt
Is Windows installed on the D drive? Because you can't
just make a WINNT folder on another drive, it must
be in the actual folder the system is installed in.


On Fri, 2003-06-27 at 10:25, [EMAIL PROTECTED] wrote:
 Hello,
I have php 4.3.2 running as isapi module on windows 2000.
 I have a php.ini in d:\winnt
 
 but when I edit it the output from
 
  ? phpinfo(); ?
 
 is as before.
 
 Any hints? Many thanks in advance, bye
 _
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP] 'Cannot send Headers' Problem!! MOre..

2003-06-27 Thread Marek Kilimajer
You got it all wrong: HTML is the output!
If recomend you read the http specification to learn why.
PHPSpooky wrote:
Glory!

Just to check .. I removed all HTML code from the directory.php page..
and just left the PHP code.. and it worked fine!!
So the problem is with the HTML code.. whatever HTML is outputting..
somehow it's taking it as the output and this generating the Warning! 
But I need the HTML in the directory.php for the page.. so what do I do?

PHPSPooky



-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
Sent: Friday, June 27, 2003 6:14 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] 'Cannot send Headers' Problem!!
Simly go to mjs/directory.php, line 3, and remove any output that is
there, mosty likely some white characters.





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


Re: [PHP] ignored php.ini?

2003-06-27 Thread user
---
 Is Windows installed on the D drive? Because you can't
 just make a WINNT folder on another drive, it must
 be in the actual folder the system is installed in.

  yes, Windows is on d:
  I am trying to set safe_mode = On
  
  d:\winnt\php.ini   edited and saved;
  
  ? phpinfo(); ?   claims  that safe_mode is  Off

  any idea? bye.


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



RE: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread PHPSpooky
Glory!

Done this long time back.. moved include(global.inc.php); to the top.
Right after ? In the directory.php page.

I understand what you're saying about HTML being the output.

I also put in all of my HTML code in echo now, instead of regular HTML. 

Still the same.. now I get ..

Warning: Cannot modify header information - headers already sent by
(output started at /home/unbreaka/public_html/mjs/directory.php:55) in
/home/unbreaka/public_html/mjs/global.inc.php on line 533


Line 55 in my directory.php is where the echo statement ends which
contains all HTML codes, and the core php coding begins...

PHPSPooky

 -Original Message-
 From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 6:57 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] 'Cannot send Headers' Problem!!
 
 Move include(global.inc.php); to the top of any file that includes
it.
 Always do it this way, it can spare you lots of trouble.
 


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



RE: [PHP] 'Cannot send Headers' Problem!! MOre..

2003-06-27 Thread PHPSpooky
 Headers can't be sent after HTML output, it's as simple
 as it sounds. What that means is, if you suddenly decide
 you want to send a Location header to redirect the browser,
 you can't if you outputted any HTML before the line that
 outputs the location, unless ofcourse your using Output
 Buffering.

Excellent.. I understand that fine. But what is the solution for this? 


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



Re: [PHP] ignored php.ini?

2003-06-27 Thread user
Restart?

 IIS restared from its mmc but phpinfo() tell me 
 that safe_mode is Off

 :-(

 thanks, bye

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



Re: [PHP] 'Cannot send Headers' Problem!! MOre..

2003-06-27 Thread Marek Kilimajer
The top means the top of the file, not the top of your coding.
Simply:
Line 1. of directory.php: ?php include_once(global.inc.php) ?
Line 2. of directory.php: html
Line 3. of directory.php: head

PHPSpooky wrote:
Headers can't be sent after HTML output, it's as simple
as it sounds. What that means is, if you suddenly decide
you want to send a Location header to redirect the browser,
you can't if you outputted any HTML before the line that
outputs the location, unless ofcourse your using Output
Buffering.


Excellent.. I understand that fine. But what is the solution for this? 




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


RE: [PHP] 'Cannot send Headers' Problem!! MOre..

2003-06-27 Thread Edward Peloke
maybe you already did this but can you send your code?

-Original Message-
From: PHPSpooky [mailto:[EMAIL PROTECTED]
Sent: Friday, June 27, 2003 9:46 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] 'Cannot send Headers' Problem!! MOre..


 Headers can't be sent after HTML output, it's as simple
 as it sounds. What that means is, if you suddenly decide
 you want to send a Location header to redirect the browser,
 you can't if you outputted any HTML before the line that
 outputs the location, unless ofcourse your using Output
 Buffering.

Excellent.. I understand that fine. But what is the solution for this? 


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


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



RE: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread Edward Peloke
there is something in your global.inc.php that is sending output...

-Original Message-
From: PHPSpooky [mailto:[EMAIL PROTECTED]
Sent: Friday, June 27, 2003 9:45 AM
To: 'Marek Kilimajer'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] 'Cannot send Headers' Problem!!


Glory!

Done this long time back.. moved include(global.inc.php); to the top.
Right after ? In the directory.php page.

I understand what you're saying about HTML being the output.

I also put in all of my HTML code in echo now, instead of regular HTML. 

Still the same.. now I get ..

Warning: Cannot modify header information - headers already sent by
(output started at /home/unbreaka/public_html/mjs/directory.php:55) in
/home/unbreaka/public_html/mjs/global.inc.php on line 533


Line 55 in my directory.php is where the echo statement ends which
contains all HTML codes, and the core php coding begins...

PHPSPooky

 -Original Message-
 From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 6:57 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] 'Cannot send Headers' Problem!!
 
 Move include(global.inc.php); to the top of any file that includes
it.
 Always do it this way, it can spare you lots of trouble.
 


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


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



[PHP] ODBC in PHP: setting SQL_ATTR_TRACE

2003-06-27 Thread Jeff Stewart
I've been reading about ways to help secure an application against database
hacking, and I've read more than once now that it's wise to turn off tracing
within the ODBC drivers when issuing sensitive commands, by setting
SQL_ATTR_TRACE to SQL_ATTR_OFF.

But I can't figure out how to do that with the odbc_* functions.  The
closest I could come was odbc_setoption(), but the manual cautions against
using this function in a production environment.

Is there a way to pull this off in PHP?

--
Jeff S.



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



[PHP] zend_eval_string problem

2003-06-27 Thread spsuhas
Hi,

I am workign on zend_eval_strign function, it is not working. I searched many more 
places but there is no answer for the problem.

I am usign this function as
if (zend_eval_string(buffer, NULL, desc TSRMLS_CC) == FAILURE) 
{
 // error handling
 }

I tried using it with retval insted of NULL, no change.

This doesn't work everytime. Sometimes it quits without error. 

Is there anybody who has solved this problem.

Thanks
Suhas

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



Re: [PHP] Strange output issue

2003-06-27 Thread John Luxford
On Friday, June 27, 2003, at 03:40 AM, Ford, Mike [LSS] wrote:

-Original Message-
From: John Luxford [mailto:[EMAIL PROTECTED]
Sent: 26 June 2003 18:15
Thanks for the info.  The problem is that I'm trying to output an M3U
file to stream a series of MP3s, and some players won't
properly parse
the output due to the first line containing that chunk info.
Is there
a way to turn it on and off that you know of?
Well as this is an HTTP protocal layer setting, I'd guess it would 
have to be in your Web server configuration -- beyond that, I'm sorry 
I haven't a clue.
Thanks anyway.  I actually did find a solution at the PHP-level, but 
couldn't find anything on it in the Apache manual.  If you first buffer 
the output, then use it to set the Content-Length header in a PHP 
header() call, and then output your data, the Content-Length header 
causes the Transfer-Encoding: chunked to go away.

Since this is an issue that only seems to affect data passed on to 
browser plugins -- and not the browsers themselves -- only in certain 
browsers, such a solution works just fine for me, and might for others 
too.  Hope this solution can help others as well.

Cheers,

Lux

Cheers!

Mike

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

--

John Luxford
President and Chief Developer
__
SIMIAN systems
Driving Web Content Management
__
web   : http://www.simian.ca/
email : [EMAIL PROTECTED]
phone : 204.942.8630
fax   : 309.218.3874
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ignored php.ini?

2003-06-27 Thread user
Restart?

IIS restared from its mmc but phpinfo() tell me 
that safe_mode is Off

 I performed a strong restart and now the new settings
 in php.ini are in the output of phpinfo(). 
 Bye.
_


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



RE: [PHP] 'Cannot send Headers' Problem!! MOre..

2003-06-27 Thread PHPSpooky
Glory

Ok this is the famous global.inc.php and directory.php .. 
Everything works perfect and fine.. all functions.. except two.. 
The Admin Login
The Rate A site .. and apparently both uses Cookies.. 
The rest of the functions, even using Headers, work fine.. 

Truly appreciate all help.. 

PHPSpooky


 -Original Message-
 From: Edward Peloke [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 7:26 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] 'Cannot send Headers' Problem!! MOre..
 
 maybe you already did this but can you send your code?
 

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

RE: [PHP] 'Cannot send Headers' Problem!!

2003-06-27 Thread PHPSpooky
Directory.php 

?php include(global.inc.php);
echo HTML;
echo HEAD;
echo META http-equiv=Content-Type content=\text/html;
charset=windows-1252\;
echo META http-equiv=Keywords content=\michael, jackson, mj, michael
jackson, king of pop, king, pop, bad, dangerous, music, rb, off the
wall, history, thriller, scream,  invincible, gloria brown, rahul s
johari, album, songs, grammy, awards, you rock my world, cry, black or
white, world, earth, pop, mp3, guestbook, mailing list, directory,
guide, countries, sites, websites, list, site\ name=Keywords;
echo META http-equiv=Description content=\Michael Jackson Sites ::
The Definitive Michael Jackson Internet Directory\ name=Description;
echo title: MichaelJacksonSites.Com : The Definitive
Directory/title;
echo /head;
echo body bgcolor=#314160 background=\bg.jpg\ topmargin=0
marginheight=0 link=#ffdead vlink=#ff alink=#ffdead;
echo center;
echo table width=780 bgcolor=#5A657A;
echo trtd colspan=2 align=\center\img src=\top.gif\
width=769/td/tr;
echo tr;
echo td bgcolor=#5A657A width=374a href=\index.html\img
src=\logo.gif\ width=374 height=49 alt=\goto : Home 
MichaelJacksonSites.Com\ border=0/a/td;
echo td align=\right\ valign=\center\;
echo !-- URL's used in the movie--;
echo !-- text used in the movie--;
echo OBJECT classid=\clsid:D27CDB6E-AE6D-11cf-96B8-44455354\
codebase=\http://download.macromedia.com/pub/shockwave/cabs/flash/swfla
sh.cab#version=6,0,0,0\ WIDTH=\240\ HEIGHT=\52\ id=\Top_Nav\
ALIGN=\\ PARAM NAME=movie VALUE=\Top_Nav.swf\ PARAM NAME=loop
VALUE=false PARAM NAME=menu VALUE=false PARAM NAME=quality
VALUE=high PARAM NAME=wmode VALUE=transparent PARAM NAME=bgcolor
VALUE=#5A657A EMBED src=\Top_Nav.swf\ loop=false menu=false
quality=high wmode=transparent bgcolor=#5A657A  WIDTH=\240\
HEIGHT=\52\ NAME=\Top_Nav\ ALIGN=\\
TYPE=\application/x-shockwave-flash\
PLUGINSPAGE=\http://www.macromedia.com/go/getflashplayer\;/EMBED/OB
JECT;
echo /td;
echo /tr;
echo tr;
echo td colspan=2 align=\center\;
echo !-- URL's used in the movie--;
echo !-- text used in the movie--;
echo !--BeginSubmit Your SiteSuggest A LinkCommunitySearchNew
AdditionsPromoteBegin--OBJECT
classid=\clsid:D27CDB6E-AE6D-11cf-96B8-44455354\
codebase=\http://download.macromedia.com/pub/shockwave/cabs/flash/swfla
sh.cab#version=6,0,0,0\ WIDTH=\769\ HEIGHT=\40\ id=\Menu\
ALIGN=\\ PARAM NAME=movie VALUE=\Menu.swf\ PARAM NAME=loop
VALUE=false PARAM NAME=menu VALUE=false PARAM NAME=quality
VALUE=high PARAM NAME=bgcolor VALUE=#314160 EMBED src=\Menu.swf\
loop=false menu=false quality=high bgcolor=#314160  WIDTH=\769\
HEIGHT=\40\ NAME=\Menu\ ALIGN=\\
TYPE=\application/x-shockwave-flash\
PLUGINSPAGE=\http://www.macromedia.com/go/getflashplayer\;/EMBED/OB
JECT;
echo /td;
echo /tr;
echo !--Content Table--;
echo tr;
echo td colspan=2 bgcolor=#314160 align=\center\;
echo table width=769;
echo tr;
echo td valign=\top\;
echo font face=\verdana\ size=1 color=#ffd700;

$admin = is_admin();
$return = numlinks_array(); // Build array of number of links in each
category
$numlinks = $return[0];
$numlinkstree = $return[1];
$thematrix=1;

if ((!$cat)  (!$go)  (!$action))
$cat = 0;

if (isset($go))
{
jump_to($go);
}


if ($action == login)
{
if ($username)
login($username, $password);
}

if ($action == loginform)
{
echo html_header($sitename - Links Login);
echo ss_template('login_form.tmpl');
echo html_footer();
exit;
}

if ($action == logout)
{
logout();
}

if ($action == rate)
{
do_rating($id, $score);
}

if ($action == build)
{
build_numlinks();
echo html_header('Build Complete');
echo ss_template('links_built.tmpl');
echo html_footer();
exit;
}

if ($action == addlink)
{
add_link($link_name, $link_url, $link_desc, $link_webmaster,
$link_contact, $link_category, $link_cat, $link_recommended);
}

if ($action == addcat)
{
add_cat($lcat_name, $lcat_header, $lcat_cat, $lcat_ranking);
}

if ($action == delcat)
{
del_cat($id);
}

if ($action == reclink)
{
rec_link($cat);
$thematrix=0;
}

if ($action == dellink)
{
delete_link($id);
}

if ($action == editlink)
{
edit_link($id);
}
if ($action == validate)
{
validate_list();
}

if ($action == vallink)
{
val_link($id);
}

if ($action == search)
{
show_searchpage();
$thematrix=0;
}
if ($action == reject_link)
{
reject_link($id);
}

if ($action == newlinks)
{
new_links($days);
$thematrix=0;
}
if ($action == popular)
{
popular_links();
$thematrix=0;
}
if ($action == rated)
{
top_rated();
$thematrix=0;
}
if ($action == editcat)
{
edit_cat($id);
exit;
}

if ($search)
{
search_results($search);
$thematrix=0;
}

// if all else fails then show normal page

if($thematrix==1) {

if (!ereg(^[0-9]+$, $cat))
$cat = 0;
$breadcrumbshtml = do_breadcrumbs($cat);
$html = 

RE: [PHP] Setting focus on a textfield

2003-06-27 Thread Ford, Mike [LSS]
-Original Message-
From: Marek Kilimajer

A little corection

Ernest E Vogelsinger wrote:
 At 09:42 20.03.2003, Angelo Zanetti said:
 [snip]
 
Hi guys how do I set the cursor to start in a particular textfield
(password 
field) when my php page starts?

TIA
 
 [snip] 
 
 This is done with a JavaScript OnLoad handler:
 
 body onload=forms[myform].elements[pass].focus();
body onload=forms['myform'].elements['pass'].focus();

body onload=document.myform.pass.focus();

should also work -- as should

body onload=document['myform']['pass'].focus()

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



[PHP] Constants in heredoc strings?

2003-06-27 Thread Jeff Stewart
Is there a way to expand constants in heredoc strings without assigning the
constant's value to a variable first?

--
Jeff S.



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



RE: [PHP] Constants in heredoc strings?

2003-06-27 Thread Ford, Mike [LSS]
-Original Message-
From: Jeff Stewart

Is there a way to expand constants in heredoc strings without assigning
the
constant's value to a variable first?

--

No.

Cheers!

Mike

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



[PHP] Is this a new PHP technology??????

2003-06-27 Thread Brian Dunning
Check it out:

http://www.americansubstandard.com/index.php?sub=vword=vmail

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


[PHP] exec problem in php (2 times execution)

2003-06-27 Thread Lepretre Olivier
Hi all,

I have a php code that tries to execute an rexec function for a at
command. For this I coded it in this way :

$str = exec (rexec -l usr1 -p usr1 myserver at now + 2minutes -f input
file;


the rexec function in itself is running fine in shell mode but whene I try
to execute it through php, i have the job 2 times in my queue.

Any idea is appreciated !

Oll



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



[PHP] Content-Type:

2003-06-27 Thread Brian V Bonini
This could be an Apache issues, not really sure.

I'm trying to output a php doc as text/css using
?php header( Content-type: text/css ); ?
But no matter what I do, changing it in the document, adding/altering
apache mime types, all I get is text/html.

The reason is I'm trying to use @import url('xx.css.php') and Mozilla
seems to be very unhappy with this, it will not recognize that as a css
file, IE and Opera are fine with it. The developers say its because Moz
does not make assumptions about mime types, whatever, and I need to set
the mime type explicitly for php files from within the script however
?php header( Content-type: text/css ); ? seems to have no effect.


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



[PHP] PHP-4.3.1 with bundled GD does not support jpeg?

2003-06-27 Thread Reuben D. Budiardja

Hello,

I compiled and installed from source php-4.3.1 with the bundled GD. I enabled 
it during configure using --with-gd, and double check that using phpinfo. The 
bundled GD says it's 2.0. But when I tried using
imagejpeg()
i got:
Fatal error: Call to undefined function: imagejpeg() in /usr/local/ap..

what's up with that? Any help will be greatly appreciated. 

Thanks.
RDB

-- 
-
/\  ASCII Ribbon Campaign against HTML
\ /  email and proprietary format
 X   attachments.
/ \
-
Have you been used by Microsoft today?
Choose your life. Choose freedom.
Choose LINUX.
-


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



[PHP] mysql lock

2003-06-27 Thread anders thoresson
Hi,

I've never used a lock on a MySQL table so far, but need one now. Two 
questions:

1. Do I set the lock by a normal query, but in the form of LOCK TABLE 
tablename WRITE, instead of SELECT * FROM tablename WHERE x = 1?

2. Can I set the lock in one query, then perform multiple other queries on 
the table, in between which I do some PHP work, and then release the lock 
several queries and lines of PHP code later?

In general, when is it wise to use a lock, and when is it uneeded?

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


Re: [PHP] mysql lock

2003-06-27 Thread Adam Voigt
Yes you seem to have it figured out, just do the lock in
a normal mysql_query, following the MySQL manual for syntax,
and you can release a lock whenever you want, but the
rule is the sooner the better, since if more then one page
or query tries to do a write, while you have it locked it
has to wait and wait until your lock is released.



On Fri, 2003-06-27 at 11:45, anders thoresson wrote:
 Hi,
 
  I've never used a lock on a MySQL table so far, but need one now. Two 
 questions:
 
  1. Do I set the lock by a normal query, but in the form of LOCK TABLE 
 tablename WRITE, instead of SELECT * FROM tablename WHERE x = 1?
 
  2. Can I set the lock in one query, then perform multiple other queries on 
 the table, in between which I do some PHP work, and then release the lock 
 several queries and lines of PHP code later?
 
  In general, when is it wise to use a lock, and when is it uneeded?
 
 -- 
 anders thoresson
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



[PHP] Bundled GD Webalizer

2003-06-27 Thread Michael A Smith
I compiled PHP 4.3.2 --with-gd, but now webalizer can't find GD? Where
is it? I tried installing the original library but that's not good
either.

-Michael
-- 
Michael Smith
[EMAIL PROTECTED]

The great thing about democracy is that it gives 
every voter a chance to do something stupid. 
 -Art Spander


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



RE: [PHP] Re: Seraching for good Hotel room booking program.....

2003-06-27 Thread Miles Thompson
Don't flame me, this doesn't have a PHP back end, I suspect it's Flash 
Communications server at the back end, as there seems to be a constant data 
stream for virtually every change made on the form. But everyone should 
have a look at the Broadmoor's Reservation system, and play with it a bit ...

https://www.enteryourinformation.com/broadmoor/onescreen.cfm?CFID=3537567CFTOKEN=93131017

The question is: Will an effortless exhange be something we look forward to 
in PHP 5?  Or am I missing something already that could be done with 
sockets in PHP?

Regards - Miles

At 07:13 AM 6/27/2003 -0500, Jay Blanchard wrote:
[snip]
Sorry, i try again...
 Hello,
 i am serching for a good program (PHP) that i can use for
 a hotel and apartments booking and billing system.

 do you know some?  thank you very much in advance,

 Giulio

[/snip]
Google is your friend ...

http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=hotel+reservation
+system+PHP
HTH

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


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


Re: [PHP] Bundled GD Webalizer

2003-06-27 Thread Adam Voigt
PHP did not remove your copy of GD, so this is
a system question, not PHP.


On Fri, 2003-06-27 at 12:03, Michael A Smith wrote:
 I compiled PHP 4.3.2 --with-gd, but now webalizer can't find GD? Where
 is it? I tried installing the original library but that's not good
 either.
 
 -Michael
 -- 
 Michael Smith
 [EMAIL PROTECTED]
 
 The great thing about democracy is that it gives 
 every voter a chance to do something stupid. 
  -Art Spander
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



[PHP] mysql split?

2003-06-27 Thread Andrew McCombe
Hi

I have a field in mysql that has paths to files such as:

project/entertainment/andrew/job/1.jpg
project/corporate/roberts/job/1.jpg
project/corporate/andrew/job/1.jpg
project/identity/john/job/1.jpg

The first level is always 'projects'.  What I want to do is get the unique
name for the 3rd level for all entertainment, corporate and identity, so
from the data above I would get returned:

andrew
john
roberts

What's the best way to acheive this? I remember seeing something where you
can split a field in the mysql into parts (ie, split at /)?  or would a
regex be better ('WHERE REGEX ^projects/corporate|entertainment|identity/'
(this doesnt work))?  Hope someone can help.




Regards
Andrew McCombe
Interactive Web Solutions (Stafford)
Tel: 01785 279921




-
The contents of this e-mail and any attachments are confidential and may
be legally privileged. If you have received this e-mail and you are not
a named addressee, please inform us as soon as possible on
+44 (0) 1785 279920  and then delete the e-mail from your system. If you are
not a named addressee you must not copy, use, disclose, distribute,
print or rely on this e-mail. Any views expressed in this e-mail or any
attachments may not necessarily reflect those of Interactive Web Solutions'
management.
Although we routinely screen for viruses, addressees should scan this
e-mail and any attachments for viruses. Interactive Web Solutions makes no
representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that for the protection of our business, we may monitor and
read e-mails sent to and from our server(s).



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



RE: [PHP] mysql split?

2003-06-27 Thread Jay Blanchard
use explode()

-Original Message-
From: Andrew McCombe [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 27, 2003 11:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP] mysql split?


Hi

I have a field in mysql that has paths to files such as:

project/entertainment/andrew/job/1.jpg
project/corporate/roberts/job/1.jpg
project/corporate/andrew/job/1.jpg
project/identity/john/job/1.jpg

The first level is always 'projects'.  What I want to do is get the
unique
name for the 3rd level for all entertainment, corporate and identity, so
from the data above I would get returned:

andrew
john
roberts

What's the best way to acheive this? I remember seeing something where
you
can split a field in the mysql into parts (ie, split at /)?  or would a
regex be better ('WHERE REGEX
^projects/corporate|entertainment|identity/'
(this doesnt work))?  Hope someone can help.




Regards
Andrew McCombe
Interactive Web Solutions (Stafford)
Tel: 01785 279921





-
The contents of this e-mail and any attachments are confidential and may
be legally privileged. If you have received this e-mail and you are not
a named addressee, please inform us as soon as possible on
+44 (0) 1785 279920  and then delete the e-mail from your system. If you
are
not a named addressee you must not copy, use, disclose, distribute,
print or rely on this e-mail. Any views expressed in this e-mail or any
attachments may not necessarily reflect those of Interactive Web
Solutions'
management.
Although we routinely screen for viruses, addressees should scan this
e-mail and any attachments for viruses. Interactive Web Solutions makes
no
representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that for the protection of our business, we may monitor and
read e-mails sent to and from our server(s).



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


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



Re: [PHP] Bundled GD Webalizer

2003-06-27 Thread Michael A Smith
No, you don't understand, I want to know where PHP installs GD.

-Michael
On Fri, 2003-06-27 at 08:06, Adam Voigt wrote:
 PHP did not remove your copy of GD, so this is
 a system question, not PHP.
 
 
 On Fri, 2003-06-27 at 12:03, Michael A Smith wrote:
  I compiled PHP 4.3.2 --with-gd, but now webalizer can't find GD? Where
  is it? I tried installing the original library but that's not good
  either.
  
  -Michael
  -- 
  Michael Smith
  [EMAIL PROTECTED]
  
  The great thing about democracy is that it gives 
  every voter a chance to do something stupid. 
   -Art Spander
-- 
Michael Smith
[EMAIL PROTECTED]

The great thing about democracy is that it gives 
every voter a chance to do something stupid. 
 -Art Spander


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



[PHP] Re: Calling PHP from Java usign CGI...

2003-06-27 Thread Rodrigo Reyes
Catalin
I am also quite new to all this. I'll tell you a bit more about what I
am trying to accomplish here. I am working on some project which has a a lot
of code written in PHP and is going to need also a lot of code in JAVA. So,
I was thinking that it would be great if we could have PHP connected to our
servlet container and web server, which is Jetty. I looked in the mailing
lists for info about this, and I found a servlet which connects (or at least
tries) to PHP using CGI (Common Gateway Interface).
The HttpURLConnection is algo a good idea. Still, it would be a lot
better if I could just connect PHP to Jetty the same way PHP connects to
Apache using CGI. Any idea on how to accomplish this? Thanx...

Rodrigo

Catalin Trifu [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I didn't quite understood what you mean by CGI in this case,
 but if you reffer to calling a script which resides on a server via HTTP
 protocol, i suggest you take a look at the java.net.* package, You can
 use the java.net.URLConnection to connect to the PHP script and act
 as a client (like a browser) for it from your servlet.
 You should het the response from the script back through the
 getInputStream()
 ar any other method that suits you.
 Also take a look at java.net.HttpURLConnection which has more
 specific methods for dealing with HTTP.
 Once again, I may have misunderstood you, but I hope this is
 helpfull anyhow.

 Cheers,
 Catalin

 Rodrigo Reyes [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hi all
  Has anyone been able to call php from a servlet (JAVA) using CGI
  interface? I am trying to do that here, and everything seems to work
 without
  problems, except that no data returns from the execution of my scripts.
 Any
  idea what could be happening? Is there information on how to configure
the
  CGI variables in order to be able to call PHP? Thanx in advance...
 
  Rodrigo
 
 





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



Re: [PHP] Bundled GD Webalizer

2003-06-27 Thread Adam Voigt
PHP doesn't install GD. GD is a library that PHP can
link against, giving you the ability to manipulate images.

PHP doesn't give you GD. GD is an independent library.



On Fri, 2003-06-27 at 12:09, Michael A Smith wrote:
 No, you don't understand, I want to know where PHP installs GD.
 
 -Michael
 On Fri, 2003-06-27 at 08:06, Adam Voigt wrote:
  PHP did not remove your copy of GD, so this is
  a system question, not PHP.
  
  
  On Fri, 2003-06-27 at 12:03, Michael A Smith wrote:
   I compiled PHP 4.3.2 --with-gd, but now webalizer can't find GD? Where
   is it? I tried installing the original library but that's not good
   either.
   
   -Michael
   -- 
   Michael Smith
   [EMAIL PROTECTED]
   
   The great thing about democracy is that it gives 
   every voter a chance to do something stupid. 
-Art Spander
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP] mysql split?

2003-06-27 Thread Andrew McCombe
Does mysql have an explode function?  I suppose this is the wrong place to
ask...

Andrew

- Original Message - 
From: Jay Blanchard [EMAIL PROTECTED]
To: Andrew McCombe [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, June 27, 2003 5:08 PM
Subject: RE: [PHP] mysql split?


 use explode()

 -Original Message-
 From: Andrew McCombe [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 11:06 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] mysql split?


 Hi

 I have a field in mysql that has paths to files such as:

 project/entertainment/andrew/job/1.jpg
 project/corporate/roberts/job/1.jpg
 project/corporate/andrew/job/1.jpg
 project/identity/john/job/1.jpg

 The first level is always 'projects'.  What I want to do is get the
 unique
 name for the 3rd level for all entertainment, corporate and identity, so
 from the data above I would get returned:

 andrew
 john
 roberts

 What's the best way to acheive this? I remember seeing something where
 you
 can split a field in the mysql into parts (ie, split at /)?  or would a
 regex be better ('WHERE REGEX
 ^projects/corporate|entertainment|identity/'
 (this doesnt work))?  Hope someone can help.




 Regards
 Andrew McCombe
 Interactive Web Solutions (Stafford)
 Tel: 01785 279921



 
 
 -
 The contents of this e-mail and any attachments are confidential and may
 be legally privileged. If you have received this e-mail and you are not
 a named addressee, please inform us as soon as possible on
 +44 (0) 1785 279920  and then delete the e-mail from your system. If you
 are
 not a named addressee you must not copy, use, disclose, distribute,
 print or rely on this e-mail. Any views expressed in this e-mail or any
 attachments may not necessarily reflect those of Interactive Web
 Solutions'
 management.
 Although we routinely screen for viruses, addressees should scan this
 e-mail and any attachments for viruses. Interactive Web Solutions makes
 no
 representation or
 warranty as to the absence of viruses in this e-mail or any attachments.
 Please note that for the protection of our business, we may monitor and
 read e-mails sent to and from our server(s).



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


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





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



  1   2   >