[PHP] filling an array(2)

2002-07-26 Thread Steve Buehler

h.  Ok.  Can somebody explain this one?  Why won't it work correctly?

for($m=1;$m<=5;$m++){
$div_idd[$m]=${'row->sub' . $m . 'd'};
}

Can it not be done with a 3 parter?  The columns in the table that $row 
gets, are sub1d, sub2d, sub3d, sub4d and sub5d.  Or is it the "->" that is 
messing it up?  I have tried escaping them "row\-\>sub", but that didn't work.
What would I search for on the PHP site or where are directions located 
that tells me how to use this type of putting a variable together.  It 
makes it hard to search for it if I don't know what it is called.

Thanks
Steve


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3


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




Re: [PHP] still on sessions

2002-07-26 Thread Tyler Durdin

Alright this is my last question. I have closed the session, but can i make 
sure it is closed? i want to use something like if the session is closed  
then print a message session closed.



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




Re: [PHP] Help: header function

2002-07-26 Thread Tech Support

If you have session cookies disabled in your browser then you have to add
the session ID to the redirect. If you have your cookies enabled and you are
still losing the session then there must be some other problem.

no cookie compatible:

header("Location: http://someplace.com/somepage.php?PHPSESSID="; .
session_id() );
exit();

if you have session.use_trans_sid = 1 or you compiled
with --enable-trans-sid the session id will be automatically added to
relative get or post. Both links that are not a relative URI and header
redirects require that you manually append the session id to the query
string to keep the session without the need for a session cookie.

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "k a m e s h" <[EMAIL PROTECTED]>
To: "Tech Support" <[EMAIL PROTECTED]>
Cc: "Matt" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 1:21 PM
Subject: Re: [PHP] Help: header function


>
> thanks for the help..
>
> There was no problem with the syntax.. I used the correct syntax in my
> code: the quotes and both the host name and the script name.. i didnt
mention
> it properly in the mail..
> i have also tried it with absolute URL.. as you have mentioned the problem
> is: session information is not transmitted in redirection.. is there any
> way of resolving this problem?
> i wrote a single script that will allow a user to update the db, if he is
> logged in or it will display the login form if he is not logged .. once he
> logs in successfully, i call the script again so that he will be able
> to update the db.. pls help me..
>
> regards
> kamesh
>
>
>   _
>   s kameshwaran
>  eEL, Dept of CSA, IISc, Bangalore - 560012
>Homepage: http://www2.csa.iisc.ernet.in/~kameshn
>  Phone: +91-80-3942368-111 (Lab), +91-80-3942624 (Hostel: U-95)
>  
>  Eternity abides in the present.. NOW
>
>
> --
> 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] including just created file

2002-07-26 Thread Marek Kilimajer

Hi all,

I just coded a cache mechanism for some slow code that looks like this:

$cache_file_name = "cache/$id/$tid". ($showall ? '_all.php' : 
'.php');
$cache_dir_name= "cache/$id";
   
if(!file_exists($cache_file_name) || 
@filectime($cache_file_name) + 30 < time() ) {
if(!is_dir($cache_dir_name)) {
mkdir($cache_dir_name, 0777);
}
$lock=@fopen($cache_file_name . '.lock','w');
if(flock($lock,LOCK_EX)) {
include('modules/rally_live/create_cache.php');
flock($lock,LOCK_UN);
}
fclose($lock);
}
clearstatcache();
for($i=0;!file_exists($cache_file_name);$i++) {
if($i==3) die('Cannot read cache file!');
clearstatcache();
}
include($cache_file_name);  // *sometimes includes empty file*
echo "";

The 'create_cache.php'  creates a php code, that later needs to be 
executed. The problem is, the just created cache file seems to be empty 
*sometimes* when included, however, if I look at it, it does contain 
code. I do call fflush($cache_file) before closing it, so I don't see 
why the file is empty.
If anyone can help me, I would be really glad.






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




Re: [PHP] pg_pconnect() question

2002-07-26 Thread Varsha Agarwal

I changed the user name in pg_pconnect(), also i
checked the pg_hba.conf for authentication. The
authentication type is trust. But still I am getting
the same warning while connecting to the database. Can
anyone figure what might be the problem?

--- "Lejanson C. Go" <[EMAIL PROTECTED]> wrote:
> Varsha,
> 
> try creating a new user for postgreSQl and do not
> use
> the "postgres"
> 
> try this at command line:
> 
>   [guest@localhost]$ su
>   [root@localhost]$ su - postgres
>   [postgres@localhost]$ create user username
> 
> 
> in ur pg_connect
> 
>specify the username.dont use postgres.
> 
> 
> Varsha Agarwal wrote:
> 
> > I am trying to connect to postgre_sql database
> using
> > pg_pconnect(). When I try to run it i get the
> > following error
> > Warning: Unable to connect to PostgreSQL server:
> FATAL
> > 1: IDENT authentication failed for user "postgres"
> in
> > /var/www/html/test.php on line 3
> > connection failed 
> > 
> > Please tell me what might be the reason.
> > -Varsha
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! Health - Feel better, live better
> > http://health.yahoo.com
> > 
> > 
> 
> 
> 
> -- 
> Lejanson C. Go, SDE I
> 


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




RE: [PHP] Netscape 4.7 with php gd, very slow

2002-07-26 Thread Harry Yu

I have no problem with Netscape 4.7 when connecting to
Windows 2000 running the same script.  Also, I don't
have any nested tables in the html.  Any other ideas?

Thanks,
Harry

--- Bob Lockie <[EMAIL PROTECTED]> wrote:
> 
> >[snip]
> >I'm trying to generate dynamic buttons with text
> from mysql database.
> >Everything is fine except that the images are
> displaying very slow in
> >Netscape 4.7. Internet Explorer, Netscape 6 and
> Mozilla are very fast.  I'm
> >running Apache 1.3.26, PHP 4.2.2, GD 1.6.2 on
> Linux.  Also, I have the same
> >scripts running in Windows 2000 and I don't have
> this problem with Netscape.
> >The following are the scripts:
> >
> >Has anyone experience this problem before?  I'm not
> sure whether Apache,
> >PHP, or GD is causing this.
> >[/snip]
> >
> >I am running various browsers and have never seen
> this type of behavior. If
> >the same script is good in IE, NS6, and Moz could
> it be that there is
> >something with NS4.7? I have just tested IE6, NS6,
> Moz1.0, and NS4.7
> >accessing the same script on the same server and
> saw no problems (save for
> >NS4.7 barfing on some of the CSS).
> 
> Check the generated HTML.
> I think later browsers are more forgiving.
> Are you using tables?
> I think table rendering in NS4.7 was really slow.
> 
> 
> 


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




[PHP] Re: Spambot Defense Code

2002-07-26 Thread Richard Lynch

>Worked on this a bit tonight, thought it might help someone out there! I
>looked at the bottomw of phpclasses.org at what they'd done to obfuscate
>their e-mail address using JavaScript. While theirs is much more complex, I
>couldn't figure a way to do it their way when you don't know the exact
>user@domain of people in your database. I thought this might do the trick,
>at least to some extent, by separating the user and domain in the source
>code and not put them together until the mailto: link is clicked. Sorry if
>something like this has been posted before - if so, here it is again! :)

I never rely on JavaScript existing, much less working correctly for
something as important as an email link actually working.  YMMV.

mailto:$url>$text";
  }
?>

I understand that on older versions of AOL, this "doesn't work" but I
haven't really gotten a handle on just how old the AOL is, or quite how it
breaks...



-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




Re: [PHP] Re: sessions

2002-07-26 Thread Tyler Durdin

So doing it the new way ($_SESSION['variable']) how do you close or 
unregister a session?




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




Re: [PHP] Re: sessions

2002-07-26 Thread Tyler Durdin

Still the same message. It has been actually logging me out all along, but 
it will not run through that if statement.

>Could you trye
>if (!empty($HTTP_SESSION_VARS['valid_user'])
>use $HTTP_SESSION_VARS





_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




[PHP] How to UPDATE two MySQL Tables

2002-07-26 Thread Monty

I have two tables: member_basic and member_detail. When a member edits their
record, they can edit or add data for either table, but, the data stored in
member_detail isn't required, so, they can possibly leave these fields
blank. By the way, both tables would be linked by a member id.

Here's my dilemma: If they do fill in any fields associated with
member_detail, I have to first see whether or not there's an entry in the
member_detail table already for that user (based on member id number). If
not, I then have to check ALL the form fields associated with this table to
see if any data was actually entered so I know whether or not to create a
new record for the member in member_detail. If there is already an entry for
that member in member_detail, then I can just do a standard UPDATE.

Now maybe this is how it has to be done, but, I was hoping there might be an
easier way to do this. It appears it's not possible to UPDATE a JOINed table
during a query, which is what I was hoping. I am trying to keep the DB
efficient by keeping optional data that may be left empty in another table,
but, it's only making my life difficult, so, unless there's an easier way, I
may just combine all the fields into one table and be done with it.

Sorry for the long-winded explanation. Any suggestion are greatly
appreciated!

Monty





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




RE: [PHP] Close A Databse Connection

2002-07-26 Thread Peter J. Schoenster

Hi,

The question was about the use of mysql_close. Use it or not (not when to use it or 
when not to). So far:

> Agreed... you should always "clean up after yourself."

> PHP will close the connection automatically will be closed and all
> information cleared.

> I advised a newbie to
> always use mysql_close() to close the connection to the database. It's
> good form and will cover any ills where the database connection fails to
> close for some other reason (say the user stops the page from loading
> after the connection is made).

2 says use it
1 says no.

>From my read of docs I'd say not to use it. I use the Perl DBI with Apache::DBI and 
>it simply overrides the DBI disconnect so calling a disconnect is only a waste of 
>minimal time and typing 
when using it. 

So, in PHP there are also 2 types of connections:

mysql-pconnect
mysql_connect

Well if you are using mysql-pconnect then you would "rarely" use mysql_close() as the 
docs say

Using mysql_close() isn't usually necessary, as non-persistent open links are 
automatically closed at the end of the script's execution. See also freeing resources.
__end quote

Okay, so when, when using a persistent connection would I use mysql_close()? 

http://www.php.net/manual/en/function.mysql-pconnect.php

says

"Second, the connection to the SQL server will not be closed when the execution of the 
script ends. Instead, the link will remain open for future use (mysql_close() will not 
close links 
established by mysql_pconnect())."

See the above url for information from user comments about cutting down idle 
connections.

I think it's safe to say one would not use mysql-close() when using mysql-pconnect, 
although I wonder about the cost of doing that. 

http://www.php.net/manual/en/function.mysql-close.php
says

> Using mysql_close() isn't usually necessary, as non-persistent open
> links are automatically closed at the end of the script's execution.

It seems to me better to err on the side of caution and use mysql_close(). If you are 
using a persistent connection then the call to mysql_close() should be overridden but 
I've got no clue if it's 
done that way. Seems to be related to opening and closing a file. In Perl the file 
will close when the script exits and that's fine for quick stuff but once a script 
begins to grow it allows for bugs. 

I vote to suggest use of mysql_close().

Peter





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




[PHP] filling an array

2002-07-26 Thread Steve Buehler

Thank You Andrey, Matt and Martin for your answers.  To summarize for 
everyone, here are the answers:

 From Andrey (tested, works):
for($m=1;$m<=5;$m++){
$div_id[$m]=${'divid'.$m};
}

 From Matt:
for($m=1;$m<=5;$m++){
$varName = 'divId' . $m;
$div_id[$m]=${$varName}
}

 From Martin:
for($i =0; $i < 5; $i++) {
$offset = $m + 1;
$divid[$m] = $div_id{$offset};
}

At 10:55 PM 7/26/2002 +0300, you wrote:


>- Original Message -
>From: "Steve Buehler" <[EMAIL PROTECTED]>
>To: "PHP" <[EMAIL PROTECTED]>
>Sent: Friday, July 26, 2002 10:48 PM
>Subject: [PHP] filling an array
>
>
> > Can anyone tell me what I am doing wrong?
> >
> > I am essentially trying to do this:
> > $divid[1] = $div_id1;
> > $divid[2] = $div_id2;
> > $divid[3] = $div_id3;
> > $divid[4] = $div_id4;
> > $divid[5] = $div_id5;
> >
> > But I was looking for a tighter way, like the following (which does not
>work):
> > for($m=1;$m<=5;$m++){
> > $div_id[$m]=$divid$m;
> > }
> >
> > Can anybody tell me how to do this in a "for" statement?
> >
> > Thanks In Advance
> > Steve
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> > ow3
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3


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




[PHP] Installed PHP on home Win98se, now how can I get browser to see it?

2002-07-26 Thread Marcus Unlimited

Hello,

I just installed the nice and easy one click PHP install to my Windows
98se machine.

I just want to be able to test and practice My basic PHP /MySQL stuff
without up loading.

So now what do I do.

I ran the php info scripts and got bunch of weird messages.

How do I get the PHP to work in my browsers IE, NN just as it does when
uploaded to my hosting co's servers?

Thanks,
-Marcus

--
||

Marcus Unlimited
http://marcusunlimited.com
Multimedia Internet Design and Education
||

---
Also visit:
-  http://www.chromaticus.com
-  http://ampcast.com/chromaticus



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




[PHP] Re: File upload memory usage.

2002-07-26 Thread Richard Lynch

>I'm currently locked in a battle with PHP and file uploads.  I've
>searched the list to no avail.  I actually found a guy with the same
>problem who ended up using perl to make this work.  I'm trying to avoid
>that.
>
>The problem is, I'm dealing with huge POST uploads (100+ mb).  And

Ye Gods!

I don't think HTTP POST upload is going to be reliable for *that* size
files, no matter *what* you do...

Give them an FTP account or something.

At least FTP can be "continued" (assuming the server/client are configured
properly and current) when they lose their connection after 95MB...

HTTP POST can't be "continued", last I checked...  At least not on most
systems.


-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] POSTing Form Vars as Array ??

2002-07-26 Thread Monty

Is it possible to pass variables from a form as an array to another PHP
file? For example, I have this:



When the form re-loads after being submitted (it calls itself when SUBMIT is
pressed), the var $db['email'] doesn't exist anymore.

Is it only possible to POST variables to a page if they are not in an array?

Thanks!

Monty


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




Re: [PHP] filling an array

2002-07-26 Thread Andrey Hristov

 for($m=1;$m<=5;$m++){
 $div_id[$m]=${'divid'.$m};
 }

Regards,
Andrey


- Original Message -
From: "Steve Buehler" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 10:48 PM
Subject: [PHP] filling an array


> Can anyone tell me what I am doing wrong?
>
> I am essentially trying to do this:
> $divid[1] = $div_id1;
> $divid[2] = $div_id2;
> $divid[3] = $div_id3;
> $divid[4] = $div_id4;
> $divid[5] = $div_id5;
>
> But I was looking for a tighter way, like the following (which does not
work):
> for($m=1;$m<=5;$m++){
> $div_id[$m]=$divid$m;
> }
>
> Can anybody tell me how to do this in a "for" statement?
>
> Thanks In Advance
> Steve
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> ow3
>
>
> --
> 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] Close A Databse Connection

2002-07-26 Thread Jay Blanchard

Well, it's Friday afternoon and the pre-pub run debates have started :^]

The choice of arguement today is born of the fact that I advised a newbie to
always use mysql_close() to close the connection to the database. It's good
form and will cover any ills where the database connection fails to close
for some other reason (say the user stops the page from loading after the
connection is made). I know that it is not required, but always being
competitive I thought I would turn to the group for a concensus, whether I
am right or wrong.

Thoughts?

Jay



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




[PHP] phpMyAdmin and apqache 2.0.39 cache problems

2002-07-26 Thread electroteque

hi guys i am having major caching issues in phpMyAdmin when i moved to
apache 2.0.39 has anyone else expeirence this ? its sending me round the
bend , i cant view my mysql tables when i create them , i have to removed
temp internet files and hit refresh to get them to view



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




RE: [PHP] Changing a variable's value when a link is clicked

2002-07-26 Thread Jay Blanchard

[snip]
Is there a way to change the value of a global variable when someon clicks a
 URL link on a web page?
[/snip]

If the variable is sent via GET i.e.;

http://something.com/foo.php?bar=stuff

then you could;

$bar = $_GET['bar']; //where $bar is the global to be changed, $bar would
now = stuff

HTH!

Jay

Next mood swing…6 minutes

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*



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




RE: [PHP] selcet statement question

2002-07-26 Thread Jay Blanchard

[snip]
I know that i can retrieve records 1-24 in my db with a select statement
like SELECT whatever FROM tablename ORDER BY id ASC LIMIT 23, but how can I
get records 25 to 50 if I have 100 records in my DB?
[/snip]

Different DB's have differing ways of doing this, like MySQL;

SELECT *
FROM foo
ORDER BY id ASC
LIMIT 0, 24 ** first 25 records

SELECT *
FROM foo
ORDER BY id ASC
LIMIT 25, 24 * next 25 records

Don't forget that the row numbering starts with 0.

HTH!

Jay

"Oh, sure…but what’s the speed of DARK?"

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*



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




[PHP] High Resolution Images

2002-07-26 Thread [EMAIL PROTECTED]

Hello,

I am creating a script that takes an uploaded image, creates a thumbnail
from it, and saves both files.

The script works great, but the problem is, the files It will have to
handle, are high-resolution files (300dpi, 24 bit-depth).. it works fine on
regular files (72 dpi), but when I upload a 300dpi image, it says that the
image is not a valid JPEG file.

Warning: imagecreatefromjpeg:
'/home/sites/site1/web/uploadedHi-Res/mo_0001.jpg' is not a valid JPEG file
in /home/sites/site1/web/site/designers/doSubmit.php on line 6

The image appears to be valid here, it opens on photoshop, and everywhere,
however, once uploaded, the image seems to be corrupted somehow, bc if I
download it again, it won¨t open anywhere. Has this happened to anyone else
on this list?.. if so, please advise!.

Here is the code for the script if it helps:


function createThumbnail($path, $filename) {
$src_img=ImageCreateFromJpeg($path); //HERE IT SAYS IMAGE NOT VALID
if (imagesx($src_img)  > imagesy($src_img)) {
 $new_w=69;
 $new_h=40;
 $t1 = imagesx($src_img);
 $t2 = imagesy($src_img);
} else {
 $new_w=40;
 $new_h=69;
 $t1 = imagesy($src_img);
 $t2 = imagesx($src_img);
 }
header("Content-type: image/jpeg");
$dst_img=imagecreate($new_w,$new_h); 
imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,$t1,$t2);
ImageJpeg($dst_img,
"/home/sites/site1/web/uploadedHi-Res/$filename-thumb.jpg", 50);
}


if (($filename_type != "image/jpeg") && ($filename_type != "image/jpg") &&
($filename_type != "image/pjpeg")) {
header("Location:submitError.php"); exit;
} else {
srand((double)microtime()*100);
$randomfile = substr(md5(rand(0,999)), 0, 6);
$upload = "/home/sites/site1/web/uploadedHi-Res";
$upload_path = "$upload/$filename_name";
if (is_uploaded_file($filename)) {
 Exec("cp $filename $upload_path");
  $link = @mysql_connect(localhost, 'x', '') 
   or die("Unable to Connect to Database");
 mysql_select_db();
 $sql = "INSERT INTO  VALUES ('$designer_valid', '$filename_name',
NOW(), 'Pending')";
 $result = mysql_query($sql) or die("Query Failed");
 createThumbnail($upload_path, $filename_name);
 header("Location:designSubmitted.php"); exit;
} else {
   header("Location:submitError.php"); exit;
  }
}



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




[PHP] Table formatting

2002-07-26 Thread César Aracena

Hi all.
 
Last nite I’ve came across a problem I wasn’t able to figure out by my
self. It’s not difficult to make a loop that will make new *TABLE ROWS*
() to show several DB objects in a nice way… what I need to do, is
to display 2 or maybe even 3 of this objects stored in a DB per table
row, separated in different *TABLE COLUMS* ()… how can I achieve
this? What I usually do is:
 
--
// DB QUERY
$query = “SELECT * FROM table_name”;
$result = mysql_query($query) or die(mysql_error());
$num_rows = mysql_num_rows($result);
 
// NOW THE LOOP
for ($i=0; $i<$num_rows; $i++)
{
 $row = mysql_fetch_array($result);
 echo “”;
 echo “”;
 echo $row[whatever];
 echo “”;
 echo “”;
}
--
 
but how can I get 2 or 3 columns displaying different db objects? A loop
inside a loop?
 
Thanks in advance,
 
  Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
 



Re: [PHP] Re: sessions

2002-07-26 Thread Tyler Durdin

Still getting the same message. This script used to work perfectly in an 
older version of php. Could it be a problem with how I am setting the 
sessions. Has anything changed with how we code sessions?


>It's because you are unregistering the valid_user variable, but, the
>old_user var you defined early on still exists. So, "if 
>(!empty($old_user))"
>will equal FALSE, giving you the result you are getting. Change it to "if
>(!empty($valid_user))".
>
>Monty




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




[PHP] RE: Paying Job...

2002-07-26 Thread Jason

I just thought I would share a personal experience that I am currently going
through that relates to this.

I was approached by a client to develop a full e-commerce solution for his
company. I am only one guy, and I had never done any PHP code on this scale
before. I knew this, but I wanted to do the job. So I undercut myself. I
mean really undercut (in hindsight, I shouldn't have undercut myself as much
as I did). I am in the process of delivering a $20,000 - $25,000 website to
this company, and I am only making $2000 on it. I have spent close to 700
hours on the development of this project in my evenings and weekends.

So why did I do it? Three reasons...
1) I wanted the job.
2) I needed a 'good' portfolio piece.
3) I can now buy computer parts cheaper than Future Shop.

If you decide to charge by the project make sure you know what you're
getting yourself into, and that its going to be something you can deliver.
Since I have started working on my project I have gained 3 more contracts
without even trying just by showing them this project.

That and being able to say "I did this... ALL BY MYSELF!" is pretty cool.


Jason L Cathcart
BSc. Computer Information Systems
[EMAIL PROTECTED] 




-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
Sent: July 25, 2002 9:47 AM
To: php-gen
Subject: Paying Job...


Basically, someone is looking to get a database driven site built,
and Ive never written code for money before.
Im looking for advice, as to how the experienced coders in here charge
for their work.
Do you charge by the page, script or by the hour (that would be nice).

Thanks for any input you may provide...

--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/





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




RE: [PHP] Netscape 4.7 with php gd, very slow

2002-07-26 Thread Bob Lockie


>I have no problem with Netscape 4.7 when connecting to
>Windows 2000 running the same script.  Also, I don't
>have any nested tables in the html.  Any other ideas?
>
>Thanks,
>Harry
>
>--- Bob Lockie <[EMAIL PROTECTED]> wrote:
>> 
>> >[snip]
>> >I'm trying to generate dynamic buttons with text
>> from mysql database.
>> >Everything is fine except that the images are
>> displaying very slow in
>> >Netscape 4.7. Internet Explorer, Netscape 6 and
>> Mozilla are very fast.  I'm
>> >running Apache 1.3.26, PHP 4.2.2, GD 1.6.2 on
>> Linux.  Also, I have the same
>> >scripts running in Windows 2000 and I don't have
>> this problem with Netscape.
>> >The following are the scripts:
>> >
>> >Has anyone experience this problem before?  I'm not
>> sure whether Apache,
>> >PHP, or GD is causing this.
>> >[/snip]
>> >
>> >I am running various browsers and have never seen
>> this type of behavior. If
>> >the same script is good in IE, NS6, and Moz could
>> it be that there is
>> >something with NS4.7? I have just tested IE6, NS6,
>> Moz1.0, and NS4.7
>> >accessing the same script on the same server and
>> saw no problems (save for
>> >NS4.7 barfing on some of the CSS).
>> 
>> Check the generated HTML.
>> I think later browsers are more forgiving.
>> Are you using tables?
>> I think table rendering in NS4.7 was really slow.

What web servers are you using?
Maybe they are returning different headers.




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




RE: [PHP] still on sessions

2002-07-26 Thread John Holmes

> Alright this is my last question. I have closed the session, but can i
> make
> sure it is closed? i want to use something like if the session is
closed
> then print a message session closed.

You don't have to close it; it's automatic. Just treat $_SESSION like
the regular variable it is. Anything you assign to it will be available
on any page you call session_start(). How much easier can it be??

If you really want a message, then on the last line of your file put 

echo "Session Closed";

---John Holmes...


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




[PHP] Red Hat 7.2 enabling MySQL on preinstalled PHP

2002-07-26 Thread Joel Lopez

I installed PHP when I installed Red Hat 7.2 without MySQL.  I have now
added MySQL but I can't figure out how to enable it in PHP. Can anyone help?

thanks,
Joel



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




Re: [PHP] Installed PHP on home Win98se, now how can I get browser to see it?

2002-07-26 Thread Tech Support

You need a web server like M$ IIS or Apache. I would rather chew tin foil
than run an IIS server even if it was on a win machine.

You can install the win version of the Apache web server and then just
browse to http://localhost/ to view your work.

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Marcus Unlimited" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 5:18 PM
Subject: [PHP] Installed PHP on home Win98se, now how can I get browser to
see it?


> Hello,
>
> I just installed the nice and easy one click PHP install to my Windows
> 98se machine.
>
> I just want to be able to test and practice My basic PHP /MySQL stuff
> without up loading.
>
> So now what do I do.
>
> I ran the php info scripts and got bunch of weird messages.
>
> How do I get the PHP to work in my browsers IE, NN just as it does when
> uploaded to my hosting co's servers?
>
> Thanks,
> -Marcus
>
> --
>

||
>
> Marcus Unlimited
> http://marcusunlimited.com
> Multimedia Internet Design and Education
>

||
>
> ---
> Also visit:
> -  http://www.chromaticus.com
> -  http://ampcast.com/chromaticus
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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




[PHP] Re: File upload memory usage.

2002-07-26 Thread Reid Sutherland

> 
> I don't think HTTP POST upload is going to be reliable for *that* size
> files, no matter *what* you do...

Well from the tests I have done it has worked fine.  There is no reason 
why it shouldn't either.

> 
> Give them an FTP account or something.
> 

No an option for hundreds of people with massive multi-tier permissions. 
  And considering these people barely understand how to enter their 
username let alone use an FTP client.

> At least FTP can be "continued" (assuming the server/client are configured
> properly and current) when they lose their connection after 95MB...
> 
> HTTP POST can't be "continued", last I checked...  At least not on most
> systems.

They can't, but that's fine.


-reid



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




Re: [PHP] mysql question

2002-07-26 Thread Lowell Allen

> From: "Christian Calloway" <[EMAIL PROTECTED]>
> 
> Sorry this may be a little offtopic, but I am currently moving a site I was
> developing from coldfusion+MSAccess to PHP+MySQL. I remembered reading
> somewhere that there is a utility that will convert/transfer (data and
> structure) a MSAcess database to Mysql, and vice versa. Anyone know? Thanks
> 
MS Access2MySQL Converter is at .

--
Lowell Allen


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




Re: [PHP] High Resolution Images

2002-07-26 Thread Tech Support

This may sound silly, but you are uploading in binary mode right?

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 5:24 PM
Subject: [PHP] High Resolution Images


> Hello,
>
> I am creating a script that takes an uploaded image, creates a thumbnail
> from it, and saves both files.
>
> The script works great, but the problem is, the files It will have to
> handle, are high-resolution files (300dpi, 24 bit-depth).. it works fine
on
> regular files (72 dpi), but when I upload a 300dpi image, it says that the
> image is not a valid JPEG file.
>
> Warning: imagecreatefromjpeg:
> '/home/sites/site1/web/uploadedHi-Res/mo_0001.jpg' is not a valid JPEG
file
> in /home/sites/site1/web/site/designers/doSubmit.php on line 6
>
> The image appears to be valid here, it opens on photoshop, and everywhere,
> however, once uploaded, the image seems to be corrupted somehow, bc if I
> download it again, it won¨t open anywhere. Has this happened to anyone
else
> on this list?.. if so, please advise!.
>
> Here is the code for the script if it helps:
>
>
> function createThumbnail($path, $filename) {
> $src_img=ImageCreateFromJpeg($path); //HERE IT SAYS IMAGE NOT VALID
> if (imagesx($src_img)  > imagesy($src_img)) {
>  $new_w=69;
>  $new_h=40;
>  $t1 = imagesx($src_img);
>  $t2 = imagesy($src_img);
> } else {
>  $new_w=40;
>  $new_h=69;
>  $t1 = imagesy($src_img);
>  $t2 = imagesx($src_img);
>  }
> header("Content-type: image/jpeg");
> $dst_img=imagecreate($new_w,$new_h);
> imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,$t1,$t2);
> ImageJpeg($dst_img,
> "/home/sites/site1/web/uploadedHi-Res/$filename-thumb.jpg", 50);
> }
>
>
> if (($filename_type != "image/jpeg") && ($filename_type != "image/jpg") &&
> ($filename_type != "image/pjpeg")) {
> header("Location:submitError.php"); exit;
> } else {
> srand((double)microtime()*100);
> $randomfile = substr(md5(rand(0,999)), 0, 6);
> $upload = "/home/sites/site1/web/uploadedHi-Res";
> $upload_path = "$upload/$filename_name";
> if (is_uploaded_file($filename)) {
>  Exec("cp $filename $upload_path");
>   $link = @mysql_connect(localhost, 'x', '')
>or die("Unable to Connect to Database");
>  mysql_select_db();
>  $sql = "INSERT INTO  VALUES ('$designer_valid', '$filename_name',
> NOW(), 'Pending')";
>  $result = mysql_query($sql) or die("Query Failed");
>  createThumbnail($upload_path, $filename_name);
>  header("Location:designSubmitted.php"); exit;
> } else {
>header("Location:submitError.php"); exit;
>   }
> }
>
>
>
> --
> 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] php redirect

2002-07-26 Thread Jay Blanchard

[snip]
I have a redirect i would like to do using php. It will go something like 
this
if (mysql_db_query ($dbname, $query, $link)) {
  {redirect would go here}
} else {
 {a different location on this redirect here}

How can i accomplish this? i just do not know php well enough to code the 
redirect. Please help. Thanks in advance and for all of the past help.
[/snip]

Use the header() function

http://www.php.net/manual/en/function.header.php

HTH!

Jay

My reality check bounced 

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*


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




Re: [PHP] Help: header function

2002-07-26 Thread Bob Lockie


>>From: "Tech Support" <[EMAIL PROTECTED]>
>> To: "k a m e s h" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>>Sent: Friday, July 26, 2002 11:20 AM
>>Subject: Re: [PHP] Help: header function
>
>
>> Try just header("Location: $PHP_SELF"); or header("Location:
>$SCRIPT_NAME")
>> ...leave out http:// ...and your quotes are in the wrong place too.
>
>I know that works but the spec for http/1.1 says it's supposed to have the
>absoluteURI including the scheme, and host,
>see http://www.php-faq.com/httpheaders.php#14.30.  Kamesh's trouble was he
>was refering to something like http://mypage.php -- which was missing the
>host name. I've coded lots of headers() with relative URIs [i.e.
>header('Location: mypage.php')] without trouble (at least that I know of).
>Has anyone run into trouble using only the page name?  Is this something to
>worry about or not?

I think only fully qualified domain names and paths are in the HTTP spec but most/all 
browsers
support relative names in Location (not that they have to).




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




Re: [PHP] php redirect

2002-07-26 Thread Tech Support

I know what you mean about everything being M$.

I'm a die hard GNU fan and therefore hate everything M$, but I can think of
more than one occasion where that attitude cost me some money. I somehow
still believe that if I stick to my beliefs and maybe try to convert some M$
people to host their sites/apps on *nix we will eventually take down the
evil Redmond devil and open source software will rule the world.


"The box read, 'windows 9x or better' so I installed Linux!"
hehe

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "David Buerer" <[EMAIL PROTECTED]>; "'Jay Blanchard'"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 11:20 AM
Subject: Re: [PHP] php redirect


> Well the current web-dev environment here in Melbourne, Australia is VERY
> Microsoft oriented at the moment.  I'm happily freelancing, but have been
> keeping my eye on the big job websites, just in case that perfect job
comes
> up.
>
> I get emailed about a few jobs every day, and 90% of them are for a M$
> environment.
>
> I guess that would be some form of motivational tool for someone to learn
> ASP -- if there aren't any PHP jobs, then what's the point in knowing PHP?
>
>
> I'm sure it's just a temporary problem here at the moment, and it'll sort
> itself out... but if I ever get a week without much work, I'll try and
learn
> a bit of ASP, just so that when a client/employer ask me to use ASP, I can
> fumble through it, or better still, recommend PHP as an educated
> alternative.
>
>
> Justin French
>
>
>
>
> on 27/07/02 1:14 AM, David Buerer ([EMAIL PROTECTED]) wrote:
>
> > What's ASP
> >
> > I don't know if and haven't learned it so it couldn't be.  After all,
how
> > many programming languages does one need to know??
> >
> >
> > -Original Message-
> > From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, July 26, 2002 8:27 AM
> > To: 'David Buerer'; [EMAIL PROTECTED]
> > Subject: RE: [PHP] php redirect
> >
> >
> > [snip]
> > This is the only way I've figured out how to do it.  It seems to work
really
> > well.
> >
> > if (mysql_db_query ($dbname, $query, $link)) {
> > gotourl("myurl1");}
> > } else {
> > gorourl("myurl2");}
> >
> > function gotourl(myurl)
> > {
> > echo "";
> > echo "  window.location=$myurl;";
> > echo "\n";
> > }
> > [/snip]
> >
> > Isn't this ASP? ;^]
> >
> > Jay
> >
> > My other car is a broom
> >
> > *
> > * Want to meet other PHP developers *
> > * in your area? Check out:  *
> > * http://php.meetup.com/*
> > * No developer is an island ... *
> > *
> >
> >
>
>
> --
> 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] time question.

2002-07-26 Thread 1LT John W. Holmes

> How do I compare time in php?
>
> Eg. If I have a mysql time field I retrieve stored in $result[0][0] how do
I
> say :
>
> if (($result[0][0] > $result[0][0] plus ten minutes) && ($result[0][0] >
> '00:00:00')){

MySQL and PHP timestamps are in different formats. MySQL uses MMDDHHMMSS
and PHP uses a unix timestamp, the number of seconds since January 1st,
1970.

You can use UNIXTIMESTAMP(your_column) in your query to get a PHP style unix
timestamp.

Although, if you explain what you are trying to do a little better, you
could probably do the comparisons a lot easier in your query and not involve
PHP at all.

SELECT * FROM your_table WHERE your_column > your_column + INTERVAL 10
MINUTE AND your_column != 0

That looks equivilent to what you're trying to do in PHP. You might have to
say your_column+0 != 0 to get your_column as an integer and not a string.

---John Holmes...


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




[PHP] Re: Windows installation help.

2002-07-26 Thread Richard Lynch

>(This was from an email sent to Gabor, and the site said this address was for help)
>
>>This is not a definition of the $blah variable. $blah = 1; would be a definition.
>
>
>I've never had any problems using just $blah; before, it never errored on 
>me once, is there any reason it does this? (by the way the version I use on 
>Nadrew.com is 4.2.1 and it works fine.)

It does this because you have willfully dis-regarded the warning messages!

You did so by not using error_reporting(E_ALL) at the top of your scripts,
or similar setting in your php.ini or .htaccess

As a result, you have some SECURITY HOLES in your scripts.

Until 4.2.x where register_globals was turned off, a malicious user could
do:

http://nadrew.com/whatever.php?blah=Hack!

Now, the $blah that your code assumes is blank is *NOT* blank, and I've put
stuff into it you've never even considered might be in there...  And it
might be malicious code.

Now, if you were *REALLY* rigorous about checking values/data/content of
*ALL* variables, and not just the ones you *thought* were coming from the
user, that would be fine, but since you almost for sure didn't, it's an
unacceptable risk.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




Re: [PHP] Re: New way to make select boxes auto select

2002-07-26 Thread Nathan Cook

> From: "lallous" <[EMAIL PROTECTED]>
> I use javascript for that! :)

I try to steer away from javascript as much as possible (and anything else
client-side), unless I know my audience extremely well and they are locked
into a certain browser and version, i.e. internal applications.  But I like
that method very much!

 [ Nathan Cook | [EMAIL PROTECTED] ]




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




[PHP] Re: php redirect

2002-07-26 Thread Brian McGarvie

if( ___ ) {
  header("Location: http://www.domain.com/itworked.php";);
} else {
  header("Location: http://www.domain.com/error.php";);
}


"Tyler Durdin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> I have a redirect i would like to do using php. It will go something like
> this
> if (mysql_db_query ($dbname, $query, $link)) {
>   {redirect would go here}
> } else {
>  {a different location on this redirect here}
>
> How can i accomplish this? i just do not know php well enough to code the
> redirect. Please help. Thanks in advance and for all of the past help.
>
> _
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>



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




Re: [PHP] filling an array(2)

2002-07-26 Thread Steve Buehler

Ok.  That makes since.

Thanks
Steve

At 04:20 PM 7/26/2002 -0500, you wrote:
>var names can only be letters, numbers, and underscores.
>
>Jim Grill
>Support
>Web-1 Hosting
>http://www.web-1hosting.net
>- Original Message -
>From: "Steve Buehler" <[EMAIL PROTECTED]>
>To: "PHP" <[EMAIL PROTECTED]>
>Sent: Friday, July 26, 2002 3:53 PM
>Subject: [PHP] filling an array(2)
>
>
> > h.  Ok.  Can somebody explain this one?  Why won't it work correctly?
> >
> > for($m=1;$m<=5;$m++){
> > $div_idd[$m]=${'row->sub' . $m . 'd'};
> > }
> >
> > Can it not be done with a 3 parter?  The columns in the table that $row
> > gets, are sub1d, sub2d, sub3d, sub4d and sub5d.  Or is it the "->" that is
> > messing it up?  I have tried escaping them "row\-\>sub", but that didn't
>work.
> > What would I search for on the PHP site or where are directions located
> > that tells me how to use this type of putting a variable together.  It
> > makes it hard to search for it if I don't know what it is called.
> >
> > Thanks
> > Steve
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> > ow3
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3


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




Re: [PHP] PHP UPGRADE on LINUX

2002-07-26 Thread Tech Support

It really depends on what version you have now.

I'd say the biggest thing to look out for is the register_globals, which is
now defaulted to "Off". This will break lots of sites!!! Turn it on unless
you want your phone to ring for days. Users should, however, be urged to get
used to coding with it off. It can be turned off on a per directory basis
using .htaccess.

I have not actually tried this but one of our users reported a problem with
setcookie. He was doing this:
setcookie('username', $username, "", $protected_dir);
The manual says you must use an integer for the expire argument and cannot
escape with an empty string so I'm surprised it ever worked at all, but he
says it did work before the upgrade. I had him switch to this:
setcookie('username', $username, 0, $protected_dir);

Other than that you might have some Redhat specific problems that I'm
unaware of. I don't see why you people put up with that rpm crap. :-)


Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "karthikeyan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 3:55 PM
Subject: [PHP] PHP UPGRADE on LINUX


Hi,

  We have to upgrade our PHP to the latest stable version on Redhat Linux
7.3.  We have lots of user using our PHP so what are all the precautions and
steps involved while doing this operations without disturbing their existing
program.

  All responses are welcome.

karthikeyan.

-
Judge not, that ye be not Judged - Abraham Lincoln's favorite quote

-




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




Re: [PHP] How can I get my session variable to pass to anotherpage?

2002-07-26 Thread Martin Clifford

You have to have session_start() in each page in order to carry over session 
variables. :o)

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> "DonPro" <[EMAIL PROTECTED]> 07/26/02 04:06PM >>>
Hi,

I have a form that calls a PHP script which sets a session variable and
redirects to anopther URL as such:

session_start();
$HTTP_SESSION_VARS['userid'] = "someidnumber";
Header('Location: ' . 'http://www.mydomain.com/welcome.html');

On welcome.html, I have the following code:


echo 'userid: ' . $HTTP_SESSION_VARS['userid'] . '
'; When I run it in my browser, the value of 'userid' is empty. Anyone know why? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help invoking a regexp

2002-07-26 Thread Analysis & Solutions

Hi Niklas:

On Fri, Jul 26, 2002 at 01:54:25AM +0200, Nicklas af Ekenstam wrote:
> Hi
> 
> I have this regular expression:
> 
> (((http|https|ftp|gopher)|mailto):(//)?[^ <>"\t]*|www\.[-a-z0-9.]+)[^ .,;\t<">\):]
> 
> Which is supposed to match hyperlinks. I would like to use this
> from php to grab all hyperlinks in a text file and return them
> in an array.
> 
> I've messed around with the function preg_match_all() but I just
> can't seem to get it to work. Any suggestions would be very 
> appreciated.
> 
> Thanks,
> Nicklas
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

The mailing list archive:
http://groups.google.com/groups?group=php.general

Good search terms:
hyperlink "regular expression"

Yields this article:
http://groups.google.com/groups?q=hyperlink+%22regular+expression%22+group:php.general&hl=en&lr=&ie=UTF-8&safe=off&selm=3A248B2C.13ED233C%40analysisandsolutions.com&rnum=2

Which has an excellent [shamelessly patting myself on the back] hyperlink
regular expression for ereg*:

  "(http://|https://|ftp://|gopher://|news:|mailto:)
  ([[:alnum:]/!#$%&'()*+,.:;=?@~-]+)([[:alnum:]/!#$%&'()*+:;=?@~-])"

Do note, if the last character of the URI is a "," or "." it assumes those 
are punctuation and leaves them off.

Enjoy,

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




RE: [PHP] php redirect

2002-07-26 Thread Martin Clifford

Learning about HTTP protocol helps a LOT with understanding headers.  Basically, the 
headers are generated by the server to tell the client (browser) what to do.  If you 
send ANYTHING (even a hard return) before the header function is invoked then you will 
get this error.  In essence, if you are going to use the header() function without 
output buffering, then it should be just like this:

—--top of text editor

—-- End of text editor

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> "Tyler Durdin" <[EMAIL PROTECTED]> 07/26/02 11:21AM >>>

I already tried that and i got an error that said Cannot add header 
information - headers already sent by (another snippet of code I have in the 
page.

>Use the header() function
>
>http://www.php.net/manual/en/function.header.php 
>
*




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx 


-- 
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] adding Databases

2002-07-26 Thread Joel Lopez

Hi,

Right now my PHP is set up to use Postgresql.  I want to use MySQL now.  How
do I let PHP know that MySQL is now installed?

thanks,
Joel



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




Re: [PHP] Help: header function

2002-07-26 Thread Tech Support

>Kamesh's trouble was he was refering to something like http://mypage.php .
I figured it would save time to just get rid of the protocol and go
relative.

I'm aware of the spec for header, but I have always used a relative URI and
just about all the code I've seen uses relative also. I would be interested
to know of any possible problems as well. I suppose it would be good
practice to start using it correctly. I mean, even with trans-sid set to
"on" session ID's are never sent in header redirects or anything containing
a full URI anyway so it's not like it's going to mess anything up... unless
you moved your code from one site to another and hard coded your full URI in
all your header redirects... yikes!!. That's when a main config file would
come in real handy :-)

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Matt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 11:27 AM
Subject: Re: [PHP] Help: header function


> >From: "Tech Support" <[EMAIL PROTECTED]>
> > To: "k a m e s h" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> >Sent: Friday, July 26, 2002 11:20 AM
> >Subject: Re: [PHP] Help: header function
>
>
> > Try just header("Location: $PHP_SELF"); or header("Location:
> $SCRIPT_NAME")
> > ...leave out http:// ...and your quotes are in the wrong place too.
>
> I know that works but the spec for http/1.1 says it's supposed to have the
> absoluteURI including the scheme, and host,
> see http://www.php-faq.com/httpheaders.php#14.30.  Kamesh's trouble was he
> was refering to something like http://mypage.php -- which was missing the
> host name. I've coded lots of headers() with relative URIs [i.e.
> header('Location: mypage.php')] without trouble (at least that I know of).
> Has anyone run into trouble using only the page name?  Is this something
to
> worry about or not?
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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




[PHP] Re: How to check if a field is auto increment

2002-07-26 Thread Mathieu Dumoulin

Oh, and also, i need to know how to get the default value...

Btw, i CAN be done, or else, how does phpMyAdmin does it =P

InsaneCoder

>
> How can i check if a field has auto-increment extra activated on it?
>
> Thanks
>
>



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




[PHP] Re: PHP Meetup, how many of you have signed up?

2002-07-26 Thread Monty

> so with Guinness and bread, who needs to buy a meal? :-)

Ooof. I feel bloated just reading that. :)

Monty



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




Re: [PHP] sessions

2002-07-26 Thread Matthew K. Gold

re php info:

put this into a file, put it on your server, and call up the page in a
browser:



it will show the settings for php on your server.  As Jim suggested below,
you should check the register_globals setting.  If register_globals is on,
you'll need to use the _Get function.  see more on this by looking up
register_globals and _Get in the php manual at php.net

hth

matt

- Original Message -
From: Tyler Durdin <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 2:00 PM
Subject: Re: [PHP] sessions


> I don't know. Tell me where I would find it and I'll look  : -)
> Sorry, pretty new to all of this.
>
> >Do you have register globals off?
> >
> >Jim Grill
> >Support
> >Web-1 Hosting
> >http://www.web-1hosting.net
> >- Original Message -
> >From: "Tyler Durdin" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Friday, July 26, 2002 12:33 PM
> >Subject: [PHP] sessions
> >
> >
> > > I used this logout page using sessions a while ago and it used to work
> > > great, but now it doesn't work. The only thing i have changed is my
> >version
> > > of php. Can someone take a look and see what i have to change?
> > >
> > >  > > session_start();
> > >
> > > $old_user = $valid_user;
> > > $result = session_unregister("valid_user");
> > > session_destroy();
> > >
> > > ?>
> > >
> > > then a little further down i have this
> > >
> > >  > > if (!empty($old_user)) {
> > >  if ($result) {
> > > echo "Logged out.";
> > >  } else {
> > > echo "Could not log you out.";
> > >  }
> > > } else {
> > > echo "You have not logged in; therefore, you cannot logout.";
> > > }
> > > ?>
> > > It seems to log me out still, but it always gives me the "you have not
> > > logged in; therefor, you cannot logout" message. i also checked it
with
> >a
> > > script to see if my original sessions were actually registering and it
> > > seemed that they were. i am stumped. Any ideas would be greatly
> >appreciated.
> > > Thanks.
> > >
> > >
> > >
> > > _
> > > MSN Photos is the easiest way to share and print your photos:
> > > http://photos.msn.com/support/worldwide.aspx
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
>
>
>
>
> _
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] Re: Authentication session problem (php/server implementation?)

2002-07-26 Thread Richard Lynch

>I have a user authentication system using sessions
>it checks username and password against a database.
>if correct it sets a variable in the session cookie (via $_SESSION) and
>redirects to the protected page which checks for that variable.
>if the user/pass is wrong it redirects to an error page.
>if it gets to the protected page and the variable isnt set it redirects back
>to the login page.
>
>it works when uploaded to a server Linux, Apache/1.3.24, PHP 4.1.2.
>register_globals=on
>
>but on my local server Windows NT, Apache/2.0.39, PHP 4.2.1 using a patched
>Apache 2.0 Filter, register_globals=on. It seems to redirect back to the
>login page.

You CANNOT reliable set a cookie and re-direct in the same script.

Never gonna work across the board on browsers/servers.

Call it a "bug" if you like (though it's not) but it will NOT work reliably
on multiple platforms.

Re-design to just send the Cookie, and then include the page they wanted in
the first place.

Also, what's to stop me from setting my own Cookie?  Are you using an
un-guessable value for the Cookie?



-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: mail() function

2002-07-26 Thread Richard Lynch

>what has to be configured, and how, on a bsd server to allow the mail()
>function to work in php? using sendmail?

php.ini
Use the path to sendmail there, with the -t as suggested, and *YES* the
quotes *ARE* supposed to be part of it:

sendmail_path = "/path/to/sendmail -t"

You may also need to ease up restrictions in sendmail.conf so that the PHP
user is *allowed* to send out email, forge headers, and other fun things
that are pretty essential to making mail() useful.

You may also want to create a specific new user, different from the usual
"nobody", and use that for User in httpd.conf, so that PHP (all of Apache,
really) runs as 'www' or 'httpd' instead of 'nobody'

It will stop a few stupid people trying to abuse the lack of restriction on
email sending...

Not *really* much of a barrier, but every little bit helps.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




RE: [PHP] PHP / Apache 2.0.39 issues

2002-07-26 Thread Frank S. Kicenko

Yes I found it... thank you!

-Original Message-
From: Aaron Gould [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 26, 2002 9:56 AM
To: Frank S. Kicenko; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP / Apache 2.0.39 issues


Searching the list archives will reveal the answer.  I've answered this
exact question several times this past week...

--
Aaron Gould
[EMAIL PROTECTED]
Web Developer


- Original Message -
From: "Frank S. Kicenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 10:15 AM
Subject: [PHP] PHP / Apache 2.0.39 issues


Hello again..

I have another compile problem, I'm wondering if someone
can help me. I've built and installed Apache 2.0.39 and am recompiling
PHP4.2.2. Below are the details..

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib=/usr
--with-oci8=`dbhome`

Compiling...
Entering director '/php-4.2.2/sapi/apache2filter'
/bin/sh /php-4.2.2/libtool --silent --mode=compile gcc -I.
-I/php4.2.2/sapi/apache2filter -I/php4.2.2/main -I/php-4.2.2
-I/usr/local/apache2/include -I/php-4.2.2/Zend
-I/php-4.2.2/ext/mysql/libmysql
-I/export/home/oracleuser/OraHome1/rdbms/public
-I/export/home/oracleuser/OraHome1/rdbms/demo -I/php-4.2.2/ext/xml/expat
-D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
-I/php-4.2.2/TSRM -DTHREAD=1 -g -O2 -pthreads -DZTS -prefer-pic -c
php_functions.c
php_functions.c:93:27: missing binary operator before '('

This is the error...

Thanks all.

--
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] sessions

2002-07-26 Thread Pushkar Pradhan

Try removing the quotes in sessio_register ie. (valid_user2)
> Here is the code that starts and registers the session. It is  login page
> that logs in to itself so the form that produces $_POST["username"] is
> actually on the same page, but nothing happens until the user logs in. It
> there is something in this code that is not correct or making the other code
> from the previous mssages not work please let me know. Thanks again for all
> of the help.
>
>
>
>session_start();
>   $username = $_POST["username"];
>   $password = $_POST["password"];
>
>   if ($username && $password)
>   {
>   //user has just tried to login
>
>   $db_conn = mysql_connect("server", "user", "pass");
>   mysql_select_db("DB_name", $db_conn);
>   $query = "SELECT * FROM members WHERE username='$username'and
> password='$password'";
>   $result = mysql_query($query, $db_conn);
>   if (mysql_num_rows($result) >0 )
>   {
>   //if they are in the db register the username
>   $valid_user2 = $username;
>   session_register("valid_user2");
>   }
>   }
> ?>
>
>
>
> _
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-Pushkar S. Pradhan


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




[PHP] what do you wish you knew then now?

2002-07-26 Thread Peter J. Schoenster

Hi,

I'm still learning PHP. Against suggestions from most of this list I 
took the Brain Bench test and got in the Master category :) but even at 
RHIC I scored in the expert range on their test. It must be the 
similarity to Perl.

Anyhow, I was wondering (and I've asked this in a different way before) 
if some people with "experience" might suggest certain functions or 
classes etc. that you only encountered after perhaps writing it 
yourself. This happens a lot in Perl. Many Perl programmers will write 
a template system only to stumble upon the vast repository at CPAN 
afterwards. So I always tell new Perl programmers to search CPAN first. 

Allow me to show my ignorance. I use the following site to find stuff 
before writing myself:

http://www.phpclasses.org/

But I'm not using Pear for anything and never even look wherever it 
might be. I hope this is not like a Perl programming ignoring CPAN. Ah, 
I have it in my bookmarks here:

http://pear.php.net/manual/en/faq.php

I think this is the standard to follow for documenting code:

http://www.phpdoc.de/

When I installed PHP on my windows box I saw all the things I could do 
to the ini file. I much prefer to strict environment. I wrote a LOT of 
code that was not like it should have been. 

I would guess that if I wanted to follow an accepted coding standard 
this would be the one:

http://pear.php.net/manual/en/standards.php

And that's about it. I name files .inc or .cls or I use .php rather 
arbitrarily I must admit. Only .php files are returned to a client as 
that was brought up in a recent thread.

Any tips or suggestions very much appreciated. 

PLEASE NOTE. I know that of course I'm free to code however I want. I 
fully understand that. But having worked on websites where every 
programmer coded however they wanted ... well, I've become a fan of a 
standard outside of myself. No point in saying that I can do it however 
I want, that I know.


Peterhttp://www.coremodules.com/
Web Development and Support  at Affordable Prices
901-757-8322[EMAIL PROTECTED]




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




[PHP] Re: probelm : delete files using PHP

2002-07-26 Thread Richard Lynch
>Hi Gurus,
>
>I am using PHP 4.1.1, Postgresql 7.2  and Perl 5.6.0 on Linux.
>
>I want to delete files in a directory,which were created 15 days back.
>
>I can not do it, with PHP filesystem and directory functions, as PHP runs as
>"nobody" user.
>
>Can anybody pls. help me ?

Well...

There are several options:

1. Make the files be delete-able by "nobody"  This, of course, means *ANY*
other user on the system can delete them whenever they want to.

2. Use PHP (CGI) running under a cron job to delete the things that are
"old" or somehow marked for deletion by the web-page.  The cron job can be
schedule by a real user, and will have all their powers.  This is probably
"safest" and "easiest" of all the options.

3. Add another mime-type to httpd.conf and run a *second* PHP as CGI under
that mime-type (and filename extension) and then suExec that to run as the
owner of the files.  Once again, *anybody* who can use the mime-type can
then run as that user, so be sure you pin-point the (using httpd.conf
) this into a directory only *YOU* can put PHP scripts, or you
might as well just do 1.

4. Write a sudo shell script that allows *ONLY* the files in question
(either restricted by directory or name or something similar) to be deleted
by nobody.

There are probably more options...

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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


[PHP] Re: ldap_connect()

2002-07-26 Thread Richard Lynch

>I am new to using PHP on RedHat 7.3 and am running into a problem with
>ldap_connect().  When I attempt to run ldap_connect, I get the error:
>
>Call to undefined function: ldap_connect()

Even though you said "--with-ldap=shared" it just didn't "work"

You'll have to do ./configure again and figure out why LDAP didn't get in
there.

For starters, try losing the 'shared' crap.  It's just not that big a deal
to have it static -- Not worth pulling hair out anyway.

You can log your ./configure output better than usual using:

./configure ...  2&>1 > configure.output &

Then you can use:

tail -f configure.output

to see it scroll by, (control-C to quit)
or even:
less configure.output
to check it later.

>The system I am working on has the default install of Redhat 7.3 with Apache
>version "Apache/1.3.23".  It has been suggested to me that I need to
>recompile either PHP and/or Apache and am still quite new to this.  The PHP
>configure command is:
>
>'./configure' 'i386-redhat-linux' '--prefix=/usr' '--exec-prefix=/usr'
>'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
>'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
>'--libexecdir=/usr/libexec' '--localstatedir=/var'
>'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
>'--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc'
>'--enable-force-cgi-redirect' '--disable-debug' '--enable-dbg=shared'
>'--with-dbg-profiler' '--enable-pic' '--disable-rpath'
>'--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl'
>'--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
>'--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf'
>'--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv'
>'--with-jpeg-dir=/usr' '--with-mm' '--with-openssl' '--with-png'
>'--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr'
>'--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger'
>'--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
>'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
>'--enable-discard-path' '--enable-track-vars' '--enable-trans-sid'
>'--enable-yp' '--enable-wddx' '--without-oci8' '--with-imap=shared'
>'--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared'
>'--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr'
>'--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared'
>'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
>'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
>'--enable-mcal' '--enable-mbstring' '--enable-mbstr-enc-trans'
>'--with-apxs=/usr/sbin/apxs'


-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: PHP-GD and JPEG+PNG - Which versions is required?

2002-07-26 Thread Richard Lynch

>Hi,
>
>which version of libpng and libjpeg is needed to use the bundled libgd 
>in the current php tree.
>
>I using libpng 1.2.3 and php crashes with a segfault
>
>and with libjpeg62 (6b Mandrake RPM) in apache logs:
>
>gd-jpeg: JPEG library reports unrecoverable error: JPEG parameter struct 
>mismatch: library thinks size is 372, caller expects 376
>
>Hmmm, maybe the bundled gd has more bugs as the 'normal' 2.0.1 (Beta)
>Version?!

I'm not sure it matters so much *WHICH* version you use for those packages,
as it does that the version you tell PHP you are using matches the one
actually *IN* your system...

If you tell PHP you have libpng 1.2.3, and that's the headers it uses, but
your OS actually has 1.2.4 or 1.2.2, it's going to crash, almost for sure. 
The farther apart the versions, the more quickly you'll notice the crash. 
Very "close" versions might have only a couple functions out of sync that
will puke when you try to use them.

Uninstall all the damn RPM's, and install the tarballs.  Look inside the
libpng/jpeg directory and find the header files.  Do a "locate" on the ones
that seem pretty likely to have always been there for jpeg (eg "jpeg.h") and
make sure you don't have any copies of that in your /usr/.../include/
directories.  If you do, get rid of all the *.h files that came from the
jpeg library, *and* the libjpeg.so files in the parallel /usr/.../lib/
directory.  Then install from the tarball so that there is one, and only
one, libjpeg on your entire hard-drive.  Remember to do ldconfig after every
"make install"

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] mysql question

2002-07-26 Thread Christian Calloway

Sorry this may be a little offtopic, but I am currently moving a site I was
developing from coldfusion+MSAccess to PHP+MySQL. I remembered reading
somewhere that there is a utility that will convert/transfer (data and
structure) a MSAcess database to Mysql, and vice versa. Anyone know? Thanks

Chris



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




Re: [PHP] sessions

2002-07-26 Thread Tyler Durdin

Here is the code that starts and registers the session. It is  login page 
that logs in to itself so the form that produces $_POST["username"] is 
actually on the same page, but nothing happens until the user logs in. It 
there is something in this code that is not correct or making the other code 
from the previous mssages not work please let me know. Thanks again for all 
of the help.



0 )
{
//if they are in the db register the username
$valid_user2 = $username;
session_register("valid_user2");
}
}
?>



_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




[PHP] Re: Facing some problem with mySQL Installation

2002-07-26 Thread Richard Lynch

>I know I should not ask this question - but as I am not getting prompt 
>reply from mysql mailing list posting it here too - Just in case anybody 
>knows about it
>
>
>I am trying to install the mySQL on our remote server thr putty (SSH). 
>Following are the set of commands given by me,
>
>I have downloaded mysql-3.23 for BSDi.
>
>1)put into /usr/home/mysql-src directory and given following 2 commands 
>going into
>shell>cd  /usr/home/mysql-src
>shell>gunzip mysql-.tar.gz
>shell>tar xvf mysql-.tar
>
>This is creating the directory mysql-
>2)Config -
>
>shell>cd  /usr/home/mysql-src/mysql-
>shell>./configure -basedir=/usr/home/mysql -with-low-memory
>
>This command is giving me problem - saying - at the end
>shell>Starting mysqld daemon with database from 
>/usr/home/mysql-src/mysql-/data
>rm /tmp/mysql.sock - Operation not permitted
>mysqld end
>
>
>Can anybody help me in this matter - What is the meaning of it ?

There are TWO possibilities:
1. You already *HAVE* MySQL succesfully installed and running and now MySQL
is saying, "Excuse me, but this little /tmp/mysql.sock file is telling me
that I'm already running!"

2. You managed to crash MySQL so badly that it didn't clean up after itself,
and that /tmp/mysql.sock file is a BOGUS version of 1.

You can be *SURE* which is which by doing:

ps auxwww | grep mysql

Either you see some kind of 'mysqld' in there, in which case it's already
running, or you don't.

If it's *NOT* running, it's perfectly safe to just destroy the
/tmp/mysql.sock file.

If it *IS* running, do *NOT* remove that file -- You will cause yourself
major pains if you do.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] sessions

2002-07-26 Thread Tyler Durdin

I used this logout page using sessions a while ago and it used to work 
great, but now it doesn't work. The only thing i have changed is my version 
of php. Can someone take a look and see what i have to change?



then a little further down i have this

";
 } else {
echo "Could not log you out.";
 }
} else {
echo "You have not logged in; therefore, you cannot logout.";
}
?>
It seems to log me out still, but it always gives me the "you have not 
logged in; therefor, you cannot logout" message. i also checked it with a 
script to see if my original sessions were actually registering and it 
seemed that they were. i am stumped. Any ideas would be greatly appreciated. 
Thanks.



_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




RE: [PHP] Netscape 4.7 with php gd, very slow

2002-07-26 Thread Harry Yu

Both are running Apache.  I'm using the Windows
machine as a development box.  The web server and php
configuration are very close.


--- Bob Lockie <[EMAIL PROTECTED]> wrote:
> 
> >I have no problem with Netscape 4.7 when connecting
> to
> >Windows 2000 running the same script.  Also, I
> don't
> >have any nested tables in the html.  Any other
> ideas?
> >
> >Thanks,
> >Harry
> >
> >--- Bob Lockie <[EMAIL PROTECTED]> wrote:
> >> 
> >> >[snip]
> >> >I'm trying to generate dynamic buttons with text
> >> from mysql database.
> >> >Everything is fine except that the images are
> >> displaying very slow in
> >> >Netscape 4.7. Internet Explorer, Netscape 6 and
> >> Mozilla are very fast.  I'm
> >> >running Apache 1.3.26, PHP 4.2.2, GD 1.6.2 on
> >> Linux.  Also, I have the same
> >> >scripts running in Windows 2000 and I don't have
> >> this problem with Netscape.
> >> >The following are the scripts:
> >> >
> >> >Has anyone experience this problem before?  I'm
> not
> >> sure whether Apache,
> >> >PHP, or GD is causing this.
> >> >[/snip]
> >> >
> >> >I am running various browsers and have never
> seen
> >> this type of behavior. If
> >> >the same script is good in IE, NS6, and Moz
> could
> >> it be that there is
> >> >something with NS4.7? I have just tested IE6,
> NS6,
> >> Moz1.0, and NS4.7
> >> >accessing the same script on the same server and
> >> saw no problems (save for
> >> >NS4.7 barfing on some of the CSS).
> >> 
> >> Check the generated HTML.
> >> I think later browsers are more forgiving.
> >> Are you using tables?
> >> I think table rendering in NS4.7 was really slow.
> 
> What web servers are you using?
> Maybe they are returning different headers.
> 
> 
> 


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




[PHP] Logging: Best archive method

2002-07-26 Thread Julio Nobrega

  Hi all,

  I am serializing every get, post, cookie and server variables to log them. 
I was using mysql to store this data, but I've generated with 900 pageviews 
a 5 (five) MB table. Now I am using the bz2 extension to accomplish this, 
but I am not sure if it's the best method.

  Are there any better alternatives? I must log this data for every 
requested page since it's for a bank application (ever had the Central Bank 
of your country asking for log files? ;-)

  Thanks,

Julio Nobrega
http://gnet.inerciasensorial.com.br

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




Re: [PHP] Closing file pointer

2002-07-26 Thread Marek Kilimajer

The filepointer is closed after your script finishes executing, you 
cannot do it.

V_Suresh wrote:

>Hi All,
>   Suppose I'm opening a socket connection to a server on some
>port, and I do some transactions, and generate html. But I 'm not
>closing the file pointer(socket). Only after the user clicks 'logout'
>or something should I close the file pointer. How do I do this??
>I'm not understanding how to keep track of the file pointer,
>even after generating the html. Help.
>
>
>  
>



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




[PHP] invalid use of group function (mysql)

2002-07-26 Thread Alexander Ross

Why am I getting this error?  My statement is:

SELECT * FROM shots WHERE shot_num = MAX(shot_num) LIMIT 1;


There is one record in the table "shots".  Its shot_num value is 0.



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




[PHP] Re: mysql question

2002-07-26 Thread Julio Nobrega

Christian Calloway em Friday 26 July 2002 17:30 foi agraciado com uma 
resposta por:

> Sorry this may be a little offtopic, but I am currently moving a site I
> was developing from coldfusion+MSAccess to PHP+MySQL. I remembered reading
> somewhere that there is a utility that will convert/transfer (data and
> structure) a MSAcess database to Mysql, and vice versa. Anyone know?
> Thanks
> 
> Chris

  Yes, it's called DBTools. Google for it because it's easy to find.

-- 
--
http://gnet.inerciasensorial.com.br

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




Re: [PHP] (newbie) questions abot vars and args

2002-07-26 Thread Martin Clifford

1)  To echo the variables name instead of it's value, surround it instead by single 
quotes, not double.
   echo '$var' OUTPUTS $var
   echo "$var" OUTPUTS the contents of $var

2)  Checkout the func_get_args() function.
   http://www.php.net/manual/en/function.func-get-args.php

HTH!

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> "Alexander Ross" <[EMAIL PROTECTED]> 07/26/02 11:40AM >>>
1)  Given a variable how can I echo the var's name, not its value??
2)  Is there a way for PHP function to handle a dynamic number of arguments?
In other words, I want to write a function that takes any number of
arguments (strings) and echos each of them with a  appended to each of
them.

Thanks for your help everybody



-- 
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] sessions

2002-07-26 Thread Tyler Durdin

yes they are off. I did just recently discover this whole form thing, but i 
did not know about the session variables. I put the session registration 
code up in another post, if you would not mind looking at that and 
recommending changes. in the mean time I'll try and get up to speed on the 
new stuff. I really appreciate the help.

>If you upgraded to the new version and overwrote your old php.ini file then
>they are off.
>
>If you have access to the php.ini file you can open it and search for
>"register_globals" and see if it is set to On or Off. If you do not have
>access to the php.ini you can use :
>
>$reg_glob = get_cfg_var("register_globals");
>print "$reg_glob";
>
>I think it will display a 1 for on and a 0 for off.
>
>If they are off you can either get used to the new, more secure way of 
>doing
>things, or you can turn them back on in the php.ini file or in a .htaccess
>file in your directory. If you choose the .htaccess method you only need to
>add the following line to your .htaccess file:
>
>php_flag register_globals on
>
>If you decide to use the new, more secure method session vars will be in 
>one
>of two new global arrays:
>
>$_SESSION --OR-- $HTTP_SESSION_VARS
>  more info about that can be found here:
>http://www.php.net/manual/en/ref.session.php
>
>So, in your case, $valid_user would become $_SESSION['valid_user'] or
>$HTTP_SESSION_VARS['valid_user'].
>
>With register globals set to off you will find that forms will no longer
>work the way you think.
>example:
>
>if you had a form with   in it and you
>submitted it on the next page you would expect that $var would be "testing"
>but it is not! Now you must use either $_POST['var'] for form method=post
>and for query strings in URL's or method=get forms you would use
>$_GET['var']
>
>If you have any more questions I'll help you out.




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




[PHP] Re: timing header("Location: " )

2002-07-26 Thread Richard Lynch

>Is it possible to make the browser wait say, 5 seconds before redirection by
>outputting headers?  I know you can do it with meta tags but not how by
>outputting headers

The header version pretty much hits the browser long before your HTML, and
then the browser will immediately move to the new location, and, in fact,
PHP probably won't even bother to send your HTML since, what's the point?
now that all the browsers are supporting the re-location header.

In short -- No, you can't do that with headers.  If you want that 5-second
"flash" of a page, stick with META tags.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: PHP Meetup, how many of you have signed up?

2002-07-26 Thread Richard Lynch

>Top 10 Locales --
>Washington DC (9 members)
>Amsterdam (7 members)
>Leeds, UK (7 members)
>London, England (7 members)
>Atlanta (5 members)
>Manhattan (below 42nd St) (5 members)
>Melbourne (5 members)
>Oakland-Alameda, CA (4 members)
>Nashville, TN (4 members)
>St. Louis, MO (4 members)
>
>I am somewhat surprised that there are no more developers in Texas signed
>up. In my area it would just be me and one other. I was hoping to get to see
>enough to start a users group. There is only a total of 268 signed up
>world-wide.

People who are in areas with active PHP User Groups may well have opted to
skip meetup...

I signed up, if only to be sure any event was informed of the existing user
groups, but I dunno that I really expect a Chicago event to happen when we
already meet monthly, no twice monthly now anyway...

But hey, I'm not opposed to a more informal gathering.

Went to the slashdot one last night, and had a nice time, though it was in a
much too expensive (Guinness $6 Martini $10) joint, but the bread and oil
was free, so with Guinness and bread, who needs to buy a meal? :-)

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: Sessions, how they exist and die

2002-07-26 Thread Richard Lynch

>My question is, if I have a user on my web site, and they leave and come
>back does their session still exist? the file in the /tmp folder exists
>until it is deleted by the OS? If the user comes back will they get
>assigned the same session they had before? I know the questions are
>pretty newbish but I have had experiences in other languages in the past
>where this is the case. The session cookie stayed in the users browser,
>so they kept getting the same session and not a new session if they left
>and came back a day later.

Depends what you did in php.ini

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] How can I get my session variable to pass to another page?

2002-07-26 Thread DonPro

Hi,

I have a form that calls a PHP script which sets a session variable and
redirects to anopther URL as such:

session_start();
$HTTP_SESSION_VARS['userid'] = "someidnumber";
Header('Location: ' . 'http://www.mydomain.com/welcome.html');

On welcome.html, I have the following code:


echo 'userid: ' . $HTTP_SESSION_VARS['userid'] . '
'; When I run it in my browser, the value of 'userid' is empty. Anyone know why? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Installed PHP on home Win98se, now how can I get browser to see it?

2002-07-26 Thread JJ Harrison

If you got it installed.

insert a script called php_info.php on the companies webserver.

here is it's contents:


That will give you lots of info about the configuration of PHP.

do the same thing on your PC.

if they are differant:

Use windows explorer/my computer to browse to C:\WINDOWS\

then find a file in that directory called php.ini.

Check the settings against the ones shown with php info.

change them to the isp/companies config.


--
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com

"Marcus Unlimited" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I just installed the nice and easy one click PHP install to my Windows
> 98se machine.
>
> I just want to be able to test and practice My basic PHP /MySQL stuff
> without up loading.
>
> So now what do I do.
>
> I ran the php info scripts and got bunch of weird messages.
>
> How do I get the PHP to work in my browsers IE, NN just as it does when
> uploaded to my hosting co's servers?
>
> Thanks,
> -Marcus
>
> --
>

||
>
> Marcus Unlimited
> http://marcusunlimited.com
> Multimedia Internet Design and Education
>

||
>
> ---
> Also visit:
> -  http://www.chromaticus.com
> -  http://ampcast.com/chromaticus
>
>



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




RE: [PHP] php redirect

2002-07-26 Thread David Buerer

I here ya' there Martin.

ASP is about next on my list. I'm just trying to get javascript and PHP
under my belt a little better firstwell ok, I'm waiting for my next
paying client. I've found that you do have to use what you know to know
whatever you need to do.  I couldn't live without Javascript+PHP+SQL when it
comes to site design.  ASP is next on my list.

-Original Message-
From: Martin Clifford [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 26, 2002 8:41 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP] php redirect


>>I don't know if and haven't learned it so it couldn't be.  After all, 
>>how
many programming languages does one need to know??<<

Heh heh heh.  Jack of all trades, master of some.  That's how I look at it.
I'd say you need to know a little of everything.  I know (X)HTML, CSS-1-2-P,
JS, PHP, SQL, etc.  The list just goes on.  And the thing is, I use ALL of
them ALL the time ;o)


-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 26, 2002 8:27 AM
To: 'David Buerer'; [EMAIL PROTECTED] 
Subject: RE: [PHP] php redirect


[snip]
This is the only way I've figured out how to do it.  It seems to work really
well.

if (mysql_db_query ($dbname, $query, $link)) {
  gotourl("myurl1");}
} else {
 gorourl("myurl2");}

function gotourl(myurl)
{
  echo "";
  echo "  window.location=$myurl;";
  echo "\n";
}
[/snip]

Isn't this ASP? ;^]

Jay

My other car is a broom

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*


Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/




Re: [PHP] Help: header function

2002-07-26 Thread Tech Support

Try just header("Location: $PHP_SELF"); or header("Location: $SCRIPT_NAME")
...leave out http:// ...and your quotes are in the wrong place too.

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "k a m e s h" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 2:56 AM
Subject: [PHP] Help: header function


> Hi:
>
> After validating the login, i am  using the header function to call the
same
> page again. The page uses session_start(). But the session variable,
> namely the login id is not changed. When i refresh the page manually
> session variable is changed. What is the problem? the header function i
> use is header(location:"http://PHP_SELF";)
>
> regards
> kamesh
>
>   _
>   s kameshwaran
>  eEL, Dept of CSA, IISc, Bangalore - 560012
>Homepage: http://www2.csa.iisc.ernet.in/~kameshn
>  Phone: +91-80-3942368-111 (Lab), +91-80-3942624 (Hostel: U-95)
>  
>  Eternity abides in the present.. NOW
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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




Re: [PHP] mysql question

2002-07-26 Thread Tech Support

Congrats! Good choice!

Take a look here:
http://www.convert-in.com/acc2sql.htm
or here:
http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=convert+access+databa
se+to+mysql

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Christian Calloway" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 3:30 PM
Subject: [PHP] mysql question


> Sorry this may be a little offtopic, but I am currently moving a site I
was
> developing from coldfusion+MSAccess to PHP+MySQL. I remembered reading
> somewhere that there is a utility that will convert/transfer (data and
> structure) a MSAcess database to Mysql, and vice versa. Anyone know?
Thanks
>
> Chris
>
>
>
> --
> 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] Re: sessions

2002-07-26 Thread Andrey Hristov

unset($_SESSION['variavble']);
 

Andrey


- Original Message - 
From: "Tyler Durdin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 10:14 PM
Subject: Re: [PHP] Re: sessions


> So doing it the new way ($_SESSION['variable']) how do you close or 
> unregister a session?
> 
> 
> 
> 
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


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




Re: [PHP] Sorry for another newbie PHP and Apache 2.0.39 question..

2002-07-26 Thread Bob Lockie

On Fri, 26 Jul 2002 12:24:31 -0500, Frank S. Kicenko wrote:

>Ugg.. been compiling and configuring for too many days..everything is
>just a fog..:-) I appreciate all the help here.. but I'm afraid I need a
>little more.. :-)
>
>I can't seem to get Apache to recognize PHP... The logs state:
>[notice] Apache/2.0.39 (Unix) PHP/4.2.2 configured -- resuming normal
>operations
>
>however I can't get the php's to display.
>
>I have the following in the httpd.conf file;
>
>AddType application/x-httpd-php .php
>LoadModule php4_modulemodules/libphp4.so
>
>All other "html" pages view properly...Is there anything special I need
>in php.ini? There are no extensions stated in the ini..?? and PHP didn't
>build any other than the zlib stuff. Should I have extensions or are
>they in the libphp4.so library? I have set all the include paths in the
>ini properly..(i believe anyway)
>
>Is php suppose to run at all... I do a "ps -ef | grep php" and it is
>never running...

http://www.delouw.ch/linux/apache.phtml
http://www.delouw.ch/linux/Apache-Compile-HOWTO/html/php.html

uncomment (remove the # at begin of line) the following lines in 
/usr/local/apache/conf/httpd.conf

Apache 1.3.26 default httpd.conf does lack of this entries. You have to add them 
instead of uncommenting

AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps

Since PHP Version 4.2.1, »register_globals« are set OFF. This can bring you in 
problems running PHP-Code not using the $HTTP_GET_VARS methods. To enable 
register_globals edit the
following line in your /usr/local/lib/php.ini:

register_globals = On




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




[PHP] Re: The page before for newman.

2002-07-26 Thread Richard Lynch

>I'm looking for the global veriable that lists the page before the page that
>i just came from.  Anyone know what i'm talking about?



will tell you what you want to know.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] imagettftext, GD2, and Freetype

2002-07-26 Thread Sean Coates

Hello, I'm playing with imagettftext:

http://sean.caedmon.net/ttf_example.php?text=PHP

This works fine with some fonts, and not fine with others:

http://sean.caedmon.net/ttf_example.php?text=PHP&font=a

The (broken) font in question is available at:

http://sean.caedmon.net/new/fonts/TRIACSEV.TTF

I read that this might be because of a non-unicode font..

how can I check this?
is there a way to unicode-ify a font? (-:

Thanks,
S


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




Re: [PHP] Possible to have optional values in function?

2002-07-26 Thread JJ Harrison

I just realised why my search returned nothing.

I was searching the function list instead of the whole site :}

Sorry :(


--
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Friday 26 July 2002 23:33, Tech Support wrote:
> > Don't waist everyone's time with this b.s. ...either you can help or you
> > cannot.
>
> Jeez. How do you like your help to be given to to?
>
> By saying 'rftm' that is not helping? It's blindingly obvious from the
> question that the section of the manual to look up would be the chapter on
> functions.
>
> So to be helpful I should go and copy-paste bits of the manual in my
reply?
>
> > Use "rtfm" sparingly. Treat it as a last resort; a secret weapon.
Reserve
> > it for people who ask really dumb questions like "how do I use
sessions",
> > or "how do I use mysql", or something general like that, when you know
damn
> > well they have not even tried to find out anything on their own.
>
> A substantial number of questions to this list can/should be answered with
> 'rtfm'. Only recently someone said "why read the manual when it's quicker
to
> ask the list and have some sucker do my homework for me" (or words to that
> effect).
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Banectomy, n.:
> The removal of bruises on a banana.
> -- Rich Hall, "Sniglets"
> */
>



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




Re: [PHP] Paying Job...

2002-07-26 Thread Matt

> From: "Gerard Samuel" <[EMAIL PROTECTED]>
> Sent: Friday, July 26, 2002 1:07 PM
> Subject: Re: [PHP] Paying Job...
> Someone posted a link to template contracts yesterday, but I cannot find
> it in the mailing list archive.

>> Bret
>> Find a contractor or find a contract at Tech-Temp.com
^^
I think this is what you were referring to but it's for finding contract
work, and not a legal contract.

>> Jay Blanchard had said:
>> d. HAVE A CONTRACT There are many good examples on the web.

That's about it.





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




[PHP] Re: pulling records from mysql

2002-07-26 Thread Richard Lynch

>I have a column in my table named firstname with twenty records in it. How 
>can i use php to pull out individual records (say for ex. record 16)? Also, 

select firstname from blah
where id = 16

>how could i pull out all records upto number 15? Thanks in advance.

select firstname from blah
where id < 16

or, more likely what you should be using:

select firstname from blah
limit 1, 15

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: 'Previous' 1, 2, 3, 4, etc. 'Next'

2002-07-26 Thread Richard Lynch

>// Set the limit per page   
>$sql_text = $sql_text . " LIMIT $start, $maxresult";

echo $sql_text;


>$result2 = mysql_query($sql_text);

if (!$result2){
  echo mysql_error();
}

>
>// The navigation between pages

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: New way to make select boxes auto select

2002-07-26 Thread Richard Lynch

>You may already be doing it like this, but I think I found a new way to
>make select boxes auto-select (what data they put in) a lot easier. All you
>have to do is put a variable in each select tag that is equal to the value
>of the select option i.e.:  -- then all you
>have to do is base the variable on that  $$interest =
>"selected"; quick and easy with out having to loop through an if elseif
>statement.  Let me know if you like that method or have any objections.

Since I'm always looping through choices in my database, and not hard-coded
values, it's really no trouble to do:

while ($id = ...){
  $selected = $id == $previously_selected_id ? 'SELECTED' : '';
  echo "...\n";
}

If I *really* want hard-coded options, I'll just put them in an array and do
the above.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: mySQL Queries using PHP's SESSION variables

2002-07-26 Thread Richard Lynch

>Hello, I am stuck here. In the name of efficiency I want to lower the number
>of callls to the database. So I am trying to give the most stringent query
>possible. This is the problem: I have stored the surfers shopping cart,
>where each item is stored as a session variable.Now on the database I have
>ALL inventory items, but I want to only display the details of what the user
>has in his cart.
>eg. : I want something like this:
>
>$result = mysql_query("SELECT * from Inventory where ItemNumber is in
>$HTTP_SESSION_VARS");
>//  I need proper syntax to replace "is in"
>
>where Inventory has, ItemNumber (unique), Price, ItemName.
>So say the surfer has three items in the Session, then I stored the three
>unique ItemNumbers.
>Then with the above query I can get the rest of the information to represent
>to the user.
>I am looking down the avenues of a Set datastyp or maybe Enum, but I don't
>know if it will help.


create table cart(
  session_id char(32),
  item_id int
);

Then, if I have item #42, #57, and #314, there will be 3 rows in this table
for me:

adsfqweradfzxcvasdfqwer 42
adsfqweradfzxcvasdfqwer 57
adsfqweradfzxcvasdfqwer 314

So you can just:

select item_id from cart where session_id = $PHPSESSID

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] php 4.2.2 on redhat 7.3

2002-07-26 Thread Fifield, Mike

I am trying to figure out how to upgrade php from 4.1.2 (which is the
default that comes with redhat 7.3), to version 4.2.2. From the small amount
of documentation I have been able to find on the subject, it looks like I
need to download a rpm. Is this the best way to do it or would it be better
to try to use the install files off of php.net, and if the php.net install
files are the way to go, how would I go about installing them over the
current copy of php. I know this may not be the proper list for this
question but I am also sending this email to the redhat list in hopes that
someone from one of these two lists can point me in the right direction. 
 
Thanks in advance for any help. 
 
 
Mike Fifield
Charles Schwab & Co, Inc.
WARNING: All e-mail sent to or from this address will be received by the
Charles Schwab corporate e-mail system and is subject to archival and review
by someone other than the recipient.
 



[PHP] Re: Implement PHP within a string

2002-07-26 Thread Richard Lynch

>Is it possible to run PHP that is embedded within a string?  I have a file
>that is read into a string and returned to the browser, how can I run that
>PHP?

http://php.net/eval

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] exec() not working in one script...

2002-07-26 Thread Jay Blanchard

Frustrating!

I have scripts that do this exact thing, on this exact server, for that
matter in this exact set of directories, now it will not work;

$filename = "NIIRTQWCDR." .  date("Ymd") . "." . $cycle;

//open new file and write records to it
$cdrfile = fopen("/usr/local/www/data.default/rcr/" . $filename, "w+");
while($cdrrow = mysql_fetch_object($dbcdr)){
fputs($cdrfile, $cdrrow->whole_record);
}
fclose($cdrfile);
//move file into outgoing directory
exec("mv /usr/local/www/data.default/rcr/$filename
/usr/local/www/data.default/rcr/outgoing/$filename");

The file gets created just fine, gets populated just fine, it just will not
move. *g*

Jay

My mind not only wanders, sometimes it leaves completely

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*



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




Re: [PHP] adding Databases

2002-07-26 Thread Gurhan Ozen

You don't let PHP know that it is installed. You just have to make sure that
PHP is supporting mysql functions (compiled with mysql support) and start
using mysql function.. Check out what phpinfo() prints , whether or not
there is mysql related info in its output..
Gurhan

"Joel Lopez" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> Right now my PHP is set up to use Postgresql.  I want to use MySQL now.
How
> do I let PHP know that MySQL is now installed?
>
> thanks,
> Joel
>
>
>
> --
> 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] Close A Databse Connection

2002-07-26 Thread Andrew Hill

+1 right.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Virtuoso Universal Server

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 26, 2002 2:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Close A Databse Connection

Well, it's Friday afternoon and the pre-pub run debates have started :^]

The choice of arguement today is born of the fact that I advised a
newbie to
always use mysql_close() to close the connection to the database. It's
good
form and will cover any ills where the database connection fails to
close
for some other reason (say the user stops the page from loading after
the
connection is made). I know that it is not required, but always being
competitive I thought I would turn to the group for a concensus, whether
I
am right or wrong.

Thoughts?

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] still on sessions

2002-07-26 Thread Martin Clifford

I always just register an extra variable to track logged in users.  If the user has 
logged in, it is set to TRUE, if not, FALSE.  Then I just do comparisons on that 
variable.



Something along those lines.



>>> "Tyler Durdin" <[EMAIL PROTECTED]> 07/26/02 03:28PM >>>
alrigh I have switched everything over to the $_Session['variable'] style of 
session. Next question, I have a little script that used to check if the 
session was registered and if it was not it would redirect to the login 
page. How do i accomplish this now that i cannot check if the session is 
registered? Here is what i have.

http://loginpage.com";);
  }
?>

How do I check if a session is active/registered or whatever it is so i cn 
still redirect or assign variables?



_
Join the world's largest e-mail service with MSN Hotmail. 
http://www.hotmail.com 


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



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




RE: [PHP] php redirect

2002-07-26 Thread Tyler Durdin


I already tried that and i got an error that said Cannot add header 
information - headers already sent by (another snippet of code I have in the 
page.

>Use the header() function
>
>http://www.php.net/manual/en/function.header.php
>
*




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




[PHP] Re: Help! mysql problem

2002-07-26 Thread Richard Lynch

>Hi there, I've got a quick question concerning PHP and mySQL.  I've got a 
>fresh server with recent versions of Red Hat Linux, mySQL, PHP and apache.  
>My problem is that when I call mysql_pconnect, my PHP code hangs and 
>doesn't proceed.  I can't check mysql_error because it doesn't go beyond 
>this point.  I know that mysql is running and the PHP code prior to this 
>statement works just fine.  The mysql account is operating correctly from 
>the prompt and I'm using all of the default values for PHP and mysql 
>config.  Has anybody had this problem before and can somebody please offer 
>me some suggestions?  Thank you!!!

Can you get it to work with just mysql_connect?

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




[PHP] Re: unset array here?

2002-07-26 Thread Richard Lynch

>Hello,
>
>I have this  example code:
>function doprint($a){foreach($a as $value)echo $value;}
>doprint(array('1','test','hello','and'));
>
>Question, is the array in memory after the function call?
>So, should it be better to use this:
>
>function doprint($a){foreach($a as $value)echo $value;}
>doprint($temp=array('1','test','hello','and'));
>unset($temp);

PHP 4 is very aggressive about reclaiming memory.

Don't bother with the unset, unless your array is *HUGE* and you really need
it gone immediately...  Even then, I suspect you won't find any difference.

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

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




Re: [PHP] sessions

2002-07-26 Thread Tyler Durdin

I don't know. Tell me where I would find it and I'll look  : -)
Sorry, pretty new to all of this.

>Do you have register globals off?
>
>Jim Grill
>Support
>Web-1 Hosting
>http://www.web-1hosting.net
>- Original Message -
>From: "Tyler Durdin" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, July 26, 2002 12:33 PM
>Subject: [PHP] sessions
>
>
> > I used this logout page using sessions a while ago and it used to work
> > great, but now it doesn't work. The only thing i have changed is my
>version
> > of php. Can someone take a look and see what i have to change?
> >
> >  > session_start();
> >
> > $old_user = $valid_user;
> > $result = session_unregister("valid_user");
> > session_destroy();
> >
> > ?>
> >
> > then a little further down i have this
> >
> >  > if (!empty($old_user)) {
> >  if ($result) {
> > echo "Logged out.";
> >  } else {
> > echo "Could not log you out.";
> >  }
> > } else {
> > echo "You have not logged in; therefore, you cannot logout.";
> > }
> > ?>
> > It seems to log me out still, but it always gives me the "you have not
> > logged in; therefor, you cannot logout" message. i also checked it with 
>a
> > script to see if my original sessions were actually registering and it
> > seemed that they were. i am stumped. Any ideas would be greatly
>appreciated.
> > Thanks.
> >
> >
> >
> > _
> > MSN Photos is the easiest way to share and print your photos:
> > http://photos.msn.com/support/worldwide.aspx
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




RE: [PHP] php redirect

2002-07-26 Thread Jay Blanchard

[snip]
Learning about HTTP protocol helps a LOT with understanding headers.
Basically, the headers are generated by the server to tell the client
(browser) what to do.  If you send ANYTHING (even a hard return) before the
header function is invoked then you will get this error.  In essence, if you
are going to use the header() function without output buffering, then it
should be just like this:
[/snip]

As said before you can use Output Buffering to prevent this;

http://www.php.net/manual/en/function.ob-start.php

HTH!

Jay

p.s. Martin, did you figure out how to do the random quote mail tag? Maybe
we should have a contest

Keep the Earth clean.it's not Uranus!

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*



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




RE: [PHP] php redirect

2002-07-26 Thread David Buerer

What's ASP

I don't know if and haven't learned it so it couldn't be.  After all, how
many programming languages does one need to know??


-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 26, 2002 8:27 AM
To: 'David Buerer'; [EMAIL PROTECTED]
Subject: RE: [PHP] php redirect


[snip]
This is the only way I've figured out how to do it.  It seems to work really
well.

if (mysql_db_query ($dbname, $query, $link)) {
  gotourl("myurl1");}
} else {
 gorourl("myurl2");}

function gotourl(myurl)
{
  echo "";
  echo "  window.location=$myurl;";
  echo "\n";
}
[/snip]

Isn't this ASP? ;^]

Jay

My other car is a broom

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*




Re: [PHP] Re: How to check if a field is auto increment

2002-07-26 Thread Justin French

on 26/07/02 10:50 PM, Mathieu Dumoulin ([EMAIL PROTECTED]) wrote:

> Oh, and also, i need to know how to get the default value...
> 
> Btw, i CAN be done, or else, how does phpMyAdmin does it =P

Well then look at the source code of phpMyAdmin :P

Justin


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




[PHP] [Getting OT] Re: [PHP] php redirect

2002-07-26 Thread Chris Garaffa

On Friday, July 26, 2002, at 11:32 AM, David Buerer wrote:
> ASP is about next on my list. I'm just trying to get javascript and PHP
> under my belt a little better firstwell ok, I'm waiting for my next
> paying client. I've found that you do have to use what you know to know
> whatever you need to do.  I couldn't live without Javascript+PHP+SQL 
> when it
> comes to site design.  ASP is next on my list.

Good luck. I had a summer job once (would've been longer if my boss 
didn't spend all the company money and had to shut the company down) 
where we used ASP for all our dynamic pages. It's a joke. You go (back) 
to using dim statements and VBScript! Of course you can use JScript, but 
that's even more difficult at times. Connecting to a server? There are 
methods, but error reporting is not ASP's best feature.
IMHO, stick with PHP, maybe a bit of Perl, but anything you can do in 
ASP you can do better in PHP.

c.


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




[PHP] pg_pconnect() question

2002-07-26 Thread Varsha Agarwal

I am trying to connect to postgre_sql database using
pg_pconnect(). When I try to run it i get the
following error
Warning: Unable to connect to PostgreSQL server: FATAL
1: IDENT authentication failed for user "postgres" in
/var/www/html/test.php on line 3
connection failed 

Please tell me what might be the reason.
-Varsha

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




  1   2   >