Re: [PHP] a good PHP editor

2001-07-18 Thread Evan Nemerson

You wouldn't happen to be "...abridging the freedom of speech...", would 
you???

No, not everyone knows about astalavista.box.sk. However, most of us do. Why? 
Because people told us about it. I don't know about you, but I don't spend my 
free time punching in random URI's.

The word for this is NOT stealing. You are encouraged to download the 
software by the manufacturer. All you are doing is modifying it. What? It's 
against the EULA??? Ah, but that is why people use software like the 
customizer...

You don't need to be afraid of the police walking into your house and 
scanning your computer- if you are wise, as apparently not all of us are.


I believe that quality software should be rewarded, and in this day and age 
monetary gain is the main motivation for most people, and therefore the most 
common reward. However, I believe that the people that ambushed Mr. Maletsky 
are far worse people than he, for they assaulted him for speaking up.

Mr. Maletsky: Do not apologize to anyone for having the courage to speak up. 
Those who would smite all intellectual opposition shall only grow weak over 
time, while dragging the rest of humanity down with them. In order for us to 
grow as a species, we must work together.

I thought that was what open source was all about- working together to better 
humanity, not just ourselves. I still believe it is, but I believe that those 
who ambushed Mr. Maletsky are disgraces to this cause. You should be using 
ASP.



-Evan Nemerson
  [EMAIL PROTECTED]

Why do people with closed minds
always open their mouths?

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




Re: [PHP] sql query successful

2001-07-18 Thread Dave Freeman

On 18 Jul 01, at 13:24, Tyler Longren wrote:

From:   "Tyler Longren" <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Date sent:  Wed, 18 Jul 2001 13:24:32 -0500
Subject:[PHP] sql query successful

> if ($sql = mysql_query("SELECT * FROM table ORDER BY rand()")) {
> print "SQL executed successfully.";
> }
> else {
> print "SQL not executed successfully.";
> }

$sql = mysql_query("SELECT * FROM table");

if (mysql_numrows($sql) < 1)
{
echo "failed or no data found";
} else {
echo "passed";
}

Seems to work for me.

CYA, Dave


---
Outback Queensland Internet - Longreach, Outback Queensland - Australia
http://www.outbackqld.net.au  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]




Re: [PHP] a good PHP editor

2001-07-18 Thread Schill, Johannes



> So sprach »Schill, Johannes« am 2001-07-18 18.07.2001 um 22:24:21 +0200 :
> > I haven't seen any other programs for Windows you can edit remote files
> > instead of the usual "download, edit, upload". Let me know if there are
>
> How does that work?  Is it just that it has some kind of simple FTP
> client builtin?

Yes. They had a deal with the creators of ws_ftp. I dont know if they have
their own nowadays.

Best regards,
Johannes Schill


-- 
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] Using Frames

2001-07-18 Thread Mark Lo

Hi,

 I would like to know how to make all three frames to move at the same
time.  Actually is it possible ??

Thanks

Mark



-- 
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] set var in PHP clarified

2001-07-18 Thread Gunther E. Biernat

Jessica,

I used that technique before PHP was available (for all readers, the key term here is 
Server Side Includes, e.g. http://httpd.apache.org/docs/howto/ssi.html.html). With PHP 
you're a lot more flexible so that you should get rid of your shtml structure, 
especially as PHP is much faster what really makes a difference if you've got many 
includes.

For this simple example, the syntax is quite similar. In your main document, simply 
type:



and in the header.html:



That's it. But remember to either set *.html files to be parsed through PHP in your 
web server configuration or rename the main document to .php (or .php3 or .php4 or 
whatever your web server needs).




>Thanks for the prompt replies...but I think I should clarify...
>
>In regular html, I would do this:
>
>
>
>
>and header.html would have in it (among other things):
>
>
>
>So, the title of the webpage would be "some title here"...
>
>How can I accomplish the same thing in PHP?



mit freundlichen Gruessen / yours sincerely


Gunther E. Biernat
Web Application Engineer
__

RealNetworks GmbH   Tel.: +49-40-415204-24
Weidestraße 128 Fax.: +49-40-415204-11
22083 Hamburg   Mail: [EMAIL PROTECTED]
Germany URL : http://de.real.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] Re: PHP code produces ocasional segfaults.

2001-07-18 Thread Santiago Romero


 Hi all...

 I'm new to PHP and I needed to implement some PHP functions on
 a php webmail. I readed the PHP MANUAL and I found a code that
 suits my needs in an example, but it produces segfaults.
 I added the following code:

 $ds=ldap_connect("ldap.server.com");
 if ($ds) 
 { 
   $r=ldap_bind($ds);
   $busca="[EMAIL PROTECTED]";
   $sr=ldap_search($ds,"dc=midomain,dc=com", $busca);  
   if( ldap_count_entries($ds,$sr) < 1 )
 SetCookie( "can_use_attachs", "n", time()+3600 );
   else
   {
 $info = ldap_get_entries($ds, $sr);
 if( $info[0]["canuseattachs"][0] == 'y' )
   SetCookie( "can_use_attachs", "y", time()+3600 );
 else
   SetCookie( "can_use_attachs", "n", time()+3600 ); 
   }
   ldap_close($ds);
 }

 When I reload THOUSANDS of times the above page (using
 autoreload) and I've found that sometimes the above code
 produces an Apache Crash. I get a "Document contained
 no data" and apache/logs/error_log says:

 [notice] child pid 1234 exit with Segmentation Fault
 (core dump on /usr/apache).

 I have lots of them on different times:

[Wed Jul  4 09:10:22 2001] [notice] child pid 29834 exit
 signal Segmentation fault (11)
[Fri Jul  6 13:05:32 2001] [notice] child pid 30124 exit
 signal Segmentation fault (11)

  I did a backtrace on the core file:

(gdb) bt
#0  0xc01f2740 in kill () from /usr/lib/libc.2
#1  0x1a15a0 in sig_coredump ()
#2  
#3  0xcda50 in read_next_token (tcm=0x40049b20, token=0x77ff1eb8,
phplval=0x77ff1d58) at token_cache.c:161
#4  0xb2f68 in phplex (phplval=0x77ff1d58) at main.c:488
#5  0xbb9d8 in phpparse () at /usr/lib/bison.simple:432
#6  0xb5974 in php3_parse (yyin=0x40113c98) at main.c:1564
#7  0xb5ed8 in apache_php3_module_main (r=0x400cd840, fd=26,
display_source_mode=0, preprocessed=0) at main.c:1929
#8  0xb18a4 in send_php3 ()
#9  0xb1970 in send_parsed_php3 ()
#10 0x197204 in ap_invoke_handler ()
#11 0x1ab36c in process_request_internal ()
#12 0x1ab3ec in ap_process_request ()
#13 0x1a2ff8 in child_main ()
#14 0x1a3254 in make_child ()
#15 0x1a35b8 in perform_idle_server_maintenance ()
#16 0x1a3b78 in standalone_main ()
#17 0x1a45c8 in main ()

 The line 161 of token_cache.c contains:

GLOBAL(tc)->count++;
   }
-->*token = &GLOBAL(tc)->tokens[GLOBAL(tc)->pos++];
return (*token)->token_type;
}

 
 I think something with my above code is wrong, because If I
 comment it using /* and */, then I don't get segfaults (never).
 Any idea of rewriting the above code so that it works would
 be very appreciated. To code the above I copied & pasted the
 PHP manual LDAP functions example, and that's why I'm asking
 directly here.

 Thanks a lot.

-- 
Santiago Romero
Departamento de Sistemas
[EMAIL PROTECTED]

Av. Primado Reig 189, entlo
46020 Valencia - Spain
Telf. (+34) 96 332 12 00
Fax. (+34) 96 332 12 01
http://www.servicom2000.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]




Re: [PHP] MySQL Query

2001-07-18 Thread Ryan Fischer

You wrote:
> I have a table that looks like
>
> Name | Type | X | Y
>
> Foo| Ship  | 9 | 29
> Bar| Base  | 9 | 29
>
> Is there any way I can write a query that selects
> everything with Type = Base, and X and Y = Foo's X and Y?
>
> ie
>
> "Select * from table where type = Base and X = {Foo:X} and Y =
{Foo:Y}";

$result = mysql_query("select x, y from table where name = 'Foo'");
$info = mysql_fetch_object($result);
$x = $info->x;
$y = $info->y;
mysql_free_result($result);
$result = mysql_query("select * from table where type = 'Base', x = 'x',
y = 'y'");
$info = mysql_fetch_object($result);
// Use properties of $info here.
mysql_free_result($result);

I think your reasoning is a little jumbled, though.  There may be some
way to do what you want to do with one query.  There usually is for the
simple things.  I'm not quite sure what you want to accomplish, though.
HTH.  :)

--
 -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/



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




Re: [PHP] File Upload Headaches

2001-07-18 Thread David Robley

On Thu, 19 Jul 2001 16:06, Jason Rennie wrote:
> Hi all,
>
> Can anybody see what is wrong with this code ??
>
>
>   echo "\$userfile = $userfile";
>   echo $HTTP_POST_FILES['userfile']['tmp_name'];
>
>
>   // now to provide an assignment submission box
>   print "";
>   print " ACTION=\"$param&upload=true\" METHOD=\"post\" >\n"; print " TYPE=\"hidden\" NAME=\"MAX_FILE_SIZE\" VALUE=\"1048576\">\n"; print
> "Submit A File ";
>   print "\n";
>   print "\n";
>   print "";
>
>
> this is just a code fragment but, essentially the form submits back to
> itself.
>
> When i try to output the $HTTP_POST_FILE['userfile']['any thing']
> variables they are not set, and $userfile is simply set to the filename
> on the other computer.
>
> Any ideas about what an earth i'm doing wrong 
>
> Jason

It's been a while since I needed to do this, but here's what I wrote and 
as far as I know it still works :-0






[Lots left out for simplicity]
I notice you have ENC_TYPE ??

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Heads I win, tails you lose.

-- 
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-07-18 Thread Politz Christian

Hi Ray,

Ray Parish wrote:

> For a virtual hosting stand point, which is better to run, the module or
> the cgi version of php? Can you also explain why one is better than the
> other..?

It depends on your needs. If you care about security you should use the
cgi-version and place it outside the web tree. And you should use
Apache's suExec option for running PHP scripts. If you care more about
performance you should use the module version. I am currently writing a
PHP security FAQ where i will describe how to do this stuff mentioned
about. I will post the URL to the list when it's done.

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]




Re: [PHP] PHP vs Perl question

2001-07-18 Thread Ryan Fischer

> I'm pretty new to programming - besides JavaScript, PHP is really the
first
> language I've used.
> I'm just wondering, and I'm sure you all would know - should I learn
Perl?
> Is it considered a necessity for a web developer to know Perl, or is
it not
> a worthwhile endeavor, considering how easy PHP is to learn and use?
Someone
> I know told me not to bother, but I just wanted a second opinion.
> (BTW - if you think it is worthwhile to learn Perl, what is a good
book to
> begin with?)

Yeah, you should learn Perl.  Programming Perl by O'Reilly is the best
book out there for that.  Then check out the Perl Cookbook by O'Reilly
after that.  Perl is much more powerful than PHP, but PHP is easier to
integrate in to web pages.  But not by much.  Perl is like a swiss army
chainsaw.  You can use it for pretty much anything, data manipulation
wise.  That's where it really shines.  PHP has gotten better with PHP4's
release, but Perl's syntax is much more lenient and intuitive, making it
much easier to do things in Perl than it is in PHP.

 -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/



-- 
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] Re: How to stop a previous page being repeated ?

2001-07-18 Thread Paul A. Procacci

use javascript to check the histroy.  If the document.history points to
the file your at then redirect?  :)

Cn Yeong wrote:
> 
> How do I stop a previous page being repeated when the
> user hits their back button on the browser?
> 
> Is PHP can do it?
> 
> __
> 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] System() and PGP

2001-07-18 Thread David Price

I have been trying to run PGP commands within PHP with the system()
function.  PGP is installed on the web server, and all the commands work
fine when I'm su'ed as the nobody user (the web server user).

I can use this command to encrypt messages:

system("pgp -ea $plainTxt 'David Price <[EMAIL PROTECTED]>'");

without any problems.  But when I try,

 system("pgp");

I don't get any output.  It should display the general help text.  I can run
other commands like ls and ps without any problems as well.  Does anyone
know what is going on here?

Thanks for your help,

David Price


-- 
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] File Upload Headaches

2001-07-18 Thread Jason Rennie

Hi all,

Can anybody see what is wrong with this code ??


echo "\$userfile = $userfile";
echo $HTTP_POST_FILES['userfile']['tmp_name'];


// now to provide an assignment submission box
print "";
print "\n";
print "\n";
print "Submit A File ";
print "\n";
print "\n";
print ""; 


this is just a code fragment but, essentially the form submits back to
itself.

When i try to output the $HTTP_POST_FILE['userfile']['any thing']
variables they are not set, and $userfile is simply set to the filename on
the other computer.

Any ideas about what an earth i'm doing wrong 

Jason


-- 
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] Re: OT Math Question

2001-07-18 Thread Paul A. Procacci

Well, If I'm right.  The total number of posible combinations in the NJ
state lottery, assuming there are, say, 56 numbers is 

var total = 56;

total*(total-1)*(total-2)*(total-3)*(total-4)*(total-5) == 23377273920:1

Now that assuming one number was pulled from the pot and the same number
didn't exists in the pot.  Now, please anyone correct me if I'm wrong,
but I believe the solution to rm's quesion is as follows:

var dp_menus = 4   // Number of drop-down menus
var dp_items = 5   // Number of dp_items per menu

dp_menus^dp_items == 1024:1 //Total number of possibilities

Does that look right?  I hope this helps

Paul.


Rm wrote:
> 
> if i have four drop down menus with five values in
> each, and the values are the same for each of the four
> drop down menus, how many variations are there without
>  duplicates, any dups,
> 
> I though the formula was 5 to the 4th power minus 5,
> this can't possibly be right.
> 
> math impaired and trying to fake it
> 
> rm
> 
> __
> 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] Re: php/mysql ecommerce solution

2001-07-18 Thread Paul A. Procacci

I agree with Chris.  The Exchange Project has been one of my personal
favorites as well.  www.theexchangeproject.org   :)

Duane Douglas wrote:
> 
> hi gang!
> 
> i'm looking for a php/mysql ecommerce solution.  i want something that is
> ready made and fully customizable.  i'm looking at phpShop:
> .  has anyone used this solution?  if so, what
> where your experiences?  can anyone suggest or recommend another solution
> that fits my requirements?
> 
> tia
> 
> if (duane.douglas) { technologies = asp && php && cgi_perl && cold fusion
> && xml && xsl && sql server && mysql && javascript }

-- 
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] Re: Command line args HELP!!!

2001-07-18 Thread Paul A. Procacci

That is not the problem!  Read below.  This issue was resolved.  It _is_
a bug, and is on the todo list for the php programmers.  :)

Elias wrote:
> 
> argv
> Array of arguments passed to the script. When the script is run on the
> command line, this gives C-style access to the command line parameters. When
> called via the GET method, this will contain the query string.
> 
> argc
> 
> Contains the number of command line parameters passed to the script (if run
> on the command line).
> 
> try'em
> 
> "Paul A. Procacci" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hey all,
> > I tried passing an argument to a php script that had a plus sign (+)
> > in one of the arguments.  Observe the following:
> >
> > 
> > http://altavista.com/sites/search/web?q=task+management&pg=q&kl=XX
> >
> > As it turns out the argument gets split into two seperate arguments, but
> > I would like to keep it as one argument.  Does anyone know how to
> > accomplish this.  I posted a bug report to bugs.php.net, and they
> > responded by telling me to read:
> > http://www.php.net/manual/en/language.variables.external.php
> >
> > But still after searching that page for the information I was looking
> > for, nothing seemed to work.  Am I missing something.  Please let me
> > know.
> >
> > Thanks,
> > Paul
> >

-- 
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] Weekly Separation

2001-07-18 Thread Jason Murray

> Ive been working on a way but it seems a very long and 
> involved method. Has anyone got any pointers or ideas 
> they might be able to throw at me so I can make this 
> a more simple method.

Assuming you know the date of each entry, do a Date("z")
(day of the year), and divide it by 7. 

Store that and compare it next time around the loop.

If it's different then a week has passed and you can 
do Fun Stuff(tm).

If it's the same then it hasn't.

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"Work now, freak later!"

-- 
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] Weekly Separation

2001-07-18 Thread Chris Aitken

Hey all,


Im working on a system to be able to take a big list of entries that is 
sorted by a date field, and be able to identify them into weekly groups 
(monday to monday or sunday to sunday etc).

So basically, for the example here, say I had 100 entries over a 1 month 
period. What I want to be able to do is, as the 'while' loop is running, 
every time a weeks worth of entries passes it does some defined task 
(alternate colour, insert a line break or whatever).

Ive been working on a way but it seems a very long and involved method. Has 
anyone got any pointers or ideas they might be able to throw at me so I can 
make this a more simple method.



Thanks


Chris


--
 Chris Aitken - Administration/Database Designer - IDEAL Internet
  email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
  __-__
   *** Big Brother ***
It just shows that the dull will rule the world. And we will be watching 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]




[PHP] Compiling PHP4.04 with PEAR - PROBLEM!

2001-07-18 Thread Derek Truong

While trying to recompile php with PEAR, I came across this error..

Making install in pear
make[1]: Entering directory
`/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6/pear'
make[2]: Entering directory
`/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6/pear'
shtool:mkdir:Error: invalid number of arguments (at least 1 expected)
shtool:mkdir:Hint:  run
`/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6/build/shtool mkdir -h' or
`man shtool' for details
+--+
| The installation process is incomplete. The following resources were |
| not installed:   |
|  |
|   Self-contained Extension Support   |
|   PEAR: PHP Extension and Add-on Repository  |
|  |
| To install these components, become the superuser and execute:   |
|  |
|   # make install-su  |
+--+
make[2]: *** [install-data-local] Error 5
make[2]: Leaving directory
`/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6/pear'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory
`/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6/pear'
make: *** [install-recursive] Error 1
root@degree [/home/detain/Apachetoolbox-1.5.33/src/php-4.0.6]#

I dunno why it's not installing and asking me to su as a superuser and run
make install-su..
I am root! =P .. I tried removing the whole php-4.0.6 directory and untar it
to compile fresh.. but still getting this error.

My compile string is:
./configure  --prefix=/usr/local --with-apache=/home/detain/Apachetoolbox-1.
5.33/apache_1.3.20 --with-pear --with-mcrypt --with-dom --with-pcre --enable
-exif --enable-track-vars --with-calendar=shared --enable-safe-mode --enable
-magic-quotes --enable-trans-sid --enable-wddx --enable-ftp --with-gd --enab
le-gd-native-ttf --with-t1lib=/usr/local/lib/php/t1libs --with-jpeg-dir=/hom
e/detain/Apachetoolbox-1.5.33/src/jpeg-6b --with-png-dir=/home/detain/Apache
toolbox-1.5.33/src/libpng --with-zlib-dir=/home/detain/Apachetoolbox-1.5.33/
src/zlib --with-ttf --with-freetype-dir=/usr --with-mhash --with-openssl --w
ith-curl=/usr/local --enable-sysvshm --with-bcmath --with-mysql=/usr --with-
pgsql




-- 
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] security, receiving html from a form

2001-07-18 Thread Matt Greer


- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>

> > I know I could use HTMLSpecialChars() and then devise my own mark up
system;

>
> You could also define a list of tags you allow and pass them to the
> strip_tags() function.  See http://php.net/strip_tags
>
Interesting. Thanks for the link, it gave me some good stuff to think about.
strip_tags() appears to have some holes in it, but the comments offered
provided some work arounds.

Matt



-- 
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] MySQL Query.....

2001-07-18 Thread Deependra B. Tandukar

Thanks but it is not working!

My problem goes like this:
Frankly speaking I am trying to make web based accounting package for my
organization.

I have talbes:
Voucher
Sales
Cash
Bank
Income
Expenses, etc.

All are of the follwoing structure
VN Date   AccountHead AccountType DrCr
Remarks

Suppose there is a entry like in Voucher
1012001-07-18 Sales FixedAsset  0   5000
Monitor sold
1012001-07-18 Cash CurrentAsset   5000   0
Monitor sold

In Sales
1012001-07-18 Cash CurrentAsset 5000  0
Monitor sold

In Cash
1012001-07-18  SalesFixedAssets  0   5000
Monitor sold

Now if I have to have Bank in place of Cash with VN=101, I simply go and
change in Voucher HTML form and press "Submit button", it takes effect in
all the required tables except in Sales (the entry should chage from Cash to
Bank in this case). ( for you info I am using

while ($row=mysql_fetch_array($query)) {
$VN=$row["VN"];
$Date=$row["Date"];
$AH=$row["AccountHead"];
$AT=$row["AccountType"];
$Dr=$row["Dr"];
$Cr=$row["Cr"];
$Remarks=$row["Remarks"];
echo "




";
};

I am trying to select Sales table from TableCash.AccountHead. In fact I am
trying to select an AccountHead from Cash where VN=101 and converting the
AccountHead into Table name. In HTML, both the AccountHead are named as AH

So is there any way that converts selected Cash.Sales from (Table)Cash into
(Table)Sales? I did something like "Update $AH.AccountHead  (AccountHead)
values ($AH)";

By doing this the error I get is "Bank.Sales" table not exist.

Looking forward to hearing from you.

Warm Regards,
DT
- Original Message -
From: "py_sympatico" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 10:10
Subject: Re: [PHP] MySQL Query.


> Try,
> "select '$TableItem'.list where id = 1";
>
> py
>
> - Original Message -
> From: Deependra B. Tandukar <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 18, 2001 12:14 AM
> Subject: [PHP] MySQL Query.
>
>
> > Greetings !
> >
> > I have following tables in MySQL:
> >
> > TableItem
> > idlist
> > 1 Banana
> > 2 Orange
> > 3 Mango
> >
> > Other tables are:
> > Banana, Orange, Mango
> >
> > Instead of selecting Table Banana directly I need to select it as
"select
> > $TableItem.list where id=1" or something like that for editing or
deleting
> > items in Table Banana . I tried to do like this but doesn't work. Does
it
> > work somehow?
> >
> > Looking forward to hearing from you.
> >
> > Warm Regards,
> > DT
> >
> >
> >
> > --
> > 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] sql query successful

2001-07-18 Thread David Robley

On Thu, 19 Jul 2001 03:54, Tyler Longren wrote:
> Hello everyone,
>
> I've been writing database enabled site for quite a while now.  One
> thing I have never figured out it how to determine if a sql query is
> successful.
>
> This works:
> if ($connection = mysql_connect("host","username","password")) {
> print "Successful connection":
> }
> else {
> print "No connection";
> }
>
> But this won't work:
>
> if ($sql = mysql_query("SELECT * FROM table ORDER BY rand()")) {
> print "SQL executed successfully.";
> }
> else {
> print "SQL not executed successfully.";
> }
>
> Can anyone tell me how I can tell if the SQL executed successfully?  Is
> there any method besides OR DIE?
>
> Thanks,
> Tyler

You might want to look into mysql_errno and mysql_error; also 
mysql_affected_rows to give you feedback on INSERT, UPDATE and DELETE 
operations

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Can I yell "movie" in a crowded firehouse?

-- 
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: PHP vs Perl Question

2001-07-18 Thread Francis Fillion

Well then, maybe you don't have/need to learn perl, perl is a pretty
good language for system administration of any sort, if you were on
Unix/Linux well yes of course but on WIndows. I think the better things
for you is to learn PHP and know everythings about it. If you have to
use time for php and perl, you will lose your time, begin with php and
after that if you want to learn perl go for it.

Tom Malone wrote:
> 
> I haven't been to Barnes & Noble yet, so I'm not sure if I will get the
> O'Reilly or the Wrox book yet, but supposing I went with O'Reilly, I wonder
> which would be better: Learning Perl 3rd Edition, or Learning Perl on Win32
> Systems? I don't have much experience with Unix or Linux (minimal), but on
> the other hand, I use Windows ME, not NT. Also, I wonder if the Learning
> Perl on Win32 book might not me geared more towards NT administrators (I'm a
> web designer). Sorry this is so OT, but I really need to know and you people
> are the experts.
> 
> Tom
> 
> >I'd go for it. Perl can be messy, but it is also quite powerful and
> >doesn't HAVE to be messy. It is EVERYWHERE both in terms of availability
> >and use. But most of all, it is a fun language to play with... and if you
> >do any system admin it is an indispensable tool.
> 
> >I recommend _Beginning Perl_ from Wrox over _Learning Perl_ by O'Reilly,
> >but only by a hair. Both are good.
> 
> >c
> 
> --
> 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]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] mime types & file uploads

2001-07-18 Thread Carolyn Campbell

I have a strange problem.  When I upload files, the mime-type gets 
appended to the top of the file, so if I upload a text file

Content-Type: text/plain

is appended to the top.  It's causing images to break.  Has anyone 
had similar problems?

-- 


[PHP] Cannot start Apache

2001-07-18 Thread Chetan Ganpati

Hello,

I am trying to install PHP4 on a redhat 6.2 box.
I have got mysql-3.23-39 and apache-1.3.14-2.6.2
installed.
I did a 
./configure --prefix=/usr/local/php
--with-config-file-path=/usr/loca/php
--with-apxs=/usr/sbin/apxs
--with-mysql=/usr/local/mysql  --enable-track-vars
--enable-magic-quotes --enable-debugger

and then a make and make install

when i try to restart apache i get this error:-
Starting httpd: Syntax error on line 873 of
/etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp4.so into server:
/etc/httpd/modules/libphp
4.so: undefined symbol: uncompress

line 873 is this
LoadModule php4_modulemodules/libphp4.so and
the next is
AddModule mod_php4.c

Would be grateful if someone could help me

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




Re: [PHP] Re: a good PHP editor

2001-07-18 Thread Matthew Garman

On Wed, Jul 18, 2001 at 06:43:55PM -0400, Tom Malone wrote:
> I think that both TextPad and NoteTab are excellent editors, with TextPad
> being the better of the two.

If it hasn't been mentioned already, check out vim (www.vim.org).  I got
hooked on it using by using Linux.  This summer I'm interning at a place
where there is no alternative to Windows.  Fortunately, vim has been
ported to win32...

Of course non-Unix folks might find vi-like editor kind of goofy... but
it's worth a try, you might like it :)

MG

-- 
Matt Garman, [EMAIL PROTECTED]
"I'll tip my hat to the new constitution, Take a bow for the new revolution
 Smile and grin at the change all around, Pick up my guitar and play
 Just like yesterday, Then I'll get on my knees and pray..."
-- Pete Townshend/The Who, "Won't Get Fooled Again"


-- 
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] Re: PHP vs Perl Question

2001-07-18 Thread Tom Malone

I haven't been to Barnes & Noble yet, so I'm not sure if I will get the
O'Reilly or the Wrox book yet, but supposing I went with O'Reilly, I wonder
which would be better: Learning Perl 3rd Edition, or Learning Perl on Win32
Systems? I don't have much experience with Unix or Linux (minimal), but on
the other hand, I use Windows ME, not NT. Also, I wonder if the Learning
Perl on Win32 book might not me geared more towards NT administrators (I'm a
web designer). Sorry this is so OT, but I really need to know and you people
are the experts.

Tom


>I'd go for it. Perl can be messy, but it is also quite powerful and
>doesn't HAVE to be messy. It is EVERYWHERE both in terms of availability
>and use. But most of all, it is a fun language to play with... and if you
>do any system admin it is an indispensable tool.

>I recommend _Beginning Perl_ from Wrox over _Learning Perl_ by O'Reilly,
>but only by a hair. Both are good.

>c


-- 
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] Re: Simple validation problem

2001-07-18 Thread CC Zona

In article <00ef01c10fa5$fd20f2e0$e064fea9@py>, [EMAIL PROTECTED] (Py) 
wrote:

> I am trying to make shure the amount is positive

if($amount >0)
   {...}

> and is a float

if(is_float($amount))
   {...}

-- 
CC

-- 
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] Re: a good PHP editor

2001-07-18 Thread Tom Malone

>How weird. I have an old computer windows Win 98 with only 64M RAM and I've
>never had any problem with Homesite. I'm always running it and at least 2-4
>browser windows and Eudora with no problems.

>Perhaps I've just been lucky, but I've been using Homesite since it was
>shareware. :)

HomeSite used to be a great editor until version 4 - that's when it began to
have memory problems, and that's when I switched to TextPad (although this
EditPlus
editor looks pretty good!)

Tom


-- 
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] Re: PHP- something i don't undestand

2001-07-18 Thread craig

Do it like this

$sqry_linx = mysql_query("SELECT * FROM linx ORDER BY 'linkcat'");

$link = mysql_fetch_array($sqry_linx);

"Yassel Omar Izquierdo Souchay" <[EMAIL PROTECTED]> wrote in message
001c01c10eff$1235ce50$2401020a@yois">news:001c01c10eff$1235ce50$2401020a@yois...
> Hi
> I'm having
> trouble with  this part of code
>
> 9:   $result = mysql_db_query("users", $query);
> 10: $r=mysql_fetch_array($result);
>
> The error message is :
> Warning: Supplied argument is not a valid MySQL result resource in
> c:\inetpub\wwwroot\PhpAndMysqlTest\test2\reg1.php3 on line 9.
>
> Please if somebody knows what it's wrong
> thanks
> Yassel
>



-- 
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] security, receiving html from a form

2001-07-18 Thread Rasmus Lerdorf

> For my website I created an updating system in php. Where my staff and I can
> write articles that then get saved to the server, linked to, etc. I allowed
> html to be passed from the form because a lot of the staff likes to use html
> tags in their articles. Which I know is a security issue.
>
> I know I could use HTMLSpecialChars() and then devise my own mark up system;
> which I will if I have no other alternative. But I was wondering if just
> searching the article string for "", " the file if they're found would suffice. That almost seems too simple
> though.

You could also define a list of tags you allow and pass them to the
strip_tags() function.  See http://php.net/strip_tags

-Rasmus


-- 
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] security, receiving html from a form

2001-07-18 Thread Matt Greer

For my website I created an updating system in php. Where my staff and I can
write articles that then get saved to the server, linked to, etc. I allowed
html to be passed from the form because a lot of the staff likes to use html
tags in their articles. Which I know is a security issue.

I know I could use HTMLSpecialChars() and then devise my own mark up system;
which I will if I have no other alternative. But I was wondering if just
searching the article string for "", "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] ImageCreate has failed... help please (urgent)

2001-07-18 Thread Thiago Locatelli da Silva

Hi there... 
Well, i have php 4.0.6 under windows 98 and i'm havin' some problens to use JPGRAPH 
1.2.2 
. I have this string as error: 
"Fatal error: Call to undefined function: imagecreate() in 
c:\utils\www\graph\jpgraph.php on line 2025" 
jpgraph.php file: 
2025: $this->img = ImageCreate($aWidth, $aHeight);


-- 
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] a good PHP editor

2001-07-18 Thread Francis Fillion

Thanks, this mode look better, well it has better color coding then they
old one, option in function are in bold pink... ;)

Chris Lott wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Emacs on windows is great, and php-mode (there are a few. One that I have
> a link close to hand for is at: http://sourceforge.net/projects/php-mode/
> ) is cool. I don't usually recommend it because it can be a pain to get
> setup optimally, but once it is you can do everything within it: edit
> documents, edit code and compile/test, use news, check mail, you name it.
> 
> c
> 
> -BEGIN PGP SIGNATURE-
> Version: PGP 7.0.3- signed for information authentication and security
> Comment: Key ID: 0x51046CFD
> 
> iQA/AwUBO1YiENaLYehRBGz9EQJnqgCg2FVY0EoHWgat8b5BSycAdNa9kf8AoL80
> yQtjZOcK+MYAC6VKrl+cFIbE
> =X7QV
> -END PGP SIGNATURE-
> 
> --
> 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]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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]




Re: [PHP] Piping Mime String to Metamail Fails -- Solution

2001-07-18 Thread Jeff Hill

Don Read wrote:
> 
> On 13-Jul-01 Jeff Hill wrote:
> > Don Read wrote:
> >> On 13-Jul-01 Jeff Hill wrote:
> >> > Don Read wrote:
> >> >> On 13-Jul-01 Jeff Hill wrote:
> >> >> > I've tried everything I can to pipe a string with mime content to
> >> >> > metamail, but it fails in every variation of:

>-<

> ok, i was thinking system(), but was on the fpassthru page in the manual ...
> sorry.
> But looking at your while (!feof()) loop above ...
> Hey, there are limits to a shell argument length, ya know.

Actually, I truly am ignorant of the limits, but hopefully I've avoided
any disastrous outcomes in my solution.

> alternative:
> $p=popen('/usr/bin/metamail -d -q -r -w -x -y','w');
> fwrite($p, $mime_string);
> pclose($p);
> 

I tried your code above, and while it did process the mime, it didn't
return the results so that I could determine the file name. I did try
many different tacks, but nothing seemed to work -- that may of course
just be due to my limited knowledge.

After messing with this for several days, I found that metamail was a
poor choice anyway, reading that development has apparently stopped and
that it has a security hole in the current version. 

I then tried reformime, from the maildrop package. It worked better, but
I ran into the same problems trying to get it to work with PHP.

In the end, I opted to have my mail server (qmail) pipe incoming
messages to MHonArc (it does a wonderful job handling mime). MHonArc
extracts the mime and then passes the rest of the message to PHP, which
puts it into an MySQL database. This may not be an elegant solution, and
I suspect it's wasteful of resources, but my usage is only for our
internal customer support and contact management -- a hundred or so
e-mail a day.

While this took far longer than I ever expected, it is wonderful to be
able to match incoming mail against our user database (which is in
MySQL). Now a user's entire record, past e-mail, followups and the whole
thing pop-up whenever they send us a message.

Thanks for all the effort. 

Best Regards,

Jeff Hill


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

-- 

--  HR On-Line:  The Network for Workplace Issues --
http://www.hronline.com - Ph:416-604-7251 - Fax:416-604-4708


-- 
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] a good PHP editor

2001-07-18 Thread Chris Lott

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Emacs on windows is great, and php-mode (there are a few. One that I have
a link close to hand for is at: http://sourceforge.net/projects/php-mode/
) is cool. I don't usually recommend it because it can be a pain to get
setup optimally, but once it is you can do everything within it: edit
documents, edit code and compile/test, use news, check mail, you name it.

c

-BEGIN PGP SIGNATURE-
Version: PGP 7.0.3- signed for information authentication and security
Comment: Key ID: 0x51046CFD

iQA/AwUBO1YiENaLYehRBGz9EQJnqgCg2FVY0EoHWgat8b5BSycAdNa9kf8AoL80
yQtjZOcK+MYAC6VKrl+cFIbE
=X7QV
-END PGP SIGNATURE-

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




RE: [PHP] PHP vs Perl question

2001-07-18 Thread Chris Lott

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'd go for it. Perl can be messy, but it is also quite powerful and
doesn't HAVE to be messy. It is EVERYWHERE both in terms of availability
and use. But most of all, it is a fun language to play with... and if you
do any system admin it is an indispensable tool.

I recommend _Beginning Perl_ from Wrox over _Learning Perl_ by O'Reilly,
but only by a hair. Both are good.

c

-BEGIN PGP SIGNATURE-
Version: PGP 7.0.3- signed for information authentication and security
Comment: Key ID: 0x51046CFD

iQA/AwUBO1YhadaLYehRBGz9EQJcIACgw3pQ3O4fhIbIQUOA84JLclcTOq0AoN5f
Q9Em4S5fJ/h7eS6cpYigOLtZ
=VYmH
-END PGP SIGNATURE-

-- 
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] a good PHP editor

2001-07-18 Thread Francis Fillion

Well the site where I find it out doesn't seen to have anymore, so here
it is. It doesn't do much except highlighting stuff, no function
completion or something like that and I have access to the C menu, I
should search again I'm sure that I will found something better.



;;PHP MODE from http://zez.org/bf/

(require 'font-lock)
(require 'cc-mode)

(provide 'php-mode)

;;;###autoload
(define-derived-mode php-mode c-mode "PHP3"
  "Major mode for editing PHP code.\n\n\\{php-mode-map}"
  (setq case-fold-search t)
  (turn-on-font-lock)
  (setq font-lock-maximum-decoration t)
  )

;; Make php-mode the default mode for PHP source code buffers.
;;;###autoload
(setq auto-mode-alist
  (append
   '( ("\\.php\\'" . php-mode) ("\\.php3\\'" .
php-mode)("\\.php4\\'" . php-mode) )
   auto-mode-alist))

;; Make a menu keymap (with a prompt string)
;; and make it the menu bar item's definition.
(define-key php-mode-map [menu-bar] (make-sparse-keymap))
(define-key php-mode-map [menu-bar php]
  (cons "PHP3" (make-sparse-keymap "PHP3")))

;; Define specific subcommands in this menu.
(define-key php-mode-map [menu-bar php complete-function]
  '("Complete function name" . php-complete-function))
(define-key php-mode-map
  [menu-bar php document-function]
  '("View function documentation" . php-document-function))
(define-key php-mode-map
  [menu-bar php browse-manual]
  '("Browse manual" . php-browse-manual))

;; Define function name completion function
(defun php-complete-function ()
  "Complete the function name at the point from known PHP3 functions."
  (interactive)
  (message "php-complete-function not implemented yet"))

;; Define function documentation function
(defun php-document-function ()
  "Bring up documentation for the function at the point."
  (interactive)
  (message "php-document-function not implemented yet"))

;; Define function for browsing manual
(defun php-browse-manual ()
  "Bring up manual for PHP3."
  (interactive)
  (message "php-browse-manual not implemented yet"))

;; Define abbreviations and their expansions
(define-abbrev php-mode-abbrev-table "ex" "extends")
(define-abbrev php-mode-abbrev-table "fu" "function")
(define-abbrev php-mode-abbrev-table "GL" "GLOBAL")
(define-abbrev php-mode-abbrev-table "req" "require(")
(define-abbrev php-mode-abbrev-table "ret" "return")

;; Set up font locking
(defconst php-font-lock-keywords-1 nil
  "Subdued level highlighting for PHP mode.")

(defconst php-font-lock-keywords-2 nil
  "Medium level highlighting for PHP mode.")

(defconst php-font-lock-keywords-3 nil
  "Gauchy level highlighting for PHP mode.")

(let* (
   (php-keywords 
(regexp-opt
 '("break" "continue" "do" "else" "for" "if" "return"
   "switch" "while" "super" "new" "extends" "php" ) t))
   (php-types
(regexp-opt
 '("static" "const" "int" "integer" "real" "double" "float"
   "string" "array" "object" "var" "GLOBAL" "function")))
   (php-builtins
(regexp-opt
 '("echo" "print" "require" "include")))
   )
  (setq php-font-lock-keywords-1
(list
 ;; Fontify type specifiers.
 (cons (concat "\\<\\(" php-types "\\)\\>")
'font-lock-type-face)
 ))

  (setq php-font-lock-keywords-2
(append php-font-lock-keywords-1
  (list
   ;; Fontify keywords (except case, default and goto; see below).
   (cons (concat "\\<" php-keywords "\\>") 'font-lock-keyword-face)
   ;;
   ;; Fontify case/goto keywords and targets, and case default/goto
tags.
   '("\\<\\(case\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?"
 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
   ;;
   ;; Fontify all constants.
   '("\\<\\(false\\|null\\|true\\)\\>" .
font-lock-constant-face)
   ;;
   ;; Fontify function declarations
   '("\\<\\(function\\)\\s-+\\(\\sw+\\)\\s-*("
 (1 font-lock-keyword-face)
 (2 font-lock-function-name-face)
 )
   )
  ))

  (setq php-font-lock-keywords-3
(append php-font-lock-keywords-2
  (list
   ;; Fontify function and method names
  
'("\\<\\(\\$\\([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\)->\\)?\\([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\)\\s-*("
 (2 font-lock-variable-name-face t t)
 (3 font-lock-function-name-face t t)
 )
   ;; Fontify variable name references.
  
'("\\(\\$\\([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*->\\)?\\([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\)\\)"
 (1 font-lock-variable-name-face t t)
 (2 font-lock-variable-name-face t t)
 )
   '("\\<\\$\\(this\\)->"
 (1 font-lock-keyword-face t t) ;; "this" as keyword
 )
   ;; Fontify class names
  
'("\\<\\(class\\)\\s-+\\([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\)\\(\\(\\s-+extends\\s-+\\)\\([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\)\\)?\\s-*\\{"
 (1 font-lock-keyword-face t t)  ;; class keyword
 (2 font-

RE: [PHP] PHP Security

2001-07-18 Thread Montz, James C. (James Tower)

I found a great windows PHP IDE called PHP Coder.  Reminds me a bit of
ColdFusion Studio.

The website is http://www.phpide.de 

-Original Message-
From: Ray Parish [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 5:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Security


Hey All,

For a virtual hosting stand point, which is better to run, the module or
the cgi version of php? Can you also explain why one is better than the
other..?

Thanks

Ray Parish, RHCE


-- 
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 case of a web page/application

2001-07-18 Thread Dennis Gearon

CAn anyone else think of any other sources or sinks of information for a web
page/application? (Input or outputs of a script)

User
Session ID
Session
Script Assigned Page ID
Environment Vars
Local Files
Remote Files
Images
Database
Server Messages
CreditCardCo
Mapping Company
Email Engine

-- 
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] Code Refusing to Die

2001-07-18 Thread rm

try using fsockopen from the php network functions
works better than fopen...we use it to run wget on one
of our machines...fopen is supposed to report
false on failure, however, we don't use it for
connections outside our file system and even then we
always use file_exists before using fopen on the local
machine...it should report false.

> What I don't understand is why the die statement
> never executes.
> If you try to fopen a file that doesn't exist
> shouldn't fopen return false?
> 


__
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] PHP Security

2001-07-18 Thread Ray Parish

Hey All,

For a virtual hosting stand point, which is better to run, the module or
the cgi version of php? Can you also explain why one is better than the
other..?

Thanks

Ray Parish, RHCE


-- 
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] Re: a good PHP editor

2001-07-18 Thread Tom Malone

I think that both TextPad and NoteTab are excellent editors, with TextPad
being the better of the two.

Tom


-- 
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] a good PHP editor

2001-07-18 Thread Alexander Skwar

So sprach »Francis Fillion« am 2001-07-18 18.07.2001 um 18:11:35 -0400 :
>  The best editor is emacs, you can have one in windows too and it's

Actually I like vim better :)  Emacs is just so HUGE :)

> I use they php mode, it's not perfect but it do the job, I will need to

Does Emacs (Emacs?  Hmm, what about XEmacs?) have a PHP mode?  Last time
I checked, it did not - although I used XEmacs back then.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 hour 17 minutes

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




RE: [PHP] PHP vs Perl question

2001-07-18 Thread Nathan

I personally try and avoid using Perl when I can. Perl is difficult to
learn to write proficient code in. Perl's moto is, "There is More Than
One Way to Do It" which also mean there are more than a million ways to
mess up. Depending upon the programmer Perl can be a write-only
language. You can even look at your own Perl code and think "What in the
world, did I write this?" My mind is cluttered with enough garbage so I
will not learn anymore  Perl than necessary. Long live modern languages!

Perl is a necessary evil for a web developer, so I recommend O'Reilly's
Learning Perl, http://www.oreilly.com/catalog/lperl3/

-Original Message-
From: Tom Malone [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 18, 2001 3:03 PM
To: PHP Users
Subject: [PHP] PHP vs Perl question

I'm pretty new to programming - besides JavaScript, PHP is really the
first
language I've used.
I'm just wondering, and I'm sure you all would know - should I learn
Perl?
Is it considered a necessity for a web developer to know Perl, or is it
not
a worthwhile endeavor, considering how easy PHP is to learn and use?
Someone
I know told me not to bother, but I just wanted a second opinion.
(BTW - if you think it is worthwhile to learn Perl, what is a good book
to
begin with?)

Thank you!
Tom Malone


-- 
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 ecommerce solution

2001-07-18 Thread chris schneck

The Exchange Project is by far my favorite.
www.theexchangeproject.org

- Original Message -
From: "Duane Douglas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 2:59 PM
Subject: [PHP] php/mysql ecommerce solution


> hi gang!
>
> i'm looking for a php/mysql ecommerce solution.  i want something that is
> ready made and fully customizable.  i'm looking at phpShop:
> .  has anyone used this solution?  if so, what
> where your experiences?  can anyone suggest or recommend another solution
> that fits my requirements?
>
> tia
>
> if (duane.douglas) { technologies = asp && php && cgi_perl && cold fusion
> && xml && xsl && sql server && mysql && javascript }
>
> --
> 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] Question about hosting

2001-07-18 Thread Alexander Skwar

So sprach »Francis Fillion« am 2001-07-18 18.07.2001 um 17:55:41 -0400 :
> thing. Then an other thing is to take big table and put them in smaller
> table, way faster for writing/reading (hum, I don't quite remember if

Good idea.  Combined with MERGE tables, this might really boost
performance when reading.  Just let the table grow to, let's say, 500k
rows and then create a new table.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 hour 1 minute

--
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] Question about hosting

2001-07-18 Thread Alexander Skwar

So sprach »Martin Marconcini« am 2001-07-18 18.07.2001 um 18:44:21 -0230 :
> Database on one SCSI disk, WEBsites on ANOTHER and preferably OS on
> another different. That way three partitions can be read at the same

Hmm, actually I'd also suggest to use RAID - real RAID I mean, not
software RAID.  Using two (or more) disks will speed things up
tremendously, because the system will then read and write simultaneously
from multiple disks.

> time.  (Forget crappy 'ultrasuperfast IDE'... )

yep.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 0 hours 58 minutes

--
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] a good PHP editor

2001-07-18 Thread Francis Fillion

 The best editor is emacs, you can have one in windows too and it's
free  as beer ;)

I use they php mode, it's not perfect but it do the job, I will need to
learn lisp someday...

doug wrote:
> 
> Hiya everybody,
> I'm relatively new to PHP and I'm looking for a good text editor on
> win2k for creating/manipulating php pages. Notepad is great if your in a
> bind, and I've tried phpedit and activestate's Komodo and both seem to have
> problems (crashing etc...). Anybody got any suggestions? Free/small fee
> programs doesn't matter Thanks
> 
> Doug Henry
> 
> --
> 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]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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]




Re: [PHP] HTML in XML???

2001-07-18 Thread Brian White

At 14:10 18/07/2001 +, Leon wrote:
>Hi,
>Is there some way to include HTML tags in a XML doc???
>I want to use a XML document to include HTML data for my
>webpage. I have made a solution of replacing a special word to
>the '<' and '>" of a HTML tag.
>But I think my solution is very stupid.


How you do this does in depends on your requirements.

Is this blob of HTML data something you need to be able to parse
into and analyse, or is only ever going to be used as a single
unit? In that case your solution is probably the best one, except
I would make sure you use the standard mappings for this which
are
  "<" ==>   "<"
  ">" ==>   ">"
   pre-existing "&"   ==>   "&"

as any XML tool worth it's salt will provide a simple way to do
this transformation. The php function for encoding a lump of
text in this way is "htmlspecialchars", and I suspect the XML
parser will autonmatically decode it for you.

If this is a blob of data you need to be able to analyse then
is not HTML any more, so much as an integral part of the
structure of your document that has certain similarities with
HTML. If you are using a DTD, I would figure out what HTML
you actually need and define a subset of allowable elements
and use those.

If you are using merely well formed XML, then you can slot in whatever
you like, as long as
a) You have it wrapped up in a element name liked ""
b) Your HTML is XHTML
However, I personally thing not having a DTD give you no discipline,
structure or specification and is a bad idea.




>And is there a special php xml newsgroup??
>
>thanks,
>Leon
>
>
>
>--
>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]

-
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [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 vs Perl question

2001-07-18 Thread Francis Fillion

 I do love perl, even if I mostly code with PHP, but I use perl for
stuff that run with a crontab (a script that run on every x date or
hours), I know that you can do that with PHP now too, but Perl is a
really great and funny language to learn, the best regular expression
that I ever use (I still use the perl regular expresion in PHP), just
for that you should learn they language. Once you know a language it's
easy to change or learn an other one, the best thing should be learn
what you need and get good on this one and if you need an other language
then the stuff that you have learned will help you up to learn you new
stuff.

Book: Learning Perl from O'reilly, O'reilly have the better good,
amazing book for Perl.

Tom Malone wrote:
> 
> I'm pretty new to programming - besides JavaScript, PHP is really the first
> language I've used.
> I'm just wondering, and I'm sure you all would know - should I learn Perl?
> Is it considered a necessity for a web developer to know Perl, or is it not
> a worthwhile endeavor, considering how easy PHP is to learn and use? Someone
> I know told me not to bother, but I just wanted a second opinion.
> (BTW - if you think it is worthwhile to learn Perl, what is a good book to
> begin with?)
> 
> Thank you!
> Tom Malone
> 
> --
> 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]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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] PHP vs Perl question

2001-07-18 Thread Tom Malone

I'm pretty new to programming - besides JavaScript, PHP is really the first
language I've used.
I'm just wondering, and I'm sure you all would know - should I learn Perl?
Is it considered a necessity for a web developer to know Perl, or is it not
a worthwhile endeavor, considering how easy PHP is to learn and use? Someone
I know told me not to bother, but I just wanted a second opinion.
(BTW - if you think it is worthwhile to learn Perl, what is a good book to
begin with?)

Thank you!
Tom Malone


-- 
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] a good PHP editor

2001-07-18 Thread Alexander Skwar

So sprach »Schill, Johannes« am 2001-07-18 18.07.2001 um 22:24:21 +0200 :
> I haven't seen any other programs for Windows you can edit remote files
> instead of the usual "download, edit, upload". Let me know if there are

How does that work?  Is it just that it has some kind of simple FTP
client builtin?

> There are three bad things about this program though;
> 1, The price - $99 usd ($89 if you download it).

Well, we now how do deal with that one, don't we? :(

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 0 hours 47 minutes

--
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/mysql ecommerce solution

2001-07-18 Thread Duane Douglas

hi gang!

i'm looking for a php/mysql ecommerce solution.  i want something that is 
ready made and fully customizable.  i'm looking at phpShop: 
.  has anyone used this solution?  if so, what 
where your experiences?  can anyone suggest or recommend another solution 
that fits my requirements?

tia

if (duane.douglas) { technologies = asp && php && cgi_perl && cold fusion 
&& xml && xsl && sql server && mysql && javascript }

-- 
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] Question about hosting

2001-07-18 Thread Francis Fillion

 Well for myself I will better like to have the 2 computer design, 1 for
httpd and 1 for mysql, it's alway's better that way the few nano that
you lose in transit are way better then a server that do both stuff. Now
the problem (that eat a lot of time is php and mysql, doh!). So you have
optimise that, is mysql will be mostly for read or write data what kind
of %, if you need more read or more accurate read then write I suggest
you to have a lot of heap table (in memory table, put them read only and
get them to regenerate at every x times), copy of the mainly used data
in your application, with a lot of ram that will speed-up the main
thing. Then an other thing is to take big table and put them in smaller
table, way faster for writing/reading (hum, I don't quite remember if
mysql is row locking or table locking during write?).

Then they other best stuff is to make your dynamic page (.php) and to
make them static page (.html) this way you will get way faster viewing
page, you don't have they overload of neither php, nor mysql processing.
khttpd anyone?

Anyway, you could do a lot of stuff, load-balacing, an other server for
just your image, ...

If you want more, you should go at http://www.slashdot.org/ and do a
little search on that subjectthey had a few good article on that on the
last few month, year,...

Jay Paulson wrote:
> 
> Hello everyone-
> 
> I need some expert advice so I turn you to all! :)
> 
> I'm am currently in the process of making 7 web sites using PHP and MySQL
> backend.  I'm porjecting that all of these sites combined will get a million
> plus hits a month easy when it's all said and done.  What I'm wanting to do
> is to put the database on it's own machine and put the sites on a different
> machine to reduce the cpu load.  However, I'm not 100% sure this is the best
> option.  I know there are a ton of variables to consider with this situation
> and I'm trying to figure out the best way to go so I don't have to redo it
> again.
> 
> I'm thinking with the traffic these servers are going to incur if they are
> on one computer then I should probably have a dual CPU with a gig of ram or
> more and two hard drives.. Once CPU for serving up the pages and once CPU to
> run the db.  Also, one HD for the db and one HD for the pages in trying to
> get the most performace out of one machine.
> 
> Some of the dedicated options that people have thrown to me are in the range
> of a 450 CPU with 512 Ram and 30GB drive.  I don't think that with so many
> pages being served that this system will handle it.
> 
> Any suggestions?
> 
> Thanks,
> jay
> 
> --
> 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]

-- 
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.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]




Re: [PHP] screen

2001-07-18 Thread Sheridan Saint-Michel

header ("Location: $PHP_SELF");

Sheridan

(Seriously though... PHP produces HTML pages which are then handed to the
client.
It can't clear the screen the way an interactive program does.)

- Original Message -
From: Jeremy Morano <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 4:35 PM
Subject: [PHP] screen


> is there any refresh or clear screen function in 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]


-- 
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] a good PHP editor

2001-07-18 Thread Jay Paulson

That's what I use and I LOVE it.. but i also hear that homesite and
UltraEdit are very good as well.. never used them so i can't compare.. :)

jay

- Original Message -
From: "E. Peter K. Chan" <[EMAIL PROTECTED]>
To: "doug" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 1:24 PM
Subject: Re: [PHP] a good PHP editor


> www.textpad.com - very nifty for PHP and more...
> - Original Message -
> From: "doug" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 19, 2001 2:16 AM
> Subject: [PHP] a good PHP editor
>
>
> > Hiya everybody,
> > I'm relatively new to PHP and I'm looking for a good text editor on
> > win2k for creating/manipulating php pages. Notepad is great if your in a
> > bind, and I've tried phpedit and activestate's Komodo and both seem to
> have
> > problems (crashing etc...). Anybody got any suggestions? Free/small fee
> > programs doesn't matter Thanks
> >
> > Doug Henry
> >
> >
> > --
> > 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] Question about hosting

2001-07-18 Thread Martin Marconcini

> 
> Hello everyone-
> 
> I need some expert advice so I turn you to all! :)
Don't know if expert is my case :)

> 
> is to put the database on it's own machine and put the sites on a
> different
> machine to reduce the cpu load.  However, I'm not 100% sure this is
the
> best
> option.  I know there are a ton of variables to consider with this
> situation

My exp... If you do this have a FAST and VERY FAST and secure connection
between them. Remember, querying a database that's not on the same box
takes longer... (perhaps if the webserver has too workload, not) but
under normal circumstances... it has to travel ... 

Other solution would be a powerfull box doing both. 

Database on one SCSI disk, WEBsites on ANOTHER and preferably OS on
another different. That way three partitions can be read at the same
time.  (Forget crappy 'ultrasuperfast IDE'... )


Memory... tons of memory... :) 512 and up to avoid any kind of swapping.
And of course 100MB switches/cards/cables.

Dual CPU will help... and after those hits start 'hitting' you could
evaluate which service has more load (httpd for sure will be).

Hope this helps... 

Martin.


 


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




[PHP] screen

2001-07-18 Thread Jeremy Morano

is there any refresh or clear screen function in 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] a good PHP editor

2001-07-18 Thread Martin Marconcini

> HTMLedit (www.chami.com) let's you edit remotely. and has good syntax
> higlighting, browser and there are loads of extensions for it.
>  And it's free
I have had problems w/htmledit... too buggy. Don't know what it could
be. I decided to buy edit+ (my trial was over).

I'm happy w/ edit +.

Apart from that.. htmledit had some problems w/large files... 

Regards,

Martin.




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




[PHP] \' issue

2001-07-18 Thread Hugh Danaher

Rasmus, solved this problem for me earlier today.  Hope this helps

Rasmus,

Thank you very much.  I ended up using the following statement, and it
works!!

> $results=mysql_query(stripslashes($sql_statement));

What I have now is a textarea box where I can input trial searches.  This is
why I'm dealing with the whole sql statement.  With time, I plan on passing
only the variables.
Thanks again.
Hugh
- Original Message -
From: Rasmus Lerdorf <[EMAIL PROTECTED]>
To: Hugh Danaher <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 1:49 AM
Subject: Re: [PHP] help on getting rid of \'


> > I am working with php and mysql and have the need to write a query like:
> >
> > $sql_statement=mysql_query(" select * from table where column='string'
");
> >
> > What comes out is:
> >
> > select * from table where column=\'string\'
>
> Only if you pass that variable through a GET/POST/COOKIE operation and you
> have magic_quotes_gpc enabled in your php.ini file.  Either turn
> magic_quotes off or call stripslashes() on your string before passing it
> to MySQL.
>
> But, are you sure you want to be passing entire query strings between
> pages?  Normally you would only pass the actual query arguments.  In your
> case probably the 'string' part.
>
> -Rasmus
>




Re: [PHP] What PHP function to use to clean up PGP encoded text under Outlook Express?

2001-07-18 Thread Tyler Longren

str_replace("\n","\r\n",$input)
??

Tyler

- Original Message -
From: "Scott Brown" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 4:27 PM
Subject: [PHP] What PHP function to use to clean up PGP encoded text under
Outlook Express?


> I've got PHP a routine that encodes some sensitive information using PGP
and
> then emails this from my linux server to a few separate people
>
> People using Outlook (full version) see a perfectly formatted message when
> it gets decoded.
>
> People using Outlook Express see the message with the \n not being
replaced
> as CR/LF
>
>
> nl2br() is going to HTML-ize the string which isnt what I want...
it's
> got to be changed to the windows-required newline char pattern ...
>
> So which one is right?
>
> str_replace("\n","\r\n",$input)
>
> or
>
> str_replace("\n","\n\r",$input)
>
>
>
>
> --
> 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] Code Refusing to Die

2001-07-18 Thread Sheridan Saint-Michel

I thought about file_exists... but url is by definition a remote file and
file_exists does not work on remote files.
http://www.php.net/manual/en/function.file-exists.php

What I don't understand is why the die statement never executes.
If you try to fopen a file that doesn't exist shouldn't fopen return false?

Sheridan

- Original Message -
From: rm <[EMAIL PROTECTED]>
To: Sheridan Saint-Michel <[EMAIL PROTECTED]>; php-general
<[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 3:40 PM
Subject: Re: [PHP] Code Refusing to Die


> $fp is not a valid file handle because the url is
> invalid, it can't close a file handle for a file that
> wasn't opened because it never existed (invalid url).
> You need to fix the logic to allow for the possibility
> that a file does not exit and therefore cannot be
> closed. Maybe the php function file_exists might be of
> some use.
>
>
>
> rm
>
>
> --- Sheridan Saint-Michel <[EMAIL PROTECTED]>
> wrote:
> > Okay... I can't figure out why this isn't working...
> >
> > When I enter in a valid URL this function works
> > fine...
> >
> > The problem is when I enter an invalid url, rather
> > than getting my (semi) friendly die error I get
> >
> > Warning:
> > fopen("http://www.foxjet.com/html/fjmain.html","r";)
> > - Unknown error in /home/www/foxjet/admin/mailer.php
> > on line 37
> >
> > Warning: Supplied argument is not a valid
> > File-Handle resource in
> > /home/www/foxjet/admin/mailer.php on line 38
> >
> > Warning: Supplied argument is not a valid
> > File-Handle resource in
> > /home/www/foxjet/admin/mailer.php on line 39
> >
> >
> > Here is my function (With Line numbers added)
> >
> > 31: Function CreateMessage($url,$boundary)
> > 32:

> > 33:
> > 34:   if (substr($url,0,7) != "http://";)
> > 35: $url = "http://"; . $url;
> > 36:
> > 37:   $fp = fopen($url,"r") or die("Page $url Not
> > Found!");
> > 38:   $buffer = fread($fp, 10);
> > 39:   fclose($fp);
> >
> > /* More Code */
> >
> > 65: }
> >
> > Any ideas?  Am I overlooking something?
> >
> > Sheridan Saint-Michel
> > Website Administrator
> > FoxJet, an ITW Company
> > www.foxjet.com
> >
>
>
> __
> 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] Question about hosting

2001-07-18 Thread Jay Paulson

Hello everyone-

I need some expert advice so I turn you to all! :)

I'm am currently in the process of making 7 web sites using PHP and MySQL
backend.  I'm porjecting that all of these sites combined will get a million
plus hits a month easy when it's all said and done.  What I'm wanting to do
is to put the database on it's own machine and put the sites on a different
machine to reduce the cpu load.  However, I'm not 100% sure this is the best
option.  I know there are a ton of variables to consider with this situation
and I'm trying to figure out the best way to go so I don't have to redo it
again.

I'm thinking with the traffic these servers are going to incur if they are
on one computer then I should probably have a dual CPU with a gig of ram or
more and two hard drives.. Once CPU for serving up the pages and once CPU to
run the db.  Also, one HD for the db and one HD for the pages in trying to
get the most performace out of one machine.

Some of the dedicated options that people have thrown to me are in the range
of a 450 CPU with 512 Ram and 30GB drive.  I don't think that with so many
pages being served that this system will handle it.

Any suggestions?

Thanks,
jay


-- 
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] What PHP function to use to clean up PGP encoded text under Outlook Express?

2001-07-18 Thread Scott Brown

I've got PHP a routine that encodes some sensitive information using PGP and
then emails this from my linux server to a few separate people

People using Outlook (full version) see a perfectly formatted message when
it gets decoded.

People using Outlook Express see the message with the \n not being replaced
as CR/LF


nl2br() is going to HTML-ize the string which isnt what I want...  it's
got to be changed to the windows-required newline char pattern ...

So which one is right?

str_replace("\n","\r\n",$input)

or

str_replace("\n","\n\r",$input)




-- 
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] a good PHP editor

2001-07-18 Thread Matt Williams

 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

- -BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> I haven't seen any other programs for Windows you can edit remote
> files instead of the usual "download, edit, upload". Let me know if
> there are other good editors with this feature.

HTMLedit (www.chami.com) let's you edit remotely. and has good syntax
higlighting, browser and there are loads of extensions for it.
 And it's free

> There are three bad things about this program though;
> 1, The price - $99 usd ($89 if you download it).
not too bad.

> 2, It takes alot of system resources.

Agreed, it's very hungry and buggy.

> 3, There are still some bugs in their ftp engine.

Not really used this much

 M@

- -BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use


iQA/AwUBO1X9/6W0/zC+QxWwEQJ0mQCeKHQVjMGgLyY51U6XN1omS04y50cAn3ND
yorwcdfkYxpe1M0oT41bMn1e
=bxMi
- -END PGP SIGNATURE-

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use 

iQA/AwUBO1X+s6W0/zC+QxWwEQI2MQCg4MGQG0+q7K19KbNEVOs2WQMm67QAn263
oeyU9rCo8NfwdPQRGrzg/zUK
=mqmi
-END PGP SIGNATURE-


-- 
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] gd + 4.0.6

2001-07-18 Thread Kurth Bemis

compiling with apache 1.3.20  i get this

./modules/php4 -lmodphp4  -lc-client  -ldl -lmysqlclient -lz -lgd 
-lfreetype -lpng -lz -ljpeg -lz -lcrypt -lresolv -lm -ldl 
-lnsl  -lresolv   -lm -lcrypt
modules/php4/libphp4.a(gd.o): In function `php_imagettftext_common':
/usr/src/php-4.0.6/ext/gd/gd.c:2668: undefined reference to `gdImageStringTTF'
collect2: ld returned 1 exit status
make[3]: *** [target_static] Error 1
make[3]: Leaving directory `/usr/src/apache_1.3.20/src'
make[2]: *** [build-std] Error 2
make[2]: Leaving directory `/usr/src/apache_1.3.20'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/usr/src/apache_1.3.20'
make: *** [install-all] Error 2

i had GD working with 4.0.5 fine..however now i am having problems 
upgrading.

my php configure line is a follows.

./configure --with-mysql=/usr/local/mysql 
--with-apache=/usr/src/apache_1.3.20 --enable-ftp 
--with-jpeg-dir=/usr/src/jpeg-6b --with-png-dir=/usr/src/libpng-1.0.9 
--with-freetype-dir=/usr/src/freetype-2.0.1 --with-gd=/usr/src/gd1.3 
--enable-native-gd-ttf --enable-calander --with-imap=/usr/src/imap-4.5

any ideas?


-- 
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] a good PHP editor

2001-07-18 Thread Martin Marconcini

Shall me move this topic to other 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] sendmail scripts -which user?

2001-07-18 Thread Greg Robillard

I would like to use the PHP Mail() function. I know
that my script that uses it works, because I have used
it on another server. 
But there seems to be a problem with sendmail, and
whether I can send email as an anonymous user
(noboby).
Anyone have any thoughts on this one?

Thanks,
Greg Robillard

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




RE: [PHP] Connexion to MySQL

2001-07-18 Thread Martin Marconcini

RTFM:

> Warning: MySQL Connection Failed: Host '195.24.202.98' is not allowed
to
> connect to this MySQL server in

HOST x.x.x.x. IS NOT ALLOWED TO CONNECT TO THIS MYSQL SERVER.

Go to www.mysql.com/documentation and find out how to add your HOST to
the list of authorized hosts.

Pretty Easy... huh?

Martin Marconcini
www.marconcini.com.ar


 


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

2001-07-18 Thread chris schneck

$foo = "foo definition";

- Original Message -
From: "Jeremy Morano" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 1:55 PM
Subject: [PHP] variable


> hi
> is there any way I can pass a variable without using require() or
include()?
>
> --
> 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] variable

2001-07-18 Thread Tyler Longren

you can pass them in the url:
Test
Then, $i will be available on mypage.php in the variable $new_i

Tyler
- Original Message -
From: "Jeremy Morano" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 3:55 PM
Subject: [PHP] variable


> hi
> is there any way I can pass a variable without using require() or
include()?
>
> --
> 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] Connexion to MySQL

2001-07-18 Thread Jason Bell

Forget PHP for a second. Can you connect to that server normally, using
a MySQL Client?

- Original Message -
From: "Moise Bertrand TACHAGO" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 1:55 PM
Subject: [PHP] Connexion to MySQL


> Hi,
>
> Please can anyone help me to understand and resolve the probleme below
>
> Warning: MySQL Connection Failed: Host '195.24.202.98' is not allowed to
connect to this MySQL server in
> /usr/local/apache/htdocs/kolosys/Menu.php on line 35
> ERROR:
>
> Unable to connect to server
>
> I have this probleme when i'm try to connect to MySQL through a php
program i had wrote.
>
> This is how i made the connexion:
>
> $server=getenv("SERVER_NAME");
>
> $user="root";
>
> $pass="";
>
> mysql_connect($server,$user,$pass);
>
> Thanks in advance
>
> --
> Moise Bertrand TACHAGO
> Computer scientist
> Intern SDNP Cameroon, 506 Hajal Center Building, Yaounde CAMEROON
> phone   (237)22 24 90
> E_mails [EMAIL PROTECTED]
> [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] variable

2001-07-18 Thread Jeremy Morano

hi
is there any way I can pass a variable without using require() or include()?

-- 
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] a good PHP editor

2001-07-18 Thread Chris Lott

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I can't speak for Win9x, but on NT and now 2K, I have been using Homesite
for YEARS, open all the time, editing many pages (I'm lazy so I typically
have 20-30 pages open at any given time), heavy use of regex search and
replace across folders, etc. and I have never run out of resources or had
problems with memory. The only features I have ever had problems with were
some of the deployment scripting features in the Cold Fusion studio
version of Homesite. But now that I don't have to do Cold Fusion any
longer...

I understand Win 9x is a different story. I also know that people's
mileage may vary. But for my money it is the best HTML/XML/PHP/etc editor
out there, for a full-fledged editor. 

Other than that, I highly recommend TextPad.

c

-BEGIN PGP SIGNATURE-
Version: PGP 7.0.3- signed for information authentication and security
Comment: Key ID: 0x51046CFD

iQA/AwUBO1X3NNaLYehRBGz9EQJl5QCdEwXCOGich9DemC8zR2gOTf5w0AYAn0Yz
SX/hGmJDP3k5q8jgZsoSUeRO
=QBwY
-END PGP SIGNATURE-

-- 
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] Connexion to MySQL

2001-07-18 Thread Moise Bertrand TACHAGO

Hi,

Please can anyone help me to understand and resolve the probleme below

Warning: MySQL Connection Failed: Host '195.24.202.98' is not allowed to connect to 
this MySQL server in
/usr/local/apache/htdocs/kolosys/Menu.php on line 35
ERROR:

Unable to connect to server

I have this probleme when i'm try to connect to MySQL through a php program i had 
wrote.

This is how i made the connexion:

$server=getenv("SERVER_NAME");

$user="root";

$pass="";

mysql_connect($server,$user,$pass);

Thanks in advance

--
Moise Bertrand TACHAGO
Computer scientist
Intern SDNP Cameroon, 506 Hajal Center Building, Yaounde CAMEROON
phone   (237)22 24 90
E_mails [EMAIL PROTECTED]
[EMAIL PROTECTED]





RE: [PHP] a good PHP editor

2001-07-18 Thread Miri

At 03:38 PM 7/18/01 -0500, Boget, Chris wrote re Homesite and system resources:

>Not alot.  ALOT.  Huge, massive amounts of resources.  I'm
>getting resource low messages from Windows less than 20
>minutes after opening it and it's the only thing running aside
>from my mail client.

How weird. I have an old computer windows Win 98 with only 64M RAM and I've 
never had any problem with Homesite. I'm always running it and at least 2-4 
browser windows and Eudora with no problems.

Perhaps I've just been lucky, but I've been using Homesite since it was 
shareware. :)

take care,
beth


-- 
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] Code Refusing to Die

2001-07-18 Thread rm

$fp is not a valid file handle because the url is
invalid, it can't close a file handle for a file that
wasn't opened because it never existed (invalid url).
You need to fix the logic to allow for the possibility
that a file does not exit and therefore cannot be
closed. Maybe the php function file_exists might be of
some use.



rm


--- Sheridan Saint-Michel <[EMAIL PROTECTED]>
wrote:
> Okay... I can't figure out why this isn't working...
> 
> When I enter in a valid URL this function works
> fine...
> 
> The problem is when I enter an invalid url, rather 
> than getting my (semi) friendly die error I get
> 
> Warning:
> fopen("http://www.foxjet.com/html/fjmain.html","r";)
> - Unknown error in /home/www/foxjet/admin/mailer.php
> on line 37
> 
> Warning: Supplied argument is not a valid
> File-Handle resource in
> /home/www/foxjet/admin/mailer.php on line 38
> 
> Warning: Supplied argument is not a valid
> File-Handle resource in
> /home/www/foxjet/admin/mailer.php on line 39
> 
> 
> Here is my function (With Line numbers added)
> 
> 31: Function CreateMessage($url,$boundary)
> 32: { 
> 33:
> 34:   if (substr($url,0,7) != "http://";)
> 35: $url = "http://"; . $url;
> 36:
> 37:   $fp = fopen($url,"r") or die("Page $url Not
> Found!");
> 38:   $buffer = fread($fp, 10);
> 39:   fclose($fp);
> 
> /* More Code */
> 
> 65: }
> 
> Any ideas?  Am I overlooking something?
> 
> Sheridan Saint-Michel
> Website Administrator
> FoxJet, an ITW Company
> www.foxjet.com
> 


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




Re: [PHP] a good PHP editor

2001-07-18 Thread ~~~i LeoNid ~~

On Thu, 19 Jul 2001 04:52:14 +0900 impersonator of [EMAIL PROTECTED]
(Maxim Maletsky) planted &I saw in php.general:

>I do buy software when I respect it's quality, but just to try I usually
>crack it first to see how it works.
>
Well. The word for this is "stealing", and should be dealt as such..
Besides, shareware/demos allow you to try it anyway; and how could you
crack something else?:) besides obtaining it illegaly - and that's double
robbery.

There are lot of free (and good) software around. The things are just in
to be informed. And information - is often in different kind of Unions
possesion.. but (i think:) it should be mostly (although sometimes it is a product too)
freely and easily publicly available. (speaking of general information in general:)

>Once again, I apologize to the list.
>
U do?:)

>-maxim maletsky

i Leonid (not a Union member:) http://nux.home.dk3.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]




Re: [PHP] remove me from php list

2001-07-18 Thread jimw

the unsubscribe address works exactly as advertised, if you can be
bothered to read the directions. 347 people have managed to do so this
month. (and 372 have managed to subscribe, so i guess the list is
growing.)

otherwise, you can always contact the list administrators, the address
for which is also at the bottom of every message. they don't act as
quickly as the automated unsubscribe, but they'll get to your request
eventually.

> To contact the list administrators, e-mail: [EMAIL PROTECTED]

(and, as a general rule, none of the list adminstrators pay attention
to unsubscribe requests sent to the mailing lists themselves.)

jim

Maxim Maletsky <[EMAIL PROTECTED]> wrote:
> HA HA HA!
> 
> That was a good one, Jason...
> 
> -maxim maletsky
> 
> 
> 
> -Original Message-
> From: Jason Bell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 19, 2001 4:30 AM
> To: danny brown; [EMAIL PROTECTED]
> Subject: Re: [PHP] remove me from php list 
> 
> 
> remove yourself.   :)
> 
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> - Original Message - 
> From: "danny brown" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 18, 2001 12:25 PM
> Subject: [PHP] remove me from php list 
> 
> 
>> 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] a good PHP editor

2001-07-18 Thread Boget, Chris

> I'd like to recommend Allaire HomeSite.

Read their own HS forum before finally deciding.  HS has *alot*
of issues, particularly with memory.
 
> I haven't seen any other programs for Windows you can edit 
> remote files instead of the usual "download, edit, upload". Let 
> me know if there are other good editors with this feature.

The feature I use the most (and need it for the most) is how
it sets up "Projects".  I wish I could find something else that
did that (well).  If I could, I'd move to it in a heartbeat.
 
> There are three bad things about this program though;
> 2, It takes alot of system resources.

Not alot.  ALOT.  Huge, massive amounts of resources.  I'm
getting resource low messages from Windows less than 20
minutes after opening it and it's the only thing running aside
from my mail client.

Chris



Re: [PHP] a good PHP editor

2001-07-18 Thread Schill, Johannes

I'd like to recommend Allaire HomeSite.

I haven't seen any other programs for Windows you can edit remote files
instead of the usual "download, edit, upload". Let me know if there are
other good editors with this feature.

It supports lots of formats - not just .php, and i think it's _the_ editor
to use if you do presentation programming.

There are three bad things about this program though;
1, The price - $99 usd ($89 if you download it).
2, It takes alot of system resources.
3, There are still some bugs in their ftp engine.

There's a 30-day evaluation to grab from www.allaire.com or
www.macromedia.com

I hope this helps.

Best regards,
Johannes Schill


- Original Message -
From: "doug" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 8:16 PM
Subject: [PHP] a good PHP editor


> Hiya everybody,
> I'm relatively new to PHP and I'm looking for a good text editor on
> win2k for creating/manipulating php pages. Notepad is great if your in a
> bind, and I've tried phpedit and activestate's Komodo and both seem to
have
> problems (crashing etc...). Anybody got any suggestions? Free/small fee
> programs doesn't matter Thanks
>
> Doug Henry
>
>
> --
> 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] Slash Problems When Using PHP and POST.

2001-07-18 Thread Dave Stewart

I had this problem last week

You need to add the stripslashes function to the string that contains the
uploaded text.

print stripslashes($file) or print stripslashes($contents) I think should do
it.

Dave


- Original Message -
From: "Corin Rathbone" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 7:45 AM
Subject: [PHP] Slash Problems When Using PHP and POST.


> I have created a php page that loads a file into a textarea. You can then
> edit the file and click "Save" and it POSTS it to the same page (edit.php)
> on the server. It saves it but it adds slashes before any speech marks
("").
> Can somebody please help me with this.
>
> It changes:
> 
> to:
> 
>
> Below is the code for the page edit.php:
>  include "config.php";
>
> if(isset($save)){
> $fp = fopen("$file", "wb") or die("Could not open file!");
> $worked = fwrite($fp, $contents) or die("Could not write file!");
> fclose($fp) or die("Could not close file!");
> $edit=false;
> $save=true;
> }
> elseif(isset($file)){
> $fp = fopen("$file", "rb") or die("Could not open file!");
> $contents = fread($fp, filesize($file)) or die("Could not read
> file!");
> fclose($fp) or die("Could not close file!");
> $edit=true;
> $save=false;
> }
> else{
> $edit=false;
> $save=false;
> }
>
> ?>
> 
>
> 
> 
> Edit A File - File Explorer For 
> 
> 
> 
> 
> 
> 
> 
>
> Edit A File
>
>  if($edit){
> print( "Contents Of file: " );
> print( "$file" );
> print( "\n" );
> print( "\n" );
> print( " \n" );
> print( "   print( "$file" );
> print( "\">\n" );
> print( "" );
> print( "  \n" );
> print( "$contents" );
> print( "  \n" );
> print( "  \n" );
> print( " \n" );
> print( "" );
> }
> elseif($save){
> print( "\n" );
> print( "File: " );
> print( "$file" );
> if($worked){print( " has been saved!" );}
> else {print( " has not been saved!" );}
> print( "" );
> }
> else {
> print( "Please Select A File To Be
> Save!" );
> }
> ?>
>
> 
> 
> ©mailto:[EMAIL PROTECTED]";>Corin
> Rathbone 2001
>
> 
> 
>
> Regards,
> Corin Rathbone
> www.corin.org.uk
>
>
> --
> 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] Re: Slash Problems When Using PHP and POST.

2001-07-18 Thread David Serrano

Check out the stripslashes and AddSlashes functions

http://www.php.net/manual/en/function.addslashes.php
http://www.php.net/manual/en/function.stripslashes.php

"Corin Rathbone" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have created a php page that loads a file into a textarea. You can then
> edit the file and click "Save" and it POSTS it to the same page (edit.php)
> on the server. It saves it but it adds slashes before any speech marks
("").
> Can somebody please help me with this.
>
> It changes:
> 
> to:
> 
>
> Below is the code for the page edit.php:
>  include "config.php";
>
> if(isset($save)){
> $fp = fopen("$file", "wb") or die("Could not open file!");
> $worked = fwrite($fp, $contents) or die("Could not write file!");
> fclose($fp) or die("Could not close file!");
> $edit=false;
> $save=true;
> }
> elseif(isset($file)){
> $fp = fopen("$file", "rb") or die("Could not open file!");
> $contents = fread($fp, filesize($file)) or die("Could not read
> file!");
> fclose($fp) or die("Could not close file!");
> $edit=true;
> $save=false;
> }
> else{
> $edit=false;
> $save=false;
> }
>
> ?>
> 
>
> 
> 
> Edit A File - File Explorer For 
> 
> 
> 
> 
> 
> 
> 
>
> Edit A File
>
>  if($edit){
> print( "Contents Of file: " );
> print( "$file" );
> print( "\n" );
> print( "\n" );
> print( " \n" );
> print( "   print( "$file" );
> print( "\">\n" );
> print( "" );
> print( "  \n" );
> print( "$contents" );
> print( "  \n" );
> print( "  \n" );
> print( " \n" );
> print( "" );
> }
> elseif($save){
> print( "\n" );
> print( "File: " );
> print( "$file" );
> if($worked){print( " has been saved!" );}
> else {print( " has not been saved!" );}
> print( "" );
> }
> else {
> print( "Please Select A File To Be
> Save!" );
> }
> ?>
>
> 
> 
> ©mailto:[EMAIL PROTECTED]";>Corin
> Rathbone 2001
>
> 
> 
>
> Regards,
> Corin Rathbone
> www.corin.org.uk
>



-- 
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] OO Oh My: Need Help on BBS OO Logic

2001-07-18 Thread Chris Abraham

PHP List:

I am doing a pretty cool gig and I have decided to map a Nodal network
using a "threaded BBS"-type +/- hierarchical system. I am imitating
Chapter 29 in the SAMS _PHP & MySQL_ book and I love the model.  I am not
having a lot of luck in mapping my MySQL DB to the model and not only that
but I am getting funny "triple" repeats and recursive memory bloats and
all sorts of terrible things.

I am using my DB schema/structure:

connections(node1,node2)
contacts(contid,node,admintech)
maps(node,maptype,mapurl)
node_types(typeid,typedesc)
nodes(nodeid,nodename,toplevel,nodetype,moreinfo,city,state,country,homepage,bandwidth)
peers(peer1,peer2,transitfrom,transitto,bandwidth)
people(personid,firstname,lastname,phone,cell,fax,email,moreinfo)
updown(upnode,downnode,bandwidth)

The only tables I am using for the "threaded nesting bulletin board" model
is:  nodeid, upnode, downnode, nodename, moreinfo

A list of the files follows:

(You can look at the source at http://www.zdev.net/i2/ I didn't include
db_fns for the obvious reasons):

data_valid_fns.php
db_fns.php
discussion_fns.php
include_fns.php
index.php
new_node.php
output_fns.php
store_new_node.php
treenode_class.php
view_node.php
images/
blah_blah.gif
cancel.gif
collapse.gif
expand.gif
index.gif
minus.gif
new_post.gif
plus.gif
post.gif
reply.gif
spacer.gif

And this is how it barfs:

http://www.internet2.edu/arena/29

So, what do you think?

It should look like:

Internet2 Nodes
+ Abilene
+ DANTE

And when you click on the "+" or "-", then you should see it cascade only
to the children.  All I get is nasty "memory overflow" fun!

And not three copies of everything!  Here is a little bit of a way the
data looks:

mysql> select * from updown limit 30
-> ;
++--+---+
| upnode | downnode | bandwidth |
++--+---+
|  1 |2 | 0 |
|  5 |6 | 0 |
|  6 |7 | 0 |
|  2 |3 | 0 |
|  2 |4 | 0 |
| 17 |8 |20 |
| 17 |9 |10 |
| 17 |   10 |20 |
| 17 |   11 |10 |
| 17 |   12 |20 |
| 17 |   13 |20 |
| 17 |   14 |20 |
| 17 |   15 |20 |
| 17 |   16 |30 |
|  6 |   17 | 2 |
|  5 |   17 |34 |
++--+---+

The IDs under 'updown.upnode' and 'updown.downnode' equal 'nodes.nodeid'

And here is the other table, 'nodes':

mysql> select nodeid, nodename from nodes limit 20;
+++
| nodeid | nodename   |
+++
|  1 | Abilene|
|  2 | CALRen2|
|  3 | UCLA   |
|  4 | Stanford   |
|  5 | DANTE  |
|  6 | JANet  |
|  7 | Cambridge  |
|  8 | Dublin City University |
|  9 | Dublin Institute of Technology |
| 10 | National University of Ireland, Galway |
| 11 | National University of Ireland, Maynooth   |
| 12 | Trinity College|
| 13 | University College, Dublin |
| 14 | University College, Cork   |
| 15 | University of Limerick |
| 16 | Network of Institutes of Technology (ITNet)|
| 17 | HEANet |
+++

I didn't include 'nodes.moreinfo' because the table is prettier this way.

Anyway, If you can please help me, or at least point me in the pants or in
the right direction -- and if I missed something ala glaring omission,
then please ask any questions!

I am using PHP ala http://www.internet2.edu/arena/29/info.php

Cheers,

Chris

PS: Thanks in advance!

-- 
chris abraham, managing director <[EMAIL PROTECTED]> 
beehive North America, washington, dc, +1 202 548 0410 wk +1 202 478 0276


-- 
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] adding the date to a database

2001-07-18 Thread Don Read


On 18-Jul-2001 Brad Wright wrote:
> Hi, 
> I have a database with a 'date' field. What is the syntax for using the
> (mysql) function 'getdate()', to insert the date into the DB table.
> the syntax I'm currently using is:
> $query = "Insert INTO visits (visName, date)
> values ('$name', getdate()) " ;
> $result = mysql_query($query, $db);
> 
> This does not work (but returns no errors) ie, nothing inserted into the
> database.
> 

did you test $result ?

It's usually helpful to check the manual when you're not sure of the syntax
for MySQL you can use NOW() , CURDATE(), or CURRENT_DATE.


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

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




RE: [PHP] limiting text output

2001-07-18 Thread Don Read


On 18-Jul-2001 chris schneck wrote:
> Hey all,
> was curious if anyone has had experience with limiting the amount of text
> pulled from a database and placing a link and the end of the excessive text
> line.
> ie. the description of a product could be 800 characters long, how can it be
> shortened to 50 -100 characters with a link to "read more" at the end. I was
> fiddling with strlength and an if else statement, but i cant really get
> things happenin. Any and all help would greatly be appreciated.
> 

if ( strlen($foo) > 100) {
echo substr($foo,0,100), ' More ...';
} else {
echo $foo;
}

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

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

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




[PHP] Slash Problems When Using PHP and POST.

2001-07-18 Thread Corin Rathbone

I have created a php page that loads a file into a textarea. You can then
edit the file and click "Save" and it POSTS it to the same page (edit.php)
on the server. It saves it but it adds slashes before any speech marks ("").
Can somebody please help me with this.

It changes:

to:


Below is the code for the page edit.php:





Edit A File - File Explorer For 








Edit A File

" );
print( "$file" );
print( "\n" );
print( "\n" );
print( " \n" );
print( "\n" );
print( "" );
print( "  \n" );
print( "$contents" );
print( "  \n" );
print( "  \n" );
print( " \n" );
print( "" );
}
elseif($save){
print( "\n" );
print( "File: " );
print( "$file" );
if($worked){print( " has been saved!" );}
else {print( " has not been saved!" );}
print( "" );
}
else {
print( "Please Select A File To Be
Save!" );
}
?>



©mailto:[EMAIL PROTECTED]";>Corin
Rathbone 2001




Regards,
Corin Rathbone
www.corin.org.uk


-- 
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] Command line args HELP!!!

2001-07-18 Thread Don Read


On 18-Jul-2001 Paul A. Procacci wrote:
> Hey all,
> I tried passing an argument to a php script that had a plus sign (+)
> in one of the arguments.  Observe the following:
> 
> 
> http://altavista.com/sites/search/web?q=task+management&pg=q&kl=XX
> 
> As it turns out the argument gets split into two seperate arguments, but
> I would like to keep it as one argument.  Does anyone know how to
> accomplish this.  

No, it is one arg q='task management'; the plus is interpreted as a space.
If you want to keep the (+) symbol use web?q=task%2bmanagement& ...

also look at urlencode/decode() functions.

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

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




Re: [PHP] remove me from php list

2001-07-18 Thread Jason Bell

remove yourself.   :)

> To unsubscribe, e-mail: [EMAIL PROTECTED]



- Original Message - 
From: "danny brown" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 12:25 PM
Subject: [PHP] remove me from php list 


> 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] remove me from php list

2001-07-18 Thread danny brown

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] Code Refusing to Die

2001-07-18 Thread Sheridan Saint-Michel

Okay... I can't figure out why this isn't working...

When I enter in a valid URL this function works fine...

The problem is when I enter an invalid url, rather 
than getting my (semi) friendly die error I get

Warning: fopen("http://www.foxjet.com/html/fjmain.html","r";) - Unknown error in 
/home/www/foxjet/admin/mailer.php on line 37

Warning: Supplied argument is not a valid File-Handle resource in 
/home/www/foxjet/admin/mailer.php on line 38

Warning: Supplied argument is not a valid File-Handle resource in 
/home/www/foxjet/admin/mailer.php on line 39


Here is my function (With Line numbers added)

31: Function CreateMessage($url,$boundary)
32: { 
33:
34:   if (substr($url,0,7) != "http://";)
35: $url = "http://"; . $url;
36:
37:   $fp = fopen($url,"r") or die("Page $url Not Found!");
38:   $buffer = fread($fp, 10);
39:   fclose($fp);

/* More Code */

65: }

Any ideas?  Am I overlooking something?

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com



Re: [PHP] adding the date to a database

2001-07-18 Thread Christopher Ostmo

Brad Wright pressed the little lettered thingies in this order...

> Hi, 
> I have a database with a 'date' field. What is the syntax for using the
> (mysql) function 'getdate()', to insert the date into the DB table.
> the syntax I'm currently using is:
> $query = "Insert INTO visits (visName, date)
> values ('$name', getdate()) " ;
> $result = mysql_query($query, $db);
> 

If you're using MySQL 3.23 (or newer) and the field is one of the date, 
time or datetime types, use NOW()

For example:
$query = "Insert INTO visits (visName, date)
values ('$name', NOW()) " ;

This returns a "-MM-DD HH:MM:SS" string that MySQL will 
automatically convert to any of the date/time field types.

Christopher Ostmo
a.k.a. [EMAIL PROTECTED]
AppIdeas.com
Innovative Application Ideas
Meeting cutting edge dynamic
web site needs since the 
dawn of Internet time (1995)

For a good time,
http://www.AppIdeas.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]




RE: [PHP] OT Math Question...thanks all

2001-07-18 Thread rm


Thanks, talk about a painfully obvious answer

rm

__
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] adding the date to a database

2001-07-18 Thread Brad Wright

Hi, 
I have a database with a 'date' field. What is the syntax for using the
(mysql) function 'getdate()', to insert the date into the DB table.
the syntax I'm currently using is:
$query = "Insert INTO visits (visName, date)
values ('$name', getdate()) " ;
$result = mysql_query($query, $db);

This does not work (but returns no errors) ie, nothing inserted into the
database.

Thanks,
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] Fwd: Rogue Cookie interference

2001-07-18 Thread Jason Bauer

I recently received a note from a user of my PHP website saying that they 
came to my page and received no content. After investigating the problem, I 
found that another site (doubleclick.net to be specific) had set a cookie 
with the same name as a variable (id) that my script uses to determine 
which output to display. So, since the contents of this cookie were not 
recognized by my script, nothing was displayed.

My question is, how could this happen?? I was under the impression that 
cookies were linked to a specific domain, therefore cookies from another 
site could not interfere with my site. We deleted the cookies from her 
computer and it is working again for now, but if it can happen to her it 
can happen to anyone.

Any explanations on how this cookie was read by my PHP script would be 
appreciated... I know I can always tell PHP to not put cookie data into the 
variable, but I shouldn't have to do that. Thanks!



---
Jason Bauer
[EMAIL PROTECTED]
Michigan Tech Fund
Web Site Coordinator


-- 
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] Fw: Data from SQL to a string in a useable format

2001-07-18 Thread Jason Bell

I will certainly give it a try... Thanks!

- Original Message -
From: "Sheridan Saint-Michel" <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 11:57 AM
Subject: Re: [PHP] Fw: Data from SQL to a string in a useable format


> This may be way out in left field... but since no one else seems to be
> answering,
>
> Have you considered using something like base64_encode?
> http://www.php.net/manual/en/function.base64-encode.php
>
> That would change your image to plaintext without any characters that need
> to be escaped.
>
> The when you retrieve it you would just run it through base64_decode and
> viola!
>
> I have never tried this, and like I said there may very well be a better
> solution.
> (Especially since the DB is usually the bottleneck and base64_encode
> actually makes the file bigger)
>
> Let me know if that helps
> Sheridan
>
> - Original Message -
> From: Jason Bell <[EMAIL PROTECTED]>
> To: PHP Users <[EMAIL PROTECTED]>
> Sent: Wednesday, July 18, 2001 11:51 AM
> Subject: [PHP] Fw: Data from SQL to a string in a useable format
>
>
> Ok, never got a reply yesterday, so I figured I'd resend this.  can
this
> even be done?
> __
>
> How can I pull my data from my SQL db, and store it as a string so that it
> can be used? Specificly, I'm working with images.
>
> When the images are stored in the database, the only pre-processing that
is
> done is:
>
> $img = addslashes(fread(fopen($userfile, "r"), filesize($userfile)));
>
> (* note: $userfile is the file identifier from my upload form.)
>
> I want to pull the data out of the database and store it in a string, so
> that I can use imagecopyresampled to create a thumbnail, but I just can't
> seem to get it to work
>
> please help!!
>
> Thanks,  Jason
>
>
>
> --
> 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] SITE/PAGE C.A.S.E. tool project

2001-07-18 Thread Dennis Gearon

I would just like a show of hands(emails) of those interested in having a
WEB/PHP based Finite State Machine (FSM) tool that would allow designing AND
displaying the decision logic of a page or site. (look

It would use SSL to transfer data to/from the web interface.
It would use SCP/SFTP to transfer to/from the script's buffer vars.
It would be able to be sited on one site, and edit:
That site's design.
Other sites' designs(providing you had the correct passwords/certificates).
It would create logical and faster decision paths in pages, especially those
that
are multipart pages, for example, shopping carts, membership entry screens.
It would bring making PHP web pages closer to making real applications that
happen 
to have web interfaces.
It could be used to rewrite PHPLIB/PEAR and make it easier to maintain them and
extend them for future functionality.

It would use a State Event Matrix(Table) as input/display.
See:

(DESCRIPTION)
http://www.projtech.com/pdfs/sdfada.pdf (page 9, see item 4.6)

(EXAMPLES)
http://www2.sec.fi/mallinnus/realtime/Foundation_v1-1.PDF (page 19)
http://www.gefeg.com/jswg/s4/data/9735-3.pdf (page 14)

(DISCUSSION)
http://www.multicians.org/thvv/discussion.html
http://www.control.auc.dk/preprint/?action=abstract&abstract=4339

(funny cartoon on vendor's page!!)
http://roxsoftware.com/

(EXAMPLE response functions selection to a particular STATE/EVENTS combination)
http://www.qweeka.com/public/SEM.htm
Different functions(already written)can be selected in any order, any 
number of times up to the maximum.

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




RE: [PHP] sql query successful

2001-07-18 Thread Mark Roedel

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

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

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


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


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




Re: [PHP] Fw: Data from SQL to a string in a useable format

2001-07-18 Thread Sheridan Saint-Michel

This may be way out in left field... but since no one else seems to be
answering,

Have you considered using something like base64_encode?
http://www.php.net/manual/en/function.base64-encode.php

That would change your image to plaintext without any characters that need
to be escaped.

The when you retrieve it you would just run it through base64_decode and
viola!

I have never tried this, and like I said there may very well be a better
solution.
(Especially since the DB is usually the bottleneck and base64_encode
actually makes the file bigger)

Let me know if that helps
Sheridan

- Original Message -
From: Jason Bell <[EMAIL PROTECTED]>
To: PHP Users <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 11:51 AM
Subject: [PHP] Fw: Data from SQL to a string in a useable format


Ok, never got a reply yesterday, so I figured I'd resend this.  can this
even be done?
__

How can I pull my data from my SQL db, and store it as a string so that it
can be used? Specificly, I'm working with images.

When the images are stored in the database, the only pre-processing that is
done is:

$img = addslashes(fread(fopen($userfile, "r"), filesize($userfile)));

(* note: $userfile is the file identifier from my upload form.)

I want to pull the data out of the database and store it in a string, so
that I can use imagecopyresampled to create a thumbnail, but I just can't
seem to get it to work

please help!!

Thanks,  Jason



-- 
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   3   >