[PHP] Re: Problem in mysql connection
What is the error message? (It will help us a lot G) Uma Shankari T. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I have installed php4 rpm in my machine.while connecting php with mysql it is giving fatal error.I have given like this mysql_connect($servername,$username,$password); Why it is so .. Is there any other files i have to install to access the database?? Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Sending Files to a Remote User
Hello, I am creating dynamic CSV files using PHP, and currently these files are being saved on the server, but I would like to send them directly to the user who requested the file, similar to what phpMyAdmin does. I looked at the source for phpMyAdmin and it was a bit complicated. I was hoping there was a simpler solution to my problem. Any suggestions? Please email me directly, I'm not on the mailing list. Thank you. -Samuel _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] set_time_limit() in a loop
what are you doing a while on if while never ends and you reset the time out each loop and use ignore_user_abort(true), it will still be going 13 hours latter. maybe if you send the full code so we can look at it. Paul Roberts [EMAIL PROTECTED] - Original Message - From: Matthew Delmarter [EMAIL PROTECTED] To: Martin Towell [EMAIL PROTECTED] Cc: PHP Mailing List [EMAIL PROTECTED] Sent: Friday, January 25, 2002 12:55 AM Subject: RE: [PHP] set_time_limit() in a loop I should also mention that the loop is sending mail using mail(). Is it possible that this is the problem somehow? -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 1:16 PM To: 'Matthew Delmarter'; PHP Mailing List Subject: RE: [PHP] set_time_limit() in a loop your first thought was correct - it sets it to 1800, it's NOT accumulative. it would have something to do with ignore_user_abort(true); and also is your while loop's exit check working? Martin -Original Message- Just wondering about set_time_limit() in a loop. The current code looks something like this: ? ignore_user_abort(true); set_time_limit(1800); while: do stuff; set_time_limit(1800); endwhile; ? Does this reset the timeout to 1800 seconds every time it loops? Or does it accumulate so that the timeout has 1800 seconds added to it every time? The reason I ask is that my ISP informs me that the script is still running 13 hours later! Or is this related to the ignore_user_abort? Regards, Matthew Delmarter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Outreaching (bug fix)
For whoever may have bumped into the same problem as Mr. Walker, please read the release notes on sourceforge (kudos Matthew for the step-by-step bug-tracking - I would've been unable to solve this for a long time without him). This is my last message on this topic on the mailing list - I don't want to spam you, but this was a serious issue if you didn't know where to look. Thanks for your patience! :-) Bogdan Matthew Walker wrote: I downloaded the current version to test, and I don't know how you call it stable enough to use. I continually get permission denied errors accessing the DB. Some of them go away if I refresh, others don't. And yes, the user has full permissions to the relevant DB. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 8:14 PM To: [EMAIL PROTECTED] Subject: [PHP] Outreaching (announcement) Hi all! As posted some time ago, the company I'm working for developed a GPL system for project development (basically keeping in touch with the customers while developing a project). I think this project may be of some interest for some of you (well, hopefully, for may of you), so here's the manifesto: __ OPT (Outreach Project Tool) is a PHP general-purpose virtual commonplace for customers and developers to collaborate in developing projects. The system provides documents archive, e-mail archive, request tracker, task management, knowledge base, news administration, newsletter support and a lot of other features (some project-based, some system-based). __ Hope this may help some of you with your customers! The current version is 0.9 (beta - the first public release), but it's stable and comes with a nice setup interface (yes, I have been thinking of you guys). This release has been tested for more than eight months in a production environment, with real customers. So, the URL is http://sourceforge.net/projects/outreach - and you know my e-mail for complaints :-) HTH Bogdan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] get image from blob in mysql
List, I'm using the following code to retrieve image from Mysql. My problem is how can I output another image if the given ID doesn't have an image on it??? I had already inserted a blank gif in the database in order to use it, but I've tried to check if ($resultado['Imagem_data'] == ) or null and outputs the blank gif, but didn't work. $conexao = new conexao(); $query = new Query($conexao); $sql = SELECT Imagem_data,Imagem_type FROM imagens WHERE CelebID='$celebID'; $query-executa($sql); $resultado = $query-dados(); $imagem_banco = $resultado['Imagem_data']; $type = $resultado['Imagem_type']; if($imagem_banco != ) { HEADER(Content-type: $type); echo($imagem_banco); } Thank's Rodrigo -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: get image from blob in mysql
The code below doesn't show the test you mentioned. By all means testing if a variable = should work, but you may want to try something like if (!$resultado['Imagem_data']) { ... } Sometimes testing a value against can cause problems because of non-appearing whitespace that may exist in the variable. SOMETIMES, not all the time, and I really couldn't tell you EXACTLY how PHP reacts to some of these conditions, because I believe it to be system-dependent if memory serves me (kind of like the differences between \n on Unix/Linux and Windows). Just play around with things, but I'd like to see the code you are using for this condition. Mike Frazer Rodrigo Peres [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... List, I'm using the following code to retrieve image from Mysql. My problem is how can I output another image if the given ID doesn't have an image on it??? I had already inserted a blank gif in the database in order to use it, but I've tried to check if ($resultado['Imagem_data'] == ) or null and outputs the blank gif, but didn't work. $conexao = new conexao(); $query = new Query($conexao); $sql = SELECT Imagem_data,Imagem_type FROM imagens WHERE CelebID='$celebID'; $query-executa($sql); $resultado = $query-dados(); $imagem_banco = $resultado['Imagem_data']; $type = $resultado['Imagem_type']; if($imagem_banco != ) { HEADER(Content-type: $type); echo($imagem_banco); } Thank's Rodrigo -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 26 Jan 2002 13:48:07 -0000 Issue 1134
php-general Digest 26 Jan 2002 13:48:07 - Issue 1134 Topics (messages 82186 through 82210): Re: upgrade problem 82186 by: Alan McFarlane Re: HELP! with PHP extension 82187 by: Alan McFarlane Re: Printing JPEG images generated with ImageJPEG with IE/WIN 82188 by: David_Bourne Re: PHP IDE 82189 by: Zeev Suraski Encryption 82190 by: Anas Mughal 82203 by: Alan McFarlane Problem in mysql connection 82191 by: Uma Shankari T. 82192 by: Jeff Sheltren 82204 by: Uma Shankari T. 82205 by: Alan McFarlane Passing objects 82193 by: Dean Householder 82194 by: Jason Wong 82198 by: Dean Householder 82199 by: Jeff Sheltren I'm not sure how to do some simple code... 82195 by: Leif K-Brooks 82200 by: Mike Maltese 82201 by: Mike Maltese Re: move_uploaded_file() query 82196 by: Jason Wong Re: strings and \n 82197 by: Jason Wong regex 82202 by: Yamin Prabudy Sending Files to a Remote User 82206 by: [ rswfire ] Re: set_time_limit() in a loop 82207 by: Paul Roberts Re: Outreaching (bug fix) 82208 by: Bogdan Stancescu get image from blob in mysql 82209 by: Rodrigo Peres 82210 by: Mike Frazer 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--- It sounds like an inconsisteny in the library versions. Try and get the latetst version of the GD library, (source if necessary), or if you have a tool that is capable of analyzing .so/.dll dependancies, use that. Chuck Barnett [EMAIL PROTECTED] wrote in message 002301c1a607$c3dff1e0$[EMAIL PROTECTED]">news:002301c1a607$c3dff1e0$[EMAIL PROTECTED]... Hi, I have been running 4.0.3 or so and I was upgrading to 4.1.1. I also upgraded gdlib to 1.8.4. I compiled php with jpeg support and gd support everything made and compiled ok. when I restart apache I get this: Setting up Web Service: Syntax error on line 58 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp4.so into server: /etc/httpd/modules/libphp4.so: undefined symbol: gdImageCreateFromGif to get apache running again I have to copy my backup libphp4.so. I know it probably has something to do with an older version of gdlib but I'm not sure. My box is a Cobalt RAQ4. If anyone has any ideas please help :) Thanks, Chuck ---End Message--- ---BeginMessage--- Make sure you've copied the contents of the c:\php\dlls folder to your system directory (\windows\system, \winnt\system32, not sure 'bout 2K). Your extension_dir setting in php.ini should be extension_dir = c:/php/extensions/ And make sure you've copied your php.ini to your windows directory (\windows, \winnt, again not sure 'bout 2K) Andre Amaral [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, Here is the situation. I have Windows 2000 SP2, IIS5 running PHP 4.1.1 using CGI. My PHP folder is C:\php Extension Folder is: C:\php\extension PHP.INI file: extention_dir = C:\php\extension\ First problem that I have is loading extensions. Every time I try to uncomment an extension on PHP.INI I get the following message after restart IIS. [Unable to load dynamic library 'C:\php\extension\php_db.dll' - The specified procedure could not be found] I also want to mention that I tried the follwing in PHP.INI... extention_dir = .;C:\php\extension\ extention_dir = ,;C:\php\extension\ extention_dir = C:/php/extension/ Obs.: All DLL's the came with the original package are there. Second problem is that every single script I execute in my server it gives me the following error... [PHP Warning: Undefined property: blabla in c:\blabla\blabla] Obs.: The 'blablabla' is representing the propperty and the folder Thank you guys. I hope I get some good help. I need it really bad. I've been burning my brain on this for the past 2 weeks. ---End Message--- ---BeginMessage--- To: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Date: Fri, 25 Jan 2002 16:20:57 +0100 From: Martin Thoma [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: Printing JPEG images generated with ImageJPEG with IE/WIN Hm, it could be that IE tries to reload the picture (which isn't there anymore because the form-data has been expired). Perhaps saving the picture temporarly on the server will prevent the problem. That could be what is happening. I'm generating data for students to analyze on one page with the hidden form and generating a graph of the data with the next page. The only thing generated is the image. If I date/time stamp the image file I could serve that up on the
[PHP] Banner agencies - OT
Hi Most of us that have sites use some kind of ad agencies. It's small change but it helps. In recent months, many ad agencies closed down, many stopped paying etc... I was wondering if anyone is happy with his ad agency. thanks berber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Using HTTP Post variables with multiple domains and scripts
Hi Folks, I use the regular form POST method to send variables from Domain A to Domain B. On domain B I run a short script. The script does it's thing and then sends the posted variables back to Domain A with header(Location: http://www.domainA.com/folder/script.php;); The problem is that the variables disappear at this point - after the domain B script is run - and do not appear to go any further. I have tried this code, which works: header(Location: http://www.domainA.com/folder/script.php?var1=foovar2=bar;); ... but for security reasons I should not use the GET method for passing the originally posted variables. I do not want to stop the form post process, I just want to run my own script routine and then continue with the original form request. How do I accomplish the posting of variables from Domain A to Domain B and back again to Domain A without reposting them in an additional form post submission? Thanks! Kind Regards, Richard Creech [EMAIL PROTECTED] Phone 250.744.3350 Pacific Time, Canada Easily create your own Yellow Pages with phpYellow Pages http://www.dreamriver.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] break statement usage
Private note: heard the one about throwing stones and living in glass houses? tip Try to keep your posts a little shorter if only for the sake of the dialup users ;) /tip this said by someone who: - pushes MIME messages into a discussion list/newsgroup (instead of simple text format which is almost-universally preferred/required/recommended on lists), - has a (unnecessary) PGP addendum on every msg sent, - frequently ends up sending msgs which open as blank screens, until certain email client users make the extra effort of opening an attachment (a virus risk in most 'warnings/good practices' descriptions) but whose contributions are often much appreciated! Regards, =dn (whose 'crimes' include the use of (some) M$ products) - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: 25 January 2002 21:24 Subject: Re: [PHP] break statement usage -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Erik Price blurted So what I'm wondering is, Is it bad coding practice to make heavy use of break statements in switch() flow control? That's exactly the point of the break statement, it was designed to be used in a switch statement to 'break' from the statement. It replaces the need for complex and untidy 'if else' monsters. tip Try to keep your posts a little shorter if only for the sake of the dialup users ;) /tip Cheers - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8Uc0PHpvrrTa6L5oRAvcAAJ9Z67PVwgyNN7WFpf/R0wvN97IMkgCgm53O 1TbPTWhwyl8FNEhtLRRYv/c= =UDbQ -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Calculate Directory Size
smime.p7m Description: application/pkcs7-mime
Re: [PHP] break statement usage
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then DL Neil blurted Private note: heard the one about throwing stones and living in glass houses? tip Try to keep your posts a little shorter if only for the sake of the dialup users ;) /tip this said by someone who: - pushes MIME messages into a discussion list/newsgroup (instead of simple text format which is almost-universally preferred/required/recommended on lists), er... I'm only sending text. - has a (unnecessary) PGP addendum on every msg sent, That's a matter of opinion only. - frequently ends up sending msgs which open as blank screens, until certain email client users make the extra effort of opening an attachment (a virus risk in most 'warnings/good practices' descriptions) I'd be very interested to hear if anybody is getting this from me. As far as I know There is *nothing* wrong with my messages. Perhaps there is somthing wrong with 'Outhouse' on your machine :-) but whose contributions are often much appreciated! er Thanks, I think? - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UsxnHpvrrTa6L5oRAs1rAJ9jLdFD3CaJ/FtKT5oW1/aJwcANdQCbBO8l raX1o6ZBDirdcUpqo9C6+mA= =yAGV -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Calculate Directory Size
I suggest using an external tool - using PHP would probably be too slow esp. if you're hitting 1000+ users. (Plus, I think you would have to run a lot of clearstatcache()'s which may cause all sorts of problems)... If you do an ls or dir or similar then you could parse the output, however there must be a decent tool out there somewhere that runs nice and fast. Simon H [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On advice, I've moved this from the Pear list. I have a problem...hopefully someone can help, because I've no idea where to even start! I have a user database, with a table called Users, and fields as so: (it would be cool if this would work on both Linux and Windows) - User DiskUsage (Mb) Quota (Mb) HomeDirectory - jim 50 100 F:\users\jim \\ In Windows jim 50 100 /users/jim \\ In Linux - The database wouldn't be shared between Windows and Linux, just 1 or the other. What I would like to be able to do is, press a button on a php page, and scan the (MySQL or ODBC through Pear DB) database, and for each user, calculate the size of their HomeDirectory, and Update the DiskUsage in the DB accordingly. I'm wondering tho how this would work with say 1000's of users each with several hundred Mb's or even several Gb's each. The users will have subfolders too, so the function would have to recurse the dirs, if possible. Is this even possible with PHP? I appreciate any help I can get on this, because its waay beyond me presently. Thanks Simon H -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] phplib
hey... im tryint to lay some conditions for the html output... example : if ($check == 1) { some html } else { some other html } The problem here is, I want the html in both cases to be customisable by the user... so I would have to make it a part of the template file... and if i do that, even if the conditions fail, the html will show up..any ideas on a fix for this? Regards, Kunal Jhunjhunwala -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] phplib
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Kunal Jhunjhunwala blurted hey... im tryint to lay some conditions for the html output... example : if ($check == 1) { some html } else { some other html } The problem here is, I want the html in both cases to be customisable by the user... so I would have to make it a part of the template file... and if i do that, even if the conditions fail, the html will show up..any ideas on a fix for this? I'm not 100% certain I understand your Q. but how about this: I take it from the subject you are using a PHPLib template so if you were to have a teplate var called {htmlOutput} you could do this, if($check=1) { $htmlOutput=EOF your html here EOF; } elseif($check=2) { $htmlOutput=EOF your altenate html here EOF; } else { $htmlOutput=EOF your default html here EOF; } and then in your template code. $t-set_var(htmlOutput, $htmlOutput); Hope that's what you mean - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UtA5HpvrrTa6L5oRAr/TAJ0RBC3OzWQashl7fFc0e9wcrow6LgCdFjY1 xjqg6qEwLRKI+R4g0NWYRoM= =haum -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Variables Limit
Is there any limit on the amount of variables that you can use? Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012
Re: [PHP] phplib
Hi Nick, I found the solution. Thanks for your reply though. Basically, what I wanted to do was simple : the admin of my program can decided wether they want a feature on or off. Now, depending on that, a lil section of the html would change. Using phplib, I have seperated all my html from the php. The problem comes up, when the html changes dependin on wether the feature is on or off. How does one alter the html content in the template file? one cant... The solution I found is, add a open comment tag above and and close comment tag under the dynamic html code... commenting it out depending on wether the feature is on or off...simple eh? :) Regards, Kunal Jhunjhunwala - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: php-list [EMAIL PROTECTED] Sent: Saturday, January 26, 2002 9:20 PM Subject: Re: [PHP] phplib -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Kunal Jhunjhunwala blurted hey... im tryint to lay some conditions for the html output... example : if ($check == 1) { some html } else { some other html } The problem here is, I want the html in both cases to be customisable by the user... so I would have to make it a part of the template file... and if i do that, even if the conditions fail, the html will show up..any ideas on a fix for this? I'm not 100% certain I understand your Q. but how about this: I take it from the subject you are using a PHPLib template so if you were to have a teplate var called {htmlOutput} you could do this, if($check=1) { $htmlOutput=EOF your html here EOF; } elseif($check=2) { $htmlOutput=EOF your altenate html here EOF; } else { $htmlOutput=EOF your default html here EOF; } and then in your template code. $t-set_var(htmlOutput, $htmlOutput); Hope that's what you mean - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UtA5HpvrrTa6L5oRAr/TAJ0RBC3OzWQashl7fFc0e9wcrow6LgCdFjY1 xjqg6qEwLRKI+R4g0NWYRoM= =haum -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Calculate Directory Size
I'm sorry, but I won't be much help on the windows side of things, but for UNIX, the job is already done for you! There is a utility called 'du', which will tell you the disk usage of a file (or a folder and its contents). Specifically, you would want to use the -s flag to specify only to show the grand total, and not the size of each file... type 'du --help' or 'man du' at the command line to find out more. But an example: du -s -m /path/to/users/home/dir/ that will tell you in MB how much disk space they are using. Careful though, this is checking all their files recursively, so this can get cpu/hdd intense if you are using it for lots of users. My advice would be to run your script when there is a low load on the server. I hope that helps get you started. Jeff Simon H [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On advice, I've moved this from the Pear list. I have a problem...hopefully someone can help, because I've no idea where to even start! I have a user database, with a table called Users, and fields as so: (it would be cool if this would work on both Linux and Windows) - User DiskUsage (Mb) Quota (Mb) HomeDirectory - jim 50 100 F:\users\jim \\ In Windows jim 50 100 /users/jim \\ In Linux - The database wouldn't be shared between Windows and Linux, just 1 or the other. What I would like to be able to do is, press a button on a php page, and scan the (MySQL or ODBC through Pear DB) database, and for each user, calculate the size of their HomeDirectory, and Update the DiskUsage in the DB accordingly. I'm wondering tho how this would work with say 1000's of users each with several hundred Mb's or even several Gb's each. The users will have subfolders too, so the function would have to recurse the dirs, if possible. Is this even possible with PHP? I appreciate any help I can get on this, because its waay beyond me presently. Thanks Simon H -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Changeing Dates.
I have had no luck changing: 20020124020555 into 24 01 2002 @ 0205h 55s Can anyone put some light on this, I'm going nuts Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012
Re: [PHP] Changeing Dates.
Hi, provided that your initial string will always be in the same format (same # of numbers) I would use the substr function. substr(string, start, [length]) Ex: $mystring = 20020124020555; $year = substr($mystring,0,4); $month = substr($mystring,4,2); $day = substr($mystring,6,2); etc... Hope this helps. Jeff - Original Message - From: Philip J. Newman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 26, 2002 8:35 AM Subject: [PHP] Changeing Dates. I have had no luck changing: 20020124020555 into 24 01 2002 @ 0205h 55s Can anyone put some light on this, I'm going nuts Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re:[PHP] Changeing Dates.
function ChangeDate ($date) { $day=substr($date,6,2); //get the day $month=substr($date,4,2); //get the month $year=substr($date,0,4); //get the year $time=substr($date,8,4); //get the time $secs=substr($date,12,2); //get the seconds $ret=$day $month $year @ $time h $secs s; //var to be returned return ret; } This funcion gets the date in the format you have and converts into a string the way you want. I hope this help. Rafael Perazzo Philip J. Newman [EMAIL PROTECTED] wrote on 26/01/02 14:35:30: I have had no luck changing: 20020124020555 into 24 01 2002 @ 0205h 55s Can anyone put some light on this, I'm going nuts Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012 _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variables Limit
Is there any limit on the amount of variables that you can use? I can't say for certain as I don't know the insides of PHP *that* well...but I would guess your limitation on variables would be based on your server/user memory allowances and/or your memory limitations for PHP scripts. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Javascript Parser?
hi, is there any site from where i can get the php scripts which can parse the javascript or at lest document.write(ln) part into php echo variable so that i dont need to implement javascript in my web documents(i have some documents writen in javascript so that i can insert them in any doc but now im moving from javascript to php.) thanks in advance. saif -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Javascript Parser?
I'm not entirely sure I understand your question. Are you asking if there's an easy way to convert programs from JavaScript to PHP? saif wrote: hi, is there any site from where i can get the php scripts which can parse the javascript or at lest document.write(ln) part into php echo variable so that i dont need to implement javascript in my web documents(i have some documents writen in javascript so that i can insert them in any doc but now im moving from javascript to php.) thanks in advance. saif -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] I'm not sure how to do some simple code...
Have a look around: http://www.php.net/strip_tags Regarding simple matches, consider: http://uk.php.net/stristr And who knows, maybe you want: http://us.php.net/htmlspecialchars Learn about if/else: http://au.php.net/else Regards, Philip Olson On Fri, 25 Jan 2002, Leif K-Brooks wrote: I know this is probably a stupid question, but how do I make it so that if a string contains the word script (I'm banning javascript) it does something? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re:[PHP] Changeing Dates.
Or if you are retrieving the data from a database, use the SQL Date-Time functions (RTFM). =dn - Original Message - From: Rafael Perazzo B Mota [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 26 January 2002 16:38 Subject: [PHP] Re:[PHP] Changeing Dates. function ChangeDate ($date) { $day=substr($date,6,2); //get the day $month=substr($date,4,2); //get the month $year=substr($date,0,4); //get the year $time=substr($date,8,4); //get the time $secs=substr($date,12,2); //get the seconds $ret=$day $month $year @ $time h $secs s; //var to be returned return ret; } This funcion gets the date in the format you have and converts into a string the way you want. I hope this help. Rafael Perazzo Philip J. Newman [EMAIL PROTECTED] wrote on 26/01/02 14:35:30: I have had no luck changing: 20020124020555 into 24 01 2002 @ 0205h 55s Can anyone put some light on this, I'm going nuts Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012 _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] getenv() replacement when running as ISAPI ???
Hi there! Anybody knows a replacement for the built-in getenv()-function since it's not supported when running as an ISAPI-module under Internet Information Server 5.0 on Windows 2000 Professional (well, at least according to the manual). I've created a small counter that looks up the user's IP in a database in order to prevent duplicate hits when user is reloding the page and to track how many users are currently online. Suggestions welcome BTW, this is the code I'm using now (temporarily running the CGI version): === CUT HERE === // ... // Get user's IP and user agent (-- problem arises here --) $ip = ip2long(($tmp = getenv(HTTP_X_FORWARD_FOR)) ? $tmp : getenv(REMOTE_ADDR)); // -- and here -- $useragent = getenv(HTTP_USER_AGENT); // Check if visit already counted $id = 0; $counted = false; $r = mysql_query(SELECT visitor.id, visitor.ip, visitor.useragent, visits.timestamp FROM visitor, visits WHERE visitor.id = visits.visitor_id ORDER BY visitor.id DESC); // ... === CUT HERE === Christian Blichmann _ don't hesitate - email me with your thoughts: e-mail: [EMAIL PROTECTED] - please remove the .nospam from address. _ do you want to know more? web:http://www.blichmann.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Error: symbol _erealloc not found, PHP 4.0.6 under Solaris/Sparc
When trying to load Zend optimizer, the following error gets logged: Failed loading /var/www/lib/ZendOptimizer.so: ld.so.1: \ /opt/apache/bin/httpd: fatal: relocation error: file \ /var/www/lib/ZendOptimizer.so: symbol _erealloc: referenced \ symbol not found It seems from whatever little bits I could find on the Net, that the _erealloc symbol should be defined in the PHP itself. The PHP is installed as a module with Apache 1.3.22, compiled from sources, and is (otherwise) working perfectly fine. Any ideas on how to overcome this problem? Many thanks, -- Arcady Genkin Don't read everything you believe. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variables Limit
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Philip J. Newman blurted Is there any limit on the amount of variables that you can use? Well I certainly agree with Craig, but I'm interested to know why you ask? Is it just idle curiosity or some interesting project you're involved in? - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UvbrHpvrrTa6L5oRAtrWAJwLocc8/xRHK5kTN2S1HY3BXmQ2NQCdELrK FfZO6YoOZUEXonb6fNz3Z10= =wuoa -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] using a text file for variables in a form?
The HTML would be having problems because PHP would compile this: -- ? print 'INPUT TYPE=TEXT NAME=savings VALUE=' . $data[SAVINGS] . '; ? -- as: -- INPUT TYPE=TEXT NAME=savings VALUE=' -- Note VALUE's quotes: and '. Try with this: -- ? print 'INPUT TYPE=TEXT NAME=savings VALUE=' . $data[SAVINGS] . ''; ? -- Alexis N. Mueller [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dan, Thanks for replying so fast.. I tried it out right away. The script part of it didn't seem to give me much grief, however the html part of it seems to be having issues with the combination of single quotes (') and double qouotes (), or maybe it's the order, or a linebreak in the email... i don't know... ? print 'INPUT TYPE=TEXT NAME=savings VALUE=' . $data[SAVINGS] . '; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variables Limit
I have to exchage over 304 different names, codes, and dates ... - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 27, 2002 7:35 AM Subject: Re: [PHP] Variables Limit -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Philip J. Newman blurted Is there any limit on the amount of variables that you can use? Well I certainly agree with Craig, but I'm interested to know why you ask? Is it just idle curiosity or some interesting project you're involved in? - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UvbrHpvrrTa6L5oRAtrWAJwLocc8/xRHK5kTN2S1HY3BXmQ2NQCdELrK FfZO6YoOZUEXonb6fNz3Z10= =wuoa -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variables Limit
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Philip J. Newman blurted I have to exchage over 304 different names, codes, and dates ... 305? :-) Doesn't sound like it would be a problem. - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UwiwHpvrrTa6L5oRAkQrAJ492AZqZdf03jBAWSgw+AF+um3PFwCglfGg kRF7wnfQD7eICNfD+siLqLw= =Y3QF -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variables Limit
Unless your getting the values through a POST or a GET...both of these have limitesi forget what it is...maybe 1024 bytes? you'd jave to read the http rfc ~kurth On Sat, 2002-01-26 at 14:51, Nick Wilson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Philip J. Newman blurted I have to exchage over 304 different names, codes, and dates ... 305? :-) Doesn't sound like it would be a problem. - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UwiwHpvrrTa6L5oRAkQrAJ492AZqZdf03jBAWSgw+AF+um3PFwCglfGg kRF7wnfQD7eICNfD+siLqLw= =Y3QF -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variables Limit
cool - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: PHP-General [EMAIL PROTECTED] Sent: Sunday, January 27, 2002 8:51 AM Subject: Re: [PHP] Variables Limit -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Philip J. Newman blurted I have to exchage over 304 different names, codes, and dates ... 305? :-) Doesn't sound like it would be a problem. - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UwiwHpvrrTa6L5oRAkQrAJ492AZqZdf03jBAWSgw+AF+um3PFwCglfGg kRF7wnfQD7eICNfD+siLqLw= =Y3QF -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Any Ideas
Any Ideas how I can remove !@#$%^*()_+=-';:/.,? charactors from a string? Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012
[PHP] Re: Any Ideas
I'm guessing something along the lines of: -- $string=str_replace(!,,$string); $string=str_replace(@,,$string); $string=str_replace(#,,$string); $string=str_replace($,,$string); $string=str_replace(%,,$string); $string=str_replace(^,,$string); -- etc. Philip J. Newman [EMAIL PROTECTED] wrote in message 003d01c1a6a5$fa7d60e0$0401a8c0@philip">news:003d01c1a6a5$fa7d60e0$0401a8c0@philip... Any Ideas how I can remove !@#$%^*()_+=-';:/.,? charactors from a string? Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Printing JPEG images generated with ImageJPEG with IE/WIN
Hm, it could be that IE tries to reload the picture (which isn't there anymore because the form-data has been expired). Perhaps saving the picture temporarly on the server will prevent the problem. That could be what is happening. I'm generating data for students to analyze on one page with the hidden form and generating a graph of the data with the next page. The only thing generated is the image. If I date/time stamp the image file I could serve that up on the next page...it would be good to get the right graph to the right student. Might be worth a try. To answer my own post. That works, i.e. creating a jpeg file and then accessing in the next php page. I end up with extra image files created for each student/access but a cron entry should get rid of them...and they aren't all that big. Extra flexibility with a html page instead of just the image. Haven't tested it with Win IE yet though...leave that for Monday David -- David Bourne OUHSC College of Pharmacy [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variables Limit
Philip J. Newman wrote: I have to exchage over 304 different names, codes, and dates ... Instead of hundreds of discrete variables, would you not be better served by dividing them up into arrays of some sort? instead of $name1, $name2, etc $name[1] $name[2] or $name[first] $name[last] and so on... I'd think memory usage would be about the same, but if there was some limit on the number of discrete simultaneous variable names, this should get around that. Michael Kimsal http://www.tapinternet.com/php/ PHP Training Courses 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Passing objects
Dean Householder wrote: How can you pass an object from one page to another? Is there any convenient way to do it with PHP? Dean You've had some suggestions to use 'sessions' but you can't really pass an object between pages with sessions - UNLESS... Unless both pages have the class definition for that object. Only the values for the object would be passed, not the methods of the class which the object is based on. Basically, make sure the class the object is based on is used in any page you want to use that object in. Good luck... Michael Kimsal http://www.tapinternet.com/php/ PHP Training Courses 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DB] PHP + Postgresql + Linux = Frustration
Mike, This can be a bit frustrating, but all in all it's not too bad. I usually make up my own configuration file just to avoid re-typing everything, because I generally don't get it right the first time. I then chmod +x them so that they will execute. They're quite simple, just scripts that call configure with all the various parameters. I arrived at the choices below after reading the LAMP documents, the Soothingly Seamless Installation of Linux, Apache, MySQL and PHP and the various configuration options for each of MySQL, PHP, PostgreSQL and Apache. Before building from source I tried working with RPMs on my older Red Hat systems, and with dselect on two Debian boxes. These are all well-debugged software packages, and aside from taking some time to compile on the oldest box, a P 133, everything went smoothly. Here's the one for PostgreSQL, locating PostgreSQL in a very non-standard location. Can't remember why I wanted w-odbc. ---start of script -- #!/bin/sh ./configure \ --with-prefix=/drv2/bin/pgsql \ --with-odbc -- end of script For Apache I wanted a whole bunch of stuff, thus enable-shared=max. If I remember correctly that let me load all the modules dynamically. ---start of script -- #!/bin/sh ./configure \ --with-layout=Apache\ --prefix=/usr/local/apache \ --enable-shared=max -end of script --- And finally PHP. with apxs allows Apache to load PHP dynamically, and the parameter has to be specific. with-mysql points to my non-standard location of mysql, similarly I told it explicity where PostgreSQL was installed. --- start of script #! /bin/sh ./configure \ --with-apxs=/usr/local/apache/bin/apxs \ --with-mysql=/drv2/bin/mysql \ --with-pgsql=/usr/local/pgsql \ --enable-track-vars - end of script Pay attention to the line in the PHP INSTALL doc refers to relocating php-ini-dist (think that's the name) and to the changes you have to make to Apache's httpd.conf file. When all configuring, making and installing is done, you may get an error from Apache that it can't find the .so modules for PostgreSQL (and in my case, MySQL). If so, locate the modules and edit /etc/ld.so.conf, adding the paths to these modules. On my system I added these two lines, /usr/local/pgsql /drv2/bin/mysql/lib/mysql Save the file and run ldconfig. Apache should then run OK. As to your question Why doesn't PHP have support for PostgreSQL built in .., have a look at all the different databases PHP supports and consider how immense the program would be if everything was compiled in by default. Hope this is helpful. If you have more problems, there is a php-install list which deals with specific installation problems. Regards - Miles Thompson PS These 4 programs were my first experience building on Linux systems, and initially it was a bit daunting. I hope you find this helpful. /mt At 12:15 PM 1/26/2002 -0500, you wrote: Hello, I am rather new to Linux but an old timer at software development. I am investigating alternate platforms for future development for my company. Linux is at the top of the list. I am trying to get a server setup with a db (PostgreSQL), web server (Apache), and some sort of web scripting language (PHP). I can not make everything work together. PHP4 won't work out-of-the-box with PostgreSQL because PHP doesn't have support for PosgreSQL built in at compile time (why not just build everything into when it was initially built?). So I get the sources to PHP and try to build. However, it wants the sources (header files) for Apache. At this point I don't want to go any further. Eventually, I'll probably need the sources for everything. Is there an easy way to do this sort of stuff on Linux or is it better to just buy off the shelf products that work? Thanks, Mike -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] start
Hello, im introducing to php and i need to know (under windows98) if are free /and where can i download it/ the software needed to program and test php4 Thanks everybody, Pablo.
Re: [PHP] start
On Fri, 3 Jan 1997, El Ucalito wrote: im introducing to php and i need to know (under windows98) if are free /and where can i download it/ the software needed to program and test php4 www.php.net will answer all. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Hints Feedback
I know this isn't the right place to add this, but can someone check this out ... http://www.philipsdomain.com/hyperlinks/search.php ... and gimme some tips of what I could do ... Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012
RE: [PHP] Variables Limit
Check out arrays... especially if you're going to be dealing with 304 individual variables. your code will be MUCH happier :) -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED]] Subject: Re: [PHP] Variables Limit I have to exchage over 304 different names, codes, and dates ... - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 27, 2002 7:35 AM Subject: Re: [PHP] Variables Limit -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Philip J. Newman blurted Is there any limit on the amount of variables that you can use? Well I certainly agree with Craig, but I'm interested to know why you ask? Is it just idle curiosity or some interesting project you're involved in? - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UvbrHpvrrTa6L5oRAtrWAJwLocc8/xRHK5kTN2S1HY3BXmQ2NQCdELrK FfZO6YoOZUEXonb6fNz3Z10= =wuoa -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP and XHTML
When I have an ? xml version=1.0 ? inside my php script it wont work since php parses it as php code. Will short_open_tag = Off solve it? I would really like to use ? ? for the rest of my php code...there must be a better solution than Short_open_tag regards, Cyth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP and XHTML
When I have an ? xml version=1.0 ? inside my php script it wont work since php parses it as php code. Will short_open_tag = Off solve it? I would really like to use ? ? for the rest of my php code...there must be a better solution than Short_open_tag regards, Cyth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Hints Feedback
Philip J. Newman wrote: I know this isn't the right place to add this, but can someone check this out ... http://www.philipsdomain.com/hyperlinks/search.php ... and gimme some tips of what I could do ... What are you asking for? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP and XHTML
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then ,,, blurted When I have an ? xml version=1.0 ? inside my php script it wont work since php parses it as php code. Will short_open_tag = Off solve it? I would really like to use ? ? for the rest of my php code...there must be a better solution than Short_open_tag Hmm... I had that problem too, the only I solved it was by using templates. I know that may not help, sorry, just wanted to let you know that it can be done. I'll follow this thread closely as *proper* XHTML is a subject close to my heart :) - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UzTuHpvrrTa6L5oRAku3AKCJ4SdFzo9g2lcoeFwY6uJ/tkOzQgCgpNiq Lr+KMndWgO4PF/fkpmcR8G8= =LNVw -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Hints Feedback
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Michael Kimsal blurted What are you asking for? Yeah, a little detail please :) I don't even wana click it unless I know why, but then I'm just paranoid! - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UzXmHpvrrTa6L5oRApumAKCo4NTiFZtX5z3zdXy+qgWplO4u3wCgrudv /J9lB1J6bRmqeN3NXtDsMr0= =zVmC -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP and XHTML
Hi. Have you tried something like: ? echo(? xml version=\1.0\ ?\n); ? I've not tried using xml php, but that may work... Jeff - Original Message - From: Frans Englich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 26, 2002 2:53 PM Subject: [PHP] PHP and XHTML When I have an ? xml version=1.0 ? inside my php script it wont work since php parses it as php code. Will short_open_tag = Off solve it? I would really like to use ? ? for the rest of my php code...there must be a better solution than Short_open_tag regards, Cyth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP and XHTML
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Jeff Sheltren blurted Hi. Have you tried something like: ? echo(? xml version=\1.0\ ?\n); ? *Good* idea, tell us if it works! - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UzhFHpvrrTa6L5oRAtEiAJ0b1D5tHcQMSpWCitYvIbmiHpkvpgCgkONa lBx9rwVVindWYbIifw4EyVs= =WHxj -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Viral Marketing PHP (was Re: [PHP] Computer Science and PHP)
Hello, Dl Neil wrote: One good point about what you said is that one budgetless what to promote PHP is to use 'viral marketing'. Viral marketing is a way to market something by using a technique that spreads by itself, ie, no additional effort or money needed to be spent by the originator to have the notice of what you want to market spread like crazy. ... sort what ideas can become viral. With that topic in the mind, if you ever figure a viral idea to promote PHP, just share it here to prove the concept as well! :-) I had intended that the 'institutional approach' be seen as the seeds of a viral marketing campaign. If students learn the tool, when they 'go out to work' they want to use it. Even if the student is a 'hobbyist' then it still spreads the 'word' around... That is not viral enough because it is not smooth. When it is not smooth, not only it will propagate slowly but also it may stop propagating at all because word of mouth is not always convincing. To make it work smoothly it should not be hard to convince anybody that PHP is a good idea. Your point earlier, if statistics say x million dynamic web sites are held together by PHP, IT managers/decision makers tend to feel they should take notice, eg Apache and the Netcraft surveys. The same will apply to PHP, numbers need to build to some 'critical mass' for corporate credibility to follow (as wrong as that sounds). Yes, but you only establish credibility when you manage to put your arguments in favour of PHP in the mouths of opinion makers. Statistics of PHP usage in the PHP site will never be credible enough. It is like when parents tell everybody how smart their kids are, see what I mean? How to get PHP into the institutions? You'd think it would be easy, wouldn't you - it's 'free', and that sounds Being 'free' may be good for budgetless individuals but is the wrong argument for institutions and companies in particular. You need to pick up other argument. great! However you need competent/trained teachers/training staff. You need teaching materials and supporting text books. You need sample exercises and databases. Look at what SuSE are doing with email servers (etc) and RedHat with Linux distributions. Perhaps a distribution of LAMPS or the 'PHP Triad', especially configured for an educational environment could be considered? Finally you need people to be convinced that there's a demand for the teaching, and conversely students convinced that it is a valuable skill to acquire... That is the core of the problem. You can only demonstrate there is demand for teaching if you spread that there is demand for qualified professionals. The PHP situation could be improved if there was an officially certificated training, like some Linux distributions have and even MySQL. The effect of spreading about official certification is that it passes a good impression to those that are not aware that Linux and MySQL is something being taken seriously to the point of having official certifications like for certified Microsoft and Sun Java trainings. Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP and XHTML
This works just perfectly: ?echo(?xml version=\1.0\?); ? regards, Cyth --- -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Jeff Sheltren blurted Hi. Have you tried something like: ? echo(? xml version=\1.0\ ?\n); ? *Good* idea, tell us if it works! - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UzhFHpvrrTa6L5oRAtEiAJ0b1D5tHcQMSpWCitYvIbmiHpkvpgCgkONa lBx9rwVVindWYbIifw4EyVs= =WHxj -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] File open with 4.1
I'm now using $S_REQUEST to pass things on a win32 with apache and php4.1. In touching stuff up on the isp however, things are incompatible. I have gone to using $HTTP_POST_VAR, etc. instead, so when the isp goes to 4.1 we only need to replace them with $_REQUEST. Is that the way to go? Now a new thing. I have gotten to this point where everything is on the page but it doesn't open the file. Is there some more conversion needed re 4.1? It would be nice to know just yes or no. tks... $textfile = fopen($filename,'w'); if(!($textfile)) { print(The File could not be opened.); exit; } if($text ) // write a line to the file { fputs($textfile, (stripslashes($text))); } fclose($textfile); Floyd -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: getting a LAMP job in this economy
Hello, Vincent Stoessel wrote: On another list that I am on someone made this very bold statement: I've seen a lot of jobs for ColdFusion Oracle or MS SQL server experience combinations. Don't let anyone fool you, PHP/MySQL is not going to land you a job [;)] now, as someone that was making avery good living doing Linux based web application development last year and now among the jobless I am beginning to question the validity of having all of my eggs in the LAMP (linux apache mysql php) basket. I just recently built a NT4 to do some win based development on. I still have not installed any development enviroment cause it just feels so alien. Has anyone else out there feeling the pressure of going to the win32 side to pay the bills. Thoughts? Since the massive bankrupcy of many Internet companies, LAMP is no longer so much on demand. What happened is that most of those companies were technologically aware of the choices and were choosing LAMP products because they have proven suitability for Internet development and besides that they are inexpensive. Many of the technology dependent companies that survived do not depend on the Internet. Often Web development is for internal consumption. Many of those companies used Microsoft products. People in charge of those companies often only know about Microsoft's and other comercial products that are well marketed. So, it is very hard to penetrate in those companies with LAMP products. There are certainly a reasonable number of companies that use LAMP products, but they do it mostly for economical reasons. Therefore they don't have a great budget to pay good salaries either. For bigger companies, one of the main limitations of PHP and other Open Source products is that, unlike commercial competitor products, they do not add as much business value to somebody selling PHP solutions because PHP costs nothing so there is no profit margin to earn by the people that want to sell it even as a part of something else. PHP needs to be better marketed or else it will fade from the well paid job world. As I said, Java jobs are much more well paid, not only because Java is harder to program and requires better prepared developers, but also because Sun marketed Java so well that it was created a demand for Java projects that nobody from the PHP world is doing anything like that. Despite PHP can be used for more than just Web applications, many PHP developers are not making an effort to advertise it for more than just Web development. This needs to be changed, because the world has changed and those that don't adapt will not survive. Java was also advertised initially for browser applets but Sun had to adapt the strategy to the needs of the real world, they advertised and made it suitable for mobile computing, server side Web scripting and Web services. Mobile computing is a closed market. Server side scripting is the only thing that PHP is advertised for but its position is seriously threatned. Web services, PHP is not yet quite there nor there is a perspective if and when it will ever be. I don't want to be pessimistic, but in a couple of weeks .NET will be officially released as the big thing that Microsoft will make it echo everywhere with their raw marketing power. ASP.NET is catching up on the huge delay that it used to had compared to PHP and other alternatives. Web Services will be even more hyped than today. Microsoft will try to make it evident that .NET is the most profitable way to make money from Web development but only using .NET. It does not matter how much of that will be effectively true. What matters is many people that today still fall for LAMP/WAMP will reconsider and move to .NET world because they will be convinced that is where they can make money unlike with LAMP. So, what do you do? For now, I just advise you to stay where you are if you can live from what you are doing because we have to see how much of this will become true. Anyway, I am afraid that part of it will become true as advertised. If you want to stick with LAMP/WAMP, you'd better check it out to see if you can developed what will be in demand. Here some buzzwords to pay more attention: Web services, SOAP, WSDL, UDDI. Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Get FILE NAME and EXTENSION??
Hi everyone! I'm trying to put file names into variables which later I put into my DB (MySQL) as text (only the filename and the extension). I tried to use the upload format form before: form ENCTYPE=\multipart/form-data\ ... input type = FILE name =\file_name\ . When I retrived the value of the variables, I did not get the FILE NAME and the file extension. What I got is all the path of the file and the file name changed into .TMP or some sort. How do I retrived file names and it's extension in this situation? note: The original file extensions that I want to get are mostly .jpg or .gif. thanks for reviewing my email. regards, Dani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Any Ideas
Or do it all in one line: $string = ereg_replace('[!@#$%^*()_+=-';:/.,?]', '', $string); If you want to remove non-alphanumeric characters from a string, you can do: $string = ereg_replace('[^[:alnum:]]', '', $string); Perl-compatible regular expressions would work as well, and be slightly faster. For more info, see: http://www.php.net/manual/en/function.ereg.php http://www.php.net/manual/en/ref.regex.php http://www.php.net/manual/en/ref.pcre.php -steve At 12:21 PM -0800 1/26/02, qartis [EMAIL PROTECTED] wrote: I'm guessing something along the lines of: -- $string=str_replace(!,,$string); $string=str_replace(@,,$string); $string=str_replace(#,,$string); $string=str_replace($,,$string); $string=str_replace(%,,$string); $string=str_replace(^,,$string); -- etc. Philip J. Newman [EMAIL PROTECTED] wrote in message 003d01c1a6a5$fa7d60e0$0401a8c0@philip">news:003d01c1a6a5$fa7d60e0$0401a8c0@philip... Any Ideas how I can remove !@#$%^*()_+=-';:/.,? charactors from a string? Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012 -- ++ | Steve Edberg [EMAIL PROTECTED] | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | ++ | Restriction of free thought and free speech is the most dangerous of | | all subversions. It is the one un-American act that could most easily | | defeat us.| | - Supreme Court Justice (1939-1975) William O. Douglas | ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problems with Parent Child References
I've designed an architecture in PHP which is dependent on a class hierarchy which has a parent class with a member variable which is a child object. That child object contains a reference back to the parent. The problem I'm running into is changes to the parent's member variables are not reflected in the child's reference to the parent. Let me use a code example to illustrate my point. Class Parent { var $sTest = apple; var $pChild; function Parent() { $this-pChild = new Child(); $this-pChild-SetParent($this); } } Class Child { var $pParent; function SetParent($pParent) { $this-pParent = $pParent; } function PrintParentData() { echo Parents Test data: .$this-pParent-sTest.Br\n; } } $pParent = new Parent(); $pParent-sTest = orange; echo pParent-sTest = .$pParent-sTest.br\n; $pParent-pChild-PrintParentData(); // Prints: // pParent-sTest = orange // Parents Test data: apple // Instead of : // pParent-sTest = orange // Parents Test data: orange I've also tried changing the first line of the Parent constructor to : $this-pChild = new Child(); I think I've coded this correctly as per the docs on references. I'm using PHP4.1.1. My conclusions are : 1. This is not possible in PHP due to safety mechanisms built into the language to safeguard against circular references (and infinite recursion). 2. I'm doing something wrong. Thanks to anyone willing to take a stab... Kevin Morris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Control Panel
Hi Guys, I want a affordable and the best control panel for my website. Though i can make it myself but it make some time to do that. Do any of you guys and gals know about this do let me know. Looking forward for yours earliest reponse. karthikeyan.
php-general Digest 27 Jan 2002 02:33:30 -0000 Issue 1135
php-general Digest 27 Jan 2002 02:33:30 - Issue 1135 Topics (messages 82211 through 82262): Banner agencies - OT 82211 by: Boaz Yahav Using HTTP Post variables with multiple domains and scripts 82212 by: Dreamriver.com Re: break statement usage 82213 by: DL Neil 82215 by: Nick Wilson Calculate Directory Size 82214 by: Simon H 82216 by: Alan McFarlane 82221 by: Jeff Sheltren phplib 82217 by: Kunal Jhunjhunwala 82218 by: Nick Wilson 82220 by: Kunal Jhunjhunwala Variables Limit 82219 by: Philip J. Newman 82225 by: Craig Vincent 82232 by: Nick Wilson 82234 by: Philip J. Newman 82235 by: Nick Wilson 82236 by: Kurth Bemis 82237 by: Philip J. Newman 82241 by: Michael Kimsal 82247 by: scott Changeing Dates. 8 by: Philip J. Newman 82223 by: Jeff Sheltren Re:[PHP] Changeing Dates. 82224 by: Rafael Perazzo B Mota 82229 by: DL Neil Javascript Parser? 82226 by: saif 82227 by: Richard S. Crawford Re: I'm not sure how to do some simple code... 82228 by: Philip Olson getenv() replacement when running as ISAPI ??? 82230 by: Christian Blichmann Error: symbol _erealloc not found, PHP 4.0.6 under Solaris/Sparc 82231 by: Arcady Genkin Re: using a text file for variables in a form? 82233 by: qartis Any Ideas 82238 by: Philip J. Newman 82239 by: qartis 82260 by: Steve Edberg Re: Printing JPEG images generated with ImageJPEG with IE/WIN 82240 by: David_Bourne Re: Passing objects 82242 by: Michael Kimsal Re: [PHP-DB] PHP + Postgresql + Linux = Frustration 82243 by: Miles Thompson start 82244 by: El Ucalito 82245 by: Duncan Hill Hints Feedback 82246 by: Philip J. Newman 82250 by: Michael Kimsal 82252 by: Nick Wilson PHP and XHTML 82248 by: ,,, 82249 by: Frans Englich 82251 by: Nick Wilson 82253 by: Jeff Sheltren 82254 by: Nick Wilson 82256 by: Frans Englich Re: Viral Marketing PHP (was Re: [PHP] Computer Science and PHP) 82255 by: Manuel Lemos File open with 4.1 82257 by: Floyd Baker Re: getting a LAMP job in this economy 82258 by: Manuel Lemos Get FILE NAME and EXTENSION?? 82259 by: Dani Problems with Parent Child References 82261 by: Kevin Morris Control Panel 82262 by: karthikeyan 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--- Hi Most of us that have sites use some kind of ad agencies. It's small change but it helps. In recent months, many ad agencies closed down, many stopped paying etc... I was wondering if anyone is happy with his ad agency. thanks berber ---End Message--- ---BeginMessage--- Hi Folks, I use the regular form POST method to send variables from Domain A to Domain B. On domain B I run a short script. The script does it's thing and then sends the posted variables back to Domain A with header(Location: http://www.domainA.com/folder/script.php;); The problem is that the variables disappear at this point - after the domain B script is run - and do not appear to go any further. I have tried this code, which works: header(Location: http://www.domainA.com/folder/script.php?var1=foovar2=bar;); ... but for security reasons I should not use the GET method for passing the originally posted variables. I do not want to stop the form post process, I just want to run my own script routine and then continue with the original form request. How do I accomplish the posting of variables from Domain A to Domain B and back again to Domain A without reposting them in an additional form post submission? Thanks! Kind Regards, Richard Creech [EMAIL PROTECTED] Phone 250.744.3350 Pacific Time, Canada Easily create your own Yellow Pages with phpYellow Pages http://www.dreamriver.com ---End Message--- ---BeginMessage--- Private note: heard the one about throwing stones and living in glass houses? tip Try to keep your posts a little shorter if only for the sake of the dialup users ;) /tip this said by someone who: - pushes MIME messages into a discussion list/newsgroup (instead of simple text format which is almost-universally preferred/required/recommended on lists), - has a (unnecessary) PGP addendum on every msg sent, - frequently ends up sending msgs which open as blank screens, until certain email client users make the extra effort of opening an attachment (a virus risk in most 'warnings/good practices' descriptions) but whose contributions are often much appreciated! Regards, =dn (whose 'crimes'
Re: [PHP] Get FILE NAME and EXTENSION??
On Sunday 27 January 2002 11:10, Dani wrote: Hi everyone! I'm trying to put file names into variables which later I put into my DB (MySQL) as text (only the filename and the extension). I tried to use the upload format form before: form ENCTYPE=\multipart/form-data\ ... input type = FILE name =\file_name\ . When I retrived the value of the variables, I did not get the FILE NAME and the file extension. What I got is all the path of the file and the file name changed into .TMP or some sort. How do I retrived file names and it's extension in this situation? Please read the manual chapter Handling file uploads -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Are you sure you're not an encyclopedia salesman? No, Ma'am. Just a burglar, come to ransack the flat. -- Monty Python */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Control Panel
Spare us1 Miles Thompson On Saturday 26 January 2002 09:39 pm, karthikeyan wrote: Hi Guys, I want a affordable and the best control panel for my website. Though i can make it myself but it make some time to do that. Do any of you guys and gals know about this do let me know. Looking forward for yours earliest reponse. karthikeyan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP and XHTML
Hi use single quotes and it is simpler echo '?xml version=1.0?'; Tom At 09:40 27/01/02, Frans Englich wrote: This works just perfectly: ?echo(?xml version=\1.0\?); ? regards, Cyth --- -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Jeff Sheltren blurted Hi. Have you tried something like: ? echo(? xml version=\1.0\ ?\n); ? *Good* idea, tell us if it works! - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UzhFHpvrrTa6L5oRAtEiAJ0b1D5tHcQMSpWCitYvIbmiHpkvpgCgkONa lBx9rwVVindWYbIifw4EyVs= =WHxj -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Any Ideas
Regula $string=preg_replace(/\W/,,$string); \W = non-word characters in perl regular expressions. Word characters are 0-9, a-z, A-Z, and _. To kill _ as well, do: $string=preg_replace(/[_\W]/,,$string); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]. net] On Behalf Of qartis Sent: Saturday, January 26, 2002 3:22 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Any Ideas I'm guessing something along the lines of: -- $string=str_replace(!,,$string); $string=str_replace(@,,$string); $string=str_replace(#,,$string); $string=str_replace($,,$string); $string=str_replace(%,,$string); $string=str_replace(^,,$string); -- etc. Philip J. Newman [EMAIL PROTECTED] wrote in message 003d01c1a6a5$fa7d60e0$0401a8c0@philip">news:003d01c1a6a5$fa7d60e0$0401a8c0@philip... Any Ideas how I can remove !@#$%^*()_+=-';:/.,? charactors from a string? Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Arrrr The Space is gone.
$q=preg_replace(/[_\W]/,,$q); I have this to remove all the bad things, but it takes out the space to ... )o; why? Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012
[PHP] Re: getting a LAMP job in this economy
Manuel Lemos wrote: You seem to be just a bit 'doom and gloom'. Perhaps you're just in 'realist' mode, but I don't think it's a 'fait accomplit' just yet. Since the massive bankrupcy of many Internet companies, LAMP is no longer so much on demand. What happened is that most of those companies were technologically aware of the choices and were choosing LAMP products because they have proven suitability for Internet development and besides that they are inexpensive. Many of the technology dependent companies that survived do not depend on the Internet. Often Web development is for internal consumption. Many of those companies used Microsoft products. People in charge of those companies often only know about Microsoft's and other comercial products that are well marketed. So, it is very hard to penetrate in those companies with LAMP products. There are certainly a reasonable number of companies that use LAMP products, but they do it mostly for economical reasons. Therefore they don't have a great budget to pay good salaries either. True to some extent, but its not always purely economic. There are real security threats in MS stuff (previous at least). Even if W2k and XP are 100% safe, their reputation preceeds them and it'll be a long time before MS overcomes that reputation. For bigger companies, one of the main limitations of PHP and other Open Source products is that, unlike commercial competitor products, they do not add as much business value to somebody selling PHP solutions because PHP costs nothing so there is no profit margin to earn by the people that want to sell it even as a part of something else. I somewhat need to take exception to this - I think. Perhaps this is just semantics, but people selling products are doing just that - selling products. Whatever they are based on is somewhat immaterial. I can't 'markup' PHP (a language) NOR can I 'mark up' Java (another language). People are building packages on top of Java and selling the packages. I'm not saying the underlying language is completely immaterial - there are pros and cons to Java, PHP, Perl and other languages. But simply because it's 'open source' doesn't mean you can't add business value in PHP solutions. It's hard, I think in part, because of the reputation PHP is getting in some circles. Many of the people evangelizing it don't know anything else, and simply extoll all the 'wonderful' virtues of it. No sarcasm meant - it's a great platform. But it has its limitations. When people with more experience come across PHP proponents, more often than not they get bombarded with half-truths and anti-MS stuff. There's always at least a grain of truth, but it's often not enough, or not presented properly. The fact is, most languages have these enthusiasts - it's a good thing to have them. However, other languages usually also have big marketing dollars behind them. Notice I said 'big. Other competing 'platforms' such as ihtml and htmlos are hardly even on anyone's radar because (1) they cost money and (2) they don't have enough marketing muscle to go up against MS, Allaire, Sun, etc.PHP AT LEAST has 'free' on its side. PHP needs to be better marketed or else it will fade from the well paid job world. As I said, Java jobs are much more well paid, not only because Java is harder to program and requires better prepared developers, but also because Sun marketed Java so well that it was created a demand for Java projects that nobody from the PHP world is doing anything like that. It's not that no one is doing anything like Java projects. We've done some immensely large projects in PHP (migrated from ASP no less) handling commerce transactions in excess of 7 figures per month. Needless to say, the client is happy, and they actually had a similar sized project done in Java with a large team of developers which completely and utterly flopped (only after the 30+ consultants had been paid for months of work which was simply shut down). People don't KNOW about what projects are going on, large OR small. I've asked repeatedly in the past for success stories (large and small) to register at phpshowcase.com, but I get barely one reply whenever I ask. Perhaps NO ONE is actually using it? I know that's not true, even though the successes are probably more often than not small ones. Someone able to get up a dynamic page in a few hours of poking around rather than shelling out for Access and slogging through ASP, for example. Not a big success, but the company gets to continue on with its plans - probably oblivious to the fact that PHP is being used. It just gets in and works (similar to the 'stealth' success of Linux in many organizations, I'd think). Despite PHP can be used for more than just Web applications, many PHP developers are not making an effort to advertise it for more than just Web development. This needs to be changed,
[PHP] Re: Arrrr The Space is gone.
In article 002801c1a6ed$1a9c10a0$0401a8c0@philip, [EMAIL PROTECTED] (Philip J. Newman) wrote: $q=preg replace(/[ \W]/,,$q); I have this to remove all the bad things, but it takes out the space to ... )o; why? There's a space in your character class, so of course it will be among the characters matched/replaced. But merely deleting it from the character class doesn't solve the problem either, since a space character also meets the criteria for not a word character (\W). If the objective is to strip all characters that are neither a space nor a word (a-zA-Z0-9_), then try: $q=preg replace(/[^ \w]/,,$q); -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Arrrr The Space is gone.
This returns an error $q=preg replace(/[^ \w]/,,$q); Parse error: parse error in d:\hosting\http\philipsdomain\config.php on line 41 Suggestions? - Original Message - From: CC Zona [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 27, 2002 6:15 PM Subject: [PHP] Re: A The Space is gone. In article 002801c1a6ed$1a9c10a0$0401a8c0@philip, [EMAIL PROTECTED] (Philip J. Newman) wrote: $q=preg replace(/[ \W]/,,$q); I have this to remove all the bad things, but it takes out the space to ... )o; why? There's a space in your character class, so of course it will be among the characters matched/replaced. But merely deleting it from the character class doesn't solve the problem either, since a space character also meets the criteria for not a word character (\W). If the objective is to strip all characters that are neither a space nor a word (a-zA-Z0-9_), then try: $q=preg replace(/[^ \w]/,,$q); -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Arrrr The Space is gone.
In article 004d01c1a6f2$cb909070$0401a8c0@philip, [EMAIL PROTECTED] (Philip J. Newman) wrote: This returns an error $q=preg replace(/[^ \w]/,,$q); Parse error: parse error in d:\hosting\http\philipsdomain\config.php on line 41 Suggestions? I think ezmlm must strip underscores from messages, 'cuz a lot of posts (though, oddly, not all...) seem to be missing them from otherwise valid/functioning code. The function is named preg_replace (an underscore between the words), not preg replace (with a space). -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] what's equivalent of DBI quote
Hi, Seems mysql_escape_string will just escape, seems like addslashes and quotemeta. quote in DBI will escape and quote if passed value is not an integer (don't know about float). Peter --- Reality is that which, when you stop believing in it, doesn't go away. -- Philip K. Dick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] On the fly unzipping
Hello, I was hopping that one of you would know how to setup a self-extracting php program. This is the story: I'd like to offer a zipped file for download. Someone unzips it on their PC and there find two files, extractor.php and some other file that php can unzip. They upload these two files to their server, direct their browser to extractor.php, enter some information, and extractor.php unzips the other file into multiple directories/files, each adjusted to the specifications set in extractor.php. I know there is a way for php to unzip files such as .elg, but how to do it, and if the server needs to be set up in some special format... I don't know. I've looked around on-line, but so far haven't found anything. Thanks for any input, Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP in the University and Corporation [was RE: [PHP] Computer Science and PHP]
Computer science is considered an engineering discipline in most institutions. And I think that's good... we need people out there to develop OS's, create database servers, etc. PHP can be effectively used in this curriculum, but C seems a lot more to the point. The place where PHP could (and should) make inroads is in the web development curriculum that is generally split off from the formal computer science programs. I think that split is a good thing even if it is made for the wrong reasons... and while one can quibble about real programmers and such, these programs that encompass web design, web mastering, systems admin and networking are the real ground for advancing PHP. Many institutions, like the one I teach for, are entrenched in ASP and Java because that is understood by administrators as a good thing to do and because it is often easier to find instructors with these skills (or at least the certifications). But there are inroads being made. I have typically taught web design, internet and networking. Now I finally am getting a chance to teach a PHP/MySQL class as part of the web development curriculum (finally as in we finally found good instructors to take the other courses so that I would have time). Also, these programs are typically staffed by a cadre of aduncts. If you have PHP skills and teaching skills and you can basically donate your time for the peanuts that are offered (and the fun of it), there is a place for YOU to help promote PHP. Someone else remarked that certifications would advance PHP. There is something to that, particularly in the corporate marketplace to USE it. More often, in my experience, PHP is slow to be adopted in the corporate environment because MS is so entrenched, and because MS' firm establishment on the desktop means hiring MS people, who naturally promote and hire other MS people, and administrators often equate using other technologies with abandoning their desktops. Certification has an equally negative aspect, though, unless stringently and particularly administered and granted, which would defeat the marketing ends. c -- Chris Lott http://www.chrislott.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: getting a LAMP job in this economy
It's hard, I think in part, because of the reputation PHP is getting in some circles. Many of the people evangelizing it don't know anything else, and simply extoll all the 'wonderful' virtues of it. YES! This poisoning of the well has happened and continues to happen. The problem is that being an evangelist is a wonderful thing-- but you have to be quite skilled at communication to be a successful one :) Otherwise the person attempting to spread the gospel simply becomes looked at as an annoyance or, worse, becomes marginalized. I have dealt with a lot of folks in companies who have a negative view of PHP, MySQL, Linux, BSD, etc. simply because they have had their intelligence insulted, or been irritated, or been completely confused, or been preached to one too many times by well-meaning proponents of Open Source solutions who are either unable to communicate or simply victim to their own enthusiasm. There is probably nothing that doesn't have an Open Source solution in the abstract sense-- but in the real world of existing systems, personnel, and politics, the best solution may not be technically the fastest or even the most stable. The right tool for the job is my motto, and that might mean SQL Server, it might mean MySQL. It might mean a Linux server, it might mean Win2K. There is no single panacea. c -- Chris Lott http://www.chrislott.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: getting a LAMP job in this economy
Chris Lott wrote: It's hard, I think in part, because of the reputation PHP is getting in some circles. Many of the people evangelizing it don't know anything else, and simply extoll all the 'wonderful' virtues of it. YES! This poisoning of the well has happened and continues to happen. The problem is that being an evangelist is a wonderful thing-- but you have to be quite skilled at communication to be a successful one :) Otherwise the person attempting to spread the gospel simply becomes looked at as an annoyance or, worse, becomes marginalized. I have dealt with a lot of folks in companies who have a negative view of PHP, MySQL, Linux, BSD, etc. simply because they have had their intelligence insulted, or been irritated, or been completely confused, or been preached to one too many times by well-meaning proponents of Open Source solutions who are either unable to communicate or simply victim to their own enthusiasm. Right on. It's doing far more damage than all the stuff MS, Sun, Allaire and others can conspire to throw at our community, imo. Perhaps we should get together on a 'PHP advocacy HOWTO' ? :) There is probably nothing that doesn't have an Open Source solution in the abstract sense-- but in the real world of existing systems, personnel, and politics, the best solution may not be technically the fastest or even the most stable. The right tool for the job is my motto, and that might mean SQL Server, it might mean MySQL. It might mean a Linux server, it might mean Win2K. There is no single panacea. Amen - except that you need to be able to discern WHY something is 'right'. If a consultant tells one of my clients that SQL Server is the way to go, I have to explain to my client (1) the benefits/drawbacks of SQL Server and (2) whatever other agenda that consultant may have. What's the 'best tool' for HIM/HER may not be for us. I've come across this more times than I care to recall. And yes, our recommendations are loaded towards what's best for us, no doubt, but we generally have price on our side to start with (lower or no licensing fees) and a satisfied clients who've 'taken the PHP plunge' before them, so they don't feel like they're the first ones trying this 'new fangled PHP stuff'. Michael Kimsal http://www.tapinternet.com/php PHP Training Courses 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: getting a LAMP job in this economy
I like this view. It's not so much a technology we're all speaking as much as a language. Computers are computers and while linux is fun and kick's ass sometimes you just need to get a job done. tools are tools and php rules until php rules! john l It's hard, I think in part, because of the reputation PHP is getting in some circles. Many of the people evangelizing it don't know anything else, and simply extoll all the 'wonderful' virtues of it. YES! This poisoning of the well has happened and continues to happen. The problem is that being an evangelist is a wonderful thing-- but you have to be quite skilled at communication to be a successful one :) Otherwise the person attempting to spread the gospel simply becomes looked at as an annoyance or, worse, becomes marginalized. I have dealt with a lot of folks in companies who have a negative view of PHP, MySQL, Linux, BSD, etc. simply because they have had their intelligence insulted, or been irritated, or been completely confused, or been preached to one too many times by well-meaning proponents of Open Source solutions who are either unable to communicate or simply victim to their own enthusiasm. There is probably nothing that doesn't have an Open Source solution in the abstract sense-- but in the real world of existing systems, personnel, and politics, the best solution may not be technically the fastest or even the most stable. The right tool for the job is my motto, and that might mean SQL Server, it might mean MySQL. It might mean a Linux server, it might mean Win2K. There is no single panacea. c -- Chris Lott http://www.chrislott.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] /* J. Lewis lamp/php developer livingpages.com */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]