RE: [PHP] Open source project management tool - PHP
Thanks all, for the responses and advice. After much research and trying out we decided to go with: http://www.fengoffice.com/ its PHP based and also uses the EXTJS library. Its got quite a lot of features (calendar, tasks, email, notes, documents, reporting) etc... with a great AJAX interface and good functionality. Regards Angelo http://www.wapit.co.za http://www.elemental.co.za -Original Message- From: Gaurav Kumar [mailto:kumargauravjuke...@gmail.com] Sent: 18 December 2009 10:34 AM To: Robert Cummings Cc: Angelo Zanetti; php-general@lists.php.net Subject: Re: [PHP] Open source project management tool - PHP OK one more the list http://dotproject.net/ Its a nice one with all project management features. Easy to use. Just checkout the website. Gaurav Kumar blog.oswebstudio.com On Fri, Dec 18, 2009 at 12:16 AM, Robert Cummings wrote: > Angelo Zanetti wrote: > >> Hi guys >> I would like to know what open source project management tools you use for >> your projects. >> >> We are looking at installing one that is PHP based and is easy to use. >> >> We have found: >> http://www.projectpier.org/ >> >> and >> >> http://trac.edgewall.org/ >> >> >> Has anyone used the above and how did you find them? Also are there any >> others you would recommend or not recommend and why? >> > > I use Mantis for most bug tracking needs. However, I've recently rolled out > OpenGoo for a couple of different clients. > > http://fengoffice.com/web/community/community_index.php > > Cheers, > Rob. > -- > http://www.interjinn.com > Application and Templating Framework for PHP > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Open source project management tool - PHP
What could be a php potential problem with contact forms that are only protected against SQL injections and have an admin side view for the enquiry?
[PHP] SVG Won't Color?
Hi, I have the code as in the following, and I am trying to colorize the map. The SVG File is located here: http://upload.wikimedia.org/wikipedia/commons/5/5f/USA_Counties_with_FIPS_and_names.svg. Looks like when I tried to modify the contents of the line, it does not seem to take into affect. Thus, my map does not get colorized. Do I have to save the file here? Or, is there something else I have missed here? 10): $color = 5; break; case ($array[$i] > 8): $color = 4; break; case ($array[$i] > 6): $color = 3; break; case ($array[$i] > 4): $color = 2; break; case ($array[$i] > 2): $color = 1; break; default: $color= 0; break; } $color_class= $colors_array[$color]; array_push($array4,$color_class); } foreach ($lines2 as $line_num => $line2) { $line_add_one = $line_num + 1; if(preg_match("/ Thanks for your help. Alice _ Hotmail: Trusted email with Microsoft’s powerful SPAM protection. http://clk.atdmt.com/GBL/go/196390706/direct/01/
Re: [PHP] SVG Won't Color?
On Wed, 2010-01-06 at 11:27 -0500, Alice Wei wrote: > Hi, > > I have the code as in the following, and I am trying to colorize the map. > The SVG File is located here: > http://upload.wikimedia.org/wikipedia/commons/5/5f/USA_Counties_with_FIPS_and_names.svg. > Looks like when I tried to modify the contents of the line, it does not seem > to take into affect. Thus, my map does not get colorized. Do I have to save > the file here? Or, is there something else I have missed here? > > > //We are outputting an SVG > header("Content-type: image/svg+xml"); > > $array= array(); > $array2= array(); > $array3= array(); > $array4= array(); > > #Map Colors > $colors_array= > array("#F1EEF6","#D4B9DA","#C994C7","#DF65B0","#DD1C77","#980043"); > > $file = file("unemployment09.csv"); > foreach ($file as $line) { > $chars = preg_split("/,/", $line); > $unemployment_rate = $chars[12]; > array_push($array,$unemployment_rate); > } > > //Calculate the number of elements in array > $total_num = count($array); > > #Load the Map > $ourFileName= "USA_Counties_with_FIPS_and_names.svg"; > $fh = fopen($ourFileName, "r") or die("Can't open file"); > $contents = fread($fh,filesize($ourFileName)); > $lines2= file($ourFileName); > > #Color the counties based on unemployment rate > for ($i=0;$i<$total_num;$i++){ > > switch($array[$i]){ > >case ($array[$i] > 10): >$color = 5; >break; > >case ($array[$i] > 8): >$color = 4; >break; > >case ($array[$i] > 6): >$color = 3; >break; > >case ($array[$i] > 4): >$color = 2; >break; > >case ($array[$i] > 2): >$color = 1; >break; > >default: >$color= 0; >break; > > } > $color_class= $colors_array[$color]; > array_push($array4,$color_class); > } > > foreach ($lines2 as $line_num => $line2) { > > $line_add_one = $line_num + 1; > if(preg_match("/ >$rest = substr($lines2[$line_add_one],0,-3); >$colors_style = ";color:" . $array4[$line_add_one]; >$rest = $rest . $colors_style . "\""; > } > array_push($array3,$lines2[$line_add_one]); > } > > echo $contents; > fclose($fh); > > ?> > > Thanks for your help. > > Alice > > _ > Hotmail: Trusted email with Microsoft’s powerful SPAM protection. > http://clk.atdmt.com/GBL/go/196390706/direct/01/ You're reading the SVG contents into $contents, and also into $lines2 as an array. You seem to be making changes to the array version on a line by line basis, but then you output $contents, which is the original contents of the SVG file! You need to output the elements of $lines2, either one-by-one, or concatenate the array into a string and output that. Also, as a bit of advice, I'd try to make your variable names a bit more descriptive than $lines2, $line2, etc. Trying to read through the code and remember what variable does what could be a massive headache later on! Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Open source project management tool - PHP
Angelo Zanetti wrote: Thanks all, for the responses and advice. After much research and trying out we decided to go with: http://www.fengoffice.com/ its PHP based and also uses the EXTJS library. Its got quite a lot of features (calendar, tasks, email, notes, documents, reporting) etc... with a great AJAX interface and good functionality. I'm using it within a government context and they're really enjoying it. I had a to make a few coding adjustments to facilitate a language switcher between English and French as is normal in a Canadian context. Additionally, due to the lack of folder hierarchy for documents (they rely on the tagging system which is inefficient for our document management) we are abusing the workspace system to provide the folder hierarchy. This necessitated a hack to prevent the aggregated view of all documents within sub-workspaces at parent workspace levels. If you're using 1.5 btw, you should update to 1.6 ASAP since it corrects some issues with inherited group permissions. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to POST JSON data via PHP?
I've used curl before to post "field" data to a server, but in this case, I actaully need to post JSON data. However, when I run this PHP script, I get nothing back. If I do this curl manually in Terminal, it works. I'm pretty sure the bug has something to do with CURLOPT_POSTFIELDS - - - I just don't know what the alternative is. Basically I need to post this data: {siteUrl:\"http://testurl.com\",siteRss:\"http://feeds.news.mysite.com/synfeeds/collect/6/rss.xml \",userName:\"testuser\",email:\"testemail\",siteName:\"testsitename \",loginId:\"testloginid\} to the url: http://dpdev-ld03.myservercom:8181/linkmethod/signup?f=json&c=signupcallback Any obvious mistakes below? $urltouse = "http://dpdev-ld03.myservercom:8181/linkmethod/signup?f=json&c=signupcallback "; $fields_string = '{siteUrl:\"http://testurl.com\",siteRss:\"http://feeds.news.mysite.com/synfeeds/collect/6/rss.xml \",userName:\"testuser\",email:\"testemail\",siteName:\"testsitename \",loginId:\"testloginid\}'; curl_setopt($ch,CURLOPT_URL,$urltouse); curl_setopt($ch,CURLOPT_POST,count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string); <-- shouldn't be postfields, but some other curl option I'm guessing $response = curl_exec($ch); curl_close($ch); echo $response; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to POST JSON data via PHP?
curl_setopt($ch,CURLOPT_POSTFIELDS,http_build_query(array("data"=>$fields_string))); Now on the server end $_POST['data'] will contain your json data. if you just pass the $fields_string it can be read in the server end too. $data = file_get_contents("php://input"); now $data will contain your json data. It completely depends on the server you are interacting with. If it needs json in a variable then pass it using http_build_query. Otherwise just pass json as you are doing right now. What you server expects? -- Shiplu Mokaddim My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] First time PHP user question
Hello List. I have been playing around with PHP, running a few tutorials and I came across an error message I could not resolve. The tutorial is Generating One Time URL's by Oreilly: http://www.oreillynet.com/pub/a/php/2002/12/05/one_time_URLs.html Basically the PHP code is supposed to read from a text file and write to a text file and serve a text file all located in the "tmp" directory of the server. However, I receive the error that the referenced files in the PHP code could not be found: "Warning: readfile(/tmp/secret_file.txt) [function.readfile]: failed to open stream: No such file or directory in/home/mysite/myfolder/ get_file.php on line 67" Line 66 and 67 look like this: $secretfile = "/tmp/secret_file.txt"; readfile($secretfile); However, in the tmp folder, I have created a simple text file called "secret_file.txt" so I know it exists and it has the permissions set to 644, so it should be readable. Can someone point out to me what I am doing wrong? Thanks, --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP programming strategy; lots of little include files, or a few big ones?
I have a flexible program, which can do many different things according to the type of data it is fed. Ideally the flexibility is achieved by calling different functions, though when the functionality is ill-defined I sometimes just include blocks of code. Ideally, from the point of program maintenance, each module should not be too long -- preferably just a page or so. This doesn't raise problems in a compiled language, but in an interpreted language like PHP the programmer must decide whether to lump a whole lot of functions into a single large include file, or to include lots of little files as the particular functions are needed. The first case can lead to memory bloat, as there are likely to be a lot of unused functions in memory on any given pass, whereas the second case may require lots of little files to be loaded. Are there likely to be significant performance costs for either approach, and what are your feelings about the relative virtues of the two approaches? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP programming strategy; lots of little include files, or a few big ones?
clanc...@cybec.com.au wrote: I have a flexible program, which can do many different things according to the type of data it is fed. Ideally the flexibility is achieved by calling different functions, though when the functionality is ill-defined I sometimes just include blocks of code. Ideally, from the point of program maintenance, each module should not be too long -- preferably just a page or so. This doesn't raise problems in a compiled language, but in an interpreted language like PHP the programmer must decide whether to lump a whole lot of functions into a single large include file, or to include lots of little files as the particular functions are needed. The first case can lead to memory bloat, as there are likely to be a lot of unused functions in memory on any given pass, whereas the second case may require lots of little files to be loaded. Are there likely to be significant performance costs for either approach, and what are your feelings about the relative virtues of the two approaches? Use a bytecode cache and stop worrying. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP programming strategy; lots of little include files, or a few big ones?
On 1/6/2010 7:18 PM, clanc...@cybec.com.au wrote: I have a flexible program, which can do many different things according to the type of data it is fed. Ideally the flexibility is achieved by calling different functions, though when the functionality is ill-defined I sometimes just include blocks of code. Ideally, from the point of program maintenance, each module should not be too long -- preferably just a page or so. This doesn't raise problems in a compiled language, but in an interpreted language like PHP the programmer must decide whether to lump a whole lot of functions into a single large include file, or to include lots of little files as the particular functions are needed. The first case can lead to memory bloat, as there are likely to be a lot of unused functions in memory on any given pass, whereas the second case may require lots of little files to be loaded. Are there likely to be significant performance costs for either approach, and what are your feelings about the relative virtues of the two approaches? It is highly unlikely you are going to create any significant "memory bloat". Your code will likely be infinitesimal compared PHP's memory requirement. I suggest 3 files, one with your configuration settings, so they are all in one place and easy to find and change, another file with your functions and the third file contains the code for handling the internet interface. Obviously, the interface file controls everything by calling various functions as needed. Al... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SVG and PHP
Hi, Just went online and saw an SVG generated from Python, and wanted to do the similar thing by loading the SVG into an PHP script. Here is the script that I have: The problem is that my screen appears as blank even though I could open up USA_Counties_with_FIPS_and_names.svg and see the entire US Map. Does anyone know what I might have done wrong here? Thanks in advance. Alice _ Hotmail: Trusted email with Microsofts powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141664/direct/01/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SVG and PHP
Hi, Just went online and saw an SVG generated from Python, and wanted to do the similar thing by loading the SVG into an PHP script. Here is the script that I have: The problem is that my screen appears as blank even though I could open up USA_Counties_with_FIPS_and_names.svg and see the entire US Map. Does anyone know what I might have done wrong here? Thanks in advance. Alice _ Hotmail: Trusted email with Microsofts powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141664/direct/01/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SVG and PHP
Hi, Just went online and saw an SVG generated from Python, and wanted to do the similar thing by loading the SVG into an PHP script. Here is the script that I have: The problem is that my screen appears as blank even though I could open up USA_Counties_with_FIPS_and_names.svg and see the entire US Map. Does anyone know what I might have done wrong here? Thanks in advance. Alice _ Hotmail: Trusted email with Microsofts powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141664/direct/01/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working
I move a number of sites from one server to another and one the one server we had php4 and now we have php5 and since then my server seems to hang every time there is a header, location redirect. Anyone have any ideas on how to resolve this? Is there something I can easily change in the php.ini file that will resolve this issue? Thanks ~V
RE: [PHP] Re: PHP programming strategy; lots of little include files, or a few big ones?
> -Original Message- > From: Al [mailto:n...@ridersite.org] > Sent: Wednesday, January 06, 2010 5:09 PM > To: php-general@lists.php.net > Subject: [PHP] Re: PHP programming strategy; lots of little > include files, or a few big ones? > > > > On 1/6/2010 7:18 PM, clanc...@cybec.com.au wrote: > > I have a flexible program, which can do many different > things according to the type of > > data it is fed. Ideally the flexibility is achieved by > calling different functions, > > though when the functionality is ill-defined I sometimes > just include blocks of code. > > > > Ideally, from the point of program maintenance, each module > should not be too long -- > > preferably just a page or so. This doesn't raise problems > in a compiled language, but in > > an interpreted language like PHP the programmer must decide > whether to lump a whole lot of > > functions into a single large include file, or to include > lots of little files as the > > particular functions are needed. > > > > The first case can lead to memory bloat, as there are > likely to be a lot of unused > > functions in memory on any given pass, whereas the second > case may require lots of little > > files to be loaded. > > > > Are there likely to be significant performance costs for > either approach, and what are > > your feelings about the relative virtues of the two approaches? I think it's a case by case basis. Generally File I/O is expensive, but then again, as you say, having everything in a couple files is also sub-optimal for organizing and keeping things modular. I suggest you go with smaller files that are organized into logical 'chunks'. For example, functions that are used frequently are grouped into a common.inc.php rather than by topic (such as file/date/xml/forms/etc). And then use topical includes for the rest. More importantly, I suggest you get a good caching system like memecached or any of the others out there. Then you can pre-compile and load these files and the whole point becomes close to moot. ÐÆ5ÏÐ http://daevid.com "Some people, when confronted with a problem, think 'I know, I'll use XML.'" Now they have two problems. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP programming strategy; lots of little include files, or a few big ones?
Daevid Vincent wrote: > > >> -Original Message- >> From: Al [mailto:n...@ridersite.org] >> Sent: Wednesday, January 06, 2010 5:09 PM >> To: php-general@lists.php.net >> Subject: [PHP] Re: PHP programming strategy; lots of little >> include files, or a few big ones? >> >> >> >> On 1/6/2010 7:18 PM, clanc...@cybec.com.au wrote: >>> I have a flexible program, which can do many different >> things according to the type of >>> data it is fed. Ideally the flexibility is achieved by >> calling different functions, >>> though when the functionality is ill-defined I sometimes >> just include blocks of code. >>> Ideally, from the point of program maintenance, each module >> should not be too long -- >>> preferably just a page or so. This doesn't raise problems >> in a compiled language, but in >>> an interpreted language like PHP the programmer must decide >> whether to lump a whole lot of >>> functions into a single large include file, or to include >> lots of little files as the >>> particular functions are needed. >>> >>> The first case can lead to memory bloat, as there are >> likely to be a lot of unused >>> functions in memory on any given pass, whereas the second >> case may require lots of little >>> files to be loaded. >>> >>> Are there likely to be significant performance costs for >> either approach, and what are >>> your feelings about the relative virtues of the two approaches? > > I think it's a case by case basis. Generally File I/O is expensive, but > then again, as you say, having everything in a couple files is also > sub-optimal for organizing and keeping things modular. > > I suggest you go with smaller files that are organized into logical > 'chunks'. For example, functions that are used frequently are grouped into > a common.inc.php rather than by topic (such as file/date/xml/forms/etc). > And then use topical includes for the rest. > > More importantly, I suggest you get a good caching system like memecached > or any of the others out there. Then you can pre-compile and load these > files and the whole point becomes close to moot. > > ÐÆ5ÏÐ > http://daevid.com > > "Some people, when confronted with a problem, think 'I know, I'll use > XML.'" > Now they have two problems. > > I had a similar issue but with classes (not functions). I opted to keep my classes short and succinct, rather than shoving all the method functionality into one all-purpose class. Instead of blindly loading all the little classes on each http request, I used (and was recommended on this list to use) __autoload(). The script would only load my classes if the individual request needed it. This helped to avoid the memory bloat. I've heard magic functions like __autoload are a bit slower, but the code is so much cleaner b/c of it. Also, an opcode cache as suggested previously would facilitate the rapid include of many small files. Unfortunately, php does not offer an __autoload() type function to autoload functions. If you are able to encapsulate your functions functionality into classes you may be able to use the above solution of using an opcode cache to help __autoload() a bunch of small classes. hth, dK ` -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP programming strategy; lots of little include files, or a few big ones?
Daniel Kolbo wrote: Daevid Vincent wrote: -Original Message- From: Al [mailto:n...@ridersite.org] Sent: Wednesday, January 06, 2010 5:09 PM To: php-general@lists.php.net Subject: [PHP] Re: PHP programming strategy; lots of little include files, or a few big ones? On 1/6/2010 7:18 PM, clanc...@cybec.com.au wrote: I have a flexible program, which can do many different things according to the type of data it is fed. Ideally the flexibility is achieved by calling different functions, though when the functionality is ill-defined I sometimes just include blocks of code. Ideally, from the point of program maintenance, each module should not be too long -- preferably just a page or so. This doesn't raise problems in a compiled language, but in an interpreted language like PHP the programmer must decide whether to lump a whole lot of functions into a single large include file, or to include lots of little files as the particular functions are needed. The first case can lead to memory bloat, as there are likely to be a lot of unused functions in memory on any given pass, whereas the second case may require lots of little files to be loaded. Are there likely to be significant performance costs for either approach, and what are your feelings about the relative virtues of the two approaches? I think it's a case by case basis. Generally File I/O is expensive, but then again, as you say, having everything in a couple files is also sub-optimal for organizing and keeping things modular. I suggest you go with smaller files that are organized into logical 'chunks'. For example, functions that are used frequently are grouped into a common.inc.php rather than by topic (such as file/date/xml/forms/etc). And then use topical includes for the rest. More importantly, I suggest you get a good caching system like memecached or any of the others out there. Then you can pre-compile and load these files and the whole point becomes close to moot. ÐÆ5ÏÐ http://daevid.com "Some people, when confronted with a problem, think 'I know, I'll use XML.'" Now they have two problems. I had a similar issue but with classes (not functions). I opted to keep my classes short and succinct, rather than shoving all the method functionality into one all-purpose class. Instead of blindly loading all the little classes on each http request, I used (and was recommended on this list to use) __autoload(). The script would only load my classes if the individual request needed it. This helped to avoid the memory bloat. I've heard magic functions like __autoload are a bit slower, but the code is so much cleaner b/c of it. Also, an opcode cache as suggested previously would facilitate the rapid include of many small files. They'll mostly likely already be loaded and compiled in memory. The filesystem probably won't even get hit. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Site Moved From PHP4 to PHP5 Server - header, location no longer working
On Thu, Jan 7, 2010 at 1:35 PM, Vernon Webb wrote: > I move a number of sites from one server to another and one the one server we > had php4 and now we have php5 and since then my server seems to hang every > time there is a header, location redirect. Anyone have any ideas on how to > resolve this? Is there something I can easily change in the php.ini file that > will resolve this issue? Off the top of my head it sounds like something is being output before the header, which causes an error. If you also have error display turned off, you will likely just see a white screen with no useful information. Make sure none of your includes have trailing whitespace or are trying to print out information before the header itself. Best bet is to turn on errors and log them, then you will see where the output started if infact that is your issue. Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Resin/Quercus
Hi, I wonder if anyone has experience with running PHP on the Resin server. Opinions, good, bad? Gotchas? Similar projects? http://www.caucho.com/projects/resin/ Thanks, Mattias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php