RE: [PHP] How to backup records in mySQL DB?
Personnaly i use this method with phpMyAdmin. I make a dump of each table Structure and data.copy and paste it into a txt file. You can also use de csv format. Hope you don't hae a lot of table :=) I know it's very simple but it work. -Message d'origine- De : Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 20 décembre 2001 08:28 À : [EMAIL PROTECTED] Objet : [PHP] How to backup records in mySQL DB? Hi, I'm having a touch situation on my hands. Last week one of my site was shut down in what the Hosting Company claimed to be a Policy Violation. However, it was found out later that it wasn't so and they had to re-host my site. Unfortunately, they erased my mySQL database with my account and we lost all our very important Data in the tables there. It's horrible. We're beggining again but i'm not scared about the Data. The data is posted online by users. I need to have a way to backup my mySQL data. If possible, on some other site location or in Hard Copy (As in a file) or something. I don't know how to do any of this. I have no idea what to do about it. Can anyone make any suggestions help? Regards, T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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]
Re: [PHP] Passing Logined in Name form One Form to other Page
Hi, May I suggest that you take a look at the code library at zend.com, and devshed.com . I remember seeing a login application using the SESSIONS. Alternatively, you can use cookies to let your browser know who is browsing. Jack [EMAIL PROTECTED] wrote: Dear all I had create the Login Page for the User to login before they can open the WebPage. What i want to do is to: When the User had type the Username into the Inputbox, and click the submit button, this Username will be memorized, and pass to other PHP Page.Then when he go to some page which need to select data from MYSQL, it will read the Username which passed from the Login Form and select the only Record to him! I heard about the Session, but how i can pass the Username to other page using Session?? Pls Help! Thx a lot ! jack [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] Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts!
Re: [PHP] How to backup records in mySQL DB?
Dear Friend, If I were you, I would take my biz elsewhere. BTW, which company is that? Anyway, I will recommend you to use the phpMyAdmin. It's a mysql database management tool written in PHP, free of charge of course, that lets you manage your database. One of the cool things it that it dumps your database into a flat file with table creation and INSERT commands, so that in case you need to restore you databases, you just run the sql. I hope this helps. Mehmet. Thomas Edison Jr. [EMAIL PROTECTED] wrote: Hi, I'm having a touch situation on my hands. Last week one of my site was shut down in what the Hosting Company claimed to be a Policy Violation. However, it was found out later that it wasn't so and they had to re-host my site. Unfortunately, they erased my mySQL database with my account and we lost all our very important Data in the tables there. It's horrible. We're beggining again but i'm not scared about the Data. The data is posted online by users. I need to have a way to backup my mySQL data. If possible, on some other site location or in Hard Copy (As in a file) or something. I don't know how to do any of this. I have no idea what to do about it. Can anyone make any suggestions help? Regards, T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts!
TR: [PHP] How to backup records in mySQL DB?
-Message d'origine- De : Olivier Masudi [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 20 décembre 2001 09:24 À : Thomas Edison Jr. Objet : RE: [PHP] How to backup records in mySQL DB? I think thirs you have to install phpMYAdmin in your server you can find it here : http://phpwizard.net/projects/phpMyAdmin/ It's really easy to install. It's a mysql database management tool written in PHP, free of charge of course, that lets you manage your database it userfriendly like MSACCESS (??? not so powerfull of course) Give it a try then everithing will be more easier :=) -Message d'origine- De : Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 20 décembre 2001 09:08 À : Olivier Masudi Objet : RE: [PHP] How to backup records in mySQL DB? HI, Your method does sound worthy of a try, but technically, how do you achieve this? I mean is it a manual proceure or it happens itself through scripts? Thanks, T. Edison Jr. --- Olivier Masudi [EMAIL PROTECTED] wrote: Personnaly i use this method with phpMyAdmin. I make a dump of each table Structure and data.copy and paste it into a txt file. You can also use de csv format. Hope you don't hae a lot of table :=) I know it's very simple but it work. -Message d'origine- De : Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 20 décembre 2001 08:28 À : [EMAIL PROTECTED] Objet : [PHP] How to backup records in mySQL DB? Hi, I'm having a touch situation on my hands. Last week one of my site was shut down in what the Hosting Company claimed to be a Policy Violation. However, it was found out later that it wasn't so and they had to re-host my site. Unfortunately, they erased my mySQL database with my account and we lost all our very important Data in the tables there. It's horrible. We're beggining again but i'm not scared about the Data. The data is posted online by users. I need to have a way to backup my mySQL data. If possible, on some other site location or in Hard Copy (As in a file) or something. I don't know how to do any of this. I have no idea what to do about it. Can anyone make any suggestions help? Regards, T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] Signing Files with PGP
Hello List, I try to setup a script which automatically signs a file with PGP. With the system command this looks like that: % /usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt A private key is required to make a signature. Need a pass phrase to decrypt private key: 1024 bits, Key ID F593ED45, Created 2001-12-14 Juergen Mueller [EMAIL PROTECTED] Enter pass phrase: Pass phrase is good. Creating output file test1.sig % Now the thing is how can I implement the pass phrase into PHP so that the command is being done? When I use something like $command=/usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt; exec($command,$answer); obviously nothing is happening cause the pass phrase was not given. Thanks. Juergen -- PHP General Mailing List (http://www.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] Size of array in bytes
Hi I have a rather large array in my script and I was interested how much memory it uses. Is there a way to get the size of an array in bytes? BTW: I did RTFM and didn't find an accomidating function, so if there is one, please point me to it... TIA Stefan Rusterholz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to backup records in mySQL DB?
We're beggining again but i'm not scared about the Data. The data is posted online by users. I need to have a way to backup my mySQL data. If possible, on some other site location or in Hard Copy (As in a file) or something. I don't know how to do any of this. I have no idea what to do about it. Can anyone make any suggestions help? This is a MySQL question and not a PHP question. That being said if you have telnet/SSH access to your server create a script to use mysqldump then tar/gzip the result and mail or ftp the resulting file to the backup location. Then cron it to run as often as you want backups. To keep on topic you can use PHP as the scripting language to do this. Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to save the result page generated by a Form?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have a simple question. My Scenario: Page a.php - The Form The user insert his data (ie name, address, city and so on...)Then he submit the $ to b.php. Page b.php now shows : Hello Mr. $name , etc etc ... I nedd now to save what I see on the sreen as .txt or .rft or .html How can I do that? I try many ways ...(using no session) ..but I can only save the empty b.php page ...with no varialbles showed at all. Thanx for your help and Marry XMas from Italy. BR Joe -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com Comment: ID: 0x0A17124F - DH/DSS 2048/1024 - Joe Athena Webmaster iQA/AwUBPCGxOET82/4KFxJPEQK+yQCfdrsJMV6YXUxsqUxmgsTrVguHotUAn1pA tF+VwCUw1Cdv4k70aWtvrynp =GI2/ -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] How to save the result page generated by a Form?
I don't know if it matches your needs but perhaps it helps: http://www.php.net/manual/en/ref.outcontrol.php http://www.php.net/manual/it/ref.outcontrol.php this page isn't translated, but perhaps some subpages... good luck Stefan Rusterholz - Original Message - From: Joe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 20, 2001 10:38 AM Subject: [PHP] How to save the result page generated by a Form? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have a simple question. My Scenario: Page a.php - The Form The user insert his data (ie name, address, city and so on...)Then he submit the $ to b.php. Page b.php now shows : Hello Mr. $name , etc etc ... I nedd now to save what I see on the sreen as .txt or .rft or .html How can I do that? I try many ways ...(using no session) ..but I can only save the empty b.php page ...with no varialbles showed at all. Thanx for your help and Marry XMas from Italy. BR Joe -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com Comment: ID: 0x0A17124F - DH/DSS 2048/1024 - Joe Athena Webmaster iQA/AwUBPCGxOET82/4KFxJPEQK+yQCfdrsJMV6YXUxsqUxmgsTrVguHotUAn1pA tF+VwCUw1Cdv4k70aWtvrynp =GI2/ -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] fatal error: out of dynamic memory in yy_create_buffer() in unknown on line 0
Hello, When I try to access my .php4 pages I get this error : fatal error: out of dynamic memory in yy_create_buffer() in unknown on line 0 These pages used to work before, but it seems that my Host has updated to PHP 4.0.6. Is there some relation ? Can you help me ? You can try this page : www.acteam-langues.com/societeConnect.php4 Thanks Henri -- PHP General Mailing List (http://www.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] CRLF Problem writing ASCII Flat File
Using Linux 7.2/PHP 4/Apache. I'm using the following code snippet to process the POST of a form that sends $UserID and $Password: ?php $CryptPassword = md5($Password); \\encrypt the password $TheFile = /path/.htpasswd; \\Set the file name/path $Data = $UserID:$CryptPassword\n\r; \\ Setting the data stream for the write $FilePointer = fopen($TheFile, a); \\open the file fwrite($FilePointer, $Data);\\write the data stream fclose ($FilePointer); \\close the file ? to write to .htpasswd with the following format/layout: userid:passwd userid:passwd userid:passwd userid:passwd userid:passwd However, the data appears in the file without the carriage return or new lines in the file as follows: userid:passwd userid:passwd userid:passwd userid:passwd userid:passwd userid:passwd userid:passwd How can I write the carriage returns to the file so that they show up via vi or via windows notepad? ALSO, will Apache and .htpasswd deal with md5() passwords, or do I need to limit myself to the crypt() function? TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to convert OEM to ANSI character set
I have a PHP script that receives a CSV text file and inserts it into a MySQL database. My problem is that this CSV file is made using the OEM character set and I need it with the ANSI character set. The closest thing I've found is the convert_cyr_string() function, but there isn't a code specific for OEM and translation is not completely accurate. Any help? -- PHP General Mailing List (http://www.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] PHP3 NOT being parsed for SSI!! HELP!!
If you're using PHP as an Apache module, you can use virtual() - http://www.php.net/manual/en/function.virtual.php - to include the dynamic parts; vcstatic includes could be handled by virtual() or just a normal PHP include()/require(). - steve At 11:09 PM -0800 12/19/01, Thomas Edison Jr. wrote: Folks, I have a serious problem and i don't know what to do. We have a fixed template for each intranet page. Now the template consists of a header, a left navigation and a footer. The body would contain my pages content. What we are doing at present is that the header, the left navigation and the footer is included in the page using SSI. The header is a static include file. However the footer and the left navigation are customizable, and hence are dynamic pages (cgi scripts) which generate the appropriate code depending on the command line parameters. Now the problem is that php3 pages are not being parsed for SSI. I looked up on the web , and found that only one of two can be used at the same time. Can anyone suggest a Possible Solution? We are running a Solaris machine! Thanks, T. Edison Jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** -- ++ | 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-general Digest 20 Dec 2001 11:49:00 -0000 Issue 1063
php-general Digest 20 Dec 2001 11:49:00 - Issue 1063 Topics (messages 78267 through 78313): Re: Remote image 78267 by: David Piasecki Quanta IDE - PHP Highlighing for 4.0.1 78268 by: Mike Eheler 78269 by: Mike Eheler PHP 4.1.0 patch for Quanta IDE, The Sequel 78270 by: Mike Eheler temporary image 78271 by: Michael Mehlmann 78276 by: Bogdan Stancescu 78277 by: Bogdan Stancescu Re: Slash problem 78272 by: Mike Eheler 78273 by: Tom Rogers 78274 by: Mike Eheler Re: outputting db content 78275 by: Greg Donald PHP XML 78278 by: Martin Hughes 78279 by: Martin Hughes 78281 by: Bas van Rooijen 78282 by: Martin Hughes Re: Random 78280 by: David Re: Book. 78283 by: David 78300 by: Knut H. Hassel Nielsen Re: PHP XML (2) 78284 by: Bas van Rooijen Re: Question: Should exit() print out the integer exit-status? 78285 by: Garth Dahlstrom socket read byte by byte 78286 by: brendan How to open an existing Excel file(.xls) from PHP program 78287 by: Balaji Ankem 78288 by: Bogdan Stancescu PHP 4.1.0 and my system's expat 1.95.2 don't get along... 78289 by: Russ Goodwin Segmentation faults on headers() 78290 by: Scott w Hello, q about ./configure (php) on linux 78291 by: Joelmon2001.aol.com 78292 by: Rasmus Lerdorf Re: GetImageSize Problem 78293 by: Mirek Novak PHP3 NOT being parsed for SSI!! HELP!! 78294 by: Thomas Edison Jr. 78313 by: Steve Edberg How to backup records in mySQL DB? 78295 by: Thomas Edison Jr. 78296 by: Thomas Edison Jr. 78301 by: Olivier Masudi 78303 by: Mehmet Kamil ERISEN 78304 by: Olivier Masudi 78307 by: Jon Farmer Passing Logined in Name form One Form to other Page 78297 by: Jack 78298 by: Andrey Hristov 78302 by: Mehmet Kamil ERISEN Re: [PHP-WIN] Passing Logined in Name form One Form to other Page 78299 by: Svensson, B.A.T. (HKG) Signing Files with PGP 78305 by: J.Mueller, pro.vider.de GmbH Size of array in bytes 78306 by: Stefan Rusterholz How to save the result page generated by a Form? 78308 by: Joe 78309 by: Stefan Rusterholz fatal error: out of dynamic memory in yy_create_buffer() in unknown on line 0 78310 by: Henri CRLF Problem writing ASCII Flat File 78311 by: Bob Holden How to convert OEM to ANSI character set 78312 by: Alex Vargas 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--- Is anyone familiar with the overhead that this type of system might create, as compared to a standard request/response to apache? That is, to have PHP intercept the request for an image, check HTTP_REFERER - if it is null or from the local server, open the file, redirect to browser, close file, if not serve a default error image. Also, would there be any danger (to the files in particular, but also with runaway processes or files left open) in using this method if a user cancels the request mid-stream? David -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 9:33 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Remote image how those remote servers destinguish where the images are coming from is from the Referr header. play around with getting the data manually using fopen()/fwrite()/fread() and your done. not so easy eh, well it works. -- Chris Lee [EMAIL PROTECTED] Martin Kampherbeek [EMAIL PROTECTED] wrote in message 001201c18290$60da3820$328078d9@cc16349a">news:001201c18290$60da3820$328078d9@cc16349a... Hi, I have a problem with a remote image. I hope someone can help me. People can post their link of their webpage at my site. I check if the file excists, fopen(). After that I scan the page for links. And the links for images. Then I would like to see the sizes of all those images. The problem is that there are servers that don't allow to brow straight to the images, it can only from the page self. So I look for something in php that surfs the the page en from that page to the links. I hope someone can help me. Cheers, Martin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] ---End Message--- ---BeginMessage--- Attached is a text file that will update Quanta IDE 2.0.1 syntax highlighting for PHP. Simply use your favourite text edit quanta/kwrite/highlight.cpp in your quanta-2.0.1 source tree, and paste the text from this attached
Re: [PHP] PHP3 NOT being parsed for SSI!! HELP!!
Hello, For including file you can use function virtual() with the file to include as parameter. This work under Apache only. Hope, it'll be useful for you. dimok - Original Message - From: Thomas Edison Jr. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 19, 2001 11:09 PM Subject: [PHP] PHP3 NOT being parsed for SSI!! HELP!! Folks, I have a serious problem and i don't know what to do. We have a fixed template for each intranet page. Now the template consists of a header, a left navigation and a footer. The body would contain my pages content. What we are doing at present is that the header, the left navigation and the footer is included in the page using SSI. The header is a static include file. However the footer and the left navigation are customizable, and hence are dynamic pages (cgi scripts) which generate the appropriate code depending on the command line parameters. Now the problem is that php3 pages are not being parsed for SSI. I looked up on the web , and found that only one of two can be used at the same time. Can anyone suggest a Possible Solution? We are running a Solaris machine! Thanks, T. Edison Jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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]
Re: [PHP] Size of array in bytes
Had the same problem not long ago and I didn't find a simple solution either. My solution at the time was the painfully slow one - walking the array and storing strlen for both key and value. Since you have a large array, this probably doesn't do for you. A faster but less accurate solution would be storing round(strlen(serialize($array))*$coefficient), where you should approximate $coefficient for your average array (the less the average array element size, the smaller the coefficient). I know, these are both rudimentary and ugly solutions but I didn't find any better - these are the solutions I considered when I had the same problem. Bogdan Stefan Rusterholz wrote: Hi I have a rather large array in my script and I was interested how much memory it uses. Is there a way to get the size of an array in bytes? BTW: I did RTFM and didn't find an accomidating function, so if there is one, please point me to it... TIA Stefan Rusterholz -- PHP General Mailing List (http://www.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] Size of array in bytes
Hm, I thought about that way - technically it was indeed a way to go since I don't want to perform this action everytime but only for testing purposes (so time doesn't matter). But aren't arrays in PHP internally stored in a hash-like system which's size doesn't have to be equal to the sum of it's content? I'm more interested in how many kbytes of RAM my array is using than the size in bytes of it's content... But thank you anyway for helping me! best regards Stefan Rusterholz Had the same problem not long ago and I didn't find a simple solution either. My solution at the time was the painfully slow one - walking the array and storing strlen for both key and value. Since you have a large array, this probably doesn't do for you. A faster but less accurate solution would be storing round(strlen(serialize($array))*$coefficient), where you should approximate $coefficient for your average array (the less the average array element size, the smaller the coefficient). I know, these are both rudimentary and ugly solutions but I didn't find any better - these are the solutions I considered when I had the same problem. Bogdan Stefan Rusterholz wrote: Hi I have a rather large array in my script and I was interested how much memory it uses. Is there a way to get the size of an array in bytes? BTW: I did RTFM and didn't find an accomidating function, so if there is one, please point me to it... TIA Stefan Rusterholz -- PHP General Mailing List (http://www.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 / SSL
Hi, Bit off topic this, but I thought I'd ask anyway... I've been implementing a financial reporting system, in PHP, which will be running on the internet. Obviously, therefore, security is an issue. The system itself implements a username/password login system, but I want to be able to run it using SSL for obvious reasons. My problem is this: The server we have (Red Hat 7.0, Apache 1.3.14-3, open-ssl 0.9.5a-14, mod_ssl 2.7.1-3) came with ssl preconfigured and ready to use. It runs at 128 bit encryption which is fine as far as I'm concerned. The people who will be using the system, however, have a company standard browser which is IE 4 and only supports 40 bit encryption. And for various political reasons they don't want to upgrade all the browsers. So what I want to know is how easy it is to turn down the encryption level, and how to go about it. Any suggestions, pointers??? All the documentation I've come across thus far doesn't really cover anything like this Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Convert tif -- jpg
Please help me. I need convert image from tif format to the jpg format, exist any php function to do this ? Thank you Roman -- PHP General Mailing List (http://www.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] Convert tif -- jpg
If you work under Linux you might want to check out the man page for mogrify and perform an ? exec(mogrify -format jpeg $filein $fileout); ? for example. Bogdan Please help me. I need convert image from tif format to the jpg format, exist any php function to do this ? Thank you Roman -- PHP General Mailing List (http://www.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] Convert tif -- jpg
No, I need convert format of image in windows system. -Original Message- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 3:14 PM To: Roman; Php-General Subject: Re: [PHP] Convert tif -- jpg If you work under Linux you might want to check out the man page for mogrify and perform an ? exec(mogrify -format jpeg $filein $fileout); ? for example. Bogdan Please help me. I need convert image from tif format to the jpg format, exist any php function to do this ? Thank you Roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP / SSL
On Thursday 20 December 2001 14:58, you wrote: I urge you strongly to advise against that. Although it might be possible to downgrade your encryption to 40bit I'd like to make you aware of the fact that DES which is 56 bit encryption if I'm not mistaken was cracked several times by brute force in UNDER 22 hours by the distributed.net people (www.distributed.net). Therefore I would NOT consider 40 bits encryption safe and I feel obligated to make you aware of that. You are warned now :-) so do as you please. Kind regards, Ferry van Steen PS I'm also on distributed.net's mailing list. I once asked why it wouldn't be safe then, since distributed.net has a huge load processing power due to the number of people that participate. Appearantly it's fairly easy for a lot of companies/governments/etc to EASILY!! match that computational power. Hi, Bit off topic this, but I thought I'd ask anyway... I've been implementing a financial reporting system, in PHP, which will be running on the internet. Obviously, therefore, security is an issue. The system itself implements a username/password login system, but I want to be able to run it using SSL for obvious reasons. My problem is this: The server we have (Red Hat 7.0, Apache 1.3.14-3, open-ssl 0.9.5a-14, mod_ssl 2.7.1-3) came with ssl preconfigured and ready to use. It runs at 128 bit encryption which is fine as far as I'm concerned. The people who will be using the system, however, have a company standard browser which is IE 4 and only supports 40 bit encryption. And for various political reasons they don't want to upgrade all the browsers. So what I want to know is how easy it is to turn down the encryption level, and how to go about it. Any suggestions, pointers??? All the documentation I've come across thus far doesn't really cover anything like this Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP / SSL
Hang on, correct me if I'm wrong, but isn't 56bit DES significantly different from 40-bit SSL (which uses a 40bit key for the public key crypto and something like a 3000bit key for the symmetric cipher used for the actual data transfer). What I mean is, DES is significantly weaker than the weakest part of standard 40bit SSL yes? If I'm wrong, arent a lot of people putting a lot of confidence in something that really isnt secure (i.e. all SSL sessions...)?? -- Shane On Thursday 20 Dec 2001 9:07 pm, TD - Sales International Holland B.V. wrote: On Thursday 20 December 2001 14:58, you wrote: I urge you strongly to advise against that. Although it might be possible to downgrade your encryption to 40bit I'd like to make you aware of the fact that DES which is 56 bit encryption if I'm not mistaken was cracked several times by brute force in UNDER 22 hours by the distributed.net people (www.distributed.net). Therefore I would NOT consider 40 bits encryption safe and I feel obligated to make you aware of that. You are warned now :-) so do as you please. Kind regards, Ferry van Steen PS I'm also on distributed.net's mailing list. I once asked why it wouldn't be safe then, since distributed.net has a huge load processing power due to the number of people that participate. Appearantly it's fairly easy for a lot of companies/governments/etc to EASILY!! match that computational power. Hi, Bit off topic this, but I thought I'd ask anyway... I've been implementing a financial reporting system, in PHP, which will be running on the internet. Obviously, therefore, security is an issue. The system itself implements a username/password login system, but I want to be able to run it using SSL for obvious reasons. My problem is this: The server we have (Red Hat 7.0, Apache 1.3.14-3, open-ssl 0.9.5a-14, mod_ssl 2.7.1-3) came with ssl preconfigured and ready to use. It runs at 128 bit encryption which is fine as far as I'm concerned. The people who will be using the system, however, have a company standard browser which is IE 4 and only supports 40 bit encryption. And for various political reasons they don't want to upgrade all the browsers. So what I want to know is how easy it is to turn down the encryption level, and how to go about it. Any suggestions, pointers??? All the documentation I've come across thus far doesn't really cover anything like this Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP / SSL
I urge you strongly to advise against that. Although it might be possible to downgrade your encryption to 40bit I'd like to make you aware of the fact that DES which is 56 bit encryption if I'm not mistaken was cracked several times by brute force in UNDER 22 hours by the distributed.net people (www.distributed.net). Therefore I would NOT consider 40 bits encryption safe and I feel obligated to make you aware of that. You are warned now :-) so do as you please. Erm, yeah true but by their own admission they used the equivalant of 16 PII 266Mhz machines to accomplish this. If you think someone is going to want your data and has those kinda resources available then yeah go for higher. However if thats your worry where are you going to stop in the length of your key? If your that paranoid then it shouldn't be using public networks in the first place!! -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key -- PHP General Mailing List (http://www.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] Signing Files with PGP
* J.Mueller, pro.vider.de GmbH ([EMAIL PROTECTED]) [Dec 20. 2001 04:17]: Hello List, Howdy.. I try to setup a script which automatically signs a file with PGP. [...] When I use something like $command=/usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt; exec($command,$answer); obviously nothing is happening cause the pass phrase was not given. One way is to use popen() to execute the command and fputs() to write out the passphrase. http://download.php.net/manual/en/function.popen.php -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Variables won't constants aren't. -- PHP General Mailing List (http://www.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] Uploading Word Document problem
Hi All, I have a site whereby you can upload a Resume in Word or Text format, but for certain Word documents, the upload process just times out. Has anyone else come across this problem, and if so any suggestions? Many Thanks Alexis -- PHP General Mailing List (http://www.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] Signing Files with PGP
The -z option allows you to pass the passphrase on the command line -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key - Original Message - From: Brian Clark [EMAIL PROTECTED] To: PHP is not a drug. [EMAIL PROTECTED] Sent: Thursday, December 20, 2001 2:37 PM Subject: Re: [PHP] Signing Files with PGP * J.Mueller, pro.vider.de GmbH ([EMAIL PROTECTED]) [Dec 20. 2001 04:17]: Hello List, Howdy.. I try to setup a script which automatically signs a file with PGP. [...] When I use something like $command=/usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt; exec($command,$answer); obviously nothing is happening cause the pass phrase was not given. One way is to use popen() to execute the command and fputs() to write out the passphrase. http://download.php.net/manual/en/function.popen.php -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Variables won't constants aren't. -- PHP General Mailing List (http://www.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] Limit script memory usage !!
Hi all, I need to limit the amount of memory that a script can use. Is there a function that I can use to tell the script to die if its memory usage becomes greater than $MAX_MEMORY ! Or maybe, I could use a cron job to monitor processes and kill them if they become too big ? Thanks for your help. Nicolas -- PHP General Mailing List (http://www.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] Limit script memory usage !!
There is a setting in de php.ini called memory_limit. Remember it is in bytes! Jerry -Original Message- From: Nicolas Guilhot [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 4:09 PM To: Php General MailingList Subject: [PHP] Limit script memory usage !! Hi all, I need to limit the amount of memory that a script can use. Is there a function that I can use to tell the script to die if its memory usage becomes greater than $MAX_MEMORY ! Or maybe, I could use a cron job to monitor processes and kill them if they become too big ? Thanks for your help. Nicolas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Help with Sessions - Should be easy =]
I am coming from an asp background, and am used to setting session variables very easily, but I cannot work them out here with all the different commands. I would like to store in a session variable output from a mysql db (Got the db bit working fine) but cannot for the life of me store or retrieve anything from a session variable. (more information if required) I am retreiving user information from a database after verification, and would like to place certain feilds into a session variable for easy access/retreival. I can get the information out of the database, but cannot place it into any sort of variable that will store on the page. I have the latest official PHP, running with IIS on a Windows 2K server with IIS. More questions to follow no doubt, Thanks in advance, - Tomasz -- PHP General Mailing List (http://www.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] Convert tif -- jpg
Any number of image manipulation programs do that, However, try installing CygWin and see if mogrify will run. Miles Thompson At 03:20 PM 12/20/2001 +0100, Roman wrote: No, I need convert format of image in windows system. -Original Message- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 3:14 PM To: Roman; Php-General Subject: Re: [PHP] Convert tif -- jpg If you work under Linux you might want to check out the man page for mogrify and perform an ? exec(mogrify -format jpeg $filein $fileout); ? for example. Bogdan Please help me. I need convert image from tif format to the jpg format, exist any php function to do this ? Thank you Roman -- PHP General Mailing List (http://www.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] Re: $PHP_SELF not working -please help
USE PHPSELF in windows not $PHP_SELF -- PHP General Mailing List (http://www.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_SELF not working -please help
sorry $PHPSELF not $PHP_SELF in windows I forget $ :) - Original Message - From: Alawi [EMAIL PROTECTED] To: PHP genral [EMAIL PROTECTED] Sent: Thursday, December 20, 2001 6:34 PM Subject: [PHP] Re: $PHP_SELF not working -please help USE PHPSELF in windows not $PHP_SELF -- PHP General Mailing List (http://www.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] How can I have CVS ?
and log to it from windows ?
[PHP] compressed content and output buffering
Hi The way output buffering and output compression work, all the output is buffered until script termination, at which point it's compressed and then all sent to the browser. Is there any way having it compressed but not buffering it? gzip is a stream based algorithm, so there shouldn't be any problem theoretically. I imagine mod_gzip would help in this respect - but I'd like it to be switched on and off within PHP. Anyone know a nice way of doing this? Thanks -- Shane -- PHP General Mailing List (http://www.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] Need another verse
To the tune of Let it Be, with apologies to the Beatles and all those who have gone before: When I find my code in tons of trouble, Then the newsgroups come to me, Speaking words of wisdom: PHP As the deadline fast approaches, And the bugs are all I see, Somewhere, someone whispers PHP PHP, PHP, PHP, PHP. Client-side is dead and buried, PHP. I used to write a lot of markup, writing each page manually. Learn to do it more dynamic! PHP. Tie it to your database, and you can change it endlessly, there will be an answer PHP PHP, PHP, PHP, yeah, PHP. Only wimps use Front Page. PHP. PHP, PHP, PHP, oh, PHP. ASP just won't cut it. PHP., PHP, PHP, PHP. Avoiding MS agony, PHP. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP 4.1.0 patch for Quanta IDE, The Sequel
I sumbitted a similar patch to the Quanta team about a week ago. It may appear in an upcoming release, possibly Quanta 3, which will come with KDE 3.0. A few other additions I made: - highlighting is now case-insensitive for everything. I believe older versions were case-sensitive for keywords, like function, class, etc. - support for ASP-style opening and closing tags (% and % instead of ?php, ?, etc.) I'm also working on porting a newer editor from Kate/ktexteditor into Quanta. It's been slow going, but things have picked up (it compiles and runs now, albeit with a bunch of segfaults). This will make adding syntax highlighting instructions much easier, as the latest versions of Kate allow you to define highlighting rules in XML files, and the highlighting instructions are set up at run-time rather than compile time. Maybe over the XMas break I'll be able to finish it up. J Mike Eheler wrote: http://sourceforge.net/tracker/index.php?func=detailaid=495239group_id=4113atid=304113 Download the attached file, and run patch -p1 -i quanta-2.0.1-php-4.1.0.diff That will patch your source tree.. then just configure, make, install. I've actually tested this one, so go nuts people. :) Please let me know if you find any functions that should be keywords or keywords that shouldn't be keywords, or functions/keywords that just plain aren't in the list. Mike -- PHP General Mailing List (http://www.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] rrd tool's graphing and png
I must be doing something wrong that is really simple hence I can't figure out what I'm doing wrong. I'm using a package called rrd tool, one of its (unix) command line programs has the option to output to stdout a png image. I'm trying to get that output feed in to ImagePNG to display the image within an HTML page. the png lib is running ok, tested by one of the examples from the Image function doc's. Any suggestions ... Thanks -pete Pete Lancashire Unix Systems Administration Columbia Sportswear Co. Inc. [EMAIL PROTECTED] (503) 985-4173 -- PHP General Mailing List (http://www.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: Help with Sessions - Should be easy =]
Why don't you give us a code snippet so we know how you are trying to do it. Fred Tomasz Jachimczak [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am coming from an asp background, and am used to setting session variables very easily, but I cannot work them out here with all the different commands. I would like to store in a session variable output from a mysql db (Got the db bit working fine) but cannot for the life of me store or retrieve anything from a session variable. (more information if required) I am retreiving user information from a database after verification, and would like to place certain feilds into a session variable for easy access/retreival. I can get the information out of the database, but cannot place it into any sort of variable that will store on the page. I have the latest official PHP, running with IIS on a Windows 2K server with IIS. More questions to follow no doubt, Thanks in advance, - Tomasz -- PHP General Mailing List (http://www.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 4.1.0 patch for Quanta IDE, The Sequel
Cool, however PHP is not case sensitive, nor is ASP or HTML for that matter, therefore case sensitive syntax highlighting will not be good for these languages. Mike J Smith wrote: I sumbitted a similar patch to the Quanta team about a week ago. It may appear in an upcoming release, possibly Quanta 3, which will come with KDE 3.0. A few other additions I made: - highlighting is now case-insensitive for everything. I believe older versions were case-sensitive for keywords, like function, class, etc. - support for ASP-style opening and closing tags (% and % instead of ?php, ?, etc.) I'm also working on porting a newer editor from Kate/ktexteditor into Quanta. It's been slow going, but things have picked up (it compiles and runs now, albeit with a bunch of segfaults). This will make adding syntax highlighting instructions much easier, as the latest versions of Kate allow you to define highlighting rules in XML files, and the highlighting instructions are set up at run-time rather than compile time. Maybe over the XMas break I'll be able to finish it up. J Mike Eheler wrote: http://sourceforge.net/tracker/index.php?func=detailaid=495239group_id=4113atid=304113 Download the attached file, and run patch -p1 -i quanta-2.0.1-php-4.1.0.diff That will patch your source tree.. then just configure, make, install. I've actually tested this one, so go nuts people. :) Please let me know if you find any functions that should be keywords or keywords that shouldn't be keywords, or functions/keywords that just plain aren't in the list. Mike -- PHP General Mailing List (http://www.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] fsockopen / fopen
Anyone know what errno 0 is for fsockopen? Thanks, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . James Cox :: Senior Support Engineer Wherewithal, Inc. e: [EMAIL PROTECTED] Wherewithal. Capture Creative Connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -- PHP General Mailing List (http://www.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 4.1.0 patch for Quanta IDE, The Sequel
really? ? $THIS_IS_A_VARIABLE=1; $this_is_a_variable=2; echo $THIS_IS_A_VARIABLE\n; echo $this_is_a_variable\n; ? seems sensitive to me... Mike Eheler wrote: Cool, however PHP is not case sensitive, nor is ASP or HTML for that matter, therefore case sensitive syntax highlighting will not be good for these languages. Mike J Smith wrote: I sumbitted a similar patch to the Quanta team about a week ago. It may appear in an upcoming release, possibly Quanta 3, which will come with KDE 3.0. A few other additions I made: - highlighting is now case-insensitive for everything. I believe older versions were case-sensitive for keywords, like function, class, etc. - support for ASP-style opening and closing tags (% and % instead of ?php, ?, etc.) I'm also working on porting a newer editor from Kate/ktexteditor into Quanta. It's been slow going, but things have picked up (it compiles and runs now, albeit with a bunch of segfaults). This will make adding syntax highlighting instructions much easier, as the latest versions of Kate allow you to define highlighting rules in XML files, and the highlighting instructions are set up at run-time rather than compile time. Maybe over the XMas break I'll be able to finish it up. J Mike Eheler wrote: http://sourceforge.net/tracker/index.php?func=detailaid=495239group_id=4113atid=304113 Download the attached file, and run patch -p1 -i quanta-2.0.1-php-4.1.0.diff That will patch your source tree.. then just configure, make, install. I've actually tested this one, so go nuts people. :) Please let me know if you find any functions that should be keywords or keywords that shouldn't be keywords, or functions/keywords that just plain aren't in the list. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How can I have CVS ?
And the answer is... WinCVS Check it our at. http://www.cvsgui.org/ -Original Message- From: Alawi [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 7:51 AM To: PHP genral Subject: [PHP] How can I have CVS ? and log to it from windows ? -- PHP General Mailing List (http://www.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 4.1.0 patch for Quanta IDE, The Sequel
? echo (null == Null); eCho (NULL == NuLl); eCHo (FALSE == false); prINt(pre); Print_R(GET_defined_VaRs()); sPrinTF('%s','/pre'); ? Variable names are the *only* exception. So yes, $var != $Var; And variable names are not syntax highlighted specifically (other than the fact that variables are highlighted). So by case-sensitizing keyword and function references, that is making a lot of scripts *not* syntax highlight properly, because only people who use FALSE will be highlighted, while people who use False or false or even FalsE will be left in the dark. Or perhaps you prefer to code using MySQL_Connect().. people driven to PHP from ASP might code like this when they start. Mike Jack Dempsey wrote: really? ? $THIS_IS_A_VARIABLE=1; $this_is_a_variable=2; echo $THIS_IS_A_VARIABLE\n; echo $this_is_a_variable\n; ? seems sensitive to me... Mike Eheler wrote: Cool, however PHP is not case sensitive, nor is ASP or HTML for that matter, therefore case sensitive syntax highlighting will not be good for these languages. Mike J Smith wrote: I sumbitted a similar patch to the Quanta team about a week ago. It may appear in an upcoming release, possibly Quanta 3, which will come with KDE 3.0. A few other additions I made: - highlighting is now case-insensitive for everything. I believe older versions were case-sensitive for keywords, like function, class, etc. - support for ASP-style opening and closing tags (% and % instead of ?php, ?, etc.) I'm also working on porting a newer editor from Kate/ktexteditor into Quanta. It's been slow going, but things have picked up (it compiles and runs now, albeit with a bunch of segfaults). This will make adding syntax highlighting instructions much easier, as the latest versions of Kate allow you to define highlighting rules in XML files, and the highlighting instructions are set up at run-time rather than compile time. Maybe over the XMas break I'll be able to finish it up. J Mike Eheler wrote: http://sourceforge.net/tracker/index.php?func=detailaid=495239group_id=4113atid=304113 Download the attached file, and run patch -p1 -i quanta-2.0.1-php-4.1.0.diff That will patch your source tree.. then just configure, make, install. I've actually tested this one, so go nuts people. :) Please let me know if you find any functions that should be keywords or keywords that shouldn't be keywords, or functions/keywords that just plain aren't in the list. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Long life is in store for you. -- PHP General Mailing List (http://www.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_SELF not working -please help
Alawi wrote: use $PHPSELF not $PHP_SELF in windows BAD IDEA. what happens if one day you (or even worse: someone else) wants to run your scripts on a different server? one of the nicest things about PHP that you can run it on many different any OS's. phil. -- PHP General Mailing List (http://www.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] Need another verse
Okay you need to interject some emotion into your song... try something like... Now PERL's been sending emails, She sais she's feeling jealousy, Because I have a new friend, PHP -Kevin - Original Message - From: bill [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 20, 2001 9:14 AM Subject: [PHP] Need another verse To the tune of Let it Be, with apologies to the Beatles and all those who have gone before: When I find my code in tons of trouble, Then the newsgroups come to me, Speaking words of wisdom: PHP As the deadline fast approaches, And the bugs are all I see, Somewhere, someone whispers PHP PHP, PHP, PHP, PHP. Client-side is dead and buried, PHP. I used to write a lot of markup, writing each page manually. Learn to do it more dynamic! PHP. Tie it to your database, and you can change it endlessly, there will be an answer PHP PHP, PHP, PHP, yeah, PHP. Only wimps use Front Page. PHP. PHP, PHP, PHP, oh, PHP. ASP just won't cut it. PHP., PHP, PHP, PHP. Avoiding MS agony, PHP. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Images
Hi, I am trying to do something like this: img src=image.php?image=1 The code is like this: script language=php $szPicture = myimage.gif; $url = http://www.mysite.com/; . $szPicture; header(Content-type: image/gif); header(Content-Length: . strlen($url)); echo $url; /script But nothing happens, I just get the broken image. My logs show nothing about a script failure or about a file not being found. I tried without the header(Content-Length: . strlen($url)); but no diff. Thanks for any help. -- PHP General Mailing List (http://www.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] undefined function: ftp_connect()
I've compiled php 4.0.6 on Darwin as CGI. --with-ftp shows up in the php configuration display but I still get this message: undefined function: ftp_connect() I've read a couple past articles with people having this problem but I did not spot a solution. Any suggestions? Thanks, Sam -- PHP General Mailing List (http://www.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] Quanta IDE - PHP Highlighing for 4.0.1
So is glimmer. On Wed, 2001-12-19 at 17:27, Mike Eheler wrote: Attached is a text file that will update Quanta IDE 2.0.1 syntax highlighting for PHP. Simply use your favourite text edit quanta/kwrite/highlight.cpp in your quanta-2.0.1 source tree, and paste the text from this attached file overtop of the phpKeywords and phpTypes variables. If anyone knows how I can make a real patch (diff or whatever) lemme know cuz I've never done it before. Also if you notice anything that shouldn't be a keyword, or is missing from either keywords or functions (currently there are 2499 functions defined in this file) let me know. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-698-7250 email: [EMAIL PROTECTED] Have regard for your name, since it will remain for you longer than a great store of gold. Ecclesiastes, Aprocrypha signature.asc Description: This is a digitally signed message part
[PHP] List all session currently associated with a web site
Hi, I 'd like to know how can we list all the sessions concurrently active on a web site. If anyone out there knows how to do the trick please help. Thanks in advance! Alex -- PHP General Mailing List (http://www.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] Images
Thanks, but my html is valid, and what you are doing is not what I want to do. I want to display a random image included in the page, just like a banner program would work. I do not allow php execution on the page so the only way to get the image is to call the script with the img src tag, just like a banner program would. First of all your HTML is not valid. Secondly I believe you're making it more complex than it needs to be. And since this is ending up in HTML anyway you don't need to concern yourself with the headers. Start off with something simple like what I have below, and go from there. html a href=show_image.php?image=1Display myPicture.gif/a ? // show_image.php script if ($image) {echo img src=\http://www.myurl.com/mypicture.gif\;;} ? /html Hope this helps, Kevin Hi, I am trying to do something like this: img src=image.php?image=1 The code is like this: script language=php $szPicture = myimage.gif; $url = http://www.mysite.com/; . $szPicture; header(Content-type: image/gif); header(Content-Length: . strlen($url)); echo $url; /script But nothing happens, I just get the broken image. My logs show nothing about a script failure or about a file not being found. I tried without the header(Content-Length: . strlen($url)); but no diff. Thanks for any help. -- PHP General Mailing List (http://www.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] Need another verse
Ooh, good. That's what it needed. Maybe even some tragedy: How-to books mourn unused, dusty, having ceased with Java Beans, Now I program quickly, PHP Kevin Stone wrote: Okay you need to interject some emotion into your song... try something like... Now PERL's been sending emails, She sais she's feeling jealousy, Because I have a new friend, PHP -Kevin - Original Message - From: bill [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 20, 2001 9:14 AM Subject: [PHP] Need another verse To the tune of Let it Be, with apologies to the Beatles and all those who have gone before: When I find my code in tons of trouble, Then the newsgroups come to me, Speaking words of wisdom: PHP As the deadline fast approaches, And the bugs are all I see, Somewhere, someone whispers PHP PHP, PHP, PHP, PHP. Client-side is dead and buried, PHP. I used to write a lot of markup, writing each page manually. Learn to do it more dynamic! PHP. Tie it to your database, and you can change it endlessly, there will be an answer PHP PHP, PHP, PHP, yeah, PHP. Only wimps use Front Page. PHP. PHP, PHP, PHP, oh, PHP. ASP just won't cut it. PHP., PHP, PHP, PHP. Avoiding MS agony, PHP. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Images
img src=image.php?image=1 The code is like this: script language=php $szPicture = myimage.gif; $url = http://www.mysite.com/; . $szPicture; header(Content-type: image/gif); header(Content-Length: . strlen($url)); echo $url; /script You're properly printing out the Content-type header, but not the actual image data. You need to get the get the binary data (probably using a binary-safe read) from the image file you want to display (in $url), and then print that data out after the content-type header. Right now, a browser would get sent a content-type header for a gif, and then the following string: http://www.mysite.com/myimage.gif and that's not valid contents for a .gif file. Joel -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: undefined function: ftp_connect()
run phpinfo() is ftp support in there? if not run configure like you normally do and scroll up to the ftp section, are there any errors in there? if so what are they? -- Chris Lee [EMAIL PROTECTED] Sam Schenkman-Moore [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I've compiled php 4.0.6 on Darwin as CGI. --with-ftp shows up in the php configuration display but I still get this message: undefined function: ftp_connect() I've read a couple past articles with people having this problem but I did not spot a solution. Any suggestions? Thanks, Sam -- PHP General Mailing List (http://www.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] SSL Connection with cURL
Hi NG, i want to establish an SSL connection with cURL. I used two different scripts, 1) $URL=ssl.server.com/path/file.ext; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,https://$URL;); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS , $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); $x = curl_errno($ch); print($xbr$result); curl_close ($ch); and get exitcode 1 2) function cURL ($URL, $options=) { $command=/usr/local/bin/curl; $options.= --stderr; $execstring=escapeshellcmd($command. .$URL. .$options); exec($execstring, $stdout, $errorcode); $output = implode (\n, $stdout); if ($errorcode0) $output=; return $output; } $URL=https://ssl.server.com/path/file.ext;; $options= -d $data; $data = cURL ($URL, $options); and get exitcode 2 Why i get two different exitcodes and why i get in the second version exitcode 2? Can anyone help me to solve this problem? -- Roman -- PHP General Mailing List (http://www.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] SSL Connection with cURL
Roman, This is certainly not the exact answer you are looking for however... We had a lot of trouble using the PHP curl commands directly. We are currently doing a large volume of transactions using cURL with great success by shelling to it. I am attaching a very simple example of what we are doing below. Most of this code is straight out of the cURL web site. function call_CURL($data) { $URL=www.foo.com/cgi-bin/blah.pl?submit; exec(/path_to_curl/curl -m 120 -d \$data\ https://$URL -L,$return_message_array, $return_number); for ($i = 0; $i count($return_message_array); $i++) { $results = $results.$return_message_array[$i]; } return $results; } I hope this helps some. Gerard On Thu, 20 Dec 2001 21:14:35 +0100, Roman Eich wrote: Hi NG, i want to establish an SSL connection with cURL. I used two different scripts, 1) $URL=ssl.server.com/path/file.ext; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,https://$URL;); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS , $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); $x = curl_errno($ch); print($xbr$result); curl_close ($ch); and get exitcode 1 2) function cURL ($URL, $options=) { $command=/usr/local/bin/curl; $options.= --stderr; $execstring=escapeshellcmd($command. .$URL. .$options); exec($execstring, $stdout, $errorcode); $output = implode (\n, $stdout); if ($errorcode0) $output=; return $output; } $URL=https://ssl.server.com/path/file.ext;; $options= -d $data; $data = cURL ($URL, $options); and get exitcode 2 Why i get two different exitcodes and why i get in the second version exitcode 2? Can anyone help me to solve this problem? -- Roman -- PHP General Mailing List (http://www.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] none
Ok i am in test -- PHP General Mailing List (http://www.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: undefined function: ftp_connect()
You need to compile with ftp support. --with-ftp is not the right command, it should be --enable-ftp Mike Sam Schenkman-Moore wrote: I've compiled php 4.0.6 on Darwin as CGI. --with-ftp shows up in the php configuration display but I still get this message: undefined function: ftp_connect() I've read a couple past articles with people having this problem but I did not spot a solution. Any suggestions? Thanks, Sam -- PHP General Mailing List (http://www.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] Issues with fopen long file names?
I'm trying to open a file using php 4.1.0 under windows 2k server. The script uses fopen and the filename is long (approx 40 characters + extension). I'm getting the error: Warning: fopen(c:\_file_345176fo90301b70374d2f30e5a11d5b.ext , r) - Invalid argument in file.php on line 127 can fopen not handle long file names, or am I doing something wrong? The script uses \\ not \, so that's not the problem (even though only one \) is displayed above. if fopen can't display long file names, is there a function that will return the short (i.e. _file_~1.ext) format? any help is appreciated. Javier Muniz Granicus, LTD. (www.granicus.com) Tel: (415) 522-5216 Fax: (415) 522-5215 -- PHP General Mailing List (http://www.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] web server crashing with either 4.1.0 or 4.0.6
when trying at access any php scripts my web server is crashing. i'm experiencing this problem with both php 4.0.6 and 4.1.0 on iplanet enterprise 6.0sp1 on solaris 8. my web server is logging the following error: catastrophe (21929): Server crash detected (signal SIGSEGV) info (21929): Crash occurred in NSAPI SAF php4_execute info (21929): Crash occurred in function _pthread_mutex_lock from module /usr/lib/libthread.so.1 i'm getting this behavior with php code as simple as: ?php phpinfo(); ? any help would be appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Suggestions for the next php
Hi! I have been a PHP user since version 3.0 came out, and have seen it develop a lot along the way, but theres some things I find it lacks that it really should not. If people agree, I'll glady contribute to the PHP codebase. For example, multi-threading. Looking at the PHP sources, I can see this would be fairly easy to implement on some most server modules. Before I get fried by people for suggesting this, I know there are many functions that are not thread safe, such the ob_* functions. But as far as I can see threading would be well suited to some PHP tasks... I'd like to hear users thoughts on this. TIA, Stephano Mariani -- PHP General Mailing List (http://www.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] Translate question
Hello, I am trying to transalte entry in Turkish Characters to English Characters. I wrote the following code. function translate_turkish($string) { $estring = strtr($string, ç, c); $estring = strtr($string, ç, c); $estring = strtr($estring, ð, g); $estring = strtr($estring, G, G); $estring = strtr($estring, þ, s); $estring = strtr($estring, S, S); $estring = strtr($estring, ý, i); $estring = strtr($estring, I, XX); * $estring = strtr($estring, ü, u); $estring = strtr($estring, Ü, U); $estring = strtr($estring, ö, o); $estring = strtr($estring, Ö, O); return ($estring) ; } Capital i (not I but it shows at the line where you see the XX) is causing a problem. I can not translate. from cap i to I. Can you please suggest any help? = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] MS Word text pasted into forms
Occasionally, I have a problem dealing with some of the special characters from text authored in MS Word, and then pasted into a web form. It seems that somewhere something bad happens and what eventually gets put into mysql via php is not correct. In particular, I have trouble with apostrophes and accented vowels. Is the solution to disallow users (it's an admin, so this is realistic) from pasting from MS Word? -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MS Word text pasted into forms
Jim, Have you tried a regular expression. Something like ereg_replace([^[:alnum:]|[:space:]|[:punct:]@], , $string); to clean the string? Gerard O On Thu, 20 Dec 2001 17:02:58 -0500, jimtronic wrote: Occasionally, I have a problem dealing with some of the special characters from text authored in MS Word, and then pasted into a web form. It seems that somewhere something bad happens and what eventually gets put into mysql via php is not correct. In particular, I have trouble with apostrophes and accented vowels. Is the solution to disallow users (it's an admin, so this is realistic) from pasting from MS Word? -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [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] How to check if a session exists
If a sesson_id is known, how can check if the session exists? Alex -- PHP General Mailing List (http://www.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] Global Arrays ?
Hi all, I've got an array in the global scope called $g_months which oddly enough contains the names of the months. Now when I try to import this into a function as global $g_months; it doesn't work. When php prints out the array as an option box I just wind up with no options. Any ideas why this is the case ? Am I doing something wrong ? Jason -- Hofstadter's Law : It always takes longer than you expect, even when you take Hofstadter's Law into account. -- PHP General Mailing List (http://www.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] New Object Oriented Programming (OOP) mailing list for PHP programmers
Hello, Despite I already created this list a long time ago, only now I am announcing it as a general purpose forum for discussing matters related with Object Oriented Programming done in PHP. Everybody is invited and to join all you need to do is to send a message to [EMAIL PROTECTED] or go to the page http://groups.yahoo.com/group/php-objects/ . If you send the message to the above address I think you do not need to have a Yahoo account if you don't have one and don't want to subscribe to it. 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] Global Arrays ?
Sounds quite odd - you may try an echo(serialize($g_months)) in the function and see what you get... It may be that the code generating the option box has problems - this way you make sure $g_months is empty indeed. Bogdan Jason Rennie wrote: Hi all, I've got an array in the global scope called $g_months which oddly enough contains the names of the months. Now when I try to import this into a function as global $g_months; it doesn't work. When php prints out the array as an option box I just wind up with no options. Any ideas why this is the case ? Am I doing something wrong ? -- PHP General Mailing List (http://www.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] Global Arrays ?
Sounds quite odd - you may try an echo(serialize($g_months)) in the function and see what you get... It may be that the code generating the option box has problems - this way you make sure $g_months is empty indeed. Thanks for that. IT appears to be a problem with the function itself, as the array is full of stuff. I guess the next question is, what am i doing wrong here, that lets it work with a local array but not a global one ? function html_option_months($selected_month) { global $g_months; echo(serialize($g_months)); $result = ; while (list($key, $val) = each($g_months)) { $result .= html_option($key,$val, ($selected_month == $key)); } return $result; } Jason -- Hofstadter's Law : It always takes longer than you expect, even when you take Hofstadter's Law into account. -- PHP General Mailing List (http://www.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 20 Dec 2001 23:58:35 -0000 Issue 1064
php-general Digest 20 Dec 2001 23:58:35 - Issue 1064 Topics (messages 78314 through 78368): Re: PHP3 NOT being parsed for SSI!! HELP!! 78314 by: dimok Re: Size of array in bytes 78315 by: Bogdan Stancescu 78316 by: Stefan Rusterholz PHP / SSL 78317 by: Richard Black 78321 by: TD - Sales International Holland B.V. 78322 by: Shane Wright 78323 by: Jon Farmer Convert tif -- jpg 78318 by: Roman 78319 by: Bogdan Stancescu 78320 by: Roman 78330 by: Miles Thompson Re: Signing Files with PGP 78324 by: Brian Clark 78326 by: Jon Farmer Uploading Word Document problem 78325 by: Alexis Antonakis Limit script memory usage !! 78327 by: Nicolas Guilhot 78328 by: Jerry Verhoef (UGBI) Help with Sessions - Should be easy =] 78329 by: Tomasz Jachimczak 78338 by: Fred Re: $PHP_SELF not working -please help 78331 by: Alawi 78332 by: Alawi 78344 by: Phillip Oertel How can I have CVS ? 78333 by: Alawi 78342 by: Nathan Cassano compressed content and output buffering 78334 by: Shane Wright Need another verse 78335 by: bill 78345 by: Kevin Stone 78351 by: bill Re: PHP 4.1.0 patch for Quanta IDE, The Sequel 78336 by: J Smith 78339 by: Mike Eheler 78341 by: Jack Dempsey 78343 by: Mike Eheler rrd tool's graphing and png 78337 by: Lancashire, Pete fsockopen / fopen 78340 by: James Cox Images 78346 by: PHP List 78350 by: PHP List 78352 by: Joel Boonstra undefined function: ftp_connect() 78347 by: Sam Schenkman-Moore 78353 by: Chris Lee 78357 by: Mike Eheler Re: Quanta IDE - PHP Highlighing for 4.0.1 78348 by: Austin Gonyou List all session currently associated with a web site 78349 by: Alex Shi SSL Connection with cURL 78354 by: Roman Eich 78355 by: Gerard Onorato none 78356 by: Arsen Kirillov Issues with fopen long file names? 78358 by: Javier Muniz web server crashing with either 4.1.0 or 4.0.6 78359 by: Ian McNish Suggestions for the next php 78360 by: Stephano Mariani Translate question 78361 by: Mehmet Kamil ERISEN MS Word text pasted into forms 78362 by: jimtronic 78363 by: Gerard Onorato How to check if a session exists 78364 by: Alex Shi Global Arrays ? 78365 by: Jason Rennie 78367 by: Bogdan Stancescu 78368 by: Jason Rennie New Object Oriented Programming (OOP) mailing list for PHP programmers 78366 by: Manuel Lemos 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--- Hello, For including file you can use function virtual() with the file to include as parameter. This work under Apache only. Hope, it'll be useful for you. dimok - Original Message - From: Thomas Edison Jr. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 19, 2001 11:09 PM Subject: [PHP] PHP3 NOT being parsed for SSI!! HELP!! Folks, I have a serious problem and i don't know what to do. We have a fixed template for each intranet page. Now the template consists of a header, a left navigation and a footer. The body would contain my pages content. What we are doing at present is that the header, the left navigation and the footer is included in the page using SSI. The header is a static include file. However the footer and the left navigation are customizable, and hence are dynamic pages (cgi scripts) which generate the appropriate code depending on the command line parameters. Now the problem is that php3 pages are not being parsed for SSI. I looked up on the web , and found that only one of two can be used at the same time. Can anyone suggest a Possible Solution? We are running a Solaris machine! Thanks, T. Edison Jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] ---End Message--- ---BeginMessage--- Had the same problem not long ago and I didn't find a simple solution
Re: [PHP] Global Arrays ?
The first thing that comes to mind - if you say it's working with local variables - is trying to set it local prior to using it (i.e. insert a $loc_months=$g_months just below global $g_months and use the local variable from then on). It may be a bug in your PHP - walking an array with each probably sets some internal position marker which may be buggy for your very situation (global variable in local function - something like that). Bogdan Jason Rennie wrote: Sounds quite odd - you may try an echo(serialize($g_months)) in the function and see what you get... It may be that the code generating the option box has problems - this way you make sure $g_months is empty indeed. Thanks for that. IT appears to be a problem with the function itself, as the array is full of stuff. I guess the next question is, what am i doing wrong here, that lets it work with a local array but not a global one ? function html_option_months($selected_month) { global $g_months; echo(serialize($g_months)); $result = ; while (list($key, $val) = each($g_months)) { $result .= html_option($key,$val, ($selected_month == $key)); } return $result; } Jason -- Hofstadter's Law : It always takes longer than you expect, even when you take Hofstadter's Law into account. -- PHP General Mailing List (http://www.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] Global Arrays ?
It may be a bug in your PHP - walking an array with each probably sets some internal position marker which may be buggy for your very situation (global variable in local function - something like that). Thanks for that. I tried it with foreach and it works now. Jason -- Hofstadter's Law : It always takes longer than you expect, even when you take Hofstadter's Law into account. -- PHP General Mailing List (http://www.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: Global Arrays ?
Add a reset($g_months) right before your while(...) statement. On Fri, 21 Dec 2001, Jason Rennie wrote: Sounds quite odd - you may try an echo(serialize($g_months)) in the function and see what you get... It may be that the code generating the option box has problems - this way you make sure $g_months is empty indeed. Thanks for that. IT appears to be a problem with the function itself, as the array is full of stuff. I guess the next question is, what am i doing wrong here, that lets it work with a local array but not a global one ? function html_option_months($selected_month) { global $g_months; echo(serialize($g_months)); $result = ; while (list($key, $val) = each($g_months)) { $result .= html_option($key,$val, ($selected_month == $key)); } return $result; } Jason -- Hofstadter's Law : It always takes longer than you expect, even when you take Hofstadter's Law into account. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Number Format
Like the other guy said or take a look at the sprintf() function. On Thu, 20 Dec 2001, phantom wrote: I would like to format numbers to be a fixed width. I want all numbers to be 2 characters in width to the left of the decimal point. 1 should be 01 2 should be 02 3 should be 03 How can I do this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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: Global Arrays ?
Why is this needed in this case an not for local variables? You probably are right, I don't imply you aren't, but why is a reset needed in local scope when using global variables? Is it possible to start an each() in a function and continue it in another for global arrays? Philip Hallstrom wrote: Add a reset($g_months) right before your while(...) statement. -- PHP General Mailing List (http://www.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] Number Format
Or http://www.php.net/manual/en/function.sprintf.php or http://www.php.net/manual/en/function.printf.php At 04:45 PM 12/20/01 , Bogdan Stancescu [EMAIL PROTECTED] wrote: if ($i10) { $i=0.$i } ? :-) phantom [EMAIL PROTECTED] wrote: I would like to format numbers to be a fixed width. I want all numbers to be 2 characters in width to the left of the decimal point. 1 should be 01 2 should be 02 3 should be 03 How can I do this? ++ | Steve Edberg [EMAIL PROTECTED] | | Database/Programming/SysAdmin(530)754-9127 | | University of California, Davis http://pgfsun.ucdavis.edu/ | +-- Gort, Klaatu barada nikto! --+ -- PHP General Mailing List (http://www.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] Bookmarking pages
Hi all, again, I need to be able to have working bookmarkable pages in a system. The user has session ID's which have to time out, so when they do the user is kicked out of the system. But i've been asked to set it up so that after a user gets kicked to a login screen becasue they have an expired/invalid session id, to let them go back to the page they where on before getting booted. No all of the non-session id variables will be in the $HTTP_GET_VARS array (right ?), but how do I get the file that the user has just come from ? Jason -- Hofstadter's Law : It always takes longer than you expect, even when you take Hofstadter's Law into account. -- PHP General Mailing List (http://www.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] Help with Sessions - Should be easy =]
At 01:53 AM 12/21/2001 +1100, Tomasz Jachimczak wrote: I am retreiving user information from a database after verification, and would like to place certain feilds into a session variable for easy access/retreival. I can get the information out of the database, but cannot place it into any sort of variable that will store on the page. Why would you want to? If the information you need is available in your database, why not query the database for it on each page you need to reference this data? It seems kind of strange to me to take data you have in one server-side information store (the db) and move it into another (a server-side session cookie)...the overhead to get the info out should be the same both ways. Now that is assuming that you aren't already using session variables for something else. If you are then I could understand a little better. Either way, you'll need to provide a few more details about what you've tried and what your experiences have been before anyone will be able to help you... You haven't really described your problem beyond saying that you cannot get it to work. Have you registered your variable with session_register()? Have you started the session with session_start() on the pages you need to access this variable? -- PHP General Mailing List (http://www.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] Mommy, is it true that...?
Hi everybody! Two things I consider urban myths about PHP (plus MySQL) - please let me know what you think of these: 1. The evil global variables Ok, the classic ? if ($pwd==GOODPASSWORD) { $lethimin=1; } [bullshit code] if ($lethimin) { echo(fread(fopen(/etc/passwd,r))); } ? is obviously valid. But let's be serious, who codes this? The example code is valid and it's easily crackable indeed, but you don't do that kind of thing - you do it in one step. Even if you really need the bullshit code in there for some obscure reason, this is the log in code damnit, anybody takes care of that! Why I raised this issue is because I think people tend to get paranoid about PHP. And that happens in both worlds - customers and developers. Nothing to say about customers, I'd be careful too if I heard some dude got intoxicated at a McDonald's in Bogota. My problem is with developers - they got it in their head that variables are your enemy and initialize everything nowadays - including local variables! My question to you guys is this: does anybody know of a real example of reasonably careful coding led to disaster with global variables? 2. Please enter your age: 25; drop database mysql Does this actually work? I've read at least a dozen articles telling people to get it in their blood not to trust users and addslashes to any king incoming data, as well as pass it as strings to mysql (insert into person set age='$age' instead of insert into person set age =$age). So I decided I had to test this: I wrote the code exactly as in the example; I provided the exact dangerous input (well, to be honest, I tried a select instead of drop mysql). When I tried it, the presumably dangerous situation degraded into a trivial MySQL error. It went something like You have an error near '; select 1+1'. Did you ever actually try this? Does it work on your system? Thanks in advance for the input! 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]
RE: [PHP] How can I have CVS ?
At 10:19 AM 12/20/2001 -0800, Nathan Cassano wrote: And the answer is... WinCVS Check it our at. http://www.cvsgui.org/ And don't forget TortoiseCVS. http://www.cvsgui.org/TortoiseCVS/index.shtml -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[Fwd: [PHP] Number Format]
Inadvertedly sent to me: Bas van Rooijen wrote: sprintf(%02d, $i); but you should indeed check out how this function works.. phantom wrote: I would like to format numbers to be a fixed width. -- PHP General Mailing List (http://www.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] Mommy, is it true that...?
At 03:39 AM 12/21/2001 +0200, Bogdan Stancescu wrote: Hi everybody! Two things I consider urban myths about PHP (plus MySQL) - please let me know what you think of these: 1. The evil global variables [...] My question to you guys is this: does anybody know of a real example of reasonably careful coding led to disaster with global variables? I personally don't, but apparently the PHP developers think it's enough of a risk that they've deprecated register_globals in 4.1.0... 2. Please enter your age: 25; drop database mysql Does this actually work? [...] So I decided I had to test this: I wrote the code exactly as in the example; I provided the exact dangerous input (well, to be honest, I tried a select instead of drop mysql). When I tried it, the presumably dangerous situation degraded into a trivial MySQL error. It went something like You have an error near '; select 1+1'. I've done something similar in the past just for kicks, and I got the same result you did (i.e. an error). I believe this is because mysql_query() expects ONE query at a time and will break if you send two or more. I could be completely and totally wrong about that, though (someone please correct me if I am)... -- PHP General Mailing List (http://www.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: Re: Global Arrays ?
I don't think it has to do with local/global variables... it's more likely that he's already looped through a global array in which case the next call to each() will fail because it's already at the end. On Fri, 21 Dec 2001, Bogdan Stancescu wrote: Why is this needed in this case an not for local variables? You probably are right, I don't imply you aren't, but why is a reset needed in local scope when using global variables? Is it possible to start an each() in a function and continue it in another for global arrays? Philip Hallstrom wrote: Add a reset($g_months) right before your while(...) statement. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Mommy, is it true that...?
2. Please enter your age: 25; drop database mysql Does this actually work? [...] So I decided I had to test this: I wrote the code exactly as in the example; I provided the exact dangerous input (well, to be honest, I tried a select instead of drop mysql). When I tried it, the presumably dangerous situation degraded into a trivial MySQL error. It went something like You have an error near '; select 1+1'. I've done something similar in the past just for kicks, and I got the same result you did (i.e. an error). I believe this is because mysql_query() expects ONE query at a time and will break if you send two or more. I could be completely and totally wrong about that, though (someone please correct me if I am)... Maybe this one failed, but it's always a good idea to check user input. Let's say you're emailing a form and you don't use the mail() function, but make a call directly to sendmail... and you're sloppy... so you do this: $fp = fopen(|/usr/bin/sendmail $sendto); #write stuff to pipe to send email... Now... what if when I filled out the form I set $sendto equal to this: [EMAIL PROTECTED]; /usr/bin/mail [EMAIL PROTECTED] /etc/passwd You're form will still work, but I'll also get your password file... This used to happen *a lot* back in the early CGI days... This is why they recommend checking all user input and initializing variables... -philip -- PHP General Mailing List (http://www.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] Positioning HTML output in browser window
Hi Folks, I have a script that outputs a large data list to the web browser. When the user clicks the link for a particular data item they are taken to a new script to modify the record and then when the post the changes they are taken back to the original data list. (no problem so far) What I want is that when they return to the original data list it is positioned on the record they just modified. What happens is that the list is positioned at the top of the list. I tried generating a A NAME=lastpos/A in the orginal list, but I haven't been able to create the return link on the other page that will refrence this. I tried A HREF=myscript.php#lastpos?cat=$catLink/A but it doesn't work. Any ideas? -- Leland Foster -- PHP General Mailing List (http://www.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: Mommy, is it true that...?
At 06:03 PM 12/20/2001 -0800, Philip Hallstrom wrote: I've done something similar in the past just for kicks, and I got the same result you did (i.e. an error). I believe this is because mysql_query() expects ONE query at a time and will break if you send two or more. I could be completely and totally wrong about that, though (someone please correct me if I am)... Maybe this one failed, but it's always a good idea to check user input. Let's say you're emailing a form and you don't use the mail() function, but make a call directly to sendmail... and you're sloppy... so you do this: [...] True. But we were speaking specifically about MySQL. When you start toying with external programs and exec() and so forth then you've opened up a whole other can of worms security-wise... $fp = fopen(|/usr/bin/sendmail $sendto); #write stuff to pipe to send email... Now... what if when I filled out the form I set $sendto equal to this: [EMAIL PROTECTED]; /usr/bin/mail [EMAIL PROTECTED] /etc/passwd A definite possibility, but it does depend on the hacker in question knowing exactly how your script is written... -- PHP General Mailing List (http://www.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: Mommy, is it true that...?
At 06:03 PM 12/20/2001 -0800, Philip Hallstrom wrote: I've done something similar in the past just for kicks, and I got the same result you did (i.e. an error). I believe this is because mysql_query() expects ONE query at a time and will break if you send two or more. I could be completely and totally wrong about that, though (someone please correct me if I am)... Maybe this one failed, but it's always a good idea to check user input. Let's say you're emailing a form and you don't use the mail() function, but make a call directly to sendmail... and you're sloppy... so you do this: [...] True. But we were speaking specifically about MySQL. When you start toying with external programs and exec() and so forth then you've opened up a whole other can of worms security-wise... True, but why take the chance? :) I didn't see an equivalent for MySQL, but PostgreSQL has a pg_put_line() which just sends a NULL terminated string to the backend so you can do whatever you want (ie. multi statement). So in that case things could get messed up. $fp = fopen(|/usr/bin/sendmail $sendto); #write stuff to pipe to send email... Now... what if when I filled out the form I set $sendto equal to this: [EMAIL PROTECTED]; /usr/bin/mail [EMAIL PROTECTED] /etc/passwd A definite possibility, but it does depend on the hacker in question knowing exactly how your script is written... True, but in a shared hosting environment this is very likely. -philip -- PHP General Mailing List (http://www.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] Positioning HTML output in browser window
Well, you can always code in a little Javascript, such as window.location='#lastpos'... Leland wrote: I tried generating a A NAME=lastpos/A in the orginal list, but I haven't been able to create the return link on the other page that will refrence this. I tried A HREF=myscript.php#lastpos?cat=$catLink/A but it doesn't work. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Mommy, is it true that...?
Philip Hallstrom wrote: A definite possibility, but it does depend on the hacker in question knowing exactly how your script is written... True, but in a shared hosting environment this is very likely. ...not to mention open source code. However, the discussion was indeed oriented towards MySQL. Hoever (again), the exec() argument is indeed something worth mentioning - I now realize there may be some serious security holes in an open-source project I'm currently woking on (ouch!) 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]
Re: [PHP] Re: Mommy, is it true that...?
how does one prevent a hacker deleting tables or what not? This is a topic I do not know enough about, thanks for opening my eyes to this matter joel
Re: [PHP] Re: Mommy, is it true that...?
Well, the official point is rather obvious from my original e-mail. What I personally do is either forget about it -- again, see the original e-mail -- or, if for some reason high security is needed, I simply add 0 (zero) to numeral input fields and addslashes to strings. Bogdan [EMAIL PROTECTED] wrote: how does one prevent a hacker deleting tables or what not? This is a topic I do not know enough about, thanks for opening my eyes to this matter joel -- PHP General Mailing List (http://www.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: Mommy, is it true that...?
At 04:26 AM 12/21/2001 +0200, Bogdan Stancescu wrote: Philip Hallstrom wrote: A definite possibility, but it does depend on the hacker in question knowing exactly how your script is written... True, but in a shared hosting environment this is very likely. ...not to mention open source code. Oh yeah. Guess I had a mental lapse there. If you are using, say, a script downloaded from freshmeat.net and it happens to be poorly secured then obviously the entire free world is going to know how to exploit your copy of itduh -- PHP General Mailing List (http://www.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: Mommy, is it true that...?
True, but in a shared hosting environment this is very likely. ...not to mention open source code. Oh yeah. Guess I had a mental lapse there. If you are using, say, a script downloaded from freshmeat.net and it happens to be poorly secured then obviously the entire free world is going to know how to exploit your copy of itduh Actually that's exactly what I had in mind. Heck, if your point is that they don't know your URL then what's the point in the whole security issue anyways? -- PHP General Mailing List (http://www.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] Algorithm: Limiting Large Numbers of Pages to 10 visible
Hi, I need an algorithm for paging. If I have 100 pages of results, I only want to show Prev 1 2 3 4 5 6 7 8 9 10 Next Where I limit the number to 10 results of pages, but I cannot figure it out for the life of me. for ($i = $page; $i = ($page+10); $i++) { if ($i != $page) { echo a href=\$PHP_SELF?catid=$catidpage=$i\$i/a ; } else { echo $i ; } } echo a href=\$PHP_SELF?catid=$catidpage=$i\/a ; echo a href=\$PHP_SELF?catid=$catidpage=$num_pages\End/a ; } But what I need to do is not show pages that aren't there, and I'm hardwiring it to show 10 whether they exist or not. I've got to believe that there's a really slick way of doing this. I've searched the usual places (weberdev.com, devshed.com, zend.com) but there's no really good keywords, and when you search on 'paging you get too many results to be useful Thanks in advance, Lara - Lara J. Fabans Lodestone Software, Inc [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: Mommy, is it true that...?
At 04:51 AM 12/21/2001 +0200, Bogdan Stancescu wrote: True, but in a shared hosting environment this is very likely. ...not to mention open source code. Oh yeah. Guess I had a mental lapse there. If you are using, say, a script downloaded from freshmeat.net and it happens to be poorly secured then obviously the entire free world is going to know how to exploit your copy of itduh Actually that's exactly what I had in mind. Heck, if your point is that they don't know your URL then what's the point in the whole security issue anyways? I'm sorry, you've lost me. When did the question of knowing URLs come into this? I was referring to a hacker having access to your PHP script source. Freshmeat.net is a very popular database of linux software and includes a wide variety of PHP scripts. My point was that if you downloaded an insecure script from such a popular site then you are asking for trouble because chances are thousands of would-be hackers have ALSO downloaded the same script and have familiarized themselves with ways that it can be exploited... -- PHP General Mailing List (http://www.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: Mommy, is it true that...?
My 2c worth... IMO, If you download a script and just blindly copy it to your system, then you're just asking for trouble, period - I think you should ALWAYS check code for anything that could be malicious and also check for any loopholes that need to be closed before using it. This might mean changing the names of variables/functions or rewriting some of the code entirely. I don't trust any code that people send me, I always check it first, if possible... -Original Message- From: Michael Sims [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 3:20 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Mommy, is it true that...? At 04:51 AM 12/21/2001 +0200, Bogdan Stancescu wrote: True, but in a shared hosting environment this is very likely. ...not to mention open source code. Oh yeah. Guess I had a mental lapse there. If you are using, say, a script downloaded from freshmeat.net and it happens to be poorly secured then obviously the entire free world is going to know how to exploit your copy of itduh Actually that's exactly what I had in mind. Heck, if your point is that they don't know your URL then what's the point in the whole security issue anyways? I'm sorry, you've lost me. When did the question of knowing URLs come into this? I was referring to a hacker having access to your PHP script source. Freshmeat.net is a very popular database of linux software and includes a wide variety of PHP scripts. My point was that if you downloaded an insecure script from such a popular site then you are asking for trouble because chances are thousands of would-be hackers have ALSO downloaded the same script and have familiarized themselves with ways that it can be exploited... -- PHP General Mailing List (http://www.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: Mommy, is it true that...?
Freshmeat.net is a very popular database of linux software and includes a wide variety of PHP scripts. My point was that if you downloaded an insecure script from such a popular site then you are asking for trouble because chances are thousands of would-be hackers have ALSO downloaded the same script and have familiarized themselves with ways that it can be exploited... So would you rather just use pre-compiled binaries from some company that says trust me? You're responsible for the code on your site. If it's open-source one at least has a fighting chance of examining it. If it's too complex for someone to understand, then they shouldn't use it. Billy -- PHP General Mailing List (http://www.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: Mommy, is it true that...?
At 11:28 PM 12/20/2001 -0500, Billy Harvey wrote: Freshmeat.net is a very popular database of linux software and includes a wide variety of PHP scripts. My point was that if you downloaded an insecure script from such a popular site then you are asking for trouble because chances are thousands of would-be hackers have ALSO downloaded the same script and have familiarized themselves with ways that it can be exploited... So would you rather just use pre-compiled binaries from some company that says trust me? Sigh. No. The thread has meandered quite a bit, and you'd have to read the whole thing to see how we got to this point. To summarize: Someone made the point that you should always carefully check user submitted data, and provided an example using an poorly secured fopen() statement whereby a hacker could gain access to /etc/passwd. I responded by saying that to do such a thing the hacker would have to know exactly how your code is written. Someone else responded saying that this was indeed likely in shared hosting environments or open source software. The above is me agreeing and saying oh I didn't think of that Nowhere did I say that I think this is a disadvantage of OSS. If you wish to extrapolate an argument from what I wrote above then here's a good one: When you install software that could be a potential security risk then you should attempt to use well established, peer-reviewed OPEN SOURCE software and ideally review at the code yourself to make sure it meets your standards of security and doesn't contain any nasty exploits. See, I'm one of the good guys...a dot communist, just like you. ;-) -- PHP General Mailing List (http://www.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: Mommy, is it true that...?
another 2c worth... So it's the programmer's responsibility to ensure all his/her code is as secure as possible. If it can be shown that it isn't secure, then the programmer should endevour to close that hole. This goes for any area that hackers can exploit, software and hardware... -Original Message- From: Michael Sims [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 3:43 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Mommy, is it true that...? At 11:28 PM 12/20/2001 -0500, Billy Harvey wrote: Freshmeat.net is a very popular database of linux software and includes a wide variety of PHP scripts. My point was that if you downloaded an insecure script from such a popular site then you are asking for trouble because chances are thousands of would-be hackers have ALSO downloaded the same script and have familiarized themselves with ways that it can be exploited... So would you rather just use pre-compiled binaries from some company that says trust me? Sigh. No. The thread has meandered quite a bit, and you'd have to read the whole thing to see how we got to this point. To summarize: Someone made the point that you should always carefully check user submitted data, and provided an example using an poorly secured fopen() statement whereby a hacker could gain access to /etc/passwd. I responded by saying that to do such a thing the hacker would have to know exactly how your code is written. Someone else responded saying that this was indeed likely in shared hosting environments or open source software. The above is me agreeing and saying oh I didn't think of that Nowhere did I say that I think this is a disadvantage of OSS. If you wish to extrapolate an argument from what I wrote above then here's a good one: When you install software that could be a potential security risk then you should attempt to use well established, peer-reviewed OPEN SOURCE software and ideally review at the code yourself to make sure it meets your standards of security and doesn't contain any nasty exploits. See, I'm one of the good guys...a dot communist, just like you. ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to save the result page generated by a Form?
When one sends an email to an address in PHP, does any one out there no how to send to two or more email addresses. --- Mark Webley Multimedia design and development WebleyCity Limited London United Kingdom [EMAIL PROTECTED] [EMAIL PROTECTED] Mobile: 07980 213 627 Fax/Tel: 0208 678 1721 Pager 07654 581816 http://www.webleycity.co.uk --- From: Stefan Rusterholz [EMAIL PROTECTED] Organization: interaktion Reply-To: Stefan Rusterholz [EMAIL PROTECTED] Date: Thu, 20 Dec 2001 11:11:28 +0100 To: Joe [EMAIL PROTECTED] Cc: PHP [EMAIL PROTECTED] Subject: Re: [PHP] How to save the result page generated by a Form? I don't know if it matches your needs but perhaps it helps: http://www.php.net/manual/en/ref.outcontrol.php http://www.php.net/manual/it/ref.outcontrol.php this page isn't translated, but perhaps some subpages... good luck Stefan Rusterholz - Original Message - From: Joe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 20, 2001 10:38 AM Subject: [PHP] How to save the result page generated by a Form? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have a simple question. My Scenario: Page a.php - The Form The user insert his data (ie name, address, city and so on...)Then he submit the $ to b.php. Page b.php now shows : Hello Mr. $name , etc etc ... I nedd now to save what I see on the sreen as .txt or .rft or .html How can I do that? I try many ways ...(using no session) ..but I can only save the empty b.php page ...with no varialbles showed at all. Thanx for your help and Marry XMas from Italy. BR Joe -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com Comment: ID: 0x0A17124F - DH/DSS 2048/1024 - Joe Athena Webmaster iQA/AwUBPCGxOET82/4KFxJPEQK+yQCfdrsJMV6YXUxsqUxmgsTrVguHotUAn1pA tF+VwCUw1Cdv4k70aWtvrynp =GI2/ -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]