[PHP] Re: [HEADSUP] rsync going temporarily down
2009/7/16 José Miguel Santibáñez A. j...@caos.cl: Hi, here (http://cl.php.net) we lost all documentation... I'll try a re-sync manually, but nothing happenes... Just a heads-up for those of you reading the newsgroup in real-time and emailing me directly or contacting off the PHP General list, do not worry: the PHP website is not going down. To answer a few of the other questions that were actually asked: * We appreciate the offer, but we do not need a sponsor to buy the php.net domain back. It is still in our control at this time. * Our hosting bills are not overdue. * Do not worry, your government has not [yet] cut off access to the php.net website, but if you still want to download a copy of the manual, you are welcome to do so. * You have not been blacklisted for too many searches. As you can see, things are returning to normal after a minor and temporary glitch. Thank you for your concern, and a special thanks to those who offered assistance when they were concerned that there may be larger issues. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Add php.net to my browser search box
On Thu, Jul 16, 2009 at 20:24, Eric Buterae...@ericbutera.us wrote: Interesting content on that site, Dan! One of those situations where I bought a domain name with the intent and desire to do something, and wound up converting it to personal usage. In this case, doing nothing but putting up random crap to do a 1995-style throwback site. Ugly, simple, linear only not Netscape Navigator grey and blue. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.net down?
Thijs Lensselink wrote: Anybody noticed php.net is down? It's responding to pings. But no pages load. I noticed this -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.net down?
On Thu, Jul 16, 2009 at 21:55, Michael A. Petersmpet...@mac.com wrote: They probably just have their asp.net module misconfigured. IIS crashed. We tried to CTRL+ALT+DEL, but it didn't work. We've been on the phone with Tech Support for nine hours, and hope to be able to install Service Pack 31 next week. [Now for the real (canned) response.] We're aware of the issue, and thanks for your report. For more information, please see this thread on our newsgroups: http://news.php.net/php.mirrors/37458 -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IP to geo-location advice
On Wed, Jul 15, 2009 at 08:14, Patrickoptoma...@rogers.com wrote: Could anyone give me some advice on the best way to do IP to geo-location with php using open source code? Advice: RTFM. ;-P http://php.net/geoip -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I have an idea
On Wed, Jul 15, 2009 at 15:30, Ashley Sheridana...@ashleysheridan.co.uk wrote: Done! In order to never lose, don't play ;) That's what I had expected. ;-P About eleven years ago, a co-worker and I each wanted the same day off. I had seniority, but decided to play fair with him and give him a shot. I told him that I could guarantee I could tell him the score of a football game that night before the game started. If I was wrong, he could have the day off AND I would give him my pay for the day (we were medics for the state, so it wasn't a horrible chunk of change). If I was right, I got the day off --- but to make sure it was fair, we had to watch the game together that night, and he had to pay for pizza. When I got to his house, he ordered the pizza and asked if I was ready to lose. I told him quite the contrary: before the game starts, the score is a tie at zero-zero. Being a good sport and admitting defeat, he let me have the day off. Being as graceful as he was, I instead let him have the day off and paid for the pizza. A very cheesy story (yeah, that's right), but relevant. Seems that now, in some places, trying to pull the same gag - even on a friend - could get you two to the chest, single to the head. People just don't have a sense of humor anymore -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mod primary key field - newbie question
On Mon, Jul 13, 2009 at 17:35, c...@hosting4days.comc...@hosting4days.com wrote: newbie question ... I have a MySQL table where I want to update (renumber) the primary numeric key field. The response you received from Floyd was accurate, but next time, please keep these kinds of questions on the appropriate lists. This wasn't on-topic or PHP-related, but instead should've been asked on the MySQL list at my...@lists.mysql.com. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RFC/Survey for Our Newer Folks (Including Lurkers)
On Sun, Jul 12, 2009 at 09:45, Ashley Sheridana...@ashleysheridan.co.uk wrote: Yeah, I'll put it down to old age and not my reading laziness! You're just lucky Tedd got to you first, Ash. I was going to fairy-slap you for messing up the rotation! You've been here, what, about a year now? ;-P And here's hoping there will be more to come. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc
On Sun, Jul 12, 2009 at 03:08, Eddie Drapkinoorza...@gmail.com wrote: Two things: 1) I've never head of an email list changing their rules to cater to a fringe crowd, like Nokia 6020 users. 2) Why does every thread lately degrade into chatter about top/bottom posting? *looks RIGHT AT D. Brown* Re: (2) --- Look at who put the comment out there prior to my response, and then look through the archives you'll see it's not lately. However, there are many more people posting all throughout thread positions, wherever they feel, so it garners a mention, because many may not be aware that no-top-posting is a written rule here. (Looks back at Eddie, stares him down, then blows a kiss at him, causing Eddie to throw up in his mouth a little.) -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Establishing PHP Session From a Different Host
Hello, How does one continue a php session on a different domain (domain B) than the domain (domain A) that started the session? That is, I want to hand-off a session to another domain, but I do not see how to do this as one cannot set a cookie for another domain (for valid reasons). I was thinking I could pass a one-time-access token in the url of domain B, but i'm dissatisfied with this solution as it gets unwieldy if there are a high volume of requests (such as a document server). Otherwise, I would think the user would have to re-identify (enter username/password) themselves on domain B. I am wondering if someone can enlighten me on how to have seemless session integration across multiple domains. I realize that if the domain has a different php engine, then i'd have to manage the session data outside of php's internal session data store (ie...with something like MySQL). Also, the domains are not subdomains of each other. 1) An example where one might want to do this is to establish a document/asset server on domain B to deliver content of different access levels to domain A's page (and also possibly domain C, D, E, etc...). Maybe I could do some server to server work passing the contents of a readfile(), where domain B always trusts requests from domain A. 2) But what about in situations where I literally want to migrate the user's session from one domain and hand it off to another domain, where both domains have access to the same data tables. How does one do this? Maybe I need to do some reading on load balancing to help me understand how state is maintained across several servers, but i was hoping this community might be able to guide/point me in the proper direction. Thanks, dK ` -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Establishing PHP Session From a Different Host
On Sun, Jul 12, 2009 at 12:37, Daniel Kolbokolb0...@umn.edu wrote: Hello, How does one continue a php session on a different domain (domain B) than the domain (domain A) that started the session? Simple answer: you don't. Extended answer: you can, but only if the domains reside on the same physical host, or in a setup where one domain can read the physical files of another across hosts. When you store information in a $_SESSION array, it stores one key (the PHPSESSID value) in a cookie on the client side, and then stores what is supposed to be a more-secure version of the cookie - containing all of the stored data - as a flat file on the server side (usually in /tmp or ~/tmp). As such, you shouldn't be able to read them from a different domain unless your host is insecure, in which you won't have to worry only about this, but also full cross-site-scripting vulnerabilities. Other options would be parking or doing an addon domain, or something of the like. However, this all gets more into operating system and network security, and HTTP server configurations. Combined answer: you can, but you should really re-evaluate your code and current capabilities before trying to do so. You may even want to consider setting up a trust relationship with a centralized database such as MySQL to allow the second domain to READ ONLY from the first. Check in the database on the first domain to see if a user is logged in, if they were active within the last x (seconds|minutes|hours), and from what IP they were logged in. If things seem to match up, write the $_SESSION variables for login without prompting the user to re-authenticate manually. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Establishing PHP Session From a Different Host
Daniel Brown wrote: On Sun, Jul 12, 2009 at 12:37, Daniel Kolbokolb0...@umn.edu wrote: Hello, How does one continue a php session on a different domain (domain B) than the domain (domain A) that started the session? Simple answer: you don't. Extended answer: you can, but only if the domains reside on the same physical host, or in a setup where one domain can read the physical files of another across hosts. When you store information in a $_SESSION array, it stores one key (the PHPSESSID value) in a cookie on the client side, and then stores what is supposed to be a more-secure version of the cookie - containing all of the stored data - as a flat file on the server side (usually in /tmp or ~/tmp). As such, you shouldn't be able to read them from a different domain unless your host is insecure, in which you won't have to worry only about this, but also full cross-site-scripting vulnerabilities. Other options would be parking or doing an addon domain, or something of the like. However, this all gets more into operating system and network security, and HTTP server configurations. Combined answer: you can, but you should really re-evaluate your code and current capabilities before trying to do so. You may even want to consider setting up a trust relationship with a centralized database such as MySQL to allow the second domain to READ ONLY from the first. Check in the database on the first domain to see if a user is logged in, if they were active within the last x (seconds|minutes|hours), and from what IP they were logged in. If things seem to match up, write the $_SESSION variables for login without prompting the user to re-authenticate manually. Thanks for the responses. Re: Simple answer I thought of another example. My bank's website. I sign-in and authenticate with bank.com. Then, i click credit card from bank.com and i'm redirected to creditcard.com without me having to reinput user/pass. They clearly do it (granted they have a lot more resources then I do, but i'd still like to know how they are doing it). Re: extended answer Not that i'd be able to do this, but what type of software is required to set up two remote physical hosts that can share files? Can this be accomplished through apache or perhaps plugging in some network app into apache? I don't fully understand how 'parking/addon' domains would accomplish the goal. Would you explain this option a bit more thoroughly please? Re: combined answer The trust relationship idea is what i have to work with. However, i am not using IP addresses for authentication as I was told this could alienate legitimate users and that IPs may be easily masked. Thus, i was thinking about using a one-time-access token passed in the url (essentially the same idea as the password verification links sent to email in-boxes). Once the user enters domain B with the one time access token, compare this token with last activity time via MySQL. Then if all looks okay to set a cookie with the same sesion ID as was established on domain A. As request time on domain A and subsequent request time on domain B are very close together I could require that the IPs stay consistent during that short-lived time frame. Does the above all seem reasonable (though headache prone)? I'm curious to hear your two cents. I am also curious to know how the big boys do this type of thing. Do you have any links, software applications names, or other types of keywords i could use to research about this type of thing? Thanks for your time, dK ` -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/mysql equivalent of PEAR's tableInfo()??
Top-posting. This would be an excellent question for Prune (CC'd) to field, based on the error message. Prune? On Sun, Jul 12, 2009 at 17:49, Govindagovinda.webdnat...@gmail.com wrote: On Sat, Jul 11, 2009 at 19:57, Govindagovinda.webdnat...@gmail.com wrote: I have been using PEAR's tableInfo() to remind myself about the columns in the table.. but now I want to see as much data as possible about the table and its contents *without* using PEAR. (I.e. just using built in stuff for mysqli.) This is not mysqli_#() directly, but just mocked up here in this email. Not guaranteed to work, but should give you the right idea at least. ;-P ?php include('inc/config.php'); // Your configuration include('inc/db.php'); // Your database connection info $sql = SHOW TABLES; $result = mysql_query($sql); foreach(mysql_fetch_assoc($result) as $k = $v) { $ssql = DESCRIBE .mysql_real_escape_string($v); $rresult = mysql_query($ssql); echo b.$k./b:br /\n; echo pre\n; print_r(mysql_fetch_assoc($rresult)); echo /pre\n; echo br /\n; } ? Dan I get roughly the idea, but alas I am stumped so easily in this new ocean.. it frustrates me. I have this code: $db_billing=mysqli_connect(localhost,metheuser,mypass,billing); if (mysqli_connect_error()) { die(Can't connect: . mysqli_connect_error()); } //$dbname = 'billing'; $sql = SHOW TABLES; $result = mysql_query($sql); // line 53 foreach(mysql_fetch_assoc($result) as $k = $v) { // line 55 $ssql = DESCRIBE .mysql_real_escape_string($v); $rresult = mysql_query($ssql); echo b.$k./b:br /\n; echo pre\n; print_r(mysql_fetch_assoc($rresult)); echo /pre\n; echo br /\n; } Which is just giving these errors: Warning: mysql_query() [function.mysql-query]: Access denied for user 'meee'@'localhost' (using password: NO) in /home/meee/public_html/somedir/test.php on line 53 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/meee/public_html/somedir/test.php on line 53 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/meee/public_html/somedir/test.php on line 55 Warning: Invalid argument supplied for foreach() in /home/meee/public_html/somedir/test.php on line 55 -- I am looking forward to when I have enough of my bearings that I can just cruise around all the various docs and figure out my own answers. Now there are just so many unknowns, I often can't tell which way to even look to solve the issues. -G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A prepared statements question
2009/7/12 Eddie Drapkin oorza...@gmail.com: This is just my opinion, of course :) Which is welcome. Preferrably, on the php-db@ list, but welcome nonetheless. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc
On Sat, Jul 11, 2009 at 10:42, Ashley Sheridana...@ashleysheridan.co.uk wrote: The braces ensure that PHP doesn't stop parsing the variable name once it reaches the [. By default, it will only match a variable name up to the [ sign, so you couldn't access arrays without the braces. Couldn't have said it better myself. As for the braces in the HEREDOC around {$somevar}, while it works absolutely fine, it was a typo on my part: I intended to show all manner of usage and processing of variables within the HEREDOC syntax. However, in my own code, I generally include all variables between {braces} when inside a HEREDOC block. Sheer preference for readability in a large HEREDOC: because I don't normally use curly braces around variables, when I see that on the page, I instantly recognize that I'm still in the block (if all other clues miraculously fail --- and we all know that they sometimes do). -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: How to authnticate and use contents from ${HOME}
On Sat, Jul 11, 2009 at 10:52, schneider.chant...@freenet.de wrote: Hi Isaac, Installing LAMP is not a good idea for productive servers. Always stick with the Packages of your distribution to get all upgrades. No offense toward the poster of this information, but this is probably the most ludicrous advice I've seen given in quite some time. I advise against following it --- not necessarily against using your distribution's packages, but certainly against *only* using them. It's a very bad, very useless idea. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc
On Sat, Jul 11, 2009 at 11:05, teddtedd.sperl...@gmail.com wrote: Side note: Paul Novitski showed me using an underscore for heredocs: $html =_ whatever _; That I thought was kind of neat. To me it makes heredocs stand out and are more uniform. I used $html =HTML because it then syntax-highlights as HTML+PHP in Vim, and as many know, almost everything I do is from the command line and Vim. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] Checking Special Characters
On Sat, Jul 11, 2009 at 02:41, Manu Guptamanugu...@gmail.com wrote: Dear All, I have to design a databse where I need to check for date using date as datatype in mysql I am having problems while inserting it Can you help me with it?? Google. Also I am having problems with eregi(), erege(); This is a serious issue, and one that you will continue to experience: because there's no such function as erege(). PLUS can i know various ways to secure password in a db Sure! See: http://tinyurl.com/ljrvzt -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XAMMP-Mysql Crashing
On Sat, Jul 11, 2009 at 11:47, Garyg...@paulgdesigns.com wrote: I have an issue that Mysql will not start on my local machine. I noticed a few days ago on a restart that I got an error saying that Mysqld had encountered a problem and had to close. I did not pay any attention to it because I was not working in it for a bit. Is it just me or do I see nothing at all related to PHP anywhere in your message? ;-P Check with the fine folks at XAMPP[1] and MySQL (Windows)[2][3]. They bite less than we do sometimes. ^1: http://www.apachefriends.org/f/viewforum.php?f=34 ^2: http://lists.mysql.com/win32 (Very, very low-traffic list.) ^3: http://lists.mysql.com/ (All lists.) -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XAMMP-Mysql Crashing
On Sat, Jul 11, 2009 at 13:07, Garygwp...@ptd.net wrote: Ahh the list of responses is endless 1. Its just you My wife keeps telling me the same thing, so you're in good company, Gary. 2. Please, if you want to see people bite, go over the the adobe/dreamweaver group, there are some people over there that are very proud of their ability to type numbers letters and charactors in the correct order. I've heard much the same. I've never had a need to get involved there, but at the risk of getting some (probably well-deserved) flames for saying this, but compared to developers, who are a bit more nerdly-rugged, designers (particularly many friends of mine who tout Dreamweaver as the end-all, be-all) are complete divas about their work and arsenal of tools. 3. Let me rephrase, as it relates to PHP,MySQL keeps crashing, I have. Alright, so not really all that endless... Thanks for the links, I have signed up for the mysql group, waiting to get the super secret handshake so I can post Question for you: is that a stock installation of XAMPP? And, if so, did you get it from apachefriends.de? I noticed the German language for the version banner. Doing it old-school with the Pennsylvania Dutch, eh? ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc
On Sat, Jul 11, 2009 at 13:45, Eddie Drapkinoorza...@gmail.com wrote: If that's true, then we've found an error reporting bug! I've never seen an error/warning raised, even with my usual error_reporting(E_ALL | E_STRICT | E_DEPRACATED)! The warning is raised here, though: $foo = $bar[hello]; but not here: $foo = $bar[hello] No, we're crossing subjects here, actually. The error would be raised in something such as the following: ?php $bar['hello'] = 'World!'; $bar['world'] = 'Hello,'; $foo = EOT $bar['world'] $bar['hello'] EOT; echo $foo.\n; ? Sorry if I sound like an ass, just trying to defend myself from having to go change several thousand array items referenced from doublequotes / HEREDOC. You don't sound like an ass at all (quite the contrary, actually), and not changing them certainly isn't the end of the world. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XAMMP-Mysql Crashing
On Sat, Jul 11, 2009 at 13:30, Garygwp...@ptd.net wrote: It is a bit freindlier here, those folks over at dreamweaver have a lot in common with pipe-smokers, fly fisherman and sail boat captains... I dont really recall where I got the XAMMP from, so I dont really understand the german reference. I did just start getting a message from a newgroup posting that I needed to DL some special language drivers to send my message in Arabichope its not all related.. Time to brush-up on your Farsi. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc
On Sat, Jul 11, 2009 at 13:26, Eddie Drapkinoorza...@gmail.com wrote: Uhm you don't need braces around arrays unless you're using more than one dimension in the array. This works perfectly fine for me: ?php $bar = array('hello' = goodbye); $foo = EOT $bar[hello] EOT; echo $foo; //echos out goodbye ? It works fine because you're forcing PHP to cast 'hello' in your array from a simple boolean TRUE to the string equivalent. Bad, Eddie! Stay off the couch! Something this simple should be common knowledge :X but I still agree with Daniel that you ought to use {} around variables in HEREDOC (or double-quotes) as it makes your code much more readable. It also works similar to the method in which double quotes (translatable) work as opposed to single quotes (literal), though instead of printing the literal $bar['hello'] it will give you a parse error (T_ENCAPSED_AND_WHITESPACE, if memory serves correctly for once, but don't quote me on that). -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_real_escape_string wants a string or a resource?
On Sat, Jul 11, 2009 at 17:51, Govindagovinda.webdnat...@gmail.com wrote: as in a db connection That's essentially a resource in reference to an object. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc
On Sat, Jul 11, 2009 at 19:46, Zareef Ahmedzareef.ah...@gmail.com wrote: I always said : Being good and Being FORCED to be good are two different things... and PHP normally don't force us to be good that why PHP is the most popular programming language with a large code base which WORKS but not as per the standard or recommended way ; so keep you old code as long as it works Well, it's not the most popular, but it's right up at the top. Sorry for TOP posting This mailing list also don't force us to be good :) FORCE, no. ENCOURAGE, yes. Particularly in long threads like this one. Check the rules. They're not just there to take up space on the paper. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RFC/Survey for Our Newer Folks (Including Lurkers)
Ladies and Gentlemen: First of all, if you're new to the list, welcome. At the risk of bragging about our collective talents, you are now a member of a community that is home to what may be some of the best talent in web development you'll find on the Internet. I'm not speaking of myself, but of your peers on this list. I could mention names, but that's beyond the scope of this particular request. What I would like to know is how you found out about this list. For example, did you go out of your way to find a support channel for PHP? Did you come to the source website, find out about the mailing list, and decide to subscribe? Did you submit a note to the php.net website requesting assistance and have your note rejected, and follow the instructions in the email that myself or another PHP Group member sent? Were you referred here by a friend, website, or publication? I would like to hear from all of you, and if you don't want your email address or words to be publicly archived, you're more than welcome to reply to me personally. I'd like to speak particularly with folks who joined this list because of submitting a note to the site and having it rejected, but I want all opinions. So if you've been here for less than 90 days or so, how did you wind up here, and did you have any problems in joining or complaints about the subscription process? If you've never posted and wanted a chance to introduce yourself, here's your chance. Breaking the ice and getting that first email out of the way may be all that's between you and immortality as the next great contributor to the project. Just remember the little people when you reach fame and fortune. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/mysql equivalent of PEAR's tableInfo()??
On Sat, Jul 11, 2009 at 19:57, Govindagovinda.webdnat...@gmail.com wrote: I have been using PEAR's tableInfo() to remind myself about the columns in the table.. but now I want to see as much data as possible about the table and its contents *without* using PEAR. (I.e. just using built in stuff for mysqli.) This is not mysqli_#() directly, but just mocked up here in this email. Not guaranteed to work, but should give you the right idea at least. ;-P ?php include('inc/config.php'); // Your configuration include('inc/db.php'); // Your database connection info $sql = SHOW TABLES; $result = mysql_query($sql); foreach(mysql_fetch_assoc($result) as $k = $v) { $ssql = DESCRIBE .mysql_real_escape_string($v); $rresult = mysql_query($ssql); echo b.$k./b:br /\n; echo pre\n; print_r(mysql_fetch_assoc($rresult)); echo /pre\n; echo br /\n; } ? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A prepared statements question
[Redirected to PHP-DB: php...@lists.php.net] On Sun, Jul 12, 2009 at 00:31, Jason Carsonja...@jasoncarson.ca wrote: Hello everyone, I am having a problem getting my prepared statements working. Here is my setup... index.php - authenticate.php - admin.php 1)index.php has a login form on it so when someone enters their username the form redirects to another page I call authenticate.php. 2)In the authenticate.php file I want to use prepared statements to interact with the MySQL database. I want to compare the username submitted from the form with the username in the database. 3)If the login username was legitimate then you are forwarded to admin.php Its step 2 I am having problems with. Here is what I have but I don't think it makes any sense and it doesn't work. $link = mysqli_connect($hostname, $dbusername, $password, $database); $stmt = mysqli_prepare($link, SELECT * FROM administrators WHERE adminusers=?); mysqli_stmt_bind_param($stmt, 's', $username); $result = mysqli_stmt_execute($stmt); $count=mysqli_num_rows($result); if($count==1){ header(location:admin.php); } else { echo Failure; } Any help is appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] open source event calendar
On Fri, Jul 10, 2009 at 03:13, Joeyj...@web56.net wrote: Hello All! Does anyone know of a good open source calendar app? Hopefully one that has ongoing development etc. ( sorry asked this before, but can't find a web list to search for the previous results, php.net has a list that is not searchable ) Did you try Google? Did you then try searching Google for 'mailing list archives'? I had no problem finding a few thousand results. http://www.gmane.org/ http://www.marc.info/ http://news.php.net/ http://google.com/search?q=open+source+php+calendar+script -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql cache query as xml
Chris; From my understanding of your question, your message (included below in its entirety) is better sent to the MySQL General list, which I've CC'd on this reply. If you haven't yet, please subscribe there at mysql-subscr...@lists.mysql.com to follow the thread for responses. If I'm misunderstanding and you're asking a PHP-related question, please rephrase your question. [Full original message follows.] On Fri, Jul 10, 2009 at 12:22, workerho...@studysite.euworkerho...@studysite.eu wrote: hi guys, i need some help by optimize the performance. my problem is that i need a lot of rows the whole site (don't ask i need the rows really :-) ) this is about ~4000 rows it will be loaded from mysql database in 0.3 seconds my idea was to cache this rows in a xml file like for example: category idsome hash id/id titlecategory title /title /category .. also load query from mysql first, save to xml using 6 hours, erase the cached file, load query against but to load the same num rows from xml during more then 3 seconds in comparison mysql need just 0.3 seconds. how can i optimize the reading from xml faster? server design: 2 mysql server (Master Slave with Replication ) 8 Applikation Server with connect to the 2 mysql server this i the reason why i want to cache this query anyway! other querys just need about 0.0004 seconds, but this is the slowest query! i hope someone can help me or had a better ideas to solve this problem! thanks chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql cache query as xml
On Fri, Jul 10, 2009 at 12:59, Andrew Ballardaball...@gmail.com wrote: I understood the question to be how to improve performance by caching MySQL results into an XML document (which, given that it was posted here) within a PHP script. Perhaps this is not the correct interpretation, but if so it would be relevant. You're probably correct. Seems I'm just experiencing a Friday Fog, so to speak. (And no, there are no chemical connotations implied there, just that the weekend and all the work it entails is looming much closer. ;-P) -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql cache query as xml
On Fri, Jul 10, 2009 at 13:07, workerho...@studysite.euworkerho...@studysite.eu wrote: hi andrew i think you understand my problem a little, but if 100 user load this query at the same time, the two mysql server had a lot to do! so i think to cache this query as xml to the application server local make thinks faster, but, i would like to have the same performance to read this xml document as read the query from mysql server... i dont know why php is so slow to read the xml file... It will be slower to read a file than data from an SQL database by sheer design --- regardless of whether it's XML, CSV, plain text, etc. And MySQL is faster still because it's run as a server with it's own processing engine, completely independent of the PHP engine and spawned process. Other factors involved are disk seek time, memory capabilities, et cetera, but the SQL-vs-file point is the biggest. For PHP to locate something within the file, it must load the entire file into memory or read it byte-by-byte, line-by-line, from an exact offset (given explicitly). SQL databases such as MySQL work similarly, but don't catalog all data in quite the same linear fashion. Further, MySQL is capable of indexing, allowing it to return the data far faster. There's a time and a place for each, but it sounds as though what you're attempting to do would not be best-served by caching it in an XML sheet. Also, something to keep in mind (with no offense intended by any means): if you have two database servers (using replication) for load-balancing and they - combined - cannot handle 100 simultaneous connections and queries, you may want to re-evaluate your infrastructure and architecture. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql cache query as xml
On Fri, Jul 10, 2009 at 13:23, workerho...@studysite.euworkerho...@studysite.eu wrote: hmm, the infrastructure ist good, this is just this query so to solve my problem i could run mysql on the application server and store just this table and read the query from them, it could solve my problem litte, i hope so! You may also want to look into SQLite --- it's perfectly designed for this kind of situation. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-WEBMASTER] Show Source QUESTION
On Fri, Jul 10, 2009 at 02:47, David Leesubl...@yahoo.com wrote: I was wanting to have a page called source.php like you guys, and have it display the source code for the pages, but I've looked at the source code for you guys source.php page and I can't seem to make it work on my server. Like how do you make a page display another php page without it executing the php scripts ? That's a better question for the PHP General list (CC'd in this email) than the Webmaster list. Feel free to subscribe there to get help with PHP-related questions. In direct answer to your question, however, check the following functions: highlight_file() - http://php.net/highlight_file highlight_string() - http://php.net/highlight_string -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP SQL INJECTION
On Fri, Jul 10, 2009 at 15:48, Chris Paynechris_pa...@danmangames.com wrote: Hi everyone, My server appears to be the victim of a chinese hack-attack and I believe they managed to change pages via SQL Injection, do any of you have any ideas how to lock down my forms so MySQL cannot be used from my forms? First and foremost: http://php.net/mysql_real_escape_string -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP not running properly
On Fri, Jul 10, 2009 at 15:44, Togrul Mamedbekovtogrul.mamedbe...@iadc.org wrote: Hello Sir or Madam, We just updated our PHP 5.2 software. And when I try to run the php info script! I get a blank screen! What do you see when you view the source of the page with phpinfo() ? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini directive include_path variables
On Fri, Jul 10, 2009 at 16:56, J.P. Trosclairjptroscl...@judelawfirm.com wrote: I'm wondering if there is a way to dynamically set the absolute path of an include directory based on the document root of the site via htaccess or some other method other than in the scripts themselves within the site. Please check the archives and Google before posting here. This exact question was just discussed and answered within the last seven days. I don't recall the name of the thread (perhaps someone else could name it for me), but I believe the original poster was Govinda. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini directive include_path variables
On Fri, Jul 10, 2009 at 17:24, J.P. Trosclairjptroscl...@judelawfirm.com wrote: I've spent the better part of this afternoon looking through google and the archives for different variations on terminology before resorting to subscribing and posting to this list. Will go back to digging based on your suggestion. Thanks for your time and sorry if I've caused any problems. No problem at all, J.P., and my apologies if I came across with a tone (in writing) to make you think it was. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini directive include_path variables
On Fri, Jul 10, 2009 at 17:28, Govindagovinda.webdnat...@gmail.com wrote: yes, look for posts with this subject line: Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include? (just don't ask me to explain everything that those good souls were trying to teach me in those posts.. I assimilated some of it. ;-) Found here, with previous posts in the thread being linked from that page as References: http://news.php.net/php.general/294985 Politeness should be rewarded, at the very least, with a link. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP SQL INJECTION
On Fri, Jul 10, 2009 at 17:37, Chris Paynechris_pa...@danmangames.com wrote: Hi everyone, Hmmm i'm not sure it is an SQL Injection now, done a lot more checking and it is inserting code at the end of every index.htm index.html default.html and index.php pages on my site. Ooooh what fun :-) Wouldn't happen to be in Chinese, would it? It sounds quite reminiscent of the regular JavaScript and XSS stuff. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP SQL INJECTION
On Fri, Jul 10, 2009 at 17:48, Chris Paynechris_pa...@danmangames.com wrote: Hi, Yes their IP is from Russia by Chinese in origin. How can this be prevented? Thank you all SO much for your help, it is very appreciated. So would be your move to bottom-posting (with nods to the jihad that was the longest thread of the list so far this month) as per the mailing list rules. ;-P What's the URL to your site, if you feel comfortable in providing it here? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP SQL INJECTION
On Fri, Jul 10, 2009 at 18:11, Chris Paynechris_pa...@danmangames.com wrote: Sorry I post at the top because i'm legally blind and it's easier but i'll try to post at the bottom :-) This is the main site on my server: http://www.oxyge.net I just took out the offending code at the end of the index page to get it back up and running. Check the /blog/ as well. Parse error. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc
On Fri, Jul 10, 2009 at 20:25, Govindagovinda.webdnat...@gmail.com wrote: How do I get basename(__FILE__) or htmlentities($somevar) to be evaluated in a heredoc? You don't. Instead, you have to store the output from those in a variable (or array), then place it into the HEREDOC it. ?php $somevar = htmlentities($somevar); $filedata = array('name' = basename(__FILE__), 'size' = filesize(__FILE__)); $html =HTML bFile Name:/b {$filedata['name']}br / bFile Size:/b {$filedata['size']}br / b\$somevar/b: {$somevar}br / HTML; echo $html; ? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Obeying the rules (was Simple login form with cookies)
On Thu, Jul 9, 2009 at 09:54, Tony Marstont...@marston-home.demon.co.uk wrote: I called him intolerant because he jumps on issues which other people just don't care about. Point #1: You're obviously wrong, as this thread has already received more replies than most on-topic, PHP-centric threads. I called him small minded because he concentrates on small issues which simply don't matter in the great scheme of things. That sounds like fair comment to me It's just like those people who have endless arguments about when to use uppercase and when to use lower case. It simply doesn't matter, so stop wasting your time in arguing about it. Point #2: When attempting to prove your case, do your best to keep your facts and players straight --- you did not call me either of these things; you placed your unnecessary opinion of such on Stuart. And while that really doesn't sit well with me, it's just becoming more and more evident that you, like many others in the past, will simply wind up being ignored by the majority of the list, save for folks who don't know or don't care about your lack of respect for them. Irrelevant. It does not matter how much good work anybody does if they go and ruin it by trying to enforce some inconsequential petty rule. Had I been a hippie as well, I might just be inclined to agree with you. So if we're throwing opinions around, let mine ring loud and clear: thank God I'm not. Besides, I couldn't have pulled off the bellbottom look, and in all my years, I still can't grow a half-decent beard (which means that joining al-Qaeda may be out of my future as well darn). The conventions in other newsgroups are different, and I can't be bothered to change my habits for different newsgroups just becase some internet Nazi says so. You change the topic for each newsgroup, don't you? And you do it out of respect for the context of that particular group. You wouldn't (well, maybe *you* would) ask a question about a carburetor on a mailing list for expectant mothers, which makes sense. Following a simple rule by not top-posting makes sense as well, which has been outlined already. Your greatest failure in this argument, Tony, is not being able to articulate your proof as to *why* it's a stupid rule. All I've been able to ascertain to date is that you (ALWAYS) have an opinion as to why the Establishment is a Bad Thing[tm], and how The Man will never be able to keep you down. Fight the power, Marston. Spread the word of the Revolution. Manifest Destiny! (What was the argument again?) No, I don't like stupid rules, which is why I choose not to obey them. This is like a five-year-old saying, I don't like your stupid face, so I'm not gonna' look at it. Reading your sentence, I envisage the voice of a spoiled toddler. So not only are you dictating how I post, you are also dictating which newsreader I should use? How arrogant! Your arrogance toward the community and ignorance of fundamental, purposeful guidelines is proof of how sanctimonious you truly are. Besides, since you are still using PHP 4.4.9 on your server, it's obvious that you don't like - and/or are afraid of - change, so no one is trying to tell you what software to use. Anyway, since we're on the subject, while I have no interest in ever using RADICORE, I may be able to convince someone else to use it for free. Wait, I would have to pay for a commercial? That's a stupid rule, I'm just going to take it for free anyway, and damn what you say about it. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Obeying the rules (was Simple login form with cookies)
On Thu, Jul 9, 2009 at 11:57, Tony Marstont...@marston-home.demon.co.uk wrote: Violating a license agreement is against the law, top posting is not. Laws are rules set forth by mortal man. I have the right by your own word to choose not to obey this particular one. Your arguments hold no water, your experience has taught you nothing, and your abilities to perform under pressure when facts are pointed out against you have failed you. From this point forward, you don't even have the same respect from me as I would give to a rabid animal, and while you may not care - nor am I inclined to think or be concerned that you might or might not - I am satisfied in knowing that I'm not the only one who thinks you, sir, are not worth the time spent to think upon. Best of luck in anything you may hope to have success, including learning to persuasively debate a point. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Obeying the rules (was Simple login form with cookies)
On Thu, Jul 9, 2009 at 16:55, teddtedd.sperl...@gmail.com wrote: Now, do I remember email? No not really. As I understand it, email came about under ARPANET and converted to the Internet in the early 80's. So unless he has been doing email and participating on something other than what's known, I would have to say it's a bunch of bull. Actually, in Tony's defense, I don't think he ever said anything about being on mailing lists or using email for thirty years, only that he's been involved in computers and programming for that length of time. Which, much like yourself, is believable. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Obeying the rules (was Simple login form with cookies)
On Thu, Jul 9, 2009 at 16:47, Bastien Koertphps...@gmail.com wrote: My sincerest apologies. I have been a complete jackass this entire time and every single one of you has been correct. From this point forward I vow to keep my God damned mouth shut unless spoken to. Heh. Methinks there be trickery afoot, and it's best to ignore this rather than encourage it. Better to keep a nice, clean, above-the-belt fight. Pipsqueak out. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple login form with cookies
First, a reminder to several (including some in this thread) that top-posting is against the law here. On Wed, Jul 8, 2009 at 09:48, Martin Scottamartinsco...@gmail.com wrote: $sql = 'SELECT * FROM your-table WHERE username = \''. $username .'\' and passwd = md5( concat( \'' . $username .'\', \'@\', \'' . $password .'\'))'; Second, another, more important reminder: ?php $username = ' OR 1 OR '; ? Since the first rows in a database are usually the default administrator logins, the first to match what is basically a 'match if this is a row' statement will be logged in. The moral of the story: don't forget to clean your input (which I'm sure ya'all were doing but with top-posters, you never know ;-P). -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Host that allows edit of php.ini
On Wed, Jul 8, 2009 at 04:27, Matthew Croudm...@obviousdigital.com wrote: Apologies if this type of question is frowned upon in the mailing list, however I would like to pop the question to those in the know. Can anyone recommend a UK host that allows you to edit ( or a copy of ) the php.ini file, allowing me to increase the file upload size to 100mb for clients PDF artwork files. I wish to create an upload site for my print firm. The servers we have in the UK right now are nearing the limits of what we'll sell on them before it'll impact the folks on those servers, but if you don't mind a US- or Canadian-based server, you can hook up through us at http://pilotpig.net/, and you'll have almost full control over your local PHP. That said, see if your current host is configured to allow you to do an .htaccess or local php.ini override on some of the settings. You may find that you don't need to go through the hassle of relocation after all. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple login form with cookies
On Wed, Jul 8, 2009 at 12:14, Tony Marstont...@marston-home.demon.co.uk wrote: No it isn't. That's just your personal preference. Mine is different. Uhh Tony, if that's in response to me, you're wrong. Please read the rules before posting what you believe to be fact. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple login form with cookies
On Wed, Jul 8, 2009 at 12:38, Tony Marstont...@marston-home.demon.co.uk wrote: What rules? I never agreed to abide by any rules before I started posting to this group. My newsreader assumes top posting by default, so I have been top posting for the past 10 years. If you don't like it then it is your problem, not mine. Absolutely 100% completely incorrect, and in all honesty, that's quite an ignorant attitude. That's not to say that I think *you* are ignorant, but rather the attitude toward established rules and guidelines that have been around long before you began posting, and will remain long after you leave. See: http://php.net/mailing-lists.php --- which links to: http://php.net/reST/php-src/README.MAILINGLIST_RULES (Specifically: General #3) So while it's my problem, it is also *your* problem, as the offender. If you didn't agree to rules beforehand, that's your issue. Ignorance is not a defense. You were - or had the opportunity to be - made aware of the rules of the list, and as such, agree to abide by them by continuing to post in this - or any - public forum. Much the same as, by traveling to a foreign country, you agree to be bound by their rules and regulations. You cannot simply claim that you did not know of a rule. And for the record, Gmail assumes top-posting as well. It takes between one and three seconds to align each message properly, which is a pain in the butt each time, I agree, but it's something that has to be done. Otherwise, it breaks threads and makes the archives very difficult to read --- damning the purpose of even having them there for the benefit of others on the Internet. For years, we've all adapted to this, because they were the rules, and because we respect each other enough in the community to follow them. Here's hoping that you won't be the odd-man-out of that respectful group. Thanks. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple login form with cookies
On Wed, Jul 8, 2009 at 13:02, Tony Marstont...@marston-home.demon.co.uk wrote: I do not regard that as a concrete rule, and certainly not one worth bothering about. Lots of newsgroups I visited before coming here allowed top posting, so it is arrogant for someone to say I personally don't like top posting, so I'll make a rule that disallows it. A sensible rule, and one which I have no problem in following, is that if a question is posted in English then I will answer in English. That makes sense, whereas no top posting does not. No matter anymore. You've expressed your distaste for the rules and your intent on disregarding them, which - in turn - shows that (a) you believe yourself to be beyond the need to respect the guidelines the rest of the community follows; and (b) you couldn't give a damn about contributing to good, solid archives. There's certainly no way we can force you to follow the rules, so I'm done discussing it. It's just a shame that it's not going to work out in a manner that doesn't speak volumes about your negative attitude toward others. Best of luck in everything you do. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to stop E_DEPRECATED messages in the PHP log?
On Tue, Jul 7, 2009 at 11:03, Jeff Weinbergerj...@jeffweinberger.com wrote: This seemed like it would be the perfect solution...but alas it did not work. 22527 seems right, but after changing php.ini to that and restarting php and apache, I am still getting Deprecated... messages. Dumb question, Jeff: are you sure you're editing the correct php.ini file? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to stop E_DEPRECATED messages in the PHP log?
On Tue, Jul 7, 2009 at 17:46, Jeff Weinbergerj...@jeffweinberger.com wrote: One question - that I for some reason have not found - is there a list of the numerical values of the E_* constants somewhere? You bet: http://php.net/manual/en/errorfunc.constants.php -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 64 bit binary ?
On Mon, Jul 6, 2009 at 06:21, lokiloki5100-newsgr...@yahoo.fr wrote: no Not you. ;-P Note that I forwarded the message to the appropriate list --- the php-windows@ mailing list --- where Pierre Joye hangs out. He'd be the one to help you. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Off Subject / Feedback Needed
On Mon, Jul 6, 2009 at 03:03, Karl Jameskarlja...@tampabay.rr.com wrote: Team, http://www.theufl.com/css/corners.css http://www.theufl.com/indexb.htm I am trying to get the rounded corners to show in the first row in the HTML table. Can someone review the code for me? No, Karl, and please don't ask such questions again on this list. I think it has something to do with the images, but I corrected the path and uploaded images. Ask on a CSS or design list instead, please. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Advise on starting a web store site
On Mon, Jul 6, 2009 at 08:15, Matthew Croudm...@obviousdigital.com wrote: [snip!] Is there a way to create the site *without* having each product have a physical separate page ? Is there a method of web design which makes creating new pages simple if they all follow the same pattern. i.e thumbnail, description etc. [snip!] Sure, just check Google and look into doing includes, templating, and using .htaccess with mod_rewrite - an Apache feature and module, respectively, thus beyond the scope of PHP - to rewrite the URL's. What this will do, essentially, is create a prettier URL, so something like: http://www.example.com/path/to/cart.php?product_id=1234group=987 could become: http://www.example.com/p987/1234.html or really anything else that you'd like, depending on how you write your scripts. Again, though, the full creation of those is really outside the scope of this list as well, but there are plenty of open source scripts out there from which you can learn, modify, and reuse free-of-charge for a commercial webstore. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple login form with cookies
On Mon, Jul 6, 2009 at 02:19, Jason Carsonja...@jasoncarson.ca wrote: ok, I have two sets of scripts here. One uses setcookie() for logging into the admin panel and the other uses session_start(). Both are working fine, is one more secure than the other? $_COOKIE data is written to a file that is readable/writeable and stored on the user's side of things. $_SESSION data is written to the server, with a cookie stored on the user's side containing just the PHPSESSID (session ID) string to identify the session file on the server. So determining which is better and/or more secure is really a matter of the data held there and how it's handled. If storing things like usernames or you absolutely want to store personal data in an active session, do so in $_SESSION. If you're storing a password or credit card number in the active session, you may as well do it in $_COOKIE, because you're already using an insecure model. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Lookup domain in directories VS database
2009/7/5 Martin Zvarík mzva...@gmail.com: Imagine you are hosting 10.000 subdomains. Consider it done. [snip!] Everytime visitor hits the page you do: @include('t/test-subdomain.freehosting.com/conf.php') if (!isset($CONF)) die('such a subdomain does not exist'); vs Everytime visitor hits the page you connect search in a MySQL table having 10.000 rows with each domain name and a text field (export_var()) that has some parameters you need. Okay. What's better? This depends on so many external variables that it's really impossible to give a good answer. However, while there would be less overhead to read a small file, I would not give the user the option to modify a local PHP file (your first solution), which they could do if it was stored in their local directory. Conversely, moving it outside of the user's directory and allowing them to read it from a central location opens your sites up to some major XSS issues. So a properly-indexed database would most likely be your best solution, based upon the limited information we have here so far. All in all, if you're running the server as a host with thousands of sites, you are probably better able to better decide what's in the best interest of yourself and your users considering the above. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What is this called?
On Mon, Jul 6, 2009 at 10:48, Miller, Teriontmil...@springfi.gannett.com wrote: Ok, say you have a database with 16000 records in it, but you only want to call out say 2000 records at a time as the search/query is performed, then store the first 2000 in a session and then retrieve the next 2000 etc etc as a way to minimize server strain? (I'm tasked to do this and ) 1. don't know what this is called to google it...partioning results/data ??? As Stuart mentioned, it's known as paging. 2. Is there a better way to deal with retrieval of large amounts of data from a large table without choking the server. Well, it depends. You mentioned only that it's a database. Is it an SQL database? If so, what's the engine (MySQL, PostgreSQL, Informix, SQLite, MSSQL, etc.)? If not, what's the format? Also, how frequently will this be called, how large is each row of data (in bytes or kilobytes), and what other things are running on the same server at the same time? Is it a production web server or internal intranet? Is it a shared web server? As you see, there are a ton of other factors and variables involved. ;-P 3. Is it possible at all Absolutely. Through PHP, al(most al)l things are possible. Basically I need to know what it is I'm looking to do, it's not getting explained in an understandable way herewhich makes google useless We all have days like that, Teri. I have ~365.25 of them each year -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?
On Mon, Jul 6, 2009 at 11:04, Govindagovinda.webdnat...@gmail.com wrote: Kim, this is exactly what I was looking for. I had been over $_SERVER in the docs.. but somehow missed that basic obvious param. Thanks! And now I'll throw a monkey wrench into the gears and tell you that, yes, it works, but don't always rely on it. The path translated to/from the web server may not be the real path. And while you could do your translation with realpath(), instead you should look into: ?php include(dirname(dirname(__FILE__)).'/include/file.php'); ? The example above uses the always-on reserved constant __FILE__ for the file in which it's written, regardless of how it's accessed (as an include, etc.). So consider the following: /home/user/public_html/index.php /home/user/public_html/web/home.php /home/user/public_html/templates/body.tpl.php /home/user/public_html/include/file.php In the example above, imagine that you access 'index.php', which includes 'home.php', which - in turn - includes 'body.tpl.php' and 'file.php'. Using $_SERVER data will use the information given to it by the webserver at the point of the call: in this case, from /home/user/public_html/index.php. As such, the include path will be relative to that. So if you're including a file in ./web/home.php, you will need to hard-code the adjustment to account for the difference. Conversely, using the code example from above (and building upon it), we know that __FILE__ remains static regardless of the point of the call. Thus, it's a better and more reliable method, and is usable even if $_SERVER data is not available to the script. With this in mind, it should be quite simple to understand how the following should work: ?php // My Name: /home/user/public_html/web/home.php $file_to_include = dirname(dirname(__FILE__)).'/include/file.php'; if(file_exists($file_to_include) is_readable($file_to_include)) { include($file_to_include); } else { // Do your error handling here. } ? but to each his/her own! ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What is this called?
On Mon, Jul 6, 2009 at 11:15, Miller, Teriontmil...@springfi.gannett.com wrote: It seems like Pagination except I already have that in place for all records, so maybe I'm just looking for a way to page the search results... Boss kept referring to partitioning results By definition, yes, but if you use the term 'partition' in industry terminology - indeed, in SQL commands - you'll wind up with a different result. If you haven't yet come across it, look up 'mysql range partitioning' on Google. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?
On Mon, Jul 6, 2009 at 18:16, Govindagovinda.webdnat...@gmail.com wrote: this is great, but then I still do not have a solution that will work for any level deep of dir/ . I.e. this- dirname(dirname(__FILE__)) gives the correct first part of the path to document root like $_SERVER['DOCUMENT_ROOT'] does only when called from a file that is 2 levels deep. I want something that will work for calling an include from any file that lives n levels deep. That's where you have to define a variable (or constant) that tells the system where the web root is located, and then use that to determine where you are in relation to that. For example: ?php function relate_path($me,$root = '/home/pilotpig/public_html') { if(preg_match('/\/.*\.[a-z0-9]{2,5}$/Ui',$me)) { // If a file with extension 2-5 alphanum chars $me = dirname($me); // Strip the filename // Then loop through the correct number of times. for($i=0;$i(substr_count($me,'/') - substr_count($root,'/'));$i++) { $me = dirname($me); } return $me; // Returns the resulting path. } return false; // If we were unable to get the path. } /* Then use it as follows, presuming this file is named /home/user/public_html/web/home.php */ if(($path = relate_path(__FILE__)) !== false) { include($path.'/include/config.php'); } else { // Handle the error for the incorrect inclusion attempt. } ? Voila! Also, what is the difference between a path that starts with /, versus the same path but that does not have that leading /, or that same path but prefixed with ./? I.e., this: /somepath/includes/file.php is a true (absolute) path. versus this: somepath/includes/file.php is a relative path from wherever the file is called. versus this: ./somepath/includes/file.php is a relative path from the CWD/PWD (Current Working Directory/Present Working Directory). P.S. - The function is untested, just rattled off from my brain while I cook dinner, so if it doesn't work, at least you should get the gist of where I'm going but try it anyway. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 64 bit binary ?
On Sun, Jul 5, 2009 at 15:43, lokiloki5100-newsgr...@yahoo.fr wrote: Hello Is it plane to release 64 bit binary for php on windows ? Pierre? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Love luxury? Buy a fashionable watch.
On Sat, Jul 4, 2009 at 15:47, Eddie Drapkinoorza...@gmail.com wrote: I bought one, these are AWESOME. General policy on the list is not to respond to these, even as a joke. It just confirms to the jackasses who send this crap that the message was read by someone. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing to a file
On Fri, Jul 3, 2009 at 06:01, Jason Carsonja...@jasoncarson.ca wrote: Hello everybody, How would I go about writing stuff to a file but in between the ?php ? tags? The current industry standard is a combination of text editor and keyboard, but there are many options. More specifically, are you trying to write to a PHP file *with* PHP? And if so, would this be the kind of file you're trying to write (such as creating an automated installer with auto-config)? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing to a file
2009/7/3 Sándor Tamás (HostWare Kft.) sandorta...@hostware.hu: The classic method is: 1.) read the whole file into an array of strings. 2.) search for the last line 3.) insert a string BEFORE the last line. 4.) write back the whole file to the same name Classic file handling does allow you to append to the end of a file, or recreate as a whole. Usually these types of editing must be done in memory, because file handling does not allow inserts, deletes. Please don't top-post in threads. It makes them difficult to read for folks searching the archives. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] apc breaks pear::mdb2
On Fri, Jul 3, 2009 at 07:00, Michael A. Petersmpet...@mac.com wrote: bFatal error/b: Class 'PEAR' not found in b/usr/share/pear/MDB2/Driver/mysql.php/b on line b876/bbr / Have you installed PEAR's PEAR module? I know it sounds a bit redundant, but see if that works for you. From the command line: pear install PEAR If it tells you that it's already on there, or if it installs but does not fix your problem, the next step is making sure that the include path contains the path to your PEAR files. If not, the class fails because the inclusion fails (and without looking at the source of the MySQL driver in the MDB2 package, my guess is that it's __autoload()'d rather than explicitly included, hence no message about a missing file). -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-general mail server on blackhole list
On Fri, Jul 3, 2009 at 10:52, The Doctordoc...@doctor.nl2k.ab.ca wrote: 13 RCVD_IN_JMF_BL RBL: Sender listed in JMF-BLACK [216.92.131.4 listed in hostkarma.junkemailfilter.com] truns up in my spamc test. Please fix! I've processed the removal from their erroneous blacklist, but in the future, please report things such as this to webmas...@php.net, as the traffic on each individual list usually overshadows such reports. Thanks, Doc. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] generally, where in cPanel can one set the default page to load?
On Thu, Jul 2, 2009 at 12:40, Govindagovinda.webdnat...@gmail.com wrote: Can someone point me to this? Wrong list. ;-P In fact, check Google for .htaccess MIME aliasing. It's nothing to do with PHP, nor cPanel, really. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive management clusters starting at just $200/mo.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] generally, where in cPanel can one set the default page to load?
On Thu, Jul 2, 2009 at 13:38, Govindagovinda.webdnat...@gmail.com wrote: I must not have mod-rewrite installed (I am 98% uneducated about apache/server admin). I will save your post though MIchael, for when I get more to that level.. you gave a good lead. You've got mod_rewrite on there. If you're getting an error of some kind, you can let me know privately again. (Sorry to keep sending you back and forth!) Meanwhile, Dan you gave me the quick fix lead I was after. DirectoryIndex index.php works. Found it at http://httpd.apache.org/docs/1.3/mod/mod_dir.html#directoryindex -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive management clusters starting at just $200/mo.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions
On Thu, Jul 2, 2009 at 23:27, Jason Carsonja...@jasoncarson.ca wrote: Hello all, Do I have to add session_start() at the beginning of every page so that the $_SESSION variables work on all pages or do I use session_start() on the first page and something else on other pages? Yes, unless you're using session autoloading. Also, in most cases, you will only need to call session_start() once (before referencing $_SESSION), even if $_SESSION is accessed in an included file. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Managed job chains
On Tue, Jun 30, 2009 at 09:42, Suresh Gupta VGsures...@zensar.com wrote: Hi List, Please find the error message below when I logged into managed jobs. Please advice me to get rid of this. Get rid of this. The PHP-Extension domxml is needed to display job scheduler informations Please adjust the setting in the coniguration file php.ini Read exactly what the error message says and do that, Suresh. You don't have the domxml extension set up on your server. Fix that, restart the server, and it'll work. repeat status check http://10.42.4.52:7785/scheduler2/scheduler.php?action=spooler_statusspooler_host=10.42.4.52spooler_port=49152 With thanks and Regards, Suresh.G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive management clusters starting at just $200/mo.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with an extension
On Sun, Jun 28, 2009 at 10:56, Eric A. Boneymailingli...@vanhlebarsoftware.com wrote: So I am developing a custom extension and I am having a issue. I have a header file that I need included in the project. If I #include the header file everything compiles and makes just fine, but after restarting the web server the extension won't load. Eric, Custom extensions programming is in C/C++ (as also indicated by your #include reference), which is beyond the scope of this list. Unfortunately, there is not an official dedicated list for extensions developers, but if it's not urgent, you can email me privately at danbr...@php.net and I'll see if I can help you out. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive management clusters starting at just $200/mo.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql_query blocking
Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging (by setting a time limit)? The php.ini directive max_execution_time does not help b/c: Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running. The my.ini directive table_lock_wait_timeout does not work either b/c from MySQL: This variable currently is unused. (I am using mysql v5.1) I do not want to bluntly stop this from the apache level. How does one place a time limit on the execution of mysql_query()? Thanks for your help, dK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_query blocking
Daniel Kolbo wrote: Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging (by setting a time limit)? The php.ini directive max_execution_time does not help b/c: Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running. The my.ini directive table_lock_wait_timeout does not work either b/c from MySQL: This variable currently is unused. (I am using mysql v5.1) I do not want to bluntly stop this from the apache level. How does one place a time limit on the execution of mysql_query()? Thanks for your help, dK Even the apache TimeOut directive does not seem to work in this situation. Any help would be appreciated. Thanks, dK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_query blocking
Ashley Sheridan wrote: On Sat, 2009-06-27 at 15:15 -0400, Daniel Kolbo wrote: Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging (by setting a time limit)? The php.ini directive max_execution_time does not help b/c: Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running. The my.ini directive table_lock_wait_timeout does not work either b/c from MySQL: This variable currently is unused. (I am using mysql v5.1) I do not want to bluntly stop this from the apache level. How does one place a time limit on the execution of mysql_query()? Thanks for your help, dK It depends on what type of table you have, MyISAM blocks at table level for instance, while InnoDB locks at row level. Thanks Ash www.ashleysheridan.co.uk I'm using InnoDB. But either way how do you place a time limit on mysql_query()? Thanks, dK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_query blocking
Ashley Sheridan wrote: On Sat, 2009-06-27 at 16:03 -0400, Daniel Kolbo wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 15:15 -0400, Daniel Kolbo wrote: Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging (by setting a time limit)? The php.ini directive max_execution_time does not help b/c: Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running. The my.ini directive table_lock_wait_timeout does not work either b/c from MySQL: This variable currently is unused. (I am using mysql v5.1) I do not want to bluntly stop this from the apache level. How does one place a time limit on the execution of mysql_query()? Thanks for your help, dK It depends on what type of table you have, MyISAM blocks at table level for instance, while InnoDB locks at row level. Thanks Ash www.ashleysheridan.co.uk I'm using InnoDB. But either way how do you place a time limit on mysql_query()? Thanks, dK I've not seen this done before, but it should only be row locking if you're using InnoDB. What queries are you running that are affecting a script that badly? Thanks Ash www.ashleysheridan.co.uk I issue a 'lock tables tablename write' and do some work. This is to be expected. I want a way that to stop mysql_query() from just waiting for the mysql server. ` -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_query blocking
Tom Worster wrote: On 6/27/09 3:15 PM, Daniel Kolbo kolb0...@umn.edu wrote: When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging (by setting a time limit)? would it be possible to test for presence of the lock before issuing the query that would block? if so, you could check the lock periodically until your time limit is up. would achieve you you're looking for? it would still be possible that after checking but before issuing the query the table's could be locked - albeit a much smaller chance. Thanks for the input, dK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_query blocking
Bastien Koert wrote: Why issue/do a lock at all? Shouldn't need a large lock at read bastien On Saturday, June 27, 2009, Daniel Kolbo kolb0...@umn.edu wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 16:03 -0400, Daniel Kolbo wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 15:15 -0400, Daniel Kolbo wrote: Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging (by setting a time limit)? The php.ini directive max_execution_time does not help b/c: Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running. The my.ini directive table_lock_wait_timeout does not work either b/c from MySQL: This variable currently is unused. (I am using mysql v5.1) I do not want to bluntly stop this from the apache level. How does one place a time limit on the execution of mysql_query()? Thanks for your help, dK It depends on what type of table you have, MyISAM blocks at table level for instance, while InnoDB locks at row level. Thanks Ash www.ashleysheridan.co.uk http://www.ashleysheridan.co.uk I'm using InnoDB. But either way how do you place a time limit on mysql_query()? Thanks, dK I've not seen this done before, but it should only be row locking if you're using InnoDB. What queries are you running that are affecting a script that badly? Thanks Ash www.ashleysheridan.co.uk http://www.ashleysheridan.co.uk I issue a 'lock tables tablename write' and do some work. This is to be expected. I want a way that to stop mysql_query() from just waiting for the mysql server. ` -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php a different user (user who is updating) would be doing the lock. thanks, dK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_query blocking
Phpster wrote: Bastien Sent from my iPod On Jun 27, 2009, at 4:13 PM, Daniel Kolbo kolb0...@umn.edu wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 16:03 -0400, Daniel Kolbo wrote: Ashley Sheridan wrote: On Sat, 2009-06-27 at 15:15 -0400, Daniel Kolbo wrote: Hello, When a MySQL table is locked a php call of mysql_query() that requires that table will hang as the request blocks at the MySQL server until the table is unlocked. Is there a way to stop a mysql_query from hanging (by setting a time limit)? The php.ini directive max_execution_time does not help b/c: Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running. The my.ini directive table_lock_wait_timeout does not work either b/c from MySQL: This variable currently is unused. (I am using mysql v5.1) I do not want to bluntly stop this from the apache level. How does one place a time limit on the execution of mysql_query()? Thanks for your help, dK It depends on what type of table you have, MyISAM blocks at table level for instance, while InnoDB locks at row level. Thanks Ash www.ashleysheridan.co.uk I'm using InnoDB. But either way how do you place a time limit on mysql_query()? Thanks, dK I've not seen this done before, but it should only be row locking if you're using InnoDB. What queries are you running that are affecting a script that badly? Thanks Ash www.ashleysheridan.co.uk I issue a 'lock tables tablename write' and do some work. This is to be expected. I want a way that to stop mysql_query() from just waiting for the mysql server. ` -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Further thought, do you have indexes on the table? Bastien Yes. The question is not about MySQL efficiency - i'll leave that to the MySQL email group. This question is about putting in place PHP safe guards. Thanks, dK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] This Friday's OT Thread
On Fri, Jun 26, 2009 at 09:43, Tom Worsterf...@thefsb.org wrote: On 6/26/09 9:20 AM, Michelle Konzack linux4miche...@tamay-dogan.net wrote: ...and no one care about the foreign (european) sniper WHO killed Neda in Iran. i don't know why you'd think that. the story is all over the news. american pols have been exploiting it. cnn reports cia hay have been behind the shooting. OT is one thing, fellas, but politics is another. Please keep that stuff to private emails or a more appropriate forum. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive management clusters starting at just $200/mo.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regarding Accesing mp3 with php
On Fri, Jun 26, 2009 at 00:32, Gautam Bhatiamail2gautambha...@gmail.com wrote: hello all, Is there anyway in php by which i can get the total play time of a mp3 , I found some information while doing the google thing using some 3rd party plug ins like getID3 but without any luck, Any help in this case would be helpful. Thank you. Regards, What issue were you facing when trying to use the (third-party) getID3() function? Also, if you haven't already, check out ffmpeg-php (http://ffmpeg-php.sourceforge.net/). -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive management clusters starting at just $200/mo.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regarding Accesing mp3 with php
On Fri, Jun 26, 2009 at 10:43, teddtedd.sperl...@gmail.com wrote: I think that play time would be proportional to file size, right? If so, then take two files and play them. Note the play times and file sizes of both and work out a algorithm. That would be the way I would try to solve it. The compression algorithm used for encoding, frequency and quality of the file, and actual noise signature itself would throw this off. For example, a file with seven notes played in a period of 8 seconds will be larger than a file with one note played at the same volume for the same duration. Then take into account the bitrate, if there are ID3 tags or not, if there are compression comments embedded by the encoding software -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive management clusters starting at just $200/mo.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regarding Accesing mp3 with php
On Fri, Jun 26, 2009 at 11:17, teddtedd.sperl...@gmail.com wrote: I stand corrected. Actually, I stand leaning a little to the right. And your mother dresses you funny. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive management clusters starting at just $200/mo.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regarding Accesing mp3 with php
On Fri, Jun 26, 2009 at 11:42, teddtedd.sperl...@gmail.com wrote: Well, at least I had a mother. :-) Mrs. Sperling, Tedd's hurting my feelings -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive management clusters starting at just $200/mo.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fixing new lines from textarea in an email?
On Fri, Jun 26, 2009 at 12:27, Adam Williamsawill...@mdah.state.ms.us wrote: I have staff fill out a form that contains a textarea with their problem description and emailed to me when they click submit. Staff will press enter in the text area, but I'm having problems converting the \r\n into a new line in the email that is sent to me, here is the code: [snip!] In a cursory glance, I've noticed the following code: htmlspecialchars(nl2br(str_replace('\r','',$_POST[problem]))) You are using a literal '\r' in your str_replace() function. This should instead be replaced with double quotes to translate the \r to its appropriate EOL character: htmlspecialchars(nl2br(str_replace(\r,'',$_POST[problem]))) -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive management clusters starting at just $200/mo.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] require_once failure
On Thu, Jun 25, 2009 at 07:26, ste.paole...@tiscali.itste.paole...@tiscali.it wrote: Someone can help me? Why on Mac Os there are no problems? Start by making sure that the file is there and is readable by the user as which you are logged in. Execute the command: ls -l /usr/share/php/PHPUnit/Extensions/Database/Testcase.php My guess is that it's not there, but if it is, that it is not readable. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP doesn't use php.ini
On Wed, Jun 24, 2009 at 09:47, Tirtirsa...@yandex.ru wrote: When i installed PHP, I had written to my httpd.conf PHPIniDir c:/php. But phpinfo() returns C:\WINDOWS in Configuration File (php.ini) Path row and right path to my php.ini in Loaded Configuration File. It looks like php.ini really isn't used. I think so because when i try to enable MySQL it doesn't work (extension=php_mysql.dll, extension=php_mysqli.dll and extension=php_pdo_mysql.dll is uncommented, extension_dir is correct, libmysql.dll is copied to C:\WINDOWS\system32). I've tried to write to php.ini an abracadabra. But I havent received an error as i expected. I've tried to rename php.ini. phpinfo() has returned (none) in Loaded Configuration File row instead of c:\php\php.ini as that was before. But PHP still worked. It worked without php.ini. It seems very strange. I've searched another php.ini on my system. There is no another one. What's wrong? Why doesn't PHP use php.ini file? It *does* use the file, but will work without it using default settings. An initialization file such as php.ini (or httpd.conf, my.cnf, etc.) is simply a script of variables automatically set at run-time of the engine reading the file. Check out the manual entry for installing PHP on Windows and the user notes - particularly the note from (dpharshman AT dslextreme DOT com) on 17-MAY-2009: http://www.php.net/manual/en/install.windows.php -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re:Re:require_once failure
On Thu, Jun 25, 2009 at 12:31, ste.paole...@tiscali.itste.paole...@tiscali.it wrote: The file I wanna include exist and is in the corrent location: s...@debian:~$ ll /usr/share/php/PHPUnit/Extensions/Database/TestCase. php -rw-r--r-- 1 root root 8818 31 mar 23:35 What is the output when running the target include file directly? Id est: php /usr/share/php/PHPUnit/Extensions/Database/TestCase.php -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Ask me about our fully-managed servers and proactive management clusters starting at just $200/mo.! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)
On Wed, Jun 24, 2009 at 13:24, Robert Cummingsrob...@interjinn.com wrote: I prefer proceed with caution :) Robjects in mirror are closer than they appear? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)
On Wed, Jun 24, 2009 at 17:19, Michael A. Petersmpet...@mac.com wrote: Jane, a non technical person [...] Betty's webmail account is compromised [...] Bottom line: hax0r5 hate g1rls. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)
On Tue, Jun 23, 2009 at 04:12, Per Jessenp...@computer.org wrote: Manuel Aude wrote: I'm giving a PHP course next semester (3 hours all saturdays for 22 weeks) and I just realized that PHP 5.3 is coming very soon (2 days now!). So, my plans of teaching PHP 5.2 are starting to change, and I think it's a good idea to teach them 5.3 already. Does it _really_ matter which one? I can't imagine there are that many revolutionary changes in a dot-release. There are some major changes and additions introduced in 5.3. However, some may consider it a wise idea to wait until at least 5.3.1 before putting it into production. The public final release of PHP 5.3.0 is still a few days off, so starting with 5.2 and then introducing the 5.3 branch during the course could not only be a great idea for the OP, but also an exciting evolution during the class, showing also in real-time how open source projects advance. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 500 Internal Error
On Thu, Jun 18, 2009 at 22:05, Shawn Simmonselcid...@gmail.com wrote: Wrote a small script to connect to the MySql database. Tried to run the script (http://localhost/dbscript.php) and I get a 500 Internal Server error. I have been up and down the web for two days looking for a solution and I am completely frustrated. I HAVE to be missing something. PLEASE PLEASE PLEASE help. Thanks. HTTP code 500 is, as the error message suggests, a *server* error. Meaning, it has nothing to do with MySQL, and likely is not related to PHP, but instead is a problem with the Apache configuration and/or permissions of the file. Check to make sure the dbinfo.php file is owned by the appropriate user and has permissions set to allow it to be read and executed. Though not as prevalent as on *nix systems, permissions errors can and do occur on Windows systems. If nothing seems out of place there, the next step is to check the log files. See if there's anything in Apache's error log related to this message (there should be, and being a local server, it should be one of the only things). Finally, if you can't find anything there, the next phase begins by asking your question in the right place. Now that you know it's not a PHP error that's causing it, and since we can also rule-out MySQL, we know it's an Apache issue. Best bet in this case is to go right to the source and ask on the httpd User Support list[1]. It could be any number of things, from what I mentioned above about permissions, to improper encoding, to a module not loading correctly, to gremlin droppings in your upper memory (hey, it's Windows). In any case, searching the web for two days was indeed the best place to start, so showing that intelligence gives you a leg up on many of the folks on the Internet today --- so there's no doubt in my mind that you'll have the issue resolved frustrating though it may be right now. If worse comes to worst, and you just want to move on with developing, there are several simple options for deploying a WAMP system. I would personally recommend XAMPP[1], but there are many other choices available as well. Ref: ^1: http://httpd.apache.org/lists.html#http-users ^2: http://www.apachefriends.org/en/xampp-windows.html -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP MySQL 500 Internal Error
On Thu, Jun 18, 2009 at 22:10, Shawn Simmonselcid...@gmail.com wrote: Greetings Gurus! Also, please keep new threads on the list limited to one at a time, except in extenuating circumstances. And as a developer, there certainly are and will be more of those circumstances. ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to read excel sheet and display it's contents.
On Fri, Jun 19, 2009 at 09:17, jadhavpradipjadhavpradi...@gmail.com wrote: Hi, There is oleread.inc file in Excel Folder. Please rename that file to oleread.php it will work.. =) Please check the dates before posting on third-party sites to this list. That thread is over a year-and-a-half old. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] This Friday's OT Thread
Hey, folks; It's been a while since we've launched a Friday OT thread, so here ya' go. Feel free to post nonsense, babble, share links, blow off some steam, bitch and complain about a colleague, whatever. Just remember that you're live to the world and are being archived and preserved for future generations. ;-P To start off, something that's affecting us all, as a world community, with more frequency. Safe for work. http://fart.ly/xos5z9 Here's hoping everyone has a great weekend! -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] This Friday's OT Thread
On Fri, Jun 19, 2009 at 15:05, Robert Cummingsrob...@interjinn.com wrote: I'm self-employed. I don't plan on ever laying myself off. Mind out of the gutter, Rob. Words like self, laying, and off will get you flagged. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] This Friday's OT Thread
On Fri, Jun 19, 2009 at 15:00, Jason Pruimja...@jasonpruim.com wrote: Wow dan, must be nice to have the time to read all that :P I could rant about how hard it is to find a job when you don't have much verifiable experience But instead I put together a website which has links to everywhere that I'm watching. So if anyone is in central Florida and looking for a job point your shiny rectangle here: HTTP://www.jasonpruim.com/jobsearch Don't forget the invaluable resource that is CraigsList. For you, specifically: http://orlando.craigslist.org/ There's also Dice (http://www.dice.com/), but that's more for specifically tech-oriented jobs, and most require a degree in the field. Keep your eyes open for technical support positions with telecommunications carriers --- particularly local or regional phone companies and ISP's. It's a relatively-stable job market, and there are call centers all over the country, some with VOIP setups allowing one to work from his/her own home. As for the 911 dispatcher's job, I never did hear from the Sheriff's office or the County Com-Center about you, so it's an adequate amount of time just to check in and see if [they] have any other questions, without being too pushy but don't call 911 to do it! ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] This Friday's OT Thread
On Fri, Jun 19, 2009 at 15:22, Jason Pruimja...@jasonpruim.com wrote: I just had my interview with them today. They are starting the background check right now. Ahh, fantastic! Let me know the area code from which they'll be calling so that, if they do, I'll make it a priority to answer it rather than letting it go to voicemail. You mean calling 911 isn't a good way to get in touch with them? :P About a dozen years ago, I was considering getting certified as an emergency services dispatcher, and I remember one of the operators (with whom I worked on a volunteer first-aid/rescue squad) telling me a story about how often the centers really do get calls from folks on 911 asking for job applications. Other requests included directions, parents drilling their kids (and not informing the operator of this, but having the police/fire/ambulance crews actually come to the house), and demands to be driven by emergency vehicles to shopping centers or other locations (because I pay taxes, that's why!). Lesson learned: no matter how bad your job sucks on any given day, not only do I thankfully *have work,* but some poor schmuck is dealing with worse than I at that very moment! ;-P -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php