Re: [PHP] Oracle - Win32
[EMAIL PROTECTED] wrote: Hello mailing list, I want to use Oracle function in PHP parser in Win32 OS, but I don't know how to install it, in the official documentation tell this: Installation You have to compile PHP with the option --with-oracle[=DIR], where DIR defaults to your environmment variable ORACLE_HOME. I think that this steps is by Linux user, any help, I will appreciate, thanks. http://www.php.net/manual/en/install.windows.php -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Oracle - Win32
-Edit the php.ini file GET THE DLLs: The Dlls for mssql and others (oracle, sybase, etc.) are NOT included in the installation (Install Shield Wizard) in the root folder. Get the other package for windows systems (NO Install shield!). Just plain files. After unzipping the file, look for the subdirectory called extensions. NOT the dlls folder! You'll find a bunch of dlls with the name format like such: php_xxx. For Oracle DD, you'll need php_oracle.dll. Take the oracle dll. PLACE THE DLL(s): Place the dll you want in the root folder where you installed php locally. EDITING THE PHP.INI: Your php.ini SHOULD be in the Windows System Root (commonly C:\WINNT). Ok, in the php.ini file, look for the Paths and Directories section. Your extension_dir path should look like a DOS path like this: extension_dir = C:/php/ ; Point the directory where you installed php ; inside the root should be the dll you placed! If the default value of extension_dir is = ./ REMOVE IT! This path should be identical to a DOS path! Ok, this is just a side note: If you find a comment section for Windows Extensions inside another section called Dynamic Extensions that has a bunch of lines like this: ;extension=php_xxx1.dll ;extension=php_xxx2.dll un-comment this line for oracle dll... THAT's it! Save the php.ini. Now you can call Oracle functions - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, October 11, 2003 10:29 AM Subject: [PHP] Oracle - Win32 Hello mailing list, I want to use Oracle function in PHP parser in Win32 OS, but I don't know how to install it, in the official documentation tell this: Installation You have to compile PHP with the option --with-oracle[=DIR], where DIR defaults to your environmment variable ORACLE_HOME. I think that this steps is by Linux user, any help, I will appreciate, thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] off-list topic: Debian vs. Redhat
Greetings, Have been working with Windows for many years, I'm planning to *migrate* to Linux. Googled Debian vs. Redhat. Found that more commercial software vendors support Redhat rather than Debian. Why does this happen? Also, Debian contains more than 8000 packages, which is much more than the number of packages Redhat has, buy why the Redhat needs more than 600MBs harddisk space while Debian needs less than 200? Which one are you using or prefer? Why? Which one should I use? Suggestions? Thanks for your time. cheers, feng -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] off-list topic: Debian vs. Redhat
* Thus wrote Wang Feng ([EMAIL PROTECTED]): Greetings, Have been working with Windows for many years, I'm planning to *migrate* to Linux. Googled Debian vs. Redhat. Found that more commercial software vendors support Redhat rather than Debian. Why does this happen? $$$ and marketing. Also, Debian contains more than 8000 packages, which is much more than the number of packages Redhat has, buy why the Redhat needs more than 600MBs harddisk space while Debian needs less than 200? Quantity doesn't give something more Quality. How many of those 8000 packages are you going to use? Probably the ~30 packages available on red hat. The 600mb is probably reserved for their nice but unflexible rpm system. Which one are you using or prefer? Why? Which one should I use? Suggestions? Neither.. FreeBSD is the answer. You might consider finding some more appropriate place to ask this (besides being enitirely OT). What flavor of Linux to be used can be discussed for hours at end. Some research and googling would benefit also. Curt -- My PHP key is worn out PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: CSV file with PHP
On Fri, Oct 10, 2003 at 03:06:53PM -0700, Curt Zirzow wrote: : : On Fri, 10 Oct 2003 18:38:04 -0300, Cesar Aracena [EMAIL PROTECTED] : wrote: : : Does anybody knows how to make a CSV (comma separated values) file : with PHP based on results fetched from MySQL? I need it to import it : with Microsoft Outlook Express. : : csv file format as follows: : : value,value\ with quotes,value with space,valueCR What about values with commas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] recompiling libphp4.so because of modssl??
Hi there, I have just installed modssl and recompiled apache. When I start apachessl, I do get following warnings: Loaded DSO libexec/libphp4.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI) [Sat Oct 11 13:21:23 2003] [warn] Loaded DSO /usr/local/lib/mod_gzip.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI) Can anybody give me hint on how to solve this, I am lost. How do I recompile libphp4.so? Thanx for any help, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions
The Session documentation IS difficult to understand. I wrestled with it for some time (and still am). There's just no clear cookie_lifetime variable! All of Lowell Allen's instructions are the same that I've discovered, save that I set the 'session.gc_maxlifetime' to a large number - I was having trouble with the system forgetting me while I was testing. Your typical user might not sit around for an hour between actions, but I did, and while the session might have still been registered it lost the $USERID variable. You can set the session settings in PHP code using 'ini_set' or 'ini_alter' (see the documentation), or (and I like this better) in your .htaccess file - assuming you're using Apache: php_flag session.use_trans_sid off php_flag session.cookie_lifetime 0 php_flag session.gc_maxlifetime 3600 ... as appropriate, of course. Unfortunately this approach isn't very well documented (hmmm, maybe _I_ should...) - I think I stumbled across it a couple years ago. I set the 'use_trans_sid' to off to see why the SESSIONID kept showing up in the URL at odd times. Test using phpinfo() to see if the Local settings change from the global. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] recompiling libphp4.so because of modssl??
lol from the php source, it compiles the so module into the destination apx (apache) directory, try ./configure --help in the source of php for more Hi there, I have just installed modssl and recompiled apache. When I start apachessl, I do get following warnings: Loaded DSO libexec/libphp4.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI) [Sat Oct 11 13:21:23 2003] [warn] Loaded DSO /usr/local/lib/mod_gzip.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI) Can anybody give me hint on how to solve this, I am lost. How do I recompile libphp4.so? Thanx for any help, Merlin -- 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] How to fire off a unix command WITHOUT waiting for it to return (I want to use )
Try exec(/bin/scan /dev/null 2/dev/null); Daevid Vincent wrote: How can I cause PHP to fire off a unix program and NOT wait for a reply. Basically I want to use the love the unix provides, but it seems that exec, passthrough, system and even ` ` all wait for a return despite my putting something like exec(/bin/scan ); or `/bin/scan ` *sigh* The sitch is that I'm scanning/pinging/nmap a HUGE amount of IP addresses. Perhaps 254 - 65000 or more individual iP addresses. We have a multithreaded scanner that we wrote in C that can to this quickly, but it's still a wait. It pulls from a db the ips to scan and sets their up/down flags. My php scheduler page queries to get the ones that are up. So as you see, I don't want to wait for a return code, I know the status via the db and how many rows are done/need to be done. Daevid Vincent. http://daevid.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Detecting devices i.e. PDA, Mobile
Hi, I have created an online system, and have created a WAP version, and am currently crreating a PDA version. What I wuold like to to do is give out the same URL instead of domain.com for normal use, domain.com/wap/ or domain.com/pda/. Is there a way of detecting what device is loading the site and redirect them accordingly? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting devices i.e. PDA, Mobile
The easiest is to detect the browser because this is what really matters. Then the dimensions of the display come into the picture. There is a db of these browser capabilities and detecting and using them etc in a sourceforge project call wurlf all the best Shaun wrote: Hi, I have created an online system, and have created a WAP version, and am currently crreating a PDA version. What I wuold like to to do is give out the same URL instead of domain.com for normal use, domain.com/wap/ or domain.com/pda/. Is there a way of detecting what device is loading the site and redirect them accordingly? Thanks for your help -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha/megaupload/ Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML / XLS application
Very true curt, since he the message seems to be about XSL and not about XLS (which i understand to be a ms excel file format) Orlando, head off to w3schools where you will find a map :-) Curt Zirzow wrote: * Thus wrote Ray Hunter ([EMAIL PROTECTED]): So what is your questions concerning php? I think he's lost. Curt -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha/megaupload/ Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [xml] character data
What Tom has to say + you should note that character data may be called more than once for each call to startElement. Tom Rogers wrote: Hi, Saturday, October 11, 2003, 6:26:01 AM, you wrote: DA I do not understand why this line does not work : DA $info[$element] = $content; DA but yet this works: echo $content; DA why? what is the trick? DA -- DA $xml_comment_file = basename($svg_file, '.svg.xml') .'.info.xml'; DA if (file_exists($xml_comment_file)) { DA $file = $xml_comment_file; DA $info = array(); DA $element = null; DA function startElement($parser, $name, $attrs) { DA global $element; DA $element = $name; DA } DA function endElement($parser, $name) { DA print ; DA } DA function characterData($parser, $content) { DA global $info; DA global $element; DA $info[$element] = $content; DA //$info[$element] = sprintf(%s, $content); DA } DA $xml_parser = xml_parser_create(); DA xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, FALSE); DA xml_set_element_handler($xml_parser, startElement, endElement); DA xml_set_character_data_handler($xml_parser, characterData); DA if (!($fp = fopen($file, 'r'))) DA die(could not open XML input\n); DA while ($data = fread($fp, 4096)) DA if (!xml_parse($xml_parser, $data, feof($fp))) DA die(sprintf(XML error: %s at line %d, DAxml_error_string(xml_get_error_code($xml_parser)), DAxml_get_current_line_number($xml_parser))); DA xml_parser_free($xml_parser); DA print_r($info); DA } DA /* DA # the output is without $content : DA Array DA ( DA [info] = DA [file] = DA [orig-file] = DA [orig-author] = DA [bitmap-src] = DA [orig-date] = DA [svg-date] = DA ) DA */ the function characterData can be called with whitespace which is probably overwriting your content try this $content = trim($content); if(!empty($content)) $info[$element] = $content; -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha/megaupload/ Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Am I asking too much?
Any ideas? I want to avoid having two mysql_query($sql). I'm basically looking for better functionality and wanting to learn how to clean up my code. John Taylor-Johnston wrote: So I should break it up my two queries? $sql = 'insert into '.$db2.'.'.$table2.'(KW,AUS,GEO,AN,RB,CO,RR) select KW,AUS,GEO,AN,RB,CO,RR FROM '.$db.'.'.$table.' WHERE id='.$id.';'; mysql_query($sql); $sql = 'DELETE FROM '.$db.'.'.$table.' WHERE id='.$id.' LIMIT 1;'; mysql_query($sql); Any suggestions how I could prompt in between to ask yes or no? PhpMyAdmin does it with a javascript alert(). An easy answer? Maybe I'm being lazy? For security reasons mysql_query does not support ; to separate queries. phpmyadmin splits multiple query strings up (PMA_splitSqlFile()) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: CSV file with PHP
* Thus wrote Eugene Lee ([EMAIL PROTECTED]): On Fri, Oct 10, 2003 at 03:06:53PM -0700, Curt Zirzow wrote: : : On Fri, 10 Oct 2003 18:38:04 -0300, Cesar Aracena [EMAIL PROTECTED] : wrote: : : Does anybody knows how to make a CSV (comma separated values) file : with PHP based on results fetched from MySQL? I need it to import it : with Microsoft Outlook Express. : : csv file format as follows: : : value,value\ with quotes,value with space,valueCR What about values with commas? doh! value, with comma Curt -- My PHP key is worn out PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Encryption question
I wouldn't use crypt, instead use one of the proven more secure hashes like md5 or sha1. For password hashing I'd use md5 (PHP 3 and 4) if you want broad support or sha1 for a little more security (sha1 hasn't been in PHP as long (only since 4.3.0) so you will lose some compatability, Ryan Thompson wrote: I know this is an opinion thing but what's the best functions or function set for password encryption? Currently my project uses md5 but I thinks it's more for checksums isn't it? Also, is mcrypt used for passwords? I looks like it's a two-way encryption. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Am I asking too much?
* Thus wrote John Taylor-Johnston ([EMAIL PROTECTED]): Any ideas? I want to avoid having two mysql_query($sql). I'm basically looking for better functionality and wanting to learn how to clean up my code. there are a couple options, the insert has a extra option, 'ON DUPLICATE KEY': http://www.mysql.com/doc/en/INSERT.html Or use the REPLACE syntax: http://www.mysql.com/doc/en/REPLACE.html Be forewarned about the REPLACE, that there may be side effects because it not only replaces on the primary key value but any UNIQUE index. For example (ingore syntax errors), create table ( id Primary Key name UNIQUE ) Data: 1, 'Name1' 2, 'Name2' replace into table (id, name) values (2, 'Name1'); I havn't tested this situation, but to me that, seems like an awkward position to be in. Curt. Curt -- My PHP key is worn out PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Am I asking too much?
* Thus wrote Curt Zirzow ([EMAIL PROTECTED]): * Thus wrote John Taylor-Johnston ([EMAIL PROTECTED]): Any ideas? I want to avoid having two mysql_query($sql). I'm basically looking for better functionality and wanting to learn how to clean up my code. Oh, and IMO, there isn't anything unclean about having two sql query() statements. It keeps the code more readable as to what you're trying to doing. Curt -- My PHP key is worn out PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] phpmyadmin form onsubmit
What about some javascript to alert() and decide if the form executes like phpmyadmin does: http://ccl.flsh.usherbrooke.ca/example.jpg This would save me time coding PHP. How can I accomplish this? What does the onsubmit look like? John * Thus wrote John Taylor-Johnston ([EMAIL PROTECTED]): Any ideas? I want to avoid having two mysql_query($sql). I'm basically looking for better functionality and wanting to learn how to clean up my code. there are a couple options, the insert has a extra option, 'ON DUPLICATE KEY': http://www.mysql.com/doc/en/INSERT.html Or use the REPLACE syntax: http://www.mysql.com/doc/en/REPLACE.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Am I asking too much?
Curt Oh, and IMO, there isn't anything unclean about having two sql query() statements. It keeps the code more readable as to what you're trying to doing. I agree. I also think I should just try to emulate what phpmyadmin does. KISS principle. Thanks!!! John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions
* Thus wrote Nelson Goforth ([EMAIL PROTECTED]): The Session documentation IS difficult to understand. I wrestled with it for some time (and still am). agreed! I am currently trying to come up with a re-write of the session documentation, to resolve issues like this. The problem is there are many different options and gotchas that it is hard to cover them all with out the documentation becoming bloated with information overload. Curt -- My PHP key is worn out PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Howto ? Local/Master Value
Hi all, I m note a great php config hacker. But I notice thing that i doesnt have to notice before :) In my phpinfo i notice 2 column ; Local Value Master Value http://www.dealgates.com/phpinfo.php So you can make several config judging from the current account ? I dont found anything about that ... How several configs are maintained in a mutual web server ? Surely one php.ini for all and some little hacks on vhosts config ? like here : http://www.php.net/features.safe-mode You can a vhost.conf file. Directory /vhosts/domain.com/httpdocs/ php_admin_value safe_mode 0 php_admin_value open_basedir / /Directory Explain me ? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 11 Oct 2003 18:26:23 -0000 Issue 2349
php-general Digest 11 Oct 2003 18:26:23 - Issue 2349 Topics (messages 165835 through 165857): Re: XML / XLS application 165835 by: Curt Zirzow 165847 by: Raditha Dissanayake Re: Oracle - Win32 165836 by: John Nichel 165837 by: imran off-list topic: Debian vs. Redhat 165838 by: Wang Feng 165839 by: Curt Zirzow Re: CSV file with PHP 165840 by: Eugene Lee 165850 by: Curt Zirzow recompiling libphp4.so because of modssl?? 165841 by: Merlin 165843 by: daniel.electroteque.org Re: Sessions 165842 by: Nelson Goforth 165856 by: Curt Zirzow Re: How to fire off a unix command WITHOUT waiting for it to return (I want to use ) 165844 by: Marek Kilimajer Detecting devices i.e. PDA, Mobile 165845 by: Shaun 165846 by: Raditha Dissanayake Re: [xml] character data 165848 by: Raditha Dissanayake Re: Am I asking too much? 165849 by: John Taylor-Johnston 165852 by: Curt Zirzow 165853 by: Curt Zirzow 165855 by: John Taylor-Johnston Re: Encryption question 165851 by: Jason Sheets Re: phpmyadmin form onsubmit 165854 by: John Taylor-Johnston Howto ? Local/Master Value 165857 by: ada 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--- * Thus wrote Ray Hunter ([EMAIL PROTECTED]): So what is your questions concerning php? I think he's lost. Curt -- My PHP key is worn out PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ ---End Message--- ---BeginMessage--- Very true curt, since he the message seems to be about XSL and not about XLS (which i understand to be a ms excel file format) Orlando, head off to w3schools where you will find a map :-) Curt Zirzow wrote: * Thus wrote Ray Hunter ([EMAIL PROTECTED]): So what is your questions concerning php? I think he's lost. Curt -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha/megaupload/ Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. ---End Message--- ---BeginMessage--- [EMAIL PROTECTED] wrote: Hello mailing list, I want to use Oracle function in PHP parser in Win32 OS, but I don't know how to install it, in the official documentation tell this: Installation You have to compile PHP with the option --with-oracle[=DIR], where DIR defaults to your environmment variable ORACLE_HOME. I think that this steps is by Linux user, any help, I will appreciate, thanks. http://www.php.net/manual/en/install.windows.php -- By-Tor.com It's all about the Rush http://www.by-tor.com ---End Message--- ---BeginMessage--- -Edit the php.ini file GET THE DLLs: The Dlls for mssql and others (oracle, sybase, etc.) are NOT included in the installation (Install Shield Wizard) in the root folder. Get the other package for windows systems (NO Install shield!). Just plain files. After unzipping the file, look for the subdirectory called extensions. NOT the dlls folder! You'll find a bunch of dlls with the name format like such: php_xxx. For Oracle DD, you'll need php_oracle.dll. Take the oracle dll. PLACE THE DLL(s): Place the dll you want in the root folder where you installed php locally. EDITING THE PHP.INI: Your php.ini SHOULD be in the Windows System Root (commonly C:\WINNT). Ok, in the php.ini file, look for the Paths and Directories section. Your extension_dir path should look like a DOS path like this: extension_dir = C:/php/ ; Point the directory where you installed php ; inside the root should be the dll you placed! If the default value of extension_dir is = ./ REMOVE IT! This path should be identical to a DOS path! Ok, this is just a side note: If you find a comment section for Windows Extensions inside another section called Dynamic Extensions that has a bunch of lines like this: ;extension=php_xxx1.dll ;extension=php_xxx2.dll un-comment this line for oracle dll... THAT's it! Save the php.ini. Now you can call Oracle functions - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, October 11, 2003 10:29 AM Subject: [PHP] Oracle - Win32 Hello mailing list, I want to use Oracle function in PHP parser in Win32 OS, but I don't know how to install it, in the official documentation tell this: Installation You have to compile PHP with the option --with-oracle[=DIR], where DIR defaults to your environmment variable ORACLE_HOME. I think that this steps is by Linux user, any help, I will appreciate, thanks. -- PHP General Mailing List
[PHP] PNG to GIF conversion
How do I do this?? I have the latest version of GD with PNG, but no GIF. But I *have to* be able to convert images to gif. Is there any standalone php script that'll do it, or a cgi??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PNG to GIF conversion
Well there's a stand alone program called ImageMagick Michael Still wrote an article on it which may be useful. There should still be a link for it on the main page @ stillhq.com On Saturday 11 October 2003 01:50 pm, John Ryan wrote: How do I do this?? I have the latest version of GD with PNG, but no GIF. But I *have to* be able to convert images to gif. Is there any standalone php script that'll do it, or a cgi??? -- Evan Nemerson [EMAIL PROTECTED] -- If you would be a real seeker after truth, you must at least once in your life doubt, as far as possible, all things. -Rene Descartes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PNG to GIF conversion
no, i mean a on-the-fly conversion in php. unless its a unix program... is it? Evan Nemerson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Well there's a stand alone program called ImageMagick Michael Still wrote an article on it which may be useful. There should still be a link for it on the main page @ stillhq.com On Saturday 11 October 2003 01:50 pm, John Ryan wrote: How do I do this?? I have the latest version of GD with PNG, but no GIF. But I *have to* be able to convert images to gif. Is there any standalone php script that'll do it, or a cgi??? -- Evan Nemerson [EMAIL PROTECTED] -- If you would be a real seeker after truth, you must at least once in your life doubt, as far as possible, all things. -Rene Descartes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PNG to GIF conversion
and i cant see the article your talking about on stillgq.com Evan Nemerson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Well there's a stand alone program called ImageMagick Michael Still wrote an article on it which may be useful. There should still be a link for it on the main page @ stillhq.com On Saturday 11 October 2003 01:50 pm, John Ryan wrote: How do I do this?? I have the latest version of GD with PNG, but no GIF. But I *have to* be able to convert images to gif. Is there any standalone php script that'll do it, or a cgi??? -- Evan Nemerson [EMAIL PROTECTED] -- If you would be a real seeker after truth, you must at least once in your life doubt, as far as possible, all things. -Rene Descartes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php5.0.0beta1
Hello - Is there some documentation of the new xml-api available somewhere? Regards Dennis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PNG to GIF conversion
Yes. On Saturday 11 October 2003 02:13 pm, John Ryan wrote: no, i mean a on-the-fly conversion in php. unless its a unix program... is it? Evan Nemerson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Well there's a stand alone program called ImageMagick Michael Still wrote an article on it which may be useful. There should still be a link for it on the main page @ stillhq.com On Saturday 11 October 2003 01:50 pm, John Ryan wrote: How do I do this?? I have the latest version of GD with PNG, but no GIF. But I *have to* be able to convert images to gif. Is there any standalone php script that'll do it, or a cgi??? -- Evan Nemerson [EMAIL PROTECTED] -- If you would be a real seeker after truth, you must at least once in your life doubt, as far as possible, all things. -Rene Descartes -- Evan Nemerson [EMAIL PROTECTED] -- A leader is the wave pushed ahead by the ship. -Leo Nikolaevich Tolstoy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PNG to GIF conversion
Then try stillhq.com, as stillgq.com won't get you too far. Fourth article down, Command line image procesing[sic] If you would have actually read a bit of the page I sent you to, perhaps you would have found that out without having to ask. Your last question could have been answered by a quick trip to Google. Even your original question could have been answered by Google, or probably even the archives. And it's you're, not your. You're means you are. Your is The pronoun of the second person, in the nominative, dative, and objective case, indicating the person or persons addressed. (Webster's Revised Unabridged Dictionary 1913). And believe it or not, the shift key is there for a reason. Have a nice day. On Saturday 11 October 2003 02:14 pm, John Ryan wrote: and i cant see the article your talking about on stillgq.com Evan Nemerson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Well there's a stand alone program called ImageMagick Michael Still wrote an article on it which may be useful. There should still be a link for it on the main page @ stillhq.com On Saturday 11 October 2003 01:50 pm, John Ryan wrote: How do I do this?? I have the latest version of GD with PNG, but no GIF. But I *have to* be able to convert images to gif. Is there any standalone php script that'll do it, or a cgi??? -- Evan Nemerson [EMAIL PROTECTED] -- If you would be a real seeker after truth, you must at least once in your life doubt, as far as possible, all things. -Rene Descartes -- Evan Nemerson [EMAIL PROTECTED] -- A people who mean to be their own governors, must arm themselves with the power knowledge gives. -James Madison -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sessions
Hi, I checked the session settings with phpinfo(); I get the following values: session_save_path = /tmp session.use_cookies = On session.use_trans_sid = 1 I've created a folder on the same level as all the pages called ccb_sessions and have CHMOD it to 777. I have added the following snippet above session_start: ?php session_save_path(/ccb_sessions);? When navigating to my test page I get the following error: Warning: open(/ccb_sessions/sess_bbbfa69631155d4097e0b0012c857c4a, O_RDWR) failed: No such file or directory (2) in /home/.paco/campuscb/campuscorkboard.com/MemberAccountDetails.php on line 2 Checking with my FTP client that file is there and has CHMOD values of 777. I've done a Google search for No such file or directory, found a bunch of stuff for Python, nothing for PHP. I then closed the browser, FTP'd to the ccb_sessions folder, deleted the sess_bbbfa69631155d4097e0b0012c857c4a file and changed the session_save_path to session_save_page(ccb_session);. When going to the test page, it appears to loop several times, then gives me a The page cannot be displayed message. The server is (from phpinfo())Linux gaia 2.2.20, Server API is Apache. Other ideas? Thanks, James -Original Message- From: Lowell Allen [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 6:23 PM To: PHP Subject: Re: [PHP] Sessions I'm trying to track down some issues with my site, and am trying to decide if it's a session variable issue. On a random basis, it appears that session vars are being dumped, deleted, or unset, as the site will break. Queries based on session vars don't work, session vars not being displayed, etc. This seems to happen most often after a page has been idle for a couple of minutes and a refresh is done on the page. This is on a hosted site. I have checked the configuration settings with phpinfo(); and session support is enabled. On all pages where I use $_SESSION[varname], I have ?php session_start();?. This has been double checked. 1) Do session vars timeout, or can they be set to timeout after a certain length of time? 2) Is there anything other than session_start(); that needs to be done when using session vars? 3) What other things can I check for? Most things are explained well by the online manual, and you should read and re-read the session documentation. That said, I'll also say that the documentation on sessions is not as informative as I'd like it to be, and I still get reports of sessions expiring before they should. Look at the output from echo phpinfo() and check these session configuration options: session.cookie_lifetime -- should be 0, lasts until quitting the browser session.use_cookies -- should be on session.use_trans_sid -- should be on Some things aren't explained very well, like what does session.gc_maxlifetime mean? The maximum time before garbage collection to remove session data that hasn't been used? But to minimize the chance of garbage collection on a shared server wrecking your sessions, you can specify a directory for saving session data. Create a directory (on the same level as your directory of publicly-viewable files if you can) and before the 'session_start();' line, do 'session_save_path(../my_sessions_dir);'. Also be aware that circumstances on the client side can mess with session cookies and cause the session to be lost, like using Internet Explorer with Entourage in Mac OS X. -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Detecting devices i.e. PDA, Mobile
Shaun [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have created an online system, and have created a WAP version, and am currently crreating a PDA version. What I wuold like to to do is give out the same URL instead of domain.com for normal use, domain.com/wap/ or domain.com/pda/. Is there a way of detecting what device is loading the site and redirect them accordingly? Thanks for your help As far as I am aware, PHP or infact even JavaScript isn't capable of doing this. Your best bet is to default redirect to a default version of the site (not the WAP or PDA version) and provide a link to the WAP and PDA versions of the site. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Age from date field?
Does anyone have a good solution on how to get the age of someone from a date column in mysql... This is what I have, but it's not really the truth... What's the right way to do it? floor((time()-$a[born])/(3600*24*365.25)) where $a[born] is the timestamp of the birthdate... Current query: SELECT UNIX_TIMESTAMP(birthdate) as born FROM members WHERE id='1' So... how would I do it... Doesn't matter if it's MySQL or PHP that calculates it, as long as I can expect it to work on paid hosts... Any suggestions? Notice that I'm only looking for the age in years... Thanks in advance -- // DvDmanDT MSN: [EMAIL PROTECTED] Mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Search for an exact string inside of another string
Hi all, I have a little problem that I hope you can help me with. I have the following strings: $str1 = Bob; $str2 = My Name Is Bob; How can I get PHP to look for $str1 inside of $str2? Also, what about if Bob inside of $str2 is in different places? I would like something like: if ($str1 IS INSIDE OF $str2) { echo str1 is inside of str2; } else { echo could not find str1 inside of str2; } Any ideas appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sessions - more testing
I've read Nelson's message and have added the following lines: ini_set('session.save_path','ccb_sessions'); ini_set('session.use_trans_sid','off'); ini_set('session.gc_maxlifetime', '3600'); And still get the same page not found error. James -Original Message- From: James Johnson [mailto:[EMAIL PROTECTED] Sent: Saturday, October 11, 2003 3:46 PM To: 'Lowell Allen'; 'PHP' Subject: RE: [PHP] Sessions Hi, I checked the session settings with phpinfo(); I get the following values: session_save_path = /tmp session.use_cookies = On session.use_trans_sid = 1 I've created a folder on the same level as all the pages called ccb_sessions and have CHMOD it to 777. I have added the following snippet above session_start: ?php session_save_path(/ccb_sessions);? When navigating to my test page I get the following error: Warning: open(/ccb_sessions/sess_bbbfa69631155d4097e0b0012c857c4a, O_RDWR) failed: No such file or directory (2) in /home/.paco/campuscb/campuscorkboard.com/MemberAccountDetails.php on line 2 Checking with my FTP client that file is there and has CHMOD values of 777. I've done a Google search for No such file or directory, found a bunch of stuff for Python, nothing for PHP. I then closed the browser, FTP'd to the ccb_sessions folder, deleted the sess_bbbfa69631155d4097e0b0012c857c4a file and changed the session_save_path to session_save_page(ccb_session);. When going to the test page, it appears to loop several times, then gives me a The page cannot be displayed message. The server is (from phpinfo())Linux gaia 2.2.20, Server API is Apache. Other ideas? Thanks, James -Original Message- From: Lowell Allen [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 6:23 PM To: PHP Subject: Re: [PHP] Sessions I'm trying to track down some issues with my site, and am trying to decide if it's a session variable issue. On a random basis, it appears that session vars are being dumped, deleted, or unset, as the site will break. Queries based on session vars don't work, session vars not being displayed, etc. This seems to happen most often after a page has been idle for a couple of minutes and a refresh is done on the page. This is on a hosted site. I have checked the configuration settings with phpinfo(); and session support is enabled. On all pages where I use $_SESSION[varname], I have ?php session_start();?. This has been double checked. 1) Do session vars timeout, or can they be set to timeout after a certain length of time? 2) Is there anything other than session_start(); that needs to be done when using session vars? 3) What other things can I check for? Most things are explained well by the online manual, and you should read and re-read the session documentation. That said, I'll also say that the documentation on sessions is not as informative as I'd like it to be, and I still get reports of sessions expiring before they should. Look at the output from echo phpinfo() and check these session configuration options: session.cookie_lifetime -- should be 0, lasts until quitting the browser session.use_cookies -- should be on session.use_trans_sid -- should be on Some things aren't explained very well, like what does session.gc_maxlifetime mean? The maximum time before garbage collection to remove session data that hasn't been used? But to minimize the chance of garbage collection on a shared server wrecking your sessions, you can specify a directory for saving session data. Create a directory (on the same level as your directory of publicly-viewable files if you can) and before the 'session_start();' line, do 'session_save_path(../my_sessions_dir);'. Also be aware that circumstances on the client side can mess with session cookies and cause the session to be lost, like using Internet Explorer with Entourage in Mac OS X. -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Howto ? Local/Master Value
On Sunday 12 October 2003 02:26, ada wrote: So you can make several config judging from the current account ? I dont found anything about that ... Kind of. How several configs are maintained in a mutual web server ? Surely one php.ini for all and some little hacks on vhosts config ? They're not hacks. They *are* one of the mechanisms for having different configs of php for different purposes. like here : http://www.php.net/features.safe-mode You can a vhost.conf file. Directory /vhosts/domain.com/httpdocs/ php_admin_value safe_mode 0 php_admin_value open_basedir / /Directory Explain me ? Have a look at the manual entry for ini_set(). There's a useful table which tells you *what* php config item can be changed and *where* it can be changed. The master value shown by phpinfo() is setting in php,ini, and the local value is whatever it has been set to at the time phpinfo() is executed. -- 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 -- /* Drawing on my fine command of language, I said nothing. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Search for an exact string inside of another string
Try: if (strpos($str2, $str1) !== false) echo $str1 is inside $str2; else echo could not find $str1 inside $str2; Php Webmaster [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I have a little problem that I hope you can help me with. I have the following strings: $str1 = Bob; $str2 = My Name Is Bob; How can I get PHP to look for $str1 inside of $str2? Also, what about if Bob inside of $str2 is in different places? I would like something like: if ($str1 IS INSIDE OF $str2) { echo str1 is inside of str2; } else { echo could not find str1 inside of str2; } Any ideas appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Detecting devices i.e. PDA, Mobile
Take a look at what is printed by: var_dump($_SERVER); Maybe the HTTP_USER_AGENT can lead you to somewhere out of this problem. Manu. Shaun [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have created an online system, and have created a WAP version, and am currently crreating a PDA version. What I wuold like to to do is give out the same URL instead of domain.com for normal use, domain.com/wap/ or domain.com/pda/. Is there a way of detecting what device is loading the site and redirect them accordingly? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PNG to GIF conversion
Loser Evan Nemerson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Then try stillhq.com, as stillgq.com won't get you too far. Fourth article down, Command line image procesing[sic] If you would have actually read a bit of the page I sent you to, perhaps you would have found that out without having to ask. Your last question could have been answered by a quick trip to Google. Even your original question could have been answered by Google, or probably even the archives. And it's you're, not your. You're means you are. Your is The pronoun of the second person, in the nominative, dative, and objective case, indicating the person or persons addressed. (Webster's Revised Unabridged Dictionary 1913). And believe it or not, the shift key is there for a reason. Have a nice day. On Saturday 11 October 2003 02:14 pm, John Ryan wrote: and i cant see the article your talking about on stillgq.com Evan Nemerson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Well there's a stand alone program called ImageMagick Michael Still wrote an article on it which may be useful. There should still be a link for it on the main page @ stillhq.com On Saturday 11 October 2003 01:50 pm, John Ryan wrote: How do I do this?? I have the latest version of GD with PNG, but no GIF. But I *have to* be able to convert images to gif. Is there any standalone php script that'll do it, or a cgi??? -- Evan Nemerson [EMAIL PROTECTED] -- If you would be a real seeker after truth, you must at least once in your life doubt, as far as possible, all things. -Rene Descartes -- Evan Nemerson [EMAIL PROTECTED] -- A people who mean to be their own governors, must arm themselves with the power knowledge gives. -James Madison -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Search for an exact string inside of another string
Manuel VáZquez Acosta [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Try: if (strpos($str2, $str1) !== false) echo $str1 is inside $str2; else echo could not find $str1 inside $str2; Php Webmaster [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I have a little problem that I hope you can help me with. I have the following strings: $str1 = Bob; $str2 = My Name Is Bob; How can I get PHP to look for $str1 inside of $str2? Also, what about if Bob inside of $str2 is in different places? I would like something like: if ($str1 IS INSIDE OF $str2) { echo str1 is inside of str2; } else { echo could not find str1 inside of str2; } Any ideas appreciated. Thanks! Just what I needed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions
I checked the session settings with phpinfo(); I get the following values: session_save_path = /tmp session.use_cookies = On session.use_trans_sid = 1 I've created a folder on the same level as all the pages called ccb_sessions and have CHMOD it to 777. I have added the following snippet above session_start: ?php session_save_path(/ccb_sessions);? When navigating to my test page I get the following error: Warning: open(/ccb_sessions/sess_bbbfa69631155d4097e0b0012c857c4a, O_RDWR) failed: No such file or directory (2) in /home/.paco/campuscb/campuscorkboard.com/MemberAccountDetails.php on line 2 Checking with my FTP client that file is there and has CHMOD values of 777. I've done a Google search for No such file or directory, found a bunch of stuff for Python, nothing for PHP. [snip] Other ideas? I think you need to provide a full directory path. I looked at my code and here's exactly what I do. First, I include some functions with a require_once() statement. One of the functions is prepath(): function prepath($url) { $prepath = ; if (substr_count($url, /)) { for ($i = 1; $i substr_count($url, /); $i++) { $prepath .= ../; } } return $prepath; } That lets me use the same statement in different directories. Then the page actually starts like this: require_once($req_fns); session_save_path(prepath($PHP_SELF) . ../ccb_sessions); session_start(); Note that when I said my session data directory is on the same level as my publicly viewable files (public_html), I mean that the session directory is not contained within public_html, but is outside it at the same directory level on the server. HTH -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting devices i.e. PDA, Mobile
Hi, Saturday, October 11, 2003, 10:02:31 PM, you wrote: S Hi, S I have created an online system, and have created a WAP version, and am S currently crreating a PDA version. What I wuold like to to do is give out S the same URL instead of domain.com for normal use, domain.com/wap/ or S domain.com/pda/. Is there a way of detecting what device is loading the site S and redirect them accordingly? S Thanks for your help I have done this before, messy but it was the only way I could find at the time $mode = HTML; if(eregi(UP.Browser,$_SERVER['HTTP_USER_AGENT']) || eregi(Nokia,$_SERVER['HTTP_USER_AGENT']) || eregi(Wapalizer,$_SERVER['HTTP_USER_AGENT']))$mode = XML; This was from a while ago but you get the idea -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Echo $PHP_SELF not working
Actually, that should make no difference... you don't need a ; if it's the last instruction before the close of PHP. Try ?php echo $_SEVER['PHP_SELF']? or ?=$_SEVER['PHP_SELF']? Justin On Saturday, October 11, 2003, at 09:29 AM, Al wrote: Put a ; [no quotes] after such as: echo $PHP_SELF; Jeff McKeon wrote: I've just published a new website and something is wrong. I suspect the PHP.ini on the server but I can't seem to find anything. The line: form method='post' action='?PHP ECHO $PHP_SELF ?' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php