[PHP] Wrong IP address
If your request is going through a proxy, $_SERVER[REMOTE_ADDR] will contain the ip address for the proxy. The proxy might add a HTTP_X_FORWARDED_FOR header to the request which will contain the ip address of the client to the proxy, which should be where the request originated. It is possible for a request to travel through several proxies and then the HTTP_X_FORWARDED_FOR header will be added several times. $_SERVER['HTTP_X_FORWARDED_FOR'] if exists will contain the ip address of where the request originated if the request was proxied. $_SERVER['HTTP_X_FORWARDED_FOR'] may be an array if the request was proxied several times. Regards, Peter Albertsson -Original Message- From: ascll [mailto:[EMAIL PROTECTED] Sent: den 30 mars 2004 03:13 To: [EMAIL PROTECTED] Subject: [PHP] Wrong IP address Greetings, I make use of these: - ?php echo($_SERVER[REMOTE_ADDR]); ? to get the web IP address for my machine once my PC is connected to Internet.. Anyway, sometime I get the correct IP address, but sometime NOT. Does anyone know why? Thanks in advance. -- 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
[no subject]
Dear all, i just move my previous php script to a new server and found that it is not working on the new machine. funny thing is that previously, say i am putting form items like input type=text name=item1 in the form page, and then i can striaghtaway read the item1 value by using $item1 variable. but now, reading $item1 give me nothing. is there anything i have to set in the php.ini ? or any packages i miss? I am using php-4.2.2 for both my new/old machine, and following is the packages i installed. php-ldap-4.2.2-17.2.i386.rpm php-4.2.2-17.2.i386.rpm php-mysql-4.2.2-17.2.i386.rpm php-imap-4.2.2-17.2.i386.rpm thanks for your time and please help! * Confidentiality Notice ** This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. *
[PHP] Re:
On Tuesday 30 March 2004 09:40, Ketvin wrote: Dear all, i just move my previous php script to a new server and found that it is not working on the new machine. funny thing is that previously, say i am putting form items like input type=text name=item1 Manual: Register globals. $_POST, $_GET -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re:
Ketvin wrote: Dear all, [ snip ] Forgot a subject? :| Your message was flagged as spam and sent to the trash bin because it didn't contain a subject. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help! handling form variable
add the $_POST, $_GET after the register_globals in php.ini ? how do i restart php service to get it running? thanks ! Manual: Register globals. $_POST, $_GET On Tuesday 30 March 2004 09:40, Ketvin wrote: Dear all, i just move my previous php script to a new server and found that it is not working on the new machine. funny thing is that previously, say i am putting form items like input type=text name=item1
Re: [PHP] help! handling form variable
If you DO NOT register globals (in php.ini) you MUST use $_POST[post_var] or $_GET[get_var] to access those variables... If you DO resgister globals you can also use $post_var or $get_var. By default, register globals is set to Off for security reasons; so you'll need to set it On. The line must say: register_globals = On ; Whether or not to register the EGPCS variables as global Hope it helps!!! -- Miguel J. Jiménez ISOTROL, S.A. (Área de Internet) Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA) [EMAIL PROTECTED] TLFNO. 955036800 ext. 111 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: STOP to send me mails !!!! Re: [PHP] Re: list to array help :-)
Hi ! I do not know why I received this newsgroup infos, even if I like PHP :-) I will follow procedure unsbcribe Thanks for your reply Bye ! Ben Ramsey [EMAIL PROTECTED] wrote: W I do not want to receive all these email W W Please STOP W W Do not use the global list for your discussion What else is the global list for, then? Perhaps you need to sign up for the digested version or browse the mailing list as a newsgroup instead of selecting to receive every message. -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php *___LINKS_* - Website JAVA Applet demo : http://membres.lycos.fr/wabyan * Superwaba__* - SUPERWABA (Official site) : www.superwaba.com.br - SUPERWABA (VM Download) : www.superwaba.org/install - SUPERWABA FRANCE (Webmaster: A.Farine) : www.superwaba-france.com * Musik* - LUNE: http://cabaretlune.free.fr - GUYADER : http://membres.lycos.fr/cuic - Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! Créez votre Yahoo! Mail Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !
[PHP] PHP charset encoding
Hi all, I have problem storing the submitted data in the database in the right encoding. I need to use UTF-8 I need to save the Arabic text in UTF-8 encoding. I have a problem with UTF-8 and windows-1256 conversion. I wish I can understand those things, coz encoding thing will take my hair off When submitting a data from an HTML page and inserting them in MySQL: what encoding they will be ? is it the page encoding? the field size like VARCHAR 15 won't fit the same in both encoding for the same text. !! Is the font any relation with encoding? phpmyadmin doesn't support UTF-8 so dumping your data using it will screw it up is it a way to convert it inside the database... Explain to me please , or if you can tell me where to find my answers (not google) Nabil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE:
Might be a Register Globals issue: http://us4.php.net/register_globals -Original Message- From: Ketvin [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 30, 2004 12:40 AM To: [EMAIL PROTECTED] Subject: Dear all, i just move my previous php script to a new server and found that it is not working on the new machine. funny thing is that previously, say i am putting form items like input type=text name=item1 in the form page, and then i can striaghtaway read the item1 value by using $item1 variable. but now, reading $item1 give me nothing. is there anything i have to set in the php.ini ? or any packages i miss? I am using php-4.2.2 for both my new/old machine, and following is the packages i installed. php-ldap-4.2.2-17.2.i386.rpm php-4.2.2-17.2.i386.rpm php-mysql-4.2.2-17.2.i386.rpm php-imap-4.2.2-17.2.i386.rpm thanks for your time and please help! * Confidentiality Notice ** This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload file
Dear list, I'm using squirrelmail php as my webmail interface, my php.ini have the option of upload_max_filesize = 10M but i'm having problem for adding attachment more than 400k, where the page will hang. is there any recommended things for me to check? Thanks !
[PHP] Checking if a website is up?
Hi All, I am trying to check if a website is up (reachable) and I have used the standard code below: Unfortunately this works for most sites but Microsoft doesn't work most of the time even thought the site is definiately up! (Occassionally it does say it is reachable but only occassionaly and thats whats even more confusing). Suggestions? Henry I tried URL's as follows: http://www.microsoft.com/ http://www.microsoft.com function url_reachable( $link ) { $url_parts = @parse_url( $link ); if ( $url_parts[scheme]!=http ) return ( false ); if ( empty( $url_parts[host] ) ) return( false ); if ( !empty( $url_parts[path] ) ) { $documentpath = $url_parts[path]; } else { $documentpath = /; } if ( !empty( $url_parts[query] ) ) { $documentpath .= ? . $url_parts[query]; } $host = $url_parts[host]; $port = $url_parts[port]; // Now (HTTP-)GET $documentpath at $host; if (empty( $port ) ) $port = 80; $socket = @fsockopen( $host, $port, $errno, $errstr, 30 ); if (!$socket) { return(false); } else { fwrite ($socket, HEAD .$documentpath. HTTP/1.0\r\nHost: $host\r\n\r\n); $http_response = fgets( $socket, 22 ); if ( ereg(200 OK, $http_response, $regs ) ) { return(true); fclose( $socket ); } else { //echo HTTP-Response: $http_responsebr; return(false); } } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP charset encoding
Nabil wrote: Hi all, I have problem storing the submitted data in the database in the right encoding. I need to use UTF-8 I need to save the Arabic text in UTF-8 encoding. I have a problem with UTF-8 and windows-1256 conversion. I wish I can understand those things, coz encoding thing will take my hair off When submitting a data from an HTML page and inserting them in MySQL: what encoding they will be ? is it the page encoding? I *think* that MySQL 4.1+ supports your encoding. You can check their online documentation, specifically: http://www.mysql.com/doc/en/Charset-se-me-sets.html the field size like VARCHAR 15 won't fit the same in both encoding for the same text. !! Is the font any relation with encoding? phpmyadmin doesn't support UTF-8 so dumping your data using it will screw it up is it a way to convert it inside the database... Are you using php 4.1+? If so, then you can at least test what values are in your forms by trying a snippet like so (you may have a lot of data to go through, but it should be there): echo 'pre'; print_r($_REQUEST); echo '/pre'; Explain to me please , or if you can tell me where to find my answers (not google) I'm sure you hate to hear this, but I found the answer to your first question with a search engine. May I make a suggestion? Try downloading Mozilla Firefox http://texturizer.net/firefox/download.html#release When you've installed the appropriate version for your OS, install this plugin: http://mycroft.mozdev.org/download.html# Read how to use it at that site, and the next time you want an answer that you might find in online documentation you can quickly find it with your new tool. Nabil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Checking if a website is up?
Henry Grech-Cini wrote: Hi All, I am trying to check if a website is up (reachable) and I have used the standard code below: Unfortunately this works for most sites but Microsoft doesn't work most of the time even thought the site is definiately up! (Occassionally it does say it is reachable but only occassionaly and thats whats even more confusing). Suggestions? Try inserting die('breakpoint'); in each of your if() blocks. When you stop seeing it, there's your error :) Henry I tried URL's as follows: http://www.microsoft.com/ http://www.microsoft.com function url_reachable( $link ) { $url_parts = @parse_url( $link ); if ( $url_parts[scheme]!=http ) return ( false ); if ( empty( $url_parts[host] ) ) return( false ); if ( !empty( $url_parts[path] ) ) { $documentpath = $url_parts[path]; } else { $documentpath = /; } if ( !empty( $url_parts[query] ) ) { $documentpath .= ? . $url_parts[query]; } $host = $url_parts[host]; $port = $url_parts[port]; // Now (HTTP-)GET $documentpath at $host; if (empty( $port ) ) $port = 80; $socket = @fsockopen( $host, $port, $errno, $errstr, 30 ); if (!$socket) { return(false); } else { fwrite ($socket, HEAD .$documentpath. HTTP/1.0\r\nHost: $host\r\n\r\n); $http_response = fgets( $socket, 22 ); if ( ereg(200 OK, $http_response, $regs ) ) Well there are plenty of other HTTP responses you could be getting instead of just 200. Perhaps you are getting redirections or other messages? { return(true); fclose( $socket ); } else { //echo HTTP-Response: $http_responsebr; return(false); } } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Checking if a website is up?
I am trying to check if a website is up (reachable) and I have used the standard code below: [...] $socket = @fsockopen( $host, $port, $errno, $errstr, 30 ); if (!$socket) fwrite ($socket, HEAD .$documentpath. HTTP/1.0\r\nHost: $host\r\n\r\n); $http_response = fgets( $socket, 22 ); if ( ereg(200 OK, $http_response, $regs ) ) Maybe you can find something in the curl functions? http://nl3.php.net/manual/nl/ref.curl.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Display/Screen Size Parameters
Is there a function within PHP that picks up the screen/display size? I know of the one in JavaScript, however I want to pick it up in PHP Thanks Nunners -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem of unicode ( Inserted data / Query )
Edward, I couldn't see either of your SQL statements. However, PHP's internal functions currently supports UTF-8, not UTF-16, so not all characters are supported. Can you post some code? [EMAIL PROTECTED] wrote: Dear You, How to control php convert inserted data or query to / from MS-SQL ( MUST in charset of unicode ) ? For example, Insert data into MS-SQL : A client user ( using his/her own language ) insert some data into MS-SQL, then MS-SQL MUST store the data ( which come from the client user ) in unicode format ( charset ). Query from MS-SQL : A client user ( using his/her own language ) search some info from MS-SQL, but all of the format of stored data were unicode ( charset ), so must convert the charset of unicode to a special format ( charset ) for the client user ( correspond to his/her own language ) Many thank for your help so much ! Best Regards, Edward. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Display/Screen Size Parameters
I had this same problem, as I wanted to resolve whether or not the device was a PDA. I couldn't see an easy way, but what I did was to have a dummy JavaScript page that grabs the screen dimensions, and then forwards on to a PHP page, with the screen size as the parameter. Something like: http://www.example.com/page2.php?width=800height=600 Then you've got your details! Cheers Richard -Original Message- From: James Nunnerley [mailto:[EMAIL PROTECTED] Sent: 30 March 2004 11:45 To: [EMAIL PROTECTED] Subject: [PHP] Display/Screen Size Parameters Is there a function within PHP that picks up the screen/display size? I know of the one in JavaScript, however I want to pick it up in PHP Thanks Nunners -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php == This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. == -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Print PHP Code in Color on Dreamweaver MX
Hello, Does anyone know how to actually print PHP code in Color to actual paper from Dreamweaver MX? We like to paste the code up to the wall here to get a bigger look at it. I know you can do it in BBedit, but MX is what we like. Just curios. Thanks! Sincerely, Ryan Munevar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Display/Screen Size Parameters
James Nunnerley wrote: Is there a function within PHP that picks up the screen/display size? I know of the one in JavaScript, however I want to pick it up in PHP Thanks Nunners I assume you mean the size of a web browser's screen? I don't know of anything PHP that does that offhand. Although, if you are using PHP-GTK to create screens you could probably get the screen size for that... but again, I don't know offhand how to do that one. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re:
I think it because of the register_globals automatically set to off on PHP 4.2 up. try using $_GET[item1] or $_POST[item1] instead. hth - Original Message - From: Ketvin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 30, 2004 4:40 PM Dear all, i just move my previous php script to a new server and found that it is not working on the new machine. funny thing is that previously, say i am putting form items like input type=text name=item1 in the form page, and then i can striaghtaway read the item1 value by using $item1 variable. but now, reading $item1 give me nothing. is there anything i have to set in the php.ini ? or any packages i miss? I am using php-4.2.2 for both my new/old machine, and following is the packages i installed. php-ldap-4.2.2-17.2.i386.rpm php-4.2.2-17.2.i386.rpm php-mysql-4.2.2-17.2.i386.rpm php-imap-4.2.2-17.2.i386.rpm thanks for your time and please help! * Confidentiality Notice ** This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Print PHP Code in Color on Dreamweaver MX
Ryan Munevar wrote: Hello, Does anyone know how to actually print PHP code in Color to actual paper from Dreamweaver MX? We like to paste the code up to the wall here to get a bigger look at it. I know you can do it in BBedit, but MX is what we like. Just curios. Thanks! Sincerely, Ryan Munevar Try the function highlight_string. Send the source code you want to your browser and then print your browser's screen. You can even change the colors; check out php.ini's syntax highlighting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Crash in PHP5RC1 but can't find where
Red Wingate wrote: Hi David, same thing i reported to the PHP-DEV List some time ago ( before RC1 was released ). The problem is the Win32/Apache2 Combination you are using. I am using the same setup as well, if any of you find a solution to this I would appreciate hearing about it. I've noticed major problems when I try using the Reflection classes... one little error seems to crash the server. But the backtrace works for other minor errors? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Crash in PHP5RC1 but can't find where
Maybe give it a try, haven't much time to do so at the moment, took me about 4 hours to find the problem that caused the crashing of my code and build those reproduction code :-) http://download.erisx.de/crash.txt Maybe try adding other test-cases and see wether it crashes or not if it does then i think there is a problem how PHP handles debug info- rmation (as this seams to happen using reflections as well) -- red Red Wingate wrote: Hi David, same thing i reported to the PHP-DEV List some time ago ( before RC1 was released ). The problem is the Win32/Apache2 Combination you are using. I am using the same setup as well, if any of you find a solution to this I would appreciate hearing about it. I've noticed major problems when I try using the Reflection classes... one little error seems to crash the server. But the backtrace works for other minor errors? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Namespaces in PHP
On Mon, 2004-03-29 at 23:10, Justin Palmer wrote: Hey listen Rob, I was not trying to give you a hard time (or split hairs). In fact I am grateful for your answer and your want to explain even more in depth than some of the one line answers on the list. The reason that I was splitting hairs was because I got 3 or 4 emails to my personal account regarding namespaces and what they were used for. Also, one of them quoted you and how you used namespace ideology in a object example. I should of explained more about the other emails and you would have seen up front that I was not giving you a hard time. I am once again sorry to offend you and offend the list (if I did so). My apologies, Justin Palmer No harm done, no offence taken. I'm just a little ornery at times :) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] describe.php - PHP Extensions, Classes, Objects and Functions
I just sent this to one person and realized that others might find this useful. This code will ONLY work for PHP 5, comments are in the code. ?php /** * This is a class that can be used to describe classes, objects, methods, * functions, parameters, properties, and even extensions. * Example usage: * * $desc = new Describe(); * echo 'pre'; * print_r($desc-describeExtension('standard')); * * or * * $desc = new Describe(); * echo 'pre'; * print_r($desc-describeObject($desc)); */ class Describe { /** * Wrapper function for private function _describeClass * * @param string $class The string name of a class * @param bool$summary(optional) Print the summary info only. If false, * then this function prints *everything* it finds. * @return array with class description or an error */ public function describeClass($class, $summary = false) { if (class_exists($class)) { $class = new Reflection_Class($class); return Describe::_describeClass($class, $summary); } else { return webeditor::raiseError(WEBEDITOR_NO_CLASS, __FUNCTION__, __CLASS__); } } /** * Wrapper function for private function _describeObject * * @param object $objAny object * @param bool$summary(optional) Print the summary info only. If false, * then this function prints *everything* it finds. * @return array with class description or an error */ public function describeObject($obj, $summary = false) { if (is_object($obj)) { return Describe::_describeObject($obj, $summary); } else { return webeditor::raiseError(WEBEDITOR_NO_OBJECT, __FUNCTION__, __CLASS__); } } /** * This function returns an array representation of an extension. * * @param string $extension Name of a loaded extension * @param bool$summary(optional) Print the summary info only. If false, * then this function prints *everything* it finds. * @return array on success or an error on failure */ public function describeExtension($extension = 'standard', $summary = false) { if (extension_loaded($extension)) { return Describe::_describeExtension(new Reflection_Extension($extension), $summary); } else { return webeditor::raiseError(WEBEDITOR_NO_EXTENSION, __FUNCTION__, __CLASS__); } } /** * Wrapper function for private function _describeFunction * * @param string $function Name of a function * @param bool$summary(optional) Print the summary info only. If false, * then this function prints *everything* it finds. * @return array */ public function describeFunction($function, $summary = false) { if (!function_exists($function)) { return webeditor::raiseError(WEBEDITOR_NO_FUNCTION, __FUNCTION__, __CLASS__); } else { return Describe::_describeFunction(new Reflection_Function($function), $summary); } } /** * This function returns an array representation of the class / object. * * @param mixed $class_or_obj Either an object or the string name of a class * @param string $method Name of a method in $class_or_obj * @param bool$summary(optional) Print the summary info only. If false, * then this function prints *everything* it finds. * @return array */ public function describeMethod($class_or_obj, $method, $summary = false) { if (is_object($class_or_obj)) { $class = get_class($class_or_obj); } else { $class = $class_or_obj; } if (class_exists($class) function_exists($method)) { return Describe::_describeMethod(new Reflection_Method($classname, $method)); } else { return webeditor::raiseError(WEBEDITOR_NO_METHOD, __FUNCTION__, __CLASS__); } } // }}} // {{{ _describeObject() private function _describeObject($obj, $summary) { $class = new Reflection_Class(get_class($obj)); $desc = array(); if ($summary) { $desc['name'] = $class-getName(); $desc['extends'] = is_string($ext = var_export($class-getParentClass(), 1)) ? $ext : 'none'; foreach($class-getProperties() as $prop) { $desc['properties'][$prop-getName()] = Describe::_describeProperty($prop, true, $obj); } foreach ($class-getMethods() as $method) { $desc['methods'][$method-getName()] = Describe::_describeMethod($method, true); } }
[PHP] Re: describe.php - PHP Extensions, Classes, Objects and Functions
Darnit... I forgot I changed the error handler in my own scripts. Use this instead, sorry for posting bad code the first time around: ?php /** * This is a class that can be used to describe classes, objects, methods, * functions, parameters, properties, and even extensions. * Example usage: * * $desc = new Describe(); * echo 'pre'; * print_r($desc-describeExtension('standard', true)); * * or * * $desc = new Describe(); * echo 'pre'; * print_r($desc-describeObject($desc)); */ class Describe { /** * Wrapper function for private function _describeClass * * @param string $class The string name of a class * @param bool$summary(optional) Print the summary info only. If false, * then this function prints *everything* it finds. * @return array with class description or an error */ public function describeClass($class, $summary = false) { if (class_exists($class)) { $class = new Reflection_Class($class); return Describe::_describeClass($class, $summary); } else { return Could not describe class $class; } } /** * Wrapper function for private function _describeObject * * @param object $objAny object * @param bool$summary(optional) Print the summary info only. If false, * then this function prints *everything* it finds. * @return array with class description or an error */ public function describeObject($obj, $summary = false) { if (is_object($obj)) { return Describe::_describeObject($obj, $summary); } else { return Could not describe the object; } } /** * This function returns an array representation of an extension. * * @param string $extension Name of a loaded extension * @param bool$summary(optional) Print the summary info only. If false, * then this function prints *everything* it finds. * @return array on success or an error on failure */ public function describeExtension($extension = 'standard', $summary = false) { if (extension_loaded($extension)) { return Describe::_describeExtension(new Reflection_Extension($extension), $summary); } else { return Could not describe the extension $extension; } } /** * Wrapper function for private function _describeFunction * * @param string $function Name of a function * @param bool$summary(optional) Print the summary info only. If false, * then this function prints *everything* it finds. * @return array */ public function describeFunction($function, $summary = false) { if (function_exists($function)) { return Describe::_describeFunction(new Reflection_Function($function), $summary); } else { return Could not describe the function $function; } } /** * This function returns an array representation of the class / object. * * @param mixed $class_or_obj Either an object or the string name of a class * @param string $method Name of a method in $class_or_obj * @param bool$summary(optional) Print the summary info only. If false, * then this function prints *everything* it finds. * @return array */ public function describeMethod($class_or_obj, $method, $summary = false) { if (is_object($class_or_obj)) { $class = get_class($class_or_obj); } else { $class = $class_or_obj; } if (class_exists($class) function_exists($method)) { return Describe::_describeMethod(new Reflection_Method($classname, $method)); } else { return Could not describe method $method; } } // }}} // {{{ _describeObject() private function _describeObject($obj, $summary) { $class = new Reflection_Class(get_class($obj)); $desc = array(); if ($summary) { $desc['name'] = $class-getName(); $desc['extends'] = is_string($ext = var_export($class-getParentClass(), 1)) ? $ext : 'none'; foreach($class-getProperties() as $prop) { $desc['properties'][$prop-getName()] = Describe::_describeProperty($prop, true, $obj); } foreach ($class-getMethods() as $method) { $desc['methods'][$method-getName()] = Describe::_describeMethod($method, true); } } else { $desc['name'] = $class-getName(); $desc['extends'] = is_string($ext = var_export($class-getParentClass(), 1)) ? $ext : 'none';
Re: [PHP] upload file
Ketvin wrote: Dear list, I'm using squirrelmail php as my webmail interface, my php.ini have the option of upload_max_filesize = 10M but i'm having problem for adding attachment more than 400k, where the page will hang. is there any recommended things for me to check? post_max_size, max_input_time -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: TUX web server replacement
Hi Manuel, Well, I'am aware of that but the application is already made and it is big and development continue, so change it will be a huge task and we have no resources available for it. Tux used to perform very well here, but unfortunatelly there is no other user space competitor that offers the same features. :-( -William El lun, 29-03-2004 a las 21:08, Manuel Lemos escribió: Hello, On 03/29/2004 04:45 PM, William Lovaton wrote: I've tried boa, thttpd, but none of these can do that, the only thing they can do is redirect which is not the same. I would like to know if there are others fast user space web servers that can pass dynamic requests to a second robust web server like apache. I heard about phhttp but it is too old and unmaintained. Why don't you just serve your static content (images and such) with thttpd running on a different IP address or TCP port and leave Apache running in port 80? -- 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] passing a variable value of PHP into the alert of JavaScript.
Dear my friends... I want to make an alert which can display a value from the database. I am meaning : how can I pass a value of a variable from PHP into JavaScript alert ( alert($Firstname, $LastName and $Address); Is it possible? -- _ Web-based SMS services available at http://www.operamail.com. From your mailbox to local or overseas cell phones. Powered by Outblaze -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: passing a variable value of PHP into the alert of JavaScript.
Prabu Subroto wrote: Dear my friends... I want to make an alert which can display a value from the database. I am meaning : how can I pass a value of a variable from PHP into JavaScript alert ( alert($Firstname, $LastName and $Address); Is it possible? Sure. Probably the easiest way I can think to do it would be to create the JavaScript function as a string and insert your variables into that string. Then print() the string. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP charset encoding
On Tue, Mar 30, 2004 at 11:23:03AM +0300, nabil wrote: Hi all, I have problem storing the submitted data in the database in the right encoding. I need to use UTF-8 I need to save the Arabic text in UTF-8 encoding. I have a problem with UTF-8 and windows-1256 conversion. I wish I can understand those things, coz encoding thing will take my hair off When submitting a data from an HTML page and inserting them in MySQL: what encoding they will be ? is it the page encoding? the field size like VARCHAR 15 won't fit the same in both encoding for the same text. !! Is the font any relation with encoding? phpmyadmin doesn't support UTF-8 so dumping your data using it will screw it up is it a way to convert it inside the database... Explain to me please , or if you can tell me where to find my answers (not google) if the page that the input form is on sets utf-8 as the content type, then most (?) browsers will send utf-8. you can use a meta tag like: meta http-equiv=Content-Type content=text/html; charset=utf-8 utf-8 characters are 8 bit clean, so they can be stored and retrieved in mysql 3.x ok, but proper utf-8 sorting etc. doesn't work. for many purposes though it seems to be ok. single characters in utf-8 encoding do look like multiple characters as far as 8 bit text handling programs are concerned (so yes, 15 characters in iso-8859-1 or ascii isn't the same length as 15 characters in utf-8). fonts that support utf-8 are required for properly displaying utf-8, and you have to specify utf-8 on the display page (either via a content-type header or with content-type meta tag as above) to get the browser to use the right fonts. - rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: passing a variable value of PHP into the alert of JavaScript.
Akh... thank you my friend It's solved. May I ask another question? Can I call a function of PHP code from HTML tag just the same as I call a function of JavaScript from HTML tag? I meant, Like this a Onclick='warning()'CustID/a; - Original Message - From: Jason Barnett [EMAIL PROTECTED] Date: Tue, 30 Mar 2004 08:32:38 -0500 To: [EMAIL PROTECTED] Subject: [PHP] Re: passing a variable value of PHP into the alert of JavaScript. Prabu Subroto wrote: Dear my friends... I want to make an alert which can display a value from the database. I am meaning : how can I pass a value of a variable from PHP into JavaScript alert ( alert($Firstname, $LastName and $Address); Is it possible? Sure. Probably the easiest way I can think to do it would be to create the JavaScript function as a string and insert your variables into that string. Then print() the string. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- _ Web-based SMS services available at http://www.operamail.com. From your mailbox to local or overseas cell phones. Powered by Outblaze -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Re: passing a variable value of PHP into the alert of JavaScript.
Hello Prabu, Tuesday, March 30, 2004, 3:18:09 PM, you wrote: PS Can I call a function of PHP code from HTML tag just the same PS as I call a function of JavaScript from HTML tag? PS I meant, Like this a Onclick='warning()'CustID/a; No, but it'd be lovely if you could :) (Actually the .NET framework allows this via some clever JS and page segment caching, but I'm not sure of a PHP equivalent yet). -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to send SMS
How to send sms with PHP and Mysql and mobil phone Nokia 5110? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php kannel.org Been out of touch with the list for a while. SO please accept my appologies if someone has already pointed this out. Kannel is just plain old brilliant. It has a php front end to it as well. -- Raditha Dissanayake. - http://www.radinks.com/print/upload.php SFTP, FTP and HTTP File Upload solutions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upload file
Marek Kilimajer wrote: Ketvin wrote: Dear list, I'm using squirrelmail php as my webmail interface, my php.ini have the option of upload_max_filesize = 10M but i'm having problem for adding attachment more than 400k, where the page will hang. is there any recommended things for me to check? post_max_size, max_input_time In some rare cases apache directives also come into the picture such as a LimitRequestBody. -- Raditha Dissanayake. - http://www.radinks.com/print/upload.php SFTP, FTP and HTTP File Upload solutions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] parsing entities
hello, I am parsing an xhtml template throught the php xml expat parser. But the problem is that it removes all entities from the xhtml template such as nbsp; or amp; (in href anchors attributes) The entities can't be handle with xml_set_default_handler because some entities are inside an attribute (title, href) and are then printed before the tag. How can I fix this? I don't understand how those other functions work: http://www.php.net/manual/en/function.xml-set-external-entity-ref-handler.php http://www.php.net/manual/en/function.xml-set-unparsed-entity-decl-handler.php Could it be the solution? Another problem is that it changes tags like img / by img/img. Is there a way to avoid this? + Cheers (PS - I am also curious about how the fuction xml_set_start_namespace_decl_handler() work. Does someone know some informations about?) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: passing a variable value of PHP into the alert of
Prabu Subroto wrote: Akh... thank you my friend It's solved. May I ask another question? Can I call a function of PHP code from HTML tag just the same as I call a function of JavaScript from HTML tag? I meant, Like this a Onclick='warning()'CustID/a; Well, what do you mean exactly? If your file is a php file you can do something like do something like: html ?php print warning($CustID); ? /html And this would print the return value from the warning() function. But are you trying to call PHP scripts on the client side? As far as I know you can't really do that without sending another request to the server. You could emulate this, if you wanted to, doing something like: ?php if (1 == $_REQUEST['warning']) { warning($CustID); } ? a href=?php $_SERVER['PHP_SELF'] . '?warning=1'; ?CustID/a If you want to implement an MVC controller you might check out the PEAR package HTML_QuickForm, it offers PHP error checking with support for JavaScript error messages. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing form values to PHP
Hey every, I'm new to the group and to PHP (3 days now) and I would like to ask a question. I purchased a book on PHP a day or so ago and as I'm going through the book it comes to a point where it talks about passing html form values to PHP. So I type up the examples from the book, both the html file and the PHP file and I run it and I don't get anything when the PHP file is accessed. H puzzling! I don't get any errors at all, but the values just aren't coming across. The book says that I should be able to take the name=xyz value from the HTML form and just use it as a regular variable ($xyz) in the PHP file. But this doesn't work. After much digging on web pages and through email lists I found reference to something called the $_POST variable. This seems to be the only way that I can make the PHP file use the name=xyz values from the HTML file. So in the PHP file I would have to use the variable $_POST[xyz] to get the form value returned. Anyone have any ideas as to what's up. I hope its just something silly that I'm missing being a newby to PHP and all. I will include small versions of the file here for reference: HTML FILE - htmlbody form action=x.php method=post Please enter your name: input type=text name=xyz input type=submit value=submit /form /body/html PHP FILE (Doesn't Work) - htmlbody ?php echo(The value of name is $xyz); ? /body/html PHP FILE (Does Work) - htmlbody ?php echo(The value of name is $_POST[xyz]); ? /body/html So I guess my question ultimately is, what are the different ways in which form data can be passed to a PHP script? Thanks you, Jessica -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Passing form values to PHP
[snip] Anyone have any ideas as to what's up. I hope its just something silly that I'm missing being a newby to PHP and all. [/snip] There is a feature in the php.ini called register_globals. If you look in your php.ini you will see that it is off by default and some of the books may have missed this as the default previously was on. You would be best to learn PHP with it off as most of the community does it that way for various reasons. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Checking if a website is up?
* Thus wrote Henry Grech-Cini ([EMAIL PROTECTED]): Hi All, I am trying to check if a website is up (reachable) and I have used the standard code below: else { fwrite ($socket, HEAD .$documentpath. HTTP/1.0\r\nHost: $host\r\n\r\n); $http_response = fgets( $socket, 22 ); any reason why you want only 22 bytes? A response like the following is perfectly valid: HTTP/1.0 200 its ok but the content wont be if ( ereg(200 OK, $http_response, $regs ) ) Any response back would mean its up. { return(true); fclose( $socket ); } else { //echo HTTP-Response: $http_responsebr; What does this say? Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing form values to PHP
Ciemny, Jessica wrote: Hey every, I'm new to the group and to PHP (3 days now) and I would like to ask a question. I purchased a book on PHP a day or so ago and as I'm going through the book it comes to a point where it talks about passing html form values to PHP. So I type up the examples from the book, both the html file and the PHP file and I run it and I don't get anything when the PHP file is accessed. H puzzling! I don't get any errors at all, but the values just aren't coming across. The book says that I should be able to take the name=xyz value from the HTML form and just use it as a regular variable ($xyz) in the PHP file. But this doesn't work. After much digging on web pages and through email lists I found reference to something called the $_POST variable. This seems to be the only way that I can make the PHP file use the name=xyz values from the HTML file. So in the PHP file I would have to use the variable $_POST[xyz] to get the form value returned. Anyone have any ideas as to what's up. I hope its just something silly that I'm missing being a newby to PHP and all. The problem here is that the book is written for a PHP setup where register_globals is assumed to be turned on. This can be a security risk, so as of PHP 4.2.x, register_globals has been turned off by default (before it was on by default). Register globals is a directive that tells PHP to automatically create variables from requested information (be it POST or GET). More information about why register_globals is a bad idea can be found at the following PHP manual page [ http://www.php.net/register_globals ] I will include small versions of the file here for reference: [ snipped ] So I guess my question ultimately is, what are the different ways in which form data can be passed to a PHP script? Data is transferred using forms in two methods. GET or POST. The difference between the two (the main difference) is that the data from a GET request is appended to the URL. Such a request would be : http://www.google.com/search?q=php+tutorials and data from a POST request is actually sent as part of the HTTP request (in the header), so its not viewable in the browser URL. PHP provides (since PHP version 4.2) two arrays, $_POST and $_GET for each of the above methods. There is also a third array, $_REQUEST which holds all information sent in the request. These arrays are called superglobals because they are available throughout your pages without any effort from your part. Each array consists of a key and a value. The key is whatever is the name attribute of your form value. An example : form method=POST action=process.php input type=text name=firstname size=10 / input type=submit name=submit value=submit / /form process.php : ?php //Turn up error reporting //to the max level error_reporting(E_ALL); //Print out the contents //of the $_POST array //so we can see what it //contains. echo pre; print_r($_POST); echo /pre; ? When you run the above script with the associated form, you will see the format of the $_POST array. It will contain an element with the key firstname and the value will be whatever the user entered in that text box. It will also contain an element with the key submit whose value is submit (that's our submit button). Hopefully this helps, and welcome to PHP :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Passing form values to PHP
Try this: extract($_POST); extract -- Import variables into the current symbol table from an array All of my forms have worked without $_POST or $_GET. Is there a reason for inavailability of variables??? Its a good practice to use $_POST for security reasons. Vishal. -Original Message- From: Ciemny, Jessica [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 30, 2004 10:30 AM To: [EMAIL PROTECTED] Subject: [PHP] Passing form values to PHP Hey every, I'm new to the group and to PHP (3 days now) and I would like to ask a question. I purchased a book on PHP a day or so ago and as I'm going through the book it comes to a point where it talks about passing html form values to PHP. So I type up the examples from the book, both the html file and the PHP file and I run it and I don't get anything when the PHP file is accessed. H puzzling! I don't get any errors at all, but the values just aren't coming across. The book says that I should be able to take the name=xyz value from the HTML form and just use it as a regular variable ($xyz) in the PHP file. But this doesn't work. After much digging on web pages and through email lists I found reference to something called the $_POST variable. This seems to be the only way that I can make the PHP file use the name=xyz values from the HTML file. So in the PHP file I would have to use the variable $_POST[xyz] to get the form value returned. Anyone have any ideas as to what's up. I hope its just something silly that I'm missing being a newby to PHP and all. I will include small versions of the file here for reference: HTML FILE - htmlbody form action=x.php method=post Please enter your name: input type=text name=xyz input type=submit value=submit /form /body/html PHP FILE (Doesn't Work) - htmlbody ?php echo(The value of name is $xyz); ? /body/html PHP FILE (Does Work) - htmlbody ?php echo(The value of name is $_POST[xyz]); ? /body/html So I guess my question ultimately is, what are the different ways in which form data can be passed to a PHP script? Thanks you, Jessica -- 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: parsing entities
First of all, if you have the option to upgrade you might want to check out PHP5. SimpleXML really makes it easy to parse xml files. If PHP4 is your platform of choice, check out PEAR's XML_Parser package. The entities can't be handle with xml_set_default_handler because some entities are inside an attribute (title, href) and are then printed before the tag. How can I fix this? In order to parse xml attributes you should use xml_set_element_handler. http://www.php.net/manual/en/function.xml-set-element-handler.php I don't understand how those other functions work: http://www.php.net/manual/en/function.xml-set-external-entity-ref-handler.php http://www.php.net/manual/en/function.xml-set-unparsed-entity-decl-handler.php Haven't used these, maybe others can help? Could it be the solution? Another problem is that it changes tags like img / by img/img. Is there a way to avoid this? With xml_set_element_handler you tell the parser to use callback functions for your start tag / end tag. You can set up your callback functions to handle img tags special. + Cheers (PS - I am also curious about how the fuction xml_set_start_namespace_decl_handler() work. Does someone know some informations about?) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Grabbing the STDOUT
Hi all Ive been try for sometime now, and too tried googling for an answer, to grab the STDOUT of a command. In this case the binary command is readbar The general output of readbar executed on its own is as so: Code 39-10005802 IATA 2 of 5-2 IATA 2 of 5-8 1 barcodes found I basically need to grab this output. Does anyone know how to send this to an array or varible. I too have tried the passthru function. Kind Regards and thanks to anyone that can help Brent Clark ?php $dirfile = opendir(/var/www/html/davies/Scanned); while(($row = readdir($dirfile)) == TRUE){ clearstatcache(); if($row != . $row != .. (substr($row,0,4) == scan)){ $filearray[] = $row; } } if($row == True){ closedir($row); } foreach($filearray as $var = $key){ system(/usr/sbin/readbar $key 2%1); } ?
[PHP] running php in sequence
I am using php in combination with ant to create a small automated build process. Will php run sequentially? What I mean is I have a series of modules or tasks: Example: //check out files include(modules/checkout.php) //zip up the files include (modules/zip.php) etc Will php wait to execute the zip.php until the checkout.php has completed because in my priliminary tests, it doesn't appear to do this. If not, what's the best way to execute it? Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Simple one I think
DC Thanks for the help but adding curly dose not seem to work. DC Any ideas why ? DC DC I get and output of [0][0][0][1][1][1][2][2][2] why ? DC BR Try putting curly braces around your variables. Like this: BR BR {$val[name][$i]} Please reply to the list so that others can help you out, as well--and so others can learn from your questions, if they happen to have the same ones. All right, I've taken a closer look at the code, and here's what's going wrong: When you do foreach($vocals as $val), it only sees 3 rows in $vocals, one for name, one for skill, and one for fee. You can see this when you do print_r($vocals). Thus, it can't find $val[name][$i] or any of the other variables because they don't exist in $val. You could change it to $val[$i], but then you're table would print out like this: Jonny FlashJonny FlashJonny Flash 77 77 77 39000 39000 39000 So, now you see a little bit of where the problem is. You need to rework your foreach to get things right. There are several ways you can do this. One is to store your array differently, like this: $vocals = array( array('name' = 'Jonny Flash', 'skill' = 87, 'fee' = 22000), array('name' = 'Bill Banger', 'skill' = 77, 'fee' = 18500), array('name' = 'Sarah Jane', 'skill' = 93, 'fee' = 39000) ); Then, you would print it out like this: $rows = table; foreach($vocals as $val){ $rows .= tr td{$val[name]}/tdtd{$val[skill]}/tdtd{$val[fee]}/td /tr ; } $rows .= /table; echo $rows; Another way, using the same array you had, would be to print it out like this: $rows = table; for ($i = 0; $i count($vocals['name']); $i++) { $rows .= tr td{$vocals[name][$i]}/tdtd{$vocals[skill][$i]}/tdtd{$vocals[fee][$i]}/td /tr ; } $rows .= /table; echo $rows; However, I feel that it is more logical and easier to use to store the array in the way I suggested above. -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Grabbing the STDOUT
Brent Clark wrote: Hi all Ive been try for sometime now, and too tried googling for an answer, to grab the STDOUT of a command. In this case the binary command is readbar The general output of readbar executed on its own is as so: Code 39-10005802 IATA 2 of 5-2 IATA 2 of 5-8 1 barcodes found I basically need to grab this output. Does anyone know how to send this to an array or varible. You want to try shell_exec: http://www.php.net/manual/en/function.shell-exec.php I haven't used readbar, but if it returns plain text then PHP should be able to get the return result, like: $result = shell_exec('readbar'); Some things to consider though: do you want your webserver to have permission to execute shell commands? This COULD be a security risk, so be careful - watch your permissions. Another option is to run the readbar command from the command line and then pipe the result to PHP. I don't really know what you're trying to do here so I can't give better advice than that. I too have tried the passthru function. Kind Regards and thanks to anyone that can help Brent Clark ?php $dirfile = opendir(/var/www/html/davies/Scanned); while(($row = readdir($dirfile)) == TRUE){ clearstatcache(); if($row != . $row != .. (substr($row,0,4) == scan)){ $filearray[] = $row; } } if($row == True){ closedir($row); } foreach($filearray as $var = $key){ system(/usr/sbin/readbar $key 2%1); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] running php in sequence
I'd recommend that you build a set of functions (or a class) to do your bits and pieces, rather than include blocks of code. That way you can ZIP depending on the outcome of your CHECKOUT code. function checkoutStuff() { //if checkout code executes ok return true; } if(checkoutStuff()) { zipStuff(); } By all means stick those functions in a file and include them at the beginnign of your script. Make any sense? hth, Ben - Original Message - From: Edward Peloke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 5:11 PM Subject: [PHP] running php in sequence I am using php in combination with ant to create a small automated build process. Will php run sequentially? What I mean is I have a series of modules or tasks: Example: //check out files include(modules/checkout.php) //zip up the files include (modules/zip.php) etc Will php wait to execute the zip.php until the checkout.php has completed because in my priliminary tests, it doesn't appear to do this. If not, what's the best way to execute it? Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- 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: running php in sequence
I am using php in combination with ant to create a small automated build process. Will php run sequentially? What I mean is I have a series of modules or tasks: Example: //check out files include(modules/checkout.php) //zip up the files include (modules/zip.php) etc Will php wait to execute the zip.php until the checkout.php has completed because in my priliminary tests, it doesn't appear to do this. If not, what's the best way to execute it? http://www.php.net/manual/en/function.include.php Without objects, PHP runs through each file sequentially. So if checkout.php is a sequential file it will execute those lines of code before trying to include the zip.php file, etc. If your modules use classes (which I assume they do) then you can explicitly control program flow in the main file, e.g. mainfile.php: // Load the class libraries include 'modules/checkout.php'; include 'modules/zip.php'; // Now we have classes Checkout and Zip available to mainfile $checkout = new Checkout(); $zip = new Zip(); $checkout-firstMethod(); $zip-secondMethod(); $zip-fourthMethod($checkout-thirdMethod()); If you are using classes, then creating the objects in the main file and calling the methods there as well make it easy to understand later. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Namespaces in PHP
-{ Rene Brehmer }- wrote: At 00:59 30-03-2004, Justin Patrin wrote: Richard Davey wrote: Hello Justin, Tuesday, March 30, 2004, 12:42:12 AM, you wrote: JP P.S. Why do a lot of people email off list? I get doubles. They are too lazy to remove your email when doing a reply-to-all basically. More people should use the newsgroupsit makes things so much simpler. Except that requires the use of a news client that can do multiple servers ... and we're some that are still waiting for Agent 2 :) I really have no idea what you mean here. AFAIK the PHP lists are all on one server, news.php.net. I use thunderbird, which definately handles multiple news servers. I also have no idea what Agent 2 is -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Namespaces in PHP
Hello Justin, Tuesday, March 30, 2004, 6:27:20 PM, you wrote: JP I also have no idea what Agent 2 is It's a Windows based news-reader (the free version is called FreeAgent) - think tin with knobs on. Oh and to the OP: Agent 2 is OUT and available, has been for a short while now -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Really Annoying Require/Include Error
I am getting this error: Fatal error: Failed opening required '/home/sites/site111/web/news/settings/newsletter.settings.inc.php' (include_path='') in /home/sites/site111/web/news/forms/sign_in_out_form.inc.php on line 7 From this piece of code: require (/home/sites/site111/web/news/settings/newsletter.settings.inc.php); Before I totally lose my mind, can someone point out to me why I would be getting the error? The file is there, and named correctly. I had two other people in the office confirm the path and filename. :\ Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Really Annoying Require/Include Error
Hello Mike, Tuesday, March 30, 2004, 6:33:46 PM, you wrote: MR require MR (/home/sites/site111/web/news/settings/newsletter.settings.inc.php); MR Before I totally lose my mind, can someone point out to me why I would be MR getting the error? The file is there, and named correctly. I had two other MR people in the office confirm the path and filename. Nothing visibly wrong with your code or path, so time to look out of the box and instead focus on the newsletter.settings.inc.php file - could there be a syntax error (or similar) in there causing this? Swap the file for one that does nothing but echo out included and see what happens? -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Really Annoying Require/Include Error
Nothing visibly wrong with your code or path, so time to look out of the box and instead focus on the newsletter.settings.inc.php file - could there be a syntax error (or similar) in there causing this? Swap the file for one that does nothing but echo out included and see what happens? Another thing to look at is file permissions. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Really Annoying Require/Include Error
Mike R wrote: I am getting this error: Fatal error: Failed opening required '/home/sites/site111/web/news/settings/newsletter.settings.inc.php' (include_path='') in /home/sites/site111/web/news/forms/sign_in_out_form.inc.php on line 7 From this piece of code: require (/home/sites/site111/web/news/settings/newsletter.settings.inc.php); Based on this path I'm assuming you use Linux? If that's the case you need to be sure that your webserver has permissions to execute that file. To test this, try chmod 777 and then execute the script... but later chmod to something more sane, maybe 755. Before I totally lose my mind, can someone point out to me why I would be getting the error? The file is there, and named correctly. I had two other people in the office confirm the path and filename. :\ Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] web statistics
Does any one knows of a good gnu php web statistics software? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] web statistics
[snip] Does any one knows of a good gnu php web statistics software? [/snip] [smart-ass alert] Yes and no depending on your definition of good. [/smart-ass alert] What kind of features are you looking for? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Really Annoying Require/Include Error
-Original Message- I am getting this error: Fatal error: Failed opening required '/home/sites/site111/web/news/settings/newsletter.settings.inc.php' (include_path='') in /home/sites/site111/web/news/forms/sign_in_out_form.inc.php on line 7 From this piece of code: require (/home/sites/site111/web/news/settings/newsletter.settings.inc.php); Based on this path I'm assuming you use Linux? If that's the case you need to be sure that your webserver has permissions to execute that file. To test this, try chmod 777 and then execute the script... but later chmod to something more sane, maybe 755. Yes, Linux. I checked the permission - set the whole directory to 777, no change in the problem. Is there anything in the compiling of php or ini settings that would affect include or require statements? :) Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP alternative to Browser Hawk?
Hi all, Does anyone know of a good solid PHP alternative to the very good (but very expensive!) BrowserHawk? (http://www.cyscape.com/) It's basically a very well featured browser detection script that can pull out the full monty, from Flash/PDF support to supported SSL key sizes. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Really Annoying Require/Include Error
Yes, Linux. I checked the permission - set the whole directory to 777, no change in the problem. Is there anything in the compiling of php or ini settings that would affect include or require statements? :) Thanks, -Mike OK, try setting the error_reporting = E_ALL, and just try to execute /home/sites/site111/web/news/settings/newsletter.settings.inc.php. It's possible your webserver is not throwing errors. If it executes perfectly then it really sounds like a permissions problem. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Namespaces in PHP
Richard Davey wrote: Hello Justin, Tuesday, March 30, 2004, 6:27:20 PM, you wrote: JP I also have no idea what Agent 2 is It's a Windows based news-reader (the free version is called FreeAgent) - think tin with knobs on. Oh and to the OP: Agent 2 is OUT and available, has been for a short while now I can understand personal preferences, but I can tell you that I'm using Thunderbird right now on my windows laptop to post to this newsgroup :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Really Annoying Require/Include Error
Fatal error: Failed opening required '/home/sites/site111/web/news/settings/newsletter.settings.inc.php' (include_path='') in /home/sites/site111/web/news/forms/sign_in_out_form.inc.php on line 7 From this piece of code: require (/home/sites/site111/web/news/settings/newsletter.settings.inc.php); Based on this path I'm assuming you use Linux? If that's the case you need to be sure that your webserver has permissions to execute that file. To test this, try chmod 777 and then execute the script... but later chmod to something more sane, maybe 755. Try to just execute the file /home/sites/site111/web/news/settings/newsletter.settings.inc.php Did your webserver happily serve it up? If so give some more details about your Linux/server/PHP version -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Namespaces in PHP
Hello Jason, Tuesday, March 30, 2004, 7:23:27 PM, you wrote: JB I can understand personal preferences, but I can tell you that I'm using JB Thunderbird right now on my windows laptop to post to this newsgroup :) And I'm using The Bat! (email client) :) Each to their own, aye? In all fairness, Agent 2 is a very good program though. One of those real has been around for ages packages, like Eudora :) -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Namespaces in PHP
Jason Barnett wrote: Richard Davey wrote: Hello Justin, Tuesday, March 30, 2004, 6:27:20 PM, you wrote: JP I also have no idea what Agent 2 is It's a Windows based news-reader (the free version is called FreeAgent) - think tin with knobs on. Oh and to the OP: Agent 2 is OUT and available, has been for a short while now I can understand personal preferences, but I can tell you that I'm using Thunderbird right now on my windows laptop to post to this newsgroup :) As am I. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] blocking warning: Warning: fclose()
Hi, I am using fopen to query my site from the clients site and then display the output of the query. The problem is when the query does not succeed it outputs this: Warning: fclose(): supplied argument is not a valid stream resource in c:\php\www\test-scripts\index.php on line 42 is there any way to block just this warning while keeping all other error handling as is? Thanks, -Ryan A -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Really Annoying Require/Include Error
On Tuesday 30 March 2004 12:33 pm, Mike R wrote: I am getting this error: You came to the right place. Fatal error: Failed opening required '/home/sites/site111/web/news/settings/newsletter.settings.inc.php' (include_path='') in include_path='' says that your php.ini does not have default include path set. /home/sites/site111/web/news/forms/sign_in_out_form.inc.php on line 7 This is the path and script name causing your problem. From this piece of code: require (/home/sites/site111/web/news/settings/newsletter.settings.inc.php); This is a relative include. Your script is running in /home/sites/site111/web/news/forms/ so PHP is looking for your require file in this directory. /home/sites/site111/web/news/forms/home/sites/site111/web/news/forms/ I am guessing that this directory does not exist nor the file. Try this instead. require(../settings/newsletter.settings.inc.php); James Hicks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: blocking warning: Warning: fclose()
Ryan A wrote: Hi, I am using fopen to query my site from the clients site and then display the output of the query. The problem is when the query does not succeed it outputs this: Warning: fclose(): supplied argument is not a valid stream resource in c:\php\www\test-scripts\index.php on line 42 is there any way to block just this warning while keeping all other error handling as is? Thanks, -Ryan A Try doing: if($fd) { fclose($fd); } -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] OT- Namespaces in PHP
Wow this post has really stirred up the pot. Regards, Justin Palmer -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 30, 2004 10:29 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Namespaces in PHP Jason Barnett wrote: Richard Davey wrote: Hello Justin, Tuesday, March 30, 2004, 6:27:20 PM, you wrote: JP I also have no idea what Agent 2 is It's a Windows based news-reader (the free version is called FreeAgent) - think tin with knobs on. Oh and to the OP: Agent 2 is OUT and available, has been for a short while now I can understand personal preferences, but I can tell you that I'm using Thunderbird right now on my windows laptop to post to this newsgroup :) As am I. -- paperCrane Justin Patrin -- 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: web statistics
Hmm.. Several good sollutions out there, but if you are looking for some of the best you might look into Deepmetrix LiveStats. This has to be the best system Ive come across. http://www.deepmetrix.com/ Then again if money is a factor, you might look for other sollutions like aw-stats, which I would say gives the best presentation of the statistics from the availavle sollutions out there. http://awstats.sourceforge.net/ Regards, Kim Steinhaug www.steinhaug.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - På jakt etter en bra netbutikk løsning, som er på norsk ? http://www.easywebshop.no/ - Nettbutikk med krefter i massevis! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] blocking warning: Warning: fclose()
The problem is when the query does not succeed it outputs this: Warning: fclose(): supplied argument is not a valid stream resource in c:\php\www\test-scripts\index.php on line 42 is there any way to block just this warning while keeping all other error handling as is? Yes, the error control operator (@). ?php @fclose( $fp ); ? Reference: http://www.php.net/manual/en/language.operators.errorcontrol.php Though as another poster pointed out, adding some checking would be a better approach. You could simply test to see whether it is a resource, or even go so far as to check that it's a file resource. ?php if( is_resource( $fp ) get_resource_type( $fp ) == file ) { fclose( $fp ); } ? Cheers, Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] multi-dimentional array from db results
I'm trying to re-create the following multi-dimentional array from a database query, where the indices 5, 7 and 21 are order_id and my table is food_orders(order_id, food, cooked): ?php $food_array = array( 5=array('steak','rare'), 7=array('burger','medium'), 21=array('lamb_chops','well'), ); $query = select * from food_orders where date = NOW(); $result = mysql_query($query); while($row = mysql_fetch_array($result)){ $food_array[$row['order_id']] .= array($row['food'], $row['cooked']); } ? This looks fine to me, but when I do a: print_r($food_array) All I get is Array ( [5] = Array [7] = Array [21] = Array ) That is, I don't see the output of each order. Any suggestions would be greatly appreciated! -m -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP alternative to Browser Hawk?
Well, youre probably looking for the full monty, all I got is this to help you out. Its only some detection schemes for the browser. There is another really cool browser detection available aswell from dynamicdrive.com developed by brothercake. This javascript is really good and is actively developed the last years so its nice and updated. ? // // SourceForge: Breaking Down the Barriers to Open Source Development // Copyright 1999-2000 (c) The SourceForge Crew // http://sourceforge.net // // $Id: tim2821.php3,v 1.2 2001/05/22 19:22:47 tim Exp $ unset ($BROWSER_AGENT); unset ($BROWSER_VER); unset ($BROWSER_PLATFORM); function browser_get_agent () { global $BROWSER_AGENT; return $BROWSER_AGENT; } function browser_get_version() { global $BROWSER_VER; return $BROWSER_VER; } function browser_get_platform() { global $BROWSER_PLATFORM; return $BROWSER_PLATFORM; } function browser_is_mac() { if (browser_get_platform()=='Mac') { return true; } else { return false; } } function browser_is_windows() { if (browser_get_platform()=='Win') { return true; } else { return false; } } function browser_is_ie() { if (browser_get_agent()=='IE') { return true; } else { return false; } } function browser_is_netscape() { if (browser_get_agent()=='MOZILLA') { return true; } else { return false; } } //echo $HTTP_USER_AGENT . br; if (ereg( 'Opera.([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version)) { $BROWSER_VER=$log_version[1]; $BROWSER_AGENT='OPERA'; } else if (ereg( 'MSIE ([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version)) { $BROWSER_VER=$log_version[1]; $BROWSER_AGENT='IE'; } elseif (ereg( 'Mozilla/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version)) { $BROWSER_VER=$log_version[1]; $BROWSER_AGENT='MOZILLA'; } else { $BROWSER_VER=0; $BROWSER_AGENT='OTHER'; } //echo $BROWSER_AGENT . br; if (strstr($HTTP_USER_AGENT,'Win')) { $BROWSER_PLATFORM='Win'; } else if (strstr($HTTP_USER_AGENT,'Mac')) { $BROWSER_PLATFORM='Mac'; } else if (strstr($HTTP_USER_AGENT,'Linux')) { $BROWSER_PLATFORM='Linux'; } else if (strstr($HTTP_USER_AGENT,'Unix')) { $BROWSER_PLATFORM='Unix'; } else { $BROWSER_PLATFORM='Other'; } //debug code echo br\n\nAgent: $HTTP_USER_AGENT; echo br\nIE: .browser_is_ie(); echo br\nMac: .browser_is_mac(); echo br\nWindows: .browser_is_windows(); echo br\nPlatform: .browser_get_platform(); echo br\nVersion: .browser_get_version(); echo br\nAgent: .browser_get_agent(); echo br; if (browser_get_agent()!=IE){ } if ((browser_get_version()5.5)(browser_get_agent()==IE)){ } if (browser_get_platform()==Mac){ } ? -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. -- www.steinhaug.com - www.easywebshop.no - www.webkitpro.com -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: multi-dimentional array from db results
Motorpsychkill wrote: I'm trying to re-create the following multi-dimentional array from a database query, where the indices 5, 7 and 21 are order_id and my table is food_orders(order_id, food, cooked): ?php $food_array = array( 5=array('steak','rare'), 7=array('burger','medium'), 21=array('lamb_chops','well'), ); $query = select * from food_orders where date = NOW(); $result = mysql_query($query); while($row = mysql_fetch_array($result)){ $food_array[$row['order_id']] .= array($row['food'], $row['cooked']); The .= operator is for concatenating strings. The above code block adds the result of array($row['food'], $row['cooked']) to a blank string. If you are trying to assign array variables you want to use $food_array[$row['order_id']] = array($row['food'], $row['cooked']); } ? This looks fine to me, but when I do a: print_r($food_array) All I get is Array ( [5] = Array [7] = Array [21] = Array ) That is, I don't see the output of each order. Any suggestions would be greatly appreciated! -m -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: multi-dimentional array from db results
-Original Message- From: Jason Barnett [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 30, 2004 11:41 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: multi-dimentional array from db results Motorpsychkill wrote: I'm trying to re-create the following multi-dimentional array from a database query, where the indices 5, 7 and 21 are order_id and my table is food_orders(order_id, food, cooked): ?php $food_array = array( 5=array('steak','rare'), 7=array('burger','medium'), 21=array('lamb_chops','well'), ); $query = select * from food_orders where date = NOW(); $result = mysql_query($query); while($row = mysql_fetch_array($result)){ $food_array[$row['order_id']] .= array($row['food'], $row['cooked']); The .= operator is for concatenating strings. The above code block adds the result of array($row['food'], $row['cooked']) to a blank string. If you are trying to assign array variables you want to use $food_array[$row['order_id']] = array($row['food'], $row['cooked']); Thanks dude, I've wasted a couple of hours on that :) -m -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Seg Faults, How to Trackdown?
Greetings, I need help tracking down a crash in PHP. I have not been able to work out a test case where it will crash reliably, so I have been hesitant to fill out a bug report. Here's the kit I have running: PHP4 - Latest Stable Snapshot as of 30/Mar/2004 12:18 Apache - 1.3.29 mod_ssl - 2.8.16 mod_perl - 1.29 Red hat 9 - 2.4.20 Kernel The problem is when I try to access my web-mail sites, it will crash after a period of time. I have done a number of gdb sessions, but I need some help interpreting the results. You can find the gdb log from a few of the crashes here: http://madweb.org/errors/Error1.txt http://madweb.org/errors/Error2.txt http://madweb.org/errors/Error3.txt http://madweb.org/errors/Error4.txt http://madweb.org/errors/Error5.txt I thought it might be something to do with IMAP since the web-mail pages (IMP/HORDE and SquirrelMail), so I tried different versions of the UW IMAP client, but crashes still took place with both the 2000 and 2002 versions. When PHP is compiled in debug mode, I got a ton of leak messages in Apache's error log. I tried to setup a different Apache instance on a different port to use that one for debugging purposes. However, I can not get that on to crash. I have it running on ports 4080 and 4443(SSL) and I can not get it to crash even after pounding and pounding the web-mail sites. So I have a decent amount of info to work from, not sure what to do next to get the crashes to stop. I am open to any and all suggestions to try and pin this bugger down. Cheers, Tim -- Tim Schaab http://madweb.org http://madtown.cc [EMAIL PROTECTED] [EMAIL PROTECTED] The most exciting phrase to hear in science, the one that heralds new discoveries, is not Eureka! (I found it!) but That's funny -- Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP alternative to Browser Hawk?
snip Does anyone know of a good solid PHP alternative to the very good (but very expensive!) BrowserHawk? (http://www.cyscape.com/) /snip Dont know if this has all of the features you are looking for, but it has a bunch of them http://phpsniff.sourceforge.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ocilogon
Hi, what is the syntax for using ocilogon() to connect to a remote server? The remote server's name is zed.mdah.state.ms.us (ip is 10.8.5.4) and the database is zed.aleph0. Locally on zed I can do ociogon(user,pw,zed.alpeh0) and connect fine, but on a remote server I try ociogon(user,pw,[EMAIL PROTECTED]) but it errors out with an oci_open_server error. I tried going to www.php.net/ocilogon but the page doesn't exist, so does anyone know how the proper connect line to connect to a remote server that runs oracle? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: ocilogon
Adam Williams wrote: Hi, what is the syntax for using ocilogon() to connect to a remote server? The remote server's name is zed.mdah.state.ms.us (ip is 10.8.5.4) and the database is zed.aleph0. Locally on zed I can do ociogon(user,pw,zed.alpeh0) and connect fine, but on a remote server I try ociogon(user,pw,[EMAIL PROTECTED]) but it errors out with an oci_open_server error. I tried going to www.php.net/ocilogon but the page doesn't exist, so does anyone know how the proper connect line to connect to a remote server that runs oracle? Thanks! PHP 5 functions for OCI: http://www.zend.com/manual/ref.oci8.php I haven't used OCI before, but perhaps the function you should try is oci_connect('user', 'pw', '[EMAIL PROTECTED]') -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ocilogon
You need the Oracle cliente libraries installed where you have PHP for this to work. the third parameter in OCILogon() is the connection string configured in tnsnames.ora ($ORACLE_HOME/network/admin) Let's say that you make connection to Oracle using sqlplus: User: scott pass: tiger dbstring: test this in PHP would be: $conn = OCILogon(scott, tiger, test); -William El mar, 30-03-2004 a las 15:52, Adam Williams escribió: Hi, what is the syntax for using ocilogon() to connect to a remote server? The remote server's name is zed.mdah.state.ms.us (ip is 10.8.5.4) and the database is zed.aleph0. Locally on zed I can do ociogon(user,pw,zed.alpeh0) and connect fine, but on a remote server I try ociogon(user,pw,[EMAIL PROTECTED]) but it errors out with an oci_open_server error. I tried going to www.php.net/ocilogon but the page doesn't exist, so does anyone know how the proper connect line to connect to a remote server that runs oracle? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] TUX web server replacement
Hi Alister, Thanx for the links and the example. This link is very useful too: [] http://ftp.ucr.ac.cr/solrhe/chap28sec231.html I have it working now with good results. Regards, -William El mar, 30-03-2004 a las 16:35, Alister escribió: On 29 Mar 2004 15:28:38 -0500 William Lovaton [EMAIL PROTECTED] wrote: Hi Alister, This is exactly what I am trying to do now... but I'm afraid that I am a little unexperienced with squid. I managed to make it run in my home in httpd-accelerator mode but I still have some problems. Could you give me your squid configuration file?? or at least tell me how to set the needed properties. In my home it is working this way: squid in port 80 and apache in port 8080 and the browser is able to load the pages through squid, but apache is still loggging the static content in the access log file which shouldn't happen because static requests aren't supposed to reach the web server. right?? It should still log some requests, just not multiple ones for the same static file, at least not without a time-gap between them. Beyond this, I'd have to say, RTFM These two originally helped me a lot. http://squid.visolve.com/squid/squid24s1/httpd_accelerator.htm http://www.squid-cache.org/Doc/FAQ/FAQ-20.html Here's a suitably munged config file from my server: ### /etc/squid/squid.conf # we listen on ip:port http_port 123.123.123.123:80 # HTTPD-ACCELERATOR OPTIONS # - httpd_accel_port 80 ## where we request the pages from httpd_accel_host 123.123.123.124 httpd_accel_single_host on httpd_accel_uses_host_header on hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? #Default: # cache_mem 8 MB cache_mem 16 MB httpd_accel_with_proxy off # TAG: acl #Defining an Access List #Recommended minimum configuration: acl all src 0.0.0.0/0.0.0.0 acl acceleratedHost dst 123.123.123.124/255.255.255.255 acl acceleratedPost port 80 acl DSUKoffice src 155.155.155.155/255.255.255.255 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl SSL_ports port 443 563 acl Safe_ports port 80# http #acl Safe_ports port 21# ftp #acl Safe_ports port 443 563# https, snews #acl Safe_ports port 70# gopher #acl Safe_ports port 210# wais acl Safe_ports port 1025-65535# unregistered ports acl Safe_ports port 280# http-mgmt #acl Safe_ports port 488# gss-http #acl Safe_ports port 591# filemaker #acl Safe_ports port 777# multiling http acl CONNECT method CONNECT # TAG: http_access #Allowing or Denying access based on defined access lists #Recommended minimum configuration: # Only allow cachemgr access from localhost or DSUK office #http_access allow manager localhost #http_access allow manager DSUKoffice #http_access deny manager # Deny requests to unknown ports http_access deny !Safe_ports # Deny CONNECT to other than SSL ports http_access deny CONNECT !SSL_ports # # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS # # And finally deny all other access to this proxy # allow requests to the right host and port #http_access allow acceleratedHost acceleratedPost #http_access deny all # make all .php/.php3's uncachable: acl PHP url_regex .php$ acl PHP3 url_regex .php3$ no_cache deny PHP PHP3 QUERY acceleratedHost acceleratedPost DSUKoffice \ manager localhost SSL_ports Safe_ports CONNECT # TAG: ie_refreshon|off #Microsoft Internet Explorer up until version 5.5 Service #Pack 1 has an issue with transparent proxies, wherein it #is impossible to force a refresh. Turning this on provides #a partial fix to the problem ie_refresh off -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: ocilogon
Adam Williams wrote: Hi, what is the syntax for using ocilogon() to connect to a remote server? The remote server's name is zed.mdah.state.ms.us (ip is 10.8.5.4) and the database is zed.aleph0. Locally on zed I can do ociogon(user,pw,zed.alpeh0) and connect fine, but on a remote server I try ociogon(user,pw,[EMAIL PROTECTED]) but it errors out with an oci_open_server error. I tried going to www.php.net/ocilogon but the page doesn't exist, so does anyone know how the proper connect line to connect to a remote server that runs oracle? Thanks! You may want to use something like this as your DB string: (DESCRIPTION= (ADDRESS_LIST= (ADDRESS = (COMMUNITY = tcp_comm.world) (PROTOCOL = TCP) (Host = 10.8.5.4) (Port = 1521) ) ) (CONNECT_DATA = (SID = zed.alpeh0) (GLOBAL_NAME = zed.alpeh0.world) ) ) -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ocilogon
Hi, I have the client libraries on the computer I have PHP on. My connect line is $conn = ocilogon(user,pw,zed.aleph0); and I can connect usning sqlplus. When I look at the listener log, it doesn't show my computer with PHP on it trying to connect using PHP, but when I tnsping zed.aleph0, the listener log shows that. On 30 Mar 2004, William Lovaton wrote: You need the Oracle cliente libraries installed where you have PHP for this to work. the third parameter in OCILogon() is the connection string configured in tnsnames.ora ($ORACLE_HOME/network/admin) Let's say that you make connection to Oracle using sqlplus: User: scott pass: tiger dbstring: test this in PHP would be: $conn = OCILogon(scott, tiger, test); -William El mar, 30-03-2004 a las 15:52, Adam Williams escribió: Hi, what is the syntax for using ocilogon() to connect to a remote server? The remote server's name is zed.mdah.state.ms.us (ip is 10.8.5.4) and the database is zed.aleph0. Locally on zed I can do ociogon(user,pw,zed.alpeh0) and connect fine, but on a remote server I try ociogon(user,pw,[EMAIL PROTECTED]) but it errors out with an oci_open_server error. I tried going to www.php.net/ocilogon but the page doesn't exist, so does anyone know how the proper connect line to connect to a remote server that runs oracle? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] File Download link not working in PHP 4.3.4
I have a script that dynamically generates a CSV file for downloading to MS Excel. The script works fine in PHP 4.3.3 on a Windows machine using Apache 2, and the exact same script does not work in PHP 4.3.4 on Solaris 9 using Apache 1.3.29. A script with essentially the same header commands works in PHP 4.3.1 on Solaris 9 using Apache 1.3.27. The script is supposed to pop up a window to prompt the user to either open the document from its current location or save it to disk. On the systems that work, the window pops up with the expected file name. On the system that does not work, the window pops up with the URL for the script that generates the file instead of the file name. When the OK button is clicked, an error dialog pops up with the message Internet Explorer cannot download ... [snipped URL]. Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. Here are the header commands: $file_type = vnd.ms-excel; $file_ending = xls; header ( Content-Type: application/$file_type ); header ( Content-Disposition: attachment; filename=product..$file_ending ); header ( Expires: 0 ); header ( Connection: Keep-Alive ); Thanks in advance for any helpful suggestions. Andy Hauger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ocilogon
Hi, I figured out what was wrong, I had php_oci8.dll uncommented in php.ini but not php_oracle.dll. Fixed that and now I get an ORA-12705 error, which looking on google has something to do with NLS. Going to do more reading, thanks :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Really Annoying Require/Include Error
Hello James, Tuesday, March 30, 2004, 7:37:33 PM, you wrote: JEHI so PHP is looking for your require file in this directory. JEHI /home/sites/site111/web/news/forms/home/sites/site111/web/news/forms/ Sorry, but I don't believe it is. The leading slash dictates from the system level root, regardless of php.ini include directory settings. They are just a means for PHP to start-off looking for files, not a dictation of the only place they can be located (much like the PATH attribute in Windows). -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: TUX web server replacement
Hello, On 03/30/2004 09:38 AM, William Lovaton wrote: Well, I'am aware of that but the application is already made and it is big and development continue, so change it will be a huge task and we have no resources available for it. Tux used to perform very well here, but unfortunatelly there is no other user space competitor that offers the same features. :-( Actually there is Apache 2. The problem is that some PHP extensions are not re-entrant and they do not run properly in multi-threading environments. It depends on which extensions you use. Anyway, it is always a good idea to make the path of static files like images depend on a variable so you can change it whenever you want. The combination of Apache 1.x for serving PHP pages and thttpd for static content like images is perfect. PHP is better run in a multi-process server because it always has bugs that make their processes crash. If a process crashes, it just kills one request. In a multi-threaded server one processes crash may mean many killed requests all at once. The TUX solution was never a good idea because an attack to the server would kill the whole machine and eventually make it very vulnerable. That is why practically nobody was using it even when using Kernel 2.4. -- 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] imagecreatefromjpeg
Hello all. Im developing a page, and need to create a thumb of some images. i've compiled PHP 4.3.5 with the built-in support of GD, even having installed the GD library. the problem is that i call the imagecreatefromjpeg function, and PHP returns a fatal error when in run time i've even call the phpinfo function to see the php variables, and there shows that the support of GD is avaiable can someone tell me why this is hapening ? here's the error *Fatal error*: Call to undefined function: imagecreatefromjpeg() in */usr/local/apache2/htdocs/projecto/examples/uploadimg.php regards * -- - .-'-. .' `. : : : : : _/| : Bruno Santos : =/_/ : [EMAIL PROTECTED] `._/ | .' ( / ,|...-'Pagina Pessoal \_/^\/||__ http://feiticeir0.no-ip.org _/~ `~`` \_ __/ -'/ `-._ `\_\__ /jgs /-'` `\ \ \-.\ Written very small on the back poket of a girl's jeans - 'If you can read this, you're WAY too close.' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Having trouble formatting width using printf() and default spaces
I'm using a for() loop to generate random die rolls. I'd like the numbers to be formatted in a grid. for ($i = 0; $i 100; $i++) { if (!($i % 5)) { print(br /); } printf(%'.10u, rand(1,$sides)); } Currently, I'm padding with '.', but I'd like to pad with the default spaces. For example, printf(%10u, rand(1,$sides)); Except the numbers end up like, 7 10 14 19 3 4 6 16 13 2 etc. Why is it that when I leave out the padding character, the output isn't padded? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: TUX web server replacement
Hi Manuel, El mar, 30-03-2004 a las 17:38, Manuel Lemos escribió: Hello, On 03/30/2004 09:38 AM, William Lovaton wrote: Well, I'am aware of that but the application is already made and it is big and development continue, so change it will be a huge task and we have no resources available for it. Tux used to perform very well here, but unfortunatelly there is no other user space competitor that offers the same features. :-( Actually there is Apache 2. The problem is that some PHP extensions are not re-entrant and they do not run properly in multi-threading environments. It depends on which extensions you use. I was thinking that may be I could configure the server to use Apache 2 (w/o PHP) with multi-thread just to serve static content and use reverseproxy to pass dynamic requests to Apache 1.3/PHP This might work... I gues that any web server to make advantage of the new kernel 2.6 has to make explicit use of the sendfile() system call. I know for sure that boa does it. I don't know about thttpd or apache2. -William -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: TUX web server replacement
Hello, On 03/30/2004 07:55 PM, William Lovaton wrote: Well, I'am aware of that but the application is already made and it is big and development continue, so change it will be a huge task and we have no resources available for it. Tux used to perform very well here, but unfortunatelly there is no other user space competitor that offers the same features. :-( Actually there is Apache 2. The problem is that some PHP extensions are not re-entrant and they do not run properly in multi-threading environments. It depends on which extensions you use. I was thinking that may be I could configure the server to use Apache 2 (w/o PHP) with multi-thread just to serve static content and use I am not sure if you can do that. You may want to ask an Apache person like for instance Rasmus Lerdorf himself. reverseproxy to pass dynamic requests to Apache 1.3/PHP I do not think the reverse proxy is a good idea. It is not meant to solve your problem. It is meant to reduce the number of accesses to dynamically generated pages by caching them temporarily but you need to change your scripts to make them issue the necessary headers or else using a reverse proxy will just be a big slowdown. This might work... I gues that any web server to make advantage of the new kernel 2.6 has to make explicit use of the sendfile() system call. I know for sure that boa does it. I don't know about thttpd or apache2. Honestly I think your are crazy to start using such early versions of Linux 2.6. It is very likely that it is still buggy and prone to security holes that were not yet found and fixed. In general it is a very bad idea to be an early adopter of the first releases of a new software version. If I were you I would be patient and would probably give it a year before start using Linux 2.6 in critical production environments. -- 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] Extracting Output from File...
Basically there is a php page... lets say http://www.myserver.com/outputpage.php that picks up some info from a database and echos it out as plain text to the browser. I want to use php in a different file to go pick up whatever is printed out to that file and save it to a variable.. basically like - $contentofpage = getoutput(http://www.myserver.com/outputpage;); any ideas? I need it to pick up the output, not something that actually reads the content of the file... Russ Jones -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Extracting Output from File...
You should be able to use any of the file commands. eg. $contents = file(http://www.myserver.com/outputpage.php;); fopen(), etc should all work too. Martin -Original Message- From: Russell P Jones [mailto:[EMAIL PROTECTED] Sent: Wednesday, 31 March 2004 9:25 AM To: [EMAIL PROTECTED] Subject: [PHP] Extracting Output from File... Basically there is a php page... lets say http://www.myserver.com/outputpage.php that picks up some info from a database and echos it out as plain text to the browser. I want to use php in a different file to go pick up whatever is printed out to that file and save it to a variable.. basically like - $contentofpage = getoutput(http://www.myserver.com/outputpage;); any ideas? I need it to pick up the output, not something that actually reads the content of the file... Russ Jones -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Information from NOD32 1.617 (20040206) __ This message was checked by NOD32 for Exchange e-mail monitor. http://www.nod32.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Seg Faults, How to Trackdown?
3 of those are putenv() crashes. Whenever I see that I always think thread safety issues. In your case you are linking against the NTPL-aware libc on Redhat (/lib/tls/libc.so.6). Could you try doing this: LD_PRELOAD=/lib/i686/libc.so.6 in your Apache startup script and let me know if it still crashes? -Rasmus On Tue, 30 Mar 2004, Tim Schaab wrote: I need help tracking down a crash in PHP. I have not been able to work out a test case where it will crash reliably, so I have been hesitant to fill out a bug report. Here's the kit I have running: PHP4 - Latest Stable Snapshot as of 30/Mar/2004 12:18 Apache - 1.3.29 mod_ssl - 2.8.16 mod_perl - 1.29 Red hat 9 - 2.4.20 Kernel The problem is when I try to access my web-mail sites, it will crash after a period of time. I have done a number of gdb sessions, but I need some help interpreting the results. You can find the gdb log from a few of the crashes here: http://madweb.org/errors/Error1.txt http://madweb.org/errors/Error2.txt http://madweb.org/errors/Error3.txt http://madweb.org/errors/Error4.txt http://madweb.org/errors/Error5.txt I thought it might be something to do with IMAP since the web-mail pages (IMP/HORDE and SquirrelMail), so I tried different versions of the UW IMAP client, but crashes still took place with both the 2000 and 2002 versions. When PHP is compiled in debug mode, I got a ton of leak messages in Apache's error log. I tried to setup a different Apache instance on a different port to use that one for debugging purposes. However, I can not get that on to crash. I have it running on ports 4080 and 4443(SSL) and I can not get it to crash even after pounding and pounding the web-mail sites. So I have a decent amount of info to work from, not sure what to do next to get the crashes to stop. I am open to any and all suggestions to try and pin this bugger down. Cheers, Tim -- Tim Schaab http://madweb.org http://madtown.cc [EMAIL PROTECTED] [EMAIL PROTECTED] The most exciting phrase to hear in science, the one that heralds new discoveries, is not Eureka! (I found it!) but That's funny -- Isaac Asimov -- 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: Having trouble formatting width using printf() and default spaces
David Scott wrote: I'm using a for() loop to generate random die rolls. I'd like the numbers to be formatted in a grid. In a grid... like an HTML table? You could something like: $row = 20; $col = 5; echo 'table'; for ($i = 1; $i $row; $i++) { echo 'tr'; for ($j = 1; $j $col; $j++) { echo 'td'.rand(1, $sides).'/td'; } echo '/tr'; } echo '/table'; for ($i = 0; $i 100; $i++) { if (!($i % 5)) { print(br /); } printf(%'.10u, rand(1,$sides)); } Currently, I'm padding with '.', but I'd like to pad with the default spaces. For example, printf(%10u, rand(1,$sides)); Except the numbers end up like, 7 10 14 19 3 4 6 16 13 2 etc. Why is it that when I leave out the padding character, the output isn't padded? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: imagecreatefromjpeg
Bruno Santos wrote: Hello all. Im developing a page, and need to create a thumb of some images. i've compiled PHP 4.3.5 with the built-in support of GD, even having installed the GD library. the problem is that i call the imagecreatefromjpeg function, and PHP returns a fatal error when in run time i've even call the phpinfo function to see the php variables, and there shows that the support of GD is avaiable can someone tell me why this is hapening ? Hmmm, do you have the extension uncommented in your php.ini? here's the error *Fatal error*: Call to undefined function: imagecreatefromjpeg() in */usr/local/apache2/htdocs/projecto/examples/uploadimg.php regards * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .doc file
Greets, I've been able to open a remote URL, read it and then lop off everything except the last line and break it into an array with its' tabs - /t . The data will then be inserted into a table. However, the following URL shows reservoir storage and is a .doc file. I am unable to run the same script with this URL since it is a .doc file - not a .txt file. The client has said that this is the only file that their office has and does not offer any csv or tsv .txt files. Is there anyway to acheive formatting this data using the following file? http://water.usgs.gov/orh/nrwww/odrm/storage2004.doc Thank you. TR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: imagecreatefromjpeg
From http://www.php.net/manual/en/function.imagecreatefromjpeg.php To all those having trouble with a message to the effect of:br CreateImageFromJpeg() not supported in this PHP buildbr Start by adding --with-jpeg-dir to your ./configure options as I left this out (not knowing I needed it) and I spent the best part of 6 hours trying to compile to get this option. (RH 6.2, PHP 4.0.1pl2, Apache 1.3.12, GD 1.8.3) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: .doc file
Anthony Ritter wrote: Greets, I've been able to open a remote URL, read it and then lop off everything except the last line and break it into an array with its' tabs - /t . The data will then be inserted into a table. However, the following URL shows reservoir storage and is a .doc file. I am unable to run the same script with this URL since it is a .doc file - not a .txt file. The client has said that this is the only file that their office has and does not offer any csv or tsv .txt files. Is there anyway to acheive formatting this data using the following file? http://water.usgs.gov/orh/nrwww/odrm/storage2004.doc Thank you. TR Do you have a compatible version of Microsoft Excel? If so you can probably copy and paste the values into a spreadsheet and convert the spreadsheet into csv or tsv. If that's not an option for you then you *might* be able to try PEAR's OLE package... but that would be my last resort. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: .doc file
Actually, why don't you just use plain text like this. Sheesh, sometimes I forget the easy answer :) STORAGE The actual combined contents for the New York City Reservoirs in the Delaware River Basin for December 1, 2003-March 29, 2004. Date Pepacton Cannon. Never. Actual Drought Drought Warning Watch Spill Median Mgal Mgal Mgal Watch 12/1/03 141894 101.2% 98088 102.5% 34729 99.4% 274.711 101.4% 164.711 70.000 94.000 110.000 270.837 171.931 12/2/03 141486 100.9% 98056 102.5% 35006 100.2% 274.548 101.4% 164.022 70.526 94.526 110.526 270.837 12/3/03 141245 100.8% 98007 102.4% 35115 100.5% 274.367 101.3% 163.314 71.053 95.053 111.053 270.837 12/4/03 140913 100.5% 97959 102.4% 35130 100.5% 274.002 101.2% 162.423 71.579 95.579 111.579 270.837 12/5/03 140801 100.4% 97911 102.3% 35135 100.6% 273.847 101.1% 161.742 72.105 96.105 112.105 270.837 12/6/03 140672 100.3% 97750 102.1% 35135 100.6% 273.557 101.0% 160.925 72.632 96.632 112.632 270.837 12/7/03 140579 100.3% 97605 102.0% 35135 100.6% 273.319 100.9% 160.161 73.158 97.158 113.158 270.837 12/8/03 140486 100.2% 97508 101.9% 35130 100.5% 273.124 100.8% 159.440 73.684 97.684 113.684 270.837 12/9/03 140356 100.1% 97363 101.7% 35150 100.6% 272.869 100.8% 158.658 74.211 98.211 114.211 270.837 12/10/03 140264 100.1% 97235 101.6% 35150 100.6% 272.649 100.7% 157.912 74.737 98.737 114.737 270.837 12/11/03 140282 100.1% 97267 101.6% 35140 100.6% 272.689 100.7% 157.426 75.263 99.263 115.263 270.837 12/12/03 141839 101.2% 99392 103.9% 35428 101.4% 276.659 102.1% 160.870 75.789 99.789 115.789 270.837 12/13/03 141727 101.1% 99650 104.1% 35244 100.9% 276.621 102.1% 160.305 76.316 100.316 116.316 270.837 12/14/03 141412 100.9% 99215 103.7% 35184 100.7% 275.811 101.8% 158.969 76.842 100.842 116.842 270.837 12/15/03 141394 100.9% 98893 103.3% 35174 100.7% 275.461 101.7% 158.093 77.368 101.368 117.368 270.837 12/16/03 141134 100.7% 98716 103.1% 35140 100.6% 274.990 101.5% 157.095 77.895 101.895 117.895 270.837 12/17/03 141079 100.6% 98233 102.6% 35145 100.6% 274.457 101.3% 156.036 78.421 102.421 118.421 270.837 12/18/03 141653 101.0% 98394 102.8% 35189 100.7% 275.236 101.6% 156.289 78.947 102.947 118.947 270.837 12/19/03 141468 100.9% 98490 102.9% 35155 100.6% 275.113 101.6% 155.639 79.474 103.474 119.474 270.837 12/20/03 141208 100.7% 98281 102.7% 35135 100.6% 274.624 101.4% 154.624 80.000 104.000 120.000 270.837 12/21/03 140894 100.5% 98088 102.5% 35120 100.5% 274.102 101.2% 153.576 80.526 104.526 120.526 270.837 12/22/03 140727 100.4% 97846 102.2% 35115 100.5% 273.688 101.1% 152.635 81.053 105.053 121.053 270.837 12/23/03 140616 100.3% 97734 102.1% 35120 100.5% 273.470 101.0% 151.891 81.579 105.579 121.579 270.837 12/24/03 140894 100.5% 97862 102.3% 35150 100.6% 273.906 101.1% 151.801 82.105 106.105 122.105 270.837 12/25/03 143480 102.3% 100598 105.1% 35538 101.7% 279.616 103.2% 156.984 82.632 106.632 122.632 270.837 12/26/03 142789 101.9% 101162 105.7% 35284 101.0% 279.235 103.1% 156.077 83.158 107.158 123.158 270.837 12/27/03 142304 101.5% 100502 105.0% 35204 100.8% 278.010 102.6% 154.326 83.684 107.684 123.684 270.837 12/28/03 141931 101.2% 99810 104.3% 35179 100.7% 276.920 102.2% 152.709 84.211 108.211 124.211 270.837 12/29/03 141709 101.1% 99231 103.7% 35174 100.7% 276.114 101.9% 151.377 84.737 108.737 124.737 270.837 12/30/03 141542 101.0% 98683 103.1% 35011 100.2% 275.236 101.6% 149.973 85.263 109.263 125.263 270.837 Date Pepacton Cannon. Never. Actual Drought Drought Warning Watch Spill Median Mgal Mgal Mgal 12/31/03 141412 100.9% 98555 103.0% 34853 99.7% 274.820 101.5% 149.031 85.789 109.789 125.789 270.837 1/1/04 141098 100.6% 98297 102.7% 34749 99.5% 274.144 101.2% 147.828 86.316 110.316 126.316 270.837 187.636 1/2/04 140690 100.4% 98120 102.5% 34926 100.0% 273.736 101.1% 146.894 86.842 110.842 126.842 270.837 1/3/04 140375 100.1% 97975 102.4% 35080 100.4% 273.430 101.0% 146.062 87.368 111.368 127.368 270.837 1/4/04 140393 100.1% 98136 102.5% 35155 100.6% 273.684 101.1% 145.789 87.895 111.895 127.895 270.837 1/5/04 140560 100.3% 98474 102.9% 35229 100.8% 274.263 101.3% 145.842 88.421 112.421 128.421 270.837 1/6/04 140690 100.4% 98555 103.0% 35189 100.7% 274.434 101.3% 145.487 88.947 112.947 128.947 270.837 1/7/04 140579 100.3% 98458 102.9% 35155 100.6% 274.192 101.2% 144.718 89.474 113.474 129.474 270.837 1/8/04 140375 100.1% 98265 102.7% 35140 100.6% 273.780 101.1% 143.780 90.000 114.000 130.000 270.837 1/9/04 139840 99.8% 98104 102.5% 35140 100.6% 273.084 100.8% 142.558 90.526 114.526 130.526 270.837 1/10/04 139381 99.4% 97782 102.2% 35100 100.5% 272.263 100.5% 141.210 91.053 115.053 131.053 270.837 1/11/04 138793 99.0% 97540 101.9% 35085 100.4% 271.418 100.2% 139.839 91.579 115.579 131.579 270.837 1/12/04 138314 98.7% 97476 101.8% 35120 100.5% 270.910 100.0% 138.805 92.105 116.105 132.105 270.837 1/13/04 137894 98.4% 97508
[PHP] mysql - can't use the copy/paste function
Windows 98 se When using the dos window command line for mysql commands everything works fine except if I try to use the paste function to paste pre-typed commands, the window freezes. This is aaannnoooyyyiiinnnggg. advance thanks Dale -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php