[PHP] Re: php created pages's create time
Dear Sir, we use php4.1.1+apache put html pages to IE from mysql DB, We find the created pages's create time is not availability, this let me a lot of discommodity, our webpage cann't index in yahoo etc. search engine. please help me, let me know how to avoid it. Mr.lin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php created pages's create time
Dear Sir, we use php4.1.1+apache put html pages to IE from mysql DB, We find the created pages's create time is not availability, this let me a lot of discommodity, our webpage cann't index in yahoo etc. search engine. please help me, let me know how to avoid it. Mr.lin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP: XML/XSL
Hi everybody, I'm using Sablotron to transform XML with XSL and this is the PHP file: ?PHP $strXhtml = ?xml version=\1.0\?\n; $strXhtml = $strXhtml . htmlbody\n; $strXhtml = $strXhtml . pbfont color=\#800080 \Balance:/font/b/p\n; $strXhtml = $strXhtml . p align=\left\input type=\text\ name=\balanceText\ size=\20\ value=\200$\//p\n; $strXhtml = $strXhtml ./body/html; //echo(trim($strXhtml)); include(XSLTransformer.php); $xml=$strXhtml; $xsl=testing.xsl; $transform = new XSLTransformer(); if($transform-setXsl($xsl)) { if($transform-setXmlString($xml)) { $transform-transform(); if ($transform-getError() == 0) { echo $transform-getOutput(); } else { echo pError transforming ,$xml,./p\n; } } else { echo p,$xml,: ,$transform-getError(),/p\n; } $transform-destroy(); } ? I'm getting the following warning although I'm sure that if I applied XSL to the XML file without php, it's working. Plz can u help me and tell me what could be the problem? Warning: xslt_process(): supplied argument is not a valid XSLT Processor resource in /home/alia/public_html/XHTML/XSLTransformer.php on line 69 Thx a lot -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Tricky question - referrer from ousite, or from intern?
IFF they just left one of your other sites, then you should be able to pass a variable in the other site's header such as: php.net/function-name?variable=from_somewhere_I_own if the variable isn't set, then they came from a site you don't own. or you could send them to a unique function-name where you can then record a hit on that function-name. ?php function unique_name() { $hit=came from my other site; pseudo code -- store $hit; function run_me(you really want to run) } ? - Original Message - From: Andy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 26, 2002 10:58 PM Subject: [PHP] Tricky question - referrer from ousite, or from intern? Hi there, I have a tricky problem which I honestly think is not possible to solve. However maybe I am wrong. As you all know it is possible on php.net to pass a function name just behind the adress (e.G. php.net/function-name) this will redirct to the propper page. I did the same thing with member sites (e.G server.com/member-name) Now I am starting a referrer programm. Every member who follows a link like from anywhere on the net and registeres will be tracked and the referrer gets a point. Now I did forget that I do have several of this links on my site itself :-) Which means that they have been aquired on my site by accident :-) My question is how can I make sure that they do come from outside and are not surfing my site already. I do set a coockie as soon as someone enteres this adress, but it would be fantastic if I could do a if statement on something to make sure he does not come from my own site. I would like to keep all the links like that, just to find a way to track the origin of the user. Thank you so much for any idea on this tricky task, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP - Chat?
HI there, I am wondering if a Chat coded in PHP would be sufficiant for a medium sized site. Maybe someone has a working example online. It would be no problem to get a ircdeamon working, just the client is in question. Thank you for your suggestions, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php created pages's create time
So use the Header() function to send an appropriate Last-Modified timestamp. PHP can't possibly do that automatically as it does not know the last modication time of the actual dynamic data that you send. -Rasmus On Tue, 27 Aug 2002, lin wrote: Dear Sir, we use php4.1.1+apache put html pages to IE from mysql DB, We find the created pages's create time is not availability, this let me a lot of discommodity, our webpage cann't index in yahoo etc. search engine. please help me, let me know how to avoid it. Mr.lin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Tricky question - referrer from ousite, or from intern?
Thanx for your answer. This is exactly the problem. I do not want to pass something like this. The user gets a URL like: server.com/user-name He passses it around and someone follows this link to my site. In case this person registeres I am tracking this. But the same links are inside my own site. The URL should stay the same since it is a nice one with the username and without any ?=... stuff. I could reduce my question to the following: How can I find out (in PHP) that someone is comming from a different site. Some variable like $_HTTP[referrer] might track this. I hope there is something like this :-) So I could do something like this: if ($_HTTP[referrer] != myserver.com){ //set a cookie } You get the idea? Andy Hugh Danaher [EMAIL PROTECTED] schrieb im Newsbeitrag 000c01c24d97$4c9f3d60$017f@localhost">news:000c01c24d97$4c9f3d60$017f@localhost... IFF they just left one of your other sites, then you should be able to pass a variable in the other site's header such as: php.net/function-name?variable=from_somewhere_I_own if the variable isn't set, then they came from a site you don't own. or you could send them to a unique function-name where you can then record a hit on that function-name. ?php function unique_name() { $hit=came from my other site; pseudo code -- store $hit; function run_me(you really want to run) } ? - Original Message - From: Andy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 26, 2002 10:58 PM Subject: [PHP] Tricky question - referrer from ousite, or from intern? Hi there, I have a tricky problem which I honestly think is not possible to solve. However maybe I am wrong. As you all know it is possible on php.net to pass a function name just behind the adress (e.G. php.net/function-name) this will redirct to the propper page. I did the same thing with member sites (e.G server.com/member-name) Now I am starting a referrer programm. Every member who follows a link like from anywhere on the net and registeres will be tracked and the referrer gets a point. Now I did forget that I do have several of this links on my site itself :-) Which means that they have been aquired on my site by accident :-) My question is how can I make sure that they do come from outside and are not surfing my site already. I do set a coockie as soon as someone enteres this adress, but it would be fantastic if I could do a if statement on something to make sure he does not come from my own site. I would like to keep all the links like that, just to find a way to track the origin of the user. Thank you so much for any idea on this tricky task, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] exec problem
i'm basicly trying to execute an executeable with this following script. $command = ../theApp/theapp; exec ( $command , $ValueIn, $ValueOut); echo $ValueOut; I'm getting a value of 0 returned, but from a command line the executable works fine and does what it is suposed to do is there any other way i can do this or ami i doing it work ?? Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Tricky question - referrer from ousite, or from intern?
$_SERVER['HTTP_REFERRER'] (or is it $_ENV['HTTP_REFERRER']?) is your only option. Unfortunately it's not guaranteed to be set by the browser, so your current method of accepting and tracking referrers is flawed, sorry. A page.php?aid=x entry point, combined with sessions or cookies to keep track of the affiliate ID is a proven method of making things work. Justin French on 27/08/02 6:25 PM, Andy ([EMAIL PROTECTED]) wrote: How can I find out (in PHP) that someone is comming from a different site. Some variable like $_HTTP[referrer] might track this. I hope there is something like this :-) So I could do something like this: if ($_HTTP[referrer] != myserver.com){ //set a cookie } You get the idea? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Tricky question - referrer from ousite, or from intern?
All righty! I found the solution: It might be for help to some other folkes. Here is the code which solves the problem: #make sure he is not referred by our one website if (!ereg($HTTP_HOST, $_SERVER[HTTP_REFERER])){ #set referer cookie setcookie('referrer', $user_id, 0); } #redirect Cheers, Andy Andy [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, I have a tricky problem which I honestly think is not possible to solve. However maybe I am wrong. As you all know it is possible on php.net to pass a function name just behind the adress (e.G. php.net/function-name) this will redirct to the propper page. I did the same thing with member sites (e.G server.com/member-name) Now I am starting a referrer programm. Every member who follows a link like from anywhere on the net and registeres will be tracked and the referrer gets a point. Now I did forget that I do have several of this links on my site itself :-) Which means that they have been aquired on my site by accident :-) My question is how can I make sure that they do come from outside and are not surfing my site already. I do set a coockie as soon as someone enteres this adress, but it would be fantastic if I could do a if statement on something to make sure he does not come from my own site. I would like to keep all the links like that, just to find a way to track the origin of the user. Thank you so much for any idea on this tricky task, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Tricky question - referrer from ousite, or from intern?
Hello Justin, I just saw that you have been faster than me :-) However.. you think it might be not sure that this workes for every browser? PUh... thats bad. Do u have examples for that? It workes with IE on PC. Cheers Andy Andy [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... All righty! I found the solution: It might be for help to some other folkes. Here is the code which solves the problem: #make sure he is not referred by our one website if (!ereg($HTTP_HOST, $_SERVER[HTTP_REFERER])){ #set referer cookie setcookie('referrer', $user_id, 0); } #redirect Cheers, Andy Andy [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, I have a tricky problem which I honestly think is not possible to solve. However maybe I am wrong. As you all know it is possible on php.net to pass a function name just behind the adress (e.G. php.net/function-name) this will redirct to the propper page. I did the same thing with member sites (e.G server.com/member-name) Now I am starting a referrer programm. Every member who follows a link like from anywhere on the net and registeres will be tracked and the referrer gets a point. Now I did forget that I do have several of this links on my site itself :-) Which means that they have been aquired on my site by accident :-) My question is how can I make sure that they do come from outside and are not surfing my site already. I do set a coockie as soon as someone enteres this adress, but it would be fantastic if I could do a if statement on something to make sure he does not come from my own site. I would like to keep all the links like that, just to find a way to track the origin of the user. Thank you so much for any idea on this tricky task, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: exec problem
I'm getting a value of 0 returned, but from a command line the executable works fine and does what it is suposed to do is there any other way i can do this or ami i doing it work ?? Well, as far as I know, command-line returnes 0 on success and other on failure. So if your exec ( $command, $ValueIn, $ValueOut) returns 0 in $ValueOut it should be done correctly... Best regards Madsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP - Chat?
Check freshmeat - there are a couple of more than reasonable such projects (unfortunately I don't remember the names, but I checked some out and they seemed ok). Bogdan Andy wrote: HI there, I am wondering if a Chat coded in PHP would be sufficiant for a medium sized site. Maybe someone has a working example online. It would be no problem to get a ircdeamon working, just the client is in question. Thank you for your suggestions, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imagecreatefrompng...fails
Trying to install apache 1.3.26 plus PHP 4.2.2 installed and cannot get the libpng stuff to work with GD in the apache error log I get:- [Tue Aug 27 09:31:10 2002] [notice] child pid 6825 exit signal Segmentation fault (11) [Tue Aug 27 09:31:10 2002] [notice] child pid 6824 exit signal Segmentation fault (11) -- and these are being generated when access imagecreatefrompng -- My configure line for PHP is:- ./configure --enable-debug \ --with-gd=/usr/local/gd-1.8.4 \ --with-mysql=/usr/local/mysql \ --with-png-dir=/usr/lib \ --with-zlib-dir=/usr/lib \ --with-jpeg-dir=/usr/lib \ --with-apxs=/usr/local/apache/bin/apxs \ --with-config-file-path=/usr/local/apache/config When I run http -X I cann not get a trackback...e.g:- linux:/usr/local/apache/bin # pwd /usr/local/apache/bin linux:/usr/local/apache/bin # ./httpd -X Segmentation fault linux:/usr/local/apache/bin # ls . .. ab apachectl apxs checkgid dbmmanage htdigest htpasswd httpd logresolve rotatelogs linux:/usr/local/apache/bin # Any ideas ? Thanks in advance, dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Tricky question - referrer from ousite, or from intern?
Justin is right, there's no guarantee the referrer will be set. What you can do however is have a common pre-registration page you link to from everywhere on the site - and set some variable there to acknowledge they came from the site - and give members the direct address to the registration page. What I wonder is how could a non-referred user be confused with a referred one - doesn't the referred one have some kind of variable in the URL which identifies the referer (i.e. isn't each referer being given a customized URL to pass to his/her referees?!). Bogdan Andy wrote: Hello Justin, I just saw that you have been faster than me :-) However.. you think it might be not sure that this workes for every browser? PUh... thats bad. Do u have examples for that? It workes with IE on PC. Cheers Andy Andy [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... All righty! I found the solution: It might be for help to some other folkes. Here is the code which solves the problem: #make sure he is not referred by our one website if (!ereg($HTTP_HOST, $_SERVER[HTTP_REFERER])){ #set referer cookie setcookie('referrer', $user_id, 0); } #redirect Cheers, Andy Andy [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, I have a tricky problem which I honestly think is not possible to solve. However maybe I am wrong. As you all know it is possible on php.net to pass a function name just behind the adress (e.G. php.net/function-name) this will redirct to the propper page. I did the same thing with member sites (e.G server.com/member-name) Now I am starting a referrer programm. Every member who follows a link like from anywhere on the net and registeres will be tracked and the referrer gets a point. Now I did forget that I do have several of this links on my site itself :-) Which means that they have been aquired on my site by accident :-) My question is how can I make sure that they do come from outside and are not surfing my site already. I do set a coockie as soon as someone enteres this adress, but it would be fantastic if I could do a if statement on something to make sure he does not come from my own site. I would like to keep all the links like that, just to find a way to track the origin of the user. Thank you so much for any idea on this tricky task, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array_push
Hello, why this array_push($x ? $a : $b, 'value'); produce error(Fatal error: Only variables can be passed by reference) ?php $x = 1; #$x = 0; $a = array(); $b = array(); array_push($x ? $a : $b, 'value'); i must rewrote this in if ($x) array_push($a, 'value'); else array_push($b, 'value'); Regards, Michal Dvoracek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Tricky question - referrer from ousite, or fromintern?
on 27/08/02 7:00 PM, Andy ([EMAIL PROTECTED]) wrote: However.. you think it might be not sure that this workes for every browser? PUh... thats bad. Do u have examples for that? It workes with IE on PC. I don't actually know of any that don't set the referrer, and probably 99% of your vistors WILL set it, but there WILL be some that don't. Even if you tested every IE and Netscape version known to exist on both Mac and PC, there's still hundreds of other lesser known browsers, text-to-speach browsers for the blind, PDAs and hand-helds, web-tv, internet-fridges, etc etc. There is no way you can possibly test all of these, and since they aren't REQUIRED to set the referrer, it's foolish to rely on it. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] exec problem
If you are trying to receive the output of the command line you can use the backtick notation $list = `ls`; Hope that helps Andrew Mark [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... i'm basicly trying to execute an executeable with this following script. $command = ../theApp/theapp; exec ( $command , $ValueIn, $ValueOut); echo $ValueOut; I'm getting a value of 0 returned, but from a command line the executable works fine and does what it is suposed to do is there any other way i can do this or ami i doing it work ?? Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Tricky question - referrer from ousite, or from intern?
However.. you think it might be not sure that this workes for every browser? PUh... thats bad. Do u have examples for that? It workes with IE on PC. Well, the HTTP 1.1 spec says it shouldn't be set when it's typed into the address line. That happens often enough that it can't be relied on. Try it: HTML BODY ?php echo Referrer: {$_SERVER['HTTP_REFERER']}br; //note misspeled HTTP_REFERER ? p a href=?php echo $_SERVER['PHP_SELF'] ?Link to this page/a /p /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sessions?
Mark Faine [EMAIL PROTECTED] a écrit dans le message de news: 8ioeq3$kg2$[EMAIL PROTECTED] Linux Mandrake 7.1 Apache/PHP4 I'm trying to implement this mysql session scheme as describe here: http://phpbuilder.com/columns/ying2602.php3 A.) my sessions are not being saved into the database, they are still being saved in the /tmp directory They are supposed to stay into /tmp B.) my session (the ones that are saved in the /tmp directory) will not persist past the first page? session persist on every page if you ask them to, you need to session_start(); in every page. The support forum on phpbuilder.com is useless. Thats why we are here. Thanks Mark Happy to help the nasa. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP xml: urgent!
Hello, I have an HTML file. I want to transform it to XML then filter it and transform it to another XML file. I used Sablotron with PHP to apply XSL to XML to filter the XML file. But I'm facing problems when I want to transform HTML to XML. I used TIDY but it seems it transforms to XHTML in a format not appropriate to Sablotron parser. I'm getting this msg: Warning: Sablotron error on line 26: cannot open file '/home/alia/public_html/XHTML/testing.xhtml' in /home/alia/public_html/XHTML/XSLTransformer.php on line 91 Can u plz help me. Thx a lot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and xml
Hello What's the best to convert HTML to XML that I can use in PHP Thx a lot -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: User Authentication Script
Thank you for the reply Farianto. Exactly where in the httpd.conf file should I insert that line? If you could copy and paste the line *above* and *below* in the httpd.conf file that already exists so I know the location I would appreciate it. Thanks again. TR for example: # blahblah1 Load Module PHP4_Module c:/Apache/php/sapi/php4apache.dll // insert this line # blahblah2 .. - Original Message - From: Farianto Kurniawan [EMAIL PROTECTED] To: Anthony Ritter [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, August 26, 2002 10:36 PM Subject: Re: [PHP] PHP: User Authentication Script ...hello .. Mr.Anthony Ritter .. Actually I have faced the same problem with you but right now I can fix it . What you must do is : 1. Turn off your Apache Web Server 2. Edit your httpd.conf file from folder conf under Apache folder. 3. Please add this sentence -- LoadModule php4_module c:/Apache/php/sapi/php4apache.dll -- in it. (the important thing that php4apache.dll is in that directory , if itsn't change it to the right position. 4. Save it 5. Turn Your Apache Web Server on. I hope it can work know... Regards, Farianto.K PT.Yosibara Inti Corpora Phone: 62-21-5267645/46 Indonesia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] use VB DLL (COM object) with php
I try to use a simple COM write in VB ... == Option Explicit Dim sc As ScriptingContext Sub OnStartPage(AspSC As ScriptingContext) Set sc = AspSC End Sub Public Function ecrire() sc.Response.Write Voici mon super texte End Function === ...but it doesn't work! Is run in ASP put when i try in php the parameter is not good. I supose is the ScriptingContext variable but I don't know is value?! Somebody can help me Please? Franky [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Date conversion problems
mktime generally only works thru 2037. Why not create an array of the months, and index in: $months = array('Jan','Feb',); $enddate = explode(-, $datereuslt[0]); $finaldate = $months[$enddate-1] . -$enddate[1]; That's what I thought I might have to do. It's an alternative, but a clunky one. Thanks Matt. mktime() will not work beyond mid-August of 2038 on 32-bit machines. And there's the confirmation from Richard. It actually goes back to 1969. Thanks also to David and anyone else I missed. I'm going to try the MySQL date format that Richard and Matt suggested. But, if all else fails, I'll go with the array that they suggested, as well. Thanks again, guys. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getting directory info
Can I use php to get a list of all the jpgs in a folder? I want to make a photo album type thing for a website, and I want it to be real simple (i.e. you put photos (jpgs) in a folder called photos and upload them. Then the album is built dynamically using php. Thoughts? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with using include files
Hello The problem I have when using include files is the path to different parts of the web site. To Explain: I have a header.inc file in an inc directory: root |___inc | |___header.inc | |___images | |___topbar_01.gif | |___faq |___faq.php In the header.inc file there is: img name=topbar_01 src=images/topbar_01.gif width=783 height=56 now when I include this into the faq.php file I do not display the topbar_01.gif as the path to topbar_01.gif is now /root/faq/images/topbar_01.gif I would like to be able to use a header.inc file so that I can update the entire site simply. Is there a way I can specify the correct path when using an include file in this way? I have tried to use some of the Environment Variables. I find that I am having this problem when I am using a structured site. I would rather not place all files into the same directory Thankyou for your reply, Ivan
Re: [PHP] problem with using include files
img name=topbar_01 src=/images/topbar_01.gif width=783 height=56 This should help you. This way the browser will look for images directory in the root of your webserver. Regards, Stas - Original Message - From: Ivan Carey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 27, 2002 1:50 PM Subject: [PHP] problem with using include files Hello The problem I have when using include files is the path to different parts of the web site. To Explain: I have a header.inc file in an inc directory: root |___inc | |___header.inc | |___images | |___topbar_01.gif | |___faq |___faq.php In the header.inc file there is: img name=topbar_01 src=images/topbar_01.gif width=783 height=56 now when I include this into the faq.php file I do not display the topbar_01.gif as the path to topbar_01.gif is now /root/faq/images/topbar_01.gif I would like to be able to use a header.inc file so that I can update the entire site simply. Is there a way I can specify the correct path when using an include file in this way? I have tried to use some of the Environment Variables. I find that I am having this problem when I am using a structured site. I would rather not place all files into the same directory Thankyou for your reply, Ivan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting directory info
On Tuesday 27 August 2002 20:51, Alexander Ross wrote: Can I use php to get a list of all the jpgs in a folder? manual - Directory functions I want to make a photo album type thing for a website, and I want it to be real simple (i.e. you put photos (jpgs) in a folder called photos and upload them. Then the album is built dynamically using php. Thoughts? manual - Handling file uploads -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Maintence window broken */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] move_uploaded_file problem
I'm trying to enable my site users to upload pictures (using the move_uploaded_file function) This works fine on my home development machine but 'not' on the deployment server. This is a shared server with 'safe mode' enabled. (The php manual seems to suggest that it should still work despite safe mode but maybe I am misunderstanding something). Any thoughts gratefully received. David Rothe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Chat?
look around for phpmychat Maybe its on freshmeat.net? Adam On Tue, 27 Aug 2002, Andy wrote: HI there, I am wondering if a Chat coded in PHP would be sufficiant for a medium sized site. Maybe someone has a working example online. It would be no problem to get a ircdeamon working, just the client is in question. Thank you for your suggestions, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Compiling PHP with Sablot support
Hi All, I have PHP-4.3.0(dev) [php cvs version] and have the following configure: ../configure --with-mysql=/usr/local/ --with-gd=/usr/local/ --with-openssl --with-curl --enable-ftp --with-dom --with-xml --enable-trans-sid --enable-sockets --enable-wddx --with-zlib --with-mcrypt=/usr/local/ --with-mhash=/usr/local/ --with-freetype --with-t1lib --with-ttf --with-freetype-dir=/usr/local/ --with-gettext --enable-track-vars --with-apxs --with-expat --with-enable-xslt --with-xslt-sablot --with-sablot Configure runs fine... Make runs beautifully... Make Install runs perfectly... Apache restarts great, but: Fatal error: Call to undefined function: xslt_create_processor() in /usr/home/dhardiker/public_html/cvs/flash_api_4.03/xslTransformer.inc.php on line 24 Ideas? PS: Im running FreeBSD 4.6-Stable and a copy of my phpinfo() output can be found at http://dipsy.dapond.net/phpinfo.html. -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software Systems Engineer First Creative Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP - Chat?
PHPOpenChat: http://phpopenchat.sourceforge.net/ Very good. Adam Voigt [EMAIL PROTECTED] On Tue, 27 Aug 2002, Andy wrote: HI there, I am wondering if a Chat coded in PHP would be sufficiant for a medium sized site. Maybe someone has a working example online. It would be no problem to get a ircdeamon working, just the client is in question. Thank you for your suggestions, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Compiling PHP with Sablot support
Hi, There should be a new entry like XSLT enabled under XML enabled in your PHPinfo in case of successful set-up. I'm not very familiar with the Unix build, but just to be sure can you check if you uncommented the xslt extension in your php.ini file (if any)? HTH, Stas - Original Message - From: Dan Hardiker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 27, 2002 2:52 PM Subject: [PHP] Compiling PHP with Sablot support Hi All, I have PHP-4.3.0(dev) [php cvs version] and have the following configure: ../configure --with-mysql=/usr/local/ --with-gd=/usr/local/ --with-openssl --with-curl --enable-ftp --with-dom --with-xml --enable-trans-sid --enable-sockets --enable-wddx --with-zlib --with-mcrypt=/usr/local/ --with-mhash=/usr/local/ --with-freetype --with-t1lib --with-ttf --with-freetype-dir=/usr/local/ --with-gettext --enable-track-vars --with-apxs --with-expat --with-enable-xslt --with-xslt-sablot --with-sablot Configure runs fine... Make runs beautifully... Make Install runs perfectly... Apache restarts great, but: Fatal error: Call to undefined function: xslt_create_processor() in /usr/home/dhardiker/public_html/cvs/flash_api_4.03/xslTransformer.inc.php on line 24 Ideas? PS: Im running FreeBSD 4.6-Stable and a copy of my phpinfo() output can be found at http://dipsy.dapond.net/phpinfo.html. -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software Systems Engineer First Creative Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Compiling PHP with Sablot support
There should be a new entry like XSLT enabled under XML enabled in your PHPinfo in case of successful set-up. Thats what Im looking for, but cant find it... however the configure line still says its in there. I'm not very familiar with the Unix build, but just to be sure can you check if you uncommented the xslt extension in your php.ini file (if any)? As far as I know Ive done everything I need to, there isnt any php.ini directive that does that. If Im missing something I can check... If there was an error I could probably debug it - but there isnt! heh - Original Message - From: Dan Hardiker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 27, 2002 2:52 PM Subject: [PHP] Compiling PHP with Sablot support Hi All, I have PHP-4.3.0(dev) [php cvs version] and have the following configure: ../configure --with-mysql=/usr/local/ --with-gd=/usr/local/ --with-openssl --with-curl --enable-ftp --with-dom --with-xml --enable-trans-sid --enable-sockets --enable-wddx --with-zlib --with-mcrypt=/usr/local/ --with-mhash=/usr/local/ --with-freetype --with-t1lib --with-ttf --with-freetype-dir=/usr/local/ --with-gettext --enable-track-vars --with-apxs --with-expat --with-enable-xslt --with-xslt-sablot --with-sablot Configure runs fine... Make runs beautifully... Make Install runs perfectly... Apache restarts great, but: Fatal error: Call to undefined function: xslt_create_processor() in /usr/home/dhardiker/public_html/cvs/flash_api_4.03/xslTransformer.inc.php on line 24 Ideas? PS: Im running FreeBSD 4.6-Stable and a copy of my phpinfo() output can be found at http://dipsy.dapond.net/phpinfo.html. -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software Systems Engineer First Creative Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP: User Authentication Script
You can insert the line at the very end of your httpd.conf file... I'm sure you can find more info here... http://www.php.net/manual/en/install.windows.php - E Thank you for the reply Farianto. Exactly where in the httpd.conf file should I insert that line? If you could copy and paste the line *above* and *below* in the httpd.conf file that already exists so I know the location I would appreciate it. Thanks again. TR for example: # blahblah1 Load Module PHP4_Module c:/Apache/php/sapi/php4apache.dll // insert this line # blahblah2 .. - Original Message - From: Farianto Kurniawan [EMAIL PROTECTED] To: Anthony Ritter [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, August 26, 2002 10:36 PM Subject: Re: [PHP] PHP: User Authentication Script ...hello .. Mr.Anthony Ritter .. Actually I have faced the same problem with you but right now I can fix it . What you must do is : 1. Turn off your Apache Web Server 2. Edit your httpd.conf file from folder conf under Apache folder. 3. Please add this sentence -- LoadModule php4_module c:/Apache/php/sapi/php4apache.dll -- in it. (the important thing that php4apache.dll is in that directory , if itsn't change it to the right position. 4. Save it 5. Turn Your Apache Web Server on. I hope it can work know... Regards, Farianto.K PT.Yosibara Inti Corpora Phone: 62-21-5267645/46 Indonesia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B2q0wEPO?$OL5NA!&=<
Re: [PHP] move_uploaded_file problem
There could be a lot of different reasons why. Check the manual again (esp. the user's comments). I'm sure you'll find a lot of ideas. http://www.php.net/manual/en/features.file-upload.php Also, this has been discussed many times recently. I'm sure you'll find a lot too in the archives. :) - E I'm trying to enable my site users to upload pictures (using the move_uploaded_file function) This works fine on my home development machine but 'not' on the deployment server. This is a shared server with 'safe mode' enabled. (The php manual seems to suggest that it should still work despite safe mode but maybe I am misunderstanding something). Any thoughts gratefully received. David Rothe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ $B:G?7$N%U%!%$%J%s%9>pJs$H%i%$%U%W%i%s$N%"%I%P%$%9(B MSN $B%^%M!<(B http://money.msn.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] search in serialized string
Rodrigo, Yuk! No wonder I was having trouble visualising your problem... The serialised field cannot be meaningfully indexed (it's a waste of time if it is). That means that any search against a criteria involving a/the serialised field will require (the time to perform an) the examination of every row - so make it the last clause of a SELECT - WHERE process. Given that I would expect that you/users would want to search on such an important field, the db designer/implementer deserves to be first up against the wall... NB if a user issues a fairly open search, eg all programmers (on an IT staffing database) - and let's just say that such represents a 50% 'hit rate' against the total number of rows/people's data stored, then if the table is thousands of names long, such a search for English-Advanced will be very, very 'expensive'/slow! However, I think we can do it. Two possibilities: 1 it may be possible to use a RegEx to examine the serialised text field for English and Advanced in the correct sequence and proximity. 2 haul all of the rows that satisfy the other WHERE criteria into PHP, deserialise each field, and do the check there and then. The second will be more expensive in terms of RAM and possibly time, but offers a guaranteed result. The first is possibly faster and is more storage-efficient but will require some thought/clever coding. I assume you could manage the first. If you would like me to have a go at tackling the second for/with you, then please provide: a) a copy of the PHP code which serialises the data and stores it in the database, b) a copy of any relevant array/class definitions, c) the MySQL CREATE TABLE line for the TEXT field used, d) (if not evident from the above), a list of some of the more likely languages and the skill levels used within the data, e) (if possible) some sample data to play with/prove. Could be fun, (but it won't be pretty!) Regards, =dn I mean double ouch!!! :-) well.. 1 no, it's a select for the language (select name=language[]) and another to skill level 1b no separator it's stored as array. The array generated by language[] and skill[] are stored into another array, serialized and put into DB 2 yes. could be up to 5 2b again, none. only the array structure the field is a text. on 8/26/02 9:58 AM, DL Neil at [EMAIL PROTECTED] wrote: Rodrigo, Inherited problems = ouch! Sorry I don't keep old list msgs, perhaps you mentioned this before: does the language skills field contain: 1 both the language and the skill-level, eg English - Advanced 1b what separator is used between the two words? 2 more than one language/skill-level where applicable, eg English - Advanced, German - Intro. 2b what separator is used between language entries? What is the database field description in the table schema? Please advise, =dn well, I my opinion is not the way to work, but like I said the work was done by other guy, and now I have the problem to solve. So i back to old question :-) How can I search with some precision in a serialized string? on 8/24/02 12:13 PM, DL Neil at [EMAIL PROTECTED] wrote: Rodrigo, Then the question to be asked is: is serialize()ing this data good design/technique, or is there a better way? Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] flaking out on foreach
Why is this code: ?php $bob=array(1,2,3,5,6); foreach($bob as $foo); { echo $fooBR; } ? Rendering only 6. That's it. Just 6. What am I missing here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: flaking out on foreach
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Robert McPeak) wrote: Why is this code: ?php $bob=array(1,2,3,5,6); foreach($bob as $foo); { echo $fooBR; } ? Rendering only 6. That's it. Just 6. What am I missing here? What do you see in the HTML source view? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] flaking out on foreach
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 11:08 AM Subject: [PHP] flaking out on foreach Why is this code: ?php $bob=array(1,2,3,5,6); foreach($bob as $foo); ^^^ Because of the empty statement caused by the mistaken semi-colon here { echo $fooBR; } ? Rendering only 6. That's it. Just 6. What am I missing here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flaking out on foreach
Don't put a semicolon after the foreach. Adam Voigt [EMAIL PROTECTED] On Tue, 2002-08-27 at 11:07, ROBERT MCPEAK wrote: Why is this code: ?php $bob=array(1,2,3,5,6); foreach($bob as $foo); { echo $fooBR; } ? Rendering only 6. That's it. Just 6. What am I missing here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flaking out on foreach
Bad code. Take the ';' off the end of the foreach... ROBERT MCPEAK wrote: Why is this code: ?php $bob=array(1,2,3,5,6); foreach($bob as $foo); { echo $fooBR; } ? Rendering only 6. That's it. Just 6. What am I missing here? -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: An if statment that someone else designed and I can't parse ;(
I can't use this because there is some other stuff that is also in % signs... The whole line is as thus: $string = a href=\{$_SERVER['PHP_SELF']}?thing=doid=%number%\%some% - %stuff% %if%%artist%?(%artist% Minutes):\WAH!\%if%/a; So doing an explode on all the % signs would not work unfortunately. Thanks, Mike -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 24, 2002 7:36 PM To: Mike Cc: [EMAIL PROTECTED] Subject: [PHP] Re: An if statment that someone else designed and I can't parse ;( This may not be the best place to post this question, but I don't know where else to ask it, so here it goes. I have a program that someone was helping me to build and one of the functions returns a string similar to this: %if%(%value%)?(%value%Minutes):\WAH!\%if% Personally, I think Regex is (A) overkill and (B) over-complicated. But I'm not very smart. :-) I would do: ?php $string = %if%(%value%)?(%value%Minutes):\WAH!\%if%; $parts = explode('%', $string); # That gets you pretty close: # array(0=if,1=(,2=value,3=)?(,4=value,5=Minutes):WAH!,6=if) /* I suspect that there are more %'s in your input, and you might be finished at this point... If not, use explode some more: */ $minuteswah = $parts[5]; $minuteswah = explode('):', $minuteswah); ? Basically, a couple explode calls over the headache of trying to understand some convoluted Regex is always a win in my book. :-) http://php.net/explode -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sending email to a mailing list
Hi everyone, I'm with a little doubt about the best way to send a mail message to a large mailing list using PHP. I'm not interested in existing mailing list managers, or source codes. I dont know if the best way to send emails is to use a repeat loop with mail() function, or use some other structure to send emails with timeouts intervals... Thanks in advance Hamzagic -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHPSESSID appended to URL on initial page load
Hi, I have a few questions with php sessions, below is an example script: test_sess.php - ?php session_cache_limiter(); session_start(); ? A HREF=/local/path.phplocal path/A When I initially load the file (session cookie gets set), the HREF link gets the PHPSESSID appended to it. If I reload the page (cookie already set) the appendage goes away. According to the PHP manual, the PHPSESSID gets appended to the URL only in the case the session cookie is not accepted by the browser. I would guess that on the first page load the server has no way of knowing if the browser accepted the cookie. So maybe this is intentional? I'm trying to figure out how to avoid PHPSESSID in the URLs entirely unless the browser does not accept cookies. I suppose I could disable URL rewriting altogether and rely soley on cookies. How do I disable PHP session URL rewriting? I don't see a setting in php.ini for it. PHP 4.2.2, Solaris Sparc TIA Monte php.ini --- [Session] ; Handler used to store/retrieve data. session.save_handler = files ; Argument passed to save_handler. In the case of files, this is the path ; where data files are stored. Note: Windows users have to change this ; variable in order to use PHP's session functions. session.save_path = /export/tmp ; Whether to use cookies. session.use_cookies = 1 ; Name of the session (used as cookie name). session.name = PHPSESSID ; Initialize session on request startup. session.auto_start = 0 ; Lifetime in seconds of cookie or, if 0, until browser is restarted. session.cookie_lifetime = 0 ; The path for which the cookie is valid. session.cookie_path = / ; The domain for which the cookie is valid. session.cookie_domain = ; Handler used to serialize data. php is the standard serializer of PHP. session.serialize_handler = php ; Percentual probability that the 'garbage collection' process is started ; on every session initialization. session.gc_probability = 1 ; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. session.gc_maxlifetime = 1440 ; Check HTTP Referer to invalidate externally stored URLs containing ids. session.referer_check = ; How many bytes to read from the file. ;session.entropy_length = 0 session.entropy_length = 32 ; Specified here to create the session id. ;session.entropy_file = session.entropy_file = /dev/urandom ; Set to {nocache,private,public} to determine HTTP caching aspects. session.cache_limiter = nocache ; Document expires after n minutes. session.cache_expire = 180 ; use transient sid support if enabled by compiling with --enable-trans-sid. session.use_trans_sid = 1 url_rewriter.tags = a=href,area=href,frame=src,input=src,form=fakeentry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHPSESSID appended to URL on initial page load
Actually, over the weekend, I started using sessions in my scripts. All I did was start it using session_start(); I only noticed this behaviour using Opera 6.02 Linux browser running under FBSD 4.6-Stable. (It may have happened in mozilla 1.0 r3, but I may have not paid attention to it). I load the page the first time and the PHPSESSID is appended to the url. All links on the pages has the same appended SID. Then a reload clears it away. I thought it was something in my code since Im not too familiar on session usage. Im running php 4.2.2 on FBSD 4.6.2-Release. Thx Monte Ohrt wrote: Hi, I have a few questions with php sessions, below is an example script: test_sess.php - ?php session_cache_limiter(); session_start(); ? A HREF=/local/path.phplocal path/A When I initially load the file (session cookie gets set), the HREF link gets the PHPSESSID appended to it. If I reload the page (cookie already set) the appendage goes away. According to the PHP manual, the PHPSESSID gets appended to the URL only in the case the session cookie is not accepted by the browser. I would guess that on the first page load the server has no way of knowing if the browser accepted the cookie. So maybe this is intentional? I'm trying to figure out how to avoid PHPSESSID in the URLs entirely unless the browser does not accept cookies. I suppose I could disable URL rewriting altogether and rely soley on cookies. How do I disable PHP session URL rewriting? I don't see a setting in php.ini for it. PHP 4.2.2, Solaris Sparc TIA Monte php.ini --- [Session] ; Handler used to store/retrieve data. session.save_handler = files ; Argument passed to save_handler. In the case of files, this is the path ; where data files are stored. Note: Windows users have to change this ; variable in order to use PHP's session functions. session.save_path = /export/tmp ; Whether to use cookies. session.use_cookies = 1 ; Name of the session (used as cookie name). session.name = PHPSESSID ; Initialize session on request startup. session.auto_start = 0 ; Lifetime in seconds of cookie or, if 0, until browser is restarted. session.cookie_lifetime = 0 ; The path for which the cookie is valid. session.cookie_path = / ; The domain for which the cookie is valid. session.cookie_domain = ; Handler used to serialize data. php is the standard serializer of PHP. session.serialize_handler = php ; Percentual probability that the 'garbage collection' process is started ; on every session initialization. session.gc_probability = 1 ; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. session.gc_maxlifetime = 1440 ; Check HTTP Referer to invalidate externally stored URLs containing ids. session.referer_check = ; How many bytes to read from the file. ;session.entropy_length = 0 session.entropy_length = 32 ; Specified here to create the session id. ;session.entropy_file = session.entropy_file = /dev/urandom ; Set to {nocache,private,public} to determine HTTP caching aspects. session.cache_limiter = nocache ; Document expires after n minutes. session.cache_expire = 180 ; use transient sid support if enabled by compiling with --enable-trans-sid. session.use_trans_sid = 1 url_rewriter.tags = a=href,area=href,frame=src,input=src,form=fakeentry -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: HTML-based mail with PHP
I've seen this before. I believe it had something to do with Microsoft's screwed up cacheing routine. No guarantees, but delete the contents of your temporary internet files folder and try again. No, that wasn't it. I'm using a newer computer now, and I just tried it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: MySQL PASSWORD() Question
cheers Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... If I insert a row's field's value using the PASSWORD() function, will I need to use it or another function to find that row using the same field? You'll need to do this when somebody tries to log in later: ?php $username = $_POST['username']; # Or $PHP_AUTH_USER or $_GET['username'] or ... $password = $_POST['password']; # Or $PHP_AUTH_PW or $_GET or ... $query = select whatever from users where username = '$username' and password('$password') = password; ? In other words, you can *NEVER* go backwards from the password() function output to get the original back. But you can call password() on some incoming data and see if the two outputs match. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 27 Aug 2002 17:21:48 -0000 Issue 1550
php-general Digest 27 Aug 2002 17:21:48 - Issue 1550 Topics (messages 114217 through 114269): Re: pattern matching urls 114217 by: Justin French Re: Date conversion problems 114218 by: David Robley 114245 by: Liam.Gibbs.dfait-maeci.gc.ca Re: Output Compression output buffering.. 114219 by: Gerard Samuel Tricky question - referrer from ousite, or from intern? 114220 by: Andy 114224 by: hugh danaher 114227 by: Andy 114229 by: Justin French 114230 by: Andy 114231 by: Andy 114235 by: Bogdan Stancescu 114237 by: Justin French 114239 by: Matt Schroebel Re: php created pages's create time 114221 by: lin 114222 by: lin 114226 by: Rasmus Lerdorf Re: XML/XSL 114223 by: Alia Mikati PHP - Chat? 114225 by: Andy 114233 by: Bogdan Stancescu 114251 by: Adam Williams 114253 by: Adam Voigt exec problem 114228 by: Mark 114232 by: Anders K. Madsen 114238 by: Andrew Brampton imagecreatefrompng...fails 114234 by: David Herring array_push 114236 by: Michal Dvoracek Re: sessions? 114240 by: CHAILLAN Nicolas PHP xml: urgent! 114241 by: Alia Mikati php and xml 114242 by: Alia Mikati Re: User Authentication Script 114243 by: Anthony Ritter 114256 by: . Edwin use VB DLL (COM object) with php 114244 by: Franky getting directory info 114246 by: Alexander Ross 114249 by: Jason Wong problem with using include files 114247 by: Ivan Carey 114248 by: Stas Maximov move_uploaded_file problem 114250 by: David Rothe 114257 by: . Edwin Compiling PHP with Sablot support 114252 by: Dan Hardiker 114254 by: Stas Maximov 114255 by: Dan Hardiker Re: search in serialized string 114258 by: DL Neil flaking out on foreach 114259 by: ROBERT MCPEAK 114260 by: CC Zona 114261 by: Matt Schroebel 114262 by: Adam Voigt 114263 by: Gerard Samuel Re: An if statment that someone else designed and I can't parse ;( 114264 by: Mike sending email to a mailing list 114265 by: Raphael Hamzagic PHPSESSID appended to URL on initial page load 114266 by: Monte Ohrt 114267 by: Gerard Samuel Re: HTML-based mail with PHP 114268 by: Liam.Gibbs.dfait-maeci.gc.ca Re: MySQL PASSWORD() Question 114269 by: Tony Harrison 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] -- ---BeginMessage--- I spotted a class or function on phpclasses.org a few days back that does this. Justin French on 28/08/02 4:40 AM, tux ([EMAIL PROTECTED]) wrote: hey all, Just wanting some advice on something im doing, basically im storing news into mysql and what i want to do is, when the news is displayed, if a url is in there ie(http://www.blahblah.com OR mailto:[EMAIL PROTECTED]) it will automatically be displayed as a link, im considering using preg_match for this but i was wondering if there is any other function already designed for automatically detecting urls? cheers, Jo ---End Message--- ---BeginMessage--- In article [EMAIL PROTECTED] maeci.gc.ca, [EMAIL PROTECTED] says... Having a little trouble with converting dates. I have, in my database, a bunch of dates stored like this: -M. Month is obviously the number of the month (5), not the name (May). I want to convert the format to MMM, (ex: May, 2002), so I used the mktime function. Basically I extract the date with a regular MySQL query, then explode the date, and my components look great. However, when I put the components into my mktime function, sometimes it'll work and sometimes it won't. It won't work if the date is too far off in the future (2085, etc.), but I'm not exactly sure what the cutoff is. If it's recent, say 2005, it works fine. My code is this (after grabbing the query results): $enddate = explode(-, $datereuslt[0]); $fullenddate = mktime(0, 0, 0, $enddate[1], 0, $enddate[0]); $finaldate = date(M, Y, $fullenddate); Any ideas? Alternatively, if anyone has an easier way of doing this, I'm all ears. Hmm, as mktime returns a unix timestamp it'll be constrained by that; currently the unix timestamp covers a range from 1 Jan 1970 to (mumble) January 2038. However, if your date is stored using one of the mysql date or time formats, why not try using mysql's DATE_FORMAT to pretty it up as you select from the db? IIRC some of the date column types have a range of around 10,000 years, which should meet your needs. -- David Robley Temporary Kiwi! Quod subigo farinam ---End Message--- ---BeginMessage---
RE: [PHP] PHP: User Authentication Script
Sounds like you've identified your problem. I have never installed a module but you can check out http://www.apache.org/ for some help installing modules on the Apache server. I believe it involves compiling the server, for Windows platforms I believe you need Visual C++ 6.0. If that is to technically demanding you can checkout several pre-packaged distributions of Apache, PHP, MySQL, Perl and the like, looking for one where PHP is installed as a Mod (don't personally know of any). For a fairly complete list of packages check out; http://www.hotscripts.com/PHP/Software_and_Servers/Installation_Kits/ Sooner, or later, you will probably reach a point where it will become more expedient for you to write your own authentication, which is what most application developers do. This has the advantage of allowing you to set up your application security independent of your server or database security. hope this helps, Warren Vail Tools, Metrics Quality Processes -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 8:02 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP: User Authentication Script In my phpinfo() I get: php version 4.0.0 Server_APICGI .. Is this why it is not working? If so, how does one install PHP as a module? Please advise. Thank you. TR ... Warren Vail wrote in message: http://www.php.net/manual/en/features.http-auth.php also mentions that http auth does not work when running php as a CGI, which may also give these symptoms. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file reading
how do I read the contents of a file. $FileStream = fopen(webmaster/forum.$Forum./forumtopics.txt, w+); $line = fgetss ($FileStream, 255); print (number is: .$line. br ); fclose($FileStream); always returns nothing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: file reading
You want r instead of w+. I'd suggest reading the Filesystem Functions section of the manual again... good luck! -philip On Tue, 27 Aug 2002, phper wrote: how do I read the contents of a file. $FileStream = fopen(webmaster/forum.$Forum./forumtopics.txt, w+); $line = fgetss ($FileStream, 255); print (number is: .$line. br ); fclose($FileStream); always returns nothing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] file reading
'w+' - Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. Change it to r since you are only reading. Also check to make sure your pathing is correct. --- Brad Dameron Network Account Executive TSCNet Inc. www.tscnet.com Silverdale, WA. 1-888-8TSCNET -Original Message- From: phper [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 2:03 PM To: [EMAIL PROTECTED] Subject: [PHP] file reading how do I read the contents of a file. $FileStream = fopen(webmaster/forum.$Forum./forumtopics.txt, w+); $line = fgetss ($FileStream, 255); print (number is: .$line. br ); fclose($FileStream); always returns nothing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie,module or CGI and server question
Hi, I just installed PHP via PHPTriad...I have a couple of simple questions I hope you can answer 1)How do i know if this is running a module or cgi version? I own 3 dot coms which are not being hosted...too expensive :-(( no job..:-(( 2)How can i host a test site on this? (I am on win2k pro) when i run ipconfig /all from the command prompt this is what i get: blah blah blah blah blah blah ipaddress...193.150.***.** (stars are to mask the real ip...I know there are evil genus's on this list) ;-) default gateway...193.150.***.* (ditto) DHCP server... blah DNS serversblah blah kindly reply, -Ryan
[PHP] exif_thumbnail() problems
Ok, I recently recompiled PHP with GD and exif support. Now, I wanted to test exif_thumbnail() so created an jpeg image which had an embedded thumbnail. I used the exif_thumbnail() example at the php.net website, but it returns errors. The first error I get is an incorrect parameter count when I use exif_thumbnail($file, $x, $y, $type); I stripped off the height, width and file_type paremeters and that gets rid of that error. But no matter what I do, this function returns false telling me that there is no thumbnail to be retrieved from the image. Can anyone provide me with a working example of thumbnail extraction using exif_thumbnail()? I've tried many different things, with absolutely no luck. I tried using imagecreatefromjpeg() but that tells me theres no such function. Yours truly, Hrd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php_flag not valid?
I'm using Apache 2.0.40 with PHP 4.2.2 from Red Hat Linux 8.0 beta 3 (null). php_value statements in my httpd.conf work fine, but php_value is not recognized, giving the error message below: Starting httpd: Syntax error on line 336 of /etc/httpd/conf/httpd.conf: Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration I've tried enabling both AllowOverride Options and AllowOverride All to no avail. If I turn on /server-info support in Apache I see: Module Name: sapi_apache2.c Content handlers: none Configuration Phase Participation: Create Directory Config, Merge Directory Configs Request Phase Participation: Post-Read Request Module Directives: php_value - PHP Value Modifier php_admin_value - PHP Value Modifier Current Configuration: which doesn't show php_flag as supported. Does anyone have any clues how this could happen? Is Red Hat's PHP package messed up or am I missing some config thing somewhere? Any help would be appreciated. Thanks. -- Steve Fox IBM Linux Technology Center http://www.ibm.com/linux/ltc http://k-lug.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php_flag not valid?
Known Apache 2.0 related bug. Not sure anybody is looking at it. On 27 Aug 2002, Steve Fox wrote: I'm using Apache 2.0.40 with PHP 4.2.2 from Red Hat Linux 8.0 beta 3 (null). php_value statements in my httpd.conf work fine, but php_value is not recognized, giving the error message below: Starting httpd: Syntax error on line 336 of /etc/httpd/conf/httpd.conf: Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration I've tried enabling both AllowOverride Options and AllowOverride All to no avail. If I turn on /server-info support in Apache I see: Module Name: sapi_apache2.c Content handlers: none Configuration Phase Participation: Create Directory Config, Merge Directory Configs Request Phase Participation: Post-Read Request Module Directives: php_value - PHP Value Modifier php_admin_value - PHP Value Modifier Current Configuration: which doesn't show php_flag as supported. Does anyone have any clues how this could happen? Is Red Hat's PHP package messed up or am I missing some config thing somewhere? Any help would be appreciated. Thanks. -- Steve Fox IBM Linux Technology Center http://www.ibm.com/linux/ltc http://k-lug.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php_flag not valid?
On Tue, 2002-08-27 at 14:45, Rasmus Lerdorf wrote: Known Apache 2.0 related bug. Not sure anybody is looking at it. :( At least I can quit banging my head against my keyboard now :) Thanks much Rasmus. -- Steve Fox IBM Linux Technology Center http://www.ibm.com/linux/ltc http://k-lug.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Are sessions affected by Unix user changes?
Are sessions in PHP somehow affected by changes in Unix users? I know that the only recent changes to the server have been the addition of a few Unix users and the changing of some older passwords, but now sessions do not work within PHP. Is a session related to a web (default?) user? K. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Just learning . . . HTML Form PHP
Dear forum: I'm trying to do several basic things with an HTML form and PHP. So far, I've gotten the form to write to a MySQL database, send email and echo the fields after the form is submitted. Next I'd just like to confirm that the fields are not blank and send a custom error message. But I think I'm confused about where to place the code. I've purchased four books on PHP and I've been working for four days and I'm so stuck. Am I missing some online source for information? I've been to PHP.net and have not found answers. The two files below are the HTML and PHP files that are working. The third file is one of my attempts to check for a blank field and write a custom error message. *HTML file*** HTML HEAD TITLEAdd a Record/TITLE /HEAD BODY H1Adding a Record to tbltest/H1 FORM METHOD=post ACTION=do_addrecord3.php TABLE CELLSPACING=3 CELLPADDING=3 TR TD VALIGN=TOP PFirst NameBR INPUT TYPE=text NAME=firstname SIZE=30 MAXLENGTH=225/p PLast NameBR INPUT TYPE=text NAME=lastname SIZE=30 MAXLENGTH=225/P PEmailBR INPUT TYPE=text NAME=email SIZE=30 MAXLENGTH=225/P /TD TR TD VALIGN=TOP COLSPAN=2 ALIGN=CENTER /P PINPUT TYPE=SUBMIT NAME=submit VALUE=Add Record/P /TD /TR /TABLE /FORM /BODY /HTML *** Working PHP form*** ? /* Check to see if info is there */ if ((!$lastname) || (!$firstname) || (!$email)) { header(Location: http://localhost/show_addrecord3.html;); exit; } /* Login to database */ $db_name = drip_dripirrigationdb; $table_name = tbltest; $connection = @mysql_connect(localhost, drip, xx) or die(Couldn't connect.); $db = @mysql_select_db($db_name, $connection) or die(Couldn't select database.); /* Insert data */ $sql = INSERT INTO $table_name (firstname, lastname, email) VALUES (\$firstname\, \$lastname\, \$email\) ; $result = @mysql_query($sql,$connection) or die(Couldn't execute query.); ? ? /* Define variables */ $msg = E-MAIL SENT FROM WWW SITE\n; $msg .= First Name:$firstname\n; $msg .= Sender's E-Mail: $email\n; $msg .= Last Name: $lastname\n\n; $to = [EMAIL PROTECTED]; $subject = Web Site Feedback; $mailheaders = From: My Web Site \n; $mailheaders .= Reply-To: $email\n\n; /* send the mail */ mail($to, $subject, $msg, $mailheaders); ? HTML HEAD TITLEAdd a Record/TITLE /HEAD BODY H1Adding a Record to ? echo $table_name; ?/H1 TABLE CELLSPACING=3 CELLPADDING=3 TR TD VALIGN=TOP PSTRONGLast Name:/STRONGBR !-- Reprint the info on next page -- ? echo $lastname; ?/p PSTRONGFirst Name:/STRONGBR ? echo $firstname; ?/P PSTRONGEmail:/STRONGBR ? echo $email; ?/P /TD !-- repeat -- Pa href=show_addrecord3.htmlClick here to select your username and password./a/p /TD /TR /TABLE /BODY /HTML Modified PHP form** ? /* Check to see if info is there */ if ($firstname == ) { $name_err = font color=redPlease enter your name!/fontbr; $send = no; } if ($lastname == ) { $lastname_err = font color=redPlease enter a message!/fontbr; $send = no; } if ($email == ) { $email_err = font color=redPlease enter your e-mail address!/fontbr; $send = no; } if ($send != no) { /* Login to database */ $db_name = drip_dripirrigationdb; $table_name = tbltest; $connection = @mysql_connect(localhost, drip, ) or die(Couldn't connect.); $db = @mysql_select_db($db_name, $connection) or die(Couldn't select database.); /* Insert data */ $sql = INSERT INTO $table_name (firstname, lastname, email) VALUES (\$firstname\, \$lastname\, \$email\) ; $result = @mysql_query($sql,$connection) or die(Couldn't execute query.); ? ? /* Define variables */ $msg = E-MAIL SENT FROM WWW SITE\n; $msg .= First Name:$firstname\n; $msg .= Sender's E-Mail: $email\n; $msg .= Last Name: $lastname\n\n; $to = [EMAIL PROTECTED]; $subject = Web Site Feedback; $mailheaders = From: My Web Site \n; $mailheaders .= Reply-To: $email\n\n; /* send the mail */ mail($to, $subject, $msg, $mailheaders); ? HTML HEAD TITLEAdd a Record/TITLE /HEAD BODY H1Adding a Record to ? echo $table_name; ?/H1 TABLE CELLSPACING=3 CELLPADDING=3 TR TD VALIGN=TOP PSTRONGLast Name:/STRONGBR !-- Reprint the info on next page -- ? echo $lastname; ?/p PSTRONGFirst Name:/STRONGBR ? echo $firstname; ?/P PSTRONGEmail:/STRONGBR ? echo $email; ?/P /TD !-- repeat -- Pa href=show_addrecord3.htmlClick here to add another./a/p /TD /TR /TABLE /BODY /HTML -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] '#' character breaking the URL string
I have a 5-step (5 page) process in which users must answer various questions. Each page passes along the data to the next page, at the same time capturing the data from the previous page and passing that along too. To capture all the data submitted previously, I have the following code: $a = ?; $url = ; while(list($key, $value) = each($HTTP_POST_VARS)) { $url .= $a$key= . htmlspecialchars(addslashes($value)); $a = ; } while(list($key, $value) = each($HTTP_GET_VARS)) { $url .= $a$key= . htmlspecialchars(addslashes($value)); $a = ; } Each page then submits it's own form to nextpage.php? $url ?; I'm trying to simply pass along everything that has already been submitted, via GET or POST. The problem is that I noticed if the character '#' is part of a value for a GET variable, it breaks the whole string. Everything after the '#' is lost. How can I get around this? Is this something I must simply check for and strip out? What other characters must I worry about? As you can see, I'm already putting everything through htmlspecialchars() and addslashes(). Thanks -- : Joseph Szobody : Computers are like airconditioners: They stop working properly if you open windows. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GD 1.8.4
I have spent most of the day trying to get gd 1.8.4, freetype2, libpng, zlib, and jpeg-6b to work with PHP 4.0.6 running on Solaris 7. I am not to yet to point of configuring this with PHP. I can't get 'make' to run on gd 1.8.4: gdft.c:36: freetype/freetype.h: No such file or directory gdft.c:37: freetype/ftglyph.h: No such file or directory make: *** [gdft.o] Error 1 I modified gdft.c to use absolute paths: /usr/local/include/freetype2/freetype/freetype.h and /usr/local/include/freetype2/freetype/ftglyph.h but this resulted in further errors as well. Anybody experience this or have a suggestion for a resolution? Thanks. Zach -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD 1.8.4
GD1 uses Freetype 1 and you appear to have Freetype2. Grab GD2 instead. On Tue, 27 Aug 2002, Zach Curtis wrote: I have spent most of the day trying to get gd 1.8.4, freetype2, libpng, zlib, and jpeg-6b to work with PHP 4.0.6 running on Solaris 7. I am not to yet to point of configuring this with PHP. I can't get 'make' to run on gd 1.8.4: gdft.c:36: freetype/freetype.h: No such file or directory gdft.c:37: freetype/ftglyph.h: No such file or directory make: *** [gdft.o] Error 1 I modified gdft.c to use absolute paths: /usr/local/include/freetype2/freetype/freetype.h and /usr/local/include/freetype2/freetype/ftglyph.h but this resulted in further errors as well. Anybody experience this or have a suggestion for a resolution? Thanks. Zach -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sending email to a mailing list
Hello, On 08/27/2002 12:38 PM, Raphael Hamzagic wrote: Hi everyone, I'm with a little doubt about the best way to send a mail message to a large mailing list using PHP. I'm not interested in existing mailing list managers, or source codes. I dont know if the best way to send emails is to use a repeat loop with mail() function, or use some other structure to send emails with timeouts intervals... No, the best way is to put all recipients in Bcc: headers and send a single message to your local mailer program. Using mail() under Linux/Unix will be enough. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] filter records... how?
I have this set of code. and what I want to know how to do is how to filter one or more vars in the flat file? For example filter all the people that work at night I'm assuming it has to be in this part of the code: for($i = 0; $i count($arr_lines); $i++) { $arr_data = explode($delim, $arr_lines[$i]); print $arr_data[0].' '.$arr_data[1].' '.$arr_data[2].'BR'; } But where do I add an IF statement if that is what is needed? ?php /*assigned vars*/ $delim = \t; $file_path = newfile.dat; $name = matt; $works = at night; $programs = php; /*exporting data to flat file*/ $file = fopen($file_path, a); fwrite($file, $name.$delim); fwrite($file, $works.$delim); fwrite($file, $programs); fwrite($file, \n); fclose($file); $file = fopen($file_path,r); $page = fread($file, 4950); $arr_lines = explode(\n, $page); for($i = 0; $i count($arr_lines); $i++) { $arr_data = explode($delim, $arr_lines[$i]); print $arr_data[0].' '.$arr_data[1].' '.$arr_data[2].'BR'; } fclose($file); ? TIA! -Matt -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Please helpme !! files problems..
Hi! Sorry for this stupid question but i am a begginer learning from a old book (dangerous combination), So i have to convert every example to not use old methods... I have to problems and i look every where and could not resolve. firstone: i have a form like this... form enctype=multipart/form-data action=_URL_ method=post Send this file: input name=userfile type=file input type=submit value=Send File /form but i when i try to acces to $_FILES['userfile']['name'] for instance, seems to not exist... But the $_POST['userfile'] is working.. I look inte online manual and i doit exactly like describe but still not working... Any ideas Second: I cant accoplish that my slack work with safe mode on... the user/group of the script php recognize like a -1/-1 ¿?¿?¿? why? i try make a user/grup apache/apache to switch once started but still not working... Thaks in advance and please help... i don´t know other place to find the answers to this problems... Machine conf: -Slackware 8.1 - PHP v4.2.2 - Apache v2.0.39 -Windows XP Pro - PHP v4.2.2 - Apache v4.0.40 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: array_push
why this array_push($x ? $a : $b, 'value'); produce error(Fatal error: Only variables can be passed by reference) ?php $x = 1; #$x = 0; $a = array(); $b = array(); array_push($x ? $a : $b, 'value'); i must rewrote this in if ($x) array_push($a, 'value'); else array_push($b, 'value'); My Theory: In order for array_push to be reasonably efficient, the array is passed by reference. If it were passed by value, PHP would have to make a COPY of the array, and the array could be VERY large... $x ? $a : $b has to turn into a temporary variable, since you don't really provide a storage place for it. That temporary variable can't be turned into a reference. At any rate, smushing the ? and the array_push all into one line is just being obtuse. Spell out what you're doing with an extra line of code and another variable: $victim = $x ? $a : $b; array_push($victim, 'value'); -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: problem with using include files
The problem I have when using include files is the path to different parts of the web site. To Explain: I have a header.inc file in an inc directory: root |___inc | |___header.inc You may want to move your include files outside the web tree so that malicious users can't surf directly to them and wreak havoc. | |___images | |___topbar_01.gif | |___faq |___faq.php In the header.inc file there is: img name=topbar_01 src=images/topbar_01.gif width=783 height=56 now when I include this into the faq.php file I do not display the topbar_01.gif as the path to topbar_01.gif is now /root/faq/images/topbar_01.gif I would like to be able to use a header.inc file so that I can update the entire site simply. The include file and PHP are irrelevant here -- You'd have the same problem with this directory structure and pure HTML. You've buried faq.php and are trying to use 'images/topbar_01.gif' when you really want '/images/topbar_01.gif' While the rule of not using absolute pathnames is Good, it's not Absolute. :-) Another possiblity (under Un*x) would be to symlink your images directory under your faq directory: cd ~/faq ln -s ../images images Or maybe you don't want faq.php buried down inside faq anyway... I dunno what else you have, but it seems like you're getting a little silly burying faq.php inside '/faq/' when you're probably not going to have a whole lot of files inside '/faq/' If you start getting that many FAQs, you should throw them in a database and have faq.php be a single file that reads FAQs out of the database on demand. :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: getting directory info
Can I use php to get a list of all the jpgs in a folder? I want to make a photo album type thing for a website, and I want it to be real simple (i.e. you put photos (jpgs) in a folder called photos and upload them. Then the album is built dynamically using php. Thoughts? http://php.net/opendir http://php.net/readdir http://php.net/stristr ?php $path = '/full/path/to/your/jpeg/dir/'; # Be sure it's world-readable! $dir = opendir($path) or die(Could not open $dir); while ($file = readdir($dir)){ if (stristr($file, 'jpg') || stristr($file, 'jpeg')){ echo A HREF=$file$file/ABR\n; } } ? -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHPSESSID appended to URL on initial page load
disable URL rewriting altogether and rely soley on cookies. How do I disable PHP session URL rewriting? I don't see a setting in php.ini for it. ; use transient sid support if enabled by compiling with --enable-trans-sid. session.use_trans_sid = 1 This one. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: pattern matching urls
Just wanting some advice on something im doing, basically im storing news into mysql and what i want to do is, when the news is displayed, if a url is in there ie(http://www.blahblah.com OR mailto:[EMAIL PROTECTED]) it will automatically be displayed as a link, im considering using preg_match for this but i was wondering if there is any other function already designed for automatically detecting urls? No built-in function, but only a zillion examples in various code archives. http://php.net/links.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Newbie,module or CGI and server question
Hi, I just installed PHP via PHPTriad...I have a couple of simple questions I hope you can answer 1)How do i know if this is running a module or cgi version? ?php phpinfo();? Look at the output in the top part. You'll see CGI or ISAPI or ASAPI or whatever. There's also a built-in function to detect it inside a PHP script if you need it... Forget the name, but it's in the manual. http://php.net/ I own 3 dot coms which are not being hosted...too expensive :-(( no job..:-(( 2)How can i host a test site on this? (I am on win2k pro) Host them as in make them publicly available?... You'll need somebody to do the DNS for you for starters, unless you want to start running, errr, whatever Windoze uses instead of BIND, and that's going to be a real pain... A lot of the freebie DNS guys like http://register.com will forward your DNS for you to a static IP, or you can get it cheap through places like http://dyndns.org with a dynamic IP. You have to install a little client that runs and detects your IP change when you re-boot (or whatever) back to dyndns so they know where you (your IP) moved to... I gotta say, though, that with hosts running around $20.00 a month or less (http://budgetweb.com), I don't understand how you can have domain names that are too expensive to run that you'd want to throw on your home computer... You *probably* are violating the terms of service of your ISP for the home network connection to run a web-server, and if you get any serious traffic at all, you'll be cut off mercilessly. Not that you can't do it, but you have to make sure there's not enough bandwidth for you to pop up on their radar as a problem, or you can't even surf any more cuz they've cut you off. when i run ipconfig /all from the command prompt this is what i get: blah blah blah blah blah blah ipaddress...193.150.***.** (stars are to mask the real ip...I know there are evil genus's on this list) ;-) default gateway...193.150.***.* (ditto) DHCP server... blah DNS serversblah -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: exif_thumbnail() problems
Can't help with the exif stuff. I tried using imagecreatefromjpeg() but that tells me theres no such function. That means you forgot the --with-jpeg-dir when you did the --with-gd or the --with-gd never kicked in properly or... Basically, you didn't configure right, so go back to that stage. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Are sessions affected by Unix user changes?
Are sessions in PHP somehow affected by changes in Unix users? I know that the only recent changes to the server have been the addition of a few Unix users and the changing of some older passwords, but now sessions do not work within PHP. Is a session related to a web (default?) user? Session data is stored in a temp directory which must be writable by the web (default) user defined in httpd.conf Search httpd.conf for User and search php.ini for session (look for the directory setting). If you've made it impossible for PHP to write the session data in a directory, it's got nowhere to store it. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: '#' character breaking the URL string
I have a 5-step (5 page) process in which users must answer various questions. Each page passes along the data to the next page, at the same time capturing the data from the previous page and passing that along too. To capture all the data submitted previously, I have the following code: $a = ?; $url = ; while(list($key, $value) = each($HTTP_POST_VARS)) { $url .= $a$key= . htmlspecialchars(addslashes($value)); These should be http://php.net/URLEncode, not htmlspecialchars(addslashes(..)) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Just learning . . . HTML Form PHP
Next I'd just like to confirm that the fields are not blank and send a custom error message. But I think I'm confused about where to place the code. Where you currently have if ($send != no){ ... } you could tack on something like: else{ echo $name_err; echo $email_err; echo $lastname_err; } Once that works, as an improvement, it might make more sense to do like this: $message = ''; if ($name == ''){ $message .= Name must be provided.BR\n; } if ($email == ''){ $message .= Email must be provided.BR\n; } if ($lastname == ''){ $message .= Last name must be provided.BR\n; } if (!$message){ # Send the email. } else{ echo FONT COLOR=FF$message/FONT\n; } By using $message and .= to tack on the messages, you can avoid having so many variables running around confusing you and get the job done just as well. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: filter records... how?
I have this set of code. and what I want to know how to do is how to filter one or more vars in the flat file? For example filter all the people that work at night Honestly, you'd be best off moving the data into a database (MySQL or otherwise)... At this point, you're starting to do a lot of work that's already been done by somebody else... I'm assuming it has to be in this part of the code: for($i = 0; $i count($arr_lines); $i++) { $arr_data = explode($delim, $arr_lines[$i]); $worksdelim = $arr_data[1]; echo Works is '$worksdelim'BR\n; if ($worksdelim == 'at night'){ # Or something like 'at night'... print $arr_data[0].' '.$arr_data[1].' '.$arr_data[2].'BR'; } } But where do I add an IF statement if that is what is needed? ?php /*assigned vars*/ $delim = \t; $file_path = newfile.dat; $name = matt; $works = at night; $programs = php; /*exporting data to flat file*/ $file = fopen($file_path, a); fwrite($file, $name.$delim); fwrite($file, $works.$delim); fwrite($file, $programs); fwrite($file, \n); fclose($file); $file = fopen($file_path,r); $page = fread($file, 4950); $arr_lines = explode(\n, $page); for($i = 0; $i count($arr_lines); $i++) { $arr_data = explode($delim, $arr_lines[$i]); print $arr_data[0].' '.$arr_data[1].' '.$arr_data[2].'BR'; } fclose($file); ? TIA! -Matt -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Please helpme !! files problems..
Hi! Sorry for this stupid question but i am a begginer learning from a old book (dangerous combination), So i have to convert every example to not use old methods... I have to problems and i look every where and could not resolve. firstone: i have a form like this... form enctype=multipart/form-data action=_URL_ method=post Send this file: input name=userfile type=file input type=submit value=Send File /form but i when i try to acces to $_FILES['userfile']['name'] for instance, seems to not exist... But the $_POST['userfile'] is working.. Do ?php phpinfo();? on the page where $_FILES isn't working and see what's in there that mentions 'userfile', if anything. I look inte online manual and i doit exactly like describe but still not working... Any ideas Second: I cant accoplish that my slack work with safe mode on... the user/group of the script php recognize like a -1/-1 ¿?¿?¿? why? i try make a user/grup apache/apache to switch once started but still not working... Thaks in advance and please help... i don´t know other place to find the answers to this problems... Machine conf: -Slackware 8.1 - PHP v4.2.2 - Apache v2.0.39 -Windows XP Pro - PHP v4.2.2 - Apache v4.0.40 -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] bulk mail
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I know a lot has been discussed in this topic, but I still don't find any solution. What I want to do is send a lot of mails triggered from a web page using php. I've found diferent solutions but all of them has some problem: 1) using set_time_limit() to allow the script to run longer while sending e-mails, my prefered solution but I won't let someone waiting a lot of time with a loading browser because they'll stop, reload, and at best, just not like it. So, I would like to launch a background process changing the set_time_limit() in that process (if needed), the problem is that I wasn't able to run a background process in PHP, were you ? I know I could use at (atd) to run a background process but in my shared server, there's no at available. 2) Queuing instead of sending. I've seen that some people improved the 'sending' (well, it's not sending anymore) by queuin only. Then some people tell me that sendmails always queue and I'm a bit confused. Does sendmail queue or sends mails ? if it queue, why is it send imediatly if the queue is procesed once an hour or so ? I don't care if my mails are procesed once an hour for this mails, I don't need them to be sent imediatly. I can't change sendmail configuration (since it's a shared server) and I wouldn't want to because I have other 'mail cases' when I want to send the mails imediatly. I can't change the way PHP calls sendmail (again, it's a shared server) but I'm using PHPMailer and I can change the way PHPMailer uses sendmail, will `/usr/sbin/sendmail -O DeliveryMode=q` queue the mails I'm sending ? 3) Someone told me to do it using cron, do you have any idea of how to do it with cron ? Thanks. - -- Pupeno: [EMAIL PROTECTED] http://www.pupeno.com - --- Help the hungry children of Argentina, please go to (and make it your homepage): http://www.porloschicos.com/servlet/PorLosChicos?comando=donar -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9bAiPLr8z5XzmSDQRAncrAJ9aJNbANVfW0yWglY7n/33vQrN3UQCbB6N0 2ba6H7dP1U4Qb0xfI4M8SSE= =cQ0X -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] GD 1.8.4
OK. I ran 'make install' for GD 2.0.1 and that seemed to go smoothly. Thanks. Zach -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 2:42 PM To: Zach Curtis Cc: [EMAIL PROTECTED] Subject: Re: [PHP] GD 1.8.4 GD1 uses Freetype 1 and you appear to have Freetype2. Grab GD2 instead. On Tue, 27 Aug 2002, Zach Curtis wrote: I have spent most of the day trying to get gd 1.8.4, freetype2, libpng, zlib, and jpeg-6b to work with PHP 4.0.6 running on Solaris 7. I am not to yet to point of configuring this with PHP. I can't get 'make' to run on gd 1.8.4: gdft.c:36: freetype/freetype.h: No such file or directory gdft.c:37: freetype/ftglyph.h: No such file or directory make: *** [gdft.o] Error 1 I modified gdft.c to use absolute paths: /usr/local/include/freetype2/freetype/freetype.h and /usr/local/include/freetype2/freetype/ftglyph.h but this resulted in further errors as well. Anybody experience this or have a suggestion for a resolution? Thanks. Zach -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: '#' character breaking the URL string
Thanks. That's what I needed. Joseph Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... I have a 5-step (5 page) process in which users must answer various questions. Each page passes along the data to the next page, at the same time capturing the data from the previous page and passing that along too. To capture all the data submitted previously, I have the following code: $a = ?; $url = ; while(list($key, $value) = each($HTTP_POST_VARS)) { $url .= $a$key= . htmlspecialchars(addslashes($value)); These should be http://php.net/URLEncode, not htmlspecialchars(addslashes(..)) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php indenter
what is a good php indenter/beautifier? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] People's Opinion
This is a little off topic, but I am desperate. I am looking for a good PHP/MySQL chat that is not in a bunch of frames. I have from WebChat (http://www.webdev.ro/) but it has a bunch of runtime erros. If anyone has this working or they know of another that works well please send me a link or something anything Thank you in advance for your time and support. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP with Sql Server
Please, How do I make to access a database Sql Server 2000? Thaks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] time stamp
I am using PHP with MySQL and have a timestamp field in my db table. What would be the easiest way to get the newest timestamp out of the db? Thanks in Advance Steve -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ow3 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Host
cedant web hosing...cedant.com. They will bill you and you can pay by check and with Mysql databse I think they are 12.00 Bruce Karstedt [EMAIL PROTECTED] wrote in message 003b01c24e2b$7a9c9e80$7772d73f@c3">news:003b01c24e2b$7a9c9e80$7772d73f@c3... Anyone care to recommend a host as follows: Unix PHP MySQL Domain Reg. No unusual size or traffic requirements (now) Pay by Check (my company will not allow the used of company credit cards over the Internet.) Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] bulk mail
on 28/08/02 9:17 AM, Pupeno ([EMAIL PROTECTED]) wrote: I know a lot has been discussed in this topic, but I still don't find any solution. What I want to do is send a lot of mails triggered from a web page using php. I've found diferent solutions but all of them has some problem: 1) using set_time_limit() to allow the script to run longer while sending e-mails, my prefered solution but I won't let someone waiting a lot of time with a loading browser because they'll stop, reload, and at best, just not like it. So, I would like to launch a background process changing the set_time_limit() in that process (if needed), the problem is that I wasn't able to run a background process in PHP, were you ? I know I could use at (atd) to run a background process but in my shared server, there's no at available. If you trigger it from a web page, eventually, no matter what you do, you will hit the wall, because browsers may time out -- not just the PHP script. The ONLY option is to Bcc: everyone in your email, rather than send personalise emails. This way you only send ONE email, not 1000's. I've spent AGES researching this, and am convinced that Bcc is the only way to get the performance you want. There are many hacks work-arounds like: - have the webpage only do batches of 50 emails, and refresh with META refresh every 1 minute... come back in a few hours, and they'll all be sent. The other option to consider is to write a PHP script which runs FROM the command line. Then possibly your webpage can trigger the command line script, AND refresh to a thanks page, leaving the other command line script still running. Of course you need PHP as a command line executable for this. I really suggest speaking to your host. It's quite possible THEY have the solution you want. It's also quite possible that they HATE bulk mailing via their web page servers, and will actually impose restrictions. They may also have a dedicated mailing server (as my ISP does) which can handle this sorta stuff. 2) Queuing instead of sending. I've seen that some people improved the 'sending' (well, it's not sending anymore) by queuin only. Then some people tell me that sendmails always queue and I'm a bit confused. Does sendmail queue or sends mails ? if it queue, why is it send imediatly if the queue is procesed once an hour or so ? I don't care if my mails are procesed once an hour for this mails, I don't need them to be sent imediatly. I can't change sendmail configuration (since it's a shared server) and I wouldn't want to because I have other 'mail cases' when I want to send the mails imediatly. I can't change the way PHP calls sendmail (again, it's a shared server) but I'm using PHPMailer and I can change the way PHPMailer uses sendmail, will `/usr/sbin/sendmail -O DeliveryMode=q` queue the mails I'm sending ? The issue of queing is only there IF you wish to send personalised emails. Queing is NOT an issue for sending an email with a Bcc of 50,000 people. 3) Someone told me to do it using cron, do you have any idea of how to do it with cron ? Cron is a way of executing a process at a certain time (eg 3am daily). If you were able to write a command-line PHP script to send you email (queries a DB or text file to get the message body, then grabs the address', then send the email(s)), you could set it to run at a time which the server is less busy (eg 4am). You could also use it to partially-send to the list in batches of 100 people, at 5 minute intervals or something. The real answer to your question is: If you are doing this on a shared host, use Bcc and keep it simple... your host will probably see the huge system burden you are placing, and impose restrictions on you. If you want a dedicated mailing list with personalised emails, you should look at a dedicated mailing list system on your host, or another host, which tackles the issue properly. There's sparklist.com, ezmlm, etc etc. Your host may be interesting in setting up a program to do this... Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Host
What's your site about? I can do all that for free if if it's: - Non-Profit - Personal homepage - PHP Dev. Apache, PHP, MySQL on Slackware 8.1 98% Uptime, 2 Meg pipe based in Brisbane, Australia. I allow external MySQL DB Access, FTP, mail(), DNS hosting and unlimited POP3 accounts. BUT... I have a 5gig monthly data transmission limit, so no big files... Contact me if interested. Cheers, Liam - Original Message - From: Bruce Karstedt [EMAIL PROTECTED] To: PHP - General List (E-mail) [EMAIL PROTECTED] Sent: Wednesday, August 28, 2002 10:40 AM Subject: [PHP] Host Anyone care to recommend a host as follows: Unix PHP MySQL Domain Reg. No unusual size or traffic requirements (now) Pay by Check (my company will not allow the used of company credit cards over the Internet.) Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Host
Experthost.com allows payment by cheque, but the service is withheld until the cheque clears (understandable). Justin on 28/08/02 10:40 AM, Bruce Karstedt ([EMAIL PROTECTED]) wrote: Anyone care to recommend a host as follows: Unix PHP MySQL Domain Reg. No unusual size or traffic requirements (now) Pay by Check (my company will not allow the used of company credit cards over the Internet.) Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sending email to a mailing list
on 28/08/02 1:38 AM, Raphael Hamzagic ([EMAIL PROTECTED]) wrote: I'm with a little doubt about the best way to send a mail message to a large mailing list using PHP. I'm not interested in existing mailing list managers, or source codes. I dont know if the best way to send emails is to use a repeat loop with mail() function, or use some other structure to send emails with timeouts intervals... yes, and yes, providing you want to send personalised emails, which costs huge performance problems and a lkoad on the server... possibly leads to timeouts of the script, timeouts of the browser, etc etc. Not good! the real easy solution is to send ONE email with everyone in the Bcc field. Quick and simple. Won't piss off your host, won't load the server, etc. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP with Sql Server
http://www.php.net/manual/en/function.mssql-connect.php From: Skyhawk [EMAIL PROTECTED] Please, How do I make to access a database Sql Server 2000? Thaks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Host
I also work for a webhosting company, if you need corporate hosting, I can help you there too. Low rates, payable by check... Fibre Optic pipe Slackware 8.1 Apache 1.3.26 PHP 4.2.2 MySQL Perl 1.27 POP3 Accounts Admin console FTP Access Contact me on [EMAIL PROTECTED] if you're interested. I'm the technician here, so I can answer any technical questions. If you're interested I'll pass you onto sales. A colleague's working on the site at the moment, so god knows what's happening to it... Cheers, Liam - Original Message - From: Bruce Karstedt [EMAIL PROTECTED] To: PHP - General List (E-mail) [EMAIL PROTECTED] Sent: Wednesday, August 28, 2002 10:40 AM Subject: [PHP] Host Anyone care to recommend a host as follows: Unix PHP MySQL Domain Reg. No unusual size or traffic requirements (now) Pay by Check (my company will not allow the used of company credit cards over the Internet.) Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Command Line
Hi I am very new to mysql, so any help please how to drop tables from a database from the command line i have 6 tables in there, and need to be able to flush all the data out, (of 2 tables only) so there might be another way Thanks Trevor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Command Line
Trevor ... Do you want to drop the tables, or simply delete the data in them and retain the table structure? To delete data ... USE databasename; DELETE * FROM tablename; To drop tables ... DROP TABLE [IF EXISTS] tablename1 [, tablename2,...] [RESTRICT | CASCADE] If you drop a table, then need to store data in it, you will have to re-create it. - Original Message - From: Trevor Tregoweth [EMAIL PROTECTED] To: mysql [EMAIL PROTECTED]; PHP [EMAIL PROTECTED] Sent: Tuesday, August 27, 2002 8:12 PM Subject: Re: Command Line Hi I am very new to mysql, so any help please how to drop tables from a database from the command line i have 6 tables in there, and need to be able to flush all the data out, (of 2 tables only) so there might be another way Thanks Trevor - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Command Line
if you just wanna delete everything from the tables you can do DELETE FROM table_name; for each table. or you can do DROP table_name; for each one but then you have to re-create each table that you drop with CREATe TABLE ( stuff here ); Only use DROP table_name; if you know the structure of each table. If you need the table names do SHOW TABLES; and if you need their structure use DESCRIBE table_name; Adam On Wed, 28 Aug 2002, Trevor Tregoweth wrote: Hi I am very new to mysql, so any help please how to drop tables from a database from the command line i have 6 tables in there, and need to be able to flush all the data out, (of 2 tables only) so there might be another way Thanks Trevor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: People's Opinion
Christopher J. Crane wrote: This is a little off topic, but I am desperate. I am looking for a good PHP/MySQL chat that is not in a bunch of frames. I have from WebChat (http://www.webdev.ro/) but it has a bunch of runtime erros. If anyone has this working or they know of another that works well please send me a link or something anything Thank you in advance for your time and support. http://freshmeat.net/browse/22/?filter=183%2C15topic_id=22 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] JOB: Senior Developer, Washington DC Area
We have an immediate opening for an experienced web application developer (read guru) who meets or exceeds the following criteria: Required skills (2.5+ years): - Large scale, highly available applications development on Unix/Linux platform - PHP - Perl - SQL (Oracle, MySQL preferred) - D/HTML/Javascript/CSS - XML - OO programming - Source code control (CVS) Desired skills: - Java/JSP - C/C++ - Linux/Unix - Windows NT/2000/XP Plusses: - Experience with Java web application servers - Web(logic|sphere) - UML, RUP - strong understanding of various software development methodologies - Ability to work under pressure - Leadership ability If you meet the requirements above, and are interested in working on exciting projects with a strong DC area company, please send a cover letter and resume with salary requirements to [EMAIL PROTECTED] Thanks, Alok K. Dhir [EMAIL PROTECTED] Symplicity Corporation http://solutions.symplicity.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Are sessions affected by Unix user changes?
On Wednesday 28 August 2002 03:51, K Soares wrote: Are sessions in PHP somehow affected by changes in Unix users? I know that the only recent changes to the server have been the addition of a few Unix users and the changing of some older passwords, but now sessions do not work within PHP. Is a session related to a web (default?) user? The user that the webserver is running as (nobody/apache/whatever) must have write access to the directory defined by session.save_path in php.ini. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Now I lay me down to sleep, I pray the Lord my soul to keep, If I should die before I wake, I'll cry in anguish, Mistake!! Mistake!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Just learning . . . HTML Form PHP
On Wednesday 28 August 2002 03:51, April Lougheed wrote: Next I'd just like to confirm that the fields are not blank and send a custom error message. But I think I'm confused about where to place the code. The two files below are the HTML and PHP files that are working. The third file is one of my attempts to check for a blank field and write a custom error message. How isn't it working? What do you see? What did you expect to see? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Depart not from the path which fate has assigned you. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php