Re: [PHP] Need help in identifying a PHP application.
Hi, Thanks a lot for all the inputs. I will take it further from here. Thanks, Ananth. >>> "Richard Lynch" <[EMAIL PROTECTED]> 4/27/2006 4:06:03 pm >>> On Thu, April 27, 2006 4:21 am, Ananth Kesari wrote: > I have a need for an idea management PHP application that gives me an > UI with multiple fields (text boxes, radio buttons etc.) which > correspond to different columns of a MySQL database. An user initiates > this by clicking on an URL, fills in certain fields and submits the > form. This then creates the tables and should send out a mail to > certain > mail ids that there is a new entry. At a later point of time someone > else can enter info into certain fields (columns of the tables) giving > the same id as it was created. He should not be able to meddle with > the > original fields that user1 had entered. Another user can come at even > later stage and enter info into a few more fields (columns of the > tables). All these fields are created at the first stage itself since > we > will be fixing the number of fields. > > Can you let me know of any application that does all these? If this is > a wrong forum to ask this type of question, can you tell me where I > can > post this query? phpMyAdmin does a whole lot of this kind of stuff, and has a huge install-base... Seems to me that if you rig your database so that later users can't use ALTER TABLE (nor DROP TABLE) then you're pretty much done. It's not a real pretty front-end, though, in terms of clueless users, as it was designed for people who had some idea about how databases worked. Other than that, I got nothing in mind that sounds like what you want, though I suspect most of the CMSes are kind of sort of like that, to some degree... You can give a BUNCH of CMS thingies a trial run here: http://opensourcecms.com/ And I suspect that their forums would be a better place to ask the original question, as their experts on a plethora of CMSes would know what most closely matches your needs. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] we are looking for experienced php programmers full time freelance...
Robert Cummings wrote: quote your charges and the time that you will be available. also mention msn or yahoo ids. skype id is more welcome. What about a MUD? I'm usually logged into a mud. It's a great place for telnet wocmud.org 4000 hi robert, thanks for the info... but a MUD? ...for doing business? anyway i used the MUDand remembered the time on the BBS...(Bulletin Board Service) thanks... -- Thanking You Sumeet Shroff http://www.prateeksha.com Web Designers and PHP / Mysql Ecommerce Development, Mumbai India -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] we are looking for experienced php programmers full time freelance...
On Thu, 2006-04-27 at 22:47, Sumeet wrote: > we are looking for experienced php/mysql programmers full time freelance... > > should be at least 1 year experienced, knowing pear libraries and having > worked on several projects. > > please contact me at [EMAIL PROTECTED] > > quote your charges and the time that you will be available. also mention > msn or yahoo ids. skype id is more welcome. What about a MUD? I'm usually logged into a mud. It's a great place for my clients to come chat with me about projects. There's nothing like talking about deploying some web project when suddenly a brawl breaks out between the trolls and gnomes. Seriously though :) telnet wocmud.org 4000 Life has been good, I've never had a client force a messenger on me. Who needs constant paging when there's work to do. And yes, some of them do log into the MUD to talk about projects :) We enjoy a nice keg of ale while we chat. Email is the communication of choice, phone if something is urgent. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recommended PHP frameworks
Robert Cummings wrote: A funny PHPClasses article... http://www.phpclasses.org/blog/post/52-Recommended-PHP-frameworks.html I find it telling that the guy who runs the PHP Classes site only uses his own code *lol*. Oh btw, the article says virtually nothing useful about frameworks, but it does go a long way to pimp Manuel's own classes -- another oddity considering it leads with a blurb about recognizing bias when you read it ;;) I want my 5 minutes back!! my eyes started to bleed way before 5 minutes was up - it's the blue-on-blue-on-blue that does it too me everything. :-P Cheers, Rob. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php <-> js (was Javascript Navigation)
At 04:39 PM 4/27/2006, tedd wrote: What I don't get is how php can pass variables to js and cause it to run "at will". Do you mean the way one function can call another function within the same program? It sounds like you're picturing PHP & JavaScript executing continuously & simultaneously. You aren't, are you? JavaScript can execute a PHP program "at will" simply by requesting a PHP page from the server. PHP can execute a JavaScript function "at will" simply by downloading it (with at least minimal HTML markup) to a browser. That seems pretty simple & direct to me, considering that they're running in different computers. I can see how php can, and have used php to, generate a web page which has tag, which can pass a variable to js and will cause js to execute. But, isn't there anything else? Is that all there is? ... I also understand that php can generate html (have done it) and echo out javascript that may, or may not, run if js is present -- like Robert suggested in his WAHOOEY (LOL) example. But, that appears messy to me. If php wants to say something to js, then a page must be created -- it seems like a lot foreplay to get at the goodies. Without a downloaded page, what goodies are there? You know, you can download pure JavaScript, dressed only in a script tag, to a browser and have it execute without carrying with it a whole HTML page. Is that what you're looking for? What would such a script accomplish that a PHP program couldn't? I suppose it could interact with the human user with prompts, alerts, and confirms; gather information about the client such as monitor & window size; grab local time to compare to server time. What else? If it has to create DOM nodes to interact with the user, haven't you come full circle and shouldn't you just download an HTML page to be JavaScript's environment? I guess what I'm looking for is something simpler -- is there? Paint me a picture of a hypothetical simpler situation; I'm intrigued. Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php <-> js (was Javascript Navigation)
On Thu, 2006-04-27 at 19:39, tedd wrote: > At 1:57 PM -0700 4/27/06, Paul Novitski wrote: > > >>Okay, I understand how js and html can communicate with php -- but, > >>that's not the problem. My statement above was part of a > >>symmetrical requirement regarding communication. > > > >Sorry -- "symmetrical"? Please elucidate, I'm not familiar with > >this term in this context. Which factors need to be the same on > >both sides of the Turing box lid for your criteria to be satisfied? > > And > > At 3:16 PM -0400 4/27/06, Robert Cummings wrote: > > >Communication need not be symmetrical. All that is required is that each > >end understand one another. > > Arrr... my head hurts :-) > > Okay, a little misunderstanding here. > > In my statement of symmetrical requirements regarding communication I > basically said: > > 1. js -> php > 2. php -> js > > I was simply using symmetrical *statements* to illustrate my point. I > was not implying a requirement that all communications must be > symmetrical, understand? > > Now, I know [1] that js can pass variables to php and cause it to run > -- I do that using ajax -- that's not a problem. > > What I don't get is how php can pass variables to js and cause it to > run "at will". I can see how php can, and have used php to, generate > a web page which has tag, which can pass a > variable to js and will cause js to execute. But, isn't there > anything else? Is that all there is? > > Paul you said: > > >All this seems very obvious to me, but knowing your level of > >sophistication with programming I'm led to suspect that perhaps I'm > >not understanding your question properly. > > Thanks for the compliment, but I can be as dumb as a post about > things until I fully understand them. However, everything you said I > understand. > > I understand that XMLHttpRequest works -- I'm a little fuzzy about > how -- but, I have used it to both send data to php and to cause php > to execute. That's not a problem. > > I also understand that php can generate html (have done it) and echo > out javascript that may, or may not, run if js is present -- like > Robert suggested in his WAHOOEY (LOL) example. But, that appears > messy to me. If php wants to say something to js, then a page must be > created -- it seems like a lot foreplay to get at the goodies. > > I guess what I'm looking for is something simpler -- is there? There isn't something simpler, but that is necessitated by the stateless nature of the web, and the security requirements of the client (the poor sucker browsing the net :) I understand your desire for the simplicity of a desktop application, but anonymous data sources and trust aren't usually compatible. In the web paradigm the both the user and the server need to distrust one another by default which isn't the case for bought from a reputable, honest to goodness real live person, manually installed desktop application *grin*. Although, can't say I trust MS much. > PS: WAHOOEY indeed -- LOL, I'm still chuckling about that. It was nice of PHP to let us name our heredoc delimiters. I guess the standard is EOF, but why write boring code ;) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php <-> js (was Javascript Navigation)
At 1:57 PM -0700 4/27/06, Paul Novitski wrote: Okay, I understand how js and html can communicate with php -- but, that's not the problem. My statement above was part of a symmetrical requirement regarding communication. Sorry -- "symmetrical"? Please elucidate, I'm not familiar with this term in this context. Which factors need to be the same on both sides of the Turing box lid for your criteria to be satisfied? And At 3:16 PM -0400 4/27/06, Robert Cummings wrote: Communication need not be symmetrical. All that is required is that each end understand one another. Arrr... my head hurts :-) Okay, a little misunderstanding here. In my statement of symmetrical requirements regarding communication I basically said: 1. js -> php 2. php -> js I was simply using symmetrical *statements* to illustrate my point. I was not implying a requirement that all communications must be symmetrical, understand? Now, I know [1] that js can pass variables to php and cause it to run -- I do that using ajax -- that's not a problem. What I don't get is how php can pass variables to js and cause it to run "at will". I can see how php can, and have used php to, generate a web page which has tag, which can pass a variable to js and will cause js to execute. But, isn't there anything else? Is that all there is? Paul you said: All this seems very obvious to me, but knowing your level of sophistication with programming I'm led to suspect that perhaps I'm not understanding your question properly. Thanks for the compliment, but I can be as dumb as a post about things until I fully understand them. However, everything you said I understand. I understand that XMLHttpRequest works -- I'm a little fuzzy about how -- but, I have used it to both send data to php and to cause php to execute. That's not a problem. I also understand that php can generate html (have done it) and echo out javascript that may, or may not, run if js is present -- like Robert suggested in his WAHOOEY (LOL) example. But, that appears messy to me. If php wants to say something to js, then a page must be created -- it seems like a lot foreplay to get at the goodies. I guess what I'm looking for is something simpler -- is there? tedd PS: WAHOOEY indeed -- LOL, I'm still chuckling about that. -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] credit card purchase and downloads
Thank you very much Stut, great points. I didn't even think about wanting to display a list of files they have access to. I guess I'll go with the simpler way and save myself a lot of overhead. As I said, I've never made a site that had anything to do with money before, this is the first time. I just wasn't sure what kinda security I need. I guess as long as the credit card transactions are secured, I should be fine. thanks again, Siavash thinkQuoting Stut <[EMAIL PROTECTED]>: > [EMAIL PROTECTED] wrote: > > is that really secure? > > > > I just thought if for any reason, someone can get into my database, > > they can't just add usernames and file ids to my table and have > > access. > > > > I thought if I md5 it, then it'll be more secured. > > > > would 1 table for username-fileid really be fine? > > If they get that level of access to you database then most bets are off. > However, you are correct to a certain extent. If you one-way encrypt (if > MD5 can be called encryption) all your data then yes it will be more > secure, but to me that security comes at too high a cost from a > functionality point of view. You can't, for example, get a list of the > files a particular user has purchased. > > But, as always, it's up to you and what you need for the particular > project. If you feel you need that extra security then go for it, but be > aware of the side-effects. > > -Stut > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php <-> js (was Javascript Navigation)
At 10:33 AM 4/27/2006, tedd wrote: Can js cycle reading cookies waiting for something to do while php crons writing them as needed -- and vise-versa? Is that a viable method of communication and activation between the two? At 01:57 PM 4/27/2006, Paul Novitski wrote: No, because cookie values are changed only on page submit & load. Let me re-answer that. Yes, cookies are an acceptable method of PHP-JavaScript communication -- when they're turned on in the client -- but require a new page load to synchronize changed values between client & server. When I said "no" all I meant was that cookies don't work for communicating PHP-to-JavaScript within a single page-view. Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] credit card purchase and downloads
[EMAIL PROTECTED] wrote: is that really secure? I just thought if for any reason, someone can get into my database, they can't just add usernames and file ids to my table and have access. I thought if I md5 it, then it'll be more secured. would 1 table for username-fileid really be fine? If they get that level of access to you database then most bets are off. However, you are correct to a certain extent. If you one-way encrypt (if MD5 can be called encryption) all your data then yes it will be more secure, but to me that security comes at too high a cost from a functionality point of view. You can't, for example, get a list of the files a particular user has purchased. But, as always, it's up to you and what you need for the particular project. If you feel you need that extra security then go for it, but be aware of the side-effects. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] credit card purchase and downloads
[EMAIL PROTECTED] wrote: well is that a secure way? I thought if I use md5 and so on it'll make it more secure and harder to hack. would a table for user-fileid be good enough? I don't really know why I thought it had to be secured, I just don't want it to be eaily hacked. Unless I'm not understanding your intended flow of data, it's no more or less secure than your way, just a hell of a lot simpler. Everything you're doing is happening on the server-side, as is everything I'm doing. All that comes from the client-side is the username and the file ID. Both methods have the same uncontrollable inputs and are therefore basically the same from a security point of view. -Stut Quoting Stut <[EMAIL PROTECTED]>: [EMAIL PROTECTED] wrote: Any idea if this is a good way to do this or not? any better suggestions? is this secured? I'm confused. What's wrong with having a table containing a row per file, then having another table containing the users. Add a third table containing two fields, username and fileid, which contains one row per user per file they've purchased. When they try to download a file you check against that table. Maybe I'm missing the point of all the md5 crap. If so, please enlighten me. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] credit card purchase and downloads
is that really secure? I just thought if for any reason, someone can get into my database, they can't just add usernames and file ids to my table and have access. I thought if I md5 it, then it'll be more secured. would 1 table for username-fileid really be fine? thanks, Sia Quoting Stut <[EMAIL PROTECTED]>: > [EMAIL PROTECTED] wrote: > > > Any idea if this is a good way to do this or not? any better suggestions? > is > > this secured? > > I'm confused. What's wrong with having a table containing a row per > file, then having another table containing the users. Add a third table > containing two fields, username and fileid, which contains one row per > user per file they've purchased. When they try to download a file you > check against that table. > > Maybe I'm missing the point of all the md5 crap. If so, please enlighten me. > > -Stut > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] credit card purchase and downloads
[EMAIL PROTECTED] wrote: Any idea if this is a good way to do this or not? any better suggestions? is this secured? I'm confused. What's wrong with having a table containing a row per file, then having another table containing the users. Add a third table containing two fields, username and fileid, which contains one row per user per file they've purchased. When they try to download a file you check against that table. Maybe I'm missing the point of all the md5 crap. If so, please enlighten me. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] credit card purchase and downloads
hi guys, I'm planning to add paid downloads of some speech files on one of my customers website. Basically I want people to be able to pay for a speech and then be able to download it. it's the first time I wanna do anything like this, so I was thinking to myself to do it this way: when they pay for a file, I generate a session, that includes file name and username and is in md5 format. then I store this session to a mysql database. anytime the customer wants to click on a file to download it, I'll make the same session again and check the mysql table to see if it exists. if it does, then he can download it. the problem that I can think might happen is that the file names are not changable. you can't rename a file, and if you delete it, and add another file with the same name later, it'll give access to everyone. Any idea if this is a good way to do this or not? any better suggestions? is this secured? thanks a lot, Siavash Miri -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php <-> js (was Javascript Navigation)
At 10:33 AM 4/27/2006, tedd wrote: At 9:18 AM -0700 4/27/06, Paul Novitski wrote: I believe you're seeing monsters in the closet where there are only rumpled socks. I'm not trying to see, or create monsters, I'm just trying to understand. Sorry, that was my attempt to be light-hearted and disarming~ Tedd, it almost seems as though one of your requirements for "PHP-JavaScript communication" is that there be PHP and JS scripts running continuously trading bits of information back and forth. The web model is quite different, with scripts starting up and ending with each page-load. A full-page round-trip to the server, as when you click on a hyperlink or submit a form, is one complete cycle of client-server communication. It is possible to trigger smaller increments of communication as Ajax/XMLHttpRequest demonstrates, but still each time you talk to the server you're starting a PHP script running from scratch on the server. This wake up/go to sleep model doesn't disqualify it, in my view, from constituting communication between two scripts. To me, what's needed to combine these two languages successfully is simply communication, such as: 1. A way to send information from js to php and have php act upon it. URL, querystring, form input, and cookies. Okay, I understand how js and html can communicate with php -- but, that's not the problem. My statement above was part of a symmetrical requirement regarding communication. Sorry -- "symmetrical"? Please elucidate, I'm not familiar with this term in this context. Which factors need to be the same on both sides of the Turing box lid for your criteria to be satisfied? 2. A way to send information from php to js and have js act upon it. HTML, inline script blocks, dynamic script files, and cookies. But, show me an example of php doing each of the above where js will receive the data and will act upon it. Well, first of all, JavaScript acts in the context of an HTML page. When PHP generates the page, PHP is providing JS with all the elements and attributes necessary to conduct its business. If JavaScript submits a form with particular input name/value pairs, PHP can respond by selecting data from a table and/or branching in its logic tree and generating a particular set of markup on the next page for JavaScript to operate on. PHP can output HTML markup containing data for JavaScript to operate on. PHP can output script blocks into an HTML document containing executable instructions including static and array variable definitions. PHP can dynamically supply external JavaScript files, literally cooking the JS scripting logic from server-side. For example, if php creates a cookie, then how does js know that? How can the presence of a cookie cause js to run? Gecko DOM Reference DOM:document.cookie http://developer.mozilla.org/en/docs/DOM:document.cookie Also google "javascript cookie" e.g. http://www.netspade.com/articles/2005/11/16/javascript-cookies/ Can js cycle reading cookies waiting for something to do while php crons writing them as needed -- and vise-versa? Is that a viable method of communication and activation between the two? No, because cookie values are changed only on page submit & load. To my knowledge, XMLHttpRequest is the only way for JavaScript to request & receive PHP data during a single page-view. (Well, there is another way: JavaScript can create an Image object on the fly with a PHP script as the SRC and data on the quesrystring, but I haven't taken the trouble to cook up a scheme for PHP to deliver and JavaScript to extract information from an image bitstream so in my work this is a one-way communication channel.) This demonstrates that a single, continuously-executing JavaScript program can wait for responses from the server. The opposite is clearly true in principle -- the server's operating system waits for the next HTTP request from the client -- although I suspect that it would be excessively and unnecessarily burdensome on the server to have a PHP script continue to execute in anticipation of the next client request. Much more efficient to have the operating system wake up the PHP interpreter and execute a script only when one flies in the window. Is there anything that php can do that will initiate a js routine? As far as I know (limited as I am) php can't even detect if js is present, or not, let alone cause a javascript routine to run -- is that not correct? If not, please give me an example of where php can make js run. PHP can initiate JavaScript execution simply by downloading an HTML page that contains JS script set to execute immediately or on a given event. Every time JavaScript runs in a page generated by PHP, PHP is essentially telling the JavaScript interpreter in the browser to execute the contained or linked script. PHP can select a particular JS function to execute based on various criteria by downloading code
Re: [PHP] Recommended PHP frameworks
2006/4/27, Robert Cummings <[EMAIL PROTECTED]>: > > A funny PHPClasses article... > > > http://www.phpclasses.org/blog/post/52-Recommended-PHP-frameworks.html One thing I understood after hitting my head many times to a wall is that "a good idea can be, and should be, explained in just three lines of text", that's all you need, that's all they will hear from you. This article goes beyond that limit by far, if it was a good idea, the author still doesn't understand it completely. I find it telling that the guy who runs the PHP Classes site only uses > his own code *lol*. Oh btw, the article says virtually nothing useful > about frameworks, but it does go a long way to pimp Manuel's own classes > -- another oddity considering it leads with a blurb about recognizing > bias when you read it ;;) I want my 5 minutes back!! All those hours wasted in unlikely usable ideas will come back to you when you accidentally stumble into just one good idea, which can be either yours or someone's else (hopefully this person still doesn't have the copyright ;-) ) Cheers, > Rob. > -- > .. > | InterJinn Application Framework - http://www.interjinn.com | > :: > | An application and templating framework for PHP. Boasting | > | a powerful, scalable system for accessing system services | > | such as forms, properties, sessions, and caches. InterJinn | > | also provides an extremely flexible architecture for | > | creating re-usable components quickly and easily. | > `' > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Creating Open Office Docs with PHP
I've got a class that I downloaded from phpclasses for making M$ Word and Excel Documents on the fly... Wolf Leonard Burton wrote: > Hi All, > > Has anyone here used PHP to create Open Office docs on the fly? > > -- > Leonard Burton, N9URK > [EMAIL PROTECTED] > > "The prolonged evacuation would have dramatically affected the > survivability of the occupants." > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: forms and dynamic creation and unique field names
2006/4/27, Jason Gerfen <[EMAIL PROTECTED]>: > > Oops, I thought there might be an array function that would be better to > use then foreach loops. Thanks. There are other functions (check the Array Functions section in the manual), but they just don't get along with the KISS principle. Dave Goodchild wrote: > > >Foreach. Please try and read the manual, this is very basic stuff that > could > >be gleaned in 5 minutes. > > > >On 27/04/06, Barry <[EMAIL PROTECTED]> wrote: > > > > > >>Jason Gerfen schrieb: > >> > >> > >>>I have come upon a problem and am not sure how to go about resolving > >>>it. I have an web form which is generated dynamically from an imported > >>>file and I am not sure how I can loop over the resulting post variables > >>>within the global $_POST array due to the array keys not being numeric. > >>>Any pointers are appreciated. > >>> > >>> > >>> > >>foreach? > >> > >>-- > >>Smileys rule (cX.x)C --o(^_^o) > >>Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) > >> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > >> > >> > > > > > >-- > >http://www.web-buddha.co.uk > > > >dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) > > > >look out for project karma, our new venture, coming soon! > > > > > > > > > -- > Jason Gerfen > > "You will never be ready for me." > ~ Me > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] how to get the absolute path of an included file?
2006/4/27, Bing Du <[EMAIL PROTECTED]>: > > Hello, > > Here are the two scripts. The result is 'var is' rather than 'var is > foo'. My suspect is I did not set the file path right in 'include'. So > in file2.php, how should I get the actual absolute path it really gets for > file1.php? Is it stored in some environment variable or something? I'd > appreciate any help. > > file1.php > > == > $var = 'foo'; > ?> > == > > file2.php > > == > > include '/some/path/file1.php'; > echo "var is $var"; > ?> > == > > Thanks, > > Bing > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Activate reporting of all errors either through php.ini or error_reporting(E_ALL); Use include_once instead of include. That way the program will stop if it couldn't include the file. Try using a relative path to the file.
Re: [PHP] php <-> js (was Javascript Navigation)
On Thu, 2006-04-27 at 13:33, tedd wrote: > At 9:18 AM -0700 4/27/06, Paul Novitski wrote: > > Okay, I understand how js and html can communicate with php -- but, > that's not the problem. My statement above was part of a symmetrical > requirement regarding communication. Communication need not be symmetrical. All that is required is that each end understand one another. > >>2. A way to send information from php to js and have js act upon it. > > > >HTML, inline script blocks, dynamic script files, and cookies. > > But, show me an example of php doing each of the above where js will > receive the data and will act upon it. See google maps or google suggest for excellent examples. > For example, if php creates a cookie, then how does js know that? How > can the presence of a cookie cause js to run? JS I do believe has access to the cookie. Either way, PHP is perfectly cable of informing JS of the cookie. > Can js cycle reading cookies waiting for something to do while php > crons writing them as needed -- and vise-versa? Is that a viable > method of communication and activation between the two? Js can cycle, I don't suggest a while loop, it is better to use the system timer to do periodic polling. > Is there anything that php can do that will initiate a js routine? As Yes: echo << goBabyGo(); Why are you staring at me? WAHOOEY; > far as I know (limited as I am) php can't even detect if js is > present, or not, let alone cause a javascript routine to run -- is > that not correct? If not, please give me an example of where php can > make js run. You're thinking is erroneous. PHP can indeed detect if JavaScript is present. And as shown above it can cause a JavaScript routine to run. If someone disable's JavaScript, that is not the problem of PHP, that is akin to trying to run MS Winblows binaries under linux or vice versa -- the environment must be sane for the program to run. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
D. Dante Lorenso escribió: Gonzalo Monzón wrote: I've been developing desktop applications with PHP-GTK since 2002, far beyond the web script context, and in the more complex projects I did, was a must to implement multi-process and IPC communication due to the lack of threading in PHP, as to deal with some issues like multiple tcp clients, multiple tcp server with a proxy to the application data, webservices, handling UI, and a lot more stuff, while doing "realtime" (the more realtime I was able of) processing of all incoming and outgoing data, for more than 24 hours long running time. Yes, I was able to be successful with such a developement after a lot of pain, but it is not likely the most common usage for PHP. I finally had to implement several parts in C, embedding PHP, and really, I was not happy of to cope with that, but I did not have the time to switch to another language as I had to re-use a lot of existing code that worked smooth with a multi-process approach, but without the need of so long running time, so many tcp clients, and so many data... I had to implement data containers in using C structures, as handling all that data from PHP taken more than 500Mb of RAM in no more than 8 hours of processing, interprocess syncronization mechanisms, and a lot more stuff. Sounds to me like you are in my boat! I have done some similar work to create a multi-process beast. Here is an OO.o Presenter presentation I did for the Dallas PHP User's Group back in December of 2005: http://dantescode.com/docs/DPUG%20-%20PHP%20Server%20Applications.odp Perhaps this will shed a little light on my very similar solution. Seems to me we could benefit from having some kind of threading support in the language to avoid all the headache of each of us building the same code to solve a similar problem. I'm sure there are others like yourself. Dante Yeah, but I'm pretty sure of that each of us have our unique needs, and only a complete threading support and safety for PHP and all the extensions would avoid our headaches... and that's not likely to happen soon. Sorry but I don't have a Linux box at hand where to install OO presenter, perhaps you could send me a pdf so us, poor Windows users, could have a look at it? I will tell you more about my story... Sorry for the length but... I haven't got the time right now to make it shorter. :-) The application I was talking about is not web-based but a PHP-GTK one, no server side scripting, only cli, so I guess we are in the same boat, yes, we are, but with very different needs and approaches. I'll say in advance that I was not able to use any SQL database server or web based processing for this application, due to project requirements... My application was mostly based on GTK timers and UI event callbacks. For inter-process comunication, I had to implement a lot of different approaches to ensure the best reliability. Some kind of processing requiered to use syncronized shared memory, other kind used simple win32api IPC calls... etc. Each kind of task requiered different approaches, for little data size overhead, for fast or low response times, and most of these are lot easier to implement using multi-threading and simple syncronization mechanisms, as I do now in my new developement environment, once switched language for almost all the system, with no more headaches or over complexities due to not be using the right tool for the job. I really had to switch language as I was not likely to improve more the system performance as to be able to evolve in the right way for the future -and i don't want to thought anymore about memory leaks issues I had to workaround-. I never thought I would need to evolve my system like to develop such a "beast": once I finished that development and start to grasp and worry about what would be the next requirements for the system, I was afraid of: What will I do if do I must handle not 15 clients but 25? how many tcp servers? and perhaps not 150.000 registers but 300.000 per hour? yes, these requirements now are real. Before all these troubles, when my system "only" needed to handle 5 clients, 3 servers, no more than 10 processes, and about 65.000 registers per hour, for no more than 3 hours long, I had almost no headaches... and was quite happy using PHP... :-) I thought you people must say I'm a fool trying to use PHP for such a system... I never thought of developing such a system with PHP-GTK... until I had to do it for "yesterday" and haven't got the opportunity to say "NO"... lets do it the right way: use a language not designed for web scripting... we need multithreading and the speed of compiled code !! don't care if we need 6 months more for development !!! :-) Only real support for thread safety can avoid such a nightmare, but that dont seems to happen until... who knows? PHP 8? :-) I think threading is really a very hard thing to add to a lan
[PHP] Creating Open Office Docs with PHP
Hi All, Has anyone here used PHP to create Open Office docs on the fly? -- Leonard Burton, N9URK [EMAIL PROTECTED] "The prolonged evacuation would have dramatically affected the survivability of the occupants." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php <-> js (was Javascript Navigation)
At 9:18 AM -0700 4/27/06, Paul Novitski wrote: I believe you're seeing monsters in the closet where there are only rumpled socks. I'm not trying to see, or create monsters, I'm just trying to understand. To me, what's needed to combine these two languages successfully is simply communication, such as: 1. A way to send information from js to php and have php act upon it. URL, querystring, form input, and cookies. Okay, I understand how js and html can communicate with php -- but, that's not the problem. My statement above was part of a symmetrical requirement regarding communication. 2. A way to send information from php to js and have js act upon it. HTML, inline script blocks, dynamic script files, and cookies. But, show me an example of php doing each of the above where js will receive the data and will act upon it. For example, if php creates a cookie, then how does js know that? How can the presence of a cookie cause js to run? Can js cycle reading cookies waiting for something to do while php crons writing them as needed -- and vise-versa? Is that a viable method of communication and activation between the two? Is there anything that php can do that will initiate a js routine? As far as I know (limited as I am) php can't even detect if js is present, or not, let alone cause a javascript routine to run -- is that not correct? If not, please give me an example of where php can make js run. Thanks. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New Help with Javascript Navigation
<""Gerry D"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Interesting discussions... :)> I see two issues: 1. if you are exposing php scripts to the client, how does the server side processing know what it should do and what the client should see? 2. and why can't JS write to the client's file system? Or read from files? "Come to my website and let me first read all your private information, then trash it..." Hackers and other cyber vandals would love you to implement this "feature"... LOL Isn't that "feature" called ActiveX?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bug madness
On Thu, 2006-04-27 at 10:48 -0500, Jeremy Schreckhise wrote: > Have you tried? > > error_reporting(E_ALL^E_NOTICE); Surely you mean error_reporting(E_ALL);? If one of my team members ships code that does not pass through on E_ALL (or E_STRICT), they get a beating. Now, back to the problem at hand... Are you 100% certain that your sendmail binary is available and the correct path set? I presume you are using the native mail() function? Thats probably where you are having issues. Also your script may be timing out because sendmail can't resolve a FQDN or something? --Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php <-> js (was Javascript Navigation)
At 08:03 AM 4/27/2006, tedd wrote: Forgive me my simplicity, but trying to tie communication between php with javascript is like trying to get the past and future to talk to each other -- they exist at different times. Normally, php is history when js steps on the stage and while js may say a few lines to php (i.e., Alas Poor Yorrick, I Knew Him ...), there isn't any real dialog. Additionally, with regard to the web, their activations are different. JS listens and responds to user activities whereas php only responds to a limited set of prompts. Ajax appears to blur the distinction somewhat, but it's still nothing more than a call from js to php and js has no idea if php's task was successful, or not. In other words, there is no real two-way communication. To me, what's needed to combine these two languages successfully is simply communication, such as: 1. A way to send information from js to php and have php act upon it. 2. A way to send information from php to js and have js act upon it. Then one of the two languages (most likely js) would need to have some sort of repeating polling mechanism where instructions could be handled -- an event loop. But Tedd, this is how so many web applications work now: PHP generates pages in which and on which JavaScript acts, and JavaScript helps direct to URLS, forms querystrings, and post form input back to the server. It's true that PHP can't know whether JavaScript will be running in the next page it delivers, so it has to generate pages that will be fully functional even if there's no one to talk to. It's easy to build in semaphores that let PHP know whether or not JavaScript was running in the page last posted, although as we know it should validate all the incoming data and not DEPEND on client-side scripting for anything. It's true that part of JavaScript's mandate is real-time user interaction which PHP can't touch, and part of PHP's mandate is file manipulation that JavaScript can't perform. So what? It's commonplace for different components of a complex system to have discrete functional domains. For what it's worth the two languages also share capabilities, such as creating and manipulating document elements, strings, and arithmetic calculations. The fact that their domains aren't identical is hardly a show-killer. To me, what's needed to combine these two languages successfully is simply communication, such as: 1. A way to send information from js to php and have php act upon it. URL, querystring, form input, and cookies. 2. A way to send information from php to js and have js act upon it. HTML, inline script blocks, dynamic script files, and cookies. I believe you're seeing monsters in the closet where there are only rumpled socks. Warm regards, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Recommended PHP frameworks
A funny PHPClasses article... http://www.phpclasses.org/blog/post/52-Recommended-PHP-frameworks.html I find it telling that the guy who runs the PHP Classes site only uses his own code *lol*. Oh btw, the article says virtually nothing useful about frameworks, but it does go a long way to pimp Manuel's own classes -- another oddity considering it leads with a blurb about recognizing bias when you read it ;;) I want my 5 minutes back!! Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bug madness
Have you tried? error_reporting(E_ALL^E_NOTICE); Jeremy Schreckhise, M.B.A. -Original Message- From: Dave Goodchild [mailto:[EMAIL PROTECTED] Sent: Thursday, April 27, 2006 10:37 AM To: php-general@lists.php.net Subject: [PHP] Bug madness Hi all, I have been mashing my head trying to debug a web app I have written, the deadline is tomorrow and after implementing some changes a subtle and difficult-to-pin-down bug has emerged. I am not going to include code as there is too much of it, but here is the general issue: The app consists of three linked forms and three modules that process the data passed in from the forms. All was sweet and perfect before today. The forms are self-reloading, and after the data is checked, validated and entered into the database the form is supposed to display a thank you section. As part of the processing process (!), the scripts assemble and send multipart mails to the entrants. Now, when I submit the forms, I see a blank page - nothing, no html, no error messages. I have added debugging functions at each point to track the logic and they inform me that the processing functions get to the end (where the mails are sent) where they should return to the caller (ie the form). This does not happen. I have display_errors enabled and cannot seem to locate the source of this issue. Ambiguous I know, but it may be a recognisable issue to many of you, in which case any advice would be greatly appreciated. I am extremely calm. -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) look out for project karma, our new venture, coming soon! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
Gonzalo Monzón wrote: I've been developing desktop applications with PHP-GTK since 2002, far beyond the web script context, and in the more complex projects I did, was a must to implement multi-process and IPC communication due to the lack of threading in PHP, as to deal with some issues like multiple tcp clients, multiple tcp server with a proxy to the application data, webservices, handling UI, and a lot more stuff, while doing "realtime" (the more realtime I was able of) processing of all incoming and outgoing data, for more than 24 hours long running time. Yes, I was able to be successful with such a developement after a lot of pain, but it is not likely the most common usage for PHP. I finally had to implement several parts in C, embedding PHP, and really, I was not happy of to cope with that, but I did not have the time to switch to another language as I had to re-use a lot of existing code that worked smooth with a multi-process approach, but without the need of so long running time, so many tcp clients, and so many data... I had to implement data containers in using C structures, as handling all that data from PHP taken more than 500Mb of RAM in no more than 8 hours of processing, interprocess syncronization mechanisms, and a lot more stuff. Sounds to me like you are in my boat! I have done some similar work to create a multi-process beast. Here is an OO.o Presenter presentation I did for the Dallas PHP User's Group back in December of 2005: http://dantescode.com/docs/DPUG%20-%20PHP%20Server%20Applications.odp Perhaps this will shed a little light on my very similar solution. Seems to me we could benefit from having some kind of threading support in the language to avoid all the headache of each of us building the same code to solve a similar problem. I'm sure there are others like yourself. Dante -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New Help with Javascript Navigation
On Thu, 2006-04-27 at 12:36, Weber Sites LTD wrote: > I know I'm going to get heat for this example > So cool down, it's just an example :) > > Do you mean something like : > http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20060119AtlasN > K/manifest.xml > Only for PHP? I didn't learn much: We're sorry, the page you are viewing requires a media player plug-in that is not available for this browser. Plug-ins are available for Netscape 4.7x and the latest version of Microsoft(R) Internet Explorer.Internet Explorer Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php <-> js (was Javascript Navigation)
On Thu, 2006-04-27 at 11:09, Barry wrote: > tedd schrieb: > > Hi gang: > Gang? You know... Scooby, Shaggy, and Mary-Jane. > > 1. A way to send information from js to php and have php act upon it. > > Java ... Sucks. > > 2. A way to send information from php to js and have js act upon it. > > Java ... Sucks :) 1 and 2 are completely covered by Ajax technologies. JS can push information to your PHP scripts (user input, status information, whatever). PHP in turn can return as much information -- including whether PHP's task was successful. Additionally, JavaScript can do polling already, it's just a big loop. But it also does event-driven based on user input/timers so it's not lacking anything. JavaScript can already be desk-top-like, the only difference is that the browsers all have their own quirks, and due to the stateless nature of the Web the state must be maintained both in JavaScript and in PHP. This is just business as usual. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bug madness
Hi all, I have been mashing my head trying to debug a web app I have written, the deadline is tomorrow and after implementing some changes a subtle and difficult-to-pin-down bug has emerged. I am not going to include code as there is too much of it, but here is the general issue: The app consists of three linked forms and three modules that process the data passed in from the forms. All was sweet and perfect before today. The forms are self-reloading, and after the data is checked, validated and entered into the database the form is supposed to display a thank you section. As part of the processing process (!), the scripts assemble and send multipart mails to the entrants. Now, when I submit the forms, I see a blank page - nothing, no html, no error messages. I have added debugging functions at each point to track the logic and they inform me that the processing functions get to the end (where the mails are sent) where they should return to the caller (ie the form). This does not happen. I have display_errors enabled and cannot seem to locate the source of this issue. Ambiguous I know, but it may be a recognisable issue to many of you, in which case any advice would be greatly appreciated. I am extremely calm. -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) look out for project karma, our new venture, coming soon!
RE: [PHP] New Help with Javascript Navigation
I know I'm going to get heat for this example So cool down, it's just an example :) Do you mean something like : http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20060119AtlasN K/manifest.xml Only for PHP? berber -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 26, 2006 11:37 PM To: php-general@lists.php.net Subject: Re: [PHP] New Help with Javascript Navigation At 01:36 PM 4/26/2006, Warren Vail wrote: "PHP appears to me to be incomplete unless it can provide a way to provide client (browser) side executables in a consistent language, namely PHP. Developers get all excited about the elegence of the PHP language, and somewhere along the way they discover they have been sandbagged (they have to learn Javascipt too, if they want responsive GUI's). "One solution would be to develop a PHP Plugin and support that for all the browsers out there, but another just occurred to me. What if there was a function that accepted PHP code as input and tranlated it to Javascript, returning the resulting text ready for imbedding in html?" Nice idea, although "sandbagged" sounds like an exageration: becoming fluent in both PHP & JavaScript is hardly a major life challenge. When I finally learned PHP I was delighted at how syntactically similar it was to JavaScript, compared say to the difference between JavaScript & VBscript. Perhaps my most common mistake in writing in both PH & JS is that I tend to use . as a concatenation operator in JavaScript these days... At 02:16 PM 4/26/2006, Evan Priestley wrote: "No, I'm saying that Javascript can't read or write files on the client's machine, and that this is only one of a large number of basic limitations in the language's capabilities. It would be possible to write a script which took "$a = 3" and converted it into "var a = 3", but a huge number of PHP functions either can't be implemented in Javascript (file_get_contents) or are fundamentally unsafe to implement in Javascript (mysql_query), so you'd end up with a language you couldn't do anything with." To the contrary, client-side PHP would simply be a different environment from server-side PHP -- of course certain functions wouldn't apply and others would that aren't relevant to server-side PHP, but that's not rocket science. The point would be to use the same syntax in both contexts. Relevant to this discussion, there is a set of PHP DOM functions (native to the core) that look like they match with the corresponding JavaScript functions pretty closely: http://php.net/dom I haven't used them yet, but the function names look familiar. The way I might implement such a PHP->JavaScript translation might look like this: where phpToJavaScript.php is the translation program and myscript.php is the "client-side PHP" script to be translated to JavaScript. Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php <-> js (was Javascript Navigation)
At 5:09 PM +0200 4/27/06, Barry wrote: tedd schrieb: Hi gang: Gang? Gang, group, clan, community, organization, hive, pod, assembly, biocenosis -- what do you want to be called? 1. A way to send information from js to php and have php act upon it. Java 2. A way to send information from php to js and have js act upon it. Java Show me. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
Gonzalo Monzón schrieb: I forgot to put some final note into my last message. PHP can be good for a lot of things, but not really for other. Yeah true (o_O) -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
Stut wrote: D. Dante Lorenso wrote: IMHO, if your main goal is to allow your threaded app to reuse existing PHP classes then your best bet is to investigate embedding PHP into something written in C or C++. This is a very good point. I have also been looking into the idea pitched a few years ago about SRM -- Script Running Machine. There was a site set up here that held some promise: http://www.vl-srm.net/ The last post I can see here is dated 2004 and is one of those statements which claim that the project is not yet dead. Usually statements like that tend to forecast the eminent demise of the project. Since there have been no updates to the site in 1.5 years, I conclude that it is in fact dead. SRM sold promise of creating an application server for PHP. This smells a little bit like Tomcat or JBoss and so was very much of interest. The current beta of SRM is designed for PHP 4, though and I want to be at bleading edge PHP 5 with XMLWriter and PDO etc. As I investigate my options, SRM is on the list as a potential area to explore further or somehow to revive as a project. Dante -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Natural order of things.
Never tried it mysql, but I am led to believe that sorting based on the result of the mysql SOUNDEX function may produce the results you want. Other than that, as far as I am aware there is no way to do this in MySQL without writing a stored procedure to do it. -Stut -Stut: Damn, that produces some very strange results, like: Lucerne 7 Lucerne 1 Lucerne 3 Lucerne 2 Lucerne 8 Lucerne 9 Lucerne 12 Lucerne 10 Meersburg Castle 8 Meersburg Castle 4 Meersburg Castle 9 Meersburg Castle 12 Meersburg Castle 11 Meersburg Castle 10 Meersburg Castle 2 Meersburg Castle 3 Meersburg Castle 1 But, it was a good suggestion. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] forms and dynamic creation and unique field names
Jason Gerfen schrieb: Martin Zvarík wrote: Jason Gerfen wrote: I have come upon a problem and am not sure how to go about resolving it. I have an web form which is generated dynamically from an imported file and I am not sure how I can loop over the resulting post variables within the global $_POST array due to the array keys not being numeric. Any pointers are appreciated. "You will never be ready for me." ~ Me Hahah... HAHA... O_o -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: forms and dynamic creation and unique field names
Oops, I thought there might be an array function that would be better to use then foreach loops. Thanks. Dave Goodchild wrote: Foreach. Please try and read the manual, this is very basic stuff that could be gleaned in 5 minutes. On 27/04/06, Barry <[EMAIL PROTECTED]> wrote: Jason Gerfen schrieb: I have come upon a problem and am not sure how to go about resolving it. I have an web form which is generated dynamically from an imported file and I am not sure how I can loop over the resulting post variables within the global $_POST array due to the array keys not being numeric. Any pointers are appreciated. foreach? -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) look out for project karma, our new venture, coming soon! -- Jason Gerfen "You will never be ready for me." ~ Me -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to get the absolute path of an included file?
Brad Bonkoski schrieb: Bing Du wrote: Hello, Here are the two scripts. The result is 'var is' rather than 'var is foo'. My suspect is I did not set the file path right in 'include'. So in file2.php, how should I get the actual absolute path it really gets for file1.php? Is it stored in some environment variable or something? I'd appreciate any help. file1.php == == file2.php == global $var; //you have to declare it as a global otherwise it will assume a local value nonsense. Only for functions and such. If it's in the same folder why dont you use include ("file2.php"); ? Otherwise youse pathes like ../subfolder/folder Only if you really want to load stuff thats not at the web directory use full pathes like /path/to/folder Barry -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] forms and dynamic creation and unique field names
Martin Zvarík wrote: Jason Gerfen wrote: I have come upon a problem and am not sure how to go about resolving it. I have an web form which is generated dynamically from an imported file and I am not sure how I can loop over the resulting post variables within the global $_POST array due to the array keys not being numeric. Any pointers are appreciated. "You will never be ready for me." ~ Me Hahah... HAHA... -- Jason Gerfen "You will never be ready for me." ~ Me -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how to get the absolute path of an included file?
On 27 April 2006 15:25, Brad Bonkoski wrote: > Bing Du wrote: > > > Hello, > > > > Here are the two scripts. The result is 'var is' rather than 'var > > is foo'. My suspect is I did not set the file path right in > > 'include'. So in file2.php, how should I get the actual absolute > > path it really gets for file1.php? Is it stored in some > > environment variable or something? I'd appreciate any help. > > > > file1.php > > > > == > > > $var = 'foo'; > > > > > == > > > > file2.php > > > > == > > > > > include '/some/path/file1.php'; > > > > > global $var; //you have to declare it as a global otherwise it will > assume a local value Complete twaddle. That only applies for functions. This is likely to be, as Bing deduced, a path error on the include filename. Bear in mind that include works relative to your file-system's root, not your Web site's document root -- so is the filename you're using an absolute path in your file-system? And, whilst we're at it, have you got display_errors=On and error_reporting=E_ALL so that you see all error reports, including warnings. Odds on this will give you some sort of clue. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php <-> js (was Javascript Navigation)
tedd schrieb: Hi gang: Gang? 1. A way to send information from js to php and have php act upon it. Java 2. A way to send information from php to js and have js act upon it. Java -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: forms and dynamic creation and unique field names
Foreach. Please try and read the manual, this is very basic stuff that could be gleaned in 5 minutes. On 27/04/06, Barry <[EMAIL PROTECTED]> wrote: > > Jason Gerfen schrieb: > > I have come upon a problem and am not sure how to go about resolving > > it. I have an web form which is generated dynamically from an imported > > file and I am not sure how I can loop over the resulting post variables > > within the global $_POST array due to the array keys not being numeric. > > Any pointers are appreciated. > > > foreach? > > -- > Smileys rule (cX.x)C --o(^_^o) > Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) look out for project karma, our new venture, coming soon!
[PHP] php <-> js (was Javascript Navigation)
Hi gang: I changed the subject line, because I consider the topic important. Forgive me my simplicity, but trying to tie communication between php with javascript is like trying to get the past and future to talk to each other -- they exist at different times. Normally, php is history when js steps on the stage and while js may say a few lines to php (i.e., Alas Poor Yorrick, I Knew Him ...), there isn't any real dialog. Additionally, with regard to the web, their activations are different. JS listens and responds to user activities whereas php only responds to a limited set of prompts. Ajax appears to blur the distinction somewhat, but it's still nothing more than a call from js to php and js has no idea if php's task was successful, or not. In other words, there is no real two-way communication. To me, what's needed to combine these two languages successfully is simply communication, such as: 1. A way to send information from js to php and have php act upon it. 2. A way to send information from php to js and have js act upon it. Then one of the two languages (most likely js) would need to have some sort of repeating polling mechanism where instructions could be handled -- an event loop. When you have that, then you'll have the makings of a language that can develop real "desk-top-like" web applications. But, that's my view. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] forms and dynamic creation and unique field names
Jason Gerfen wrote: I have come upon a problem and am not sure how to go about resolving it. I have an web form which is generated dynamically from an imported file and I am not sure how I can loop over the resulting post variables within the global $_POST array due to the array keys not being numeric. Any pointers are appreciated. "You will never be ready for me." ~ Me Hahah... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: forms and dynamic creation and unique field names
Jason Gerfen schrieb: I have come upon a problem and am not sure how to go about resolving it. I have an web form which is generated dynamically from an imported file and I am not sure how I can loop over the resulting post variables within the global $_POST array due to the array keys not being numeric. Any pointers are appreciated. foreach? -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] forms and dynamic creation and unique field names
I have come upon a problem and am not sure how to go about resolving it. I have an web form which is generated dynamically from an imported file and I am not sure how I can loop over the resulting post variables within the global $_POST array due to the array keys not being numeric. Any pointers are appreciated. -- Jason Gerfen "You will never be ready for me." ~ Me -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to get the absolute path of an included file?
Bing Du wrote: Hello, Here are the two scripts. The result is 'var is' rather than 'var is foo'. My suspect is I did not set the file path right in 'include'. So in file2.php, how should I get the actual absolute path it really gets for file1.php? Is it stored in some environment variable or something? I'd appreciate any help. file1.php == == file2.php == global $var; //you have to declare it as a global otherwise it will assume a local value echo "var is $var"; ?> == Thanks, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to get the absolute path of an included file?
Hello, Here are the two scripts. The result is 'var is' rather than 'var is foo'. My suspect is I did not set the file path right in 'include'. So in file2.php, how should I get the actual absolute path it really gets for file1.php? Is it stored in some environment variable or something? I'd appreciate any help. file1.php == == file2.php == == Thanks, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading pic
getimagesize() can obtain the image type as well as the dimensions of the image. Once the file is uploaded us this to check the extension is correct and that the image is not too large. php.net/getimagesize Andrew - Original Message - From: "Rosen" <[EMAIL PROTECTED]> To: Sent: Thursday, April 27, 2006 2:15 PM Subject: [PHP] Uploading pic Hi, I have this problem with uploading images: I try several PHP classes for upload of files on server ( pictures in my case ), but if some user only renames some file as ".jpg" the script uploads the file even the file format is not .jpg - i.e. - file "test.mpg" - the user renames it to "test.jpg" - and the script upload it on server. Of course after this the website don't show any pi - it shows like pic does not exists. I need also to control the dimension of pictures ( in pixels), size in kb and type of files ( .gif, .jpg ). Is there a way to do this with some script ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
I forgot to put some final note into my last message. PHP can be good for a lot of things, but not really for other. Wonder when requirements grow long in some ways you could not ever expect in a project like your's: A simple example: need 5 concurrent connections in your "hacked" multi-process server, that could be easily done in PHP, and, you could probably live with it in some circumstances. But do you wonder what could happen with your system if tomorrow you need to handle, let's say, 500 or 1000 concurrent connections? yeah, you will tell me that your software was not designed for that, or because PHP has no threading... Having that in mind, you must think seriously about the future of your application, because switching today can save you a lot of time waste tomorrow, like happened to me with one project. PHP was great for lots of projects I did, but if in the past I could only realize a bit of what I should have to do later, I definitely had switched immediatly before starting that developement, as I have done anyway later... the requirements for my applications grown more and gone far beyond what I ever expected... :-) but who knows that in advance? I continue using PHP for a lot of tasks, tasks I know in the future won't requiere me to climb a mountain, being over its limits... because it was not the right tool to use for the job. Hope my comments can help you in your thoughts of standarizing on a single codebase and language... :-) Gonzalo Gonzalo Monzón escribió: D. Dante Lorenso escribió: Gonzalo Monzón wrote: Use Python, it is the way to go if you're willing to use mt :-) I've already written the multi-threaded server using Java. I want to do this in PHP, however, because the PHP "threads" can re-use PHP classes I've already written and hence standardize on a single codebase and language. Many other languages have threads (Java, C#, Python, Ruby, etc) ... which is why I'm so amazed PHP does not even list Threads as a priority. You simply can't be an enterprise language without these basic features. Of course, don't get me started on namespaces too ;-) No, choosing a different language has been considered and I'd rather continue with my hacked multi-process PHP server solution before I am ready to change to a different language. Dante Sorry, but no PHP "threads" can re-use any PHP classes, as threads are not implemented yet... maybe until PHP 8 :-) Threading isn't a trivial task, and if you MUST use it (I don't think so) you should develop some extension or take other approaches like embedding, and code all your threading needs apart from PHP, in C. But be careful interacting from that code to PHP. Or, perhaps switch to another language, if you can't cope with that. I've been developing desktop applications with PHP-GTK since 2002, far beyond the web script context, and in the more complex projects I did, was a must to implement multi-process and IPC communication due to the lack of threading in PHP, as to deal with some issues like multiple tcp clients, multiple tcp server with a proxy to the application data, webservices, handling UI, and a lot more stuff, while doing "realtime" (the more realtime I was able of) processing of all incoming and outgoing data, for more than 24 hours long running time. Yes, I was able to be successful with such a developement after a lot of pain, but it is not likely the most common usage for PHP. I finally had to implement several parts in C, embedding PHP, and really, I was not happy of to cope with that, but I did not have the time to switch to another language as I had to re-use a lot of existing code that worked smooth with a multi-process approach, but without the need of so long running time, so many tcp clients, and so many data... I had to implement data containers in using C structures, as handling all that data from PHP taken more than 500Mb of RAM in no more than 8 hours of processing, interprocess syncronization mechanisms, and a lot more stuff. In my case, multi threading was a real need I had to workaround. I think this is a real life example of PHP being expanded far beyond web paradigms or simple shell scripts, without any multi-threading support. But PHP is not thought in any case to be used for such applications... (I'm talking about desktop applications, not web script applications), with or without multithreading. If you'd like to use mt in your applications or web scripts, better switch to some other language, or search for alternative ways of implementation as you did with a multi-process approach. PHP its a great language, but it isn't the right tool for anything. Gonzalo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php_gd2.dll not found
> On 26 April 2006 22:46, Ari Davidow wrote: > > > > > Anomaly 2: > > > > > > > > When I do a "phpinfo();" to see what is actually loaded > (and to > > > > ensure that the correct php.ini is being loaded, etc.), > among the > > > > info is the notice that I am using php 5.0.3-dev. I get > the same > > > > info when I telnet to localhost. > > This means you have an old php5ts.dll that is being loaded in > preference to the one for 5.1.2. > > Locate it and delete it. > > This may also fix your other problems. Bingo. I had downloaded older versions of that and other mysql-related files from http://www.siteinaweek.com/installphp5/howto.php#apache while trying to get the PHP-MySQL connection working. Using the current versions from the current PHP download (it looks like only php5ts.dll had a different size, so the other files may be the same, just recompiled later from the same code) fixed the problem. I now show the correct version and there are no further php_gd2.dll errors. This sequence may also explain why this problem is so obscure. Many thanks, ari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Uploading pic
Hi, I have this problem with uploading images: I try several PHP classes for upload of files on server ( pictures in my case ), but if some user only renames some file as ".jpg" the script uploads the file even the file format is not .jpg - i.e. - file "test.mpg" - the user renames it to "test.jpg" - and the script upload it on server. Of course after this the website don't show any pi - it shows like pic does not exists. I need also to control the dimension of pictures ( in pixels), size in kb and type of files ( .gif, .jpg ). Is there a way to do this with some script ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New Help with Javascript Navigation
Interesting discussions... :) I see two issues: 1. if you are exposing php scripts to the client, how does the server side processing know what it should do and what the client should see? 2. and why can't JS write to the client's file system? Or read from files? "Come to my website and let me first read all your private information, then trash it..." Hackers and other cyber vandals would love you to implement this "feature"... LOL Gerry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session
Solved !!! THX everybody !! Problem was in php.ini file session section DS -Original Message- From: Ford, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, April 27, 2006 2:18 PM To: php-general@lists.php.net Subject: RE: [PHP] session On 26 April 2006 15:02, chris smith wrote: > > Can you explicitly pass the sessionid across: > > > > > > > ? That technique may or may not be the solution, but if it is it should be simply: This is precisely what the SID constant is provided for, and as such it contains the entire session_name=session_id string. As a bonus, it's defined as the null string when the session id is being propagated in a cookie, so it can be included unconditionally where needed. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] error message
I am running an old version of PHP for winblows 4.3.8. I cannot upgrade to 4.4.2 yet. I rebooted the web server and the box. I am not doing any exception handling. I want the errors to be writtent to a log but instead they keep showing in the browser. Is there something I am missing? I did set display_errors to off in the php.ini file. Thanks, cybm On 4/26/06, Jason Barnett <[EMAIL PROTECTED]> wrote: > > Let's not open an error report just yet... there are already too many > "bugs" in the database! A snippet of the relevant code would be nice > though. > > Perhaps your odbc_errormsg($conn) is being echo'd to stdout? Or you are > using those fun Exception beasts? > > > On 4/26/06, chris smith <[EMAIL PROTECTED]> wrote: > > > On 4/27/06, cybermalandro cybermalandro <[EMAIL PROTECTED]> wrote: > > I have set in display_errors = off on my php.ini but I can still see > ODBC > > related error messages when I try to duplicate an ODBC error. Am I > missing > > something to turn this off? > > Can you produce a small test case? Maybe post a bug report: > http://bugs.php.net > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >
Re: [PHP] I want to write a Multi-threaded PHP Application
D. Dante Lorenso wrote: I've already written the multi-threaded server using Java. I want to do this in PHP, however, because the PHP "threads" can re-use PHP classes I've already written and hence standardize on a single codebase and language. Many other languages have threads (Java, C#, Python, Ruby, etc) ... which is why I'm so amazed PHP does not even list Threads as a priority. You simply can't be an enterprise language without these basic features. Of course, don't get me started on namespaces too ;-) No, choosing a different language has been considered and I'd rather continue with my hacked multi-process PHP server solution before I am ready to change to a different language. As many other posters have pointed out, PHP does not support threads, and is not likely to in the near future. It's not a 'basic' feature when the language background is web-based scripting. None of the languages you mention that do support threading were designed for web-based usage. IMHO, if your main goal is to allow your threaded app to reuse existing PHP classes then your best bet is to investigate embedding PHP into something written in C or C++. As far as your "hacked multi-process PHP server solution" goes, I would suggest that you think about what is important to you for this project. If your existing solution is good enough for your purposes then live with it. If the only reason you're not willing to replace it with a solution that would undoubtedly be faster, more stable and more efficient is because you don't want to re-implement some existing code that only exists in the wrong language, that's your choice. If it were me, the goal of code reuse would never prevent me from using the right tool for the job, but that's just me. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session
On 26 April 2006 15:02, chris smith wrote: > > Can you explicitly pass the sessionid across: > > > > > > > ? That technique may or may not be the solution, but if it is it should be simply: This is precisely what the SID constant is provided for, and as such it contains the entire session_name=session_id string. As a bonus, it's defined as the null string when the session id is being propagated in a cookie, so it can be included unconditionally where needed. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php_gd2.dll not found
On 26 April 2006 22:46, Ari Davidow wrote: > > > Anomaly 2: > > > > > > When I do a "phpinfo();" to see what is actually loaded (and to > > > ensure that the correct php.ini is being loaded, etc.), among the > > > info is the notice that I am using php 5.0.3-dev. I get the same > > > info when I telnet to localhost. This means you have an old php5ts.dll that is being loaded in preference to the one for 5.1.2. Locate it and delete it. This may also fix your other problems. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MS SQL extension not loading
Hello, Search for file: libssleay32.dll and copy it in windows\system32 folder. The problem will be solved. Laszlo Nagy wrote: > > Hello Richard, > > I hope you remember my question. > > Richard Lynch wote: >> On Tue, April 11, 2006 11:45 am, Laszlo Nagy wrote: >> >>> I have a problem with a Win2003 server, IIS6 and PHP 5.1.2. I have >>> Microsoft SQL Server tools installed. C:\PHP is on the path. Extension >>> dirs are configured correctly. The php_mssql.dll is present there. >>> Everything looks okay, except that the server does not load the >>> extension. If I do >>> >> > >> Step #5. >> Switch to a superior web server: Apache >> :-) >> > So did I. I replaced the server with a new Windows 2000 server and MS > SQL server, I have Apache 2.0.55 with PHP 5.1.2. The only thing I have > in php.ini is: > > extension_dir="C:\PHP\ext" > extension=php_mssql.dll > > The php.ini file path was setup with the PHPIniDir directive. I can load > other extensions withouth problem. As another example, if I try to use > > extension=php_curl.dll > > then I get an error message about "libssleay32.dll not found" when I try > to stop apache. But my main problem is the php_mssql.dll extension. It > does not throw any errors, does not log errors into (apache) logfiles, > but it is not loaded. Please help me. My boss is killing me because I > could not solve this problem for weeks. > > Thanks, > > Laszlo > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MS SQL extension not loading
Hello Richard, I hope you remember my question. Richard Lynch wote: On Tue, April 11, 2006 11:45 am, Laszlo Nagy wrote: I have a problem with a Win2003 server, IIS6 and PHP 5.1.2. I have Microsoft SQL Server tools installed. C:\PHP is on the path. Extension dirs are configured correctly. The php_mssql.dll is present there. Everything looks okay, except that the server does not load the extension. If I do Step #5. Switch to a superior web server: Apache :-) So did I. I replaced the server with a new Windows 2000 server and MS SQL server, I have Apache 2.0.55 with PHP 5.1.2. The only thing I have in php.ini is: extension_dir="C:\PHP\ext" extension=php_mssql.dll The php.ini file path was setup with the PHPIniDir directive. I can load other extensions withouth problem. As another example, if I try to use extension=php_curl.dll then I get an error message about "libssleay32.dll not found" when I try to stop apache. But my main problem is the php_mssql.dll extension. It does not throw any errors, does not log errors into (apache) logfiles, but it is not loaded. Please help me. My boss is killing me because I could not solve this problem for weeks. Thanks, Laszlo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
D. Dante Lorenso escribió: Gonzalo Monzón wrote: Use Python, it is the way to go if you're willing to use mt :-) I've already written the multi-threaded server using Java. I want to do this in PHP, however, because the PHP "threads" can re-use PHP classes I've already written and hence standardize on a single codebase and language. Many other languages have threads (Java, C#, Python, Ruby, etc) ... which is why I'm so amazed PHP does not even list Threads as a priority. You simply can't be an enterprise language without these basic features. Of course, don't get me started on namespaces too ;-) No, choosing a different language has been considered and I'd rather continue with my hacked multi-process PHP server solution before I am ready to change to a different language. Dante Sorry, but no PHP "threads" can re-use any PHP classes, as threads are not implemented yet... maybe until PHP 8 :-) Threading isn't a trivial task, and if you MUST use it (I don't think so) you should develop some extension or take other approaches like embedding, and code all your threading needs apart from PHP, in C. But be careful interacting from that code to PHP. Or, perhaps switch to another language, if you can't cope with that. I've been developing desktop applications with PHP-GTK since 2002, far beyond the web script context, and in the more complex projects I did, was a must to implement multi-process and IPC communication due to the lack of threading in PHP, as to deal with some issues like multiple tcp clients, multiple tcp server with a proxy to the application data, webservices, handling UI, and a lot more stuff, while doing "realtime" (the more realtime I was able of) processing of all incoming and outgoing data, for more than 24 hours long running time. Yes, I was able to be successful with such a developement after a lot of pain, but it is not likely the most common usage for PHP. I finally had to implement several parts in C, embedding PHP, and really, I was not happy of to cope with that, but I did not have the time to switch to another language as I had to re-use a lot of existing code that worked smooth with a multi-process approach, but without the need of so long running time, so many tcp clients, and so many data... I had to implement data containers in using C structures, as handling all that data from PHP taken more than 500Mb of RAM in no more than 8 hours of processing, interprocess syncronization mechanisms, and a lot more stuff. In my case, multi threading was a real need I had to workaround. I think this is a real life example of PHP being expanded far beyond web paradigms or simple shell scripts, without any multi-threading support. But PHP is not thought in any case to be used for such applications... (I'm talking about desktop applications, not web script applications), with or without multithreading. If you'd like to use mt in your applications or web scripts, better switch to some other language, or search for alternative ways of implementation as you did with a multi-process approach. PHP its a great language, but it isn't the right tool for anything. Gonzalo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help in identifying a PHP application.
On Thu, April 27, 2006 4:21 am, Ananth Kesari wrote: > I have a need for an idea management PHP application that gives me an > UI with multiple fields (text boxes, radio buttons etc.) which > correspond to different columns of a MySQL database. An user initiates > this by clicking on an URL, fills in certain fields and submits the > form. This then creates the tables and should send out a mail to > certain > mail ids that there is a new entry. At a later point of time someone > else can enter info into certain fields (columns of the tables) giving > the same id as it was created. He should not be able to meddle with > the > original fields that user1 had entered. Another user can come at even > later stage and enter info into a few more fields (columns of the > tables). All these fields are created at the first stage itself since > we > will be fixing the number of fields. > > Can you let me know of any application that does all these? If this is > a wrong forum to ask this type of question, can you tell me where I > can > post this query? phpMyAdmin does a whole lot of this kind of stuff, and has a huge install-base... Seems to me that if you rig your database so that later users can't use ALTER TABLE (nor DROP TABLE) then you're pretty much done. It's not a real pretty front-end, though, in terms of clueless users, as it was designed for people who had some idea about how databases worked. Other than that, I got nothing in mind that sounds like what you want, though I suspect most of the CMSes are kind of sort of like that, to some degree... You can give a BUNCH of CMS thingies a trial run here: http://opensourcecms.com/ And I suspect that their forums would be a better place to ask the original question, as their experts on a plethora of CMSes would know what most closely matches your needs. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Natural order of things.
On 27/04/06, tedd <[EMAIL PROTECTED]> wrote: > >On Wed, 2006-04-26 at 16:57, Robert Cummings wrote: > >> On Wed, 2006-04-26 at 16:51, tedd wrote: > >> > Hi gang: > >> > > >> > I posted the following question to the MySQL list, but the only > >> > answer I received thus far was a php solution (it didn't work for > >> > what I wanted). > >> > > >> > As such, maybe if I post a MySQL question to the PHP group, then I'll > >> > receive a MySQL answer -- so here goes: > >> > > >> > I'm using the following query, and it works. > >> > > >> > SELECT id, title, url_image_small > >> > FROM $dbtable > >> > WHERE type="type_title" > >> > ORDER BY title > >> > LIMIT $offset, $rowsPerPage" > > > > > >-snip- > > > You need ot perform a type conversion from string to integer. > > > >Sorry, just realized... "Basel Square" is part of the entry in the table > >:/ Do you have entries that aren't prefixed with Basel Square? > > > >Cheers, > >Rob. > > Rob: > > Yes, there are other titles, such as: > > Celtic Deco 1 > Lucerne 1 > Dutch Hearth 1 > Yeah, two items of information in the same column's not really a good idea, which is why you're finding it so tricky. So what you can do is this: SELECT title, LEFT(title, LENGTH(title) - LENGTH(SUBSTRING_INDEX(title, ' ', -1))) AS name, CAST(SUBSTRING_INDEX(title, ' ', -1) AS UNSIGNED) AS number FROM $dbtable ORDER BY name, number; So that's finding the position of the last space and putting everything up to that in `name`. Then it's taking everything after that, turning it into an integer and putting it in `number`. Then the ORDER BY works as you'd like because it's sorting on an actual number rather than a string representation of a number. If you'd had the name and the number in separate columns in the first place it would be so much simpler. -robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 4.3.11, call_user_func and instances of classes
On Wed, April 26, 2006 6:46 pm, David Otton wrote: > class Test { > var $x; > function Test () > { > global $addition, $subtraction; > $this->x = 0; > $addition = array ($this, 'AddOne'); > $subtraction = array ($this, 'SubtractOne'); Unsolicited Advice: You MIGHT also want to consider using $this->addition and $this->subtraction instead of global variables. Just a bit cleaner, I think. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
On Thu, April 27, 2006 4:18 am, D. Dante Lorenso wrote: > Evolution of the language is a must. I AM working on trying to spec > out > an extension for PHP which would implement what I want with threading > without having to hack zend and the core. I might think that some > other > C developers would be more suited for the job, however, considering > they > have already done the work for such a beast in just about every other > popular language created so far. Take a look at the TSRM files in PHP source. They handle the threads for Zend internally. Maybe you can just "promote" them into PHP User Land... I've only glanced at it, really, so have no idea if that's even possible or not. > Obviously PHP General list is probably not the place where I can sway > any opinions with any internals members, so I'll end this message Actually, this is probably the BEST place to at least hash out the initial response and test the waters and get ground-swell support. I suspect MOST readers of 'internals' will keep an eye on threads (no pun intended) of interest here. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
On Thu, April 27, 2006 3:24 am, D. Dante Lorenso wrote: > priority. You simply can't be an enterprise language without these > basic features. You simply can't put Threads in the same sentence with "basic features", not even by implication. :-) There is NOTHING "basic" about threads, no matter how you look at it. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Files and permission
On Wed, April 26, 2006 11:18 pm, Peter Lauri wrote: > Should I put the files outside of the web file system (outside of > httpdocs) > so that they can not get the file thru the web browser? Yes. > Or should I save the docs in a database instead and control the access > thru > that? I would only put data into the database that you actually want to search, sort, and compute statistics on. So unless you plan on letting them search for Word docs based on whether or not the control codes internal to the Word format are in there based on some Regular Expression, I wouldn't cram the Word docs into the database. It just seems "clutterd" to me to have data in the database that doesn't actually have any database operations done on it. It also may add another thin security layer (defense in depth) to not have the documents available in the database, in case the database is penetrated. [This kinda depends, though, on whether you have other users with shell access and/or MySQL access...] The Operating System File System is also generally more efficient for handling these "large" files, so that's a small plus for outside the db. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help in identifying a PHP application.
STFW and if it doesn't exist then write it, thats generaly how one goes about fulfilling a need with php. Ananth Kesari wrote: Hi, I have a need for an idea management PHP application that gives me an UI with multiple fields (text boxes, radio buttons etc.) which correspond to different columns of a MySQL database. An user initiates this by clicking on an URL, fills in certain fields and submits the form. This then creates the tables and should send out a mail to certain mail ids that there is a new entry. At a later point of time someone else can enter info into certain fields (columns of the tables) giving the same id as it was created. He should not be able to meddle with the original fields that user1 had entered. Another user can come at even later stage and enter info into a few more fields (columns of the tables). All these fields are created at the first stage itself since we will be fixing the number of fields. I thnk I speak for pretty much everyone here when I say: we know what a webpage and database table/field is, no need to spell it out. Can you let me know of any application that does all these? If this is a wrong forum to ask this type of question, can you tell me where I can post this query? in the little box at the top of most search engines pages is a good place to start. also have you heard of sourceforge, freshmeat, hotscripts or any other of many, many sites that house scripts/projects (not all php mind you) of all sorts (inclduing maybe one that fits your bill). this is not: [EMAIL PROTECTED] easy mistake to make. ps - my faith in Novell just took a beating. Thanks, Ananth. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
D. Dante Lorenso wrote: Jochem Maas wrote: I've already written the multi-threaded server using Java. I want to do this in PHP, however, because the PHP "threads" can re-use PHP classes I've already written and hence standardize on a single codebase and language. Many other languages have threads (Java, C#, Python, Ruby, etc) ... which is why I'm so amazed PHP does not even list Threads as a priority. You simply can't be an enterprise language without these basic features. Of course, don't get me started on namespaces too ;-) oh yeah - threads really are basic. simple and easy to use, every VB-scripter should be using them. btw Yahoo! seems to cope quite well without threads in php - fairly 'enterprise' infrastructure and load they deal with no? Every time I try to use PHP in a web server to solve a problem like build a file upload progress meter, somebody screams that PHP is meant for far more than web scripting. Yet as soon as I try to use PHP in a context other than a web script, someone like yourself jumps up and complains that PHP needs to remain in the web scripting programming world only. thats not what I said - not having threading doesn't mean you can't expand php beyond the web paradigm, there are plenty of people who use php in the shell (me for instance), and there's the php-gtk crowd too (not that I have been there myself) then again if threads are so basic for you - submit a patch that implements them (and obviously fix any/all thread-safety issues in all extensions etc), from what I gather that's a mammoth undertaking - given the limited core developer resources, that is one of the reasons it's low priority, and then ofcourse there is the php 'philosophy' about threads in general (of which the php-internals mailing archive should be able to shed some light) Evolution of the language is a must. I AM working on trying to spec out I guess your not looking for the food, water, shelter and clean air argument - speaking of things that are a 'must' ;-) an extension for PHP which would implement what I want with threading without having to hack zend and the core. I might think that some other C developers would be more suited for the job, however, considering they have already done the work for such a beast in just about every other popular language created so far. I wish you luck, hope something comes of it - I'd gladly be a guinea pig to test something like that, if nothing else i might learn something :-). Obviously PHP General list is probably not the place where I can sway any opinions with any internals members, so I'll end this message simply saying that I am first seeking what already exists, what might already be in progress, and what still needs to be created. At the same time, I like to find others would may be trying to do something similar. I can not be alone in wanting to use PHP beyond what it is currently capable of. I trust there must be other PHP developers who wish to see the language take on some of the aspects we like about other languages while at the same time retaining all the elements we already enjoy with the existing feature set. There is no better language for web development. Once outside it's niche of web scripting, tho PHP lacks severely. Seeing how developers I think 'severely' is rather overstated. jmho. have created CLI in order to compete with PERL for cron scripting and OO features of PHP5 to compete with other modern OO languages, I imagine PHP IS trying to be more. A Framework, Unicode, Namespaces, and Threads are the logical next step. Zend Framework and Unicode have made the todo list, Namespaces is fighting to get on, and Threads is nowhere to be seen. time shall tell which way the wind blows us :-) btw individual threads are very small & thin - hardly percepatable to the human eye unless one is concentrating on looking for them ;-> Dante -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need help in identifying a PHP application.
Hi, I have a need for an idea management PHP application that gives me an UI with multiple fields (text boxes, radio buttons etc.) which correspond to different columns of a MySQL database. An user initiates this by clicking on an URL, fills in certain fields and submits the form. This then creates the tables and should send out a mail to certain mail ids that there is a new entry. At a later point of time someone else can enter info into certain fields (columns of the tables) giving the same id as it was created. He should not be able to meddle with the original fields that user1 had entered. Another user can come at even later stage and enter info into a few more fields (columns of the tables). All these fields are created at the first stage itself since we will be fixing the number of fields. Can you let me know of any application that does all these? If this is a wrong forum to ask this type of question, can you tell me where I can post this query? Thanks, Ananth. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
Jochem Maas wrote: I've already written the multi-threaded server using Java. I want to do this in PHP, however, because the PHP "threads" can re-use PHP classes I've already written and hence standardize on a single codebase and language. Many other languages have threads (Java, C#, Python, Ruby, etc) ... which is why I'm so amazed PHP does not even list Threads as a priority. You simply can't be an enterprise language without these basic features. Of course, don't get me started on namespaces too ;-) oh yeah - threads really are basic. simple and easy to use, every VB-scripter should be using them. btw Yahoo! seems to cope quite well without threads in php - fairly 'enterprise' infrastructure and load they deal with no? Every time I try to use PHP in a web server to solve a problem like build a file upload progress meter, somebody screams that PHP is meant for far more than web scripting. Yet as soon as I try to use PHP in a context other than a web script, someone like yourself jumps up and complains that PHP needs to remain in the web scripting programming world only. then again if threads are so basic for you - submit a patch that implements them (and obviously fix any/all thread-safety issues in all extensions etc), from what I gather that's a mammoth undertaking - given the limited core developer resources, that is one of the reasons it's low priority, and then ofcourse there is the php 'philosophy' about threads in general (of which the php-internals mailing archive should be able to shed some light) Evolution of the language is a must. I AM working on trying to spec out an extension for PHP which would implement what I want with threading without having to hack zend and the core. I might think that some other C developers would be more suited for the job, however, considering they have already done the work for such a beast in just about every other popular language created so far. Obviously PHP General list is probably not the place where I can sway any opinions with any internals members, so I'll end this message simply saying that I am first seeking what already exists, what might already be in progress, and what still needs to be created. At the same time, I like to find others would may be trying to do something similar. I can not be alone in wanting to use PHP beyond what it is currently capable of. I trust there must be other PHP developers who wish to see the language take on some of the aspects we like about other languages while at the same time retaining all the elements we already enjoy with the existing feature set. There is no better language for web development. Once outside it's niche of web scripting, tho PHP lacks severely. Seeing how developers have created CLI in order to compete with PERL for cron scripting and OO features of PHP5 to compete with other modern OO languages, I imagine PHP IS trying to be more. A Framework, Unicode, Namespaces, and Threads are the logical next step. Zend Framework and Unicode have made the todo list, Namespaces is fighting to get on, and Threads is nowhere to be seen. Dante -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
D. Dante Lorenso wrote: Gonzalo Monzón wrote: Use Python, it is the way to go if you're willing to use mt :-) I've already written the multi-threaded server using Java. I want to do this in PHP, however, because the PHP "threads" can re-use PHP classes I've already written and hence standardize on a single codebase and language. Many other languages have threads (Java, C#, Python, Ruby, etc) ... which is why I'm so amazed PHP does not even list Threads as a priority. You simply can't be an enterprise language without these basic features. Of course, don't get me started on namespaces too ;-) oh yeah - threads really are basic. simple and easy to use, every VB-scripter should be using them. btw Yahoo! seems to cope quite well without threads in php - fairly 'enterprise' infrastructure and load they deal with no? then again if threads are so basic for you - submit a patch that implements them (and obviously fix any/all thread-safety issues in all extensions etc), from what I gather that's a mammoth undertaking - given the limited core developer resources, that is one of the reasons it's low priority, and then ofcourse there is the php 'philosophy' about threads in general (of which the php-internals mailing archive should be able to shed some light) No, choosing a different language has been considered and I'd rather continue with my hacked multi-process PHP server solution before I am ready to change to a different language. the beauty of choice. :-) Dante -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I want to write a Multi-threaded PHP Application
Gonzalo Monzón wrote: Use Python, it is the way to go if you're willing to use mt :-) I've already written the multi-threaded server using Java. I want to do this in PHP, however, because the PHP "threads" can re-use PHP classes I've already written and hence standardize on a single codebase and language. Many other languages have threads (Java, C#, Python, Ruby, etc) ... which is why I'm so amazed PHP does not even list Threads as a priority. You simply can't be an enterprise language without these basic features. Of course, don't get me started on namespaces too ;-) No, choosing a different language has been considered and I'd rather continue with my hacked multi-process PHP server solution before I am ready to change to a different language. Dante -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php