Re: [PHP] user-defined superglobals?

2003-08-24 Thread Mike Migurski
It would be nice to have a php-function like declare_superglobal($_MYFRAMEWORK); And then use $_MYFRAMEWORK like $_GET. You have a few options: if you are looking to set variables that are static and atomic, you can use environmental variables in an .htaccess file (getenv() to access them) or

[PHP] sqlite

2003-08-24 Thread Kevin Waterson
I am writing an admin for sqlite but have struck a problem with exporting data. I wish to simply get a dump of the current sql database. from the commandline this would be done with .dump however this causes an error when used with sqlite_query() Is there any other method to get a sqlite dump?

[PHP] Using PHP on an .html file

2003-08-24 Thread Pag
I looked everywhere for the answer to this dilemma, and i know there is a way around it, maybe something about the headers, cant really remember how it was, but can someone please tell me how i can use PHP code on a file with an extension of .html? For example, on a file called info.html, i

Re: [PHP] Using PHP on an .html file

2003-08-24 Thread Kevin Waterson
This one time, at band camp, Pag [EMAIL PROTECTED] wrote: I looked everywhere for the answer to this dilemma, and i know there is a way around it, maybe something about the headers, cant really remember how it was, but can someone please tell me how i can use PHP code on a file

[PHP] parse error with mysql_connect

2003-08-24 Thread Mjec
Hi, I keep getting Parse Error on line 36, but I can't figure out why... relevant code: 35: // Initialize MySQL database 36: $h = mysql_connect('localhost','localhost',constant(mysql_user),constant(mysql _password)); 37: mysql_select_db('mjec_mjecnet', $h); using PHP v. 4.3.2 Thanks,

Re: [PHP] Using PHP on an .html file

2003-08-24 Thread Chan Hong Guan
Kevin Waterson wrote: This one time, at band camp, Pag [EMAIL PROTECTED] wrote: I looked everywhere for the answer to this dilemma, and i know there is a way around it, maybe something about the headers, cant really remember how it was, but can someone please tell me how i can use PHP code on

Re: [PHP] Using PHP on an .html file

2003-08-24 Thread Mike Migurski
For example, on a file called info.html, i want to have some PHP code that actually gets executed. In your httpd.conf add the line AddType application/x-httpd-php html Better to do this in an .htaccess file, so you don't incur PHP processing overhead on the entire server (if there are

Re: [PHP] sqlite

2003-08-24 Thread andu
On Sun, 24 Aug 2003 13:09:55 +1000 Kevin Waterson [EMAIL PROTECTED] wrote: I am writing an admin for sqlite but have struck a problem with exporting data. I wish to simply get a dump of the current sql database. from the commandline this would be done with .dump however this causes an

Re: [PHP] '' Sign in _GET Parameter

2003-08-24 Thread AciD
Try this : $link = $row[company]; echo (a href='full_profile_1.php?name=.urlencode($link).'); -- www.cpm-fr.com Thanks for the link, $link = $row['company'];\00\00 a href=\full_profile_1.php?name=', urlencode($link),' \\00\00 However this does not seem to work / what am I missing ?

Re: [PHP] sqlite

2003-08-24 Thread Kevin Waterson
This one time, at band camp, andu [EMAIL PROTECTED] wrote: $command=sqlite db_name '.dump'; exec($command,$result); print_r( $result);// shows the dump array As sqlite is bundled with php5, I guess command line type commands are not available because it is compiled in. Kevin -- __

[PHP] finding out localhost :-P

2003-08-24 Thread Pag
Heres the problem. I have one of my client's site hosted on a crappy server, and i have it running with php+mysql ok, the thing is i need to connect to that site's mysql's database from a different site to get data. The problem is that on the origin site (the crappy server), to connect to the

Re: [PHP] finding out localhost :-P

2003-08-24 Thread Ray Hunter
Make sure that the user that you are connecting with has permissions to connect to mysql from that computer. You can check the user table in the mysql database to see the user and their associated permissions. I would suggest checking out mysql.com for additional information. -- BigDog On

Re: [PHP] sqlite

2003-08-24 Thread andu
On Sun, 24 Aug 2003 14:44:19 +1000 Kevin Waterson [EMAIL PROTECTED] wrote: This one time, at band camp, andu [EMAIL PROTECTED] wrote: $command=sqlite db_name '.dump'; exec($command,$result); print_r( $result);// shows the dump array As sqlite is bundled with php5, I guess command

[PHP] homepage script..

2003-08-24 Thread Dasmeet
Hi!, I am developing a web site for an ISP.. They want to add homepage functionality.. that is their subscribers can have thier homepage (say with 2MB space each). Is there any script (free or paid) for such system.. to manage, create accounts etc... Any information would be of great help!

php-general Digest 24 Aug 2003 06:42:26 -0000 Issue 2255

2003-08-24 Thread php-general-digest-help
php-general Digest 24 Aug 2003 06:42:26 - Issue 2255 Topics (messages 160518 through 160567): Expiration time of a cookie 160518 by: Stevie D Peele 160527 by: Matthias Nothhaft Re: user-defined superglobals? 160519 by: Matthias Nothhaft 160522 by: Tom Rogers

Re: [PHP] Easy XML PHP tutorials ?????

2003-08-24 Thread murugesan
www.w3schools.com -murugesan - Original Message - From: Boaz Yahav [EMAIL PROTECTED] To: Joe Harman [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, August 24, 2003 1:09 AM Subject: RE: [PHP] Easy XML PHP tutorials ? Try this too : http://www.sitepoint.com/article/1165

[PHP] CRC and Polynomials

2003-08-24 Thread Methusula
Hi, Can anyone tell me which 32-bit polynomial is used by PHP in the crc function? I am trying to write a crc function from scratch, however, php does not appear to use any of the most commonly used polynomial divisors. Methusula. -- PHP General Mailing List (http://www.php.net/) To

[PHP] regex replace href-content

2003-08-24 Thread Christoph Gassmann
Dear List, I´m writing a little framework with special features for my application. The content of my Website is in HTML-Pages from other users working with HTML-Editors. I parse the content in their body in my framework. now I have to replace the content of their links from a

Re: [PHP] CRC and Polynomials

2003-08-24 Thread Andrew Brampton
I found this mentioned in a old user comment (it might not be relevant now): Some quick reverse engineering shows they're using the standard CRC32 parameters: Polynomial 0x04C11DB7l Initial register value 0x Register is inverted at end of calculation Bytes are reflected as they come in,

[PHP] RE: [users@httpd] RE: Can't POST over 500K

2003-08-24 Thread Jeffrey D. Means
This is not an apache proble it is a problem with your php.ini file. In this file there is a line that specifies how large of POST data can be received, the default is 500k. If you are running apache 2.0 there is an additional place where this might be being defined. You can find this file in

[PHP] HTML form handling

2003-08-24 Thread Chris Baxter
Hi, I am trying to send the results of a form to my email account and am having difficulty carrying the form variable through if I use an html mime type. Basically, if I send the form using a plain text format, the form results are sucessfully copied to the email, however, if I change to mime

[PHP] Re: homepage script..

2003-08-24 Thread DvDmanDT
easyhost and invisionpower filemanager... Although, it seems better to write the script yourself, would make it so much more fitting your exact wantings and needs... -- // DvDmanDT MSN: [EMAIL PROTECTED] Mail: [EMAIL PROTECTED] Dasmeet [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED]

[PHP] Re: finding out localhost :-P

2003-08-24 Thread DvDmanDT
You can goto like whatsmyip.com (or something similar) to get your ip and connect to it unless there's a proxy or something... http://www.liero-masters.host.sk/ip.php is another place, that I use as it only displays the IP, and nothing else... :p However, connecting to the domainname should

[PHP] Does the URL influence if the page/data gets cached?

2003-08-24 Thread Richard Davey
Hi all, We've recently released a significantly sized new web site coded entirely in PHP. One of the things done on the site is to link to various sections of it as follows: http://www.domain.com/?m=orders http://www.domain.com/?f=index As you can see we're neglecting to include the index.php

[PHP] str_replace performance in large mailing script

2003-08-24 Thread frederik feys
Hi all, I have a mailing script that sends individualised mails to users(some users even get more than one mail). I have a template html mail file. I individualise this by using str_replace function. It is really slow. Can anyone point me to some performance tips? I was thinking

[PHP] In need of a script

2003-08-24 Thread Stevie D Peele
Can someone show me an example of some code that works something like this : ?php if cookie is present redirect to a certain page ? Thanks The best thing to hit the internet in years - Juno SpeedBand! Surf the web up to FIVE

[PHP] Re: How to open random Flash page with hyperlink?

2003-08-24 Thread zerof
Please see this simple exemple: http://www.educar.pro.br/faqgeral/fla0003.php zerof - Phillip Pang [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] I'm trying to create a hyperlink that will open a random Flash page so that users will see a different flash module each

Re: [PHP] In need of a script

2003-08-24 Thread Matt
On Sunday, August 24, 2003 at 9:49 AM Stevie D Peele wrote: Can someone show me an example of some code that works something like this : ?php if cookie is present redirect to a certain page ? ?php // this must be the first line in the script (or use output buffering) -- see

Re: [PHP] In need of a script

2003-08-24 Thread [EMAIL PROTECTED]
it's in the manual. Stevie D Peele wrote: Can someone show me an example of some code that works something like this : ?php if cookie is present redirect to a certain page ? Thanks The best thing to hit the internet in years -

[PHP] start_session()

2003-08-24 Thread murugesan
Can any one say what it the purpose of start_session() fuction -murugesan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Help with reading files

2003-08-24 Thread Yasir Malik
I am doing my development for our project on a Linux server, but our client uses Windows. One of the features that we have is the ability to send emails. The email feature will have a feature where the client can upload a file from their computers with a list of emails. My script would then parse

Re: [PHP] str_replace performance in large mailing script

2003-08-24 Thread David Otton
On Sun, 24 Aug 2003 14:42:01 +0200, you wrote: I have a mailing script that sends individualised mails to users(some users even get more than one mail). I have a template html mail file. I individualise this by using str_replace function. It is really slow. Can anyone point me to some

Re: [PHP] Help with reading files

2003-08-24 Thread [EMAIL PROTECTED]
How to handle file upload is well explained right at the start of the manual. Once the file has been transfered to your server you can make use of the numerous methods described in the 'filesystem functions' of the manual to handle it. Yasir Malik wrote: I am doing my development for our

Re: [PHP] str_replace performance in large mailing script

2003-08-24 Thread David Otton
On Sun, 24 Aug 2003 15:38:13 +0100, you wrote: Second tip is that sprintf() should be faster than str_replace(). Compare: $text = Hello %s; $name = John; echo (str_replace (%s, $name, $text)); echo (sprintf ($text, $name)); Thinking about it, straight concatenation should be faster than

Re: [PHP] start_session()

2003-08-24 Thread John W. Holmes
murugesan wrote: Can any one say what it the purpose of start_session() fuction Umm... to start a session. Read this: http://us2.php.net/manual/en/ref.session.php -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals

[PHP] Array element from function return

2003-08-24 Thread Wouter van Vliet
Hi, I'm trying to get the first element of a value returned by a function .. == example == function return_Array() { return ('one', 'zwei', 'kolm', 'vier'); } print return_Array()[0]; ==/ example == Now i'd like this script to print 'one' for me .. can it be done without creating a

Re: [PHP] Array element from function return

2003-08-24 Thread John W. Holmes
Wouter van Vliet wrote: I'm trying to get the first element of a value returned by a function .. == example == function return_Array() { return ('one', 'zwei', 'kolm', 'vier'); } print return_Array()[0]; ==/ example == Now i'd like this script to print 'one' for me .. can it be done

RE: [PHP] Array element from function return

2003-08-24 Thread Wouter van Vliet
Hmm .. thanks .. but shortly after posting I came to this idea that I might want to use array_shift(); for this one .. works with numerical indices Out of interest, is it really impossible to get such a thing for string indices? - -Oorspronkelijk bericht- - Van: John W. Holmes

[PHP] Content of Variable ist html code

2003-08-24 Thread Matthias Wulkow
Hi php-general, I'm thinking of how I could store the content of a String-variable a) in a Variable to be passed to other functions b) in a Database (MySQL) too . The content is html-code (with tags and style code (css)). The point is that I'm making myself a kind of CMS, and I want to edit a

Re: [PHP] Content of Variable ist html code

2003-08-24 Thread Dan Anderson
I'm not sure what you're asking but... Using htmlentities() and undohtmlentities() (look up the real functions) to data going into and out of your database will allow you to store it without getting lots of errors... mySQL storage (even TEXT and BLOB types) can't be larger then so many bytes

Re: [PHP] Using PHP on an .html file

2003-08-24 Thread Dan Anderson
Better to do this in an .htaccess file, so you don't incur PHP processing overhead on the entire server (if there are others using it). Apache suggests not using .htaccess files at all because they require a recursive traversing of directories looking for .htaccess files, because some supersede

[PHP] vhost php_value include_path: Seg fault

2003-08-24 Thread Jason End
Using: - Apache 1.3.27 - PHP 4.2.3 I just changed my httpd.conf to have two virtual hosts. One of them uses php, so I added the include_path, but when I try to test the config I get a core dump. Here's the vhost section for the domain using php: [...] VirtualHost * ServerAdmin [EMAIL

[PHP] Re: parse error with mysql_connect

2003-08-24 Thread Catalin Trifu
Hi, The prototype for mysql_connect is: resource mysql_connect ( [string server [, string username [, string password [, bool new_link [, int client_flags ] ) As you can see you get parse error because the fourth argument should be boolean, not string. Cheers, Catalin 35:

Re: [PHP] In need of a script

2003-08-24 Thread Stevie D Peele
Heres what I wrote -- ?php if ($_COOKIE['pagename']) { header('Location: http://www.net-riches.com/800x600.html'); } ? and I got a parse error on line 4, but I do not see what is wrong on line 4! Can anyone else see? Thanks On Sun, 24 Aug 2003 10:04:50 -0400 Matt [EMAIL PROTECTED] writes:

Re: [PHP] In need of a script

2003-08-24 Thread Curt Zirzow
* Thus wrote Stevie D Peele ([EMAIL PROTECTED]): Heres what I wrote -- ?php if ($_COOKIE['pagename']) { header('Location: http://www.net-riches.com/800x600.html'); } ? and I got a parse error on line 4, but I do not see what is wrong on line 4! There is no parse error in that code.

[PHP] Reading an MS Access Database file on *NIX platform using PHP

2003-08-24 Thread weston
I'm building a small web application for a friend using PHP. He'd like to use MS Access to keep the data in, and update the data on the site by FTP'ing Access files he edits on his machine up to the web host. The web host is unix-based (FreeBSD, slightly hacked by Verio, I believe), so this

php-general Digest 24 Aug 2003 18:54:05 -0000 Issue 2256

2003-08-24 Thread php-general-digest-help
php-general Digest 24 Aug 2003 18:54:05 - Issue 2256 Topics (messages 160568 through 160598): Re: Easy XML PHP tutorials ? 160568 by: murugesan CRC and Polynomials 160569 by: Methusula 160571 by: Andrew Brampton regex replace href-content 160570 by:

[PHP] Probably has already been asked... Remote commands

2003-08-24 Thread Richard D. Marriner II
I'm sure this has been asked but I need clearification. I would like to create a script that can run remote programs and edit remote files on Linux (both hosts are linux). The reason is I would like to make a web hosting control panel using PHP that I can have my mail dns server on one machine

[PHP] RE: Reading an MS Access Database file on *NIX platform using PHP

2003-08-24 Thread Travis Kroh
This is a widespread problem. One which we faced, and eventually solved by deciding to just write the application in .NET instead. Some links that may be helpful... This link deals with problems trying to use PHP's built-in function odbc_connect on a Linux box:

RE: [PHP] In need of a script

2003-08-24 Thread Wouter van Vliet
Though no parse error, it can result in an notice about 'undefined index' .. I'd prefer ?php if (isset($_COOKIE['pagename'])) { header('Location: /newpage.php'); die; }; ? Taking care of three things: - No undifined index notice - the cookie can also have a value

[PHP] script not terminating on user abort

2003-08-24 Thread Dennis Jacobfeuerborn
Hi! The connection_* function don't seem to work for me and I can no longer determine when the user has aborted the script. When I close the browser window the script just keeps running. (see bug #23163) The body of the script essentially looks like this: while( !$done ) {

Re: [PHP] Reading an MS Access Database file on *NIX platform using PHP

2003-08-24 Thread David Otton
On Sun, 24 Aug 2003 14:54:41 -0400 (EDT), you wrote: I'm building a small web application for a friend using PHP. He'd like to use MS Access to keep the data in, and update the data on the site by FTP'ing Access files he edits on his machine up to the web host. The web host is unix-based