Re: [PHP] unable to fine /htdocs on my linux machine :(
I had problems getting Apache, PHP and MySQL to work using the RPM's on Redhat 7.0. I ended up deleting all of them and installed manually using the tar's. - Original Message - From: "David Robley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 18, 2001 11:32 PM Subject: Re: [PHP] unable to fine /htdocs on my linux machine :( > On Mon, 19 Mar 2001 05:53, Nilesh Parmar wrote: > > Hi! > >I am trying to install php on my Redhat Linux 7.0 box and > > following all instructions correctly, but i am unable to locate the > > directory /htdocs in my machine I tried all tricks and trials but of no > > use .Can anyone tell me what to do now!! my httpd.conf file is in > > /etc/httpd/conf/ ..Apache is working fine as it is loading the test > > page with http://localhost I installed php4 rpm . > > waiting eagerly for a solution > > thanking you all in advance > > bye > > > > Nilesh Parmar > > This is rather an Apache question, but. It will depend on how you > configured Apache as to where or even whether you will find the htdocs > directory. For clues, check your httpd.conf file and look under > ServerRoot and DocumentRoot. > > -- > David Robley| WEBMASTER & Mail List Admin > RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ > AusEinet| http://auseinet.flinders.edu.au/ > Flinders University, ADELAIDE, SOUTH AUSTRALIA > > -- > 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] oracle insert won't work
I'm getting $FF from another PHP-Page and then I want to insert the Values into my Database like this $handle = ora_logon("iusr@test","kiwi1"); $cursor1 = ora_open($handle); $query = "insert into internet_tmp select rv_ret($FF),$FF,$sesid,(sysdate+0.0021) from dual"; ora_parse($cursor1,$query) or die; ora_exec($cursor1); ora_close($cursor1); tring this on sql-plus works fine what do I do wrong?? oh yea error msg is like this Warning: Ora_Parse failed (ORA-00923: FROM keyword not found where expected -- while processing OCI function OPARSE) in test2.php on line 40 line40 is parse line
[PHP] FYI: PHP HOWTO
I just found this link and thought it might be useful for many PHP users. (Especially, new PHP users, tutorials, etc, but it is also useful for long time PHP users. Many of useful links in it.) http://www.linuxdoc.org/HOWTO/PHP-HOWTO.html This HOWTO is updated 17 Feb 2001. Covers PHP4 and Windows. It's not only Linux users, but also for Windows users. -- Yasuo Ohgaki -- 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] Can you recommend an ISP with the following?
> *PHP4 > *MySQL > *Telnet access > *Decent Support > *Preferably a Cobalt server (or one with a VERY good Web-based > administrator, most other types of Web administrators I've seen have > been clunky and a PITA) > *Pretty Cheap www.blueboxwebhosting.com especially good for support M@ -- 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 - include / require
I was wanting a set of pages generated by individual PHP scripts to each use one PHP script to generate the navigation links. However I'm not winning - a suitable example would be much appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHPLIB and Auth
Hi Guys, I really have a stupid problem but I don't see it :). I wanted to implement authentification with PHPLIB but it seems I am not able to get it working. What happens: If I want to access a page which needs authentification I first get the loginform, so far so good, but when I enter a username and password and submit it, I always get the loginform with the message "Invalid username or password try again". First I thought it was because I had badly configured my database, but the example below shows my database wasn't causing the problem. I think the problem is my loginform, but I don't see how. Do I have to make a setting in my php.ini, what is wrong auth["uname"]=$username; } $uid = false; $this->db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $this->database_table, addslashes($username), addslashes($password))); while($this->db->next_record()) { $uid = $this->db->f("user_id"); $this->auth["perm"] = $this->db->f("perms"); } return $uid; } } /* test to see if everyting is working well with db-backend*/ $db = new TIMEKEEPER_DB; $db->query("select count(*) as count from auth_user"); $db->Next_Record(); $count = $db->f("count"); //count gives 2 which is correct SO OK $username="webadmin"; $password="wwwadmin"; $database_table="auth_user"; $db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $database_table, addslashes($username), addslashes($password))); $db->Next_Record(); $uid = $db->f("user_id"); //uid gives ... which is correct SO OK ---> The must be something wrong with my loginform it does not submit the right values WHY ?> -- 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-CVS] cvs: php4 /ext/midgard midgard.c
emile Mon Mar 19 01:49:59 2001 EDT Modified files: /php4/ext/midgard midgard.c Log: return userid from mgd_auth_midgard Index: php4/ext/midgard/midgard.c diff -u php4/ext/midgard/midgard.c:1.23 php4/ext/midgard/midgard.c:1.24 --- php4/ext/midgard/midgard.c:1.23 Thu Mar 15 02:56:56 2001 +++ php4/ext/midgard/midgard.c Mon Mar 19 01:49:58 2001 @@ -1,4 +1,4 @@ -/* $Id: midgard.c,v 1.23 2001/03/15 10:56:56 emile Exp $ +/* $Id: midgard.c,v 1.24 2001/03/19 09:49:58 emile Exp $ Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]> @@ -742,7 +742,7 @@ default: if (rv >= 0) { - RETVAL_TRUE; + RETVAL_LONG(rv); } else { RETURN_FALSE_BECAUSE(MGD_ERR_INTERNAL); -- PHP CVS 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] MS SQL databse connecting
What PHP funstions should i use to connect to a MS SQL database. can i use the mysql or the odbc commands ? -- 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 & Apache
Ok I had this working once and again it is eluding me on win98 I have added ScriptAlias /php/ "d:/php/" AddType application/x-httpd-php .php .phtml Action application/x-httpd-php "/php/php.exe" but PHP still will not work I have got Perl working and had PHP working but I neglected to save the httpd.conf and now I am lost again Thanks for the help Pat -- 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] cf to php
- Original Message - From: "Jack Dempsey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "chris herring" <[EMAIL PROTECTED]> Sent: Monday, March 19, 2001 2:09 AM Subject: RE: [PHP] cf to php > What exactly does that do chris? > If you're trying to check and see if there's a file on the server, then you > could do something with readdir, is_file, etc...if you want to post what > that actually tests for then i might be able to help more > > jack > > -Original Message- > From: chris herring [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 19, 2001 3:00 AM > To: [EMAIL PROTECTED] > Subject: [PHP] cf to php > > > is there a php equivalent for this little tidbit from a friend's cf script? > here it is: > > > > > -- > 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] PHPLIB and Auth
Can it be that my Apache server is not well configured? I think you have to allow methods like GET and POST ? -Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: maandag 19 maart 2001 10:26 To: PHP Mailing Listl (E-mail) Subject:[PHP] PHPLIB and Auth Hi Guys, I really have a stupid problem but I don't see it :). I wanted to implement authentification with PHPLIB but it seems I am not able to get it working. What happens: If I want to access a page which needs authentification I first get the loginform, so far so good, but when I enter a username and password and submit it, I always get the loginform with the message "Invalid username or password try again". First I thought it was because I had badly configured my database, but the example below shows my database wasn't causing the problem. I think the problem is my loginform, but I don't see how. Do I have to make a setting in my php.ini, what is wrong auth["uname"]=$username; } $uid = false; $this->db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $this->database_table, addslashes($username), addslashes($password))); while($this->db->next_record()) { $uid = $this->db->f("user_id"); $this->auth["perm"] = $this->db->f("perms"); } return $uid; } } /* test to see if everyting is working well with db-backend*/ $db = new TIMEKEEPER_DB; $db->query("select count(*) as count from auth_user"); $db->Next_Record(); $count = $db->f("count"); //count gives 2 which is correct SO OK $username="webadmin"; $password="wwwadmin"; $database_table="auth_user"; $db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $database_table, addslashes($username), addslashes($password))); $db->Next_Record(); $uid = $db->f("user_id"); //uid gives ... which is correct SO OK ---> The must be something wrong with my loginform it does not submit the right values WHY ?> -- 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] use strict alternative
Is there a PHP alternative to Perls use strict command. For anyone who doesnt know Perl, use strict forces local declaration of variables 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] php under Oracle Web server pleaaaaaaaaaase!
Hello Is it possible to work with php under an oracle server ? If yes can u point me to some manuals and articles Thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] cf to php
Chris, all you need to check that is: that should do it, as long as the url var exists it'll work. =) Yoshi - Original Message - > > > > is there a php equivalent for this little tidbit from a friend's cf > script? > > here it is: > > > > -- 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 & Apache
Patrick, Here's how i have my httpd.conf in 2000. make sure you put in the reference to the isapi dll: LoadModule php4_module c:/php/sapi/php4apache.dll Load the module and it should work fine. - Original Message - From: "Patrick" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 19, 2001 3:13 AM Subject: [PHP] PHP & Apache > Ok I had this working once and again it is eluding me on win98 I have > added > > ScriptAlias /php/ "d:/php/" > > AddType application/x-httpd-php .php .phtml > > Action application/x-httpd-php "/php/php.exe" > > but PHP still will not work > I have got Perl working and had PHP working but I neglected to save > the httpd.conf and now I am lost again > > Thanks for the help > Pat > > > > > -- > 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] MS SQL databse connecting
Costas, Depends on whether or not you're using a windows server or linux server. I've found that it's much easier to use MSSQL from a windows server since you can use the mssql_connect commands. for some reason or another (probably lack of configuration knowledge in linux) i've had problems running the mssql_connect commands. I'd recommend using odbc for linux, and mssql for windows. just my experience. btw, i'm assuming you mean mssql, not mysql. ;p Yoshi - Original Message - From: "Costas" <[EMAIL PROTECTED]> Subject: [PHP] MS SQL databse connecting > What PHP funstions should i use to connect to a MS SQL database. > > can i use the mysql or the odbc commands ? -- 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 under Oracle Web server pleaaaaaaaaaase!
On Mon, Mar 19, 2001 at 10:27:19AM -, kaab kaoutar wrote: > Hello > > Is it possible to work with php under an oracle server ? > If yes can u point me to some manuals and articles AFAIK, the Oracle Web server is not Open Source; hence it would be difficult to support it directly. You can always use the CGI or servlet options though. All the stuff for other web servers besides Apache is in the source tree under: /usr/src/php-4.0.4/sapi/ Regards, Frank -- 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] Radio Button Returns (Pleasre Read)
From: "Fred" <[EMAIL PROTECTED]> Sent: Saturday, March 17, 2001 12:22 AM > this is the html source generated: > The error is in: value"index" This should be: value="index" - Carsten -- 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]
FW: [PHP] PHPLIB and Auth
-Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: maandag 19 maart 2001 11:52 To: 'Steve Haemelinck' Subject:RE: [PHP] PHPLIB and Auth It has certainly got something to do with my config. I just tried a simple form with POST And it gave the following ERROR: Parse error: parse error, expecting 'T_STRING' or 'T_VARIABLE' or 'T_NUM_STRING' What does this mean? -Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: maandag 19 maart 2001 10:26 To: PHP Mailing Listl (E-mail) Subject:[PHP] PHPLIB and Auth Hi Guys, I really have a stupid problem but I don't see it :). I wanted to implement authentification with PHPLIB but it seems I am not able to get it working. What happens: If I want to access a page which needs authentification I first get the loginform, so far so good, but when I enter a username and password and submit it, I always get the loginform with the message "Invalid username or password try again". First I thought it was because I had badly configured my database, but the example below shows my database wasn't causing the problem. I think the problem is my loginform, but I don't see how. Do I have to make a setting in my php.ini, what is wrong auth["uname"]=$username; } $uid = false; $this->db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $this->database_table, addslashes($username), addslashes($password))); while($this->db->next_record()) { $uid = $this->db->f("user_id"); $this->auth["perm"] = $this->db->f("perms"); } return $uid; } } /* test to see if everyting is working well with db-backend*/ $db = new TIMEKEEPER_DB; $db->query("select count(*) as count from auth_user"); $db->Next_Record(); $count = $db->f("count"); //count gives 2 which is correct SO OK $username="webadmin"; $password="wwwadmin"; $database_table="auth_user"; $db->query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $database_table, addslashes($username), addslashes($password))); $db->Next_Record(); $uid = $db->f("user_id"); //uid gives ... which is correct SO OK ---> The must be something wrong with my loginform it does not submit the right values WHY ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php under Oracle Web server pleaaaaaaaaaase!
HI! DO U MEAN I SHOULD GIVE UP USING PHP under oracle web server ? i used to work on php under PWS and apache! However i've made a project with ASP under IIS but the client changed his mind and wanted to put it in his oracle web server ! i thought of using php translation from asp ! or at last as long as i master php code it again ! any idea pleaase! Thanks >From: Frank Joerdens <[EMAIL PROTECTED]> >To: kaab kaoutar <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: [PHP] php under Oracle Web server pleaase! >Date: Mon, 19 Mar 2001 11:41:42 +0100 > >On Mon, Mar 19, 2001 at 10:27:19AM -, kaab kaoutar wrote: > > Hello > > > > Is it possible to work with php under an oracle server ? > > If yes can u point me to some manuals and articles > >AFAIK, the Oracle Web server is not Open Source; hence it would be >difficult to support it directly. You can always use the CGI or servlet >options though. All the stuff for other web servers besides Apache is in >the source tree under: > >/usr/src/php-4.0.4/sapi/ > >Regards, Frank > >-- >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] > _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] php under Oracle Web server pleaaaaaaaaaase!
You can still use PHP with Oracle Webserver, www.php.net is the best resource I found so far :) - Original Message - From: "kaab kaoutar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 19, 2001 6:56 PM Subject: Re: [PHP] php under Oracle Web server pleaase! > HI! > DO U MEAN I SHOULD GIVE UP USING PHP under oracle web server ? > i used to work on php under PWS and apache! > However i've made a project with ASP under IIS but the client changed his > mind and wanted to put it in his oracle web server ! > i thought of using php translation from asp ! or at last as long as i master > php code it again ! > any idea pleaase! > Thanks > > > >From: Frank Joerdens <[EMAIL PROTECTED]> > >To: kaab kaoutar <[EMAIL PROTECTED]> > >CC: [EMAIL PROTECTED] > >Subject: Re: [PHP] php under Oracle Web server pleaase! > >Date: Mon, 19 Mar 2001 11:41:42 +0100 > > > >On Mon, Mar 19, 2001 at 10:27:19AM -, kaab kaoutar wrote: > > > Hello > > > > > > Is it possible to work with php under an oracle server ? > > > If yes can u point me to some manuals and articles > > > >AFAIK, the Oracle Web server is not Open Source; hence it would be > >difficult to support it directly. You can always use the CGI or servlet > >options though. All the stuff for other web servers besides Apache is in > >the source tree under: > > > >/usr/src/php-4.0.4/sapi/ > > > >Regards, Frank > > > >-- > >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] > > > > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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-CVS] cvs: php4 /ext/midgard config.m4 config.m4.session
ab Mon Mar 19 01:56:06 2001 EDT Modified files: /php4/ext/midgard config.m4 config.m4.session Log: Keep compability with 4.0.4pl1 Index: php4/ext/midgard/config.m4 diff -u php4/ext/midgard/config.m4:1.15 php4/ext/midgard/config.m4:1.16 --- php4/ext/midgard/config.m4:1.15 Sun Mar 18 23:37:00 2001 +++ php4/ext/midgard/config.m4 Mon Mar 19 01:56:06 2001 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.15 2001/03/19 07:37:00 ab Exp $ +dnl $Id: config.m4,v 1.16 2001/03/19 09:56:06 ab Exp $ dnl Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> dnl Copyright (C) 2000 The Midgard Project ry @@ -72,6 +72,7 @@ else MIDCONFIG_FILE="php_config.h" fi - PHP_SUBST_OLD(MIDCONFIG_FILE) + PHP_SUBST(MIDCONFIG_FILE) + AC_SUBST(MIDCONFIG_FILE) AC_OUTPUT(php_midgard.h, [], []) fi Index: php4/ext/midgard/config.m4.session diff -u php4/ext/midgard/config.m4.session:1.5 php4/ext/midgard/config.m4.session:1.6 --- php4/ext/midgard/config.m4.session:1.5 Sun Mar 18 23:37:00 2001 +++ php4/ext/midgard/config.m4.session Mon Mar 19 01:56:06 2001 @@ -1,4 +1,4 @@ -dnl $Id: config.m4.session,v 1.5 2001/03/19 07:37:00 ab Exp $ +dnl $Id: config.m4.session,v 1.6 2001/03/19 09:56:06 ab Exp $ dnl Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> dnl Copyright (C) 2000 The Midgard Project ry @@ -79,6 +79,7 @@ else MIDCONFIG_FILE="php_config.h" fi - PHP_SUBST_OLD(MIDCONFIG_FILE) + PHP_SUBST(MIDCONFIG_FILE) + AC_SUBST(MIDCONFIG_FILE) AC_OUTPUT(php_midgard.h, [], []) fi -- PHP CVS 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: dynamically change a variable name
What do you mean? Do you want to change the variable to $dwg1 then $dwg2 then $dwg3 or what? A variable is a place for holding information. If you want the same data under a different name then create a new variable equal to the old variable then unset the original. $dwg[0] = $dwg; unset($dwg); for ($i = 1; $i < $max; $i++) { $dwg[$i] = $dwg[$i - 1]; ... } Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: Gary [mailto:[EMAIL PROTECTED]] > Sent: 19 March 2001 01:36 > To: [EMAIL PROTECTED] > Subject: dynamically change a variable name > > > Is there a way to dynamically change a variable name? For example: > I want to change the variable name $DWG to > $DWG1 > $DWG2 > $DWG3 > with a for loop. Is there a way to do this? > > Thanks, Gary > > > -- 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: Privilege system of Mysql...
Hi Sven, Yes, I just started playing with the GRANT syntax.. Only problem is that they first define a user with everything on 'N' And then they define a table in the DB with everything on Y... Problem is that you have to do this for all DB's which you want to allow. This means that newly created DB's should later be added.. This is though very secure, but I am wondering if there is a way to: allow EVERYTHING but the following in stead of allow NOTHING but the following Bye Bye David > have you tried the GRANT syntax? > maybe this helps > take a look at the grant tables afterwards > > regards > > Am 11:48 19.03.2001 schrieben Sie: > >Hi there.. > > > >I am not understanding something how the mysql priviege system works: > > > >I want to do the following: > > > >Give a user access to all tables in an database (also tables which will be > >added in the future) except a > >few private tables like the mysql table itself > > > >This is the way I thought it should be done: > > > >Add a user: '%','username','password','Y',Y','Y','Y','Y','Y','N','N' etc// > >Then add the following to table db > > > >'%',mysql','username','N',N','N','N','N','N','N','N' etc// > > > >Run the Flush privileges command and try it.. > > > >This doesn't work! Or I am missing something.. > >When I think logically, I can maybe understand that the DB looks at the > >user table and sees that the uses has access to do everything and doesn't > >look further at de db table.. > > > >Is this correct? What is then the solution to do what I described above.. > > > >I looked at the manual, but I can't seem to figure out in what order the > >tables are checked.. > >Does it stop looking further when he finds permission to do something or > >does it stop at the first 'N'... > > > > > >PS: I am not planning to use the above example, but it will help me > >understand how the privilege system works.. > > Sven Huster > Senior Unix System Administrator > *BSD, Linux, Solaris > > -- 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-CVS] cvs: php4 / Makefile.in configure.in /sapi/fastcgi CREDITS Makefile.in README.FastCGI config.m4 fastcgi.c php.sym php_fastcgi.h
joostersMon Mar 19 03:03:29 2001 EDT Added files: /php4/sapi/fastcgi CREDITS Makefile.in README.FastCGI config.m4 fastcgi.c php.sym php_fastcgi.h Modified files: /php4 Makefile.in configure.in Log: @ New FastCGI server module New FastCGI server module. Based on the thttpd server module with large chunks of code ripped from the cgi module. Also modifies Makefile.in and configure.in in order to make it build properly. # This initial checkin has been tested with the Zeus web server, # but should work with any server that has a correct FastCGI # implementation. Index: php4/Makefile.in diff -u php4/Makefile.in:1.95 php4/Makefile.in:1.96 --- php4/Makefile.in:1.95 Sun Jun 11 11:51:17 2000 +++ php4/Makefile.inMon Mar 19 03:03:29 2001 @@ -18,7 +18,7 @@ PROGRAM_NAME = php PROGRAM_SOURCES = stub.c -PROGRAM_LDADD= libphp4.la +PROGRAM_LDADD= libphp4.la $(EXT_PROGRAM_LDADD) PROGRAM_LDFLAGS = -export-dynamic PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD) Index: php4/configure.in diff -u php4/configure.in:1.222 php4/configure.in:1.223 --- php4/configure.in:1.222 Thu Mar 15 23:13:06 2001 +++ php4/configure.in Mon Mar 19 03:03:29 2001 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.222 2001/03/16 07:13:06 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.223 2001/03/19 11:03:29 joosters Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -644,6 +644,11 @@ if test "$PHP_SAPI" = "cgi"; then PHP_PROGRAM=php fi + +if test "$PHP_SAPI" = "fastcgi"; then + PHP_PROGRAM=php +fi + PHP_REGEX Index: php4/sapi/fastcgi/Makefile.in +++ php4/sapi/fastcgi/Makefile.in LTLIBRARY_NAME= libsapi.la LTLIBRARY_SOURCES = fastcgi.c include $(top_srcdir)/build/ltlib.mk Index: php4/sapi/fastcgi/README.FastCGI +++ php4/sapi/fastcgi/README.FastCGI FastCGI module -- This module requires the FastCGI development kit, available from http://www.fastcgi.com/ Before building PHP, please enter the dev kit, and run: /configure make make export This will compile the library code required for the FastCGI module. All that is then required is to configure PHP with the '--with-fastcgi' option. After making the code, you will end up with a binary file called 'php'. Installation of this file will depend on the web server being used, please see their documentation for details. Index: php4/sapi/fastcgi/config.m4 +++ php4/sapi/fastcgi/config.m4 AC_MSG_CHECKING(for FastCGI support) AC_ARG_WITH(fastcgi, [ --with-fastcgi=SRCDIR Build PHP as FastCGI application],[ if test "$withval" = "yes"; then FASTCGIPATH=/usr/local else FASTCGIPATH=$withval fi test -f "$FASTCGIPATH/lib/libfcgi.a" || AC_MSG_ERROR(Unable to find libfcgi.a in $FASTCGIPATH/lib) test -f "$FASTCGIPATH/include/fastcgi.h" || AC_MSG_ERROR(Unable to find fastcgi.h in $FASTCGIPATH/include) PHP_SAPI=fastcgi PHP_LIBS=$FASTCGIPATH/lib/libfcgi.a AC_ADD_INCLUDE($FASTCGIPATH/include) EXT_PROGRAM_LDADD="$EXT_PROGRAM_LDADD $FASTCGIPATH/lib/libfcgi.a" INSTALL_IT="\$(INSTALL) -m 0755 $SAPI_PROGRAM \$(bindir)/$SAPI_FASTCGI" RESULT="yes" PHP_SUBST(FASTCGI_LIBADD) PHP_SUBST(EXT_PROGRAM_LDADD) ],[ RESULT="no" ]) AC_MSG_RESULT($RESULT) Index: php4/sapi/fastcgi/fastcgi.c +++ php4/sapi/fastcgi/fastcgi.c /* +--+ | PHP version 4.0 | +--+ | Copyright (c) 1997-2001 The PHP Group| +--+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| | available at through the world-wide-web at | | http://www.php.net/license/2_02.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | +--+ | Author: Ben Mansell <[EMAIL PROTECTED]>| +--+ */ /* Debugging */ /* #define DEBUG_FASTCGI 1 */ /* Two configurables for the FastCGI runner. * * PHP_FCGI_CHILDREN - if set, the FastCGI will pre-fork this many processes * which will accept requests. * * PHP_FCGI_MAX_REQUESTS - if set, the runner will kill itself after handling * the given number of requests. This is to curb any *
[PHP] Re: Privilege system of Mysql...
David, i think, you can do GRANT SELECT,INSERT ON TO [EMAIL PROTECTED] identified by "password" to allow only SELECTS/INSERTS on the table or just SELECTS with GRANT SELECT ON ... or did i get you wrong? Am 12:27 19.03.2001 schrieb David Bouw: >*This message was transferred with a trial version of CommuniGate(tm) Pro* >Hi Sven, > >Yes, I just started playing with the GRANT syntax.. >Only problem is that they first define a user with everything on 'N' > >And then they define a table in the DB with everything on Y... >Problem is that you have to do this for all DB's which you want to allow. >This means that newly created DB's should later be added.. > >This is though very secure, but I am wondering if there is a way to: allow >EVERYTHING but the following in stead of allow NOTHING but the following > >Bye Bye >David > > > > > have you tried the GRANT syntax? > > maybe this helps > > take a look at the grant tables afterwards > > > > regards > > > > Am 11:48 19.03.2001 schrieben Sie: > > >Hi there.. > > > > > >I am not understanding something how the mysql priviege system works: > > > > > >I want to do the following: > > > > > >Give a user access to all tables in an database (also tables which will >be > > >added in the future) except a > > >few private tables like the mysql table itself > > > > > >This is the way I thought it should be done: > > > > > >Add a user: '%','username','password','Y',Y','Y','Y','Y','Y','N','N' >etc// > > >Then add the following to table db > > > > > >'%',mysql','username','N',N','N','N','N','N','N','N' etc// > > > > > >Run the Flush privileges command and try it.. > > > > > >This doesn't work! Or I am missing something.. > > >When I think logically, I can maybe understand that the DB looks at the > > >user table and sees that the uses has access to do everything and doesn't > > >look further at de db table.. > > > > > >Is this correct? What is then the solution to do what I described above.. > > > > > >I looked at the manual, but I can't seem to figure out in what order the > > >tables are checked.. > > >Does it stop looking further when he finds permission to do something or > > >does it stop at the first 'N'... > > > > > > > > >PS: I am not planning to use the above example, but it will help me > > >understand how the privilege system works.. > > > > Sven Huster > > Senior Unix System Administrator > > *BSD, Linux, Solaris > > > > Sven Huster Senior Unix System Administrator *BSD, Linux, Solaris -- 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: Privilege system of Mysql...
The easiest way to do this is to use phpMyAdmin. Go to the mysql database on your server Insert a record into the table called 'user' * enter appropriate value for host (localhost or %) * fill in user name * when entering password, select the PASSWORD function from the pulldown and enter the plaintext initial password * give them the rights you want (Y=yes, N=no) * save the record in the database Go back to the main server page (Home in phpMyAdmin) Clock on Reload Server The rights granted in the mysql.user table are global to the server - i.e. they apply to all current and future databases. Regards Jeff -Original Message- From: David Bouw [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 11:28 AM To: Sven Huster Cc: [EMAIL PROTECTED] Subject: [PHP] Re: Privilege system of Mysql... Hi Sven, Yes, I just started playing with the GRANT syntax.. Only problem is that they first define a user with everything on 'N' And then they define a table in the DB with everything on Y... Problem is that you have to do this for all DB's which you want to allow. This means that newly created DB's should later be added.. This is though very secure, but I am wondering if there is a way to: allow EVERYTHING but the following in stead of allow NOTHING but the following Bye Bye David > have you tried the GRANT syntax? > maybe this helps > take a look at the grant tables afterwards > > regards > > Am 11:48 19.03.2001 schrieben Sie: > >Hi there.. > > > >I am not understanding something how the mysql priviege system works: > > > >I want to do the following: > > > >Give a user access to all tables in an database (also tables which will be > >added in the future) except a > >few private tables like the mysql table itself > > > >This is the way I thought it should be done: > > > >Add a user: '%','username','password','Y',Y','Y','Y','Y','Y','N','N' etc// > >Then add the following to table db > > > >'%',mysql','username','N',N','N','N','N','N','N','N' etc// > > > >Run the Flush privileges command and try it.. > > > >This doesn't work! Or I am missing something.. > >When I think logically, I can maybe understand that the DB looks at the > >user table and sees that the uses has access to do everything and doesn't > >look further at de db table.. > > > >Is this correct? What is then the solution to do what I described above.. > > > >I looked at the manual, but I can't seem to figure out in what order the > >tables are checked.. > >Does it stop looking further when he finds permission to do something or > >does it stop at the first 'N'... > > > > > >PS: I am not planning to use the above example, but it will help me > >understand how the privilege system works.. > > Sven Huster > Senior Unix System Administrator > *BSD, Linux, Solaris > > -- 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] use strict alternative
php variables are local by default. -Original Message- From: Costas [mailto:[EMAIL PROTECTED]] Sent: 19 March 2001 10:27 To: [EMAIL PROTECTED] Subject: [PHP] use strict alternative Is there a PHP alternative to Perls use strict command. For anyone who doesnt know Perl, use strict forces local declaration of variables 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] Automatic documentation: call for help with C++
Hi folks A possible new approach to generating automatic documentation from source code - but it will require someone with good C++ skills to evaluate it... One of the weaknesses of PHP is that it lacks a built-in Javadoc style system for generating automatic documentation in HTML and other formats direct from the source code. On larger projects, this could obviously save very substantial amounts of time. There are a number of approaches to solving this for PHP - either clones of Javadoc written in PHP, or an interface to Javadoc itself. See the article and comments at: http://www.phpbuilder.com/columns/stefano2824.php3 The problem is, to my eye at least, that the Javadoc style of markup is intrusive and reduces the readability of the code. And the php imlementations are still incomplete with pretty basic feature sets. A possible alternative: the programmers at CERN (the guys who invented the WWW) have a free, high-end data processing framework called ROOT, and this includes a documentatation generation component. You can find it at: http://root.cern.ch/root/ With the documentation specific stuff at: http://root.cern.ch/root/Documentation.html There are binaries for most platforms, and the source code is there too. This is seriously cool software, but the interface is in C++. I suspect that using this tool anyone with C++ skills could quickly develop a leading edge documentation engine for PHP that would more than match the alternatives in PERL and Java (it generates very impressive diagrams of class trees, for a start). A full featured, native documentation engine would surely help to establish PHP as a serious corporate tool (anyone at Zend interested??) and would be a great utility for any larger project. Unfortunately, I am merely a PHP hacker with no background in C. If anyone with C++ skills is interested, it would be great if they could check out the potential of ROOT at Cern, and report back to the list. If it looks promising, and someone was prepared to take it on, perhaps we could have a discussion about the markup format that should be employed. Ideally, the interface would allow the user to select from a range of markup styles, rather than impose a style on all users... Any takers? Geoff Caplan Caplan Associates 33 Pytchley House Brown's Green Birmingham B20 1DN United Kingdom Voice: (+44) 0121-515 1154 mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php4 with imap support
After enabling imap support for php4 it --with-imap=/root/install/php/lib_imap/imap-2000c php4 still compiles fine. But Apache does not start anymore. Cannot load /usr/lib/apache/libphp4.so into server: undefined symbol: pam_end So I checked the the libs: worf:~/install/php # ldconfig -v|grep pam libpamc.so.0 -> libpamc.so.0.72 libpam_misc.so.0 -> libpam_misc.so.0.72 libpam.so.0 -> libpam.so.0.72 worf:~/install/php # Looks fine to me. Then I checked the compiled binary: worf:~/install/php # ldd /usr/lib/apache/libphp4.so libc-client.so => /usr/lib/libc-client.so (0x401cb000) libdl.so.2 => /lib/libdl.so.2 (0x4027b000) libz.so.1 => /lib/libz.so.1 (0x4027e000) libinsck.so => /opt/sybase/lib/libinsck.so (0x4028d000) libsybtcl.so => /opt/sybase/lib/libsybtcl.so (0x4029) libintl.so => /opt/sybase/lib/libintl.so (0x402a1000) libcomn.so => /opt/sybase/lib/libcomn.so (0x402a9000) libct.so => /opt/sybase/lib/libct.so (0x402e8000) libcs.so => /opt/sybase/lib/libcs.so (0x40332000) libmm.so.11 => /usr/lib/libmm.so.11 (0x4033d000) libpdf.so.1 => /usr/lib/libpdf.so.1 (0x40342000) libtiff.so.3 => /usr/lib/libtiff.so.3 (0x4036c000) libpng.so.2 => /usr/lib/libpng.so.2 (0x403af000) libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x403da000) libmysqlclient.so.10 => /usr/lib/libmysqlclient.so.10 (0x403f9000) libmcal.so => /usr/lib/libmcal.so (0x40428000) libldap.so.1 => /usr/lib/libldap.so.1 (0x4043b000) liblber.so.1 => /usr/lib/liblber.so.1 (0x4045) libttf.so.2 => /usr/lib/libttf.so.2 (0x40455000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4047d000) libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x4056) libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4056f000) libcurl.so.0 => /usr/lib/libcurl.so.0 (0x40576000) libresolv.so.2 => /lib/libresolv.so.2 (0x40591000) libm.so.6 => /lib/libm.so.6 (0x405a3000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x405c1000) libnsl.so.1 => /lib/libnsl.so.1 (0x405ef000) libc.so.6 => /lib/libc.so.6 (0x40605000) libssl.so.0 => /usr/lib/libssl.so.0 (0x40718000) libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x40745000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2000) worf:~/install/php # Looks fine as well. I found something on the net that there should be a libpam entry... Sorry, don't understand why... Can anyone help and tell me what is wrong? -- Torsten -- 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] use strict alternative
On Monday 19 March 2001 12:53, you wrote: > php variables are local by default. point missed :) "use strict" forces you to declare variables before you use them. AFAIK there's no such thing in PHP (unfortunately). -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) CPU not found. retry, abort, ignore? -- 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 special character -> mysql problem?
Hello, I am wrining a script that insert students in a database: name, email, the data retrive (from text-file) and storing (into database) works fine, but when I want to check if a student is already in the database, I look for the email address, and when I use: $check_email = mysql_query("SELECT student_id FROM pdc_student WHERE student_email=\"".$student_email."\"", $con); $number = mysql_numrows($check_email); if ($number == 0) { ... OR $check_email = mysql_query("SELECT student_id from pdc_student where 1 and student_email like \"$student_email\"", $con); $number = mysql_numrows($check_email); if ($number == 0) { it works fine EXCEPT if the email address contains "_" for example, if I try to add a student with email: [EMAIL PROTECTED], it won't be able to find if the email exists already in the db, it will just add that student even if the email exists already. And this "_" is allowed for email address... :( Anybody encounters that problem and could help me to solve it? Thanks, -Alain- -- 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-CVS] cvs: php4 / README.Zeus /sapi/isapi config.m4
joostersMon Mar 19 03:23:57 2001 EDT Modified files: /php4 README.Zeus /php4/sapi/isapiconfig.m4 Log: Altered README.Zeus to give instructions on building FastCGI. Changed --with-zeus configure option into --with-isapi, since its more descriptive (and since there are now different ways to configure PHP+Zeus) Index: php4/README.Zeus diff -u php4/README.Zeus:1.8 php4/README.Zeus:1.9 --- php4/README.Zeus:1.8Wed Jan 24 10:20:35 2001 +++ php4/README.ZeusMon Mar 19 03:23:56 2001 @@ -1,157 +1,126 @@ Using PHP4 with the Zeus Web Server --- -Zeus fully supports running PHP in combination with our webserver. A -significant improvement in PHP 4 is that you can now run PHP as an -ISAPI module, giving great performance benefits over traditional CGI -code. +Zeus fully supports running PHP in combination with our +webserver. There are three different interfaces that can be used to +enable PHP: -Note that you will need to be running at least version 3.3.8 of the -webserver. If you are running an earlier version, please see our -website (http://www.zeus.com) for upgrade instructions. -Earlier versions of Zeus (3.3.6) can also run PHP, but it is -suggested that you upgrade for full compatibility. +* CGI +* ISAPI +* FastCGI -You should compile PHP using the gcc compiler. Other compilers may -cause build errors. +Of the three, we recommend using FastCGI, which has been tested and +benchmarked as providing the best performance and reliability. -To build the ISAPI version of PHP, start the configuration with: +Full details of how to install PHP are available from our +website, at: -./configure --with-zeus=/usr/local/zeus +http://support.zeus.com/products/php.html -Obviously, replace /usr/local/zeus with the location of where you have -installed Zeus on your machine. For PHP to build successfully, you -need to have 3.3.6 already installed, because the code relies on the -presence of header files provided with the latest version. +If you have any problems, please check the support site for more +up-to-date information and advice. -You may have to adjust the environment variable LDFLAGS and EXTRA_LIBS -in order to link in extra libraries. This depends on the platform on -which you are building and also on the compiler used (see below). A -standard GNU/Linux install with GCC should build fine with no changes. +Quick guide to installing FastCGI with Zeus +--- -Configuring the webserver -- +Step 1 - obtain and install FastCGI development kit. -After running 'make' and 'make install', you will have a 'libphp4.so' -file. Copy this file into a directory reserved for ISAPI -binaries. Now, perform the following steps for each virtual server -that you wish to run PHP on: +Grab the package from: +http://www.fastcgi.com/dist/devkit_2.2.0.tar.gz -1) On the Admin server, go to 'edit server->path mapping' -2) Add an alias to the directory with libphp4.so in it, mapped to - /isapi/ (or a location of your choice). Make sure you set the alias - type to ISAPI. -3) Click 'update' -4) Add a handler for file extension 'php' to be run by /isapi/libphp4.so -5) Click 'update', then go back to the previous page. -6) Click on the 'module configuration' button, ensure that ISAPI - support is ticked. -7) Click on the ISAPI link. At the bottom of the page, click the - checkbox for running ISAPI extensions 'out of process'. -8) Click 'update'. Then restart the virtual server. Done! +Extract the package and follow the instructions: +./configure +make +make export +(run the last as root) +This will install to /usr/local/lib/libfcgi.a +and /usr/local/include/*fcgi* -Troubleshooting -*) Why does the compile fail at Zend/zend-scanner-cc.cc - or Zend/zend-parser.c ? -These source files are auto-generated from the corresponding .y files. -The default distribution of PHP contains pre-generated versions of these -files that have caused problems for some people. The simplest solution is -to delete the files. They will then be rebuilt correctly. You must have the -following GNU tools to do this: +Step 2 - Compile PHP as FastCGI. - bison 1.28 or later - flex 2.5.4 or later +Compile as follows: +./configure --with-fastcgi +make -*) Why does my PHP library fail to load? +Note that PHP has many options to the configure script - +e.g. --with-mysql. You will probably want to select your usual options +before compiling; the above is just a bare minimum, for illustration. -After configuring Zeus, if you get a '502 Bad Gateway' error when -accessing a PHP page, there are problems loading the PHP -library. Check the error log ($ZEUSHOME/web/log/errors) for errors. +After compilation finishes, you will be left with an executable +program called 'php
[PHP-CVS] cvs: php4 /ext/midgard php_midgard.h.in
ab Mon Mar 19 03:50:18 2001 EDT Modified files: /php4/ext/midgard php_midgard.h.in Log: Incompabilities in SCE build fixed for 4.0.5 and 4.0.4pl1 Index: php4/ext/midgard/php_midgard.h.in diff -u php4/ext/midgard/php_midgard.h.in:1.1 php4/ext/midgard/php_midgard.h.in:1.2 --- php4/ext/midgard/php_midgard.h.in:1.1 Sun Mar 18 23:04:56 2001 +++ php4/ext/midgard/php_midgard.h.in Mon Mar 19 03:50:17 2001 @@ -1,4 +1,4 @@ -/* $Id: php_midgard.h.in,v 1.1 2001/03/19 07:04:56 ab Exp $ +/* $Id: php_midgard.h.in,v 1.2 2001/03/19 11:50:17 ab Exp $ Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]> @@ -25,7 +25,12 @@ gets defined. */ #include "php.h" + +#if (PHP_API_VERSION >= 20010119) #include "@MIDCONFIG_FILE@" +#else +#include "php_config.h" +#fi #if HAVE_MIDGARD -- PHP CVS 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 root variable (for Generic Unix and Windows)
I am developing a PHP site under windows which is going to be deployed eventually on Unix (indeed when life gets less hectic will also be developed under Unix but that's another story). Anyway the header.html (included at top of every page) has links in it. However depending where the page is which is including header.html the links (from a relative point of view) will be different. For example for the index.php (which is in site root) the catalogue page is simply referred to as cat.html but from admin.html (which is in the admin directory under site root) ../cat.html would be required. A way to get round this problem seems to be to have a variable with the site root in it (i.e. $siteroot = "c:/pages/") however this is causing me a real headache. using echo "Catalogue renders href to c:/pages/cat.php but then the browser tries to download the page as a file. I have also tried $siteroot = "http://green/ (green being the domain) but this douse not work either. I would really like the solution to this to be platform independent. Ta in Advance, ben -- [EMAIL PROTECTED] (ben@work until end March) [EMAIL PROTECTED] (ben@home) -- 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] site root variable (for Generic Unix and Windows)
you could make your links absolute ie.. /cat.html so if you're in http://green/admin/admin.html you would link to http://green/cats.html HTH M@ > I am developing a PHP site under windows which is going to be deployed > eventually on Unix (indeed when life gets less hectic will also > be developed > under Unix but that's another story). > > Anyway the header.html (included at top of every page) has links in it. > However depending where the page is which is including > header.html the links > (from a relative point of view) will be different. For example for the > index.php (which is in site root) the catalogue page is simply referred to > as cat.html but from admin.html (which is in the admin directory > under site > root) ../cat.html would be required. > > A way to get round this problem seems to be to have a variable > with the site > root in it (i.e. $siteroot = "c:/pages/") however this is causing > me a real > headache. using > > echo "Catalogue > > renders href to c:/pages/cat.php but then the browser tries to > download the > page as a file. I have also tried > > $siteroot = "http://green/ > > (green being the domain) but this douse not work either. > > I would really like the solution to this to be platform independent. > > Ta in Advance, > ben > -- > [EMAIL PROTECTED] (ben@work until end March) > [EMAIL PROTECTED] (ben@home) > > > -- > 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] how do i get a variable type? - not that simple
These are the functions I use to determine if a string value is a valid integer, real, date, etc. Hope this helps. ps - please let me know if you find any errors. thanx. 12) )return FALSE; if ( ($d < 1) or ($d > 31) )return FALSE; // 30 days has sept, apr, jun, and nov (all the rest have 31 [except for feb]) // 94611 if ( ($m == 4) or ($m == 6) or ($m == 9) or ($m == 11) ) { if ($d > 30)return FALSE; } elseif ($m == 2) { if ( IsLeapYear($y) ) { if ( $d > 29 ) return FALSE; } else { if ( $d > 28 ) return FALSE; } } return TRUE; } function IsValidTime($p) { // return TRUE if: // 1. $p is not equal to "" // 2. $p consists of 2 digits in the range 00 to 23, // followed by a colon, // followed by 2 digits in the range 00 to 59, // followed by a colon, // followed by 2 digits in the range 00 to 59. // example 14:45:02 if ( ! isset($p) ) return FALSE; if ( ! ereg("^([0-9]{2})\:([0-9]{2})\:([0-9]{2})$",$p) ) return FALSE; $t = explode(":",$p); if ( count($t) != 3 ) return FALSE; $h = $t[0]; $m = $t[1]; $s = $t[2]; return IsValidTime2($h,$m,$s); } function IsValidTime2($h,$m,$s) { if ( ($h < 0) or ($h > 23) )return FALSE; if ( ($m < 0) or ($m > 59) )return FALSE; if ( ($s < 0) or ($s > 59) )return FALSE; return TRUE; } function IsValidDateTime($p) { // return TRUE if: // 1. $p is not equal to "" // 2. $p consists of a valid date (validated by IsValidDate() above) // followed by a space // followed by a valid time (validated by IsValidTime() above) // example: 1998-04-21 22:01:34 if ( ! isset($p) ) return FALSE; $temp = explode(" ",$p); if ( count($temp) != 2 )return FALSE; $d = $temp[0]; $t = $temp[1]; if ( ! IsValidDate($d) )return FALSE; if ( ! IsValidTime($t) )return FALSE; return TRUE; } function IsValidTimeStamp($p) { // return TRUE if: // 1. $p is not equal to "" // 2. $p consists of a datetime in MMDDHHMMSS format // example: 19980421220134 if ( ! isset($p) ) return FALSE; if ( ! ereg("^([0-9]{14})$",$p) ) return FALSE; $y = substr($p,0,4); $m = substr($p,4,2); $d = substr($p,6,2); $h = substr($p,8,2); $min = substr($p,10,2); $s = substr($p,12,2); if ( ! IsValidDate2($y,$m,$d) ) return FALSE; if ( ! IsValidTime2($h,$min,$s) ) return FALSE; return TRUE; } function TestVF($type,$fn,$v,$p) { // TestVF = TestValidationFunction // example 1: TestVF("integer","IsValidInteger",TRUE,"15"); // ok, 15 is a valid integer, so print nothing // example 2: TestVF("integer","IsValidInteger",FALSE,"15"); // error, 15 *is* a valid integer, so print error // example 3: TestVF("integer","IsValidInteger",FALSE,"abc"); // ok, "abc" is NOT a valid integer, so print nothing // example 4: TestVF("integer","IsValidInteger",TRUE,"abc"); // error, "abc" is NOT a valid integer, so print error $IsValid = $fn($p); if ( $v ) { if ( $IsValid ) return; echo "error, is NOT a valid $type: " . $p . "\n"; } else { if ( ! $IsValid ) return; echo "error, *is* a valid $type: " . $p . "\n"; } } function TestDatesNumbers() { echo "The test is sucessful if nothing else gets printed below this.\n"; // x1F = cc // x20 = space // x21 = ! // ... // x7D = } // x7E = ~ // x7F = cc TestVF("string","IsValidString",TRUE, ""); TestVF("string","IsValidString",TRUE, "asdfasdf"); TestVF("string","IsValidString",FALSE, "asdf\nasdf"); // contains \n TestVF("string","IsValidString",FALSE, "abcd" . chr(0) . "asdf"); // contains chr(0) TestVF("string","IsValidString",FALSE, "abcd\x1Fasdf"); // contains cc TestVF("string","IsValidString",TRUE, "abcd asdf"); TestVF("string","IsValidString",TRUE, "abcd~asdf"); TestVF("string","IsValidString",FALSE, "abcd\x7Fasdf"); // contains cc TestVF("memo","IsValidMemo",TRUE, ""); TestVF("memo","IsValidMemo",TRUE, "asdfasdf"); TestVF("memo","IsValidMemo",TRUE, "asdf\nasdf"); TestVF("memo","IsValidMemo",TRUE, "asdf\rasdf"); TestVF("memo","IsValidMemo",TRUE, "asdf\r\nnasdf"); TestVF("memo","IsValid
RE: [PHP] site root variable (for Generic Unix and Windows)
Agreed - use absolute paths - but DONT include the protocol://server Best is: Not so good is: Don't do this http://www.mine.com/admin/mypage> ^^^ You don't want your dev site linking to unreleased pages in production etc. I wanted relative, but after probs with web design tools, php and having loads of sites to maintain I eventually had to bite the bullet and now use absolute paths for all links. There are too many gotchas balancing a tree of relative links. Note that w3, recommend NOT include the file type in the link. Let the server choose it for you: e.g. is better than than etc. A nice side effect is that you can start with static holding .html pages and transparently substitute them, a page at a time to smarter .php as you get the coding done. Of course, you need a decent web server... Regards Jeff -Original Message- From: Matt Williams [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 1:23 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] site root variable (for Generic Unix and Windows) you could make your links absolute ie.. /cat.html so if you're in http://green/admin/admin.html you would link to http://green/cats.html HTH M@ > I am developing a PHP site under windows which is going to be deployed > eventually on Unix (indeed when life gets less hectic will also > be developed > under Unix but that's another story). > > Anyway the header.html (included at top of every page) has links in it. > However depending where the page is which is including > header.html the links > (from a relative point of view) will be different. For example for the > index.php (which is in site root) the catalogue page is simply referred to > as cat.html but from admin.html (which is in the admin directory > under site > root) ../cat.html would be required. > > A way to get round this problem seems to be to have a variable > with the site > root in it (i.e. $siteroot = "c:/pages/") however this is causing > me a real > headache. using > > echo "Catalogue > > renders href to c:/pages/cat.php but then the browser tries to > download the > page as a file. I have also tried > > $siteroot = "http://green/ > > (green being the domain) but this douse not work either. > > I would really like the solution to this to be platform independent. > > Ta in Advance, > ben > -- > [EMAIL PROTECTED] (ben@work until end March) > [EMAIL PROTECTED] (ben@home) > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/midgard php_midgard.h.in
davidg Mon Mar 19 03:54:31 2001 EDT Modified files: /php4/ext/midgard php_midgard.h.in Log: fixed bad #endif syntax Index: php4/ext/midgard/php_midgard.h.in diff -u php4/ext/midgard/php_midgard.h.in:1.2 php4/ext/midgard/php_midgard.h.in:1.3 --- php4/ext/midgard/php_midgard.h.in:1.2 Mon Mar 19 03:50:17 2001 +++ php4/ext/midgard/php_midgard.h.in Mon Mar 19 03:54:29 2001 @@ -1,4 +1,4 @@ -/* $Id: php_midgard.h.in,v 1.2 2001/03/19 11:50:17 ab Exp $ +/* $Id: php_midgard.h.in,v 1.3 2001/03/19 11:54:29 davidg Exp $ Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]> @@ -30,7 +30,7 @@ #include "@MIDCONFIG_FILE@" #else #include "php_config.h" -#fi +#endif #if HAVE_MIDGARD -- PHP CVS 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 BOOKS
""YoBro"" <[EMAIL PROTECTED]> wrote: > Does anybody know any good books & websites to recommend for PHP & MySql > together. I am looking to advance my knowledge and would really appreciate a > helpful tip. > > Really looking for a book that explains all the advanced features of PHP4 > and MySql as a compliment. I can't give you an unbiased opinion on whether it is good or not, but you might like to look at "PHP and MySQL Web Development" by Luke Welling and Laura Thomson. Here is a link to it on Amazon. http://www.amazon.com/exec/obidos/ASIN/0672317842 although you can probably get it cheaper elsewhere. It will be published in 10 days. Cheers, Luke Welling -- 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-I18N] Encoding detection
Thanks for your timely cooperation. In fact following the direction you gave me I found out that $HTTP_ACCEPT_LANGUAGE was what would work even better Something strange happened though: I formed my include like this: include "lang_".$HTTP_ACCEPT_LANGUAGE.".INC"; So, I have 2 files - lang_bg.inc and lang_de.inc. If I switch my regional settings from Bulgarian to German-standard and browse the site with IE everything's just fine - but if I try NS all of a sudden $HTTP_ACCEPT_LANGUAGE has the value of "en" no matter if my regional settings are Bulgarian of German. Any ideas as to what the workaround for this would be? Gustav Foseid <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Atanas Vassilev: > > I need a way to detect default browser encoding so that i can set a > > variable for language and present the whole site in different > > languages based on encoding. I know encoding does not determine > > language but I only have to switch between german and bulgarian so in > > my case encoding will do the trick... of course if I knew a way to get > > the encoding of the user's browser... > > You have the information you need in $HTTP_ACCEPT_CHARSET. > > -- > Gustav Foseid, Initio IT-løsninger AS > [EMAIL PROTECTED] > > -- > PHP Internationalization 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 Internationalization 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 & Apache
OK it worked Thanks for the pointers Yoshi - Original Message - From: "Yoshi Melrose" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 19, 2001 4:34 AM Subject: Re: [PHP] PHP & Apache > Patrick, > > Here's how i have my httpd.conf in 2000. make sure you put in the reference > to the isapi dll: > > LoadModule php4_module c:/php/sapi/php4apache.dll > > Load the module and it should work fine. > > - Original Message - > From: "Patrick" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, March 19, 2001 3:13 AM > Subject: [PHP] PHP & Apache > > > > Ok I had this working once and again it is eluding me on win98 I have > > added > > > > ScriptAlias /php/ "d:/php/" > > > > AddType application/x-httpd-php .php .phtml > > > > Action application/x-httpd-php "/php/php.exe" > > > > but PHP still will not work > > I have got Perl working and had PHP working but I neglected to save > > the httpd.conf and now I am lost again > > > > Thanks for the help > > Pat > > > > > > > > > > -- > > 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-I18N] Encoding detection
Atanas Vassilev: > I formed my include like this: > include "lang_".$HTTP_ACCEPT_LANGUAGE.".INC"; This will not work properly. Firts of all, youmight get a request from someone having another language set in their preferences. You can also have more than one language set, in my requests HTTP_ACCEPT_LANGUAGE is set to "no, en, sv". -- Gustav Foseid, Initio IT-løsninger AS [EMAIL PROTECTED] -- PHP Internationalization 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] site root variable (for Generic Unix and Windows)
> Agreed - use absolute paths - but DONT include the protocol://server Sorry, I didn't mean it to sound like I meant include the above M@ -- 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] cf to php
the PHP equivalent is isset() if( !isset( $url_Page )) At 03:09 AM 3/19/01 -0500, Jack Dempsey wrote: >What exactly does that do chris? >If you're trying to check and see if there's a file on the server, then you >could do something with readdir, is_file, etc...if you want to post what >that actually tests for then i might be able to help more > >jack > >-Original Message- >From: chris herring [mailto:[EMAIL PROTECTED]] >Sent: Monday, March 19, 2001 3:00 AM >To: [EMAIL PROTECTED] >Subject: [PHP] cf to php > > >is there a php equivalent for this little tidbit from a friend's cf script? >here it is: > > > > >-- >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] dynamically change a variable name
Thanks! "Mark Maggelet" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Sun, 18 Mar 2001 20:36:15 -0500, Gary ([EMAIL PROTECTED]) wrote: >Is there a way to dynamically change a variable name? For example: >I want to change the variable name $DWG to >$DWG1 >$DWG2 >$DWG3 >with a for loop. Is there a way to do this? you could try: for($i=1;$i<=3;$i++){ ${"DWG".$i}=$DWG; } or it might make more sense to use an array. -- 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] Can you recommend an ISP with the following?
I've found http://www.jtlnet.com to be very good and especially responsive... At 09:09 AM 3/19/01 +, Matt Williams wrote: > > *PHP4 > > *MySQL > > *Telnet access > > *Decent Support > > *Preferably a Cobalt server (or one with a VERY good Web-based > > administrator, most other types of Web administrators I've seen have > > been clunky and a PITA) > > *Pretty Cheap > >www.blueboxwebhosting.com > >especially good for support > >M@ > >-- >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-CVS] cvs: php4 /ext/midgard config.m4
davidg Mon Mar 19 04:38:35 2001 EDT Modified files: /php4/ext/midgard config.m4 Log: fixed a compatibility problem with 4.0.4 Index: php4/ext/midgard/config.m4 diff -u php4/ext/midgard/config.m4:1.16 php4/ext/midgard/config.m4:1.17 --- php4/ext/midgard/config.m4:1.16 Mon Mar 19 01:56:06 2001 +++ php4/ext/midgard/config.m4 Mon Mar 19 04:38:35 2001 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.16 2001/03/19 09:56:06 ab Exp $ +dnl $Id: config.m4,v 1.17 2001/03/19 12:38:35 davidg Exp $ dnl Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> dnl Copyright (C) 2000 The Midgard Project ry @@ -32,7 +32,6 @@ else AC_ADD_LIBRARY(midgard) fi - AC_DEFINE(HAVE_MIDGARD, 1, [ ]) PHP_EXTENSION(midgard, $ext_shared) dnl EEH/TODO: Add checks for apache-static compilation @@ -75,4 +74,5 @@ PHP_SUBST(MIDCONFIG_FILE) AC_SUBST(MIDCONFIG_FILE) AC_OUTPUT(php_midgard.h, [], []) + AC_DEFINE(HAVE_MIDGARD, 1, [ ]) fi -- PHP CVS 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] Dynamic generation of text files?
Hi, I'm trying to get my site to generate text files with a certain extension and MIME-type from a database, "on the fly". Specifically, I would like to build something that can create vCards, that is, text files of a particular format with the extension *.vcf, mime-type text/x-vcard, _at the time that the user clicks the link to download the file_. Currently, the only way I have of doing this is prebuilding all the vcf files when the page is built, then deleting them when the user goes somewhere else -- pretty inefficient. I'd really like to have, e.g. a bunch of links that look like this: Click here for John Doe's vCard ...so that when the user clicks the link, their contact manager (Outlook, or whatever) fires up on their machine and displays the freshly-generated vCard. I have, of course, thought of modifying the httpd.conf to have apache parse files with a .vcf extension through the php interpreter -- I think that this would be a very bad idea. ;-) So, is this too much to hope for? TIA --Dan -- 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-CVS] cvs: php4 /ext/midgard config.m4.session
davidg Mon Mar 19 04:41:20 2001 EDT Modified files: /php4/ext/midgard config.m4.session Log: fixed compilation with php-4.0.4 Index: php4/ext/midgard/config.m4.session diff -u php4/ext/midgard/config.m4.session:1.6 php4/ext/midgard/config.m4.session:1.7 --- php4/ext/midgard/config.m4.session:1.6 Mon Mar 19 01:56:06 2001 +++ php4/ext/midgard/config.m4.session Mon Mar 19 04:41:19 2001 @@ -1,4 +1,4 @@ -dnl $Id: config.m4.session,v 1.6 2001/03/19 09:56:06 ab Exp $ +dnl $Id: config.m4.session,v 1.7 2001/03/19 12:41:19 davidg Exp $ dnl Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> dnl Copyright (C) 2000 The Midgard Project ry @@ -32,7 +32,6 @@ else AC_ADD_LIBRARY(midgard) fi - AC_DEFINE(HAVE_MIDGARD, 1, [ ]) PHP_EXTENSION(midgard, $ext_shared) dnl EEH/TODO: Add checks for apache-static compilation @@ -82,4 +81,5 @@ PHP_SUBST(MIDCONFIG_FILE) AC_SUBST(MIDCONFIG_FILE) AC_OUTPUT(php_midgard.h, [], []) + AC_DEFINE(HAVE_MIDGARD, 1, [ ]) fi -- PHP CVS 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-CVS] cvs: php4 /ext/midgard config.m4 config.m4.session
ab Mon Mar 19 04:52:01 2001 EDT Modified files: /php4/ext/midgard config.m4 config.m4.session Log: 4.0.4pl1 compability finally fixed Index: php4/ext/midgard/config.m4 diff -u php4/ext/midgard/config.m4:1.17 php4/ext/midgard/config.m4:1.18 --- php4/ext/midgard/config.m4:1.17 Mon Mar 19 04:38:35 2001 +++ php4/ext/midgard/config.m4 Mon Mar 19 04:52:00 2001 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.17 2001/03/19 12:38:35 davidg Exp $ +dnl $Id: config.m4,v 1.18 2001/03/19 12:52:00 ab Exp $ dnl Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> dnl Copyright (C) 2000 The Midgard Project ry @@ -32,7 +32,6 @@ else AC_ADD_LIBRARY(midgard) fi - PHP_EXTENSION(midgard, $ext_shared) dnl EEH/TODO: Add checks for apache-static compilation AC_PATH_PROG(APXS, apxs) @@ -75,4 +74,5 @@ AC_SUBST(MIDCONFIG_FILE) AC_OUTPUT(php_midgard.h, [], []) AC_DEFINE(HAVE_MIDGARD, 1, [ ]) + PHP_EXTENSION(midgard, $ext_shared) fi Index: php4/ext/midgard/config.m4.session diff -u php4/ext/midgard/config.m4.session:1.7 php4/ext/midgard/config.m4.session:1.8 --- php4/ext/midgard/config.m4.session:1.7 Mon Mar 19 04:41:19 2001 +++ php4/ext/midgard/config.m4.session Mon Mar 19 04:52:00 2001 @@ -1,4 +1,4 @@ -dnl $Id: config.m4.session,v 1.7 2001/03/19 12:41:19 davidg Exp $ +dnl $Id: config.m4.session,v 1.8 2001/03/19 12:52:00 ab Exp $ dnl Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> dnl Copyright (C) 2000 The Midgard Project ry @@ -32,7 +32,6 @@ else AC_ADD_LIBRARY(midgard) fi - PHP_EXTENSION(midgard, $ext_shared) dnl EEH/TODO: Add checks for apache-static compilation AC_PATH_PROG(APXS, apxs) @@ -82,4 +81,5 @@ AC_SUBST(MIDCONFIG_FILE) AC_OUTPUT(php_midgard.h, [], []) AC_DEFINE(HAVE_MIDGARD, 1, [ ]) + PHP_EXTENSION(midgard, $ext_shared) fi -- PHP CVS 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] Checking if a web, a url really exists ?
Anybody got an idea on how to check if a url really exists ? -- 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] how to use php and xsl to transform xml to html?
ihi all, i was reading somewhere on how ASP uses microsoft's xml engine to transform xml documents which have accompanying xsl stylesheets. basically what i would like to do is write an xml document, write an accompanying xsl sheet, and then run a php script on the web so that an html file is produced from my xml file, which i can point to? does that make sense? can that be done?? thanks! /sunny __ Do You Yahoo!? Get email at your own domain with 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-CVS] cvs: php4 /ext/midgard config.m4 config.m4.session
On Mon, 19 Mar 2001, Alexander Bokovoy wrote: > abSun Mar 18 23:37:01 2001 EDT > > Modified files: > /php4/ext/midgard config.m4 config.m4.session > Log: > Oops. Substitution code fixed AC_OUTPUT is not intended to be called twice. Did not PHP_OUTPUT work for you? > - PHP_OUTPUT(php_midgard.h) > + PHP_SUBST_OLD(MIDCONFIG_FILE) > + AC_OUTPUT(php_midgard.h, [], []) - Sascha Experience IRCG http://schumann.cx/http://schumann.cx/ircg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] MS SQL databse connecting
> -Original Message- > From: Yoshi Melrose [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 19, 2001 4:38 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] MS SQL databse connecting > > > Depends on whether or not you're using a windows server or > linux server. I've found that it's much easier to use MSSQL > from a windows server since you can use the mssql_connect > commands. for some reason or another (probably lack of > configuration knowledge in linux) i've had problems running the > mssql_connect commands. I'd recommend using odbc for linux, > and mssql for windows. just my experience. Just for the record (and for the mailing list archives, on the off chance that somebody besides me uses them occasionally)... I've successfully enabled the mssql* commands in PHP on FreeBSD (presumably this would work under Linux just as well) by installing the FreeTDS libraries (available from freetds.org), and then configuring PHP "--with-sybase" --- 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]
[PHP] Problems with Linux PHP
I'm having a couple of problems while porting some software from Lynx OS to Linux. Here they are: 1. The encryption method seems to be different. Does anyone know the salt to use in the crypt() function in Linux? 2. Also, I seem to not be able to popen() in Linux. I get a file pointer which is blank. Does anybody know why? Thanks in advance, Liam
Re: [PHP] TraceRoute
The reason is to keep you email address from being collected by Usenet trolling robots. In that case, however, you should mention (via signature or otherwise) in the body of the message what word to remove to get a valid address. Since this newsfeed is fairly inconspicuous it is likely not a problem here. -david ""David Smith"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > This would be because his email shows [EMAIL PROTECTED] Hint > the -nospam at the end. I don't know why people do this and then ask for > help because when someone offers the help the email bounces... > > David Smith > > -Original Message- > From: Henrik Hansen [mailto:[EMAIL PROTECTED]] > Sent: Sunday, March 18, 2001 5:18 PM > To: Kath > Cc: Mick; Henrik Hansen; [EMAIL PROTECTED] > Subject: Re: [PHP] TraceRoute > > > "Kath" <[EMAIL PROTECTED]> wrote: > > > I tried emailing him 5 times with this, but I could never get through :| > > > > I even found the script for him and tried to send it to him :| > > > > - Kath > > heh i got an error too, lets just hope he read the group :) > > -- > Henrik Hansen > > > -- > 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]
SV: [PHP] Checking if a web, a url really exists ?
This should work: $url = http://www.php.net; if ($fp = fopen ($url, "r")) { /* DO THE STUFF */ } Of course the entire web page can be retrieved through the created file pointer. /Daniel -Opprinnelig melding- Fra: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sendt: 19. mars 2001 15:27 Til: PHP Mailing Listl (E-mail) Emne: [PHP] Checking if a web, a url really exists ? Anybody got an idea on how to check if a url really exists ? -- 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] Automatic documentation: call for help with C++
Hi, To quickly get to the gist of it... Geoff Caplan wrote: > Any takers? I am definitely interested. The problem is: I am unlikely to be able to find sufficient time. Therefore, (unfortunately,) I can only be counted upon as a second or third rung helper, if at all :-(. I'll try and have a look at ROOT and evaluate its suitability. Great posting! -- Regards, Harshdeep Singh Jawanda. -- 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] Why not 'file_exists()' for URLs?
Since fopen/fread/fclose all work with standard URLs, why not allow file_exists() to work with URLs as well? What is the procedure to make such a request? And yes, I know how to work around it for now; quite simple even for a newbie such as myself...not to mention that a similar question was recently posted and answered. Thanks, david -- In a Norwegian cocktail lounge: Ladies are requested not to have children in the bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Dynamic generation of text files?
Click here for John Doe's vCard GenericCard.php would have something like... // // build $text from $uid passed in // header("Content-type: x/y"); header("Content-Disposition: attachment; filename=$filename" ); print $text; exit(); "x/y" would be something like text/html or application/vnd.excel or something like that. Whatever the defined MIME header for Vcards is, put that after the content-type. $filename would be the name of the file you want to call this - something.vcf I'd expect. We do this with Excel files all the time - sending down tab-delimited text, and putting an excel application header on the file. Dan Costello wrote: > Hi, > > I'm trying to get my site to generate text files with a certain extension > and MIME-type from a database, "on the fly". > > Specifically, I would like to build something that can create vCards, that > is, text files of a particular format with the extension *.vcf, mime-type > text/x-vcard, _at the time that the user clicks the link to download the > file_. > > Currently, the only way I have of doing this is prebuilding all the vcf > files when the page is built, then deleting them when the user goes > somewhere else -- pretty inefficient. I'd really like to have, e.g. a bunch > of links that look like this: > > Click here for John > Doe's vCard > > ...so that when the user clicks the link, their contact manager (Outlook, or > whatever) fires up on their machine and displays the freshly-generated > vCard. > > I have, of course, thought of modifying the httpd.conf to have apache parse > files with a .vcf extension through the php interpreter -- I think that this > would be a very bad idea. ;-) > > So, is this too much to hope for? -- 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] Running script on remote server
On Sat, Mar 17, 2001 at 05:27:55PM +1300, Patrick Dunford wrote: > The example in the Help shows opening a file at http://www.php.net/ with > fopen(). Are they accessing the source code of the script, or the HTML code > that is output by the PHP server when it runs the PHP script that it loads > from that location? They are only accessing the HTML code that the PHP program outputs. kA > What I want to be able to do is, to get around the problem that the server > that I am running my site on does not have database, I want to run the > database on another server elsewhere on the Web. I want to be able to, by > fopen() -ing the page via its URL, to be passing some variables to the > script, have the remote PHP server run the script and pass back to me the > output as a file, which I can then load into my web page and display. I have done something similar once when dealing with an IMAP server. The website did not have IMAP support compiled in, but the IMAP server did have PHP installed with IMAP support. Rather than adding support to the webserver, I was forced to do some scripting on the remote IMAP server. I just did includes and sent the variables the remote script needed. http://www.remoteimapserver.com/remote.php?neededvariable=neededvalue"); ?> Anything the remote.php file outputs will be output into the HTML of the calling program. Anyone accessing the website has no idea that the page they are viewing is coming from 2 different servers. -- Jason Stechschulte [EMAIL PROTECTED] -- signal(i, SIG_DFL); /* crunch, crunch, crunch */ -- Larry Wall in doarg.c from the perl source code -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MS SQL databse connecting
Am I the only one who can not find any free ODBC drivers for Linux? I see countless references to ODBC driver managers, but no ODBC drivers themselves - not free ones anyway. I'll have to second the other poster's comments re: FreeTDS. It works fine, and we're looking at using SQLRelay in conjunction, to give us connection pooling benefits too. We're fortunate to count the FreeTDS author as a (mostly!) regular member of our area PHP user group, and his contribution to this area (unix to ms/sybase database talking) can't be understated. :) Yoshi Melrose wrote: > Costas, > > Depends on whether or not you're using a windows server or linux server. > I've found that it's much easier to use MSSQL from a windows server since > you can use the mssql_connect commands. for some reason or another (probably > lack of configuration knowledge in linux) i've had problems running the > mssql_connect commands. I'd recommend using odbc for linux, and mssql for > windows. just my experience. > > btw, i'm assuming you mean mssql, not mysql. ;p > > Yoshi -- 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] Invalid or Valid because the same.
On Sat, Mar 17, 2001 at 02:35:25PM +0800, [EMAIL PROTECTED] wrote: > I have attached a php file together with this email. I believe your attachment was stripped somewhere along the line. We will definitely have to see code to help you figure out what is going wrong. Could you at least include a snippet in your message? -- Jason Stechschulte [EMAIL PROTECTED] -- What about WRITING it first and rationalizing it afterwords? :-) -- Larry Wall in <[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] MS SQL databse connecting
have you tried out http://freshmeat.net ? do a search for odbc, you'll find a few. :) - Original Message - From: "Michael Kimsal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 19, 2001 9:01 AM Subject: Re: [PHP] MS SQL databse connecting > Am I the only one who can not find any free ODBC drivers for Linux? > I see countless references to ODBC driver managers, but no ODBC drivers > themselves - not free ones anyway. > > I'll have to second the other poster's comments re: FreeTDS. It works fine, > and we're looking at using SQLRelay in conjunction, to give us connection > pooling benefits too. We're fortunate to count the FreeTDS author as a > (mostly!) regular member of our area PHP user group, and his > contribution to this area (unix to ms/sybase database talking) can't > be understated. :) -- 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] Repost URGENT: Can't see picture!!!!!!!!
On Sat, Mar 17, 2001 at 01:16:16AM -0700, Mike Yuen wrote: > > Hi, this is a repost and nothing i've tried is working. Basically, I > allow people to upload pictures and they all go to the proper > directories but I can't see the picture. I can see the pictures great > on my windows server but no one else can see it. Obviously the path to > the images is screwed but I can't figure it out. The $picdir i've tried > are: > $picdir = "./userpics"; > $picdir = "c:/phpweb/userpics/" > $picdir = "/userpics"; > $picdir = "../userpics"; > All of the above don't work. I'll post my code below: The directory is probably not viewable from the web. Try putting the folder somewhere in the web tree. -- Jason Stechschulte [EMAIL PROTECTED] -- No, that'd be silly. -- Larry Wall in <[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] Editing Variables from another script.
On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED] wrote: > I'm trying to create a form whereby I can edit the variables with just the form. > > It will be something like a form for me to change the database >details(username,server,password) in a .inc I'm using. > > Is there anyway for me to pass information into another file's variable and have it >saved in there? > > If anyone have seen Newspro (CGI) before, when you edit some parts in a form, the >information will be saved. How can it be done in PHP? There is probably a hundred or more ways this can be done. For me to be able to give you specifics, you will have to be more specific with what you are doing and what you have tried. -- Jason Stechschulte [EMAIL PROTECTED] -- Well, I think Perl should run faster than C. :-) -- Larry Wall in <[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] pulldown population not getting the last value
On Sun, Mar 18, 2001 at 05:38:36PM -0800, Tom Beidler wrote: > I'm trying to create a pulldown menu with distinct names from the found set. > For some reason I never get the last name. Here's my code; > > $contact_query = "SELECT DISTINCT name FROM request" > . " WHERE id <= '5' OR demo_id = '$demo_id'" > . " ORDER BY name"; > $contact_result = mysql_query ($contact_query) > or die ("Cannot build contact"); > > while ($contact_row = mysql_fetch_array ($contact_result)) > { > $name = $contact_row["name"]; > $option_contact .= "$name\n"; > } > > What gives? I have not seen anything wrong with this portion of code. Have you tried echoing $contact_row["name"] inside the loop to make sure this is the portion of your code that is broken? -- Jason Stechschulte [EMAIL PROTECTED] -- All language designers are arrogant. Goes with the territory... :-) -- Larry Wall in <[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] FAQ
There is a well maintained site whose purpose is to answer/archive frequently asked questions: http://php.faqts.com Robert Zwink -Original Message- From: Rick St Jean [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 15, 2001 12:05 PM To: [EMAIL PROTECTED] Subject: [PHP] FAQ It is there a list of most frequently asked questions? It seems that people ask the same questions, again and again, they do not READ THE MANUAL. Yes I have asked 2 stupid questions, but I really did search and I am reading my manuals, the PHP and the book that I bought. Also I would like to know if there would be a demand for an experienced mailing list? I am just frustrated by the same 3 questions that pop up about once a day. The rest of the posts are great. Rick ## # Rick St Jean, # [EMAIL PROTECTED] # President of Design Shark, # http://www.designshark.com/ # Quick Contact: http://www.designshark.com/messaging.ihtml # Tel: 905-684-2952 ## -- 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] ODD phpAds question
I have never got the groups thing to work on phpAds, actually I have never even seen anything for it in the options of the admin screen. So what I have done is created a customer with mutliple banners. I host free banners for other websites in my genre and host thier banners under that customer name.. as such I want to give out code for the other sites to run the banners as well.. the customer name I've given it is "cthulhu" here's the code I've tried so far: http://www.shoggoth.net/phpAds/click.php3?n=cthulhu"> http://www.shoggoth.net/phpAds/phpads.php3?n=cthulhu"> If you see a makeawish foundation or VA banner then its not showing the cthulhu banner.. anyway anyone know of to do what I'm asking with phpads? Matt "Trollboy" Wiseman www.shoggoth.net/trollboy/trollboy.jpg [EMAIL PROTECTED] "I wish the world had one throat!!" -Al Bundy -- 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 Digest 19 Mar 2001 15:25:03 -0000 Issue 576
php-general Digest 19 Mar 2001 15:25:03 - Issue 576 Topics (messages 44479 through 44566): Re: just wondering 44479 by: Peter Houchin Re: Tables with scroll in HTML? 44480 by: Adi Wibowo Re: TraceRoute 44481 by: David Smith 44552 by: David G. headers_sent 44482 by: Clayton Dukes 44483 by: Jack Dempsey 44484 by: Clayton Dukes 44485 by: Jack Dempsey Re: metabase docs and DB abstraction 44486 by: Manuel Lemos first three characters 44487 by: Rahul Bhide 44489 by: Jack Dempsey 44490 by: Ankur Verma Re: dynamically change a variable name 44488 by: Mark Maggelet 44524 by: Tim Ward 44542 by: Gary Re: Sessions and CHECKBOXES :( 44491 by: Yasuo Ohgaki Seg Fault with fopen 44492 by: Matt Friedman PHP and XSLT, anyone working with these? 44493 by: Bryan Willett 44494 by: Bryan Willett unable to fine /htdocs on my linux machine :( 44495 by: Nilesh Parmar 44497 by: David Robley 44501 by: Harshdeep S Jawanda 44502 by: Paul O'Neil values from text boxes 44496 by: Dennis Gearon Re: Problems with multiple query 44498 by: Luca Lazzeroni cf to php 44499 by: chris herring 44500 by: Jack Dempsey 44510 by: chris herring 44514 by: Yoshi Melrose 44541 by: Joe Sheble (Wizaerd) oracle insert won't work 44503 by: Rudolf Frint Re: PHP HOWTO 44504 by: Yasuo Ohgaki Re: Can you recommend an ISP with the following? 44505 by: Matt Williams 44544 by: Joe Sheble (Wizaerd) PHP - include / require 44506 by: Surfer! PHPLIB and Auth 44507 by: Steve Haemelinck 44511 by: Steve Haemelinck 44521 by: Steve Haemelinck MS SQL databse connecting 44508 by: Costas 44516 by: Yoshi Melrose 44551 by: Mark Roedel 44557 by: Michael Kimsal 44560 by: Yoshi Melrose PHP & Apache 44509 by: Patrick 44515 by: Yoshi Melrose 44539 by: Patrick use strict alternative 44512 by: Costas 44527 by: Stewart Taylor 44531 by: Christian Reiniger php under Oracle Web server pleaase! 44513 by: kaab kaoutar 44517 by: Frank Joerdens 44522 by: kaab kaoutar 44523 by: techzeus.pacific.net.sg Re: Can PHP for Oracle randomly access rows in a result set? 44518 by: Thies C. Arntzen 44519 by: Neil Kimber Re: Radio Button Returns (Pleasre Read) 44520 by: Carsten Gehling Re: Privilege system of Mysql... 44525 by: David Bouw 44526 by: Sven Huster 44529 by: Jeff Armstrong Automatic documentation: call for help with C++ 44528 by: Geoff Caplan 44553 by: Harshdeep S Jawanda php4 with imap support 44530 by: Torsten Curdt PHP - MySQL special character -> mysql problem? 44532 by: Alain site root variable (for Generic Unix and Windows) 44533 by: ben.2.edwards.bt.com 44534 by: Matt Williams 44536 by: Jeff 44540 by: Matt Williams Re: how do i get a variable type? - not that simple 44535 by: Ide, Jim Query - Grouping Results 44537 by: Jordan Elver 44543 by: Jeff Armstrong 44550 by: Jordan Elver 44559 by: Jordan Elver 44564 by: Jeff Armstrong Re: PHP & MYSQL BOOKS 44538 by: Luke Welling Dynamic generation of text files? 44545 by: Dan Costello 44555 by: Michael Kimsal Checking if a web, a url really exists ? 44546 by: Steve Haemelinck 44549 by: Daniel Svensson, Coretrek how to use php and xsl to transform xml to html? 44547 by: Sandeep Hundal Problems with Linux PHP 44548 by: Liam Gibbs Why not 'file_exists()' for URLs? 44554 by: David G. Re: Running script on remote server 44556 by: Jason Stechschulte Re: Invalid or Valid because the same. 44558 by: Jason Stechschulte Re: Repost URGENT: Can't see picture 44561 by: Jason Stechschulte Re: Editing Variables from another script. 44562 by: Jason Stechschulte Re: pulldown population not getting the last value 44563 by: Jason Stechschulte Re: FAQ 44565 by: Robert V. Zwink ODD phpAds question 44566 by: Matt \"TrollBoy\" Wiseman Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- On Mon, 19 Mar 2001 01:34, Peter Houchin wrote: > What am going to try & do is get it so mail() returns true then run > this script else do this > > Peter Like most functions in PHP, mail() returns a value - boolean according to the manual. So you could do something like $mail = mail(values); if (
[PHP] Searching multiple tables
I'm having a hard time chasing down a bug. I have themes installed on my website, the color choices are stored in the database. I need to search all tables within the database for the word "red" how can I do this? Thanks :-) Clayton Dukes -- 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] Problems with Linux PHP
[PHP] PHP vs Servlet
Hi! I am sure you have a solution to this... How shall I communicate with a servlet from PHP? I have a servlet which makes a DB-query and returns the result. Thanks! / Jeppe -- Jesper Blomström [EMAIL PROTECTED] Arbete: 08-566 280 08 Hem:08-669 23 10 Mobil: 070-30 24 911 -- 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] first three characters
substr() http://www.php.net/manual/en/function.substr.php Kirk > -Original Message- > From: Rahul Bhide [mailto:[EMAIL PROTECTED]] > Sent: Sunday, March 18, 2001 11:02 PM > To: [EMAIL PROTECTED] > Subject: [PHP] first three characters > > > Gurus, > How do I extract the first n characters out of a word . I > have this- > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] use strict alternative
I think there is an error_level you can set that will warn about using *undefined* variables before they have been assigned a value. Don't recall the details offhand. Kirk > -Original Message- > From: Christian Reiniger [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 19, 2001 5:37 AM > To: '[EMAIL PROTECTED]' > Subject: Re: [PHP] use strict alternative > "use strict" forces you to declare variables before you use > them. AFAIK > there's no such thing in PHP (unfortunately). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] how do i get a variable type? - not that simple
Jim, Thanks for sharing all your hard work. Have you seen checkdate()? http://www.php.net/manual/en/function.checkdate.php Kirk > -Original Message- > From: Ide, Jim [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 19, 2001 6:38 AM > To: 'phpman'; [EMAIL PROTECTED] > Subject: RE: [PHP] how do i get a variable type? - not that simple > > > These are the functions I use to determine if > a string value is a valid integer, real, date, etc. > Hope this helps. > > ps - please let me know if you find any errors. thanx. > > > function IsValidBoolean($p) { > if ( isset($p) ) { > if ((strtolower($p) == "true") or (strtolower($p) == > "false")) return TRUE; > } > return FALSE; > } > > function IsValidMemo($p) { > > // If $p contains any characters other than printable ascii, > // or \r or \n, return FALSE. > > if (trim($p) == "") return TRUE; > if ( ereg("[^\r\n\x20-\x7E]", $p) ) return FALSE; > return TRUE; > } > > function IsValidString($p) { > > // If $p contains any characters other than printable ascii, > // return FALSE. > > if (trim($p) == "") return TRUE; > if ( ereg("[^\x20-\x7E]", $p) ) return FALSE; > return TRUE; > } > > function IsValidInteger($p) { > > // return TRUE if: > // 1. $p is not equal to "" > // 2. $p consists of 1 or more digits, optionally preceded by a > minus sign > > if ( isset($p) )return ereg("^\-?[0-9]+$",$p); > return FALSE; > } > > function IsValidReal($p) { > > // return TRUE if: > // 1. $p is not equal to "" > // 2. $p begins with optional minus sign, followed by 1 or more > digits, followed by a decimal point, > //followed by 1 or more digits > // 3. $p can be optionally preceded by a minus sign > > if ( isset($p) )return ereg("^\-?[0-9]+\.[0-9]+$",$p); > return FALSE; > } > > function IsLeapYear($y) { > if ( (($y % 4) == 0) && (($y % 100) != 0) || (($y % 400) == 0)) > return TRUE; > return FALSE; > } > > function IsValidDate($p) { > > // return TRUE if: > // 1. $p is not equal to "" > // 2. $p consists of 4 digits followed by minus sign, > followed by 2 > digits, followed by > //minus sign, followed by 2 digits > // example 1995-02-03 > > if ( ! isset($p) ) > return FALSE; > if ( ! ereg("^([0-9]{4})\-([0-9]{2})\-([0-9]{2})$",$p) ) > return FALSE; > > $t = explode("-",$p); > if ( count($t) != 3 ) return FALSE; > $y = $t[0]; > $m = $t[1]; > $d = $t[2]; > > return IsValidDate2($y,$m,$d); > } > > function IsValidDate2($y,$m,$d) { > > if ( ($m < 1) or ($m > 12) )return FALSE; > if ( ($d < 1) or ($d > 31) )return FALSE; > > // 30 days has sept, apr, jun, and nov (all the rest > have 31 [except > for feb]) > // 94611 > > if ( ($m == 4) or ($m == 6) or ($m == 9) or ($m == 11) ) { > if ($d > 30)return FALSE; > } elseif ($m == 2) { > if ( IsLeapYear($y) ) { > if ( $d > 29 ) return FALSE; > } else { > if ( $d > 28 ) return FALSE; > } > } > return TRUE; > } > > function IsValidTime($p) { > > // return TRUE if: > // 1. $p is not equal to "" > // 2. $p consists of 2 digits in the range 00 to 23, > // followed by a colon, > // followed by 2 digits in the range 00 to 59, > // followed by a colon, > // followed by 2 digits in the range 00 to 59. > // example 14:45:02 > > if ( ! isset($p) ) > return FALSE; > if ( ! ereg("^([0-9]{2})\:([0-9]{2})\:([0-9]{2})$",$p) ) > return FALSE; > > $t = explode(":",$p); > if ( count($t) != 3 ) return FALSE; > $h = $t[0]; > $m = $t[1]; > $s = $t[2]; > > return IsValidTime2($h,$m,$s); > } > > function IsValidTime2($h,$m,$s) { > > if ( ($h < 0) or ($h > 23) )return FALSE; > if ( ($m < 0) or ($m > 59) )return FALSE; > if ( ($s < 0) or ($s > 59) )return FALSE; > > return TRUE; > } > > function IsValidDateTime($p) { > > // return TRUE if: > // 1. $p is not equal to "" > // 2. $p consists of a valid date (validated by > IsValidDate() above) > // followed by a space > // followed by a valid time (validated by > IsValidTime() above) > // example: 1998-04-21 22:01:34 > > if ( ! isset($p) ) return FALSE; > > $temp = explode(" ",$p); > if ( count($temp) != 2 )return FALSE; > $d = $temp[0]; > $t = $temp[1]; > if ( ! IsValidDate($d) )return FALSE; > if ( ! IsValidTime($t) )return FALSE; > > return
Re: [PHP] submission of 1..N variables
I'll show you how you want, but will recommend using arrays. heres what you should be doing. $val) // do something ?> alot simpler, expandible and easier to read. Im sure its probably faster too... -- Chris Lee [EMAIL PROTECTED] "Ekkard Gerlach" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, n variables reach my php-programm by submission: A0 A1 ... An Depending on Ai is set I want to run some actions. How can I evaluate Ai ?? if (isset (A1) then # entrance { i=0; while( isset($Ai)) { /* Of course $Ai is not working !!! */ { $B= $Ai ... action ... } } I tried a lot with eval , with backticks, ... but no suceess. Anybody an Idea? tia Ekkard -- 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] Source Protection
In defence of zend technologies and open source. Is your php code being used for profit? then purchase the encoder. Is your code being used for non-profit? then release it as open source for the community to use. -- Chris Lee [EMAIL PROTECTED] ""Chris Anderson"" <[EMAIL PROTECTED]> wrote in message 001901c0b026$6dd9a5c0$bf1412d1@s3e8p3">news:001901c0b026$6dd9a5c0$bf1412d1@s3e8p3... After realizing that The Zend Encoder is 2000$ I've decided that wont work for a college student(me). Is there any other way to protect source in my components? -- 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] Variables problem
I dont know how good of an idea it is to have 180 variable variable names. oi, headache. but the question you asked was this. " $q = 'tar1-1' how do I access the variable $tar1-1 " no problem echo $$q; -- Chris Lee [EMAIL PROTECTED] ""Per Kallin"" <[EMAIL PROTECTED]> wrote in message 98va5j$3lp$[EMAIL PROTECTED]">news:98va5j$3lp$[EMAIL PROTECTED]... Hi! I have a quite big form to fill out a calendar. The form has six fields for every day in a month to make it possible to set up tree apointments (the target of the meeting and Locataion), this makes a total of about ~180 fields so I created them with a for-loop. Now I got this 180 fields named tar1-1, loc1-1, tar2-1, loc2-1 a.s.o. where the first tree letters tells what information it is, the 4th witch meeting it is (1-3) and the digits after the minus-sign tells the day of the month (1-31) The problem is to get the value out of the variable so i can store it in my mySQL database. it no problem to create a variable that holds the name of the variable that contains the data, but then??? The value of the variable $q is 'tar1-1' and I want to access the variable $tar1-1. I can't find any way to solve this, can you? Someone most have created a calendar like this before... Please respond to [EMAIL PROTECTED] /Per Kallin -- 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] Change POST for GET
sessions do not allow pages to be cached, when sessions are being used th no-cache header is set. GET and POST are very differnt in some areas and very alike in others. obviously the two biggest changes is that all the variables and their values are in the url bar. I beleive most browsers have a 1024 limit for data in the url bar, I could be wrong. the other thing is you'll find spaces suck in url bars. http://www.mediawaveonline.com/index.php?name=Chris Lee will echo Chris thats all. the space ends all. you'll have to convert all spaces to %20 or + http://www.mediawaveonline.com/index.php?name=Chris%20Lee http://www.mediawaveonline.com/index.php?name=Chris+Lee -- Chris Lee [EMAIL PROTECTED] ""Jorge Alvarez"" <[EMAIL PROTECTED]> wrote in message 98u7rj$4nf$[EMAIL PROTECTED]">news:98u7rj$4nf$[EMAIL PROTECTED]... Hi there, I was using POST method on all my forms but I had to change them to GET because of "expired page" errors (I noticed this as soon as I began using PHP4 sessions). It seems that GET works well so far, but I wonder if there's something else I should be aware of. Are both methods equivalent? TIA, Jorge Alvarez -- 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] FileUpload problematic
everything is working as it should. php handels its own garbage collection, when the script is over the file is deleted. you will have to copy or move the file somewhere. or just do something with it and allow php todo its ob and delete it when your done the script. ecec("cp $file /somewhere/$file_name"); -- Chris Lee [EMAIL PROTECTED] ""Thalis A. Kalfigopoulos"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Helloppl, a problem with a file_upload form :-( Here is what I've done so far: File test.php which has the form is this: Here is the included php file (handle_upload.php): You have succesfully sent the following file:\n"; print "path: $up_file\n"; print "filename: $up_file_name\n"; print "filesize: $up_file_size\n"; print "filetype: $up_file_type\n"; } ?> When one submits a file (file exists and is within given MAX_FILE_SIZE boundaries), the handle_upload.php condition is true, so I get the following output in my browser: You have succesfully sent the following file: path: /tmp/phpvtMKjj filename: test2.jpg filesize: 27365 filetype: image/jpeg Then I go and check under /tmp and I do not find anything :-( I have in my php.ini: ; File Uploads ; file_uploads= On upload_tmp_dir = /tmp upload_max_filesize = 2M I am using Apache 1.3.14 with DSO and php is a .so and Php is version 4.0.4 It is not a permissions problem cause I checked the Apache logs, and all dirs that need to be accessed are actually writable by the httpd user. I have read through "Handling file uploads" (http://www.php.net/manual/it/features.file-upload.php) and I don't see what is wrong :-( thanks ins advance, thalis -- 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] Change POST for GET
You can use urlencode() to preserve the spaces. You don't have to any manual conversions from space to + or something else. -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 9:35 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Change POST for GET sessions do not allow pages to be cached, when sessions are being used th no-cache header is set. GET and POST are very differnt in some areas and very alike in others. obviously the two biggest changes is that all the variables and their values are in the url bar. I beleive most browsers have a 1024 limit for data in the url bar, I could be wrong. the other thing is you'll find spaces suck in url bars. http://www.mediawaveonline.com/index.php?name=Chris Lee will echo Chris thats all. the space ends all. you'll have to convert all spaces to %20 or + http://www.mediawaveonline.com/index.php?name=Chris%20Lee http://www.mediawaveonline.com/index.php?name=Chris+Lee -- Chris Lee [EMAIL PROTECTED] ""Jorge Alvarez"" <[EMAIL PROTECTED]> wrote in message 98u7rj$4nf$[EMAIL PROTECTED]">news:98u7rj$4nf$[EMAIL PROTECTED]... Hi there, I was using POST method on all my forms but I had to change them to GET because of "expired page" errors (I noticed this as soon as I began using PHP4 sessions). It seems that GET works well so far, but I wonder if there's something else I should be aware of. Are both methods equivalent? TIA, Jorge Alvarez -- 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] With all this talk about editors ...
what if you have three headers depending on what colors a user likes. this favorite color is stored in a session variable $fav_color = 'blue_header'; there are obviously easier ways todo this, but its a simple example. -- Chris Lee [EMAIL PROTECTED] ""Boget, Chris"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > http://www.php.net/manual/en/ref.funchand.php > This page must be your friends. I took a look at this page (and all the functions referenced therein). While there must be a use for these functions otherwise they wouldn't have been included in PHP, I'm at a total loss as to why anyone would ever use them. Why wouldn't you just call the function (or do whatever) yourself? Could anyone offer some insight? Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] removing element from array
shame of me for asking that a stupid question, but i don't know how to remove an element off an associative array. can anybody please tell me, i didn't find anything about that in faqs or manuals. thank you -- [EMAIL PROTECTED] +49 9721 188848 +49 171 370 97 15 -- 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] removing element from array
unset() $val) echo "$val"; unset($test[2]); foreach($test as $pos => $val) echo "$val"; ?> -- Chris Lee [EMAIL PROTECTED] ""Alexander Gräf"" <[EMAIL PROTECTED]> wrote in message 995d13$cfl$[EMAIL PROTECTED]">news:995d13$cfl$[EMAIL PROTECTED]... shame of me for asking that a stupid question, but i don't know how to remove an element off an associative array. can anybody please tell me, i didn't find anything about that in faqs or manuals. thank you -- [EMAIL PROTECTED] +49 9721 188848 +49 171 370 97 15 -- 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] MS SQL databse connecting
55 projects found for query 'odbc' Most of these are simply projects that have the word ODBC in their description someplace. There seem to be only a handful of libraries, and some (openlink/easysoft) are commercial offerings. I still have not come across any ODBC driver that I can get a binary or source for, which is free, that I can compile under Linux to talk ODBC to databases. What am I missing? I don't think I'm missing anything. I don't think any are out there - freetds was going to be working on something, I thought, but apparently that got delayed/shelved. Yoshi Melrose wrote: > have you tried out http://freshmeat.net ? do a search for odbc, you'll find > a few. :) > > - Original Message - > From: "Michael Kimsal" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, March 19, 2001 9:01 AM > Subject: Re: [PHP] MS SQL databse connecting > > > Am I the only one who can not find any free ODBC drivers for Linux? > > I see countless references to ODBC driver managers, but no ODBC drivers > > themselves - not free ones anyway. > > -- 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] Source Protection
I Agree with that, Take the same atitude as mysql. AFAIK, zend encoder is not only for hidding code, but (they say) it optimizes php processing, if that is true, it is a good and enough reason to release it for free for users that do open source projects. you can still publish the original source code, and also, if you like, compile php for production environments where the load could be high. if the optimization thing is bogus, then i say stay whith you nice compiler, congratulations, but you guys have a principle of a compiler within the php code distribution, so it's not difficult to see the php source, take the zend engine main things and make a compiler because all the parsing is done there and execution (zend_compile.c and zend_execute.c). i'm not a real good c programmer, soh making this alon would take a while, but one of my goals was make a free php compiler (IF zend wouldn't release it for non comercial use). any help would be apreciated of course. my best wishes. On 19-Mar-2001 Chris Lee wrote: > In defence of zend technologies and open source. Is your php code being used > for profit? then purchase the encoder. Is your code being used for > non-profit? then release it as open source for the community to use. > > > -- > > Chris Lee > [EMAIL PROTECTED] > > > > > ""Chris Anderson"" <[EMAIL PROTECTED]> wrote in message > 001901c0b026$6dd9a5c0$bf1412d1@s3e8p3">news:001901c0b026$6dd9a5c0$bf1412d1@s3e8p3... > After realizing that The Zend Encoder is 2000$ I've decided that wont work > for a college student(me). Is there any other way to protect source in my > components? > > > > -- > 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] Rui Barreiros Software Developer WEBSOLUT - Soluções Internet Emailto: [EMAIL PROTECTED] Personal Info: http://websolut.net/people/rui.html As informações contidas neste email são confidenciais e destinam-se apenas à(s) pessoa(s) a quem foi enviado: http://websolut.net/confidencialidade-responsabilidade.html -- 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] FileUpload problematic
Would copy( $file, "somewhare/$file" ) be more platform independent? -- [EMAIL PROTECTED] (ben@work untill end March) [EMAIL PROTECTED] (ben@home) > -Original Message- > From: Chris Lee [SMTP:[EMAIL PROTECTED]] > Sent: Monday, March 19, 2001 2:38 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] FileUpload problematic > > everything is working as it should. php handels its own garbage > collection, when the script is over the file is deleted. you will have to > copy or move the file somewhere. or just do something with it and allow > php todo its ob and delete it when your done the script. > > ecec("cp $file /somewhere/$file_name"); > > > -- > > Chris Lee > [EMAIL PROTECTED] > > > > ""Thalis A. Kalfigopoulos"" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Helloppl, > a problem with a file_upload form :-( Here is what I've done so far: > > File test.php which has the form is this: > > > > METHOD="POST"> > VALUE="64000"> > > > > > > > Here is the included php file (handle_upload.php): > if(isset($up_file)){ > print "You have succesfully sent the following file:\n"; > print "path: $up_file\n"; > print "filename: $up_file_name\n"; > print "filesize: $up_file_size\n"; > print "filetype: $up_file_type\n"; > } > ?> > > When one submits a file (file exists and is within given MAX_FILE_SIZE > boundaries), the handle_upload.php condition is true, so I get the > following output in my browser: > > You have succesfully sent the following file: > path: /tmp/phpvtMKjj > filename: test2.jpg > filesize: 27365 > filetype: image/jpeg > > > Then I go and check under /tmp and I do not find anything :-( > > I have in my php.ini: > > ; File Uploads ; > > file_uploads= On > upload_tmp_dir = /tmp > upload_max_filesize = 2M > > I am using Apache 1.3.14 with DSO and php is a .so and Php is version > 4.0.4 > > It is not a permissions problem cause I checked the Apache logs, and all > dirs that need to be accessed are actually writable by the httpd user. I > have read through "Handling file uploads" > (http://www.php.net/manual/it/features.file-upload.php) and I don't see > what is wrong :-( > > > thanks ins advance, > thalis > > > -- > 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] removing element from array
alex if you're looking for a pop function, try array_pop.if you just want to remove an item and then compact the array, i believe you'll have to hack together something yourselfcheck the mailing list archives.. http://marc.theaimsgroup.com/?l=php-general&r=1&w=2 jack -Original Message- From: Alexander Gräf [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 11:49 AM To: [EMAIL PROTECTED] Subject: [PHP] removing element from array shame of me for asking that a stupid question, but i don't know how to remove an element off an associative array. can anybody please tell me, i didn't find anything about that in faqs or manuals. thank you -- [EMAIL PROTECTED] +49 9721 188848 +49 171 370 97 15 -- 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] mime mail class (Sascha & Tobias) - msWORD doc attachment not working
Hi there I am trying to get the scriplet code from http://www.phpwizard.net/resources/phpMisc/scripts/pretty/mail.php3 to work for a website I'm building. I am trying to allow a user to select a file from their hard drive, and then have that file sent as an email attachment. Most of the time that file will be a Microsoft Word document. I have the code for the file selection all done, and I integrated the codelet (THANK YOU) into my code, and when I attach a .jpg file, it works fine, but if I choose a word doc, it attaches what it thinks is an image. I changed the line $mail->add_attachment("$attachment", $copy_filename, "application/msword"); to reflect the mime type for application/msword, but it still doesn't work. What suggestions might you have? url to see it in action http://www.emergejobs.com/jen/jen_file_upload.phtml the submit script that does the file upload then the email send is below. thank you SO MUCH -jen . - jen_file_upload_submit.phtml: Jen's file upload module file upload you uploaded $userfile, this script just renamed it (and made it all caps) to $clean_filename and copied it to $copy_filename"; } else { echo "ERROR there was an error uploading the file: '$userfile' ($userfile_name)."; } /* * Class mime_mail * Original implementation by Sascha Schumann <[EMAIL PROTECTED]> * Modified by Tobias Ratschiller <[EMAIL PROTECTED]>: * - General code clean-up * - separate body- and from-property * - killed some mostly un-necessary stuff */ class mime_mail { var $parts; var $to; var $from; var $headers; var $subject; var $body; /* * void mime_mail() * class constructor */ function mime_mail() { $this->parts = array(); $this->to = ""; $this->from = ""; $this->subject = ""; $this->body = ""; $this->headers = ""; } /* * void add_attachment(string message, [string name], [string ctype]) * Add an attachment to the mail object */ function add_attachment($message, $name = "", $ctype = "application/octet-stream") { $this->parts[] = array ( "ctype" => $ctype, "message" => $message, "encode" => $encode, "name" => $name ); } /* * void build_message(array part= * Build message parts of an multipart mail */ function build_message($part) { $message = $part[ "message"]; $message = chunk_split(base64_encode($message)); $encoding = "base64"; return "Content-Type: ".$part[ "ctype"]. ($part[ "name"]? "; name = \"".$part[ "name"]. "\"" : ""). "\nContent-Transfer-Encoding: $encoding\n\n$message\n"; } /* * void build_multipart() * Build a multipart mail */ function build_multipart() { $boundary = "b".md5(uniqid(time())); $multipart = "Content-Type: multipart/mixed; boundary = $boundary\n\nThis is a MIME encoded message.\n\n--$boundary"; for($i = sizeof($this->parts)-1; $i >= 0; $i--) { $multipart .= "\n".$this->build_message($this->parts[$i]). "--$boundary"; } return $multipart.= "--\n"; } /* * void send() * Send the mail (last class-function to be called)
Re: [PHP] Problems with multiple query
Hi, please note: You can *not* fetch results that require earlier results using the pg_* functions. Explaination: when you submit a query the php script doesn't know about the content of all rows returned, instead the interface API makes use of pointers to fetch only the requested rows from the result. That said, if you make a second call to pg_exec() consider saving all the results somewhere else if you need the previous set of results. Regards, Nuno Silva Luca Lazzeroni wrote: > Thanks; in fact I've tryed the second solution and it works for me; but I > can't understand why the script stop working during the upgrade of system. > The most strange thing is that, after a deeper investigation on the code, > I've found the PHP engine does something like closing the connection after > the second pg_exec command. > In fact, by using persistent connections I've partially corrected the > problem and the codes doesn't complain about using an invalid (but not null) > connection descriptor; but it stills be unable to get results from > successive queries, also if result index are valid ! This sounds very > strange for me. > > Thank you for your help ! > > Luca Lazzeroni > > "Nuno Silva" <[EMAIL PROTECTED]> ha scritto nel messaggio > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >> Hello, >> >> if the second query loops inside a _for_ statement and needs values from >> the first query you have two options: >> >> 1. save all the results from query one to some array and then loop >> inside the array within the _for_ statement executing new sql; >> 2. open two separate connections to the database and work with the two. >> like this: >> $conn1 = pg_connect(...); >> $conn2 = pg_connect(...); >> ... >> qry1 = pg_exec($conn1, $sql1); >> ... >> for ($i=.) { >> ... >> $qry2 = pg_exec($conn2, $sql2); >> ... >> } >> >> Hope this helps, >> Nuno Silva >> >> >> Luca Lazzeroni wrote: >> >> >>> Hi, >>> I've recently migrated a system with PHP 4.0.3pl1 and PostgreSQL 7.0.2 - >>> RedHat Linux 5.1 (yes 5) to a new one with PHP 4.0.4pl1 - PostgreSQL >> > 7.0.2 - > >>> RedHat Linux 7.0. >>> >>> All my database applications work fine except one which does strange >> > things: > >>> this is a piece of code: >>> >>> 8<--- CUT >>> >>>$conn = pg_connect("dbname= user=y password=xx"); >>> >>>$sql = "select * from table_a where condition_a"; >>>$qry1 = pg_exec ($conn,$sql); >>> >>>$obj1 = pg_fetchobject($qry1,0); >>> >>> // Until here everything works fine >>> >>>$sql2 = "select * from table_b where condition_b=".$obj1->value_a; >>>$qry2 = pg_exec ($conn,$sql2); >>> >>> 8<--- CUT >>> >>> The second query is nested in a for-loop running for every object in the >>> first query; for performance reason I need to maintain the two queries >>> independent. >>> >>> After executing (correctly) the first one, the system starts doing >> > strange > >>> things with the second one: >>> >>> Warning: Unable to jump to row 0 on PostgreSQL result index 23 in >> > cerca.php3 > >>> on line 467 >>> >>> and it fails to read data. >>> The strange thing is that the system does the same things for EVERY >> > database > >>> where I must use two consecutive queries ! >>> >>> Is there anyone who can help me ? >>> >>> Thanks in advance >>> >>> Luca Lazzeroni >> >> >> -- >> 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] MS SQL databse connecting
I know i had one. I used one for a project I had in php I'll look for it and see if I can get it to you. Hmmm. - Original Message - From: "Michael Kimsal" <[EMAIL PROTECTED]> To: "Yoshi Melrose" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 19, 2001 10:54 AM Subject: Re: [PHP] MS SQL databse connecting > 55 projects found for query 'odbc' > > Most of these are simply projects that have the word ODBC > in their description someplace. There seem to be only a handful > of libraries, and some (openlink/easysoft) are commercial > offerings. > > I still have not come across any ODBC driver that I can get > a binary or source for, which is free, that I can compile under > Linux to talk ODBC to databases. > > What am I missing? I don't think I'm missing anything. I don't think > any are out there - freetds was going to be working on something, > I thought, but apparently that got delayed/shelved. > > > > > > Yoshi Melrose wrote: > > > have you tried out http://freshmeat.net ? do a search for odbc, you'll find > > a few. :) > > > > - Original Message - > > From: "Michael Kimsal" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Monday, March 19, 2001 9:01 AM > > Subject: Re: [PHP] MS SQL databse connecting > > > > > Am I the only one who can not find any free ODBC drivers for Linux? > > > I see countless references to ODBC driver managers, but no ODBC drivers > > > themselves - not free ones anyway. > > > > > -- 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] HELP insert still dosn't work
I want to insert the Values into my Database like this $handle = ora_logon("iusr@test","kiwi1"); $cursor1 = ora_open($handle); $query = "insert into internet_tmp select rv_ret($FF),$FF,$sesid,(sysdate+0.0021) from dual"; ora_parse($cursor1,$query) or die; ora_exec($cursor1); ora_close($cursor1); tring the insert query on sql-plus works fine what do I do wrong?? oh yea error msg is like this Warning: Ora_Parse failed (ORA-00923: FROM keyword not found where expected -- while processing OCI function OPARSE) in test2.php on line 40 line40 is parse line plaese help is very urgent rudi
[PHP] SETUP PHP , MYSQL, APACHE
Hello all, hope that everyone had a nice weekend. I'm new to this form. I am about to install mysql, apache, and php on my linux box (redhat 7) I went to the php site, but I'm a little bit lost. I found this link on there but I dont know if thats the way I have to set it up . I'm setting all these program for creating a Admin ticket . Heres the site just in case you guys like to take a look at. I found the site in the dec issue of linux Joarnal . http://wwredshift.com/~yramin/atp/irm Not my question is. Would this be the right way of setting up php , mysql , and php . Can anyone check this site out for me. http://www.linuxguruz.org/z.php?id=31 also can you please tell me on the section were you ./configure the php . Would I be using the apxs setting or the red hat . Im' sorry if its a stupid question but I'm new to all this php thing. Thank you Luis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MS SQL databse connecting
Yoshi, Regardless if you use a commercial or free driver, the only thing you need to compile with is iODBC, as a Driver Manager. You can then drop in any ODBC-compliant driver fairly seamlessly. A Howto is available at www.iodbc.org, but it's mostly a matter of getting the iODBC SDK and compiling --with-iodbc. Also, while our drivers are not Open Source, they are free for low-use environments (2 concurrent database connections). Please let me know if I may assist in any way. Best regards, Andrew --- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com On 3/19/01 11:54 AM, "Michael Kimsal" <[EMAIL PROTECTED]> wrote: > 55 projects found for query 'odbc' > > Most of these are simply projects that have the word ODBC > in their description someplace. There seem to be only a handful > of libraries, and some (openlink/easysoft) are commercial > offerings. > > I still have not come across any ODBC driver that I can get > a binary or source for, which is free, that I can compile under > Linux to talk ODBC to databases. > > What am I missing? I don't think I'm missing anything. I don't think > any are out there - freetds was going to be working on something, > I thought, but apparently that got delayed/shelved. > > > > > > Yoshi Melrose wrote: > >> have you tried out http://freshmeat.net ? do a search for odbc, you'll find >> a few. :) >> >> - Original Message - >> From: "Michael Kimsal" <[EMAIL PROTECTED]> >> To: <[EMAIL PROTECTED]> >> Sent: Monday, March 19, 2001 9:01 AM >> Subject: Re: [PHP] MS SQL databse connecting >> >>> Am I the only one who can not find any free ODBC drivers for Linux? >>> I see countless references to ODBC driver managers, but no ODBC drivers >>> themselves - not free ones anyway. >>> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MS SQL databse connecting
Whups, sorry - looks like that should have been addressed to Michael. Best regards, Andrew On 3/19/01 12:13 PM, "Andrew Hill" <[EMAIL PROTECTED]> wrote: > Yoshi, > > Regardless if you use a commercial or free driver, the only thing you need to > compile with is iODBC, as a Driver Manager. You can then drop in any > ODBC-compliant driver fairly seamlessly. A Howto is available at > www.iodbc.org, but it's mostly a matter of getting the iODBC SDK and compiling > --with-iodbc. > > Also, while our drivers are not Open Source, they are free for low-use > environments (2 concurrent database connections). > > Please let me know if I may assist in any way. > > Best regards, > Andrew > --- > Andrew Hill - OpenLink Software > Director Technology Evangelism > eBusiness Infrastructure Technology > http://www.openlinksw.com > > > On 3/19/01 11:54 AM, "Michael Kimsal" <[EMAIL PROTECTED]> wrote: > >> 55 projects found for query 'odbc' >> >> Most of these are simply projects that have the word ODBC >> in their description someplace. There seem to be only a handful >> of libraries, and some (openlink/easysoft) are commercial >> offerings. >> >> I still have not come across any ODBC driver that I can get >> a binary or source for, which is free, that I can compile under >> Linux to talk ODBC to databases. >> >> What am I missing? I don't think I'm missing anything. I don't think >> any are out there - freetds was going to be working on something, >> I thought, but apparently that got delayed/shelved. >> >> >> >> >> >> Yoshi Melrose wrote: >> >>> have you tried out http://freshmeat.net ? do a search for odbc, you'll find >>> a few. :) >>> >>> - Original Message - >>> From: "Michael Kimsal" <[EMAIL PROTECTED]> >>> To: <[EMAIL PROTECTED]> >>> Sent: Monday, March 19, 2001 9:01 AM >>> Subject: Re: [PHP] MS SQL databse connecting >>> Am I the only one who can not find any free ODBC drivers for Linux? I see countless references to ODBC driver managers, but no ODBC drivers themselves - not free ones anyway. >> -- 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] "deleted" cookie
Hi, My site has been working with cookies just fine until i discovered that some browsers (i think it is some browser under MacOS, I'm investigating) instead of deleting a cookie, set it to value "deleted", so in my code this variable has a value and believes there is a user called "deleted" trying to reauth. a lot users can't login to my site ater their session times out due to this cause My question is, I am dealing with some new bug of explorer or there is a standard I am missing? Should I implement in my code this feature doing with "deleted" cookies? Or maybe it's a php bug? I run php-4.0.4pl1 Thanks in advance Nikolai -- 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] managing scripts on different domains
hello list, i have the problem that netscape 4.6 and more can't allow access to scripts/documents at another domain (javascript error). anyway i have a checking_status-script on domain first.xxx.xx which calls a script on domain second.yyy.yy, ie and netscape 4.0 work quit well with this... but not 4.6 and more. now i was thinking to manage it with a (global?)php-variable (same php-modul running on the domains) to communicate to the script in the second domain... can somenone help or have some tips? greeting tom - - -foerderverein kunst und internet e.V. -lothringerstr. 23 -D-52062 aachen thomas schneider tel:+49 241.33686(buero) mobil: +49 179.4548 234 fax:+49 241.33636 'kulturraum raststaette' 'kulturserver heimat.de' 'kulturdatennetzwerk culturebase.org' -- -- 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] site root variable (for Generic Unix and Windows)
Hi, Matt Williams wrote: > you could make your links absolute > ie.. > > /cat.html Properly speaking, even this link is relative :-) (it is relative to the document root of the web server). I like to call such links "impure relative" links :-). I call links of the type "../cat.html" "pure relative" links ;-) This type of a link will only work if you're always going to have your pages served up by a web server (which may be true in your case). I had wanted to do something similar as far as specifying the path was concerned. However, in my case, I had to mirror the site on my hard disk and then work on that too. Therefore, such "impure" relative links would not have worked for me. I needed to have "pure" relative links so that the whole structure of the site would hold together even when viewed off the hard disk. A look at the mail (and the answer to it) titled "Finding the depth" in this list might prove helpful. -- Regards, Harshdeep Singh Jawanda. -- 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]