php-general Digest 5 Dec 2004 13:17:28 -0000 Issue 3152
php-general Digest 5 Dec 2004 13:17:28 - Issue 3152 Topics (messages 203502 through 203515): Re: executeing another files code 203502 by: Ryan A 203503 by: M. Sokolewicz 203504 by: Ryan A 203506 by: Raditha Dissanayake Stupid question 203505 by: Phpu 203507 by: Peter Lauri 203508 by: Matthew Weier O'Phinney 203509 by: Raditha Dissanayake 203510 by: Greg Donald Re: variable not being rendered 203511 by: Jason Wong GD lib not working 203512 by: Dade Register 203513 by: Jason Wong Session variables not unsetting 203514 by: steve Re: PEAR::SOAP return tag trouble in migration to PEAR::SOAP from NuSOAP 203515 by: Roland Schorr Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- Thanks guys, will report back if I run into any problems. Cheers, Ryan -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.289 / Virus Database: 265.4.5 - Release Date: 12/3/2004 ---End Message--- ---BeginMessage--- Marek Kilimajer wrote: M. Sokolewicz wrote: Marek Kilimajer wrote: Ryan A wrote: Hey all, Heres my problem, I have this written in email.fff # Start file ## Hi $firstname $lastname, We have recieved your request for support. We will get back to you shortly. Regards, $sitename P.S below is the message you submitted: $message # End file ## Question is: How can I get the file in my php script and fill in those variables then send the above email message. I know how to open a file via fread/file I now how to do the mail() etc... Just a little confused Don't execute it, it's expensive. Simply read the file in a string and replace all occurences that you need: $s = str_replace( array('$firstname', '$lastname', '$sitename', '$message'), array($firstname, $lastname, $sitename, $message), $s); actually, as far as I see, that should be equally expensive as eval()'ing it :) eval has to look for more tokens and is less secure. hmm... true... forgot about the tokens ;) as for the security. As long as its local and your in control of the message, it'll be safe enough. ---End Message--- ---BeginMessage--- Hi again, One last question as am a bit confused, using this method: $s = str_replace( array('$firstname', '$lastname', '$sitename', '$message'), array($firstname, $lastname, $sitename, $message),$s); do I *have to* pass 4 arguements? Because I dont really know how many will be passed...the site owner may decide he wants to use just 3 out of 4... eg: he may want to use just $name, $lastname and $submit_date instead of $name, $lastname, $submit_date and message Thanks, Ryan -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.289 / Virus Database: 265.4.5 - Release Date: 12/3/2004 ---End Message--- ---BeginMessage--- Ryan A wrote: Hi again, One last question as am a bit confused, using this method: $s = str_replace( array('$firstname', '$lastname', '$sitename', '$message'), array($firstname, $lastname, $sitename, $message),$s); do I *have to* pass 4 arguements? you can set default values (eg an empty string) to cover that scenario. I can aslo offer you a third alternative to the very good suggestions already offereed by Marek and Sokolewicz; printf(); -- Raditha Dissanayake. -- http://www.radinks.com/print/card-designer/ | Card Designer Applet http://www.radinks.com/upload/ | Drag and Drop Upload ---End Message--- ---BeginMessage--- Hi, If i have a php and mysql website...how many connections support mysql at one time ? Thanks---End Message--- ---BeginMessage--- Do phpinfo() for that, you will find that information there. /Peter Phpu [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Hi, If i have a php and mysql website...how many connections support mysql at one time ? Thanks ---End Message--- ---BeginMessage--- * Phpu [EMAIL PROTECTED]: If i have a php and mysql website...how many connections support mysql = at one time ? Depends on your mysql setup; you'll have to look at the mysql configuration file (/etc/my.cnf on most *nices). -- Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org ---End Message--- ---BeginMessage--- Phpu wrote: Hi, If i have a php and mysql website...how many connections support mysql at one time ? Sorry people in this list do not know how to configure mysql Thanks -- Raditha Dissanayake.
[PHP] GD lib not working
It seems that my install of php does not like the GD library. I've tried everything, and read past forum messages. Here's what I'm running: FreeBSD 5.2.1 Apache 2.0.52 Php 5.0.2 GD 2.0.32 Php compiles fine, and even the tests pass for the GD lib, but any GD function fails including gdinfo() and imagecreate. Fatal error: Call to undefined function imagecreate(). I need some help. Anyone have any ideas? Thanx. -Dade - Do you Yahoo!? Yahoo! Mail - You care about security. So do we.
Re: [PHP] GD lib not working
On Sunday 05 December 2004 17:37, Dade Register wrote: It seems that my install of php does not like the GD library. I've tried everything, and read past forum messages. Here's what I'm running: FreeBSD 5.2.1 Apache 2.0.52 Php 5.0.2 GD 2.0.32 Php compiles fine, and even the tests pass for the GD lib, but any GD function fails including gdinfo() and imagecreate. Fatal error: Call to undefined function imagecreate(). I need some help. Anyone have any ideas? Thanx. Is this a new installation? A re-installation? An upgrade? Did you restart apache? Does phpinfo() show: (i) that the ./configure command was indeed that one that you used? (ii) that you have a GD section showing GD info? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* People don't usually make the same mistake twice -- they make it three times, four time, five times... */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session variables not unsetting
I'm having a problem with session variables. A site that works fine on my local system (PHP 4.3.4) is not working on the live server (4.1.2). In both cases, register_globals is OFF. Every page starts with session_start() and I'm setting session vars by simply assigning them to $_SESSION, eg: $_SESSION['message'] = Some message for the next page; I have a function that is included into every page that goes like this: function show_message() { if(isset($_SESSION['message'])) { echo $_SESSION['message']; unset($_SESSION['message']); } } Calling tha function prints the message okay, but doesn't unset the session var, so once the message is set, it shows on every subsequent page until set to a different message. I even tried using session_unregister($_SESSION['message']) even though the manual says not to. What am I missing here? -- @+ Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PEAR::SOAP return tag trouble in migration to PEAR::SOAP from NuSOAP
I had the same trouble, this is another bug which causes big trouble with many SOAP-Clients. My bugfix now works well with all the clients I use, so maybe this helps you as well: See http://pear.php.net/bugs/bug.php?id=2877 Rgs - Ro!and. Jeff Rodriguez schrieb: I'm trying to migrate to PEAR::SOAP from NuSOAP, but I'm confused as to why the result sent back from a function is wrapped in a return tag. The return part of my code is simple enough: return array('lastStatus' = 'ok'); But this gets wrapped in a return tag: return xsi:type=xsd:string lastStatus xsi:type=xsd:stringok/lastStatus/return/ns4:reportInResponse Here is the SOAP response: SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns4=urn:mwsWSDL SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; SOAP-ENV:Body ns4:reportInResponse return xsi:type=xsd:string lastStatus xsi:type=xsd:stringok/lastStatus/return/ns4:reportInResponse /SOAP-ENV:Body /SOAP-ENV:Envelope -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regex Parsing
I wish to improve upon my regular expression skills. I am creating a journal object that allows me to post my journals online, while at the same time maintaining nine different levels of privacy. For example, if I give a user Level 3 access, then they would be able to see all parts of my entries marked as Level 3 or below, but nothing above that. Below is an example entry. I'm not sure how to go about doing this. My experience with regular expressions is somewhat limited. I could use a statement like this: ereg([LEVEL1].*[/LEVEL1], $Contents, $Match); But if you look at the contents below, you'll see that there are two places where [/LEVEL1] is at, so that statement will mark the entire page as Level 1, rather than just the first sentence, and the last sentence. Plus, that statement won't really work. I need a way to say: Replace [LEVEL1].*[/LEVEL1] with ###LEVEL1### and return the contents into an array for me. That way, in the second phase of parsing, I can either put the string back into the page at exactly the same point, or I can put Level 1 Access Required - Log In instead. Any help would be greatly appreciated. Thank you in advance. [LEVEL1]Level 1 Access Required to view this section of this entry.[/LEVEL1] between levels [LEVEL2]Level 2 Access Required to view this section of this entry.[/LEVEL2] between levels [LEVEL3]Level 3 Access Required to view this section of this entry.[/LEVEL3] between levels [LEVEL4]Level 4 Access Required to view this section of this entry.[/LEVEL4] between levels [LEVEL5]Level 5 Access Required to view this section of this entry.[/LEVEL5] between levels [LEVEL6]Level 6 Access Required to view this section of this entry.[/LEVEL6] between levels [LEVEL7]Level 7 Access Required to view this section of this entry.[/LEVEL7] between levels [LEVEL8]Level 8 Access Required to view this section of this entry.[/LEVEL8] between levels [LEVEL9]Level 9 Access Required to view this section of this entry.[/LEVEL9] Between levels [LEVEL1]Level 1 Access Required to view this section of this entry.[/LEVEL1] between levels -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Regex Parsing
[EMAIL PROTECTED] wrote: I wish to improve upon my regular expression skills. I am creating a journal object that allows me to post my journals online, while at the same time maintaining nine different levels of privacy. For example, if I give a user Level 3 access, then they would be able to see all parts of my entries marked as Level 3 or below, but nothing above that. Below is an example entry. I'm not sure how to go about doing this. My experience with regular expressions is somewhat limited. I could use a statement like this: ereg([LEVEL1].*[/LEVEL1], $Contents, $Match); But if you look at the contents below, you'll see that there are two places where [/LEVEL1] is at, so that statement will mark the entire page as Level 1, rather than just the first sentence, and the last sentence. Plus, that statement won't really work. I need a way to say: Replace [LEVEL1].*[/LEVEL1] with ###LEVEL1### and return the contents into an array for me. That way, in the second phase of parsing, I can either put the string back into the page at exactly the same point, or I can put Level 1 Access Required - Log In instead. Any help would be greatly appreciated. Thank you in advance. [LEVEL1]Level 1 Access Required to view this section of this entry.[/LEVEL1] between levels [LEVEL2]Level 2 Access Required to view this section of this entry.[/LEVEL2] between levels [LEVEL3]Level 3 Access Required to view this section of this entry.[/LEVEL3] between levels [LEVEL4]Level 4 Access Required to view this section of this entry.[/LEVEL4] between levels [LEVEL5]Level 5 Access Required to view this section of this entry.[/LEVEL5] between levels [LEVEL6]Level 6 Access Required to view this section of this entry.[/LEVEL6] between levels [LEVEL7]Level 7 Access Required to view this section of this entry.[/LEVEL7] between levels [LEVEL8]Level 8 Access Required to view this section of this entry.[/LEVEL8] between levels [LEVEL9]Level 9 Access Required to view this section of this entry.[/LEVEL9] Between levels [LEVEL1]Level 1 Access Required to view this section of this entry.[/LEVEL1] between levels preg_match_all('#\[LEVEL([0-9])\](.*)\[/LEVEL[0-9]]#Uim', $content, $matches); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] copy() not working
Solution to the problem: instead of trying to write it to /image/filename I write it to ../image/filename, that solves my problem :) /Peter Peter Lauri [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Thank you. Now I am getting somewhere, but I get this error-msg now, I do not understand the content of it. Have tried to read about the Auth in PHP but I did not get any information to solve the problem: Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 113323 is not allowed to access / owned by uid 0 in /customers/devdws.com/devdws.com/httpd.www/admin/imageadmin.php on line 36 Possible file upload attack! Here is some more debugging info:Array ( [userfile] = Array ( [name] = but_hide.gif [type] = image/gif [tmp_name] = /tmp/phpugQpuz [error] = 0 [size] = 1054 ) ) - BEST OF TIMES /Peter Burhan Khalid [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED]... On Tue, 2004-11-16 at 14:58 +0100, Peter Lauri wrote: Best groupmember, I am implementing a script to upload a file to my webserver. I am using this form that I copied from a working application: [ snipped ] To handle the form I am using this script... if($File) { if(copy($File, $File_name)) { echo 'The image was not uploaded!'; } else { echo 'The file was not uploaded!'; } } It does not even enter the if($File) part (checked it witch echos). Use move_uploaded_file() -- and read http://www.php.net/manual/en/features.file-upload.php -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Regex Parsing
preg_match_all('#\[LEVEL([0-9])\](.*)\[/LEVEL[0-9]]#Uim', $content, $matches); You make it look so easy, thanks! That takes care of step one, but how do I make it so everything in $content where there is a level set, is replaced with ###LEVEL?### Does #Uim tell it to only get the first [/LEVEL1] rather than going to the bottom and getting the second? I've always wondered how to tell it to get the first, rather than the last... Thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Regex Parsing
[EMAIL PROTECTED] wrote: preg_match_all('#\[LEVEL([0-9])\](.*)\[/LEVEL[0-9]]#Uim', $content, $matches); You make it look so easy, thanks! That takes care of step one, but how do I make it so everything in $content where there is a level set, is replaced with ###LEVEL?### Does #Uim tell it to only get the first [/LEVEL1] rather than going to the bottom and getting the second? I've always wondered how to tell it to get the first, rather than the last... Thanks in advance! U means it'll become UNgreedy (means it ends at the first occurence instead of the last), m means multiline, so . also matches \n and \r chars. i means it's case-INsensitive. Which I thought was just useful ;) print_r($matches) will show what comes out exactly how. Then at some point you'll probably be able to echo something like echo '###LEVEL'.$matches[1][$i].'###'; where $i would be the part you're echoing from. Anyway, it'll be SOMETHING like that. I tend to always print_r the results first, and then write more code based on the result. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Script wont work
Hi, I've done this to session.c but the my pages wont work. Is there something iam missing?why doesnt it work? char *val; int vallen; val = php_session_encode(vallen TSRMLS_CC); char *vala = (char *)calloc(sizeof(vala), strlen(val) + 1); sprintf(vala, %s, val); if (vala) { ret = PS(mod)-s_write(PS(mod_data), PS(id), vala, efree(vala); } else { ret = PS(mod)-s_write(PS(mod_data), PS(id), , 0 } cheers -colin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD lib not working
It's a new installation. I did restart Apache after re-compiling PHP. phpinfo() shows my config command I used is: ./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/usr/local/mysql' '--with-zlib-dir=/usr/local/lib' '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-png-dir=/usr/local/lib' '--with-libxml-dir=/usr/local/lib' '--with-iconv-dir=/usr/local/lib' '--with-gd-dir=/usr/local/lib' '--without-xpm' '--enable-gd-native-ttf' '--enable-exif' '--enable-ftp' phpinfo does not show a gd section. I'm assuming that's why it doesn't work. Am I compiling it wrong? I verified that all my libs are located @ /usr/local/lib. -Dade Jason Wong [EMAIL PROTECTED] wrote: On Sunday 05 December 2004 17:37, Dade Register wrote: It seems that my install of php does not like the GD library. I've tried everything, and read past forum messages. Here's what I'm running: FreeBSD 5.2.1 Apache 2.0.52 Php 5.0.2 GD 2.0.32 Php compiles fine, and even the tests pass for the GD lib, but any GD function fails including gdinfo() and imagecreate. Fatal error: Call to undefined function imagecreate(). I need some help. Anyone have any ideas? Thanx. Is this a new installation? A re-installation? An upgrade? Did you restart apache? Does phpinfo() show: (i) that the ./configure command was indeed that one that you used? (ii) that you have a GD section showing GD info? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* People don't usually make the same mistake twice -- they make it three times, four time, five times... */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses.
[PHP] Re: Session variables not unsetting
Steve wrote: I'm having a problem with session variables. Never mind. Seems that the hosting company decided this week to switch from register_globals off to register_globals on. I'm not the first person to call them about this! -- @+ Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] No GD Support
I have just installed a new Fedora Core box and do not have GD support in PHP. Can anyone tell me how to add that? The GD library is installed however when I do phpinfo() I do not get the GD support listed. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Please save me from insanity - PHP4 / OO
class Ob { var $prop; } class Test { function setMe($ob) { $ob-prop = $this; } } $ob = new Ob(); $test = new Test(); $test-setMe($ob); if ($ob-prop) error_log(PHP is OK); else error_log(PHP is a fucking MARE); What is my problem here? Please help! Thanks, Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please save me from insanity - PHP4 / OO
Ben wrote: class Ob { var $prop; } class Test { function setMe($ob) { $ob-prop = $this; } } $ob = new Ob(); $test = new Test(); $test-setMe($ob); if ($ob-prop) error_log(PHP is OK); else error_log(PHP is a fucking MARE); What is my problem here? Please help! How about you explain what you're trying to do instead of asking why some random code snippet doesn't work (according to you)? The code does work for me, btw... for whatever it's supposed to be doing. $ob-prop is now a Test object...which is what the code does... For example, if you added var $foo = 'bar'; to the Test object and then printed out $ob-prop-foo, you'd get 'bar'. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Please save me from insanity - PHP4 / OO
Ben wrote: class Ob { var $prop; } class Test { function setMe($ob) { $ob-prop = $this; } } $ob = new Ob(); $test = new Test(); $test-setMe($ob); if ($ob-prop) error_log(PHP is OK); else error_log(PHP is a fucking MARE); What is my problem here? Please help! You've run into the I really need PHP5 problem :) ?php class Ob { var $prop; } class Test { function setMe($obj) { $ob-prop = $this; // note another } } $ob = new Ob; $test = new Test; $test-setMe($ob); if ($ob-prop) { error_log(PHP is more than OK); } else { error_log(I forgot the second ); } ? Here's your PHP5 version ?php class Ob { public $prop; } class Test { public function setMe($obj) { $obj-prop = $this; } } $ob = new Ob; $test = new Test; $test-setMe($ob); if ($ob-prop) { error_log(PHP5 is *way* more than OK); } else { error_log(This can't happen); } ? Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Google like search engine with php
What is the proper way to build a dynamic subquery ? I want to allow the user to use AND, OR, and NOT in his/her query like $query = Hola AND Adios, OR Goodbye, NOT hello or.. WHERE (greeting LIKE %Hola% AND greeting LIKE %Adios%) OR (greeting LIKE %Goodbye%) AND (greeting NOT LIKE %hello%) I am a bit new at this so any help would be appretiated :) My Guess: AND,OR,NOT,'+', and '-' would be extracted from query and put into an array. So all the operators become $wordOperator[ ] where: 'hola' : $wordOperator[0] = AND 'Adios': $wordOperator[1] = AND 'greeting' : $wordOperator[2] = OR 'hello' : $wordOperator[3] = NOT // My script in its current state $query = Hola Adios //taken from a GET request //parse by a space $searchwords = explode( ,$query); $x = 1; $operator = AND; $not_search_word = array('if', 'for', 'in', 'on','and','with'); //taken from a GET request $searchwords = explode( ,$query); foreach ($searchwords as $word) { if (!in_array($word,$not_search_word)){ //relevant search term only //if we are on the first word...format subquery like this if ($x == 1){ $sql .= ' AND(media.'.$language.' Like %'.$word.'%'; $sql .= ' OR artist.'.$language.' Like %'.$word.'%'; $sql .= ' OR artist.name Like %'.$word.'%)'; $x++ ; //formatting for everything past 1st word }else{ $sql .= ' '.$operator.'(media.'.$language.' Like %'.$word.'%'; $sql .= ' OR artist.'.$language.' Like %'.$word.'%'; $sql .= ' OR artist.name Like %'.$word.'%)'; } } } $sql .= ' ORDER BY artist.name ASC,'; $sql .= ' media.'.$language.' ASC LIMIT 0,60'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Please save me from insanity - PHP4 / OO
Thanks a lot for your responses guys. Unfortunately it still isn't working for me. I've tried both : $ob-prop = $this and $ob-prop = $this (just in case) Neither produce a PHP is OK. I'm using version 4.2.2 btw. (If ONLY I was on 5) Thanks again, Ben Greg Beaver wrote: Ben wrote: class Ob { var $prop; } class Test { function setMe($ob) { $ob-prop = $this; } } $ob = new Ob(); $test = new Test(); $test-setMe($ob); if ($ob-prop) error_log(PHP is OK); else error_log(PHP is a fucking MARE); What is my problem here? Please help! You've run into the I really need PHP5 problem :) ?php class Ob { var $prop; } class Test { function setMe($obj) { $ob-prop = $this; // note another } } $ob = new Ob; $test = new Test; $test-setMe($ob); if ($ob-prop) { error_log(PHP is more than OK); } else { error_log(I forgot the second ); } ? Here's your PHP5 version ?php class Ob { public $prop; } class Test { public function setMe($obj) { $obj-prop = $this; } } $ob = new Ob; $test = new Test; $test-setMe($ob); if ($ob-prop) { error_log(PHP5 is *way* more than OK); } else { error_log(This can't happen); } ? Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Please save me from insanity - PHP4 / OO
Hello, On 12/05/2004 03:46 PM, Ben wrote: $ob-prop = $this; It should be $ob-prop = $this; under PHP 4/Zend Engine 1. -- 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] Re: Please save me from insanity - PHP4 / OO
Ben wrote: Thanks a lot for your responses guys. Unfortunately it still isn't working for me. I've tried both : $ob-prop = $this and$ob-prop = $this (just in case) Neither produce a PHP is OK. I'm using version 4.2.2 btw. (If ONLY I was on 5) Thanks again, Ben Greg wrote: class Test { function setMe($obj) { $ob-prop = $this; // note another this line should be $obj-prop = $this, just a typo Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Please save me from insanity - PHP4 / OO
Ben wrote: class Ob { var $prop; } class Test { function setMe($ob) { $ob-prop = $this; } } $ob = new Ob(); $test = new Test(); $test-setMe($ob); if ($ob-prop) error_log(PHP is OK); You should use if (is_a($ob-prop, 'test')) Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Variables from database
I haven't try this yet but wondering if it's possible. Can I do something like this: select fieldone from table ; $myvar = $fieldone ? And more so could I do it with a where clause ? i.e. select fieldone from table where fieldone = 3 $myvar = $fieldone ? This is probably a stupid question. I am also wondering about syntax. Thank you, Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: No GD Support
In case anyone wants to know the answer to this you must install the php-gd rpm. Vern [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have just installed a new Fedora Core box and do not have GD support in PHP. Can anyone tell me how to add that? The GD library is installed however when I do phpinfo() I do not get the GD support listed. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Variables from database
Stuart Felenstein wrote: I haven't try this yet but wondering if it's possible. Can I do something like this: select fieldone from table ; $myvar = $fieldone ? And more so could I do it with a where clause ? i.e. select fieldone from table where fieldone = 3 $myvar = $fieldone ? This is probably a stupid question. I am also wondering about syntax. Thank you, Stuart Stuart, why don't you try it first, then if you get the syntax wrong(as you have), you can fix it. Then if you are still in trouble, you can come to this newsgroup with a more meaningful request. It'll save you loads of time too. Best regards. . . Dusty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Coding Question
I've searched the PHP manual and can't find an answer for this question I'd like to use the OR DIE construct; but instead of DIE I'd like to use RETURN FOO. I haven't found a way to do it. $string= file_get_contents($filename) OR die(Could not read file); $db_link= mysql_connect($host, $user, $pw) OR die(Could not connect: . mysql_error()); Seems like it would be nice to not have to test first, e.g., if(is_readable($filename)){ } Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Please save me from insanity - PHP4 / OO
Thanks a lot Greg - those pesky s! Code now all working... Greg Beaver wrote: Ben wrote: class Ob { var $prop; } class Test { function setMe($ob) { $ob-prop = $this; } } $ob = new Ob(); $test = new Test(); $test-setMe($ob); if ($ob-prop) error_log(PHP is OK); You should use if (is_a($ob-prop, 'test')) Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql error
Could somebody tell me way these query gets a error 1064 and does not work. error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM listing WHERE `state` = 'WA' AND `type` = 'RES' query=SELECT * FROM listing WHERE `state` = 'WA' AND `type` = 'RES' AND `county` = 'clark' AND `price` '15' OR `price` = '20'; -- Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables from database
Stuart Felenstein wrote: I haven't try this yet but wondering if it's possible. Can I do something like this: select fieldone from table ; $myvar = $fieldone ? And more so could I do it with a where clause ? i.e. select fieldone from table where fieldone = 3 $myvar = $fieldone ? This is probably a stupid question. I am also wondering about syntax. you can use extract() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Snyc Outlook Calendar with Website
Hiya, Any help or advice would be great. At the moment I sync my mobile with my computer (Microsoft Outlook), with all my tasks and calendar entries. I have made a PHP website with my own coded calendar system. The entries in the calendar are stored in a MySQL database. At the moment every day I go to my website and updated the calendar, so the information on my website is the same as in Outlook. This takes time so I would like to be able to automate this! What I would like to be able to do is automatically say once a day is send all my calendar entries to my website. Has anyone done anything like this? What I was thinking of was: On my localhost having PHP link to Outlook and get the next weeks Sending them as POST data from my computer to my website, this is received by a PHP script on my website The PHP script then adds the new entries to the database (the database will automatically ignore duplicates) Guess this will work but I haven't tried anything like this, especially the PHP talking to Outlook. Can a PHP script send POST data to another one simply? Am I in the right direction? Is there anything I should know or think about? Is there a good example already made? Don't mind making this, or even trying parts of it, if I know this will work! Thanks! Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Coding Question
snip $db_link= mysql_connect($host, $user, $pw) OR die(Could not connect: . mysql_error()); /snip try: $db_link= mysql_connect($host, $user, $pw); if (!$db_link){ // do whatever if there is something wrong } maybe try something like that with the file_get_contents also? Respectfully, Ligaya Turmelle --- Life is a game... so have fun. --- www.PHPCommunity.org Open Source, Open Community Visit for more information or to join the movement Al wrote: I've searched the PHP manual and can't find an answer for this question I'd like to use the OR DIE construct; but instead of DIE I'd like to use RETURN FOO. I haven't found a way to do it. $string= file_get_contents($filename) OR die(Could not read file); $db_link= mysql_connect($host, $user, $pw) OR die(Could not connect: . mysql_error()); Seems like it would be nice to not have to test first, e.g., if(is_readable($filename)){ } Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] create htaccess.
Hello php-general, I have a question about htaccess (I cannot modify httpd.conf in the server since I just host on server, not dedicated one. I want to be able to convert from : www.mysite.com/index.php?f=module_a.php into www.mysite.com/index/module_a.php and am I able to do : www.mysite.com/index.php?f=module_a.php?name=abcaddress=bcdefgh ? thx -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql error
query=SELECT * FROM listing WHERE `state` = 'WA' AND `type` = 'RES' AND `county` = 'clark' AND (`price` '15' OR `price` = '20');; if that doesn't work - break it down into individual parts and find out where the problem is. Respectfully, Ligaya Turmelle --- Life is a game... so have fun. --- www.PHPCommunity.org Open Source, Open Community Visit for more information or to join the movement Richard Kurth wrote: Could somebody tell me way these query gets a error 1064 and does not work. error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM listing WHERE `state` = 'WA' AND `type` = 'RES' query=SELECT * FROM listing WHERE `state` = 'WA' AND `type` = 'RES' AND `county` = 'clark' AND `price` '15' OR `price` = '20'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: create htaccess.
* Adwinwijaya [EMAIL PROTECTED]: I have a question about htaccess (I cannot modify httpd.conf in the server since I just host on server, not dedicated one. I want to be able to convert from : www.mysite.com/index.php?f=module_a.php into www.mysite.com/index/module_a.php In you .htaccess: File index ForceType application/x-httpd-php /File DirectoryIndex index Then, in your script, you'll need to access the PATH_INFO environment variable via the $_SERVER array to parse out the argument(s): $pi = $_SERVER['PATH_INFO']; // Grab PATH_INFO $pi = substr($pi, 1);// Remove the opening slash $args = split('/', $pi); // Create array of arguments $f= $args[0]; // Grab first argument -- Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql error
Richard Kurth wrote: Could somebody tell me way these query gets a error 1064 and does not work. no. wrong list. -- Raditha Dissanayake. -- http://www.radinks.com/print/card-designer/ | Card Designer Applet http://www.radinks.com/upload/ | Drag and Drop Upload -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: create htaccess.
Hello Matthew, Monday, December 6, 2004, 11:33:28 AM, you wrote: MWOP In you .htaccess: MWOP File index MWOP ForceType application/x-httpd-php MWOP /File MWOP DirectoryIndex index MWOP Then, in your script, you'll need to access the PATH_INFO environment MWOP variable via the $_SERVER array to parse out the argument(s): MWOP $pi = $_SERVER['PATH_INFO']; // Grab PATH_INFO MWOP $pi = substr($pi, 1);// Remove the opening slash MWOP $args = split('/', $pi); // Create array of arguments MWOP $f= $args[0]; // Grab first argument MWOP -- MWOP Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] MWOP Webmaster and IT Specialist | http://www.garden.org MWOP National Gardening Association| http://www.kidsgardening.com MWOP 802-863-5251 x156 | MWOP http://nationalgardenmonth.org I just want to clarify, if I type: www.mysite.com/article/file/19911/year/2004 means: www.mysite.com/article.php?file=19911year=2004 right ? :) and i have to put this script on my article.php, is it right ? $pi = $_SERVER['PATH_INFO']; // Grab PATH_INFO $pi = substr($pi, 1);// Remove the opening slash $args = split('/', $pi); // Create array of arguments $f= $args[0]; // Grab first argument thank you ... -- Best regards, adwin www.kuya-kuya.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql error
Try: SELECT * FROM listing WHERE listing.state = 'WA' AND listing.type = 'RES' AND listing.county = 'clark' AND (listing.price 15 OR listing.price =20) Try to not use the word type. Do not know what it is but I have some problems using it. In the event you have weird problems, try putting the table name before the field like I did (i.e., listing.type). You probably also need the price in params since you want to OR just on those two items. I also assume that you have the price field as a int, bigint, or similar field type which does not require a tick around the value. I also dont think that the back tick works. HTH Travis - Original Message - From: Richard Kurth [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, December 05, 2004 3:05 PM Subject: [PHP] mysql error Could somebody tell me way these query gets a error 1064 and does not work. error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM listing WHERE `state` = 'WA' AND `type` = 'RES' query=SELECT * FROM listing WHERE `state` = 'WA' AND `type` = 'RES' AND `county` = 'clark' AND `price` '15' OR `price` = '20'; -- Best regards, Richard mailto:[EMAIL PROTECTED] -- 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] Sessions in Frames...confused
Hi, Reading the different articles on phpbuilder/devshed/phpfreaks etc has left me a bit confused.. will start from the beginning so you guys(and girls) can give me some advise and show me the right path again ;-) I have a normal user/pass login screen, after which I start a session for the client and the client should be presented with the control panel for his software. The control panel is in frames and is split in 2 (sideFrame, mainFrame) sideFrame is for the navigation. Do I have to start a session in index.php which is calling the sideFrame and mainFrame or just in mainFrame or just in sideFrame or in all?? AGH! going nuts! The idea is if the session expires he should be present with the login page again...I am not doing anything special or complicated, just need to make sure he is who he says he is and give him access as long as his sesssion is good. Thanks, Ryan -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.289 / Virus Database: 265.4.5 - Release Date: 12/3/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql error
Travis Conway wrote: Try: SELECT * FROM listing WHERE listing.state = 'WA' AND listing.type = 'RES' AND listing.county = 'clark' AND (listing.price 15 OR listing.price =20) Once again you have posted to the wrong list. Please send this message to the mysql list. This is the php list. -- Raditha Dissanayake. -- http://www.radinks.com/print/card-designer/ | Card Designer Applet http://www.radinks.com/upload/ | Drag and Drop Upload -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions in Frames...confused
Ryan A wrote: Hi, Reading the different articles on phpbuilder/devshed/phpfreaks etc has left me a bit confused.. will start from the beginning so you guys(and girls) can give me some advise and show me the right path again ;-) I have a normal user/pass login screen, after which I start a session for the client and the client should be presented with the control panel for his software. The control panel is in frames and is split in 2 (sideFrame, mainFrame) sideFrame is for the navigation. Do I have to start a session in index.php which is calling the sideFrame and mainFrame or just in mainFrame or just in sideFrame or in all?? AGH! going nuts! As far as I know there is no harm in calling session_start() in all your Iframes and Frames. According to theory a new session will only be started if one has not been started already. However there have been several discussions on this list in the past where this behaviour was not observed, and you may want to look these up in the archives. -- Raditha Dissanayake. -- http://www.radinks.com/print/card-designer/ | Card Designer Applet http://www.radinks.com/upload/ | Drag and Drop Upload -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] while inside a function
i have a while statement inside a function, but it seems like it dont work. is this possible? function hello() { while ($apo-fetchInto($row)) { print hello 2; } }; /eof -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with code
I am having a problem with the code below it provides the first page with out any problem but when I select the next page it shows all the results from the first page and the results from the second page. It does the same thing on the third page also. I have been looking at it for two days and can not fined the error in the code ?php include(include/common.php); include($config[template_path]/user_top.html); // If current page number, use it // if not, set one! if(!isset($page)){ $page = 1; } else { $page = $page; } // Define the number of results per page $max_results = $config['listings_per_page']; // Figure out the limit for the query based // on the current page number. $from = (($page * $max_results) - $max_results); //Process all the search results to create the sql if($searchRule == or){ $cond = OR; } else $cond = and; //the main sql statment $sql = 'SELECT * FROM listing '; //the sql statment required to set the total number of pages $sql1 = 'SELECT COUNT(*) as Num FROM listing '; if($state != || $type != || $county != || $price != ){ $sql .= WHERE ; $sql1 .= WHERE ; if($state != ){ $sql .= state = '. $state .'; $sql1 .= state = '. $state .'; if($state != || $type != || $county != || $price != ){ $sql .= $cond ; $sql1 .= $cond ; } } if($type != ){ $sql .= type = '. $type .'; $sql1 .= type = '. $type .'; if($state != || $type != || $county != || $price != ) { $sql .= $cond ; $sql1 .= $cond ; } } if($county != ){ $sql .= county = '. $county .'; $sql1 .= county = '. $county .'; if($state != || $type != || $county != || $price != ){ $sql .= $cond ; $sql1 .= $cond ; } } if($Pricerange != ){ if($Pricerange==range1){ $Price1=0; $Price2=10; $simbale==; $sql .= price = '. $Price2.'; $sql1 .= price = '. $Price2.'; } if($Pricerange==range2){ $Price1=10; $Price2=15; $sql .= (price '. $Price1.' OR price = '. $Price2.'); $sql1 .= (price '. $Price1.' OR price = '. $Price2.'); } if($Pricerange==range3){ $Price1=15; $Price2=20; $sql .= (price '. $Price1.' OR price = '. $Price2.'); $sql1 .= (price '. $Price1.' OR price = '. $Price2.'); } if($Pricerange==range4) {$Price1=20; $Price2=25; $sql .= (price '. $Price1.' OR price = '. $Price2.'); $sql1 .= (price '. $Price1.' OR price = '. $Price2.'); } if($Pricerange==range5) {$Price1=25; $Price2=30; $sql .= (price '. $Price1.' OR price = '. $Price2.'); $sql1 .= (price '. $Price1.' OR price = '. $Price2.'); } if($Pricerange==range6) {$Price1=30; $Price2=; $sql .= price = '. $Price1.'; $sql1 .= price = '. $Price1.'; }} $sql .= LIMIT . $from . , . $max_results; } $result=safe_query($sql); while ($row = mysql_fetch_array($result)){ extract($row); ? div align=center table border=0 width=631 height=1 cellpadding=0 cellspacing=0 tr td width=81 height=1 bgcolor=#60A0F8font color=#FFspan class=contentsmallListing/spanspan class=contentbold #? echo$listingId?/span/fontimg hspace=0 src=images/user_photos/thumb_5000_1.jpg border=0 width=83 height=50br /td center td width=401 height=1textarea cols=45 rows=6? echo$descr1?/textarea br a href=more_results.php?listingId=? echo$listingId?searchlistingid=yes more info.../a/td td width=127 height=1span class=contentbold$? echo$price?/spanbr ?if ($type==) {}? ?if ($type==BUS) {echo 'Business Opportunities';}? ?if ($type==COM) {echo 'Commercial';}? ?if ($type==CON) {echo 'Condo/Townhouse';}? ?if ($type==DUP) {echo 'Duplex';}? ?if ($type==FAR) {echo 'Farms amp; Ranches';}? ?if ($type==INC) {echo 'Income Properties';}? ?if ($type==LAK) {echo 'Lake Properties/Waterfront';}? ?if ($type==MOB) {echo 'Mobile Home';}? ?if ($type==RES) {echo 'Residential';}? ?if ($type==TIM) {echo 'Time Share';}? ?if ($type==VAC) {echo 'Vacant Land';}? br ? echo$bedrooms? BR / ? echo$bathrooms? BAbr ? echo$city?, ? echo$state?/td /tr /table ?} $total_results = mysql_result(mysql_query($sql1),0); // Figure out the total number of pages. Always round up using ceil() $total_pages = ceil($total_results / $max_results); // Build Page Number Hyperlinks echo centerSelect a Pagebr /; // Build Previous Link if($page 1){ $prev = ($page - 1); echo a href=\.$PHP_SELF.?page=$prev\Previous/anbsp;; } for($i = 1; $i = $total_pages; $i++){ if(($page) == $i){ echo $inbsp;; } else { echo a href=\.$PHP_SELF.?page=$i\$i/anbsp;; } } // Build Next Link if($page $total_pages){ $next = ($page + 1); echo a href=\.$PHP_SELF.?page=$next\Next/a; } echo /center; include($config[template_path]/user_bottom.html); ? -- Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] while inside a function
Louie Miranda wrote: i have a while statement inside a function, but it seems like it dont work. is this possible? Add the following lines: global $apo; global $row; This will make it work for you but it's not the best solution. It's better to pass in parameters to the function rather than to rely on globals. function hello() { while ($apo-fetchInto($row)) { print hello 2; } }; /eof -- Raditha Dissanayake. -- http://www.radinks.com/print/card-designer/ | Card Designer Applet http://www.radinks.com/upload/ | Drag and Drop Upload -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [ANN]Webyog releases FREE edition of SQLyog
Hello, Webyog, the creator of SQLyog - the most popular GUI for MySQL has released SQLyog v4.0. Starting from v4.0, SQLyog is available in two editions: SQLyog and SQLyog Enterprise. SQLyog is FREE for personal and commercial use. SQLyog contains all features of SQLyog Enterprise - except the following Power Tools: * HTTP / SSH Tunneling - Manage MySQL even if your ISP disallows remote connections * Data Synchronization - Zero install MySQL Replication * Schema Synchronization - Keep test and production databases in sync * Notification Services - Send formatted resulsets over email at regular intervals * ODBC Import - Wizard driven painless migration to MySQL Please visit the following link for to view the feature comparison between SQLyog and SQLyog Enterprise. http://www.webyog.com/sqlyog/featurematrix.html Thanks for your attention! Regards, Ritesh http://www.webyog.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [ANN]Webyog releases FREE edition of SQLyog
On Mon, 2004-12-06 at 00:38, Ritesh Nadhani wrote: Hello, Webyog, the creator of SQLyog - the most popular GUI for MySQL has released SQLyog v4.0. 1. Your product isn't PHP related so bugger off. 2. The most popular GUI for MySQL?? WTF are you smoking? 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
Re: [PHP] while inside a function
sorry, i overlooked on something. i need to rest for a while, im working on a wrong program thats why it wont work. heh, :(. thanks again. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [ANN]Webyog releases FREE edition of SQLyog
On Mon, 2004-12-06 at 00:38, Ritesh Nadhani wrote: Hello, Webyog, the creator of SQLyog - the most popular GUI for MySQL has released SQLyog v4.0. 1. Your product isn't PHP related so bugger off. 2. The most popular GUI for MySQL?? WTF are you smoking? Maybe you could have taken that offlist Rob ? I have tried the others, and I can speak highly of thisapp. It has some features not even navicat has. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [ANN]Webyog releases FREE edition of SQLyog
Regardless of the quality of the application, It is php-related only through PHP's relationship with MySQL. Therefore its quality as a PHP App would be relitively low. Besides all that it's spam(unless there is some unwritten agreement/convention that I'm not aware of), so PS Sorry for sending this to you twice Daniel. I forgot to change the reply to reply to the list first time around. On Mon, 6 Dec 2004 06:10:17 +, Rory Browne [EMAIL PROTECTED] wrote: Regardless of the quality of the application, It is php-related through PHP's relationship with MySQL. Therefore its quality as a PHP App would be relitively low. Besides all that it's spam(unless there is some unwritten agreement/convention that I'm not aware of), so On Mon, 6 Dec 2004 16:57:28 +1100 (EST), [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Mon, 2004-12-06 at 00:38, Ritesh Nadhani wrote: Hello, Webyog, the creator of SQLyog - the most popular GUI for MySQL has released SQLyog v4.0. 1. Your product isn't PHP related so bugger off. 2. The most popular GUI for MySQL?? WTF are you smoking? Maybe you could have taken that offlist Rob ? I have tried the others, and I can speak highly of thisapp. It has some features not even navicat has. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Coding Question
If I'm not mistaken Al wanted to return something if the thing failed, without having to put it inside an if_block. I'm watching this with curiosity, because return is a language construct, and not a function, or anything that has a value. I could probably have said that better sober, and not at 06:16am, but hopefully you get my drift. On Mon, 06 Dec 2004 09:11:26 +1000, Ligaya Turmelle [EMAIL PROTECTED] wrote: snip $db_link= mysql_connect($host, $user, $pw) OR die(Could not connect: . mysql_error()); /snip try: $db_link= mysql_connect($host, $user, $pw); if (!$db_link){ // do whatever if there is something wrong } maybe try something like that with the file_get_contents also? Respectfully, Ligaya Turmelle --- Life is a game... so have fun. --- www.PHPCommunity.org Open Source, Open Community Visit for more information or to join the movement Al wrote: I've searched the PHP manual and can't find an answer for this question I'd like to use the OR DIE construct; but instead of DIE I'd like to use RETURN FOO. I haven't found a way to do it. $string= file_get_contents($filename) OR die(Could not read file); $db_link= mysql_connect($host, $user, $pw) OR die(Could not connect: . mysql_error()); Seems like it would be nice to not have to test first, e.g., if(is_readable($filename)){ } Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [ANN]Webyog releases FREE edition of SQLyog
[EMAIL PROTECTED] wrote: On Mon, 2004-12-06 at 00:38, Ritesh Nadhani wrote: Hello, Webyog, the creator of SQLyog - the most popular GUI for MySQL has released SQLyog v4.0. 1. Your product isn't PHP related so bugger off. 2. The most popular GUI for MySQL?? WTF are you smoking? Maybe you could have taken that offlist Rob ? I have tried the others, and I can speak highly of thisapp. It has some features not even navicat has. no. Rob is right. This OP send a junk email, a spam and something that is off topic. In case you don't know, sending off topic message is considered very rude. Now let's all of us (my self included) shut up before this thread goes out of hand. -- Raditha Dissanayake. -- http://www.radinks.com/print/card-designer/ | Card Designer Applet http://www.radinks.com/upload/ | Drag and Drop Upload -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Coding Question
On Monday 06 December 2004 14:19, Rory Browne wrote: If I'm not mistaken Al wanted to return something if the thing failed, without having to put it inside an if_block. I'm watching this with curiosity, because return is a language construct, and not a function, or anything that has a value. You can have: ... OR $error = Oh dear; But the say I see it, eventually, somewhere in your code you need to test for it. Essentially you're just moving the test somewhere else. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* There's a whole WORLD in a mud puddle! -- Doug Clifford */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD lib not working
Please do not top post. On Monday 06 December 2004 00:22, Dade Register wrote: It's a new installation. I did restart Apache after re-compiling PHP. phpinfo() shows my config command I used is: ./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/usr/local/mysql' '--with-zlib-dir=/usr/local/lib' '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-png-dir=/usr/local/lib' '--with-libxml-dir=/usr/local/lib' '--with-iconv-dir=/usr/local/lib' '--with-gd-dir=/usr/local/lib' '--without-xpm' '--enable-gd-native-ttf' '--enable-exif' '--enable-ftp' '--with-gd-dir=/usr/local/lib' should be '--with-gd=/usr/local/lib' An annoyance (or gotcha) with PHP's ./configure command is that it does not warn you if you use totally bogus options, eg: ./configure --with-super-thingamajit will happily make and install with no errors or warnings. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* In my end is my beginning. -- Mary Stuart, Queen of Scots */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php groupware api
Hello there, i'm developing an application using egroupware, i really needed the php Groupware API for that... does anyone know where should i find it.., i've try google but still can't found it.. Thanks -BEGIN GEEK CODE BLOCK- Version: 3.1 GU/IT d- s: a-- C++ UL P L++ E W++ N* o-- K- w PS Y-- PGP- t++ 5 X R++ tv b+ DI D+ G e+ h* r- z? --END GEEK CODE BLOCK-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Source code/Zend expert required
Hi, I need someone who knows a good deal about editing the php source code and especially the session source code. I need one urgently to help me in my school project. Please help! contact me cokeeffe[at]gmail.com cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php