Re: [PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik
Jan Ehrhardt wrote: Could you try to add a function_exists check to libs/upgradephp/upgrade.php? This at the function declaration of _json_encode: if (!function_exists('_json_encode')) { function _json_encode($var, ... And a extra } at the end. This patch, together with upgrading to the latest OPcache from github solved my segfaults and fatal errors. Jan - could you post the solution on http://dev.piwik.org/trac/ticket/4093 - better that you get the credit than one of us pinch it ;) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik
Grant wrote: I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the opcache is disabled. Someone filed a piwik bug but was told it's a php bug: http://dev.piwik.org/trac/ticket/4093 Is this a known issue? I'm running my own port of piwik in production with eaccelerator on 5.4 but I've made the decision not to move any of the machines to 5.5 until all of the legacy 5.2 machines have been brought up to 5.4. Not an answer, but explains perhaps why the problem is not being seen by others. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Alternate list for eclipse ide support?
With composer being pushed as the 'in way to go' and not being able to see how to get some code relating to bootstrap and smarty development because the links only show composer I've downloaded a plug-in for eclipse that is supposed to handle that. But it's not working as I expect, and while heading over to the plug-ins developers is the obvious step, what I'd actually prefer is a more general PHP/Eclipse list to discuss general IDE problems rather than even PDT biased discussions. Is there a suitable list? And if not is there any interest in setting one up? ... at the risk of proliferating even more lists ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alternate list for eclipse ide support?
Sebastian Krebs wrote: With composer being pushed as the 'in way to go' and not being able to see how to get some code relating to bootstrap and smarty development because the links only show composer I've downloaded a plug-in for eclipse that is supposed to handle that. But it's not working as I expect, and while heading over to the plug-ins developers is the obvious step, what I'd actually prefer is a more general PHP/Eclipse list to discuss general IDE problems rather than even PDT biased discussions. Is there a suitable list? And if not is there any interest in setting one up? ... at the risk of proliferating even more lists ... I for myself switched over to PhpStorm from Eclipse/PDT and I fear meany hear use either PhpStorm, or Netbeans in the meantime. I'm not saying, that nobody is using Eclipse/PDT anymore, but I fear you wont find much interest here. I'm still on PHPEclipse for PHP. PDT just does not work for me, and neither did Netbeans for some of the other languages I have to live with, which is why PHPStorm is no use either. I need python in addition to C/C++ with document handling, and firebird which don't get any support from either so Eclipse is really my only option. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alternate list for eclipse ide support?
Sebastian Krebs wrote: However, my last mail wasn't about telling you, that your IDE is bad. But I have the feeling, that this audience may be simply not interested. I'm only using Java in order to make tweaks to PHPEclipse and and other support packages. ( and the same with python ). We could do with more support in these areas, and comments like yours don't help, but there IS enough interest from users dissatisfied with the alternatives ... The problem is that there are perhaps too many options and combining the activities of a few would create a more popular common base? The vast number of different 'frameworks' add further to the dilution of effort. It's a pity that there is not a single universally accepted development base in addition to a single IDE into which support could be pooled. It's not going to happen as PHP now has too many diverse ways of doing the same thing? :( -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Off the wall - sub-domain question
Jim Giner wrote: Yes - the sub is an add-on domain to my primary domain. Hence the overlap and problem. I don't think there is any way to get google to separate filing information on different subdomains from the main domain, but you can stop them filing content altogether by identifying folders you do not want them to use. I have fun with them indexing the page histories if I forget to block that particular functions .php file. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
Sebastian Krebs wrote: 1. He's not my teacher -- he is a fellow teacher AND a smart one! He knows the difference between Java and JavaScript. OKOK, sorry -_- But @topic: For example see http://w3techs.com/technologies/overview/programming_language/all Really: Java is a good and mature language, but it is not a web-language. 2. In life, you will find that popularity (often over which is best) is the main reason why things prosper. I think he is simply wrong in his interpretation of the facts. The number of websites powered by PHP vastly exceeds Java and every other language http://w3techs.com/technologies/overview/programming_language/all Says it all! But you would never use PHP for a distributed application, and then http://www.langpop.com/ comes into play when the fight is between Java and C/C++ and personally I'm happier with C/C++ than Java even on Android. But even though you would not use PHP for distributed applications, it still gets a good 4th in that chart as well. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
shiplu wrote: During PHPvsPython search I found this info graphic https://www.udemy.com/blog/modern-language-wars/#. Some of the statistics contain Java too. Also you can search PHP and Web Development in big job sites and compare with same search but with Java. 'Python is arguably the most readable programming language' probably says it all? Personally I find it almost impossible to understand when coming in cold to someone elses code ... Java is not much better ... but I still have to persist with both since some key elements of a usable PHP IDE now rely on both :( -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs JAVA
Tedd Sperling wrote: I'm just trying to get documentation to back up my what I think I know. http://en.wikipedia.org/wiki/Programming_languages_used_in_most_popular_websites may be a better starting point, but there are no citations to the facts, they are a little dated, and some sites are a little biased in their choices? Move to the top 40 sites and PHP fares a little better - http://rogchap.com/2011/09/06/top-40-website-programming-languages/ but but this data is a little dataed now. Personally I've always used the W3techs figures when I'm doing talks as it is the only consistent source I've found. The netcraft figures would be nice but they only run this intermittently, and last January's figure of 244 million sites at 39% of machines seems a little at odds with the W3techs ones? http://w3techs.com/technologies/history_overview/programming_language continues to show PHP rising at the expense of ASP and Java with Perl, Ruby and Python having trouble to stay above 1% combined over the last year. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how old is this version of PHP?
Larry Garfield wrote: 5.2.9 was released in February of 2009. 5.2 is completely retired and out of support. 5.3 is on security-only life-support. 5.4 is the legacy stable release. Yes, 5.2.9 IS that old. :-) Really, get a host that has made it into this decade. (GoDaddy apparently doesn't meet that qualification.) You're doing clients a disservice by allowing them to run such an ancient and unsupported version. While the statements are correct, many users are not in a position to move from their currently working systems to even 5.3 let alone 5.4. There is still a lot of legacy code that unless a few more people step up and help bring it forward for the many - non programming - users who are stuck with legacy applications, they will remain requiring 5.2 to run. ISPs got caught out when they arbitrarily moved accounts forward, and GoDaddy have even been caught by that, so maintaining a LTS version of PHP5.2 is the lesser evil ... Windows 2000 is supposed to be dead, but *I* still have sites reliant on it because the code and hardware is unsupported in even XP. Saying something is dead only works if there is an affordable way of moving forward ;) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how old is this version of PHP?
Sebastian Krebs wrote: Do we just accept that we have to rewrite every program we ever wrote every time a new version comes out? A little extreme, but you get my point. Comments? Suggestions? My 2 cent: I hadn't any major issues with BC since 5.3 and from 5.2 it required a little bit to do, but was solveable (means: It wasn't complicated, but only an afternoon time to invest). Caine complaints from time to time his codebase here. That is nothing new and I am unsure how representative his statements are. My 'problem' came about through taking over a couple of small hosting companies who had sites across several ISP's and various versions of PHP ( and ASP thrown in for good measure ). Every site required a day or so's work to tidy up, and little problems thrown in like the ?= cock-up which took down 5 sites when that ISP 'upgraded' PHP to the problem version. But the main problem still is making things E_STRICT compliant since PHP5.4 tends to be set up with it enabled and PHP5.3 will be fazed out on ISP's at some point. I'm slowly moving sites to servers where I do have control of the framework, but 'just an afternoons work' across a large number of sites and fire fighting when sites go down without prior warning all takes time ... I can't really complain, I've been picking up customers who's sites have been affected and earning money from them :) I have to say no to a lot though as there are only so many hours in a day. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mysqli Extension
Matijn Woudt wrote: apt-get install php5-mysql Just to elaborate on that ... php5-common and php5-cli does not include a number of modules that need to be loaded separately. Choosing one of the database modules is not the only thing that may need to be added to your list of additional installations. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 'buffer sizes' ?
I'm not quite sure what is causing an effect I am seeing. I've two machines set up with Apache2.4 and PHP5.4.15 and I'm trying to debug owncloud as it has problems with Apache2.4. This autoloader and routing 'fun' seems totally over the top, and is failing without giving any errors, but the question is what limits the amount of text displayed using print_r() ? Where I drop in a print statement causes crashes, but when working I'm not getting a complete printout. One machine is clipping at around 4500 characters, while the other is managing around 9000, and neither is displaying the 'TAG' labels after that block. It's not something I've seen before ... I've been using this method for many years and normally see all the text. So can anybody throw light on why this may be happening now? Interestingly the two machines are giving different problems with this application which works correctly on Apache 2.2 DON'T answer suggesting continuing to use 2.2 ... at some point 2.4 has to be fixed! -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What the hell is Begacom?
Ashley Sheridan wrote: And why everytime I reply to the list am I getting an automated reply from this email address Belgacom Webteam [no-reply]supp...@skynet.be Because of the way the list is set up ... We all get every bounce message as a result of posting to PHP lists since WE are set as the reply-to address. This apparently is the right way of doing email lists ;) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] suhosin and 5.4 onwards
Nick Edwards wrote: So, is the general opinion here, from actual factual experience and not because you read the same trashy bloggers as I did, in agreeance? is it genuinely true that suhosin is now irrelevant with 5.4 upwards and php is now much safer on its own? Practical experience is that suhosin does not actually work with 5.4? I've had to disable it because of problems with session handling amongst other things and don't have time to investigate why. Would I prefer to re-enable it - YES - and it's one of a number of reasons that have been making switching currently stable PHP5.2 servers over to 5.4 less attractive. The amount of time I'm wasting on coping with many of the so called improvements across the whole Linux platform is making me feel that commercial interests are actually in control rather than users/developers? Staying with stable platforms that we are comfortable with is just not practical :( -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Fwd: Hmmm.. I think I need your advice here to get in correct direction...
Karl-Arne Gjersøyen wrote: // start the table $total = 0; echo table border=1; echo trthProduct/thth**Amount/th/tr; // loop thru each item found while ($results = $qrslts-fetch(PDO::FETCH_**ASSOC)) { echo trtd.$results['product_**name']./tdtd.$results['** product_amt']./td/tr; $total += $results['product_amt'] } echo trtdTotal:/tdtd.$total./td/tr; // finish the table html echo /table; Yes that part is OK. I do have problem to add total weight and package at bottom of the table like this: Product_one 40kg Product_two 60kg - Total: 100kg === -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] phpdocumentor with PHP5.4
Anybody have phpdocumentor running with PHP5.4? I'm convinced that the errors my copy is throwing are due to e_strict, but I've confirmed that I have the right ini file ( all the needed extensions load ) and I'm getting error_reporting showing 22527 with e_strict off and 24575 with e_strict on - so at least it is changing the setting? Once again I'm wasting hours getting something which I have had running fine on the older servers to actually work in a new setup. In this case phpdocumentor seems to suggesting *IT* needs PHP5.3 but the main script also switched e_strict off anyway, so 5.4 should work as well? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] phpdocumentor with PHP5.4
Sebastian Krebs wrote: I meant: PhpDocumentor 2 Problem solved ... Notes on https://github.com/phpDocumentor/phpDocumentor2 need a little update to correct the installation notes to use the beta builds rather than alpha ones. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strlen ?
Jim Giner wrote: And the answer is - yes, there is a LF char at the end of my data in my whole table. Now the question is - how the heck did I put that in there? Certainly not intentionally. The data is captured from a d/e screen I wrote and it simply grabs the post value and inserts a new record with that value along with some other values. And I don't see anything concatenating a LF to my string. The obvious question that comes to mind is 'What OS'? Having seen this sort of niggle many times I tend to find it relates to something working 'cross-os' a bit like windows ignoring case in file name and linux then complaining it can't find a file. It's probably worth checking the sting length back through your code just to confirm what added it? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strlen ?
Jim Giner wrote: It's probably worth checking the sting length back through your code just to confirm what added it? The best I can figure is that I did a preload of many of the names from a csv file. Apparently when I do that it stores the LF at the end of the csv line. Have to remember that the next time. AH - I use that to flag the end of line when I pulled the data apart - so it gets stripped ;) Then I found fgetcsv() which replaced the manual code and gave just the data as an array. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web dev, DB and proper db design.
Tony Marston wrote: I was designing and building database applications before relational databases became popular, and in those old hierarchical and network databases there were no such things as foreign key constraints. Database integrity had to be handled in the code, which is what we did. When I started working with relational databases there were features of the language, such as FK constraints, which were rarely used even though they were there. When I started working on web applications the predominant database was MySQL, and the vast majority of ISPs would only offer MyISAM and not Innodb, and MyISAM does not support FK constraints. This was my point about MySQL ... what database were you using before MySQL came along? There are some programmers who complain that without foreign keys being defined in the database, how do you recognise relationships to build into SELECT statements? Simple. Every primary key is in the format ‘tablename_id’, so if you see this format in a table, and tablename is a different table, then it’s a foreign key. This is actually easier to identify than having to look in a separate place. Remember that there is a difference between a foreign key and a foreign key constraint. Foreign keys can exist without constraints, so saying that you cannot use a field as a foreign key in a SELECT statement without having a constraint defined in the database is just plain wrong. Certainly in some instances then managing everything in code makes sense. Cross database working for instance. So everything works the same for each engine. But the main advantage of adding constraints in the database is that it protects the foreign entries from being deleted while they are still in use. One of the problems I end up having to recover is where a hickup in the PHP or user side of things has deleted an entry, or more usually the whole table! In this case a properly implemented constraint would have prevented the problem. While using a constraint to manage the deletion of detail elements has a place in reducing traffic between program and datbase, the protection of detail elements is the more useful reason for maintaining them. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web dev, DB and proper db design.
Tony Marston wrote: Certainly in some instances then managing everything in code makes sense. Cross database working for instance. So everything works the same for each engine. But the main advantage of adding constraints in the database is that it protects the foreign entries from being deleted while they are still in use. One of the problems I end up having to recover is where a hickup in the PHP or user side of things has deleted an entry, or more usually the whole table! In this case a properly implemented constraint would have prevented the problem. While using a constraint to manage the deletion of detail elements has a place in reducing traffic between program and database, the protection of detail elements is the more useful reason for maintaining them. In my framework I define relationships and any constraints in my data dictionary, and these are enforced by a standard module in the framework. This means that any RESTRICTED constraints can be detected in the code without executing a DELETE and having it abort. My own database management framework pre-dates PHP switching from dBase originally, to Interbase and then Firebird as it was open sourced (just as we had paid for a large number of Interbase licenses :( ). So I've grown up using the tools in the database, but have to back pedal some of the time where a cross database solution is required. I'm much more comfortable with getting the database to manage things and will often drop triggers in rather than coding that in PHP. So proper db designis probably still geared around what we are used to rather than any had and fast rules? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web dev, DB and proper db design.
Richard Quadling wrote: Is there a difference in those in 'startups' and web only situations, or those doing more traditional development (split that as you like - I'm just trying to get an understanding and not go off on one!). Depends if you consider MySQL is any use as a real database :) Building the constraints and many other core database features into the code was essential before MySQL had many of the features that real databases have had from the start ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Doing something wrong?
David Robley wrote: Did you make clean after reconfiguring before re-compiling php? According tohttps://bugs.php.net/bug.php?id=63611 that may be a cause. That was the kick - Thanks ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Doing something wrong?
I've got a new machine set up with SUSE12.3 but while it has PHP5.4, Apache is still stuck at 2.2, so I've downloaded and built 2.4.4 and PHP5.4.15 along with the modules I need but I'm having trouble actually getting it to load the 'Additional' .ini files. phpinfo is showing the change of location of the php.ini file, but nothing for the 'Scan this dir for additional .ini files' while the Configure shows '--with-config-file-scan-dir=/opt/apache2/conf/php5.d' What am I missing? It's working on the other machines and loading all the extra modules happily. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Saving session to database
Matijn Woudt wrote: It seems to me the session functions are failing, probably due to problems with the database. Have you checked that there actually is a ##session table in your database? You might want to add some debugging code to these functions, to check if errors occur with inserting or retrieving the sessions from the database. Well past that stage without making any progress. Using the write function outside of the session_set_save_handler() it works perfectly, and then the read can see the saved sessions and can load them. I am convinced that something is wrong with the general setup which is preventing the write and close from firing when it should. I can not trace any attempt to call the write function in the session handling. I'm currently checking out the adodb-session handler which WAS working in PHP5.3 but seems to be showing similar problems in PHP5.4 -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Saving session to database
Andrew Ballard wrote: I've found database session storage requires extra diligence in error handling. When I see that error at 0 it is usually because something blew up either before the session handler was ready or after it was torn down. Found the culprit ... Suhosin http://www.simplemachines.org/community/index.php?topic=486606.0 gives the pointer but I've not followed through on an updated version. This is a stock SUSE install and I don't want to manually 'fix' it so I've just disabled Suhosin. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Saving session to database
I'm having a problem with webtrees ... http://webtrees.net/ My copy is running on http://webtrees.lsces.org.uk and you will see that it is throwing an error relating to the session handling. Running Apache 2.2.22, PHP5.4.14, MySQL 5.5.31 ( http://lsces.org.uk/phpinfo.php ) If I comment out the session_set_save_handler() section of session.php then I can log in and use the site. Have tried reworking that as a SessionHandlerInterface without any success. As far as I can see, the 'write' function of the handler is not being called and while there are various notes about problems with PHP5.4 blocking access to the write and close functions, none of the fixes I have tried have resulted in a working setup. Anybody seen this problem with PHP5.4? http://lsces.org.uk/hg/webtrees/file/dcf6ff358108/includes/session.php#l334 is the code that seems to be failing. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Saving session to database
Matijn Woudt wrote: On Thu, May 16, 2013 at 10:43 AM, Lester Caine les...@lsces.co.uk mailto:les...@lsces.co.uk wrote: I'm having a problem with webtrees ... http://webtrees.net/ My copy is running on http://webtrees.lsces.org.uk and you will see that it is throwing an error relating to the session handling. Running Apache 2.2.22, PHP5.4.14, MySQL 5.5.31 ( http://lsces.org.uk/phpinfo.__php http://lsces.org.uk/phpinfo.php ) If I comment out the session_set_save_handler() section of session.php then I can log in and use the site. Have tried reworking that as a SessionHandlerInterface without any success. As far as I can see, the 'write' function of the handler is not being called and while there are various notes about problems with PHP5.4 blocking access to the write and close functions, none of the fixes I have tried have resulted in a working setup. Anybody seen this problem with PHP5.4? http://lsces.org.uk/hg/__webtrees/file/dcf6ff358108/__includes/session.php#l334 http://lsces.org.uk/hg/webtrees/file/dcf6ff358108/includes/session.php#l334 is the code that seems to be failing. What error do you get? I tried loading the site but it shows up fine. In general, you should post the error message in your email anyway, for two reasons: 1) Most people on this list don't bother to open a (terrible slow) website. 2) Archives, so if anyone after you comes up with the same problem, he will be able to refer to the archives to find his solution. Been working on this most of the morning without success :( Faulty version is back up, and showing all the error messages, but basically ... ERROR 2: session_regenerate_id(): Session object destruction failed 0 Error occurred on in function session_regenerate_id But I think it's the initial session write that is failing ERROR 2: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/lib/php5) 0 Error occurred on in function session_write_close But it should be writing to the database not the file directory. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ?=$var?
Larry Martell wrote: Continuing in my effort to port an app from PHP version 5.1.6 to 5.3.3, the app uses this construct all over the place when building links: ?=$var? I never could find any documentation for this, but I assumed it was some conditional thing - use $var if it's defined, otherwise use nothing. In 5.1.6 it seems to do just that. But in 5.3.3 I'm not getting the value of $var even when it is defined. Has this construct been deprecated? Is there now some other way to achieve this? There WAS a period when ?= was linked to short opening tag setting, which cause a number of headaches, but currently the two are now isolated! -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] timezone
Larry Martell wrote: No, I don't - this app runs in different locations all over the world. I found some code at php.net that does this: date_default_timezone_set(@date_default_timezone_get()); $deftz = date('T'); And that is working for me and giving me what I need. But do you ACTUALLY know what time zone is stored IN the database? What if te database was from another server? One of the 'standards' adopted when working world wide is to ensure what is stored IN the database is always UTC based. So you can always compare times on the same consistent base. The only time you need the offset is to display a local time, and that is either the time local to the server, or the time local to the client. The 'default' timezone is not necessarily the right one in either case ;) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] {SOLVED] mysqli nested queries - maybe I'm rusty...
Jay Blanchard wrote: [snip] ...stuff... [/snip] I rewrote everything so that I could get the data in a single query and then performed some manipulation with PHP to get the proper output. No need to call multiple queries in this case, just had to sleep on it. In Firebird, CTE queries are great for this type of problem. Just having a single result set and formatting the results based on a 'level' field makes things very flexible and you just stream the one set of results. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] target question
Jim Giner wrote: Thanks for the pointer - but not what I'm looking to do. Trying to make it effortless for the user so having to go and open a pdf would be another pia. Actually it IS worth pointing out that how the browser handles a pdf file is very much controlled by the browser itself? Opening in a browser page only works if there is a suitable plugin, so what *I* get is the option to save file or open in a third party app as I don't currently have any plugins loaded for pdf. We use pdf's for agendas and minutes, but I have yet to find a reliable way to display them as a pop-up or opening in a separate page even using 'target'. The compromise I came up with is to open them in a flash player as in http://northwaypc.org.uk/fisheye/image/1030 -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] target question
Matijn Woudt wrote: I don't see what the problem is with showing a pdf in a pop up or new tab/window, it should work just as any other. Can u perhaps show us a simple code that does not work? (under 50 lines of code, if possible). There is no problem getting it to appear as a pop-up or in a new tab. The problem is that you have no idea exactly how the browser IS displaying it to a user. I quite agree that flash now needs replacing but 5 years ago it was a workable solution. Replacing that with another viewer would be nice nowadays,but there is nothing suitable? The point here was to allow the pdf to be wrapped with other links, and managing selection of things such as filtering terms for a report which is then output as a pdf makes sense. The report can also be printed if required, something which is not practical directly from an html page. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PDO Transaction
Simon Dániel wrote: 2013/3/15 Lester Caine les...@lsces.co.uk Simon Dániel wrote: Hi, I have a trouble with PDO transactions. I would like to start using transactions, but I am not familiar with it. I have got a 'There is no active transaction' exception, however, I am using beginTransaction method, and also I have set PDO::ATTR_AUTOCOMMIT to false right after connecting to the database. In my whole code I have used the commit method only once. Between beginTransaction and commit methods, as far as I know, I did not use anything that could activate auto-commit. In my test code, there is only an exec method of PDO, and an execute of PDOStatement. Maybe one of these activated auto-commit? And what are the possible commands which are able to activate auto-commit? I know that the commit method can do that, but - as I already wrote - I have issued it only once, and it is in the destructor of a singleton class. So what could be the problem? You don't say which database you are trying to access. Not all actually support transactions, and some need a connection correctly set. I am using MySQL. Have you read the warning on http://php.net/manual/en/ref.pdo-mysql.php? It would be of more use if it actually identified what works and what does not :( I think you need to be running in the InnoDB engine to get transactions? MyISAM will throw errors on transactions. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Type of a variable in PHP
Karim Geiger wrote: Have two questions - 1. How to find type of a variable in PHP. 2. How to find the type of an array in PHP. Please help. Use this: http://php.net/manual/en/function.gettype.php BUT - bear in mind that the nice thing about PHP 'arrays' is that they are a not restricted to a single type. The elements of an array can be different types. It's more a 'basket' than a traditional array. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Undefined index....
Jay Blanchard wrote: I have inherited a mess of a home-grown PHP framework that literally fills the error_log with 100's of thousands of messages each day. First order of business was rotating the logs, now we are working through each error to solve them. This is a fairly basic error, but I for the life of me cannot remember what the solution is. I have a recursive function that reads from XML files and replaces xi: include directives. It looks like this - function includeXML($file, $locale, $url, $level = 1) { // stuff $xml = ''; Should work here ... Since the call below is ADDING to $xml you do need something existing to add to so what does that give? while(($line = fgets($fp)) !== false) { if($pos === false) { $xml .= $line; } else { includeXML('repository/' . $included, $locale, (int)$level + $pos - 1); } } } Why do I get the notice that $xml is an undefined index? I do not want to suppress the notice, I just want to take care of it properly. I attempted setting $xml within the function but then the whole function fails for some reason in the depths of this hideous framework. Can anyone provide any insight? TVMIA! -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PDO Transaction
Simon Dániel wrote: Hi, I have a trouble with PDO transactions. I would like to start using transactions, but I am not familiar with it. I have got a 'There is no active transaction' exception, however, I am using beginTransaction method, and also I have set PDO::ATTR_AUTOCOMMIT to false right after connecting to the database. In my whole code I have used the commit method only once. Between beginTransaction and commit methods, as far as I know, I did not use anything that could activate auto-commit. In my test code, there is only an exec method of PDO, and an execute of PDOStatement. Maybe one of these activated auto-commit? And what are the possible commands which are able to activate auto-commit? I know that the commit method can do that, but - as I already wrote - I have issued it only once, and it is in the destructor of a singleton class. So what could be the problem? You don't say which database you are trying to access. Not all actually support transactions, and some need a connection correctly set. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Holding datetimes in a DB.
Paul McGarry wrote: My heads trying to remember something I may or may not have known to start with. If I hold datetimes in a DB in UTC and can represent a date to a user based upon a user preference Timezone (not an offset, but a real timezone : Europe/Berlin, etc.) am I missing anything? Perhaps the best alternative is to store the data in the DB in a datatype that includes timezone, eg timestamp with timezone http://www.postgresql.org/docs/9.1/static/datatype-datetime.html That way you can let the DB take care of any conversions when you need it, ie you can insert using Europe/Berlin and then select using UTC (etc etc). If you are just quickly writing your app for one timezone you can have that as the 'default' but then if you want to expand later then all your data is already in the most useful format. The only clean way of doing any of this is NOT to bundle an offset in with the time. Simply because that offset has EXACTLY the same problem as the simplistic time offset provided by the browser. Can we move that meeting to the same time next week can result in an hours error? Even the current timezone abbreviations are not totally consistent, only a clean timezone/daylight saving will give the real time around a change in daylight saving! UTC is a constant, and a proper TZ/DS for the client location completes the picture. Running the underlying server on anything other than UTC simply doubles the chance of problems if there are four differences between the server and client time zones, but what is NEEDED is that the client browser returns a client timezone rather than a simple offset! -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Joining fixed text to a SUBJECT variable
Michael CALDER wrote: $Subject = RVRA Contact Form - ,$MessageSubject; Can anyone please advise or point me in the right direction for instructions on how to combine the fixed text with the variable $MessageSubject. The quick fix is simply $Subject = RVRA Contact Form - .$MessageSubject; but $Subject = RVRA Contact Form - ,$MessageSubject; should work, what is the error? ... you don't actually want the ',' $Subject = RVRA Contact Form - $MessageSubject; Should work as well -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Holding datetimes in a DB.
Richard Quadling wrote: My heads trying to remember something I may or may not have known to start with. If I hold datetimes in a DB in UTC and can represent a date to a user based upon a user preference Timezone (not an offset, but a real timezone : Europe/Berlin, etc.) am I missing anything? The simple answer is ... No Slightly more complex ... If you are displaying timed events in the future and need to support multiple time zones, then using the browser TZ setting is useless, you need to work with a daylight saving setting instead. The site 'default' can either be UTC or it can be a particular timezone, but what will not work reliably is to offset from the browser information. If all of your users are in the same timezone, then UTC without setting a timezone makes perfect sense and you even ignore even the daylight saving changes. Where the fun comes is where you are displaying times which straddle the daylight saving switches such as a train movement where the time you need to display jumps. In this case you have to use UTC for the movement, and display with the correct daylight saving offest. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] TURBOPY cloud framework + IDE beta available NOW
Johannes Reichardt wrote: And why PHP 5.2? Why not? With some tweaks it would work on PHP4 but for the sake of security it uses some filter_var methods that are 5.2 specific. And since 60% of the world is still stuck with ISP provided hosting on PHP5.2 or less it does 'widen the market' ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] TURBOPY cloud framework + IDE beta available NOW
Johannes Reichardt wrote: In times of testability and several design patters, the use of static calls is really outdated. I understand that you can read and write the invocations of the methods much faster, but you should think more to the future on that point. I am not sure if that is true for TURBOPY. It has been organically grown over the years and I had no scenario where I needed instances. The benefit of more compact code is worth it for this scenario I think. The nature of a server request is still very procedural. The/my problem with eval() comes from a security point of view. Yes that is true, if you enable the templating language it is not safe anymore. If you take care of that it is ok, but you have to know about it. Your points are interesting and they let me explain what TURBOPY is not: Just a framework like the ones you are used to. Its concepts differ a lot from other frameworks, like the idea of accessibiliy over convention for example. With TURBOPY I try to bring back more creativity in the developing process, allowing you to reach goals in less time. I've been in much the same mode with bitweaver for a number of years. We have reworked all the code so that it is 'clean' on PHP5.4 but many users ARE still tied to ISP's who having tried to move to PHP5.3 they have rolled back to 5.2 because so many sites simply stopped working! I've been trying to get at least some interest in working out what setup of PHP5.3 will continue to run existing 5.2 code without the problems ISP's are encountering, but in many cases their users are not 'code junkies' and just want things to work as they did. Changing things in PHP5.3 so they could be killed in 5.4 was somewhat short sighted so we are now in a situation where ISP's can't simply wipe out their customers sites so they are stuck supporting and unsupported version of PHP :( As long as PHP5.3 and 4 are installed WITHOUT using the default configurations, then one can get most legacy sites working fairly cleanly, but its the messages being created in the background that cause an extra load on ISP's and that need to be cleaned up again. The problem is that there is no pressing need to switch over since the old code IS working fine? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PDO
Silvio Siefke wrote: i found the mistake, i have forgetten write the new path for the sqlite database. Just been caught with a similar problem. Had moved a working site from windows to linux and it stopped serving up the swf files. Turns out the file has a hardcoded path with upper and lower case name, while the xml file was all lower case. Rename the folder with the right cases and it started working again :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Wrong time being displayed by PHP!
Daniel Brown wrote: This is the output: America/Los_Angeles Tue, 16 Oct 2012 17:22:09 -0400 Tue, 16 Oct 2012 21:22:09 + 1350422529 (-14400) Tue Oct 16 17:22:09 EDT 2012 Is this a shared server, Rich? As shown, the admin configured the timezone of the machine to be EDT and set the clock right, but php.ini must be set to PDT. You can easily override this with a local php.ini file, an .htaccess directive, or by placing date_default_timezone_set() near the top of the code. Managing 'time' is an ongoing problem simply because some of the essential tools are missing. While the browser only returns a current time offset rather than a time zone, one has no idea of a user's real local time? One of the preferred methods of working where a server is being accessed from several timezones is that the server should run at UTC and any data stored should then be UTC as well. Then we have problem when displaying for a time only using the browser information, since next month the time may be an hour different? So we have to work with some user supplied timezone which will also add the DST information. If you only want a single 'timezone' ever, then UTC still makes prefect sense since nothing will be changing the offsets, and you just say 'local' :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Eclipse plugins ...
I've just run up Eclipse-Juno on a machine a few days ago, and I thought I would try out PDT jut to see what the differences are to phpeclipse. The current problems with phpeclipse are that is falling behind on support for the new features, so gives phantom errors for things like 'static::' which obviously needs addressing, but if PDT was a suitable replacement then perhaps now is the time to move? Obviously PDT has a different way of doing some things and I'm slowly finding the 'PDT' way for bits that I use normally but has anybody done a crib sheet highlighting the differences? The only info coming up is translating projects rather than user guides, and google is throwing up a lot of inaccessible pages with phpeclipse on them :( phpeclipse.com seems to be down so perhaps it's time to move anyway, but I do prefer the way it does some of the type hinting back to the parent classes while PDT one has to navigate up to see that data :( -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP via PHP
Tom Rogers wrote: Did you see this:http://www.php.net/manual/en/book.snmp.php Once you know the answer, then the question is easy ... In order to use your link one has to know how SNMP works and understand things like 'object_id' ... http://www.jffnms.org/ turned up and is just what I was looking for and can see the devices and report what each is providing. I still need to get cacti to see those devices, but once one has SOMETHING working then things get a lot easier :) The question I should have been asking was php network monitoring system I still need to add monitoring of the domain list and that each domain is being correctly returned, but now I have something I can pull apart and play with and push my own parts back into. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMP via PHP
OK I've spent the last two hours going through pages of crap generated by google, and that includes google crap created by searches on sites like http://www.phpbuilder.com - cause mainly of cause by php pages on sites supporting other languages :( Certainly it seems that PHP is preferred even to website java and ruby ... I had some problems over the weekend with the network here and decided it was time to get some monitoring in place locally. cacti simply loaded up and I have working system, but now I'm having trouble getting SNMP sorted on the target machines. So I started looking for an editor to handle the MIB data and keep hitting one dead end after another. I'm sure there must be something out there using php-snmp for a browser? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP via PHP
Bastien wrote: Xenoss is a python solution with tons of monitoring capability. It's well worth a look If I wanted to move to python then I would not be asking here ;) I have enough of python on Hg and what I'm looking for here is PHP code that I can massage to do what I need ... I'm still working my way around this. cacti provides a nice monitoring layer and is PHP, but is not helping to set up SNMP on the client machines, so I'm looking for something that can help edit MIB files and also check the SNMP link to remote machines ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SNMP via PHP
Jonathan Sundquist wrote: There appears to be quite a few examples, https://www.google.com/search?q=php+snmp+example https://www.google.com/search?q=php+snmp+exampleaq=0oq=php+snmp+sugexp=chrome,mod=0sourceid=chromeie=UTF-8, and tutorials, https://www.google.com/search?q=php+snmp+example https://www.google.com/search?q=php+snmp+exampleaq=0oq=php+snmp, on google. Care to point out something there which is ACTUALLY usable? Many of the 'php examples' only have a connection to php because they are on .php hosted pages ... But it's not examples I'm looking for but something like http://sourceforge.net/projects/php-netanalyzer/ which is still coming up on many searches but not even available just to play with :( -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appreciation
David McGlone wrote: I feel good about this and what's even better, I killed 2 birds with 1 stone.. LOL Anyway, I just wanted to let everyone know I appreciated all the feedback.:-) One thing to remember David is there are normally 10 ways of doing something in PHP and the best one is always number 11 ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bounce messages
David McGlone wrote: And Yes tamouse ... it's having to replace a block of return addresses with just the list address to tidy things up. A long list of addresses can build up when everyone uses 'reply all' where as many other lists just need 'reply' so nowadays I only use reply - and hopefully remember to change to the the list address:) I use reply to mailing list in Kontact. I have looked ;) But importing 12+Gb of past history going back to 1998 was not practical. ONE of these days I will get all the important stuff archived in my PHP based contact management system but it's still on the TODO pile while I waste time re-working the code to make it compliant with the lasted 'vision' of PHP :) But YES that is a button that all email clients would benefit from! -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Intermittent error on hosted service
A PHP Error was encountered Severity: Warning Message: require(): Unable to allocate memory for pool. Filename: core/Common.php Line Number: 145 Where should I be looking to fix this problem? OTHER than switching off displaying warnings ... but the site code IS currently set to off, so that is another 'problem' finding out why it is displayed. It's a little academic as I've now moved the sites to one of my own machines simply to get the customers working again, but the hosting service are saying 'works for me' so I could do with a little more ammunition :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Warning at PDO:Firebird driver manual page removed.
Davi Marcondes Moreira wrote: The question is: why the warning message was removed, and now this extension is safe for use, without risks of being discontinued or depreciated? Davi The current version of the extension is stable and a number of the initial bugs have been cleared up. If you use it you will find that it does work fine, but most PHP/Firebird users - like myself - stay with the php_interbase driver on it's own simply because some function are not available via the PDO driver. That only replaces the 'data' interface and does not address some of the control stuff. This is the case with many of the PDO drivers since it is not easy to provide a 'compatible' version of this across all database engines. I've still got FB1.5 on a number of sites mainly because of legacy apps that can no longer be recompiled, but PHP provides an additional interface to fill the gaps. http://groups.yahoo.com/group/firebird-php/ is the home for a more in depth discussion and assistance :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bounce messages
I know that the php list are one of the 'reply to sender' email handling camp rather than reply to list. I can cope with that now and handle the multiple reply address problem this end so I ONLY reply to list. BUT is there no way of cleaning up the bounce emails we all get when posting to the list(s)? ( Waits to delete all the bounce messages for this post :) ) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bounce messages
Ashley Sheridan wrote: On 09/21/2012 12:40 AM, Lester Caine wrote: I know that the php list are one of the 'reply to sender' email handling camp rather than reply to list. I can cope with that now and handle the multiple reply address problem this end so I ONLY reply to list. BUT is there no way of cleaning up the bounce emails we all get when posting to the list(s)? ( Waits to delete all the bounce messages for this post :) ) Doing a little checking on your IP address, I have found that your mail server IP is listed on a black list. Check the link below. http://mxtoolbox.com/SuperTool.aspx?action=blacklist%3a213.123.20.127 This could be the source of your bounce messages. Well that is BT Internet ;) Not a lot I can do about that ... I sporadically get a lot of messages that appear as bounces where people on the list filter out replies and make you sign up to some web service to prove you're a real person. Is that the sort of bounce you're talking about? Yes ... I posted a reply earlier, and got three 'spam' warnings as well as the copy of my post. Actually it's not as bad as it has been ... I was expecting a few more after I posted the comment. And Yes tamouse ... it's having to replace a block of return addresses with just the list address to tidy things up. A long list of addresses can build up when everyone uses 'reply all' where as many other lists just need 'reply' so nowadays I only use reply - and hopefully remember to change to the the list address :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] templeting
tamouse mailing lists wrote: I've used smarty in the past and was thinking about that, but PEAR is absolete anymore and I don't really know of a good replacement. :-/ I use Smarty as well, but I've never used it from PEAR. I just use the version downloadable fromhttp://www.smarty.net I'm still on Smarty2 and we 'maintain' our own copy, but starting a new setup, Smarty3 just needs a different style of working if you have used 2 in the past. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] redefine a define ...
I know the response that I will get on the internals list, so I'll put this one past readers here ... I've just switched to overhauling a commerce package extension to the framework that I'm upgrading to be E_STRICT complaint, and I've hit a little snag. The original designers took the approach of doing the language translations as define() constants with your just selecting the language to load. The problem comes with the fact that they load a generic file, and then follow it by additional defines for more accurate text ... overloading the generic copy ... What I was not expecting was a string of 'Notices:' complaining about the redefines. So how does one get around this message? One can't 'if defined' as the string needs to be replaced with the more appropriate one. I would say, why is this even a problem, or alternatively I just give up on E_STRICT and make sure it's disabled again on PHP5.4? Having spent several months getting the code clean on E_STRICT, switching it off again will really pig me off, but I can't see any real alternative given the number of languages and strings that will need reworking simply to get things clean :( -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] redefine a define ...
Ashley Sheridan wrote: I think the point is that the code is relying on overriding the constants, so that wouldn't help at all. I think the best thing would be to re-write the code, constants are never meant to be treated like that, it's entirely the opposite of what a constant is. I've 45 languages and several hundred strings per language ;) Redefining 'define' as a new function is looking the easiest option as I can just replace all the defines in the language files. Then simply run a clean set of defines as I can't easily replace all of that text in the rest of the code tree :( I can see why the approach was taken originally as it READS a lot better than building the translations as an array of strings which is used in other packages. There are only some 800 strings to be reworked later ... across a few hundred files ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] A quick ereg translation
ereg('body(.*)/body', $phpinfo, $regs); Pulls the body of phpinfo() to use with a tidy header of other system information, but I'm struggling to get a pcre alternative. Anybody already cracked this one? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A quick ereg translation
SagaciousDev PHP-Dev wrote: This should do the trick: preg_match('#body(.*)/body#is', $content, $matches); TA - That has got it ;) That is tidier than what I had ended up with ... #body([^\']*?)\/body# from a 'tutorial' -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using PEAR and PHP
Suraj Shah wrote: I am currently working on a website which uses PHP as an integral programming language as part of it. I am trying to replicate the website’s contents from one ftp server to another but am encountering serious issues in doing so. I’ve spent two days trying to find out the reasons and now think its down to the PEAR installation. This is therefore a question on if I want to transfer a website from one domain to another, then do I need to install PEAR and re-configure all the files? At the moment, all I can see within the ftp client regarding PEAR are the ‘Mail’ and ‘Mail_Mime’ components. I am new to this so any help on this would be great. PEAR can be managed in a number of ways. You do not say what OS you are working on, but most linux distributions carry PEAR packages as additional packages you can download and install with the PHP setup. This is often the preferred way of doing things, so if those packages have not been installed on your target system, then there will obviously be problems. What I have done for some time since I used to be working between Linux and Windows servers was include the PEAR packages that I use as extra libraries within the website itself. That way the correct version is always distributed with the website. What you need to do will depend on how you are currently accessing PEAR packages, and also which packages you are using. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT (maybe not): Drupal vs WordPress
l...@afan.net wrote: Special points for me are (not a must, though) - multiple websites with single core (both CMSs have the capability but I got impression Drupal does it better?) because of maintenance - compatibility with CiviCRM There are a lot more than just Drupal and WordPress and as others have said, Wordpress is not really a 'CMS' so unless you just want to publish pages, there is not really a discussion here ... except ... Your starting point should perhaps be 'What do I need?' and then look at some of the comparison sites. I don't know what the list is up to now, but http://www.cmsmatrix.org/ is an extensive cross reference, and comparing Drupal and WordPress here would suggest there is less of a difference than seems to be the case in practice. Once I decide what to use, I have to stick with it for a while. My own choice does not fair well on cmsmatrix ... http://www.cmsmatrix.org/matrix/cms-matrix/bitweaver But I've not found any compelling reasons to think that any of the other options will do any better and I CAN at least create custom package add-ons, something which a previous attempt at using Drupal simply failed to achieve. You need to stick with something that YOU are comfortable with, and perhaps switch again if you find that it's not providing what you want. I'm having to interface with third party CRM systems, so the flexibility of something that I've worked with for years certainly helps ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Crash course
OK - MySQL is not an area I've had to bother with, but I'm trying to sort out a tranche of websites that 11 messed up the DNS on last week and we have take over support for. All the databases have backed up and been restored ... although after Firebird's backup and restore system having to dump the database as raw SQL ... that took a LONG time :( Anyway I've installed the mysqli driver and that seems to be working and I've run 'test connection' in mysql workbench with what I think are the same settings in the joomla without a problem, but the website just gives Database connection error (2): Could not connect to MySQL. I can browse the data in workbench, and changing user admin enables and disables that, but nothing seems to sort the php connection. Can anybody think of something that I have missed in this or point me to a suitable 'newbie' guide to debugging mysql connections so I can get all these sites back on line again ... If it was Firebird I'd just have mirrored of one of my other machines and been working as the security stuff is managed in the database, by mysql seems to have layers of security that I'm missing somewhere ;) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Crash course
Simon Schick wrote: Just try to connect to your mysqlserver using a simple php script first. Actually my next step was to try phpMyAdmin ;) Having created a new user with the correct rights it just worked out of the box. I was simply trying to use 'root' just to get going, but it seems that is blocked somewhere and will only work internally. That is I could not log into phpMyAdmin using 'root' ... joomla is using mysqli but as yet is obviously not strict compliant as http://gc.lsces.org.uk/ will demonstrate ... that is if I've not found where to patch joomla since I don't want to switch E_STRICT off just for that. If I do anything with joomla it will be replacing mysql, but to be honest I'll probably just move most of the sites to something *I* can work with :) I've already sorted the E_STRICT problem with my own stuff. I just need to get them running for now! -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Crash course
Simon Schick wrote: Hi, Lester I know how you feel ... I didn't want to disable E_STRICT either, but as most of those errors come from the Joomla-Core or some extensions, I don't have the nerves to fix code that's not mine and the developer just says aaa ... those E_STRICTs ... why do you even care Therefore I gave up because the developer won't fix those and I don't want to support my own fork of those extensions. Actually all I was trying to work out was overriding the setting for the joomla sites ... but I hit another problem first :( Need to compile mysqli and mysqlnd as shared modules, but can't seem to untangle the interrelation on header files ... I'm missing something there when running ./configure to get them to see the other's ext/ folder on the php5.4 configuration on the main server ... what should be a 5 minute job always seems to take hours :( -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Crash course
admin wrote: First of all, I HIGHLY doubt that 1and1 AKA Cisco messed up the DNS. I would be very careful blaming them and publically announcing it. We can publish the list of sites that were unavailable for 48 hours. It was the last straw for the customer as this was not the first occasion it had happened and we were asked to sort the matter out after several hours of being given the run around. NOW I'm trying to get PHP working with the customers material which was running on PHP5.2 but I no longer have 5.2 on my servers. Secondly if you tested mysql connection with Workbench then the error you describe is configuration error in Joomla, common sense would dictate so. http://www.inmotionhosting.com/support/edu/joomla-25/database/troubleshootin g-database-errors Which was exactly the sort of help I was asking for, finding some things like that can take time when one is in a rush, but ACTUALLY that page gave me nothing as the subsequent post indicated. It was the PHP setup with MySQL that I was playing with at the time although the actual problem was simply adding a user name that PHP could access - not something I was expecting since I can always use the system accounts with Firebird. This list is for PHP And the problems I am having are getting PHP working! Current problem simply getting mysqli and mysqlnd compiled so I can add them to the PHP5.4 setup. I've been at this for the last 3 hours and am making progress, but nothing actually worked first time :( And the sites still arn't up on my servers. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysqlnd and mysqli as shared extensions?
Can mysqlnd be built as a shared module? make test is telling me the resulting .so is not a valid Warning: PHP Startup: Invalid library (maybe not a PHP library) 'mysqlnd.so' in Unknown on line 0 I'm still on PHP5.4.3 on that machine as I've not had time to upgrade as yet. It's running my own PHP sites without a problem via Firebird. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PECL-DEV] php-rsync installation howto
Mihamina Rakotomandimby wrote: On 08/08/2012 08:29 AM, tamouse mailing lists wrote: It's not just: phpize ./configure make sudo make install To be honnest, I dont know. If it's really just about that, I'll submit a patch for this. Is phpize; ./configure; make; sudo make install the default *manual* INSTALL process for a PECL package? That IS the manual process, but the rsync package has not been updated since June 07 so while it says 5.2.6 or later, that may not be the case now? So what is not working? ./configure --help should show what phpize has built, and librsync probably needs to be installed Personally I have rsync running via it's own admin pack running scheduled backups so don't need it from php ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newfangled features ;)
I'm busy trying to work out why I should be using 'Reflections' ... I'm seeing elements of this appearing in the PEAR code I'm trying to clean up to be strict safe, where some packages have been cleaned up, but the core code lags behind. On my own framework, I identify the type of page that needs to be generated, and then load the relevant code to provide the classes needed to create that page. Then run an instance of the relevant class(s) to generate the html of the page. Smarty templates provide the configurable elements of the layout, linked to .css for the particular theme. SO I simply can't see at the moment why I would need 'ReflectionClass($classname)' when I'm going to use the class anyway? If a function does not exist then I've messed up somewhere already? Of cause something to solve the 'white page' after making just a minor change in the code would help ... but we've lived that for years already. :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php safe mode no more?
tamouse mailing lists wrote: What I've noticed running apache suexec + fastcgi is that the memory requirements increased over running nonsuexec and mod_php under apache. when i went to a nginx + fastcgi, things worked much better overall with limited memory (i'm on 1GB limited slice, non-burstable). Funny you should mention nginx ... that one is on my todo list as well ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php safe mode no more?
D. Dante Lorenso wrote: The school I work with wants to set up PHP and MySQL hosting for about 10,000 students. I suspect that if you have a lot of students active at once you will need a few machines to support this. I'd certainly recommend a separate machine running the database and not MySQL but that is my own pet hate ;) - postgres would be preferable if only to get new users trained in a better standard. I run firebird database servers myself. Apache can be configured to provide individual logins, and it's ring fencing their data areas that is the important bit, but you will need a lot of storage space for 1 users. I see that in 5.4, PHP safe-mode is being removed. How is it supposed to be done if not safe-mode? It was the wrong solution to the problem. But as with much that is happening on PHP today, killing things off is being actioned without any real documented support as to how to replace it. Not their problem is the usual response when we ask how something should be done like this :( Are all the hosting providers using suExec and running PHP as CGI or FastCGI? If I'm trying to do this the right way, what way is that? Anyone got link or pointers on what I need to learn? Another one is suphp but that seems to have stalled? Having been scuppered recently because SUSE seems to have lost it's way as well, I've just started a setup using Debian so I can get the latest Apache and PHP, and one link that poped up which looks useful is http://x10hosting.com/forums/vps-tutorials/148894-debian-apache-2-2-fastcgi-php-5-suexec-easy-way.html . I have always used the apache php module, so was looking to give CGI a try as a comparison, but I don't have any need for the cross user security myself. My users just access their material at the PHP level, securely stored in their own databases :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Stats
Sebastian Krebs wrote: http://w3techs.com/technologies/details/pl-php/all/all For example. Click around, nice stats there. http://w3techs.com/technologies/history_overview/programming_language/ms/y is the more interesting one ... PHP usage IS still growing. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to write and read serial or parallel port
viper wrote: is it possible to write and read data on a COM or LPT port? is there any function or class in PHP? anyone has already done something similar? Talking in and out of the serial port is not too difficult but is OS dependent, so what are you wanting to run on? Most of the time you are just copying files in and out, although one can use the control signals as simple I/O if you only need a couple of controls. Parallel port is a minefield on Windows as access is specifically blocked in XP onwards. You need a modified device driver to bypass the blocks windows puts in. I've not tried that with PHP as I'm normally accessing the parallel port direct from other windows programs. Linux is lot easier, and most of the examples you will find via google are geared towards that. It works like DOS used to :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to write and read serial or parallel port
Alex Nikitin wrote: So for serial for example, you can just open the port up and work with it like a socket; read/write binary data. As far as parallel port goes, trickier, you may need to call out to an external program, or write a module if you need direct interaction in php. Real question is why in the world would you want to use PHP for this to begin with. I mean sure you can write your own vfat implementation in PHP, etc, etc, but it doesn't mean that it's a good idea to do so. Well I use the parallel port to switch over channels on the PA system and control other things such as camera selection. While the PHP web pages have access to do it, they send a message to an old windows application and that talks to the parallel port. It would be nice to eliminate the messaging on smaller setups, along with the windows box, but it's worked for 15+ years ... I did simply assume that the question was one of writing data in terms of switching pins on and off rather than streaming files over the link :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] E_STRICT safe PEAR
Not sure the best place to ask this ... I've worked through all of my own codebase to eliminate E_STRICT warnings/errors and now I'm working on the more basic ones coming from PEAR such as PHP Strict Standards: Non-static method PEAR::isError() should not be called statically Since these are installed by the distribution, in my case SUSE12.1, is there a better version to download that is E_STRICT clean? Or o I h2ve to work through that as well for the modules that the third party libraries are picking up? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] E_STRICT safe PEAR
Sebastian Krebs wrote: Hi, I'm using Ubuntu, but here you can update the system packages with the pear executable too $ sudo pear update-channels sudo pear upgrade --alldeps The question is - Is the result E_STRICT safe? I've got what I think is the latest from SUSE12.1 but with PHP5.4 I have to disable E_STRICT again in order to use anything from it ... Regards, Sebastian Am 24.07.2012 17:05, schrieb Lester Caine: Not sure the best place to ask this ... I've worked through all of my own codebase to eliminate E_STRICT warnings/errors and now I'm working on the more basic ones coming from PEAR such as PHP Strict Standards: Non-static method PEAR::isError() should not be called statically Since these are installed by the distribution, in my case SUSE12.1, is there a better version to download that is E_STRICT clean? Or o I h2ve to work through that as well for the modules that the third party libraries are picking up? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] E_STRICT safe PEAR
Sebastian Krebs wrote: The question is - Is the result E_STRICT safe? Would say: Depends on the package you use. I don't use PEAR-packages myself, thus I don't really know. I would say: Try it out :) Test it on your dev-machine, or within a vm and nothing can break. Sebastian I'm asking because what I have, which I think is the latest version of PEAR, is throwing numerous E_STRICT errors! I'm trying to establish if this is actually correct, and that PEAR has never been brought up to date, or I'm still hitting a pre E_STRICT version. I suspect the former which is not very helpful when I've been told simply to fix my own E_STRICT problems ... I don't have time to rework PEAR as well as the libraries I've already fixed :( So is E_STRICT simply something that should be thrown in the bin and the defaulting ON in PHP5.4 is somewhat premature? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] E_STRICT safe PEAR
Sebastian Krebs wrote: Didn't you say you use the builtin packages from suse? I guess they are _not_ the latest :X I'm trying to establish if this is actually correct, and that PEAR has never been brought up to date, or I'm still hitting a pre E_STRICT version. As mentioned: That depends on the packages. There are packages, that are completely unmaintained nowadays. However, I have some tools, that relies on PEAR-packages and I've seen no E_STRICT for a while now, which makes me think, that at least some, if not all, are PHP5.4-compliant. http://pear.php.net/package/PEAR lists 1.9.4 as the current release, and this is what has been loaded. PEAR::isError() is not defined as 'static', therefore the error I am seeing. http://pear.php.net/bugs/bug.php?id=19491 Many of the System.php functions are not static, but are called statically so I am getting more suspicious that PEAR is simply not compatible with E_STRICT. Simply adding 'static' against each function seems to have cleared all my current messages. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal
Paul M Foster wrote: Here's another one: There are currently discussions in the U.S. Congress in favor of forcing internet vendors to charge sales tax on*all* sales, regardless of whether the vendor has a presence in that state or not. Imagine having to file state sales tax returns in 50 states. This effort has rather significant bipartisan support. Now ask yourself what large corporation with brick and mortar stores *wouldn't* sign on to support this one? That's what you're up against. You've got Amazon.com on your side. Yay. You might want to get busy on that one. In Europe VAT is applied even on on-line sales. It is the likes of Amazon shipping bulk stock from overseas 'clients' into European warehouses and then supplying them without VAT added directly in Europe that is the problem! How can I compete with someone who is also giving next day delivery, but 20% cheaper ... American sellers are one of the problems here. There are two sides to every problem and simply fighting for one side is as bad. What is needed is a reasoned debate rather than things like 'The Cat Signal' which personally I find as objectionable as the laws it's complaining about! -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal
Paul M Foster wrote: There are two sides to every problem and simply fighting for one side is as bad. What is needed is a reasoned debate rather than things like 'The Cat Signal' which personally I find as objectionable as the laws it's complaining about! The real problem is the VAT tax itself. In my opinion, VAT is worse than direct income tax. The only good thing about VAT is that you (presumably) don't have to file returns with every state/province involved. The EU does have VAT sorted nicely across all the states of Europe, and I simply fill in a VAT return each quarter in the UK. For VAT registered European customers we simply bill them 0% rated, so there is no need for cross border paperwork at all. But European customers who are not VAT registered pay the rate of of the country the supplier is based in, which gives some small plus and minus advantages. Anything that comes into Europe through proper channels will also have VAT added as part of 'customs charges' and businesses simply claim it back, hence the irritation at supply channels bypassing the normal trade routes :( In theory those goods should have had VAT paid when they came into a European warehouse, so it would be nice to know what loophole they use to avoid it ;) And at least VAT only applies when I spend money, higher income tax would hit everything I earn ... but this is getting very much off topic for the list, as 'The Cat Signal' is anyway in my book. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What do you call the end-user?
Tedd Sperling wrote: I can't wait for tomorrow -- so here's my off-topic post today. First question: What do you call the people who ultimately use your code? I call them the end-user, but others have stated other terms, such as customer or user. If they are paying they are customers, if they are freeloading they are users. Second question: Are you concerned with their (whomever) experience in using your code? This question transcends your code working correctly, accurately, and securely -- no need to comment on those aspects. But rather more specifically do you consider how easily your whomever can use your work efforts? As you may have guessed - I just attended a UX conference and they provide an interesting perspective on UX. I was wondering how php developers typically address the subject. I have an application which has evolved over 20 years, but still does essentially what it did 20 years ago. It was ported to PHP to replace it's own alphnumeric terminals around 2000 but still uses the basic functionality that the original hardware provided. The nice thing about PHP is that it while the original stuff was all hard coded programs and changes were difficult, with PHP we can adjust things easily. Probably a little too easily, but molding things to each sites personal preferences is something that could not be done originally. So we tailor the user side to reflect local workflow rather than forcing a one size fits all solution that we had before. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal
Jeff Burcher wrote: I have been out of the loop and just did some quick skimming of SOPA/PIPA to see what all the fuss was about. PIPA seems a little vague, but SOPA seems pretty straight forward, stop piracy of copyrighted materials. I don't understand what is wrong with that? It depends on how heavy handed the solution is ... Currently I can't get torrent downloads of Linux distribution DVD's because torrent is blocked. Just because some people abuse a technology is no reason to kill that technology for legitimate uses? Action groups that just target one country are a little irritating to the rest of us ... a world wide solution is needed. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PDO: extend or encapsulate?
tamouse mailing lists wrote: I am rather agreeing with both of you. Back in the days I used to poke at Java, one of the caveats was to only inherit from abstract classes, and encapsulate final classes. It does make more sense to me that way. One option is to keep both drivers available ... ADOdb will use either the generic or PDO which is useful when PDO does not provide access to key database specific functions. I've been testing the PDO driver on my own code simply by switching which one is loaded, but I still find the generic driver for Firebird is faster - when wrapped in ADOdb. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Missing something simple
Lester Caine wrote: Normally I'd just assume that PHP was not starting up, but since PHP is running from command line and the .dll is in the right place I'm now a little confused as to what I'm missing ... OK switched to FastCGI, but that is complaining about 'can't load windows library' which I suspect is the same problem as the Apache Module has. I suspect this has something to do with VC10 since the runtime library has to be updated to that to get FastCGI to load. I do have a working setup using PHP5.4.0 with Apache 2.4.0, which seems to be the last version that installs out of the box on Xp32bit ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Missing something simple
Serves me right for not starting this earlier, but I need to take a machine to site in the morning and now something is not playing ball. Windows XP 32bit up to date with updates ... PHP5.4.4 installed from php-5.4.4-Win32-VC9-x86.zip up and running fine from command line and via php -S giving clean phpinfo with all the modules expected. at C:/Network/PHP5 - which is also in the windows path. Apache2.4.2 installed from httpd-2.4.2-win32-VC9.zip and working fine at C:/Network/Apache Apache module from php5apache2_4.dll-php-5.4-win32.zip copied to C:/Network/PHP5 and the latest VisualC++ libraries installed Enabling 'LoadModule' is giving the C:/Network/Apache/conf/httpd.conf: Cannot load C:/Network/PHP5/php5apache2_4.dll into server: The specified module could not be found. Normally I'd just assume that PHP was not starting up, but since PHP is running from command line and the .dll is in the right place I'm now a little confused as to what I'm missing ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Searching IDE.
David Arroyo wrote: I am searching an IDE for php and web development, my options are Aptana or Eclipse+PDT. What is your opinion? I'm using Eclipse with PHPEclipse but PDT is probably just as good nowadays. PHPEclipse needs a few updates to handle some of the 'new features' in PHP. The advantage of Eclipse is that ALL of my development work is done in the one IDE, so I can play with C/C++, Python, javascript and even occasionally Java without having to switch. It also runs transparently on both Linux and Windows platforms which I have to support ... Need to fire up the java side again and have a look at fixing PHPEclipse ;) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL Injection
Jim Lucas wrote: Not to refute the above advice one bit (not to mention oppose the arguments against escaping in general) ... but just curious - can anyone demo a hack that effectively injects past mysqli_real_escape_string(), while using utf-8 ? It may just be a matter of time (or already?) before mysqli_real_escape_string is *proven* ineffective (w/utf-8) ... but here I am just attempting to gather facts. Ah, but what if I use sqlite or postgres? Or Firebird ;) IMHO, the discussion needs to be a the best way to prevent SQL injection across all possible DB types. Not just mysql. The main thing to avoid is building queries from elements that are directly loaded from the form inputs. While it is difficult to build sort elements for queries that use parameters, having a mechanism like ADOdb's datadict where one can filter SQL based on the identified field names does make life easier. While the problems of dealing with student names such as 'Delete from student' are easily solved by only using them in parameter arrays. A few simple basics cover the vast majority of traditional SQL injection problems? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] disabled cookies
Matijn Woudt wrote: Yeah, it's been such a pain, as nobody over here is quite sure how the hell it'll be enforced either, or if it even will be. It's also pretty vague as to just where the line gets drawn. The official government sites on this are pretty black and white, but don't clearly address the grey areas. I think this is definitely a case of the persons making the laws don't understand the technology involved, which sadly seems to be the case across a lot of tech laws being passed world-wide of late:( Yep, When this law was discussed, they were mostly talking about completely banning cookies. Only later they figured out that there are quite a few sites that can't live without cookies... Cookies for shopping baskets got flagged up early on and then people started to realise that there were more good reasons for using the than bad ;) The main 'grey' area is a session cookie which classified along with shopping basket ones - which don't need specific permission - but then we are told we should still ask? But we don't need to ask about shopping basket ones! -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] disabled cookies
Ashley Sheridan wrote: Lester Caineles...@lsces.co.uk wrote: Ashley Sheridan wrote: How is Google Chrome a bigger security risk than the other popular browsers, Fx and IE? I was under the impression it was more secure than either of those. License Conditions ... They may have removed the original landgrab section, but there is still a potential for Google to gather private information and this is an unacceptable risk when dealing with customers who deal with sensitive private data. In addition, intrusive advertising has no place in public service systems anyway ... Google maps and the like are similarly inappropriate since using them allows Google to track material that IS also sensitive. It is THIS tracking that the 'cookie law' was supposed to address, but the problem sites are not even covered by it ... WE are if we link to uncontrolled sites and services. Ok, but don't confuse the browser with the services Google offers. The two are very separate, and its confusing to mention the services in an argument about the browser. I'm just working to rules that are applied to me by the security departments of the customers *I* am dealing with. While you might think that there should be a distinct separation between the two areas, the recent 'rationalisation' of Google privacy notices eroded that separation again ... Google can do what they like and can change the rules again when they see fit. We are at a point where the 'cookies' laws have become a requirement simply to ensure that we KNOW what is being gathered and why. The question I asked in an earlier thread has not had an answer ... are there any good open source add-ins for php that allow us to manage this area in Europe? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] disabled cookies
Matijn Woudt wrote: I wonder what browser you're using. I just read the IE10 privacy policy, and it pretty much states the same, Microsoft can collect private data from you. Opera, Firefox and Safari probably have something similar. Seamonkey ... on Linux Still prefer a proper internet suit so I can simply open tabs from email links and compose html in-line as required. But the point I was making was that I am restricted from linking to Google by my customers rules as it's considered a 'security risk' to sensitive personal data. We use OSM nowadays for mapping, and any site search is private to the server, not using the 'free' search services. If my actions fail a security audit I have to amend them ... I had managed to avoid all of the 'social media' services, but am now having to 'participate' simple to check out what cookies they are setting on sites that are not affected by security restrictions ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] disabled cookies
Matijn Woudt wrote: BTW, There's a website [1] that has all the information and even a tool for checking what your site does with cookies. - Matijn [1]http://www.cookielaw.org/ Which fails at the first security hurdle! It requires Google Chrome, which is bigger black hole as far as my customers are concerned. http://www.ico.gov.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies.aspx is perhaps the best guidance for UK users ... currently. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] disabled cookies
Ashley Sheridan wrote: How is Google Chrome a bigger security risk than the other popular browsers, Fx and IE? I was under the impression it was more secure than either of those. License Conditions ... They may have removed the original landgrab section, but there is still a potential for Google to gather private information and this is an unacceptable risk when dealing with customers who deal with sensitive private data. In addition, intrusive advertising has no place in public service systems anyway ... Google maps and the like are similarly inappropriate since using them allows Google to track material that IS also sensitive. It is THIS tracking that the 'cookie law' was supposed to address, but the problem sites are not even covered by it ... WE are if we link to uncontrolled sites and services. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What is The best way/tool for debuging PHP?
LEOPARD Corporation wrote: Dev-PHP is an IDE, and I don't need such tool because I'm using Eclipse, and I'm very comfortable with. Good to hear others are using Eclipse as well ;) I work on a lot more than just PHP so as a single platform it's great - even between Linux and Windows. what I really want to know is: what is the best pure debugging tool which its function is to debug PHP scripts and applications only. I'm still using PHPEclipse for the PHP editing, and while I do have xdebug installed with it, I tend not to have to bother 'debugging', I normally just need to add the occasional print_r() in the simple stuff, and the bitweaver framework has some additional debugging facilities built right in for tracking SQL problems and proving a pretty view of data provided by print_r(). A little longer winded than setting breakpoints, but it works well the majority of the time. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cookie use management
Not directly a PHP problem, but since PHP tends to automatically create a session cookie I thought it appropriate to ask here first. The European rules on asking permission to use cookies have been around for a year now, and very few sites seem to be worrying about it until now, but press coverage is flagging that the ICO in the UK will start 'prosecuting' next week. Not exactly what the ICO are saying themselves, as they would prefer that the BROWSERS defaulted to cookies being blocked generally, so every cookie action requires approval locally anyway. Session cookies could be claimed to be exempt, but with the increasing hidden use of Google Analytics or in my case Piwik, WE become responsible or all that activity and so a few 'commercial' sites are appearing offering chargeable services to manage this for you. I've been trying to dig down through the google results to find anything open source that provides something easily bolted on to existing PHP sites to intercept cookie use before it actually happens. My reading of the rules would suggest that simply adding a session cookie is acceptable as long as the site identifies they are being used, but until there is some 'case law', actually practice is very grey? Pop-up is obviously out of the question since that can be blocked, and even javascript could be blocked so what can be relied on to 'Obtain permission before using a cookie'? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookie use management
( Forgot email address :) ) Jeremiah Dodds wrote: Lester Caineles...@lsces.co.uk writes: Not directly a PHP problem, but since PHP tends to automatically create a session cookie I thought it appropriate to ask here first. I don't know about the rest of your post, but you can easily turn off this behavior if it's present (unless you are using a rather poor host), see http://www.php.net/manual/en/session.configuration.php That would probably fall under the ICO acceptance that they don't want people to feel that they simply have to switch site functionality off ;) I'm doing the hosting, but many of the sites that I need to support we have not written the code which as a range of 'frameworks', so I'm trying to find something that can be added in easily - like the Piwik tracking - without having to rewrite the sites ... I'm thinking I need to write my own module, but I can't believe that no-one has done it yet. Or perhaps they are all charging for the service :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I need a good access and error log..
rene7705 wrote: But before I start coding, I thought it would be better to ask you all what you use to see who's visiting your sites and when. Oh, I need something that will work on shared hosting (php+mysql). piwik ... http://piwik.org/ A couple of my heavy google users are finding the results much more informative, and we have started switch google analytics off on all the sites. ( And while it says PHP MySQL I'm using it quite happily on Firebird :) ) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Retrieve pages from an ASP driven site
Terry Ally (Gmail) wrote: Here is how you would paginate in PHP. Terry - Tom is not trying to create this in PHP, but read existing ASP pages. Tom - I don't think that it's simply a matter of the ASP code here, but rather how they have constructed the set of information they are sending back. That is done in javascript, but the navigation buttons are simple form submit. BNext is submitted for 'next'. Interestingly, the sales side seems to be .php ;) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] code deployment through php
rene7705 wrote: I can't use anything like git on my shared hoster. But I suppose I could use something like git at home, and use a sync script like I posted in my OP on the shared hoster. I have some legacy hosting packages which are just ftp access and BC just lists them and allows me to manage things quickly when I need to update those sites. One of these days they will get moved to an easier location :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] code deployment through php
rene7705 wrote: Well, I want to work on 1 copy of my common code on my windows machine, then sync those changes to all my sites (hosted on the win dev box) to see if it messes up the other sites, then FTP those changes to my hosting account, and run the sync script there as well. I have a number of windows based customers who also like to review what we are doing, so I ended up with HG. TortoiseHg provides a nice gui based DVCS system interface on Windows which works identically on Linux and I can push and pull changes around the place without having to worry about anything. The servers 'pull' a copy of the code base from a local server master, which is managed from the development environment. Config information is protected on each site, and the whole thing works identically on both windows and linux so I don't have to worry what the customers are using. THEY can work to their own site and change what we give them access to, while the core code is managed from the central repo. If they come up with something useful it can be merged back into the master copy :) One of the few pieces of software I actually pay for is BeyondCompare which provides the same cross platform facilities for merging files and with it's built in ftp interface allows manually inspecting the file structure on any of the machines. A couple of my Mac based customers are now investigating the same development base. Add Eclipse/PHPEclipse on top and you have the ultimate cross platform IDE :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php