Re: [PHP] Hosting provider...

2002-01-01 Thread Kurt Lieber

On Tuesday 01 January 2002 04:19 pm, Matt Moreton wrote:
> Can anyone here suggest a good provider that meets the above criteria?

Asked and answered about 4 billion times in the archives.  Might check there.

--kurt

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




Re: [PHP] *** I want a swanky icon in the address bar, like major sites (e.g. php.net, google.com)...

2001-10-22 Thread Kurt Lieber

Um...this isn't php related and I already get a ton of emailcould we keep 
things on-topic?

that said, check out www.favicon.com -- it should have the info you need.

--kurt

On Monday 22 October 2001 11:37, you wrote:
> Anyone out there know how to set the icon that is shown in the address bar,
> to the left of the URL?
>

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




Re: [PHP] web base mail client???

2001-10-23 Thread Kurt Lieber

I would say this comes in a close second as the "most oft-asked question on 
php-general", with the first, of course, being "What's a good text editor for 
PHP?"

So, couple of suggestions:

1.  Search the archives.  You'll find a ton of information there.
2.  Check out squirrelmail.org

--kurt

On Tuesday 23 October 2001 09:49, Christian wrote:
> Hello :c)
>
> Any one know a good prebuild php web base mail
> client that runs on win and linux server??? (not using any DB)
>
> Thanks
> Chrisrtian

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




Re: [PHP] How to protect MySQL password

2001-10-23 Thread Kurt Lieber

On Tuesday 23 October 2001 11:13, Andy wrote:

> Problem is, that I cannot see any solution to protect the value of $sDBpsw.
> Of course I wont set the value of $sDBpsw in the same PHP script. I do
> that including a file pa/pa.php (protected area) but this file also has to
> have read access to all users and could be read with fopen( "URL", "r" ).

You need to use a program such as php-cgiwrap to "wrap" the script so it can 
be called using your user credentials.  Then, you can chmod the file to 700 
and it will be protected.  Downside; you have to use the cgi version of PHP, 
rather than the apache module.

--kurt

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




Re: [PHP] How to protect MySQL password

2001-10-23 Thread Kurt Lieber

On Tuesday 23 October 2001 11:20, Matt Williams wrote:
> Move it outside the document root
>
> or put a .htaccess file inside the dir to deny access. This will still
> allow system access but will prevent other fopen.

Either solution still allows anyone with shell access to the machine to read 
your password.  Not an ideal solution for shared hosting environments, but if 
you're running your own server, it's a great solution.

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




Re: [PHP] How to protect MySQL password

2001-10-23 Thread Kurt Lieber

On Tuesday 23 October 2001 12:29, Chris Lee wrote:
> I use proftpd, I can setup a chroot for the user that logs in, chroot them
> to their vhosts dir, move the mysql passwd file out of that dir. now anyone
> that ftp's in can not read the passwd. as for telnet (shell) access, its
> rare a user needs that anyhow, if you feel your customers do need that,
> well its your choice to offer them the security risk or not. I just tell
> our customers, "sorry, nope, to big of a security risk.", I have yet to
> have one complain so badly they switch hosting services.

Sorry -- but you're wrong.  If you've got php loaded as an apache module in a 
shared hosting environment, then any file that apache can read, I can gain 
access to through a simple FTP account and a well-constructed php file using 
fopen().  Doesn't matter if that file resides within my vhosts dir or not.  I 
may have to guess at the path a bit, but that's fairly trivial.  The only way 
to protect a file in a shared hosting environment is to use something similar 
to php-cgiwrap which allows you to chmod the file to remove group/world read 
access.   (If someone knows of another way to do this using the apache php 
module, please let me (and my ISP) know)

Regarding shell access being a "security risk", ssh is far, far more secure 
than FTP can ever hope to be.

This is straying off-topic, so we should probably take further discussions 
offline.  Feel free to email me directly if you have questions/disagreements.

--kurt

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




Re: [PHP] How to protect MySQL password

2001-10-24 Thread Kurt Lieber

On Wednesday 24 October 2001 00:30, you wrote:
> What we
> really need is an expert here to give us the low-down on the best way to
> accomplish the best security given regular tools.

There isn't a way to solve it within the constraints you've mentioned (shared 
server at a hosting provider, apache, php-as-a-module)  If apache has read 
access on a file, which it has to have in order to serve it, someone else can 
get to that file via a PHP/Perl/C/whatever script/program.  Yes, you can use 
a server that has php safe_mode enabled, but that doesn't mean your scripts 
are safe -- it just means they're safe from being exploited by other php 
scripts.

So, the only way to secure your PHP scripts from prying eyes (in a shared 
environment) is to upload them with group/world read permissions removed 
(i.e. chmod 700 or 600) But then Apache can't read that file either.  That's 
where php-cgiwrap comes into play as it acts as an interface between apache 
and your chmodded 600 file.

Basically, if you're on a shared server, you're either going to be buddies 
with your fellow users and trust them, or you're going to use something like 
php-cgiwrap which allows you to remove group/world read permissions and still 
 let apache read the file.

And, if security is *that* important to you, then you can, of course, use a 
dedicated server.  Then you don't have to worry about other users.

--kurt




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




Re: [PHP] MKDIR Permission Denied

2001-10-25 Thread Kurt Lieber

On Thursday 25 October 2001 10:08, you wrote:
>  $GalleryPHPName = "Pins";
> mkdir ("../$GalleryPHPName", "0775");
> ?>
>
> Results in...
>
> MkDir failed (Permission denied)

When you use a file-related command (fopen, mkdir, etc.) you're executing 
that command under the same user-context that apache runs under. (usually 
"nobody" on shared servers)  So, you need to make sure that user "nobody" has 
write permissions on the parent directory where you're trying to create your 
directory.

--kurt

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




Re: [PHP] MKDIR Permission Denied

2001-10-25 Thread Kurt Lieber

On Thursday 25 October 2001 11:41, you wrote:
> How do I set permissions for a certain user (ie nobody) for a directory?
> If I do this, won't anyone on teh server be able to write to that
> directory?

If you're going to start messing around with *nix permissions, you really, 
really need to have a basic understanding of how they work.  Otherwise, you 
can get into a lot of trouble really quickly.  There's a ton of tutorials 
around the net; here's one that I've found helpful in the past:

http://www.linuxdoc.org/HOWTO/Security-HOWTO-5.html
(it's part of a larger linux security HOWTO)

As for your second question, yes.  That's one of the side-effects of using a 
shared server.

--kurt

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




[PHP] while() looping over query results twice?

2001-10-25 Thread Kurt Lieber

I'm executing a query that returns some a UID and a company name.  I'm using 
the following code to loop over that query result set:

$result = mysql_query($myQuery) //$myQuery gets defined earlier
$resultCount = mysql_num_rows($result);
$companyID = array();
while($query_data = mysql_fetch_row($result)) {
$companyID[$query_data[0]] = $query_data[1];
$companyID_string .= "," . $query_data[0];
$companyName_string .= "," . $query_data[1];
}

I've used $resultCount to verify the query is returning 4 rows.  However, the 
while loop above is looping over the results twice -- $companyID_string and 
$companyName_string each have 8 values.  Looking at the values shows that 
it's the 4 rows duplicated.

What the heck am I doing wrong?

--kurt

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




Re: [PHP] while() looping over query results twice?

2001-10-25 Thread Kurt Lieber

OK, so I defined the variables before using them and that solved the problem. 
 (Thanks!)

I'm still curious as to why not defining them ahead of time would cause the 
data within each string to get duplicated.  In other words, if the query 
results are "a,b,c,d", then by not defining the variable ahead of time 
produces "a,b,c,d,a,b,c,d" which is weird.

At this point, my problem is solved, so this is more of an academic question 
than anything.

Thanks for the help.

--kurt

On Thursday 25 October 2001 13:03, Jim Lucas wrote:
> I notice that you are concatinating then each time.  try setting them to
> ="" before using them
>
>  $companyID_string = "";
>  $companyName_string = "";
> then:
> while()
> {
> $companyID_string .= "," . $query_data[0];
> $companyName_string .= "," . $query_data[1];
> }

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




Re: [PHP] while() looping over query results twice?

2001-10-25 Thread Kurt Lieber

I don't think so, but if I have to suspect my code or a bug in php, I'll 
suspect my code. :)

I did a quick "if (isset($companyID_string)) { print "true"; } else { print 
"false";} and that didn't turn up anything, but I didn't spend a whole lot of 
effort on it.

Like I said, I'm pretty sure I screwed something up -- when I have more time, 
I'll try and figure out what it was.

Thanks again to all who responded.

--kurt

On Thursday 25 October 2001 13:22, you wrote:
> what I guessed was that you were using the variables somewhere else in the
> script above this code.  then you were adding on to them again.  without
> resetting them to blank.  Are you using these vars somewhere else (above
> this) in your code?



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




[PHP] account for missing/optional arguments in functions?

2001-10-25 Thread Kurt Lieber

Is it possible to account/trap missing arguments in functions?

For instance, say I have a function foo:

function foo($arg1,$arg2) { blah }

If someone calls that function as:

foo($arg1);

Can I somehow code around the fact that $arg2 is missing?  I've tried:

function foo($arg1,$arg2) {
if (!isset($arg2) { $arg2=0 }
}

But that doesn't work.  However, that's the sort of functionality I'm looking 
for -- is there a way to do it?

Thanks.

--kurt

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




Re: [PHP] editor for working with php

2001-10-25 Thread Kurt Lieber

Oh please please please check the archives.  This thread has been thrashed 
around and beat until it's nothing more than a bloody mass of quivering 
flesh...

http://marc.theaimsgroup.com/?l=php-general

On Thursday 25 October 2001 21:10, Ray Todd Stevens wrote:
> I ahve been using go-live (4.0) to edit pages containing php scripts.
> this is not really working well.  Is there a better way or a better editor
> to use for this?

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




Re: [PHP] problem with a while loop

2001-10-26 Thread Kurt Lieber

your while loop is working fine -- it's just that you're re-setting the value 
of $email every time it loops through.

I'm not sure what you're trying to accomplish, but you might try something 
like:

$query = "SELECT * FROM members Where Company  LIKE '%$search1%'";
$result=mysql_db_query($dbName,$query);
while ($row = mysql_fetch_array($result)) {
$email[$row['lname']] =  $row["E_mail_1"] 
} //untested code -- probably missing some quotes somewhere.


that will give you an array with lname as the key and e_mail_1 as your value. 
 You can then loop through it and format it however you want.

hth

--kurt 

On Friday 26 October 2001 00:10, Richard Kurth wrote:
>  I am trying to get the data out of the while loop if I echo $email
>  inside the } it gives me all of the data but if I echo it out side of
>  the loop it only gives me one record even though I know there is
>  more. How can I get this to work
>
> $query = "SELECT * FROM members Where Company  LIKE '%$search1%'";
> $result=mysql_db_query($dbName,$query);
> while ($row = mysql_fetch_array($result)) {
> $email= $row["lname"] . " " . "<" . $row["E_mail_1"] . ">" . ";";
> }
>
>
> echo $email;

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




Re: [PHP] Best [non-PHP] way to redirect a browser

2001-10-26 Thread Kurt Lieber

On Friday 26 October 2001 10:25, you wrote:
> What is the most reliable, browser-safe way to redirect the browser from a
> default index.html to, say, index.php?  The I'm doing it now is with the
> following javascript:

The most reliable, browser-safe, non-PHP way to redirect mail is to do it 
server-side.  If you're using Apache, check out mod_rewrite -- it will do 
exactly what you're looking for.  Otherwise, I believe IIS has similar 
facilities built into it.

--kurt

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




[PHP] PHP redirects (was Re: [PHP] Advanced. Trapped in architecture.)

2001-10-26 Thread Kurt Lieber

AFAIK, ASP does output buffering by default (meaning it doesn't send the code 
to the browser until the page is fully parsed and ready to send to the 
client)  That's what allows it to response.redirects after headers have been 
generated.  Cold Fusion is the same way.

However, once the actual HTTP headers have been sent to the client, I don't 
believe it's possible to do a server-side redirect -- only client-side.  
Someone please correct me if I"m wrong.

So, PHP does have this feature if you have output buffering turned on.  And 
not being able to do it without output buffering is more of a limitation of 
the HTTP protocol than it is a limitation of PHP. 
 
--kurt

On Friday 26 October 2001 12:15, you wrote:
> I know in ASP it's as easy as doing:
>
> Response.Clear
> Response.Redirect
>
> But PHP doesn't seem to have that feature.

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




Re: [PHP] Setting Up Secure Pages with PHP

2001-10-26 Thread Kurt Lieber

On Friday 26 October 2001 16:55, Martín Marqués wrote:
> You need https, and that comes with the web server (i.e.: Apache).

actually, SSL (aka https) has little, if anything, to do with user 
authentication -- it's used mainly for data encryption.

If you're looking for user authentication, then you can either use your web 
server's built-in user authentication (Apache uses mod_auth, I think) and IIS 
it's NTFS file permissions or you can roll your own PHP-based user 
authentication.

I recommend the former, since it's likely to be more robust and scalable than 
anything you can put together yourself (no slight towards you -- it's just 
that hundreds of people work on and test Apache and IIS authentication 
schemes) 

If you choose the latter, check out www.hotscripts.com as there's a ton of 
PHP-based user authentication systems there.

hth

--kurt

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




Re: [PHP] Excel to MySQL

2001-10-27 Thread Kurt Lieber

On Saturday 27 October 2001 17:11, Daniel Harik wrote:
> You see i have huge(for me) 100 000 record access table, i wanted to
> convert it to mysql, i thought of making php convertor that uses odbc
> and mysql, but maybe there is faster way?

Your subject says "excel" but above, you say "access".  If, in fact, you want 
to convert from access to mySQL, then forget about importing/exporting.  Just 
grab this access module:

http://www.rot13.org/~dpavlin/projects/sql/exportSQL3.txt

It exports a native mySQL script that creates all your tables, indexes, 
primary keys and then imports your data.  It absolutely kicks butt.

I've used it several times and have never had a problem with it.  It's a very 
slick solution.

--kurt

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




[PHP] function for hashing URL strings to check integrity?

2001-10-27 Thread Kurt Lieber

Does anyone know of a function that assists with checking URL  
strings to make sure they haven't been monkeyed with?

Ideally something that calculates the md5 hash of a string and then 
automatically verifies it when a user clicks a link.

I've checked the usual places (hotscripts, devshed, etc) and didn't see 
anything, but I wanted to check with the group before rolling my own.

Thanks.

--kurt

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




Re: [PHP] How do I prevent remote loading of jpegs from my site

2001-10-28 Thread Kurt Lieber

On Sunday 28 October 2001 10:26 am, you wrote:
> So, the question is, how do I prevent this remoting loading from
> happening.

Well, since the users are linking directly to your image, then you can't use 
PHP commands to prevent it.  (since that would requuire the user loading a 
PHP page that then loaded the image)

However, Apache has features built in that allow you to filter out all calls 
to a certain directory (such as /images) that don't come from the local 
machine.  Check out the apache docs for more info (httpd.apache.org)

hth

--kurt

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




Re: [PHP] One last kick at the cat

2001-10-28 Thread Kurt Lieber

On Sunday 28 October 2001 12:57 pm, you wrote:

> It seems that when I try to connect to my database inside "function
> Table_Title()", my function cannot read the values of $server, $user,
> $pass, "$db or $table ???

you need to declare the variables as global.  See below and also see the 
manual to understand how global works.

> 
> $server = "localhost";
> $user = "MyAccount";
> $pass = "MyPassword";
> $db = "MyDatabase";
> $table = "bookmark_unit4";
>
> function Table_Title()
> {

   global $server,$user,$pass,$db,$table;


>  $myconnection = mysql_pconnect($server,$user,$pass);
>  mysql_select_db($db,$myconnection);
>
>  $news = mysql_query("SHOW TABLE STATUS FROM ".$db." LIKE '$table'");
>  while ($news_story = mysql_fetch_array($news))
>  {
> $table_comment = $news_story['Comment'];
>  }
>
> echo $table_comment;
>  //echo "Nothing";
> }
> ?>

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




Re: [PHP] Problem appending data in a file with fopen("ftp://...","a")

2001-10-28 Thread Kurt Lieber

On Sunday 28 October 2001 06:41 pm, you wrote:
> Is it possible to solve this problem or it's a feature in PHP?

If I understand your problem, you are trying to open the same file twice.  
I'm not sure why you would want to do that, but assuming you have a good 
reason, you need to make sure you fclose($filename) before you try to 
fopen($filename) again.  Otherwise, PHP maintains the file open for reading 
(and writing, if that's how you opened it.)

hth

--kurt 

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




Re: [PHP] feature sugestion

2001-10-28 Thread Kurt Lieber

On Sunday 28 October 2001 06:10 pm, Ray Todd Stevens wrote:
> How about
> making the php engine ignore these to.  That is any string like  is treated as white space.

Um...maybe I don't understand your statement but php already has commenting 
built in.  Anything between /* and */ is ignored by the scripting engine.  
(just like  in HTML)

--kurt

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




Re: [PHP] Problem appending data in a file with fopen("ftp://...","a")

2001-10-28 Thread Kurt Lieber

On Sunday 28 October 2001 07:29 pm, you wrote:
> I only fopen my file once...
>
> My program checks if there is a specific session cookie.  If not (it's a
> new user that browse the site) I set a cookie and try to store the unique
> ID of this user (other cookie) in a file with a timestamp to track which
> user came and when (+ nb of times...).  That's where I use my fopen() then
> I fclose the file.  The fopen("...", "a") creates the file if it's not
> already there but once it's created, it cannot append a new line
> (User;timestamp) to this file : "Error : File exists".

Aha -- I understand.  I also didn't see the first time that you're using FTP. 
 You can't fopen() a file for read/write through FTP.  You can do one, or the 
other, but not both.  

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

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




Re: [PHP] Where does mysql keep the records data

2001-10-29 Thread Kurt Lieber

On Monday 29 October 2001 07:51 am, you wrote:
> I needed to start over with the work on publish so I deleted the publish
> directory. #rm -R /var/db/mysql/publish.

Um, not that it's PHP-related, but...

You should use "drop database" instead of manually removing the file.

mysql> drop database databasename

--kurt

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




Re: [PHP] protecting files

2001-10-29 Thread Kurt Lieber

On Monday 29 October 2001 07:37 am, you wrote:

> what is the script that was mentioned a while back that you use to
> allow apache access to a directory that has all world/group access
> turned off.  I

php-cgiwrap.

--kurt

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




Re: [PHP] User Authentication against remote authentication server

2001-10-29 Thread Kurt Lieber

> However, if the authentication server is not the web server, instead,
> it is a remote independent server. How can we manage the user
> authentications at the web server side?

Use LDAP.  

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

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




Re: [PHP] PHP+MySQL=Help(?)

2001-10-30 Thread Kurt Lieber

On Tuesday 30 October 2001 10:13 am, turtle wrote:

>  $link = mysql_connect('localhost')or die ("Could not connect");
> mysql_select_db('img760')or die ("Could not select database");
> $query = "select ('imglocation','height','width') from img where
> imgname=$getimg";
> $imglocation = 'imglocation';
> $height = 'height';
> $width = 'width';
> ?>

You need to read the manual on the mysql functions.

Specifically, functions like mysql_fetch_array, mysql_fetch_row, 
mysql_result.  You're setting $imglocation to a string, not a returned result 
from mysql.  You need to use one of the three functions I mentioned to retun 
an actual mysql result.

--kurt

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




Re: [PHP] need coments...

2001-10-30 Thread Kurt Lieber

Well, my first comment would be to not send attachments to mailing lists.  

--kurt

On Tuesday 30 October 2001 11:40 am, Galkov Vladimir wrote:
> Good day!
>
> I try to wrote Web-interface for DNS. Only simple test version now. I'd
> like to listen your comets to make real good and useful thing. mail me you
> coments
> please
>
> Galkov Vladimir
> ICQ 84873967

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




Re: [PHP] PHP+MySQL=Help(?)

2001-10-30 Thread Kurt Lieber

On Tuesday 30 October 2001 11:58 am, turtle wrote:
> No reading that section of the manual did me no good.  I do not understand
> other than I cannot store the results as a variable.

yes, you can. 


> Is there any of what I have done that is usable?

yes, there is. see below.  It's probably not solid enough to cut 'n' paste, 
but it at least shows you how to get return results from mysql.

> A recommendation for a book that covers this would be helpful...  the
> manual on this area is way to abbreviated for someone who has only used PHP
> for 2 weeks.

"Beginning PHP4" by Wrox





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




Re: [PHP] Mail Handling Question

2001-10-30 Thread Kurt Lieber

On Tuesday 30 October 2001 01:56 pm, Reggie White wrote:
> Now here's where I'm stuck. When the user is finished previewing the html
> letter, I want two things to happen: When the user submits, I want the page
> itself (with the variable in it) to be emailed to a specified recipient. I
> also want a blind copy of specific information from the form to be email to
> me for reporting purposes.
>
> Is this possible? and how?


Sure -- when you include the variables in the form letter, also include them 
as hidden form fields.  Then, when the user submits the form, you have all 
those same variables that you can do whatever with. 

Another alternative to hidden form fields would be to use url variables and 
put them in the ACTION="..." part of your form tag.  (i.e. http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP+MySQL=Help(?)

2001-10-30 Thread Kurt Lieber

On Tuesday 30 October 2001 02:53 pm, you wrote:
> It is starting to make sense.  I see the correlation between the manual
> example and the code you show.  Surprisingly (and equally confusing) the
> book I have also uses a while loop with mysql_fetch_array to display a
> list.

You would use a while loop if/when you have multiple records to retrive.  
>From your original code example, it seemed as though you would only have one 
record.  (though, for safety's sake, you should code a LIMIT into your sql 
statement)


> This may be the problem as I now get "supplied argument not valid mysql
> result" on this line.
> $query = "select imglocation,height,width from img where
> imgname='$getimg'";

Two things to try:

1.  Run that exact query on a mysql command line, substituting whatever 
variable name you're trying to pass in the URL.  Often times, I find that I 
tihnk I have a PHP problem when, in fact, I screwed up my query syntax 
somewhere.

2.  Explicitly define $getimg as something you know to be a valid image.  If 
that works, then you know it isn't getting passed from the url properly.  

> It looks like I might be able to use the GetImageSize function to do this
> same thing?  maybe?  All I am doing is getting the location (url) of an
> image and its height and width for an  statement.  maybe I
> am making this into a bigger job than necessary??  I think I have been
> working on it too long today and I need a long walk.

Actually, yes you can.  

$myImgSize = getImageSize('/unix/path/to/my/file.jpg'); should return the 
image sizes in an array.  You should then be able to do something like:



Which should automatically include height/width parameters.  (see this 
function on the php site for more info -- also, that's untested, off-the-cuff 
code I just wrote.  Might not work perfectly. :)

--kurt

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




Re: [PHP] PHP+MySQL=Help(?)

2001-10-31 Thread Kurt Lieber

On Wednesday 31 October 2001 02:32 am, you wrote:
> So, I'd recommend giving that a try.  From my understanding (limited) of
> MySQL, use = in the case of $id=2, and LIKE in the case of firstName
> LIKE "justin".

Um...you *can* do that, but I don't think you want to.  Using LIKE means that 
MySQL has to do a lot more searching on all your database records.  Instead 
of searching for an exact match, where it can look at things like string 
length, first characters and other simple criteria, it now has to evaluate 
the entire contents of the field in case there's a possible match somewhere 
in the string.  Much, much slower.

So, yes it works, but you pay a performance price for it. 

--kurt

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




Re: [PHP] PHP+MySQL=Help(?)

2001-10-31 Thread Kurt Lieber

On Wednesday 31 October 2001 07:45 am, turtle wrote:
> 

Glad we could help.  Also, you can re-write the above so you don't have to 
define two sets of  tags by doing the following:

";

?>


Not a big deal here, but if you start writing multiple lines of HTML code, 
you probably don't want to enclose each PHP variable in its own set of  tags.

Also, I tried to send you a couple suggestions off-list last night, but your 
email bounces -- I'm guessing the new owner of netobjects doesn't have their 
mail server set up to accept the correct email address.  Just FYI.

--kurt

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




Re: [PHP] defending PHP mail function

2001-10-31 Thread Kurt Lieber

On Wednesday 31 October 2001 08:16 am, you wrote:
> The addresses I know about are clients that are already a little peeved
> with me so I can't send them out for testing but I have found at least 4
> addresses that will "not work" (no error message, just dead air) with
> Mail().   It is something about the string of letters that does it
> because if I try "[EMAIL PROTECTED]" it doesn't mail.  If I try
> "[EMAIL PROTECTED]", or the like, it mails.

Not that I doubt you, but I do suspect a problem other than PHP, such as a 
strange, non-printing character getting inserted in the email address 
somewhere (like at the end) or a newline character.  It could also be a 
problem with the SMTP server that you're using. 

I highly recommend that you try this out on another, totally different PHP 
server (esp. one that runs on Apache/*nix, since that doesn't use SMTP to 
transport mail)  That will help you isolate the exact area where the problem 
occurs.

If you want to contact me off list, I'd be happy to help out with some simple 
tests.

--kurt

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




Re: [PHP] defending PHP mail function

2001-10-31 Thread Kurt Lieber

On Wednesday 31 October 2001 08:40 am, you wrote:

> for now it's PHP that's in question 

AFAIK, this is the first I've ever heard of probelms with mail() not sending 
to perfectly valid email addresses.  Scalability issues and other performance 
problems, sure, but that's a different animal.

Given the number of people that use PHP (and use mail(), especially) I would 
certainly think this problem would have been reported before if it were a 
real bug.

So, to be blunt, you probably have a problem with your code, your SMTP 
server, the way you've configured PHP, or something other than mail().  It's 
easy to blame it on mail() and/or PHP, but I think you're barking up the 
wrong tree.

Find a forgiving customer who reported the problem, ask for their help in 
troubleshooting it and then send some test emails from a completely different 
server, preferably on a *nix platform.  (not because *nix is better than 
windows, but because *nix PHP doesn't use smtp for mail delivery)

--kurt

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




Re: [PHP] defending PHP mail function

2001-10-31 Thread Kurt Lieber

On Wednesday 31 October 2001 09:08 am, you wrote:
> It doesn't do much good to test on a nix box because what I'm looking
> for is a solution to a PHP/SMTP problem.

Really?  No good at all, huh?  I would think that would answer the question 
right there if it was an SMTP problem or a problem that lies elsewhere.  If 
you take SMTP out of the equation, and the problem still occurs, then you 
know that's not the issue.  If the problem does go away, then you've isolated 
it to either PHP SMTP code (probably) or your SMTP server (not as likely, but 
still a possibilty) 

--kurt

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




Re: [PHP] 2 Forms On 1 Page

2001-11-03 Thread Kurt Lieber

On Saturday 03 November 2001 11:28 am, you wrote:
> If I have two forms on one page that both use the same script how
> do I get only the fields on one of the forms to be submitted? If that
> makes any sense.
> Jeff Oien

as long as you enclose each form within it's own set of ... tags 
and make sure the submit button for each form is within those tags, it should 
only submit one form at a time. (also make sure that you don't assign the 
same "name=" parameter to both forms)

--kurt

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




Re: [PHP] Incoming mail to PHP as Apache module

2001-11-03 Thread Kurt Lieber

On Saturday 03 November 2001 02:08 pm, Ross wrote:
> Maybe I should be posting this on the Procmail list but someone here
> might have a non-Procmail solution. I'm trying to get a PHP script to
> process incoming email. 

I'm sure it can be done with PHP, but my first thought was "why would you 
want to?"

Is there a specific reason you want/have to use PHP for this particular 
project?  PHP is a great web scripting language, but it's not designed as an 
incoming mail processing tool, so it likely won't do as good of a job as 
procmail or other similar tools that are written expressly for mail 
processing.

>It seems that I could do with a way of writing a message to a unique
>file and then calling the PHP script with wget. The script can then>
>read the file. I almost have this working with Procmail by using a
>maildir type mailbox but its back to front, I can only call PHP before
>the message is written to the file because Procmail stops once it is
>'delivered'.

If you're looking for something that can look up data in a database and 
manipulate message headers based on the return data, then I'd say Perl is a 
better option since it will provide a better blend of powerful text 
processing with web and database enablement.  Specifically, the Mail::Audit 
perl module available (for free) at CPAN.org.  It's intended as a procmail 
replacement, but with easier syntax and is written in Perl, so you can easily 
modifiy it to hook into a database.   

(If you're just playing around with PHP, trying to see what you can do with 
it, then by all means, give it a whirl and let us all know how it turns out.  
 If not, then hopefully mail::audit or something similar might help you out.)

--kurt

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




Re: [PHP] email receipt confirmation

2001-11-08 Thread Kurt Lieber

Using standard internet mail, no.  You can *request* that a read receipt be 
sent when the email is opened by the recipient, but there is no guarantee 
that that person will allow the receipt to be sent.  Read receipts also often 
annoy the recipient and can be perceived as rude and intrusive.

You could try something fancy with HTML mail, but again, that's not 
guaranteed since not all MUAs can (or do) understand HTML mail.

--kurt


On Thursday 08 November 2001 08:02 pm, you wrote:
> Hi all,
>
> I have a form which sends off the contents of a page as an HTML
> formatted email.  However, it appears that certain attempts to send
> these emails never show up at the intended email address even though no
> errors are reported upon sending while others work perfectly.
>
> It there any way to confirm if an email was received (opened/read)
> using headers or some other method?
>
> Thanks
> -Merle

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




Re: [PHP] Want to remove some special from text

2001-11-08 Thread Kurt Lieber

http://www.php.net/manual/en/function.strip-tags.php

On Thursday 08 November 2001 08:01 pm, you wrote:
> I want to remove all html related tags, such as
> ... etc
>
> But want to keep the rest data as it is. Just want to remove those tags.
> Any idea how to do it ?

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




Re: [PHP] Eval()??? A variables contents?

2001-11-09 Thread Kurt Lieber

On Friday 09 November 2001 11:51 am, Christopher Raymond wrote:
> Let's say I have:
>
> $content = "";
>
>
> If I use , it doesn't evaluate that content. What am
> I doing wrong here?

What you're doing doesn't make any sense.  If it were to work, it would look 
like the following:

 ; ?>,

or something similar.  I think what you want to do is:


that's using psuedo-code, of course.  You'll want to substitute correct php 
syntax for returning database results.

--kurt

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




Re: [PHP] Server redirection

2001-11-09 Thread Kurt Lieber

On Friday 09 November 2001 07:46 pm, Ernesto wrote:
> How do I do server-side redirection?
> I want to redirect the user to another URL without using javascript.

RTFM.

http://php.net/header

Or, check the archives of the mailing list.

http://marc.theaimsgroup.com/?l=php-general

This question has been asked dozens upon dozens of times before.

--kurt

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




Re: [PHP] Why no one helps?

2001-11-10 Thread Kurt Lieber

On Saturday 10 November 2001 08:42 am, Christian Dechery wrote:
> Why doesn't anyone say something about my messages "probelms with sessions
> and SSI"?

This list gets 2000 - 3000 messages per month and you find it surprising that 
not all messages get a response?  

My suggestion regarding SSI and PHP is to not use SSI.  Use include() or 
require() instead and keep it an all-PHP affair.

--kurt

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




Re: [PHP] global variable for all scripts

2001-11-10 Thread Kurt Lieber

On Saturday 10 November 2001 01:29 pm, you wrote:
> if i like to move my scripts to /www/my_newdir i habe to change the
> include() function in every script

A few options:

1.  Don't use absolute paths -- use relative paths.  Then you don't have to 
worry about it as long as the overall structure of your site stays the same.

2.  set a variable or named constant to the value of your path and then use 
that throughout your site.  For example:

DEFINE("MY_PATH","/www/my_newdir");

include(MY_PATH);

This works well when you have one file that contains all your named constants 
and other stuff that needs to be accessible on a global basis.  You then 
include that one file (using relative paths) at the top of every php page.  
If you need to change a value, you change it once in your global file and be 
done with it.

3.  It's fairly trivial to do an automated search and replace across multiple 
files.  Just do this and let the computer replace all occurances of 
include("/www/my_olddir") to include("/www/my_newdir")

hth

--kurt

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




Re: [PHP] using mail

2001-11-12 Thread Kurt Lieber

Did you RTFM?

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

Just create a variable and input it as an extra header.

$from = "from: [EMAIL PROTECTED]\r\n" ;

mail($to,$subject,$message,$from);

On Monday 12 November 2001 02:41 pm, you wrote:
> Hello,
>
> I am using the mail() function right now to send e-mails.  Is there a
> way I can dynamically change where it says the e-mail is from?
>
> Thanks
> Brandon

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




Re: [PHP] FTP Clients

2001-11-14 Thread Kurt Lieber

Look -- if you're going to post OT messages, at least put [OT] in the subject 
line so those of us who get pissy about OT messages (such as myself) can 
filter them out.

As for a good, free windows FTP utility, you have one:

Open up a command prompt and type "ftp".

--kurt

On Wednesday 14 November 2001 01:28 pm, Rudi Ahlers wrote:
> Sorry for the totally OT question, but can anyone recommend a good, FREE,
> FTP client for windows? I now have to pay for AceFTP aswell, which used to
> be free.
> Thank you

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




Re: [PHP] Newsgroup?

2001-11-15 Thread Kurt Lieber

On Thursday 15 November 2001 07:41 am, Christopher Raymond wrote:
> Is this newsgroup still functional?

Yep -- I just checked and it's working fine for me.  I'm using news.php.net 
connecting on port 119 (default NNTP port)

--kurt

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




Re: [PHP] MS Exchange

2001-11-19 Thread Kurt Lieber

On Monday 19 November 2001 10:19 pm, Benj Arriola wrote:
> On the php.ini, if there is no SMTP server
> and MS Exchange is used, what changes are needed
> to be done on the php.ini file?

MS Exchange has supported SMTP since (at least) version 4.0 and possibly even 
since the old MS Mail days.  

--kurt

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




Re: [PHP] PHP SECURITY

2001-11-24 Thread Kurt Lieber

On Saturday 24 November 2001 04:24 am, [EMAIL PROTECTED] wrote:

> But when any of our user use readdir and other commands for manipulating
> with directories - this user can read scripts of others.
>
> Do you know what to do ?

1) Read the PHP manual chapter on security:

http://www.php.net/manual/en/security.php

2)  Check the archives of this mailing list.  This topic has been discussed 
many times before:

http://marc.theaimsgroup.com/?l=php-general


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




Re: [PHP] User access rights..

2001-11-25 Thread Kurt Lieber

On Sunday 25 November 2001 03:30 pm, you wrote:
> The problem is... using PHP, they can open any file
> that is readable to nobody account (Apache user)..
> So it can read and even edit other users' files..
>
> Consquently, the users should be able to access only and only their home
> directories.

Short answer; you can't.

Long answer; if users have shell accounts, there is no way you can do what 
you're trying to do.  If you limit users to FTP access and PHP *only* (i.e. 
no telnet, ssh, custom CGI, Perl or other languages that can access the file 
system) then you can use PHP safe mode to at least protect PHP.

Read the Security chapter in the PHP manual.  (chapter 4, I believe)

This topic has been discussed extensively before on the list, so you may also 
want to search the list archives for more details.

--kurt

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




Re: [PHP] User access rights..

2001-11-25 Thread Kurt Lieber

On Sunday 25 November 2001 04:08 pm, Ali Pakkan wrote:

> And consider they are real users, then how will i tell Apache server to
> run as the user owning the file?

Using the PHP module, you can't.  Using PHP as a CGI, you can use something 
like cgiwrap to execute under the user's account

> Is it impossible for a real solution?

Again, search the archives.  This has all been discussed before.  Repeatedly.

--kurt

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




Re: [PHP] Updating Timestamps

2001-11-26 Thread Kurt Lieber

This is more of a MySQL question than a PHP question, but...

The TIMESTAMP format in MySQL isn't a read-only field -- you can update the 
data with your own timestamp information just like you can any other normal 
database field.  So, simply create a timestamp using PHP and insert that into 
the field in MySQL.

--kurt

On Monday 26 November 2001 07:27 pm, cosmin laslau wrote:
> I'm using timestamps (God bless the little things) to keep track of
> database updates, so to give users the latest updates by the second. Kinda
> neat. But anyway, the timestamps are in one table, and when something is
> that table is changed, it automatically updates.
>
> However, I have another table which I want to affect the timestamps. Is
> there a command for 'manually' updating a timestamp rather than by SQL's
> own logic?

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




Re: [PHP] PHP 4.1 out?

2001-11-28 Thread Kurt Lieber

On Wednesday 28 November 2001 01:03 pm, Mike Eheler wrote:

> I'll hold off, but people will still try stuff like that. I'm not trying
> to tell ya what to do, but I've found it best never to put files with
> release-names in their primary download spots, regardless of how hidden
> they may seem, until your absolutely positive that will be the release
> file.

FWIW (not much), I agree with this.  If it looks like a released version and 
talks like a released version, then it probably is a released version, even 
if the announcement hasn't come out.  That may be faulty logic, but it's what 
most folks are likely to assume.  

> Also, beyond this.. other than grabbing from CVS, does php ever publish
> milestone development versions for download anywhere?

Yes -- follow the php-dev mailling list -- they're announced there.  RC 
versions are generally posted under someone's home directory rather than in 
the distributions directory.  Not sure why that wasn't the case with the 
not-really-4.1.0 version.

--kurt

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




Re: [PHP] Getting the filesize of an image?

2001-11-30 Thread Kurt Lieber

Yes -- RTFM.

http://php.net/getimagesize

--kurt

On Friday 30 November 2001 04:04 pm, Uchendu Nwachukwu wrote:
> Is there any easy way to get the filesize of an image on a remote server?
>
> Please tell me there is! TIA

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




Re: [PHP] BEST Book for Learning PHP/MySQL

2001-12-03 Thread Kurt Lieber

There's dozens upon dozens of messages in the archive about this topic, which 
comes up at least once per month.  I believe there's also a blurb or two 
about PHP books on the PHP web site, php.net.

Please check those resources.

--kurt

On Monday 03 December 2001 08:35 pm, Monty wrote:
> I'm a PHP and MySQL beginner. What's the best book I can buy that will get
> me started using both these technologies? Thanks!

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




Re: [PHP] BEST Book for Learning PHP/MySQL

2001-12-03 Thread Kurt Lieber

On Monday 03 December 2001 08:45 pm, Monty wrote:
> Sorry, I did a search here and found only one message with book
> recommendations. Where's the archive? Is it a separate newsgroup? I looked
> on php.net, but, only found a long list of books available, no
> recommendations.

The archive is linked to off the php.net site in the support section.

You can go to the archive directly here:

http://marc.theaimsgroup.com/?l=php-general

Searching for "book" yields 188 messages in the archive:

http://marc.theaimsgroup.com/?l=php-general&w=2&r=1&s=book&q=b


--kurt


>
> Monty
>
> > From: [EMAIL PROTECTED] (Kurt Lieber)
> > Reply-To: [EMAIL PROTECTED]
> > Newsgroups: php.general
> > Date: Mon, 3 Dec 2001 20:50:29 -0800
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] BEST Book for Learning PHP/MySQL
> >
> > There's dozens upon dozens of messages in the archive about this topic,
> > which comes up at least once per month.  I believe there's also a blurb
> > or two about PHP books on the PHP web site, php.net.
> >
> > Please check those resources.
> >
> > --kurt
> >
> > On Monday 03 December 2001 08:35 pm, Monty wrote:
> >> I'm a PHP and MySQL beginner. What's the best book I can buy that will
> >> get me started using both these technologies? Thanks!

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




Re: [PHP] Dumped OK, Restore NOT

2001-12-05 Thread Kurt Lieber

On Wednesday 05 December 2001 08:02 am, you wrote:
> Little problem with MySQL 3.23.46 under Windows ME. I

This would be an excellent question for the MySQL mailing list.

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




[PHP] possible to override session.auto_start in php.ini

2001-12-05 Thread Kurt Lieber

I've read the manual notes for ini_set, so I have a feeling the answer to my 
question is no, but I'd like to make sure.

I have no control over my ISP's php.ini file, but the fact that they have 
session.auto_start set to 1 in php.ini is causing me problems.

Is there any way to override this?  The manual says that session.auto_start 
isn't one of the settings that can be manipulated by ini_set, so I'm looking 
for alternative methods.  

Thansk.

--kurt

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




Re: [PHP] possible to override session.auto_start in php.ini

2001-12-05 Thread Kurt Lieber

That worked!  Thanks!

For those who may be interested, I added the following lines to my .htaccess 
file:

# change some php.ini settings

php_flag session.auto_start off


Also, this obviously only works with Apache with PHP running as a module.  
Not sure if there's an equivalent option for IIS.  (if you remove the 
IfModule lines from the above example and just include the php_flag line, it 
should work for php compiled as a CGI, but I haven't tested that.)

--kurt

On Wednesday 05 December 2001 09:07 am, Andrey Hristov wrote:
> I think that I found the solution:
>
> http://www.zend.com/manual/configuration.php
>

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




Re: [PHP] How do I pass variables from a PHP script to an HTML document?

2001-12-05 Thread Kurt Lieber

On Wednesday 05 December 2001 10:00 am, you wrote:

> Alternatively, is there another way to pass variables
> from a PHP script to a HTML form where I won't run into this limit?

I'm not seeing why you have to redirect the user just to get a custom 
response.

If you can instead use an include(); to customize your response, then you 
don't have to worry about redirecting the user to a different page.

In other words, instead of doing this:

form --> PHP Script --> confirmation page

Just do:

form --> PHP Script

And have the PHP script format and output the confirmation page.

--kurt

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




[PHP] session question: session.auto_start vs. session_register.

2001-12-05 Thread Kurt Lieber

I am working on an open source e-commerce package and have hit a wall with 
sessions.

If I have session.auto_start turned on, I get the following error message:

Fatal error: The script tried to execute a method or access a property of an 
incomplete object. Please ensure that the class definition shoppingcart of 
the object you are trying to operate on was loaded _before_ the session was 
started in   on line 12

If I turn session.auto_start off, the error disappears.

So, the error message tells me that I can't use the class unless I've defined 
it before the session gets started.  However, session.auto_start (as far as I 
know) starts a session immediately, before even waiting for a script to be 
fully parsed & executed.  So, the two seem mutually exclusive. (but then the 
usefullness of session.auto_start would seem extremely limited)

Is there a way 

I think there's some glaring errors in my understanding here.  Can someone 
help me fill in the holes? 

--kurt


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




Re: [PHP] PHP shopping cart packages

2001-12-05 Thread Kurt Lieber

On Wednesday 05 December 2001 02:05 pm, you wrote:
> Your thoughts appreciated!

Check out The Exchange Project.  

http://www.theexchangeproject.org/

I've been using it for a few months now.  My biggest complaint is there 
doesn't seem to be a clear sense of direction in the development process.  
Development happens, but there's no set milestones that people are marching 
towards.  (at least, not that are published or discussed)   Also, the 
documentation is *severely* lacking.

However, the product itself is fairly feature-rich and is robust enough to 
use for a live shop.  If you're comfortable with PHP, it might be a great 
fit. 

If you do decide to go with it, my suggestion is to ignore the current 
release (PR2.1) and go with one of the PR2.2 snapshots.  Many people are 
using the snapshots for live shops with good results and there are a lot of 
features in the 2.2 version that are important for an e-commerce shop, IMO.

hth

--kurt

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




Re: [PHP] Newbie question on Tutorials?

2001-12-05 Thread Kurt Lieber

On Wednesday 05 December 2001 05:16 pm, Geoff E wrote:
> Okay, probably been asked zillions of times already, 

Yep

>but I couldn't find reference to it in the last 5 minutes. :)

Didja try the archives?

http://marc.theaimsgroup.com/?l=php-general

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




Re: [PHP] PHP Installed in CGI for IIS 5(microsoft)

2001-12-06 Thread Kurt Lieber

On Thursday 06 December 2001 11:23 am, pong-TC wrote:
> Has anyone installed and used PHP in CGI (not ISAPI) for IIS 5?  Is it
> running good?  I mean you got a full capability as PHP has, and there is
> no serious harm to the webserver(IIS 5).   I am also using ASP.  I don't
> know installing PHP on the system will jeopardize the ASP application.
> Please let me know.

In my experience, setting up a CGI version of PHP on IIS is easier than the 
ISAPI version.  The major drawback is speed:  the CGI version will be much, 
much slower.  Not a big deal if you have a low volume site, though.

Shouldn't affect your ASP pages at all -- the two can happily co-exist on the 
same server.

hth

--kurt

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




Re: [PHP] Dynamic Document Creation

2001-12-07 Thread Kurt Lieber

On Friday 07 December 2001 09:43 am, you wrote:
> Does anyone have any scripts or know a location to point me to where I can
> dynamically create Microsoft Word documents using PHP.  

You said you wanted to create some nicely formatted forms -- what's wrong 
with HTML and style sheets?  Assuming you have some control over your end 
users' browsers, you should be able to create a well-formatted, easy-to-use 
HTML form no problem.

Otherwise, I'd look at LaTeX or maybe DocBook format.  

--kurt

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




Re: [PHP] deleting file contents

2001-12-11 Thread Kurt Lieber

On Tuesday 11 December 2001 09:00 am, DigitalKoala wrote:
> What i want to do is then delete the contents of the file, but not the file
> itself...can you tell me the best way to do this?

Well, you can read the contents of the original file into a PHP variable 
using fopen().  Then, use something like ereg_replace to find what you're 
looking for and delete it (replace it with nothing) and the fwrite the file 
back out.  You'll also want to make sure you use flock() to lock the file 
prior to opening it.  Otherwise, you'll run into problems if your MTA tries 
to deliver another message at the same time.

Make sure you understand about unix file locking before you try this on a 
production mailbox -- you have to use the same method of file locking as your 
MTA uses.  Otherwise, Bad Things can happen. :)

Honestly, I'd say you'd be better off using something like procmail or even 
perl for this.  Procmail is designed to muck around with mail spool files and 
Perl is better suited for unix file handling and manipulation, IMO.

That said, I'm sure it can be done in PHP, so best of luck if you decide to 
go ahead with it.

hth

--kurt


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




Re: [PHP] oscommerce / Exchange project

2001-12-21 Thread Kurt Lieber

On Friday 21 December 2001 08:56 pm, Daniel Guerrier wrote:
> Does anyone have any experience using this thing.
> I installed it and it seems to work, but it's very
> buggy.

Yes, I've used it fairly extensively.  I haven't found it to be nearly as 
buggy as your message implies.  It's not perfect, but it's certainly bug-free 
enough to use on the two live shops I'm running.

> After the first hit the left nav, footer no longer
> appear.  I know this a bad description of the problem
> but there's no rhyme nor reason to this.

I'm guessing you have a config error or something else munged up with your 
PHP installation and/or TEP config file.  TEP is fussy about a few php.ini 
options, such as session_autostart and magic quotes.

Have you tried posting a message to the TEP-GENERAL list?  It's probably a 
better resource for TEP-specific questions.

--kurt

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




Re: [PHP] Quering given dns and list A records with PHP

2001-07-03 Thread Kurt Lieber

By design, most DNS servers won't let you do this because it's something of
a security risk.

However, for DNS servers that *will* let you do it, there isn't a built-in
function in PHP that will do what you want, but I imagine you can accomplish
it by interacting with a unix shell and using the nslookup command.  I don't
know the code to do this, but am sure there are tons of examples around.
Once you get access to the shell, the commands you want are as follows:

shellprompt> nslookup
shellprompt> ls -t any domainname.com

where domainname.com is the domain you're looking for.

Again, note that 9 times out of 10, you're going to get a "Query Refused"
result since most DNS servers won't give you this information.  You can get
an idea of your success rate by simply trying the above commands in your own
*nix shell for various domain names.  Most/all of the big guys (yahoo, sun,
etc.) are blocked.

hth

--kurt



- Original Message -
From: "Mohamedou" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 03, 2001 3:41 AM
Subject: [PHP] Quering given dns and list A records with PHP


Hello all,

Can somebody help me
I need to query a given DNS Server identified by IP and the domain
I want query and then it gives me the whole machines it has registered

Regards

Moh




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




Re: [PHP] #exec and php together

2001-07-03 Thread Kurt Lieber

First question is why not just use PHP for both parts?  i.e.



I'd guess the reason your second example doesn't work is because PHP isn't
being called to parse the page.  even though you're calling a php page with
your SSI, the destination page is named *.htm meaning that PHP won't be
involved.

So, I'd say you're going to need to rename the file to *.php in order to get
it to work.  (or change your file associations so .htm is associated with
the PHP cgi.

--kurt
- Original Message -
From: "Paolo Ciraci" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 03, 2001 10:16 AM
Subject: [PHP] #exec and php together


> I'm trying to include the output of a php script into a standard html
> file via SSI #exec.
>
> The following is a sample php file (hello.php):
>
>  echo "Hello World!\n";
> ?>
>
> and the following is the sample html file (hello.htm):
>
> 
> 
> 
> 
> 
>
> both files are in the same directory.
>
> If I issue http://www.mysite.com/hello.php
> the script works well and I obtain the page showing the message
> "Hello World!"
>
> but if I try http://www.mysite.com/hello.htm
> I obtain an empty page.
>
> My system is BSDI 4.1 + Apache 1.3.11 + PHP 4.0.3pl1 (both module and
> cgi version) but I've tested the same example on a Window NT 4 +
> Apache 1.3.12 + PHP 4.0.3pl1 (cgi version) without success.
>
> Any idea, suggestion ?
>
> Thanks.
>
>
> Dr. Paolo Ciraci
> ~
> Responsabile Sistemi Informativi [EMAIL PROTECTED]
> Nautica Editrice S.r.l. http://www.nautica.it
> Via Tevere 44, Roma - tel 06 8413060
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] image button troubles

2001-07-03 Thread Kurt Lieber

I had a similar problem a while back that I solved by isolating my
variables.  Such as:



As for why it's happening, I'm not sure.

--kurt

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 03, 1979 4:25 PM
Subject: [PHP] image button troubles


QUESTION 1

I'm working on a form that reads where the user clicks on an image using:



where the map has name="mapclick"

I get this as output:

Location is x = 94 and y =Ê36

What is that strange "e" thing?



QUESTION 2

I want to check how large the image is, so I tried this:

$test = GetImageSize ("$maploc");

echo $test[3];


(it's a jpg, and $maploc is any URL)

But I get this error:



Warning: Unable to open http://www.php.net/gifs/php_logo.gif in
/usr/local/plesk/apache/vhosts/futurebird.com/httpdocs/mapbuild/addloc.php3



I'm running php version 4.0.3pl1


I've also been unable to get any other image funtions to work (various
errors) I'll keep trying things but any help would be greatly appriciated.



Thanks,
Susan

http://futurebird.diaryland.com



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




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




Re: [PHP] image button troubles

2001-07-03 Thread Kurt Lieber

Are you entering the fully-qualified URL?  The following works perfectly on
my machine:

http://i.cnn.net/cnn/images/main/cnnlogo.gif";);
echo $tempVar[3];
?>

(it's the main logo for cnn.com)

--kurt
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 03, 1979 4:44 PM
Subject: Re: [PHP] image button troubles


> on 7/3/01 7:52 PM, Kurt Lieber at [EMAIL PROTECTED] wrote:
>
> > I had a similar problem a while back that I solved by isolating my
> > variables.  Such as:
> >
> > 
> >
> > As for why it's happening, I'm not sure.
>
>
> Wow, that fixed it!  Though it turns out I was mistaken in thinking I'd
> fixed the bug... it still says it's "unable to open" the image I give
it...
>
> hmmm..
>
> Susan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] Troubleshooting syntax ?

2001-07-04 Thread Kurt Lieber

That domain name doesn't appear to be valid.  Perhaps you meant:

http://validator.w3.org ?

--kurt

- Original Message -
From: "Christian Reiniger" <[EMAIL PROTECTED]>
To: "Jack Sasportas" <[EMAIL PROTECTED]>; "php"
<[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 3:19 AM
Subject: Re: [PHP] Troubleshooting syntax ?


On Tuesday 03 July 2001 22:17, Jack Sasportas wrote:

> Can anyone suggest a tool / web site etc, that helps you check the html
> code for the missing / wrong syntax so that it is spotted quickly like
> making it red or something, instead of reading through hundreds of
> lines of code, hopefully catching the problem?

http://validator.w3c.org/

--
Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)

The use of COBOL cripples the mind; its teaching should, therefore,
be regarded as a criminal offence.

- Edsger W. Dijkstra

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




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




Re: [PHP] multiple domains using one cookie

2001-07-05 Thread Kurt Lieber

Actually, that's not entirely accurate.

You can set cookies for multiple domains on one HTML page -- you simply have
to write a page that calls one image from each domain that you want to set a
cookie on, even if that image is nothing but a 1x1 transparent gif.

Cookie management and updating will be a challenge moving forth, but you
should get the result you're looking for.

--kurt

- Original Message -
From: "Mark Maggelet" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 11:45 AM
Subject: Re: [PHP] multiple domains using one cookie


On Thu, 5 Jul 2001 14:59:19 +0200, Tobias Talltorp
([EMAIL PROTECTED]) wrote:
>Hello all.
>
>I want multiple domains to be able to read from one cookie, or set
>one
>cookie each for the different domains.
>
>Here is the case:
>When the user logs in to my server, I want to set a cookie that has
>the
>value $name="tobias". He specifies which domains that can read this
>cookie,
>something like $domains="domain1.com;domain2.com;domain6.com".
>Then these sites can read the $name and print it.
>
>The other way might be to set one cookie with the value
>$name="tobias" for
>domain1.com, one for domain2.com and one for domain6.com.
>But the cookie _has_ to come from domain1.com, otherwise it will
>only work
>for mydomain.com, right?
>In other words, I can´t set, edit or read a cookie for an other
site?
>
>How would I go about doing this?

right, you can't do it. the browser won't accept a cookie for a
domain other than the one it's coming from, and it won't send a
cookie for a domain other than the one that's being requested.

a couple of ideas for a workaround would be:
1) you can set a cookie on domain1, redirect to a page on domain2
which sets another cookie, redirects to domain6 and sets another
cookie and redirects back to domain1 (messy)

2) you can restructure your domains into subdomains like so:
www1.domain.com
www2.domain.com
www3.domain.com
these will all get and send cookies for domain 'domain.com'



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




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




Re: [PHP] $phpvar = javascriptvar???

2001-07-05 Thread Kurt Lieber

As the original respondent said:

window.location = 'http://url?yourVar=' + yourVar;

from there, parse out the URL variable and store it into a PHP variable and
you're good to go.
- Original Message -
From: "Romeo Manzur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 11:55 AM
Subject: [PHP] $phpvar = javascriptvar???


> what I mean is, how could I save a javascript var value on a php var???
> Thanks...
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] $phpvar = javascriptvar???

2001-07-05 Thread Kurt Lieber

I must not be clear on your question as it seems my response (and the
original response) describe exactly what you're looking to do.

I recommend you check out forums.devshed.com and do a search in their PHP
forum for "javascript php variable" You'll get a ton of examples and
suggestions.  Here's one thread specifically:

http://forums.devshed.com/showthread.php?s=&threadid=16698&forumid=5&highlig
ht=javascript+variable+php+variable

best of luck

--kurt
- Original Message -
From: "Romeo Manzur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 12:12 PM
Subject: Re: [PHP] $phpvar = javascriptvar???


> I want to store the value of screen.ColorDepth on a php var...
> Thanks...
>
> Kurt Lieber wrote:
>
> > As the original respondent said:
> >
> > window.location = 'http://url?yourVar=' + yourVar;
> >
> > from there, parse out the URL variable and store it into a PHP variable
and
> > you're good to go.
> > - Original Message -
> > From: "Romeo Manzur" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, July 05, 2001 11:55 AM
> > Subject: [PHP] $phpvar = javascriptvar???
> >
> > > what I mean is, how could I save a javascript var value on a php
var???
> > > Thanks...
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] Re: changing to a different file in browser

2001-07-05 Thread Kurt Lieber

is the header() code at the very top of your page before any other HTML
code?  By default, you have to put all HTTP header-related information at
the top of your pages.  There's a setting in php.ini that allows you to
bypass this, but I don't remember it off the top of my head.

--kurt
- Original Message -
From: "Brad Wright" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 7:25 PM
Subject: Re: [PHP] Re: changing to a different file in browser


tried it, but it didn't work... still getting the same message in IE. Am I
missing something? Can I actually use the headr() function to redirect to a
different page while using sesions and session variables??

> From: "..s.c.o.t.t.." <[EMAIL PROTECTED]>
> Date: Thu, 5 Jul 2001 22:32:22 -0700
> To: "Php-General" <[EMAIL PROTECTED]>
> Subject: RE: [PHP] Re: changing to a different file in browser
>
> put "Location" before the URL:
>
> header("Location: http://server.com/file.php";);
> or
> header("Location: ./file.php");
>
>
>> -Original Message-
>> From: Brad Wright [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, July 05, 2001 18:54
>> To: PHP General List
>> Subject: Re: [PHP] Re: changing to a different file in browser
>>
>>
>> ihave tried the header() function as Julio suggested. But I get an error
>> message in the browser. I am also using session variables in all these
pages
>> (only 2).
>>
>> My code :
>> if (!mysql_numrows($result) ) {
>> die ( "username/password not valid");
>> }
>> else{
>>
>>
>> header("Menu.php");
>> }
>>
>>
>>
>>
>>
>> the error message in IE:
>> Warning: Cannot add header information - headers already sent by (output
>> started at /home/e-smith/files/ibays/bigpool1/html/login.php:1) in
>> /home/e-smith/files/ibays/bigpool1/html/login.php on line 1
>>
>>
>> Thanks in advance,
>> brad
>>
>>
>>> From: "Inércia Sensorial" <[EMAIL PROTECTED]>
>>> Date: Thu, 5 Jul 2001 22:26:24 -0300
>>> To: [EMAIL PROTECTED]
>>> Subject: [PHP] Re: changing to a different file in browser
>>>
>>> header ("http://www.example.com";); // Goes to example.com.
>>>
>>> --
>>>
>>>
>>> Julio Nobrega.
>>>
>>> A hora está chegando:
>>> http://sourceforge.net/projects/toca
>>>
>>> "Brad Wright" <[EMAIL PROTECTED]> wrote in message
>>> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi all,
 I know this is probably the most stupid question you'll see on this
list
>>> for
 a while, but anyway,
 In an 'if..else' statement, I want to (if a condition is met) change to
a
 totally new php page in the browser window. I know this is simple (in
fact
>>> i
 had it working last night but have now forgotten how i did it).

 ie (no the following is NOT actual PHPsheesh :)

 If  a=1
 go to required_page.php
 else
 do nothing

 Thanks in advance,
 Brad

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


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




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




Re: [PHP] hey, got a question....

2001-07-06 Thread Kurt Lieber

sounds like a firewall issue to me -- do you have a firewall in between your
computer and your 'net connection?  Might run a port scan on your default
gateway (which is likely your firewall if you have one) to see what ports
it's allowing inbound.

Alternatively, you could have a router that has some ports closed down.
Again, a port scan will show this.  (and might also tick off your net admin)

Either way, most likely not a php issue.

--kurt
- Original Message -
From: "ReDucTor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 9:34 AM
Subject: [PHP] hey, got a question


i can't seem to access certain ports, through a nat program i have setup on
the computer here with the net, but i was thinking i could use something
like socks, because i want to setup some fsockopen() stuff...but i can't use
it on the ports i want, just frezzez...works over the lan fine, and over the
net on ports i can access...



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




Re: [PHP] How to build this SQL statement?

2001-07-07 Thread Kurt Lieber

ummm...it's not clear at all what your decisioning criteria are.  That is to
say, how did you come up with the 6 rows in your result set?  Are they
chosen randomly or is there some rhyme/reason to how you chose them?  (and
if it's the latter -- what is your rhyme/reasoning?)

- Original Message -
From: "ckieninger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 4:47 AM
Subject: [PHP] How to build this SQL statement?


> Hello,
>
> i've to build a SQL Statement from a table with the following resultset
>
> table with rows
>
> id subid roleid rolebundle name
> 50 0 0 50.0.0 header1
> 50 1 0 50.1.0 subheader1
> 50 2 0 50.2.0 subheader2
> 50 3 0 50.3.0 subheader3
> 50 3 1 50.3.1 subheader3.1
> 50 3 2 50.3.2 subheader3.2
> 50 4 0 50.4.0 subheader4
> 50 4 1 50.4.1 subheader4.1
> 50 4 2 50.4.2 subheader4.2
>
> 9 rows
>
> SQL statement ???
>
> Resultset
>
> id subid roleid rolebundle name
>
> 50 1 0 50.1.0 subheader1
> 50 2 0 50.2.0 subheader2
>
> 50 3 1 50.3.1 subheader3.1
> 50 3 2 50.3.2 subheader3.2
>
> 50 4 1 50.4.1 subheader4.1
> 50 4 2 50.4.2 subheader4.2
>
> 6 Rows
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] chdir() help

2001-07-07 Thread Kurt Lieber

Look at your code -- where do you tell it to set $file_name equal to the
file handles within e:\work\images?  $file_name is only being set to the
values within e:\work -- not e:\work\images.

If you only need to display the images within e:\work\images, then why not
just set $dir_name to that in the first place?  Otherwise (I believe) you're
going to have to use two separate while ($file_name=readdir($dir))  clauses
(or nest them, depending on what you really want to output)

hth

--kurt
- Original Message -
From: "McShen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 8:38 AM
Subject: [PHP] chdir() help


hi

Currently, i am working in e:\work, and there is a folder named "image"
under e:\work, so, the path to image is e:\work\image.

I have a script under e:\work, and i wanna display all images under the
folder e:\work\image, I use chdir() to change the directory. but it wouldn't
work. it still displays the images under e:\work. Why is that? Does chdir()
work under win2k pro? here is my script

---
";
 }
}
closedir($dir);
?>
-

Please help me to fix the problem. Thanks.



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




Re: [PHP] chdir() help

2001-07-07 Thread Kurt Lieber

We (or at least I) are on the mailing list, not the newsgroup.  Same
content, different delivery format.  www.php.net to sign up. (beware -- it's
a HIGH volume list)

--kurt

"McShen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> by the way, what do u guys use as your news reader client?
> how do u reply to my post and send me an email at the same time? Do u
> manually add my email to Cc: or you just hit "reply to group"? I don't
know
> how to do this.
>
> "Kurt Lieber" <[EMAIL PROTECTED]> wrote in message
> 0c7f01c106fc$9c32e170$[EMAIL PROTECTED]">news:0c7f01c106fc$9c32e170$[EMAIL PROTECTED]...
> > Look at your code -- where do you tell it to set $file_name equal to the
> > file handles within e:\work\images?  $file_name is only being set to the
> > values within e:\work -- not e:\work\images.
> >
> > If you only need to display the images within e:\work\images, then why
not
> > just set $dir_name to that in the first place?  Otherwise (I believe)
> you're
> > going to have to use two separate while ($file_name=readdir($dir))
> clauses
> > (or nest them, depending on what you really want to output)
> >
> > hth
> >
> > --kurt
> > - Original Message -
> > From: "McShen" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, July 07, 2001 8:38 AM
> > Subject: [PHP] chdir() help
> >
> >
> > hi
> >
> > Currently, i am working in e:\work, and there is a folder named "image"
> > under e:\work, so, the path to image is e:\work\image.
> >
> > I have a script under e:\work, and i wanna display all images under the
> > folder e:\work\image, I use chdir() to change the directory. but it
> wouldn't
> > work. it still displays the images under e:\work. Why is that? Does
> chdir()
> > work under win2k pro? here is my script
> >
> > ---
> >  >
> >
> > $dir_name = "e:\work";
> > $dir = opendir($dir_name);
> > while ($file_name=readdir($dir)) {
> >
> >  if (($file_name!="." && $file_name!="..")) {
> >   echo $file_name."\n  ";
> >
> >   if (chdir('e:\work\image')) {
> >echo "current dir is e:\work\image";
> >   }
> >   echo "";
> >  }
> > }
> > closedir($dir);
> > ?>
> > -
> >
> > Please help me to fix the problem. Thanks.
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] chdir() help

2001-07-07 Thread Kurt Lieber

In that case, it would be better to read all the image names into an array
and then use that to spit out 20 images at a time.  You'll get better
performance that way, too.

--kurt
- Original Message -
From: "McShen-CelebritieZones.com" <[EMAIL PROTECTED]>
To: "Chris Lambert - WhiteCrown Networks" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 11:08 AM
Subject: Re: [PHP] chdir() help


Chris,
I do that because i wanna have control of how many images will be displayed
at once. I understand what you are doing, but, you script will just display
all images at once, right? I wanna display like 20 images, then have a next
button,, you know what i mean?

- Original Message -
From: "Chris Lambert - WhiteCrown Networks" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "McShen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 11:44 AM
Subject: Re: [PHP] chdir() help


> I'm not sure I know exactly what you want, as the script isn't clear on
its
> purpose. If you simply want to print out all the images in e:\work\image,
> and nothing else, the code would be much simpler.
>
>  $dir = opendir("e:/work/image");
> while ($file_name=readdir($dir)) {
> if ($file_name <> "." && $file_name <> "..") {
> echo "";
> }
> }
> ?>
>
> /* Chris Lambert, CTO - [EMAIL PROTECTED]
> WhiteCrown Networks - More Than White Hats
> Web Application Security - www.whitecrown.net
> */
>
> - Original Message -
> From: McShen <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, July 07, 2001 11:38 AM
> Subject: [PHP] chdir() help
>
>
> hi
>
> Currently, i am working in e:\work, and there is a folder named "image"
> under e:\work, so, the path to image is e:\work\image.
>
> I have a script under e:\work, and i wanna display all images under the
> folder e:\work\image, I use chdir() to change the directory. but it
wouldn't
> work. it still displays the images under e:\work. Why is that? Does
chdir()
> work under win2k pro? here is my script
>
> ---
> 
>
> $dir_name = "e:\work";
> $dir = opendir($dir_name);
> while ($file_name=readdir($dir)) {
>
>  if (($file_name!="." && $file_name!="..")) {
>   echo $file_name."\n  ";
>
>   if (chdir('e:\work\image')) {
>echo "current dir is e:\work\image";
>   }
>   echo "";
>  }
> }
> closedir($dir);
> ?>
> -
>
> Please help me to fix the problem. Thanks.
>
>



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




[PHP] stripping white space?

2001-07-09 Thread Kurt Lieber

Is there a way using PHP to easily strip white space out of an html page as
it's being sent to the client.  That is to say, the page that we as
developers work on is nicely formatted, indented, etc. but when it's sent
out to the client, PHP will remove all the extra white space both to
obfuscate the code and reduce the size a bit.

For anyone who knows Cold Fusion, I'm looking for the PHP equivalent of the
"Suppress whitespace by default" option in the Cold Fusion Server
Administrator.

(NOTE: I'm not looking for a discussion on the merits of stripping vs. not
stripping white space characters or whether or not it really does any
good -- I just want to know if it can be done easily using PHP)

Thanks.

--kurt


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




Re: [PHP] stripping white space?

2001-07-09 Thread Kurt Lieber

nope -- I want to completely suppress any extraneous white space characters
(tabs, spaces, etc.) in the HTML as it's being delivered to the client.  So,
where your source file might look like:


  
  
  Hello World!
  
  


The client will receive the HTML as:

Hello World!

all on one big long line.  But your source file maintains the original
formatting for easy readability.

I'm guessing the answer is no, PHP can't (easily) do this but I just thought
I'd check.

--kurt
- Original Message -
From: "Mukul Sabharwal" <[EMAIL PROTECTED]>
To: "Kurt Lieber" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 10:04 PM
Subject: Re: [PHP] stripping white space?


> Hi,
>
> I take that you simply want to remove ALL whitespaces
> from a data block (variable).
>
> you could simply use str_replace(" ", "", $var);
>
>
>
> --- Kurt Lieber <[EMAIL PROTECTED]> wrote:
> > Is there a way using PHP to easily strip white space
> > out of an html page as
> > it's being sent to the client.  That is to say, the
> > page that we as
> > developers work on is nicely formatted, indented,
> > etc. but when it's sent
> > out to the client, PHP will remove all the extra
> > white space both to
> > obfuscate the code and reduce the size a bit.
> >
> > For anyone who knows Cold Fusion, I'm looking for
> > the PHP equivalent of the
> > "Suppress whitespace by default" option in the Cold
> > Fusion Server
> > Administrator.
> >
> > (NOTE: I'm not looking for a discussion on the
> > merits of stripping vs. not
> > stripping white space characters or whether or not
> > it really does any
> > good -- I just want to know if it can be done easily
> > using PHP)
> >
> > Thanks.
> >
> > --kurt
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> =
> *
> http://www.geocities.com/mimodit
> *
>
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] If (!$results) are true what am I missing

2001-07-09 Thread Kurt Lieber

um...I believe your query will return results if there is a match, but your
error message will only display if there is no match.  !$result will only be
true if there are no records returned on your query, meaning that the domain
name doesn't exist.  From your error message, I'd say that's not what you're
looking for.

--kurt


- Original Message -
From: "Richard Kurth" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 10:07 PM
Subject: [PHP] If (!$results) are true what am I missing


> What am I missing hear all I what to do is see if the domaname is
> in the database and if it does print the error message if does not then
> just move on without doing anything
>
>
> $db = MYSQL_CONNECT($roothostname,$rootusername, $rootpassword) OR
DIE("Unable to connect to database");
> mysql_select_db($dbName, $db);
> $result = mysql_query( "SELECT * FROM customers WHERE domaname =
$domain1", $db);
> If (!$result) {
>   print_error(" This Domain Name $domain1 already exist please
select a new Domain Name  ");
> }
>
>
>
>
>
>
>
>
>
>
>
> Best regards,
>  Richard
> mailto:[EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] stripping white space?

2001-07-09 Thread Kurt Lieber

Well, you can simply look for a closing bracket (>) followed by only white
space characters (space, tab, return) followed by an open bracket (<) and,
if there's a match, strip out the white space in between them.  That would
turn:




into just 

You'd have to check for a bit more, such as  and  tags, but it's
not an unreasonable regex to write.  What I am more concerned about is; I'm
assuming everything would have to be encased within  tags, meaning
all HTML would have to be properly escaped, etc.  *that* would be a major
pain, so I hope I'm overlooking something.


--kurt
- Original Message -
From: "Chris Lambert - WhiteCrown Networks" <[EMAIL PROTECTED]>
To: "Kurt Lieber" <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 10:11 PM
Subject: Re: [PHP] stripping white space?


> Nothing can _easily_ do this, as HTML puts formatting and content on the
> same page. You can strip new lines, you can strip tabs, and you can strip
> consecutive spaces, but there's no way to tell " " from "Hello
> World!"
>
> /* Chris Lambert, CTO - [EMAIL PROTECTED]
> WhiteCrown Networks - More Than White Hats
> Web Application Security - www.whitecrown.net
> */
>
> - Original Message -
> From: Kurt Lieber <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, July 10, 2001 1:14 AM
> Subject: Re: [PHP] stripping white space?
>
>
> | nope -- I want to completely suppress any extraneous white space
> characters
> | (tabs, spaces, etc.) in the HTML as it's being delivered to the client.
> So,
> | where your source file might look like:
> |
> | 
> |   
> |   
> |   Hello World!
> |   
> |   
> | 
> |
> | The client will receive the HTML as:
> |
> | Hello World!
> |
> | all on one big long line.  But your source file maintains the original
> | formatting for easy readability.
> |
> | I'm guessing the answer is no, PHP can't (easily) do this but I just
> thought
> | I'd check.
> |
> | --kurt
> | - Original Message -
> | From: "Mukul Sabharwal" <[EMAIL PROTECTED]>
> | To: "Kurt Lieber" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> | Sent: Monday, July 09, 2001 10:04 PM
> | Subject: Re: [PHP] stripping white space?
> |
> |
> | > Hi,
> | >
> | > I take that you simply want to remove ALL whitespaces
> | > from a data block (variable).
> | >
> | > you could simply use str_replace(" ", "", $var);
> | >
> | >
> | >
> | > --- Kurt Lieber <[EMAIL PROTECTED]> wrote:
> | > > Is there a way using PHP to easily strip white space
> | > > out of an html page as
> | > > it's being sent to the client.  That is to say, the
> | > > page that we as
> | > > developers work on is nicely formatted, indented,
> | > > etc. but when it's sent
> | > > out to the client, PHP will remove all the extra
> | > > white space both to
> | > > obfuscate the code and reduce the size a bit.
> | > >
> | > > For anyone who knows Cold Fusion, I'm looking for
> | > > the PHP equivalent of the
> | > > "Suppress whitespace by default" option in the Cold
> | > > Fusion Server
> | > > Administrator.
> | > >
> | > > (NOTE: I'm not looking for a discussion on the
> | > > merits of stripping vs. not
> | > > stripping white space characters or whether or not
> | > > it really does any
> | > > good -- I just want to know if it can be done easily
> | > > using PHP)
> | > >
> | > > Thanks.
> | > >
> | > > --kurt
> | > >
> | > >
> | > > --
> | > > PHP General Mailing List (http://www.php.net/)
> | > > To unsubscribe, e-mail:
> | > > [EMAIL PROTECTED]
> | > > For additional commands, e-mail:
> | > > [EMAIL PROTECTED]
> | > > To contact the list administrators, e-mail:
> | > > [EMAIL PROTECTED]
> | > >
> | >
> | >
> | > =
> | > *
> | > http://www.geocities.com/mimodit
> | > *
> | >
> | > __
> | > Do You Yahoo!?
> | > Get personalized email addresses from Yahoo! Mail
> | > http://personal.mail.yahoo.com/
> | >
> | > --
> | > PHP General Mailing List (http://www.php.net/)
> | > To unsubscribe, e-mail: [EMAIL PROTECTED]
> | > For additional commands, e-mail: [EMAIL PROTECTED]
> | > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> | >
> | >
> |
> |
> | --
> | PHP General Mailing List (http://www.php.net/)
> | To unsubscribe, e-mail: [EMAIL PROTECTED]
> | For additional commands, e-mail: [EMAIL PROTECTED]
> | To contact the list administrators, e-mail: [EMAIL PROTECTED]
> |
> |
> |
>
>


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




Re: [PHP] Newbie. Help on installation on a Win2K

2001-07-10 Thread Kurt Lieber

get the PHP 4.0.6 installer at http://www.php.net/downloads.php -- it will
install everything you need to work with IIS.  Works great.  Also has
detailed readmes to discuss other installation methods/options.

--kurt
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 11, 2001 6:51 AM
Subject: [PHP] Newbie. Help on installation on a Win2K


> Newbie. Help on installation on a Win2K
>
> im a newbie on this and i want a complete detail on PHP Installation on a
> Win2K
>
> thnx
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




[PHP] examples of using PHP to control .htaccess

2001-07-10 Thread Kurt Lieber

does anyone have/know of any existing code that allows PHP to control
.htaccess files?  I'm aware of SPHPAT on sourceforge, but I'm looking for
something a little more mature.

I don't really have a set of requirements other than what I've already
stated -- I'm just looking for some examples to help me roll my own.

Thanks.

--kurt


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




Re: [PHP] Re: Warning: mail() is not supported in this PHP build

2001-07-11 Thread Kurt Lieber

I believe it varies depending on distribution and install parameters.
However, try:

find / -name php

and that should show you all the places with php files squirreled away.

--kurt
- Original Message -
From: "Kyle" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 11, 2001 7:43 PM
Subject: [PHP] Re: Warning: mail() is not supported in this PHP build


> Somebody mentioned that PHP checks to see if sendmail was installed when
it
> was installing.
>
> Just I have another question, does anyone know where PHP puts everything
> when it installs? I keep recompiling PHP and Apache, and every time I run
> phpinfo() it still has the original build date. I tried deleting:
>
> /usr/local/lib/php
>
> /usr/local/include/php
>
> /src/modules/php4/
>
> - Kyle
>
> "Kyle" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Warning: mail() is not supported in this PHP build in testmail.php on
line
> 1
> >
> > I don't remember disabling it when I compiled, and I can't find anything
> to
> > specifically enable it when compiling.  I'm running PHP 4.0.6.  My
> > sendmail_path is correct in my php.ini.
> >
> > I tried recompiling php4 and apache but it seems that it isn't
overwriting
> > the php modules.  What files are used? I tried deleting the  > src>/src/modules/php4 folder.
> >
> > Any help would be greatly appreciated.
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] php ad banner rotation

2001-07-11 Thread Kurt Lieber

There's quite a few ad banner systems over at sourceforge.  Might give them
a look.

http://sourceforge.net/

(just search for php ad banner)

--kurt
- Original Message -
From: "Jack" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 12, 2001 8:17 AM
Subject: [PHP] php ad banner rotation


All folks,
Is there anyone out there can advice me about the php ad banner rotation
module ( especially the free one) ? If there is anyone is using it now and
recommend it to me, would be nice.
Jack
[EMAIL PROTECTED]
"Love your enemies, it will drive them nuts"



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




[PHP] Upcoming wrox php/flash book?

2001-07-12 Thread Kurt Lieber

I was searching for a Flash book today and ran across the following
book, due to be released in September 2001:

http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=190345016
0

It's entitled "Foundation Php for Flash 5"

Now, I've never heard of using PHP to control Flash and, given the
different ways they work, can't see how it would even be possible.  (I'm
no flash expert, but I believe they have to be pre-compiled .swf files
to be displayed in a web page.)

Wrox.com has no mention of this book in their upcoming releases section
and google didn't turn up any hits, either.  (Amazon doesn't have the
book listed in their DB)

Does anyone know any more about this book (and what PHP is going to be
doing with Flash?)?

I'm more inclined to believe someone over at Barnes & Noble goofed, but
stranger things have happened.

--kurt


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




RE: [PHP] Upcoming wrox php/flash book?

2001-07-12 Thread Kurt Lieber

http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=190345016
0

BTW, in case this link doesn't work for some of you, note that some mail
clients (including my version of Outlook) wrap the href and don't
maintain the link.  (note the trailing 0 in the link above)

Sorry for any confusion.

--kurt


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




RE: [PHP] Export to Excel

2001-07-13 Thread Kurt Lieber

Easiest way is to export the data into comma-delimited format. (.csv
files)  Excel can import those no problem.

So, you would write a php function that created a simple text file that
looked like:

Fieldname1,fieldname2,fieldname3
Data1,data2,data3
Etc.

And excel can open that kind of file right up.

Hth
--kurt

-Original Message-
From: Jorge Alvarez [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 13, 2001 9:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Export to Excel


One of my clients is requesting me to export some data from
PHP-generated pages to MS Excel files. I have no clue on how to do such
export with PHP. I'm using PHP/Apache/Linux Mandrake.

What options do I have?

Your help is very appreciated.

Regards,

Jorge Alvarez
--
Let your screen saver contribute to cancer research.
http://members.ud.com/vypc/cancer/
A new way to help. Sponsored by Intel.



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



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




[PHP] php w/ mysql support compiled in -- can't connect to mysql

2001-07-14 Thread Kurt Lieber

OK, there's been another thread floating around about getting: 

Fatal error: Call to undefined function: mysql_pconnect()

Turns out, I'm getting this same error message for both mysql_pconnect
as well as plain mysql_connect.  I'm using the PHP debian package found
in potato. (4.0.3pl1)  phpInfo() shows me the configure command which
includes:

'--with-mysql=shared,/usr' 

So, I'm assuming that I really have mysql support compiled in.  mysql
lives in /usr/bin/mysql (and is also the debian potato package)

I'm used to windows -- this is the first time I've tried to set up
php/mysql on linux, so I'm hoping I'm just overlooking something
obvious. Anyone have any ideas?

Thanks.

--kurt


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




[PHP] SOLVED: php w/ mysql support compiled in -- can't connect to mysql

2001-07-14 Thread Kurt Lieber

For those of you who might be using Debian (and new to linux in general)
mysql support for php is offered as a separate package in debian.  Just
use apt-get install php4-mysql, restart apache and you should be good to
go.

Hope this helps someone.

--kurt

-Original Message-
From: Kurt Lieber [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, July 14, 2001 8:35 AM
To: '[EMAIL PROTECTED]'
Subject: php w/ mysql support compiled in -- can't connect to mysql


OK, there's been another thread floating around about getting: 

Fatal error: Call to undefined function: mysql_pconnect()

Turns out, I'm getting this same error message for both mysql_pconnect
as well as plain mysql_connect.  I'm using the PHP debian package found
in potato. (4.0.3pl1)  phpInfo() shows me the configure command which
includes:

'--with-mysql=shared,/usr' 

So, I'm assuming that I really have mysql support compiled in.  mysql
lives in /usr/bin/mysql (and is also the debian potato package)

I'm used to windows -- this is the first time I've tried to set up
php/mysql on linux, so I'm hoping I'm just overlooking something
obvious. Anyone have any ideas?

Thanks.

--kurt


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




[PHP] Can anyone explain what this does?

2001-07-15 Thread Kurt Lieber

I'm sure this is a simple one, but I've never seen it before:

$this->file = $file;

I'm specifically confused about the -> operator and what that does.  

I looked in the online documentation under operators, but didn't find
anything.  Ideally, if someone can point me to the location in the
documentation that talks about this so I can get more info, I'd
appreciate it.

Thanks.

--kurt


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




[PHP] converting multiple URL values for the same variable into an array

2001-07-15 Thread Kurt Lieber

I'm modifying some code for ampache (ampache.kveton.com) and have run into a
snag that I'm not sure I understand completely.

Part of the code produces a URL similar to the following:

http://myhost/playlist.pls?song=100&song=101&song=102

and $song then gets passed to this function:

function get_song_path_from_id ( $song ) {
  GLOBAL $dbh, $db_name;

  $songs = '';
  $count = 0;

  if ( is_array( $song ) ) {
while ( list($k,$v) = each($song) ) {
  //does some cool stuff
}
  }
  else {
//does some other stuff
  }
  return ($songs);
}

So, am I correct in assuming that $song will never be considered an array?
(basically, given the above code and URL, $song will always equal 102)

I'm new to PHP, and since I didn't write the original code, I'm not sure if
this is a bug, or something that I just don't fully understand.  Assuming it
is a bug, can anyone offer some suggestions on how to take the URL and parse
it out and input the values into an array called $song?
(get_song_path_from_id() is used by several other parts of the code, so any
modifications to that code would need to leave the rest of the functionality
intact)

Thanks.

--kurt

P.S.  If anyone is looking for a simple, easy-to-use (and set up) mp3
manager, I highly recommend ampache.  It doesn't have a bunch of bells &
whistles (which I don't want) -- it simply provides a simple, effective way
to manage playlists and play your mp3 songs from anywhere.


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




RE: [PHP] converting multiple URL values for the same variable into an array

2001-07-15 Thread Kurt Lieber

I should also clarify that .pls is set up as a PHP extension and the
page is being interpreted by the PHP engine.

--kurt

-Original Message-
From: Kurt Lieber [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, July 15, 2001 4:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] converting multiple URL values for the same variable into
an array


I'm modifying some code for ampache (ampache.kveton.com) and have run
into a snag that I'm not sure I understand completely.

Part of the code produces a URL similar to the following:

http://myhost/playlist.pls?song=100&song=101&song=102

and $song then gets passed to this function:

function get_song_path_from_id ( $song ) {
  GLOBAL $dbh, $db_name;

  $songs = '';
  $count = 0;

  if ( is_array( $song ) ) {
while ( list($k,$v) = each($song) ) {
  //does some cool stuff
}
  }
  else {
//does some other stuff
  }
  return ($songs);
}

So, am I correct in assuming that $song will never be considered an
array? (basically, given the above code and URL, $song will always equal
102)

I'm new to PHP, and since I didn't write the original code, I'm not sure
if this is a bug, or something that I just don't fully understand.
Assuming it is a bug, can anyone offer some suggestions on how to take
the URL and parse it out and input the values into an array called
$song?
(get_song_path_from_id() is used by several other parts of the code, so
any modifications to that code would need to leave the rest of the
functionality
intact)

Thanks.

--kurt

P.S.  If anyone is looking for a simple, easy-to-use (and set up) mp3
manager, I highly recommend ampache.  It doesn't have a bunch of bells &
whistles (which I don't want) -- it simply provides a simple, effective
way to manage playlists and play your mp3 songs from anywhere.


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



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




RE: [PHP]OT I know, but WTF...

2001-07-15 Thread Kurt Lieber

I have an idea.  Let's keep this thread off the PHP list.  One OT email
is bad enough -- an entire thread is simply too much.

-Original Message-
From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, July 15, 2001 8:10 PM
To: PHP General List (E-mail)
Subject: RE: [PHP]OT I know, but WTF...


alright.

i reinstalled the more stable IE5, however I'm still experiencing
problems accessing https sites. any ideas(I went through all the
settings too, nothing seems to work).

chris

-Original Message-
From: Chris Anderson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 15, 2001 10:38 PM
To: Chris Lambert - WhiteCrown Networks; [EMAIL PROTECTED]
Subject: Re: [PHP]OT I know, but WTF...


: )

- Original Message -
From: "Chris Lambert - WhiteCrown Networks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 15, 2001 7:10 PM
Subject: Re: [PHP]OT I know, but WTF...


> That the IE6 beta is a beta.
>
> /* Chris Lambert, CTO - [EMAIL PROTECTED]
> WhiteCrown Networks - More Than White Hats
> Web Application Security - www.whitecrown.net
> */
>
> - Original Message -
> From: Chris Anderson <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; PHP General List (E-mail) 
> <[EMAIL PROTECTED]>
> Sent: Sunday, July 15, 2001 5:35 PM
> Subject: Re: [PHP]OT I know, but WTF...
>
>
> | I've actually had an MS representative tell me not to use the IE6 
> | beta. What's that tell you?
> | - Original Message -
> | From: "Chris Cocuzzo" <[EMAIL PROTECTED]>
> | To: "PHP General List (E-mail)" <[EMAIL PROTECTED]>
> | Sent: Sunday, July 15, 2001 12:08 PM
> | Subject: [PHP]OT I know, but WTF...
> |
> |
> | > hey-
> | >
> | > I know this is off topic, but I figured i'd ask to see if other 
> | > people
> | were
> | > experiencing similar problems. I'm having trouble accessing web
> | sites/pages
> | > that are secure(https...obviously). I tried changing everything 
> | > around
> in
> | IE
> | > 6, but so far nothing is working...any ideas?
> | >
> | > the error is the normal, annoying, page can't be found or dns 
> | > error
> bull.
> | >
> | > chris
> | >
> | >
> | > --
> | > PHP General Mailing List (http://www.php.net/)
> | > To unsubscribe, e-mail: [EMAIL PROTECTED]
> | > For additional commands, e-mail: [EMAIL PROTECTED] To

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


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


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



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




  1   2   >