[PHP] HTML_Template_Flexy or Smarty
hi there I am trying to choose between the two, which one is efficient, but is also html programmer friendly and can still do template block style templating like fasttemplate or phemplate. I am trying to move people who have been using fasttemplate to a more efficient system, although these two systems have logic inside the templating. Let me know. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] register_user_func and register_shutdown_func
It's ok, I discovered that object (if not passed by reference explicitly) is first duplicated (internally) and only then the method is called. Proof code: ?php class myCls { var $myVar; function myCls() { $this-myVar = 1; } function myInc() { $this-myVar++; } function myEcho() { echo $this-myVar ; } } $myObj = new myCls(); $myObj-myEcho(); $myObj-myInc(); $myObj-myEcho(); call_user_func(array($myObj, 'myInc')); $myObj-myEcho(); unset($myObj); echo \n; $myObj = new myCls(); $myObj-myEcho(); $myObj-myInc(); $myObj-myEcho(); call_user_func(array($myObj, 'myInc')); $myObj-myEcho(); ? produces output: 1 2 2 1 2 3 On Wednesday 15 December 2004 08:28, Bostjan Skufca @ domenca.com wrote: Hi all, is there any internal difference between following calls (they occur inside some class)? #1 register_shutdown_function(array($this, 'myfunc')); #2 register_shutdown_function(array($this, 'myfunc')); (note the reference operator in #2) Or is parameter $this in example #1 forced to be taken as reference internally, which makes both calls basically identical? Thank you for your kind response. Best regards, Bostjan Skufca -- Best regards, Bostjan Skufca system administrator Domenca d.o.o. Phone: +386 4 5835444 Fax: +386 4 5831999 http://www.domenca.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Turn off out of offfice messages for the list, please
Hello John, Wednesday, December 15, 2004, 12:43:43 AM, you wrote: JH I'm sure many of us will be taking some time off for the holidays (if JH you aren't already). Just a friendly reminder to either 1) unsubscribe JH while you're gone (you won't miss much, trust me) or 2) set your notice Goodness me, next you'll be hoping people don't top-post above a stack of quoted rubbish :) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I am not young enough to know everything. - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php graph?
Hi, Me new to PHP. Is there any good and free php graph scripts/class that I can use to generate graph like bar chart, pie chart and plots. If you have any good recommendation, can email me at [EMAIL PROTECTED] Thanks. Jonathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Question
[snip] I am new to this languaue and need some info. I am not a programmer but I need some info for a project I am working on. I have data in MS Access and I want to create graphs and charts using this data to display on a website. I read on your website PHP is able to do this. What do I need to know about setting this up? Do you reccommed MS Access or SQL for the database? Are there any special hardware I need? Once the program is written in PHP, How do I get this on the website? [/snip] You have asked a set of very broad questions, and you may not be able to set it up without the assistance of a programmer. What do I need to know about setting this up? Where do I start? Do you reccommed MS Access or SQL for the database? It really doesn't matter unless you need a superior product. Are there any special hardware I need? No, any server will usually do. Once the program is written in PHP, How do I get this on the website? Place the PHP pages on the web server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output buffering - saving + echoing
Not exactly sure what your question is. You want to catch the buffer, but don't delay the buffer to be sent??? If your question is that you want to hold the contents of the buffer and send it only when you are ready, don't use ob_end_flush, use ob_end_clean. The buffer is cleared without sending anything to the client. The buffer contents are still retained in the variable $buf. When you are ready, you can just echo $buf. The biggest advantage to output buffering, from a client server view, is that the contents can be compressed before sending to the client if the client supports compression (most browsers do). You'll get the best performance when you send everything at once instead of piecemeal. On Dec 14, 2004, at 9:01 PM, Lorderon wrote: Hi, When using ob_start(), the output is buffered and not sent till ob_end_flush() is called or got to end of the script. Also before flushing you can get the buffer contents by ob_get_contents(). ? //start buffering, from now on no output. //NEED: start buffering, but output imediatly when echo. ob_start(); //this is not echoed now. //NEED: echo this now, but still buffer it too. echo Hello, World!; //getting the buffer contents. //NEED: getting the buffer contents. $buf=ob_get_contents(); //the buffer is echoed just now. //NEED: stop the buffering, and not output all the buffer now. ob_end_flush(); ? What I want to do is catch the output buffer, but do not delay the buffer to be sent. How is it done? thanks in advance, Lorderon. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cURL FTP
On Wed, 2004-12-15 at 08:27 -0500, Lowell Allen wrote: snip $fh = fopen(test.txt, r) or die($php_errormsg); /snip Try opening the file rw. At the moment, you're opening it read only. Ian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: HTML_Template_Flexy or Smarty
* Electroteque [EMAIL PROTECTED]: hi there I am trying to choose between the two, which one is efficient, but is also html programmer friendly and can still do template block style templating like fasttemplate or phemplate. I am trying to move people who have been using fasttemplate to a more efficient system, although these two systems have logic inside the templating. You're verging on a religious war here... My predictions: 1) 25% respond in favor of HTML_Template_Flexy 2) 25% respond in favor of Smarty 3) 25% respond in favor of different templating solutions altogether 4) 25% respond asking why you need a templating system at all when you have PHP As for my own leanings -- we use Smarty where I work, and I like its flexibility and the ease with which I can integrate it with regular HTML (I particularly like that it doesn't use angle brackets as its delimiters -- makes it easy to spot Smarty directives in the template). My one complaint about it: no error handling. I wish it had error handling ala PEAR -- occasionally I get errors in Smarty that end up being hard to debug due to the complexity of the templates and/or number of templates we're using to generate a page. -- Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output buffering - saving + echoing
Hi, Brent Baisley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Not exactly sure what your question is. You want to catch the buffer, but don't delay the buffer to be sent??? If your question is that you want to hold the contents of the buffer and send it only when you are ready, don't use ob_end_flush, use ob_end_clean. The buffer is cleared without sending anything to the client. The buffer contents are still retained in the variable $buf. When you are ready, you can just echo $buf. Thanks, but this is now what i meant for. I want the script to output data as regular like not using buffering. But I want to catch output chunks in variables. How this can be done? thanks, Lorderon. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output buffering - saving + echoing
Hi, Brent Baisley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Not exactly sure what your question is. You want to catch the buffer, but don't delay the buffer to be sent??? If your question is that you want to hold the contents of the buffer and send it only when you are ready, don't use ob_end_flush, use ob_end_clean. The buffer is cleared without sending anything to the client. The buffer contents are still retained in the variable $buf. When you are ready, you can just echo $buf. Thanks, but this is now what i meant for. I want the script to output data as regular like not using buffering. But I want to catch output chunks in variables. How this can be done? thanks, Lorderon. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php ide type scripts
Hi, Newbie learning php here. Does anyone (have|know where I can get) a set of html and php files to automate script and form writing? What I want is an html file with forms, drop down boxes, check boxes etc, that will allow me to quickly|automatically construct php and html code to run on my server. For instance, a template generator: to create a new file with the script directive for scripts I want to run from the shell and output plain text. to create a new file with html tags for server-scripts which will output html formatting to create scraps of code for function declarations, or control flow structures, using text boxes on an html form to name variables and set values, outputting the fully constructed scraps into another text area from which I can cut and paste into a main script. I don't want anything too complicated such as a fully blown graphical IDE that will take me a long time to learn. Cheers, Malcolm. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php ide type scripts
Malcolm, It's called a learning curve, and is necessary to know the mechanics of the language. If you try to short-circuit it, you'll forever be wondering How'd that happen? Just prepare some simple scripts and try them out, or use something like ColdFusion and be resigned to forever working in CF. Trust me on this - I tried to short-circuit dBase II by using Fox Geller's templating engine, except that because it had to be so general to handle every scenario, it wrote v. inefficient code. (It also wrote buggy code, and by the time you worked out their approach to programming you could have written the thing yourself.) And I've used a number of frameworks since; all have their pitfalls, usually because they have to be so general. So, work with the tutorials on the PHP site and use them as stepping stone to help you through that swamp labelled Slough of Stuff I Don't Know to the Uplands of Competency. Have fun - Miles Thompson At 11:13 AM 12/15/2004, Malcolm Mill wrote: Hi, Newbie learning php here. Does anyone (have|know where I can get) a set of html and php files to automate script and form writing? What I want is an html file with forms, drop down boxes, check boxes etc, that will allow me to quickly|automatically construct php and html code to run on my server. For instance, a template generator: to create a new file with the script directive for scripts I want to run from the shell and output plain text. to create a new file with html tags for server-scripts which will output html formatting to create scraps of code for function declarations, or control flow structures, using text boxes on an html form to name variables and set values, outputting the fully constructed scraps into another text area from which I can cut and paste into a main script. I don't want anything too complicated such as a fully blown graphical IDE that will take me a long time to learn. Cheers, Malcolm. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't install PHP 5.02 with Apache2
On Wed, 15 Dec 2004 11:21:42 -0500, Don [EMAIL PROTECTED] wrote: and am getting a compile error: apxs was not found. There is no file: /usr/sbin/apxs Mine is /usr/sbin/apxs2 -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hostname
In earlier versions of PHP, you could use the $HOSTNAME global variable to get the server/machine name that is running Apache/PHP. However, that variable is no longer working and I can't seem to find a replacement in any of the super global variables. Is there one? How can you get the server/machine name? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cURL FTP
On Dec 15, 2004, at 8:47 AM, Ian Firla wrote: On Wed, 2004-12-15 at 08:27 -0500, Lowell Allen wrote: I'm trying to FTP a text file from a commercial hosting server, but the file isn't being transferred and I'm not getting any feedback from the script. Here's the code: [snip] $c = curl_init(ftp:// $username:[EMAIL PROTECTED]); $fh = fopen(test.txt, r) or die($php_errormsg); curl_setopt($c, CURL_UPLOAD, TRUE); curl_setopt($c, CURL_TRANSFERTEXT, TRUE); curl_setopt($c, CURL_INFILE, $fh); curl_setopt($c, CURL_RETURNTRANSFER, TRUE); $result = curl_exec($c); curl_close($c); echo(p.$result./p\n); [snip] Try opening the file rw. At the moment, you're opening it read only. Thanks for the reply, but I'm opening test.txt as the local file for uploading. I don't need to write to it. (I tried it anyway, same result -- no result.) I've switched to ftp_put() and ftp_fput() and will start a new thread with a different subject line. -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] UPDATE
On Wed, 15 Dec 2004 10:10:22 -0600, Steve Marquez [EMAIL PROTECTED] wrote: I am trying to insert information into the database, have it automatically place an ID Number, then update that particular record and replace the word delete with the link. `delete` is a reserved word. Try wrapping it with backtics. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Hostname
In earlier versions of PHP, you could use the $HOSTNAME global variable to get the server/machine name that is running Apache/PHP. However, that variable is no longer working and I can't seem to find a replacement in any of the super global variables. Is there one? How can you get the server/machine name? $_SERVER['HTTP_HOST'] $_SERVER['SERVER_NAME'] Interesting. When I do: print_r( $_SERVER ) both of the above print out the site name and not the host name. For example, the site name is 'mysite.mydomain.com' and the servername is 'machinebob'. Each of the above print out 'mysite.mydomain.com' and not 'machinebob', which is what I was expecting. thnx, Chris
Re: [PHP] Can't install PHP 5.02 with Apache2
I think you need the httpd-devel package. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php graph?
Jonathan wrote: Hi, Me new to PHP. Is there any good and free php graph scripts/class that I can use to generate graph like bar chart, pie chart and plots. If you have any good recommendation, can email me at [EMAIL PROTECTED] Thanks. Jonathan jpgraph is excellent. I haven't checked out the new version yet for PHP5, but for PHP4 it is by far the best graphing utility I have seen. jpgraph has recently released support for PHP5 and I'm using it with no issues. -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] finding out the age from a birthdate
On Tue, 14 Dec 2004 22:37:41 +0100, Merlin [EMAIL PROTECTED] wrote: i am somehow strugling to find out how to get the age of a person from its birthdate. Has anybody an idea how to do that? function getAge( $b ) { $b = date( 'Y-m-d', strtotime( $b ) ); $a = explode( '-', $b ); $age = date( 'Y-m-d' ) - $b; return ( date( 'nd' ) $a[ 1 ].str_pad( $a[ 2 ], 2, '0', STR_PAD_LEFT ) ) ? $age -= 1 : $age; } echo getAge( $birthday ); -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Hostname
?php $Hostname = exec('hostname'); print $Hostname; ? -Original Message- From: Boget, Chris [mailto:[EMAIL PROTECTED] Sent: 15 December 2004 16:58 To: 'Jason Motes'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Hostname In earlier versions of PHP, you could use the $HOSTNAME global variable to get the server/machine name that is running Apache/PHP. However, that variable is no longer working and I can't seem to find a replacement in any of the super global variables. Is there one? How can you get the server/machine name? $_SERVER['HTTP_HOST'] $_SERVER['SERVER_NAME'] Interesting. When I do: print_r( $_SERVER ) both of the above print out the site name and not the host name. For example, the site name is 'mysite.mydomain.com' and the servername is 'machinebob'. Each of the above print out 'mysite.mydomain.com' and not 'machinebob', which is what I was expecting. thnx, Chris This message has been checked for all known viruses by the CitC Virus Scanning Service powered by SkyLabs. For further information visit http://www.citc.it ___ This message has been checked for all known viruses by the CitC Virus Scanning Service powered by SkyLabs. For further information visit http://www.citc.it ___ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output buffering - saving + echoing
Lorderon wrote: What I want to do is catch the output buffer, but do not delay the buffer to be sent. How is it done? I see three options here: #1 Call ob_start/ob_get_contents/ob_flush and repeat that a *LOT* within your script, so that you are buffering only a few lines of text at any given time: ?php $BUFFER = ''; ob_start(); echo Foo!BR\n; $BUFFER .= ob_get_contents(); ob_end_flush(); ob_start(); echo Bar!BR\n; $BUFFER .= ob_get_contents(); ob_end_flush(); ? #2 function buffer_print($text){ global $BUFFER; $BUFFER .= $text; print($text); } You could make #2 more fancy by accepting multiple arguments and using echo instead of print internally. #3 Write an extra script that does like this: ?php $file = file($real_url_they_asked_for); $BUFFER = implode('', $file); echo $file; ? #3 is going to be horrible for large pages, however. It occurs to me that maybe you should tell us WHY you want this, because there could be existing alternatives outside the scope of PHP that we could recommend... Caching servers such as Squid or Accelerators such as Zend Optimizer spring to mind. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Getting mail() to return false/0
Paul Reinheimer wrote: My understanding (or assumption) of how the MTA operates is that it would not accept a message it did not know how to deliver, ie one with an invalid destination address. There ain't no way the MTA can reliably predict an invalid address for other hosts/domains/machines. That's not how email works. :-) It's *possible* that a well-constructed MTA could maybe be configured to know that 'dude' is not a local user, alias, nor otherwise valid recipient, and that MTA could perhaps be configured to return an error in that case. But there isn't a whole lot PHP can do about this either way -- If your MTA isn't doing what you want it to do (return error for 'dude') then you'll need to focus your efforts on the MTA, completely independent of PHP. If you can get the MTA to complain right away on the command line that 'dude' is an invalid recipient, fire up PHP and test again. If all you get is a bounced email, then PHP ain't gonna magically do any better than that. To put it another way: PHP just spits out the answer the MTA gave it. If you don't like the answer, change the MTA. :-) You now have the joy of diving into sendmail documentation. Have fun. :-^ -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting name of class from a parent
Rory Browne wrote: You may be wondering why I don't just $instance = new utility_class - the reason is that I want to only create one of these instances. I don't want any more than one instance of utility_class at any one time. I can't use get_class($this) either, because, there is no $this when I'm accessing the method staticly. Google for PHP class singleton You will find several solutions. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Getting mail() to return false/0
On Thursday 16 December 2004 01:49, Richard Lynch wrote: You now have the joy of diving into sendmail documentation. Have fun. :-^ There are better, easier to use and more secure alternatives to sendmail. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* What time is it? I don't know, it keeps changing. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ftp_put() problem
On Thursday 16 December 2004 00:54, Lowell Allen wrote: But trying to avoid writing to the local server by using ftp_put() instead, this does not work: My manual says ftp_put() - Uploads a file to the FTP server And no, I can't find any command to upload a string in memory as a file. If you have a recent version of PHP you could use the regular filesystem functions to write 'directly' to an FP server. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Man will never fly. Space travel is merely a dream. All aspirin is alike. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Question in posting form-data
Hi, all, I am testing how to post form-data to a host using the following code (test.php): ?php function PostToHost($host, $path, $name, $value) { // Test of posting form-data $fp = fsockopen($host,80); fputs($fp, POST $path HTTP/1.1\n); fputs($fp, Host: $host\n); fputs($fp, Content-Type: multipart/form-data\n); fputs($fp, content-disposition: form-data; name=$name\n); fputs($fp, Connection: close\n\n); fputs($fp, $value\n); $res = ; while(!feof($fp)) { $res .= fgets($fp, 128); } fclose($fp); return $res; } $host = my.host; $path = /path/to/receive.php; $name = x; $value = ABC; $returnedValue = PostToHost($host, $path, $name, $value); echo $returnedValue; ? receive.php goes like this, ?php echo 'x = '.$_POST['x'].'; br /'; ? I got, .. Notice: Undefined index: x in /export/home/mydir/www/test.php on line 2 x = ; It looks like receive.php didn't receive the posted value. Is there anything wrong with the program? Thanks in advance for any help. -Minghua
Re: [PHP] Re: Getting mail() to return false/0
Jason Wong wrote: On Thursday 16 December 2004 01:49, Richard Lynch wrote: You now have the joy of diving into sendmail documentation. Have fun. :-^ There are better, easier to use and more secure alternatives to sendmail. I think only the U.S. Post Office is slower and less secure than sendmail. ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] downloading blob data
I have a MySQL server that gets accessed two ways: From php web applications and by MS Access programs. How can I write a php application to download files that were stored as blobs using MS Access bound object frames? Is it as simple as decoding it properly? I have not yet been able to figure out the encoding used by MS Access. -- John R Schleigh IV Information Manager (757) 488-9500 ___ Overload -- core meltdown sequence initiated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem starting Apache after PHP 5.0.2 installation
Hi, Just installed PHP 5.0.2 on a Fedora Core 3 system using Apache 2. One of my configure options was: --with-mcrypt I followed the docs at php.net and downloaded libmcrypt-2.5.7, and installed it as per INSTALL file. No problems compiling PHP. However, when I attempt to restart Apache, I get the following error: Starting httpd: Syntax error on line 191 of /etc/httpd/conf/httpd.conf: Cannot load /usr/lib/httpd/modules/libphp5.so into server: libmcrypt.so.4: failed to map segment from shared object: permission denied [FAILED] Any idea why mcrypt is crapping out with PHP? Thanks, Don --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.813 / Virus Database: 553 - Release Date: 12/13/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Security Advisory
http://www.hardened-php.net/advisories/012004.txt -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Good and free encoder for PHP5
Hi Manuel, Yes, Turck works with PHP5. My question is: if the last version was released a year ago, how much can i trust it ? BTW, how good is Truck's algorithm and how hard it is to reverse engineer the code ? portuguese mode Abraço aí para o Brasil, meu. A curtir o sol e as macacas no calçadão :) /portuguese mode Warm Regards, Mário Gamito Manuel Lemos wrote: Hello, Mário gamito said the following on 12/14/2004 08:51 AM: Does anyone around here knows a *good* and *free* encoder for PHP5 ? I used to run Turck, but it seems that somehow it has been discontinued. (At least, the last release occured about a year ago). Did it stop working? My Turck copy still works. ;-) -- Mário Gamito Administração de sistemas e desenvolvimento Netual - Multimédia e Telecomunicações, Lda. Rua João Afonso, Nº1 3800-198 Aveiro - Portugal Tel. +351 234 371 431 / Fax. +351 234 371 438 E-mail: [EMAIL PROTECTED] www.netual.pt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Parsing php in html with IIS
apache will run on windows so you shouldnt fear:) Anyways go into the properties tab of the IIS web server, you need to register .php as a valid file extension, there is a list of all file extensions under that tab (its one of the tabs in there i cant remember). Add in .php . If you've already mapped the php .dll or whatever to parse php files in that same IIS properties area you should be good to go after adding in that extension map.. phpninja -Original Message- From: Eric Lindsey [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 15, 2004 2:02 PM To: [EMAIL PROTECTED] Subject: [PHP] Parsing php in html with IIS Gents, How do I configure my IIS server to parse a specific .html file for php code? I know how to do this on apache, but windows scares me :-) THANKS! Eric Lindsey Colorado Information Technologies Inc. http://www.coinfotech.com http://www.coinfotech.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Question in posting form-data
Hello, on 12/15/2004 06:00 PM Minghua Yao said the following: It looks like receive.php didn't receive the posted value. Is there anything wrong with the program? Thanks in advance for any help. It seems that the line breaks are wrong. Anyway, instead of reinventing the wheel, you may want to try this popular HTTP client class that supports post forms among other features. http://www.phpclasses.org/httpclient -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parsing php in html with IIS
Gents, How do I configure my IIS server to parse a specific .html file for php code? I know how to do this on apache, but windows scares me :-) THANKS! Eric Lindsey Colorado Information Technologies Inc. http://www.coinfotech.com http://www.coinfotech.com/
Re: [PHP] Re: Good and free encoder for PHP5
Mário gamito wrote: Hi Manuel, Yes, Turck works with PHP5. My question is: if the last version was released a year ago, how much can i trust it ? IIRC the main developer for Turck was hired by Zend... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Good and free encoder for PHP5
Hello, on 12/15/2004 08:35 PM Greg Donald said the following: Software it is not like people, it does not stop working with age. I have all kinds of old software that doesn't work anymore. That is because you changed the environment on which it was working. The problem is always with people, not with software. Some people feel that they need to ride the latest wave and always upgrade to the latest versions as soon as they are released. The reality is that new versions have new bugs and there is no guaranteed that new bugs are not worse than the bugs in old versions. The point is that if you do not need to use the latest version, just stick to the one you have and works for you. It will probably take 1 year or so for PHP 5 to be as bug free as the current PHP 4, so my advice is to not upgrade unless you really need something fundamental only provided by PHP 5. -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using constructs like unset() in expressions like ()()
Hi all. Is there some construct, which evaluates any type of its parameter (like t_echo, t_unset) and returns some value with normal type (like 0)? What? I would like to unset a variable in an operation like ()?unset():() and I can not use if because if does not return normal type of value (like 0 or 'a') and can not be used in operations like () (). Tomas Tintera -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and flash
Can anyone point to some good tutorials on using PHP with flash? I am mostly interested in displaying info from a database in the flash movie, as well as loading movies and pictures into the flash file (referenced in the database). thanks! d -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Possible to make $$ distributing PHP as Shareware?
Hi, I have developed a full email marketing application (using php, mysql) which supports tracking technology (i.e. whether the recipient has read the email, view online, unsubscribe, click on any of the link etc), bounce mail management, backend engine. Is it possible to make some $$ if I distribute the application as a shareware or should I just sell it as an commercial package. If you have any experience with this, kindly enlighten me. Thanks, Jonathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php and flash
Hello, on 12/16/2004 12:40 AM Dustin Krysak said the following: Can anyone point to some good tutorials on using PHP with flash? I am mostly interested in displaying info from a database in the flash movie, as well as loading movies and pictures into the flash file (referenced in the database). Not really a tutorial as there is a lot to say about that, but this book provides information on most of what you need to know: http://www.phpclasses.org/reviews/id/095792187X.html -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Possible to make $$ distributing PHP as Shareware?
If you have any experience with this, kindly enlighten me. In my experience, people aren't going to pay unless they have to. ... and spending money for some application, which more than likely is going to be filtered hard by spam filters, might not be what I want to spend my pennies on -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Database Framework
Hi guys, Is there an on-going initiative as far as creating a PHP framework somewhat the same as .Net's framework implementation? Like for instance, the System.Data namespace where PHP developer can just create something like a DataAdapter which can connect to a datastore and fill a DataSet object? I think that would make our life a little easier? This post is by not any means a way to start a flame war or something, I just thought about it and I think it makes sense. regards, http://jonel.road14.com -- I not know English well, but I know 7 computer languages. anonymous -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and flash
Can anyone point to some good tutorials on using PHP with flash? I am mostly interested in displaying info from a database in the flash movie, as well as loading movies and pictures into the flash file (referenced in the database). thanks! Yes dude, I have been implementing data via mysql using Flash Remoting and another extensioncalled PHPObject, both use php as a server for executing php methods which does the sql queryand returns an array back to flash which is serialized in very funky. www.amfphp.org http://ghostwire.com/go/28 PHPObject is updated regularly, amfphp ran oujt of steam possibly coz of legal matters withmacromedia the punks, its ok to support highend languages but when someone has the balls tocome up with an alternative for PHP all hell breaks loose :| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logic with arrays
On Thu, 16 Dec 2004 13:11:02 +1100, Jeffery Fernandez [EMAIL PROTECTED] wrote: I am trying to build a html menu dynamically from data sitting in an array. I have been successful so far until it came to the point of populating the sub-menu of the system. Can someone help me out with the logic or is there a simpler way of doing it? Thanks Hierarchical menus made easy: http://www.sitepoint.com/article/hierarchical-data-database -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and flash
On Wed, 15 Dec 2004 18:40:17 -0800, Dustin Krysak [EMAIL PROTECTED] wrote: displaying info from a database in the flash movie If you mean like graphs.. http://www.infosoftglobal.com/FusionCharts/ There is also the option of generating xml using pear XML_Tree and loading the php script in asyou would with xml. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Good and free encoder for PHP5
On Wed, 15 Dec 2004 22:38:16 -0200, Manuel Lemos [EMAIL PROTECTED] wrote: I have all kinds of old software that doesn't work anymore. That is because you changed the environment on which it was working. Exactly my point. I don't control when M$ depricates their operating systems. I don't control when my favorite Linux distro upgrades their glibc. You have to upgrade at some point or be vulnerable to the security issues that follow. The point is that if you do not need to use the latest version, just stick to the one you have and works for you. Well, I'm not gonna run windows 95 just to play Afterlife. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database Framework
Hi guys, Is there an on-going initiative as far as creating a PHP framework somewhat the same as .Net's framework implementation? Like for instance, the System.Data namespace where PHP developer can just create something like a DataAdapter which can connect to a datastore and fill a DataSet object? I think that would make our life a little easier? This post is by not any means a way to start a flame war or something, I just thought about it and I think it makes sense. regards, Tonnes of different initiatives, no one standard which would be great, I am forced to build alot ofmy own components, because there are so many different ones i dont know what to choose. Asthe problem with Java, J2EE is a specification not a framework therefore there are millions outthere :| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Good and free encoder for PHP5
* Manuel Lemos [EMAIL PROTECTED]: Hello, on 12/16/2004 01:27 AM Greg Donald said the following: I have all kinds of old software that doesn't work anymore. That is because you changed the environment on which it was working. Exactly my point. I don't control when M$ depricates their operating systems. I don't control when my favorite Linux distro upgrades their glibc. You have to upgrade at some point or be vulnerable to the security issues that follow. The point is that if you do not need to use the latest version, just stick to the one you have and works for you. Well, I'm not gonna run windows 95 just to play Afterlife. The point is that old software versions that work on old environment versions do not need you to upgrade the environment version even the vendor deprecates the old version. While you think that newer versions will not have old bugs that probably were not affecting you, chances are that newer versions have newer bugs that may break your applications, especially if you upgrade right after those new versions are released. Greg's point is that sometimes you *must* upgrade because the old, possibly unnoticed bugs create may security vulnerabilities that you can't live with. If a library your application depends on (and that library could be PHP) has a security flaw that could allow permission escalation, for instance, and a patch exists for it, you'd be crazy or stupid not to perform the upgrade. If the upgrade breaks the application that depends on it... well, that's why we're coding in PHP, right? So that we have the freedom to fix these things, instead of relying on vendors. (Man, I love OSS!) You *do* make valid points about making needless upgrade -- if no security vulnerabilities exist, the application works fine, and you don't need features from the new version, there really is no reason to upgrade. But when a security vulnerability *does* exist, and it *could* affect your application, you've got another issue entirely on your hands. The trick is learning to distinguish between the two. -- Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't install PHP 5.02 with Apache2
PHP 5.0.3 just released. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Possible to make $$ distributing PHP as Shareware?
On Thu, 2004-12-16 at 10:50 +0800, Jonathan wrote: Hi, I have developed a full email marketing application (using php, mysql) which supports tracking technology (i.e. whether the recipient has read the email, view online, unsubscribe, click on any of the link etc), bounce mail management, backend engine. Is it possible to make some $$ if I distribute the application as a shareware or should I just sell it as an commercial package. If you have any experience with this, kindly enlighten me. Thanks, Jonathan You have three options. 1. Sell it as a commercial product ($)..and hope people don't build a free version 2. Give it out..and hope that people come to you for customizations and enhancements ($) 3. Don't sell it like regular software. Sell it as a service that you completely control and support..and have your users pay you to utilize your service. ($$) ..depending on what your goal is with it, those are generally the three ways you can make money with your app. Cheers, -Robby -- /*** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | [EMAIL PROTECTED] * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting Development *--- Now supporting PHP5 --- / -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Good and free encoder for PHP5
Hello, on 12/16/2004 01:27 AM Greg Donald said the following: I have all kinds of old software that doesn't work anymore. That is because you changed the environment on which it was working. Exactly my point. I don't control when M$ depricates their operating systems. I don't control when my favorite Linux distro upgrades their glibc. You have to upgrade at some point or be vulnerable to the security issues that follow. The point is that if you do not need to use the latest version, just stick to the one you have and works for you. Well, I'm not gonna run windows 95 just to play Afterlife. The point is that old software versions that work on old environment versions do not need you to upgrade the environment version even the vendor deprecates the old version. While you think that newer versions will not have old bugs that probably were not affecting you, chances are that newer versions have newer bugs that may break your applications, especially if you upgrade right after those new versions are released. What I am trying to tell you is that you need to use your brain before you make an upgrade, eventually leaving a reasonable amount of time since it was released because most bugs are only discovered when early adopters break their faces trying the just released versions. In the case of PHP 5, I do not recommend jumping to it before 1 year after 5.0.0 release. Then your upgrade risk will be much smaller. -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with array
On Thursday 16 December 2004 13:33, Ahmed Abdel-Aliem wrote: Put this at the beginning of all your code: error_reporting(E_ALL); ini_set('display_errors', TRUE); Then run your code to see all the errors and warnings and notices that it generates. Then incorporate the changes below: i am retrieving records from database and putting each row in a array here is the code @ $db = mysql_connect ($server, $user, $pass); Remove all '@'. Put in error checking and make use of mysql_error(), see examples in manual. while ($record=mysql_fetch_array($test_tr)){ $record[Game_ID] = stripslashes($record[Game_ID]); This whole stripslashes() business may not be needed. In general you should only use it if magic_quotes_runtime is enabled in php.ini. Also the correct syntax is: $record['Game_ID'] = stripslashes($record['Game_ID']); And if you find that you really do need to use stripslashes() because magic_quotes_runtime is enabled then use this instead: foreach ($record as $key = $val) { $record[$key] = stripslashes($record[$val]; } echo $record[Game_Esrb_Rating]; if($Game_Esrb_Rating 1){ $Esrb_Rate_Pic = bar_rating_star_0.gif; If you can be certain that $Game_Esrb_Rating is within 0-5 (ie you have validated your data properly before inserting into the database) then you can simply do $Esrb_Rate_Pic = bar_rating_star_{$Game_Esrb_Rating}.gif; my problem is with $Esrb_Rate_Pic, i can't put its value to the array , i used $row[Esrb_Rate_Pic] = $Esrb_Rate_Pic; but it didn't work That's because it should be: $row['Esrb_Rate_Pic'] = $Esrb_Rate_Pic; -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Robot, n.: University administrator. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] counting chars..
Hi Louie, Excellent example! i wish more users would take the time to provide such clear examples. The strlen() exists for you :) ie. ?php $string = function yes good; $display = strlen($string); echo $display; ? :) Best Regards Jake Press Louie Miranda wrote: ?php $string = function yes good; $display = count_chars($string); echo $display; ? i know this is wrong, but how can i count chars used here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Apache Upload file Permission denied
Hi All, My problem is finally solved by totally off SELinux Security Policies. Thank you very verry much the helps from yours! I know this is not very safe solution, but at the leasy my script can work yours, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] counting chars..
On Thu, 2004-12-16 at 14:28 +0800, Louie Miranda wrote: ?php $string = function yes good; $display = count_chars($string); echo $display; ? i know this is wrong, but how can i count chars used here? php.net/strlen ? -Robby -- /*** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | [EMAIL PROTECTED] * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting Development *--- Now supporting PHP5 --- / -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cURL FTP
I'm trying to FTP a text file from a commercial hosting server, but the file isn't being transferred and I'm not getting any feedback from the script. Here's the code: $username = whatever; $password = somepassword; $remote_domain = somedomain.com; $remote_file_location = /upload/testtransfer.txt; $c = curl_init(ftp:// $username:[EMAIL PROTECTED]); $fh = fopen(test.txt, r) or die($php_errormsg); curl_setopt($c, CURL_UPLOAD, TRUE); curl_setopt($c, CURL_TRANSFERTEXT, TRUE); curl_setopt($c, CURL_INFILE, $fh); curl_setopt($c, CURL_RETURNTRANSFER, TRUE); $result = curl_exec($c); curl_close($c); echo(p.$result./p\n); Running this produces nothing -- $result has no value and no file is transferred. cURL is available on the server I'm sending from because I use it successfully for a couple scripts. The upload directory has permissions set to 777. The server I'm attempting to upload to runs in a shared hosting environment. I've read what I think are the relevant sections of the manual. I'd appreciate info or links to info on setting up cURL to do an FTP transfer and return the success or failure of the operation. Thanks. -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php graph?
Jonathan wrote: Hi, Me new to PHP. Is there any good and free php graph scripts/class that I can use to generate graph like bar chart, pie chart and plots. If you have any good recommendation, can email me at [EMAIL PROTECTED] Thanks. Jonathan jpgraph is excellent. I haven't checked out the new version yet for PHP5, but for PHP4 it is by far the best graphing utility I have seen. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: File locking file_[get|put]_contents
Gerard Samuel wrote: I was wondering. Does file_get_contents() or file_put_contents() utilise any kind of file locking? Thanks Not that I am aware of (I haven't checked source on this so someone correct me if I'm wrong here). file_get_contents() is a shortcut for using the functions fopen, fgets and fclose. So if you need file locking you'll have to flock. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] This is what John was talking about
[EMAIL PROTECTED] wrote: Thank you for your email, however I am now on holiday until Thursday 23rd December and will not be in a position to check my emails during this time. Should your email require a more immediate response please telephone Fast Web Media on +44(0)161 835 3444 for further assistance. For all other queries, I will be in touch as soon as possible on my return. John Just to expand on what Mr. Holmes said. Please unsubscribe from the list or turn off your 'Out of Office' messages before going away for the holidays. Many of us will filter you out when we get a message like this, and chances are, we won't _remember_ to filter you back in when the holidays are over. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] UPDATE
I am trying to insert information into the database, have it automatically place an ID Number, then update that particular record and replace the word delete with the link. The mysql_insert_id() does seem to be working. It does put in an id number of 0 However, the code in general gives me an error everytime. It says that it is near 'delete = a href...' Can anyone help me with this? Thanks! -- Steve ?php // log into our local server using the MySQL root user. $dbh = mysql_connect( localhost, username, password ); // select the database. mysql_select_db( imagesdb ) or die ( mysql_error() . \n ); ? -- snip -- ?php //This is for the text description of the gallery and the link $insert_data2 = INSERT into images_upload_description (delete, name, description) VALUES ('delete', 'a href=\http://www.domain.org/gallery/bomb/bottom_images.php?gallery_name=$ga llery_name\ target=\bottom\$name/a', '$description');; $response = mysql_query( $insert_data2, $dbh ); $id_num = mysql_insert_id(); $update_data = UPDATE images_upload_description SET delete = a href=\http://www.domain.org/gallery/admin/delete.php?gallery_name=$gallery_ nameid_num=$id_num\ target=\bottom\Delete/a WHERE id_num = \$id_num\; $response = mysql_query( $update_data, $dbh ); if(mysql_error()) die ('database error'. mysql_error()); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can't install PHP 5.02 with Apache2
Hi, Fedora core 3 (new) - apache installed with the new install (off the CDs). I downloaded the PHP 5.02 source and am attempting to install. I am using the configure option: --with-apxs2=/usr/sbin/apxs \ and am getting a compile error: apxs was not found. There is no file: /usr/sbin/apxs I assumed it is just installed somewhere else so I ran the following from the command prompt but it came up empty: #find / -name apxs -print Is anyone else using Fedora Core 3 and is Apache 2 not installed with -enable-so by default? How can I get around this? I don;t think I can download the apache source and reinstall as Fedora/RedHat uses it's own directory structure and I don't want to get stuck with two different apache servers installed. stuck, Don --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.813 / Virus Database: 553 - Release Date: 12/13/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Hostname
Chris Boget wrote: In earlier versions of PHP, you could use the $HOSTNAME global variable to get the server/machine name that is running Apache/PHP. However, that variable is no longer working and I can't seem to find a replacement in any of the super global variables. Is there one? How can you get the server/machine name? thnx, Chris $_SERVER['HTTP_HOST'] $_SERVER['SERVER_NAME'] http://us2.php.net/manual/en/reserved.variables.php#reserved.variables.server -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hostname
On Wed, 15 Dec 2004 10:28:16 -0600, Chris Boget [EMAIL PROTECTED] wrote: In earlier versions of PHP, you could use the $HOSTNAME global variable to get the server/machine name that is running Apache/PHP. However, that variable is no longer working and I can't seem to find a replacement in any of the super global variables. Is there one? How can you get the server/machine name? $_SERVER['HOSTNAME'] -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hostname
$_SERVER['SERVER_NAME'] 'SERVER_NAME' The name of the server host under which the current script is executing. If the script is running on a virtual host, this will be the value defined for that virtual host. -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED] Sent: 15 December 2004 16:28 To: PHP General Subject: [PHP] Hostname In earlier versions of PHP, you could use the $HOSTNAME global variable to get the server/machine name that is running Apache/PHP. However, that variable is no longer working and I can't seem to find a replacement in any of the super global variables. Is there one? How can you get the server/machine name? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message has been checked for all known viruses by the CitC Virus Scanning Service powered by SkyLabs. For further information visit http://www.citc.it ___ This message has been checked for all known viruses by the CitC Virus Scanning Service powered by SkyLabs. For further information visit http://www.citc.it ___ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] UPDATE
Quoting Steve Marquez [EMAIL PROTECTED]: I am trying to insert information into the database, have it automatically place an ID Number, then update that particular record and replace the word delete with the link. The mysql_insert_id() does seem to be working. It does put in an id number of 0 However, the code in general gives me an error everytime. It says that it is near 'delete = a href...' $update_data = UPDATE images_upload_description SET delete = a href=\http://www.domain.org/gallery/admin/delete.php?gallery_name=$gallery_ nameid_num=$id_num\ target=\bottom\Delete/a WHERE id_num = \$id_num\; try to change the field name in your database from delete to something else and see if that helps. mysql may be complaining since delete is a reserved keyword. HTH -R'twick This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ftp_put() problem
I'm trying to FTP a string value as a file without writing it to the local server as a file, but I can't get ftp_put() to work. If I read a file from the server, ftp_fput() works: $fh = fopen(test.txt, r); $upload = ftp_fput($conn_id, $destination_file, $fh, FTP_ASCII); if(!$upload) { echo pFTP upload has failed!/p\n; } else { echo pUploaded to .$ftp_server. as .$destination_file./p\n; } But trying to avoid writing to the local server by using ftp_put() instead, this does not work: $source = This is a test file. This is a test file.\nThis is a test file.; $upload = ftp_put($conn_id, $destination_file, $source, FTP_ASCII); I don't understand why ftp_put() isn't able to use $source as a string value, but substituting ftp_fput() into the script and using a file handle does work. I'm trying to avoid writing a file to the local server just to be able to use ftp_fput(). -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] scripting with php
Bruno Santos wrote: i'm working with php for about 3 years and i must say: i cant get tired of it !! :-) since my first page, ive used php as a server side language, embebed in html pages. now, i need to develop a small script to run as stand alone. how can i do it ? just like bourn shell, ive used #!/usr/bin/php -q, but it apears is not working ... can someone tell me how to i use php stand alone ? chears !!! 'shell ' indicates something you type at a Un*x/MS-DOS shell prompt. Step 1. Confirm that /usr/bin/php is there, and working: shell /usr/bin/php -v Either this outputs PHP's version number, or you don't have PHP installed at /usr/bin/php. Step 2. Make sure your script works, *without* the #!/usr/bin/php -q line in it. shell php -q YOURSCRIPT.php Either this script does what you expect, or the script isn't right. Did you put ?php ? in there? Yes, you need to put ?php ? in there. Step 3. Make sure your PHP shell script is executable: shell chmod 744 YOURSCRIPT.php Change YOURSCRIPT to the name of your script, of course. Step 4. Put the #!/usr/bin/php -q back in there and try it shell ./YOURSCRIPT.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cannot install IMAP server
Hi, New Fedora Core 3 box. Installed Dovecot IMAP server. When attempting to install PHP (with IMAP option), I get the error: Cannot find rfc822.h. Please check your IMAP installation. With older IMAP servers, there was always a development library. Dovecot doesn't seem to have one. For those who have already done it, how did you enable IMAP with PHP for dovecot server? Thanks, Don --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.813 / Virus Database: 553 - Release Date: 12/13/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Question
On Wednesday 15 December 2004 21:29, Jay Blanchard wrote: Do you reccommed MS Access or SQL for the database? It really doesn't matter unless you need a superior product. MS Access wasn't designed for concurrent access so if you are only serving *very* light loads it may suffice. If your aspirations are a bit higher (and _if_ you want to stick with MS) then MSSQL is the better choice. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* It's a fixer-upper. What's the problem? We get a bunch of priests in here ... -- Homer Simpson Treehouse of Horror */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot install IMAP server
On Thursday 16 December 2004 02:25, Don wrote: New Fedora Core 3 box. Installed Dovecot IMAP server. When attempting to install PHP (with IMAP option), I get the error: Cannot find rfc822.h. Please check your IMAP installation. With older IMAP servers, there was always a development library. Dovecot doesn't seem to have one. For those who have already done it, how did you enable IMAP with PHP for dovecot server? I believe someone, somewhere, at sometime or another said you could install the UW-IMAP stuff and PHP will happily compile and go on its merry way. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Ask not for whom the CONTROL-G tolls. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Output buffering - saving + echoing
Hi, Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Lorderon wrote: What I want to do is catch the output buffer, but do not delay the buffer It occurs to me that maybe you should tell us WHY you want this, because there could be existing alternatives outside the scope of PHP that we could recommend... I need to store chunks of output into files. I can get the chunk output by using ob_get_contents(), but after calling ob_start() the output is only buffered and not sent till flushing. The delay from echoing to flushing is exactly what I want to avoid. I want to echo the output imediatly and not just on flushing, but still be able to buffer the chunk and get the output into variable. I hope it's clearer now.. thanks, Lorderon. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] bandwidth usage
i used to use a small script that displayed the amount of bandwidth being used, it parses netstats numbers. @ http://www.kernel.org/pub/software/web/bwbar/ it only works for linux and was wondering if anyone knows of a php app that parses netstats on freebsd to display live bandwidth usage? thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: HTML_Template_Flexy or Smarty
no error handling what i am asking, can it to standard template blocks aswell, like you have a main template and can add template blocks from a seperate template ? to keep it fasttemplate freiendly , and also can it be html programmer or designer friendly still say with simple vars like {myvar} instead of tedious logic that only a developer can understand ? On 16/12/2004, at 12:55 AM, Matthew Weier O'Phinney wrote: * Electroteque [EMAIL PROTECTED]: hi there I am trying to choose between the two, which one is efficient, but is also html programmer friendly and can still do template block style templating like fasttemplate or phemplate. I am trying to move people who have been using fasttemplate to a more efficient system, although these two systems have logic inside the templating. You're verging on a religious war here... My predictions: 1) 25% respond in favor of HTML_Template_Flexy 2) 25% respond in favor of Smarty 3) 25% respond in favor of different templating solutions altogether 4) 25% respond asking why you need a templating system at all when you have PHP As for my own leanings -- we use Smarty where I work, and I like its flexibility and the ease with which I can integrate it with regular HTML (I particularly like that it doesn't use angle brackets as its delimiters -- makes it easy to spot Smarty directives in the template). My one complaint about it: no error handling. I wish it had error handling ala PEAR -- occasionally I get errors in Smarty that end up being hard to debug due to the complexity of the templates and/or number of templates we're using to generate a page. -- Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: HTML_Template_Flexy or Smarty
* Electroteque [EMAIL PROTECTED]: no error handling I should have qualified that. If you do something like: $smarty-display($filename); and $filename does not exist, you get an error. When I say error handling, I mean that I'd like for the method to return an error so I can handle it gracefully (instead of an ugly developer error to the screen, or if set to ~E_ALL, nothing sent to screen at all): $res = $smarty-display($filename); if (Smarty::isError($res)) { // Do something else } what i am asking, can it to standard template blocks aswell, like you have a main template and can add template blocks from a seperate template ? Yes -- {include file=someOther.tpl}. and also can it be html programmer or designer friendly still say with simple vars like {myvar} instead of tedious logic that only a developer can understand ? Yes: {$myvar} displays the contents of $myvar, if it is set and non-empty. Plus, there's a couple different loop handling constructs, if/then/else statements, math stuff, and a number of specialty functions (my current favorites: date_format and truncate). Smarty is as complex as you want it to be; if you want to keep it simple, it does that, too. On 16/12/2004, at 12:55 AM, Matthew Weier O'Phinney wrote: * Electroteque [EMAIL PROTECTED]: hi there I am trying to choose between the two, which one is efficient, but is also html programmer friendly and can still do template block style templating like fasttemplate or phemplate. I am trying to move people who have been using fasttemplate to a more efficient system, although these two systems have logic inside the templating. You're verging on a religious war here... My predictions: 1) 25% respond in favor of HTML_Template_Flexy 2) 25% respond in favor of Smarty 3) 25% respond in favor of different templating solutions altogether 4) 25% respond asking why you need a templating system at all when you have PHP As for my own leanings -- we use Smarty where I work, and I like its flexibility and the ease with which I can integrate it with regular HTML (I particularly like that it doesn't use angle brackets as its delimiters -- makes it easy to spot Smarty directives in the template). My one complaint about it: no error handling. I wish it had error handling ala PEAR -- occasionally I get errors in Smarty that end up being hard to debug due to the complexity of the templates and/or number of templates we're using to generate a page. -- Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Good and free encoder for PHP5
Hello, on 12/15/2004 07:32 PM Mário gamito said the following: Yes, Turck works with PHP5. My question is: if the last version was released a year ago, how much can i trust it ? Software it is not like people, it does not stop working with age. BTW, how good is Truck's algorithm and how hard it is to reverse engineer the code ? It is not hard because you can always rebuild the original code for Zend opcodes. Turck just serialize Zend opcodes to files. I have not seen any reverse engineer software but it should not be hard. I just use Turck for caching. If you real want to use compile PHP applications, forget encoders (commercial included). Use a real PHP compiler like Roadsend. That is real PHP code protection. http://www.roadsend.com/ portuguese mode Abraço aí para o Brasil, meu. A curtir o sol e as macacas no calçadão :) :-) O Brasil é grande e o calçadão do Rio de Janeiro fica a muitas centenas de kilometros daqui. Hoje em dia nem com colete à prova de bala lá poria os pés. As autoridades do Rio de Janeiro são impotentes para deter a criminalidade na cidade e até mesmo nas praias. Engraçado é há quem se admire que o turismo para o Rio tem caído muito. Basta ver os jornais para ver a quantidade de turistas saqueados e baleados mesmo com cameras de vigilancia a filmar tudo. Resumindo, não conheço essas macacas do calçadão. /portuguese mode -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parsing php in html with IIS
On Wed, 15 Dec 2004 15:02:08 -0700, Eric Lindsey [EMAIL PROTECTED] wrote: How do I configure my IIS server to parse a specific .html file for php code? I know how to do this on apache, but windows scares me :-) http://www.php.net/manual/en/install.windows.iis.php -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Good and free encoder for PHP5
On Wed, 15 Dec 2004 20:12:54 -0200, Manuel Lemos [EMAIL PROTECTED] wrote: Software it is not like people, it does not stop working with age. I have all kinds of old software that doesn't work anymore. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] bandwidth usage
On Wed, 15 Dec 2004 15:07:00 -0500, Sebastian [EMAIL PROTECTED] wrote: was wondering if anyone knows of a php app that parses netstats on freebsd to display live bandwidth usage? cd /usr/ports/net-mgmt/mrtg make install clean It's not PHP, but there's no wheel reinventing required. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Good and free encoder for PHP5
Mário Gamito wrote: Hi Manuel, Yes, Turck works with PHP5. My question is: if the last version was released a year ago, how much can i trust it ? BTW, how good is Truck's algorithm and how hard it is to reverse engineer the code ? Encoding generally does not protect you from reverse engineering. Laws do. -- Raditha Dissanayake. -- http://www.radinks.com/print/card-designer/ | Card Designer Applet http://www.radinks.com/upload/ | Drag and Drop Upload -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: File locking file_[get|put]_contents
Jason Barnett wrote: Gerard Samuel wrote: I was wondering. Does file_get_contents() or file_put_contents() utilise any kind of file locking? Thanks Not that I am aware of (I haven't checked source on this so someone correct me if I'm wrong here). file_get_contents() is a shortcut for using the functions fopen, fgets and fclose. So if you need file locking you'll have to flock. Thats what I figured. It would have been nice to have an option to lock with those functions. Thanks for your reply... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] logic with arrays
I am trying to build a html menu dynamically from data sitting in an array. I have been successful so far until it came to the point of populating the sub-menu of the system. Can someone help me out with the logic or is there a simpler way of doing it? Thanks ?php /** * This function builds the applications menu system from and array of key/pair values * @param null * @return string $menu contains value of menu structure in html */ function BuildMenu() { $base_path = 'http://kangaroo.hotshot/dev/fpaa/DEVELOPMENT/TEST'; $menu_structure = array ( array('Home' = '/'), array( 'News' = '/news', 'sub' = array( 'Archive' = '?news=archive' ) ), array('Events' = '/events'), array('About' = '/about'), array('Membership' = '/membership'), array('Committees' = '/committee'), array('Safety' = '/safety'), array( 'Providers' = '/providers', 'sub' = array( 'Sprinklers' = '?providers=sprinklers', 'Detection' = '?providers=detection', 'Certification' = '?providers=certification', 'Monitoring' = '?providers=monitoring', 'Hose Reels' = '?providers=hosereels', 'Passive' = '?providers=passive', 'Portable' = '?providers=portable', 'Hazard' = '?providers=hazard', 'Maintenance' = '?providers=maintenance', 'Consultants' = '?providers=consultants', 'Emergency Training' = '?providers=training', ) ), array('Licencing' = '/licencing'), array( 'Training' = '/training', 'sub' = array( 'Tafe Courses' = '?courses=tafe', 'Trade Courses' = '?courses=trade', 'New Courses' = '?courses=new', 'RTO Status' = '?courses=rtostatus', 'Portable' = '?courses=portable', 'Assessor' = '?courses=assessor', 'Training Builetin' = '?courses=builetin', 'Contact' = '?courses=contact' ) ), array('Publication' = '/publication'), array('Contact' = '/contact'), ); $html_menu = 'ul id=topnav'; foreach ($menu_structure as $menu_page) { $menu_name = array_keys($menu_page); $menu_value = array_values($menu_page); //$html_menu .= li$menu_name[0] - $menu_value[0]/li; $html_menu .= lia href=\$base_path$menu_value[0]\$menu_name[0]/a/li; $sub_menu = sizeof($menu_name); if ($sub_menu 1) { $html_menu .= 'ul id=subnav'; foreach ($menu_page[$menu_name[1]] as $sub_page) { // Stuck here $html_menu .= lia href=\Need to get value\$sub_page/a/li; } $html_menu .= '/ul'; } } $html_menu .= '/ul'; echo $html_menu; // Example Structure of html menu /* ul id=topnav lia href=#Home/a/li lia href=#News/a/li lia href=#Events/a/li lia href=#About/a/li lia href=#Membership/a/li lia href=#Committees/a/li lia href=#Safety/a/li li class=centera href=# class=hereProviders/a ul id=subnav lia href=#Sprinklers/a/li lia href=#Detection/a/li lia href=# class=hereCertification/a/li lia href=#Monitoring/a/li lia href=#Hose Reels/a/li lia href=#Passive/a/li lia href=#Portable/a/li lia href=#Hazard/a/li lia href=#Maintenance/a/li lia href=#Consultants/a/li lia href=#Emergency Training/a/li /ul /li lia href=#Licencing/a/li lia href=#Training/a/li lia href=#Publication/a/li lia href=#Contact/a/li /ul */ return $menu_structure; } print_r(BuildMenu()); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php graph?
Thanks. Just downloaded it and tested it and it look great !!! Quite easy to implement also. Cheers, Jonathan Jonathan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Me new to PHP. Is there any good and free php graph scripts/class that I can use to generate graph like bar chart, pie chart and plots. If you have any good recommendation, can email me at [EMAIL PROTECTED] Thanks. Jonathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Possible to make $$ distributing PHP as Shareware?
On Thu, 16 Dec 2004 10:50:52 +0800, Jonathan [EMAIL PROTECTED] wrote: Is it possible to make some $$ if I distribute the application as a shareware Probably not. or should I just sell it as an commercial package. If you plan to make any money, yes. If you have any experience with this, kindly enlighten me. In my experience, people aren't going to pay unless they have to. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and flash
Can anyone point to some good tutorials on using PHP with flash? I am mostly interested in displaying info from a database in the flash movie, as well as loading movies and pictures into the flash file (referenced in the database). thanks! Yes dude, I have been implementing data via mysql using Flash Remoting and another extensioncalled PHPObject, both use php as a server for executing php methods which does the sql queryand returns an array back to flash which is serialized in very funky. www.amfphp.org http://ghostwire.com/go/28 PHPObject is updated regularly, amfphp ran oujt of steam possibly coz of legal matters withmacromedia the punks, its ok to support highend languages but when someone has the balls tocome up with an alternative for PHP all hell breaks loose :| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and flash
On Wed, 15 Dec 2004 18:40:17 -0800, Dustin Krysak [EMAIL PROTECTED] wrote: displaying info from a database in the flash movie If you mean like graphs.. http://www.infosoftglobal.com/FusionCharts/ -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logic with arrays
Wee Keat wrote: Hey Jeff, How are you mate? Was lazying around and saw your email to the list. :) What exactly do you need help with? Is it the following line? // Stuck here $html_menu .= lia href=\Need to get value\$sub_page/a/li; } $html_menu .= '/ul'; Do you need to get the value of the link and the name of the link? If so, try this: = begin snippet === $html_menu .= 'ul id=subnav'; foreach ($menu_page[$menu_name[1]] as $sub_page = $sub_link) { // Stuck here $html_menu .= lia href=\$sub_link\$sub_page/a/li; } $html_menu .= '/ul'; } = end snippet = What about using recursive functions? I think it's easier as you can create unlimited numbers of sub-menus. It's slow though. Ah Thanks Keat long time no hear/see .. it works now. :-) How are you keeping anyway ? You totally ignore us now at phpMelb :-( Come along to our next meeting on 13th Jan 2005 cheers, Jeffery -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't install PHP 5.02 with Apache2
On Wed, 15 Dec 2004 11:21:42 -0500, Don [EMAIL PROTECTED] wrote: and am getting a compile error: apxs was not found. There is no file: /usr/sbin/apxs Mine is /usr/sbin/apxs2 Some versions of Redhat install a package of Apache2 without either apxs or apxs2, presumably to keep you from installing unsupported versions of (for example) PHP. Sandy Keathley -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Good and free encoder for PHP5
Well, you could try XP's Compatibility Mode, I think my girlfriend got Afterlife to run under XP doing that. She got it to run somehow..haha.. because we just found a copy of Afterlife for like $1 somewhere and she picked it up. Or, if you happen to be blessed with VMWare, there's always that. I've used VMWare to succesfully set up DOS 6.22 and some games that didn't work under DOSBox and Windows 95 to run some games that Win98 and XP didn't like so much. So there's always options.. if you have time and/or money :)You might be able to use Wine or something to run an older version of Windows to get Afterlife to work as well. In general, yes.. software gets old and rusty on the new OS's... but if you're ingenuity is adequate, you can figure out a way to have your cake and eat it too. Where there's a will (and a search engine and maybe $200 for VMWare) there's an emulation of some kind. -TG *** new email address [EMAIL PROTECTED] *** old email address [EMAIL PROTECTED] YAY CHAPTER 11! = = = Original message = = = On Wed, 15 Dec 2004 22:38:16 -0200, Manuel Lemos [EMAIL PROTECTED] wrote: I have all kinds of old software that doesn't work anymore. That is because you changed the environment on which it was working. Exactly my point. I don't control when M$ depricates their operating systems. I don't control when my favorite Linux distro upgrades their glibc. You have to upgrade at some point or be vulnerable to the security issues that follow. The point is that if you do not need to use the latest version, just stick to the one you have and works for you. Well, I'm not gonna run windows 95 just to play Afterlife. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with array
Hi i am retrieving records from database and putting each row in a array here is the code @ $db = mysql_connect ($server, $user, $pass); mysql_select_db($database); $query = SELECT Game_ID FROM games WHERE Game_Category='$Game_Category'; $result= mysql_query($query); $total_numbers = mysql_num_rows($result); $startingID=$_GET['startingID']; $startingID = ($startingID) ? $startingID : 0; //if rec is passed in, use it, $row = array(); $test_tr = mysql_query(select * from games WHERE Game_Category='$Game_Category' order by Game_ID desc LIMIT $startingID, $items_numbers_list); $num = mysql_num_rows($test_tr); while ($record=mysql_fetch_array($test_tr)){ $record[Game_ID] = stripslashes($record[Game_ID]); $record[Game_Picture_Small] = stripslashes($record[Game_Picture_Small]); $record[Game_Name] = stripslashes($record[Game_Name]); $record[Game_Title] = stripslashes($record[Game_Title]); $record[Game_Description] = stripslashes($record[Game_Description]); $record[Game_Full_Story] = stripslashes($record[Game_Full_Story]); $record[Game_Screen_Shot_1] = stripslashes($record[Game_Screen_Shot_1]); $record[Game_Screen_Shot_2] = stripslashes($record[Game_Screen_Shot_2]); $record[Game_Screen_Shot_3] = stripslashes($record[Game_Screen_Shot_3]); $record[Game_Status] = stripslashes($record[Game_Status]); $record[Game_Play_Score] = stripslashes($record[Game_Play_Score]); $record[Game_Category] = stripslashes($record[Game_Category]); $Game_Esrb_Rating = intval($record[Game_Esrb_Rating]); echo $record[Game_Esrb_Rating]; if($Game_Esrb_Rating 1){ $Esrb_Rate_Pic = bar_rating_star_0.gif; }elseif ($Game_Esrb_Rating 2){ $Esrb_Rate_Pic = bar_rating_star_1.gif; }elseif ($Game_Esrb_Rating 3){ $Esrb_Rate_Pic = bar_rating_star_2.gif; }elseif ($Game_Esrb_Rating 4){ $Esrb_Rate_Pic = bar_rating_star_3.gif; }elseif ($Game_Esrb_Rating 5){ $Esrb_Rate_Pic = bar_rating_star_4.gif; }elseif ($Game_Esrb_Rating = 5){ $Esrb_Rate_Pic = bar_rating_star_5.gif; } $row[] = $record; $row[Esrb_Rate_Pic] = $Esrb_Rate_Pic; } my problem is with $Esrb_Rate_Pic, i can't put its value to the array , i used $row[Esrb_Rate_Pic] = $Esrb_Rate_Pic; but it didn't work can anyone help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Database Framework
* Jonel Rienton [EMAIL PROTECTED]: Is there an on-going initiative as far as creating a PHP framework somewhat the same as .Net's framework implementation? Like for instance, the System.Data namespace where PHP developer can just create something like a DataAdapter which can connect to a datastore and fill a DataSet object? I think that would make our life a little easier? This post is by not any means a way to start a flame war or something, I just thought about it and I think it makes sense. You might want to look at PEAR (http://pear.php.net) in general and PEAR's DataObject/DataGrid classes in specific. -- Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] counting chars..
?php $string = function yes good; $display = count_chars($string); echo $display; ? i know this is wrong, but how can i count chars used here? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php