Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?
On Fri, Mar 19, 2010 at 02:01:03PM -0700, Michael A. Peters wrote: > > I use MDB2. > I hear PDO hyped a lot, what does it really give me that MDB2 does not, > other than making the application dependent upon a binary module? Maybe nothing. But PDO is built-in and MDB2 isn't. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] where to make observations about current PHP manual?
On Fri, 19 Mar 2010, Daniel Brown wrote: > On Fri, Mar 19, 2010 at 16:59, Robert P. J. Day wrote: > > > > i don't see a separate mailing list for documentation so is this > > where i would point at oddities in the manual? as in, here: > > > > http://www.php.net/manual/en/language.variables.external.php > > > > we read: > > > > "// Unavailable since PHP 6." > > > > that just looks weird, no? > > Indeed. It would probably be better to read, "Unavailable as of > PHP 6." I'll patch that in the XML sources now, and the next time > the manual rebuilds, the changes will take effect. precisely the point i was trying to make, but i might avoid the use of the word "unavailable" since that's still slightly ambiguous. it makes it seem like it's still there somehow, you just can't get to it. i would be more direct, something like "*removed* as of PHP 6." then there's no confusion. > For the future, please report such things as Documentation > Problems at http://bugs.php.net/. ok, will do. rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: where to make observations about current PHP manual?
On Fri, 19 Mar 2010, Daniel Brown wrote: > On Fri, Mar 19, 2010 at 20:57, Robert P. J. Day wrote: > > > > i'm not sure that addresses my post -- it doesn't make grammatical > > sense to state that something is unavailable "since" something that is > > yet to be officially released. > > In most cases, you'd be absolutely correct but PHP is a > developer-focused open source project, so some folks in the community > do use PHP 6. If you'd like to be one of them, we'd certainly welcome > the extra help in finding and reporting bugs! You can always download > the latest snapshot builds at: > > http://snaps.php.net/ surely there's a svn checkout for the ongoing php 6, yes? rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP SMTP Mailers
Hi, I'm executing a third-parity standard PHP application on a Windows IIS 7 shared hosting server. I need to convert, or use, a SMTP mailer service. I found two SMTP PHP scripts - I think may work. The sourceforge.net PHPMailer project and the pear.php.net (Mail, Net_SMTP) project. Can any body please help me choose one and probably give a code snip of useage? Currently, I'm leaning forward the PHPMailer, with little to base the decision on. Thanks in advanced, King Coffee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] no svn checkout of the current PHP development repo?
just for fun, i figured i'd check out the current PHP development stream. however, if you read the web page here: http://php.net/svn.php there's no mention of the "trunk", simply references to branches such as 5.2 and 5.3. i popped over to: http://svn.php.net/viewvc/php/php-src/ and, sure enough, there's no "trunk" directory. am i just missing something? because if i click on the "PHP 6" link up there on the right (which represents exactly what i'd expect for the URL of the trunk), bad things happen: An Exception Has Occurred Unknown location: /php/php-src/trunk HTTP Response Status 404 Not Found thoughts? i'll assume this is just a temporary thing but, in any event, if the trunk is normally available, the PHP svn page should really mention it explicitly, not just the 5.x branches. rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP SMTP Mailers
2010/3/20 King Coffee > Hi, > > I'm executing a third-parity standard PHP application on a Windows IIS 7 > shared hosting server. > > I need to convert, or use, a SMTP mailer service. I found two SMTP PHP > scripts - I think may work. > > The sourceforge.net PHPMailer project and the pear.php.net (Mail, > Net_SMTP) project. > > Can any body please help me choose one and probably give a code snip of > useage? > > Currently, I'm leaning forward the PHPMailer, with little to base the > decision on. > > Thanks in advanced, > King Coffee Hi. I'd stick to a PEAR module as long as it exists, because you can update it easily. Check out the examples in the PEAR Documentation. http://pear.php.net/manual/en/package.mail.mail.intro.php There's also a full detail example here: http://pear.php.net/manual/en/package.mail.mail.send.php Bye
Re: [PHP] no svn checkout of the current PHP development repo?
This starts to get out of the scope of the General list. If you think it's a bug, report it. Did you check out the latest snap? It's an hourly build from the SVN repo. (If this top-posts, my apologies. I'm sitting in the living room with my little girl, typing from my DROID.) On Mar 20, 2010 7:36 AM, "Robert P. J. Day" wrote: just for fun, i figured i'd check out the current PHP development stream. however, if you read the web page here: http://php.net/svn.php there's no mention of the "trunk", simply references to branches such as 5.2 and 5.3. i popped over to: http://svn.php.net/viewvc/php/php-src/ and, sure enough, there's no "trunk" directory. am i just missing something? because if i click on the "PHP 6" link up there on the right (which represents exactly what i'd expect for the URL of the trunk), bad things happen: An Exception Has Occurred Unknown location: /php/php-src/trunk HTTP Response Status 404 Not Found thoughts? i'll assume this is just a temporary thing but, in any event, if the trunk is normally available, the PHP svn page should really mention it explicitly, not just the 5.x branches. rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] no svn checkout of the current PHP development repo?
You should probably have a look at the internals list - there's a lot of discussion going on as to what should happen in terms of SVN structure. Regards Peter On 20 March 2010 12:32, Robert P. J. Day wrote: > > just for fun, i figured i'd check out the current PHP development > stream. however, if you read the web page here: > > http://php.net/svn.php > > there's no mention of the "trunk", simply references to branches such > as 5.2 and 5.3. > > i popped over to: > > http://svn.php.net/viewvc/php/php-src/ > > and, sure enough, there's no "trunk" directory. am i just missing > something? because if i click on the "PHP 6" link up there on the > right (which represents exactly what i'd expect for the URL of the > trunk), bad things happen: > > An Exception Has Occurred > > Unknown location: /php/php-src/trunk > HTTP Response Status > > 404 Not Found > > thoughts? i'll assume this is just a temporary thing but, in any > event, if the trunk is normally available, the PHP svn page should > really mention it explicitly, not just the 5.x branches. > > rday > -- > > > Robert P. J. Day Waterloo, Ontario, CANADA > > Linux Consulting, Training and Kernel Pedantry. > > Web page: http://crashcourse.ca > Twitter: http://twitter.com/rpjday > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] no svn checkout of the current PHP development repo?
On Sat, 20 Mar 2010, Peter Lind wrote: > You should probably have a look at the internals list - there's a > lot of discussion going on as to what should happen in terms of SVN > structure. ok, i might do that. as daniel suggested, that issue is noticeably outside the scope of this general list. rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] no svn checkout of the current PHP development repo?
On Sat, Mar 20, 2010 at 09:03, Robert P. J. Day wrote: > > ok, i might do that. as daniel suggested, that issue is noticeably > outside the scope of this general list. Just be prepared for what you'll encounter on Internals. I was deliberately not suggesting that list at this point in time, particularly because of the high-traffic, heated debates going on about 5.3.x vs. 5.4 vs. 6.0. You have been warned. ;-P -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Looking for hosting or dedicated servers? Ask me how we can fit your budget! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I upgrade GD?
Hi, how do I upgrade GD? PHP still comes bundled with the three year old version 2.0.34, even though there have been lots of bugfixes in 2.0.35 and 2.0.36 (most importantly, 2.0.36 now actually supports unicode text, rather than "any unicode text as long as it's only UCS-2", which means any unicode using blocks introduced after 3.1 don't work). Related to that, how would one update both GD and FreeType2? - Mike "Pomax" Kamermans nihongoresources.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I upgrade GD?
PmI wrote: > Hi, > > how do I upgrade GD? PHP still comes bundled with the three year old > version 2.0.34, even though there have been lots of bugfixes in 2.0.35 > and 2.0.36 (most importantly, 2.0.36 now actually supports unicode > text, rather than "any unicode text as long as it's only UCS-2", which > means any unicode using blocks introduced after 3.1 don't work). > > Related to that, how would one update both GD and FreeType2? Install/upgrade libgd and freetype2 individually, then rebuild PHP using those libaries. -- Per Jessen, Zürich (14.2°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] blog design issue...
I know you are all probably thinking "What does this have to do with PHP?" and in reality... It's probably stretching it a little bit... BUT I am in the process of writing a blog software (Yes I'm aware of all the open source, and paid stuff out there... I'm doing this to learn :)) I am looking at adding "categories" to my blog posts so I can organize my drivel into something that looks somewhat professional, or at the very least, organized so you can filter out all the crap... What I'm wondering about though, is would it be better from a database design stand point to do a database field for "categories" and then in there put "Personal", "Business", "Crap I found funny" Basically 1 database field for all the categories I decide to use. OR should I go the other route and do 1 database field for each category? This is going to be a small blog to start, but I guess I should always be looking at performance, security, & maintainability right? I did read the post that tedd put up about looking at storing variables differently and am considering going that route... But just wanted to know what you all think :) Oh I'm also not expecting to have more then 4 or 5 categories at the most Unless I release the blog to the public and take wordpress down :P So any help would be greatly appreciated :) Thanks yall! Jason Pruim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] blog design issue...
On Sat, 2010-03-20 at 11:40 -0400, Jason Pruim wrote: > I know you are all probably thinking "What does this have to do with > PHP?" and in reality... It's probably stretching it a little bit... > BUT I am in the process of writing a blog software (Yes I'm aware of > all the open source, and paid stuff out there... I'm doing this to > learn :)) I am looking at adding "categories" to my blog posts so I > can organize my drivel into something that looks somewhat > professional, or at the very least, organized so you can filter out > all the crap... > > What I'm wondering about though, is would it be better from a database > design stand point to do a database field for "categories" and then in > there put "Personal", "Business", "Crap I found funny" Basically 1 > database field for all the categories I decide to use. OR should I go > the other route and do 1 database field for each category? > > This is going to be a small blog to start, but I guess I should always > be looking at performance, security, & maintainability right? > > I did read the post that tedd put up about looking at storing > variables differently and am considering going that route... But just > wanted to know what you all think :) > > Oh I'm also not expecting to have more then 4 or 5 categories at > the most Unless I release the blog to the public and take > wordpress down :P > > So any help would be greatly appreciated :) > > Thanks yall! > > Jason Pruim > > > I'd go with a new table for storing the categories in, and store the id for the corresponding category in the blog table. That way, you can add new categories easily later, pull out records quickly by category and update category labels easily at any time. This also allows you to develop the blog further in the future and allow a blog post to have more than one category by introducing a third table for category links, which can store blog post id's with the category id's. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] blog design issue...
Hi, > I know you are all probably thinking "What does this have to do with PHP?" > and in reality... It's probably stretching it a little bit... BUT I am in > the process of writing a blog software (Yes I'm aware of all the open > source, and paid stuff out there... I'm doing this to learn :)) I am looking > at adding "categories" to my blog posts so I can organize my drivel into > something that looks somewhat professional, or at the very least, organized > so you can filter out all the crap... > > What I'm wondering about though, is would it be better from a database > design stand point to do a database field for "categories" and then in there > put "Personal", "Business", "Crap I found funny" Basically 1 database field > for all the categories I decide to use. OR should I go the other route and > do 1 database field for each category? > > This is going to be a small blog to start, but I guess I should always be > looking at performance, security, & maintainability right? > > I did read the post that tedd put up about looking at storing variables > differently and am considering going that route... But just wanted to know > what you all think :) > > Oh I'm also not expecting to have more then 4 or 5 categories at the > most Unless I release the blog to the public and take wordpress down :P You could use a SET field type. Internally MySQL uses numbers (a bit mask IIRC) for them. Though you will be limited to 32 categories. Eg: Categories table: ID Name 1 Personal 2 Business 4 Crap I found funny Articles table: ID Title Category === 1 My first blog entry 1 2 A joke from work6 3 A joke from home 5 4 A joke 4 The numbers are bitwise sums of the corresponding category IDs. eg.4&2=6. I think. MySQL has some built in functions for dealing with sets, like FIND_IN_SET() IIRC, which make life a lot easier. -- Richard Heyes HTML5 canvas graphing: RGraph - http://www.rgraph.net (updated 13th March) Lots of PHP and Javascript code - http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] blog design issue...
Jason Pruim wrote: I know you are all probably thinking "What does this have to do with PHP?" and in reality... It's probably stretching it a little bit... BUT I am in the process of writing a blog software (Yes I'm aware of all the open source, and paid stuff out there... I'm doing this to learn :)) I am looking at adding "categories" to my blog posts so I can organize my drivel into something that looks somewhat professional, or at the very least, organized so you can filter out all the crap... What I'm wondering about though, is would it be better from a database design stand point to do a database field for "categories" and then in there put "Personal", "Business", "Crap I found funny" Basically 1 database field for all the categories I decide to use. OR should I go the other route and do 1 database field for each category? Give categories their own table, then it's simplistic to add more. Hard coding it as a column undermines the point of joins in SQL and makes your database design suck, not to mention your application ;) This is going to be a small blog to start, but I guess I should always be looking at performance, security, & maintainability right? Always. I did read the post that tedd put up about looking at storing variables differently and am considering going that route... But just wanted to know what you all think :) Table! Oh I'm also not expecting to have more then 4 or 5 categories at the most Unless I release the blog to the public and take wordpress down :P It's not what you expect, it's what your users expect that counts. Learn that and your software will be usable. So any help would be greatly appreciated :) :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] blog design issue...
Hi, > eg.4&2=6. Oops, that should be 4|2 = 6. -- Richard Heyes HTML5 canvas graphing: RGraph - http://www.rgraph.net (updated 13th March) Lots of PHP and Javascript code - http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] blog design issue...
At 11:40 AM -0400 3/20/10, Jason Pruim wrote: I know you are all probably thinking "What does this have to do with PHP?" and in reality... It's probably stretching it a little bit... BUT I am in the process of writing a blog software (Yes I'm aware of all the open source, and paid stuff out there... I'm doing this to learn :)) I am looking at adding "categories" to my blog posts so I can organize my drivel into something that looks somewhat professional, or at the very least, organized so you can filter out all the crap... What I'm wondering about though, is would it be better from a database design stand point to do a database field for "categories" and then in there put "Personal", "Business", "Crap I found funny" Basically 1 database field for all the categories I decide to use. OR should I go the other route and do 1 database field for each category? This is going to be a small blog to start, but I guess I should always be looking at performance, security, & maintainability right? I did read the post that tedd put up about looking at storing variables differently and am considering going that route... But just wanted to know what you all think :) Oh I'm also not expecting to have more then 4 or 5 categories at the most Unless I release the blog to the public and take wordpress down :P So any help would be greatly appreciated :) Thanks yall! Jason Pruim Jason: Basically whatever everyone else said, namely use a table to record every category you may want and that practice provides: 1) Expansion; You may want to add additional categories and adding it in one table makes sense over adding it to one, or more, selection controls you may have across your web site. 2) Changing the name of any category. You may find later (after hundreds of blog entires) that the category "Crap I found funny" has just been reviewed by your boss, wife, or mother-in-law and they have demanded that you change it to something more appropriate (according to them). If you used a table, then it's a simple matter to change it over hundred's of post. However, if you didn't, then you have a lot of work to do. Another consideration. I have a sort-of blog entry script I add to any page on my site where I want people to comment (see http://sperling.com/examples/new-menuh/ for an example). The coding to add this feature is a simple one line include statement. The included script looks at the page where it has been placed and creates a space for that page's related comments in the database. After which, whenever that page is loaded, the script calls out the appropriate entries and displays them. The entire process is automagical. The point I'm trying to express here is one of creating a script that doesn't require any customization for use. This is just food for thought when thinking about how to do this. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] blog design issue...
Table is the way to go for all the reasons that Rob mentioned. > > This is going to be a small blog to start, but I guess I should always be >> looking at performance, security, & maintainability right? >> > > Good way to start is start small and build a strong base around a good database, good performance practices and tight security you can then build the cool features as you see fit. Good thing about performance and security is that there are a ton of site that outline best practices which means you wont have to re-invent the wheel. GL
[PHP] Session Variable Problem
I have this perplexing issue of session varibles getting dropped. It is a 4 page form, the last page being a review page incase the submitter wants to change any of the information.If you go through the form, all of the information carries forward, and from the review page if you go back to edit, it is there, however is you go back to page 2, then to page 1, page one info is gone.It gets worse in that page 2 sessions drop (more likely over written) if you go from page 3 to 2. Each page is started with The page starts at http://www.paulgdesigns.com/one2one/lend_bor_input.php Im confused as to why they keep getting dropped and how to stop it. Hopefully I have given enough information. Thank you Gary __ Information from ESET Smart Security, version of virus signature database 4961 (20100320) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] blog design issue...
i'd go with "tags" over categories, because you can add multiple tags to a single blog post. table posts: postID integer ... table post_tags: postID integer tagID integer tagPercentageApplies float /* optional, not the industry standard */ table tags: tagID integer tagName varchar On Sat, Mar 20, 2010 at 5:40 PM, Jason Pruim wrote: > I know you are all probably thinking "What does this have to do with PHP?" > and in reality... It's probably stretching it a little bit... BUT I am in > the process of writing a blog software (Yes I'm aware of all the open > source, and paid stuff out there... I'm doing this to learn :)) I am looking > at adding "categories" to my blog posts so I can organize my drivel into > something that looks somewhat professional, or at the very least, organized > so you can filter out all the crap... > > What I'm wondering about though, is would it be better from a database > design stand point to do a database field for "categories" and then in there > put "Personal", "Business", "Crap I found funny" Basically 1 database field > for all the categories I decide to use. OR should I go the other route and > do 1 database field for each category? > > This is going to be a small blog to start, but I guess I should always be > looking at performance, security, & maintainability right? > > I did read the post that tedd put up about looking at storing variables > differently and am considering going that route... But just wanted to know > what you all think :) > > Oh I'm also not expecting to have more then 4 or 5 categories at the > most Unless I release the blog to the public and take wordpress down :P > > So any help would be greatly appreciated :) > > Thanks yall! > > Jason Pruim > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session Variable Problem
On Sat, Mar 20, 2010 at 2:22 PM, Gary wrote: > I have this perplexing issue of session varibles getting dropped. It is a > 4 > page form, the last page being a review page incase the submitter wants to > change any of the information.If you go through the form, all of the > information carries forward, and from the review page if you go back to > edit, it is there, however is you go back to page 2, then to page 1, page > one info is gone.It gets worse in that page 2 sessions drop (more likely > over written) if you go from page 3 to 2. > > Each page is started with > > session_start(); > } > > Session varible: > > $_SESSION['lend_fname']=stripslashes($_POST['lend_fname']); > > Calling the session varible to the input field for review > > 'value="'.htmlentities($_SESSION['lend_fname']).'"';}?> > > The page starts at http://www.paulgdesigns.com/one2one/lend_bor_input.php > > Im confused as to why they keep getting dropped and how to stop it. > > Hopefully I have given enough information. > > Thank you > > Gary > > > > __ Information from ESET Smart Security, version of virus signature > database 4961 (20100320) __ > > The message was checked by ESET Smart Security. > > http://www.eset.com > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Are you checking to see if the post variable is set in the code that handles saving the form values to session variables? I can't tell if you're doing this from the code you provided. If not, it's possible that when you are returning to one of the earlier pages, you're attempting to again save the form values even though the corresponding $_POST vars are empty. This would cause visiting page 2 to essentially delete the data previously posted from page 1. Using your example: // Only save if post variable present, which means if (isset($_POST['lend_fname'])) { $_SESSION['lend_fname']=stripslashes($_POST['lend_fname']); } Also, some users will likely click the back button during the process, which brings up a funky message. You might try building one page that is dedicated to saving all of the session variables, which then redirects to the corresponding next page in the process. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com
Re: [PHP] Session Variable Problem
Adam Thank you for your reply. ""Are you checking to see if the post variable is set in the code that handles saving the form values to session variables? "" No, I not done anything about the post variable, frankly I thought the session variable would cover it. I tried your code if (isset($_POST['lend_fname'])){ $_SESSION['lend_fname']=stripslashes($_POST['lend_fname']); } And it seems to work fine, the data seems to stay. Is there an easier method (perhaps putting the post or session variables into an array? Again thank you for your reply and your solution. Gary "Adam Richardson" wrote in message news:e4d8ea9d1003201529p1ab72baei147549423f5e3...@mail.gmail.com... > On Sat, Mar 20, 2010 at 2:22 PM, Gary wrote: > >> I have this perplexing issue of session varibles getting dropped. It is >> a >> 4 >> page form, the last page being a review page incase the submitter wants >> to >> change any of the information.If you go through the form, all of the >> information carries forward, and from the review page if you go back to >> edit, it is there, however is you go back to page 2, then to page 1, page >> one info is gone.It gets worse in that page 2 sessions drop (more likely >> over written) if you go from page 3 to 2. >> >> Each page is started with >> >> >session_start(); >> } >> >> Session varible: >> >> $_SESSION['lend_fname']=stripslashes($_POST['lend_fname']); >> >> Calling the session varible to the input field for review >> >> > 'value="'.htmlentities($_SESSION['lend_fname']).'"';}?> >> >> The page starts at http://www.paulgdesigns.com/one2one/lend_bor_input.php >> >> Im confused as to why they keep getting dropped and how to stop it. >> >> Hopefully I have given enough information. >> >> Thank you >> >> Gary >> >> >> >> __ Information from ESET Smart Security, version of virus >> signature >> database 4961 (20100320) __ >> >> The message was checked by ESET Smart Security. >> >> http://www.eset.com >> >> >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > Are you checking to see if the post variable is set in the code that > handles > saving the form values to session variables? I can't tell if you're doing > this from the code you provided. If not, it's possible that when you are > returning to one of the earlier pages, you're attempting to again save the > form values even though the corresponding $_POST vars are empty. This > would > cause visiting page 2 to essentially delete the data previously posted > from > page 1. > > Using your example: > > // Only save if post variable present, which means > if (isset($_POST['lend_fname'])) > { >$_SESSION['lend_fname']=stripslashes($_POST['lend_fname']); > } > > Also, some users will likely click the back button during the process, > which > brings up a funky message. You might try building one page that is > dedicated to saving all of the session variables, which then redirects to > the corresponding next page in the process. > > Adam > > -- > Nephtali: PHP web framework that functions beautifully > http://nephtaliproject.com > > > > __ Information from ESET Smart Security, version of virus > signature database 4961 (20100320) __ > > The message was checked by ESET Smart Security. > > http://www.eset.com > > __ Information from ESET Smart Security, version of virus signature database 4961 (20100320) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session Variable Problem
On Sat, Mar 20, 2010 at 6:56 PM, Gary wrote: > Adam > > Thank you for your reply. > > ""Are you checking to see if the post variable is set in the code that > handles saving the form values to session variables? "" > > No, I not done anything about the post variable, frankly I thought the > session variable would cover it. I tried your code > > if (isset($_POST['lend_fname'])){ > $_SESSION['lend_fname']=stripslashes($_POST['lend_fname']); > } > > And it seems to work fine, the data seems to stay. Is there an easier > method > (perhaps putting the post or session variables into an array? > > Again thank you for your reply and your solution. > > Gary > > > "Adam Richardson" wrote in message > news:e4d8ea9d1003201529p1ab72baei147549423f5e3...@mail.gmail.com... > > On Sat, Mar 20, 2010 at 2:22 PM, Gary wrote: > > > >> I have this perplexing issue of session varibles getting dropped. It is > >> a > >> 4 > >> page form, the last page being a review page incase the submitter wants > >> to > >> change any of the information.If you go through the form, all of the > >> information carries forward, and from the review page if you go back to > >> edit, it is there, however is you go back to page 2, then to page 1, > page > >> one info is gone.It gets worse in that page 2 sessions drop (more likely > >> over written) if you go from page 3 to 2. > >> > >> Each page is started with > >> > >> >>session_start(); > >> } > >> > >> Session varible: > >> > >> $_SESSION['lend_fname']=stripslashes($_POST['lend_fname']); > >> > >> Calling the session varible to the input field for review > >> > >> >> 'value="'.htmlentities($_SESSION['lend_fname']).'"';}?> > >> > >> The page starts at > http://www.paulgdesigns.com/one2one/lend_bor_input.php > >> > >> Im confused as to why they keep getting dropped and how to stop it. > >> > >> Hopefully I have given enough information. > >> > >> Thank you > >> > >> Gary > >> > >> > >> > >> __ Information from ESET Smart Security, version of virus > >> signature > >> database 4961 (20100320) __ > >> > >> The message was checked by ESET Smart Security. > >> > >> http://www.eset.com > >> > >> > >> > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > > > Are you checking to see if the post variable is set in the code that > > handles > > saving the form values to session variables? I can't tell if you're > doing > > this from the code you provided. If not, it's possible that when you are > > returning to one of the earlier pages, you're attempting to again save > the > > form values even though the corresponding $_POST vars are empty. This > > would > > cause visiting page 2 to essentially delete the data previously posted > > from > > page 1. > > > > Using your example: > > > > // Only save if post variable present, which means > > if (isset($_POST['lend_fname'])) > > { > >$_SESSION['lend_fname']=stripslashes($_POST['lend_fname']); > > } > > > > Also, some users will likely click the back button during the process, > > which > > brings up a funky message. You might try building one page that is > > dedicated to saving all of the session variables, which then redirects to > > the corresponding next page in the process. > > > > Adam > > > > -- > > Nephtali: PHP web framework that functions beautifully > > http://nephtaliproject.com > > > > > > > > __ Information from ESET Smart Security, version of virus > > signature database 4961 (20100320) __ > > > > The message was checked by ESET Smart Security. > > > > http://www.eset.com > > > > > > > > __ Information from ESET Smart Security, version of virus signature > database 4961 (20100320) __ > > The message was checked by ESET Smart Security. > > http://www.eset.com > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe
[PHP] Pulling my hair out over an include_once();
Hey all, i'm sure i'm missing something glaringly obvious, but i have yet to find a solution to this online... so heres the line of code that i'm getting hung up on: http://www.jennysjunket.com/magpierss/rss_fetch.inc";);?> which gives me this: *Warning*: include() [function.include]: URL file-access is disabled in the server configuration in */home/content/81/5634781/html/ebay.php* on line*1* *Warning*: include(http://www.jennysjunket.com/magpierss/rss_fetch.inc) [ function.include]: failed to open stream: no suitable wrapper could be found in */home/content/81/5634781/html/ebay.php* on line *1* *Warning*: include() [function.include]: Failed opening ' http://www.jennysjunket.com/magpierss/rss_fetch.inc' for inclusion (include_path='.:/usr/local/php5/lib/php') in * /home/content/81/5634781/html/ebay.php* on line *1* * * ive got all of my permissions set as open as i can, but i'm still baffled about it. Thanks, Watson
[PHP] Re: Pulling my hair out over an include_once();
ah, i forgot to properly phrase my question... what am i doing wrong, and how do i make it work? slash, could you guys/girls point me towards a tutorial that will give me a hand? Thanks again, Watson On Sun, Mar 21, 2010 at 1:00 AM, Watson Blair wrote: > Hey all, i'm sure i'm missing something glaringly obvious, but i have yet > to find a solution to this online... so heres the line of code that i'm > getting hung up on: > > http://www.jennysjunket.com/magpierss/rss_fetch.inc > ");?> > > which gives me this: > > *Warning*: include() [function.include]: URL file-access is disabled in > the server configuration in */home/content/81/5634781/html/ebay.php* on > line*1* > > *Warning*: include(http://www.jennysjunket.com/magpierss/rss_fetch.inc) [ > function.include]: failed to open stream: no suitable wrapper could be > found in */home/content/81/5634781/html/ebay.php* on line *1* > > *Warning*: include() [function.include]: Failed opening ' > http://www.jennysjunket.com/magpierss/rss_fetch.inc' for inclusion > (include_path='.:/usr/local/php5/lib/php') in * > /home/content/81/5634781/html/ebay.php* on line *1* > * > * > ive got all of my permissions set as open as i can, but i'm > still baffled about it. > Thanks, > Watson >
Re: [PHP] Re: Pulling my hair out over an include_once();
Hi, As the error says, this is a problem with the server configuration. In your php.ini file, allow_url_include should be enabled. As an alternative, if you have allow_url_include off, but allow_url_fopen on, you can file_get_contents() that URL and eval() it. Keep in mind you need *absolute* trust that the URL won't serve malicious PHP code, or change and break your site. If you need to run this code, it's a lot better to save the file from your browser and store it with your site, then include it locally. It'll be also faster this way. Regards, Stan Vassilev ah, i forgot to properly phrase my question... what am i doing wrong, and how do i make it work? slash, could you guys/girls point me towards a tutorial that will give me a hand? Thanks again, Watson On Sun, Mar 21, 2010 at 1:00 AM, Watson Blair wrote: Hey all, i'm sure i'm missing something glaringly obvious, but i have yet to find a solution to this online... so heres the line of code that i'm getting hung up on: http://www.jennysjunket.com/magpierss/rss_fetch.inc ");?> which gives me this: *Warning*: include() [function.include]: URL file-access is disabled in the server configuration in */home/content/81/5634781/html/ebay.php* on line*1* *Warning*: include(http://www.jennysjunket.com/magpierss/rss_fetch.inc) [ function.include]: failed to open stream: no suitable wrapper could be found in */home/content/81/5634781/html/ebay.php* on line *1* *Warning*: include() [function.include]: Failed opening ' http://www.jennysjunket.com/magpierss/rss_fetch.inc' for inclusion (include_path='.:/usr/local/php5/lib/php') in * /home/content/81/5634781/html/ebay.php* on line *1* * * ive got all of my permissions set as open as i can, but i'm still baffled about it. Thanks, Watson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pulling my hair out over an include_once();
On Sun, Mar 21, 2010 at 1:12 AM, Watson Blair wrote: > ah, i forgot to properly phrase my question... what am i doing wrong, and > how do i make it work? slash, could you guys/girls point me towards a > tutorial that will give me a hand? > Thanks again, > Watson > > On Sun, Mar 21, 2010 at 1:00 AM, Watson Blair >wrote: > > > Hey all, i'm sure i'm missing something glaringly obvious, but i have yet > > to find a solution to this online... so heres the line of code that i'm > > getting hung up on: > > > > http://www.jennysjunket.com/magpierss/rss_fetch.inc > > ");?> > > > > which gives me this: > > > > *Warning*: include() [function.include]: URL file-access is disabled in > > the server configuration in */home/content/81/5634781/html/ebay.php* on > > line*1* > > > > *Warning*: include(http://www.jennysjunket.com/magpierss/rss_fetch.inc) > [ > > function.include]: failed to open stream: no suitable wrapper could be > > found in */home/content/81/5634781/html/ebay.php* on line *1* > > > > *Warning*: include() [function.include]: Failed opening ' > > http://www.jennysjunket.com/magpierss/rss_fetch.inc' for inclusion > > (include_path='.:/usr/local/php5/lib/php') in * > > /home/content/81/5634781/html/ebay.php* on line *1* > > * > > * > > ive got all of my permissions set as open as i can, but i'm > > still baffled about it. > > Thanks, > > Watson > > > There are several potential problems with trying to use include_once (same issues as include()) when trying to retrieve a resource by URL: http://www.php.net/manual/en/function.include.php Try file_get_contents instead, as in the below example: http://www.jennysjunket.com/magpierss/rss_fetch.inc ");?> And if that's not enabled on your server, try using CURL as outlined in this tutorial: http://phpsense.com/php/php-curl-functions.html Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com
Re: [PHP] Pulling my hair out over an include_once();
is this file you need on your local server or truely on another machine? and if it's on another machine, why do you need to include() it from there? why not make a local copy as was suggested earlier? there are many reasons not to include php scripts off other servers, esp if the servers involved are not in the same building. On Sun, Mar 21, 2010 at 6:00 AM, Watson Blair wrote: > Hey all, i'm sure i'm missing something glaringly obvious, but i have yet to > find a solution to this online... so heres the line of code that i'm getting > hung up on: > > http://www.jennysjunket.com/magpierss/rss_fetch.inc";);?> > > which gives me this: > > *Warning*: include() [function.include]: URL file-access is disabled in the > server configuration in */home/content/81/5634781/html/ebay.php* on line*1* > > *Warning*: include(http://www.jennysjunket.com/magpierss/rss_fetch.inc) [ > function.include]: failed to open stream: no suitable wrapper could be found > in */home/content/81/5634781/html/ebay.php* on line *1* > > *Warning*: include() [function.include]: Failed opening ' > http://www.jennysjunket.com/magpierss/rss_fetch.inc' for inclusion > (include_path='.:/usr/local/php5/lib/php') in * > /home/content/81/5634781/html/ebay.php* on line *1* > * > * > ive got all of my permissions set as open as i can, but i'm > still baffled about it. > Thanks, > Watson > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pulling my hair out over an include_once();
On Sun, Mar 21, 2010 at 1:45 AM, Stan Vassilev wrote: > > Hi, > > As the error says, this is a problem with the server configuration. > In your php.ini file, allow_url_include should be enabled. > > As an alternative, if you have allow_url_include off, but allow_url_fopen > on, you can file_get_contents() that URL and eval() it. > > Keep in mind you need *absolute* trust that the URL won't serve malicious > PHP code, or change and break your site. If you need to run this code, it's > a lot better to save the file from your browser and store it with your site, > then include it locally. It'll be also faster this way. > > Regards, > Stan Vassilev > > > > ah, i forgot to properly phrase my question... what am i doing wrong, and >> how do i make it work? slash, could you guys/girls point me towards a >> tutorial that will give me a hand? >> Thanks again, >> Watson >> >> On Sun, Mar 21, 2010 at 1:00 AM, Watson Blair > >wrote: >> >> Hey all, i'm sure i'm missing something glaringly obvious, but i have yet >>> to find a solution to this online... so heres the line of code that i'm >>> getting hung up on: >>> >>> http://www.jennysjunket.com/magpierss/rss_fetch.inc >>> ");?> >>> >>> which gives me this: >>> >>> *Warning*: include() [function.include]: URL file-access is disabled in >>> the server configuration in */home/content/81/5634781/html/ebay.php* on >>> line*1* >>> >>> *Warning*: include(http://www.jennysjunket.com/magpierss/rss_fetch.inc) >>> [ >>> function.include]: failed to open stream: no suitable wrapper could be >>> found in */home/content/81/5634781/html/ebay.php* on line *1* >>> >>> *Warning*: include() [function.include]: Failed opening ' >>> http://www.jennysjunket.com/magpierss/rss_fetch.inc' for inclusion >>> (include_path='.:/usr/local/php5/lib/php') in * >>> /home/content/81/5634781/html/ebay.php* on line *1* >>> * >>> * >>> ive got all of my permissions set as open as i can, but i'm >>> still baffled about it. >>> Thanks, >>> Watson >>> >>> >> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Actually, after looking at the link you mentioned, I see it's PHP (I'm sorry, I didn't check the link before), and I'm wondering if you were just trying to include a file that's already on your server. Grabbing a PHP file from a remote source for parsing is a bad idea in terms of security, so hopefully that's not what you're doing. If the file is on your server, then the path would be something like below judging by your error message: Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com
Re: [PHP] Re: Pulling my hair out over an include_once();
hey adam, i changed the code to use file_get_contents();, however, when i tried to later call a function form the file rss_fetch.inc it came up as an undefined function did i miss something? thanks, Watson On Sun, Mar 21, 2010 at 1:46 AM, Adam Richardson wrote: > On Sun, Mar 21, 2010 at 1:12 AM, Watson Blair wrote: > >> ah, i forgot to properly phrase my question... what am i doing wrong, and >> how do i make it work? slash, could you guys/girls point me towards a >> tutorial that will give me a hand? >> Thanks again, >> Watson >> >> On Sun, Mar 21, 2010 at 1:00 AM, Watson Blair > >wrote: >> >> > Hey all, i'm sure i'm missing something glaringly obvious, but i have >> yet >> > to find a solution to this online... so heres the line of code that i'm >> > getting hung up on: >> > >> > http://www.jennysjunket.com/magpierss/rss_fetch.inc >> > ");?> >> > >> > which gives me this: >> > >> > *Warning*: include() [function.include]: URL file-access is disabled in >> > the server configuration in */home/content/81/5634781/html/ebay.php* on >> > line*1* >> > >> > *Warning*: include(http://www.jennysjunket.com/magpierss/rss_fetch.inc) >> [ >> >> > function.include]: failed to open stream: no suitable wrapper could be >> > found in */home/content/81/5634781/html/ebay.php* on line *1* >> > >> > *Warning*: include() [function.include]: Failed opening ' >> > http://www.jennysjunket.com/magpierss/rss_fetch.inc' for inclusion >> > (include_path='.:/usr/local/php5/lib/php') in * >> > /home/content/81/5634781/html/ebay.php* on line *1* >> > * >> > * >> > ive got all of my permissions set as open as i can, but i'm >> > still baffled about it. >> > Thanks, >> > Watson >> > >> > > There are several potential problems with trying to use include_once (same > issues as include()) when trying to retrieve a resource by URL: > http://www.php.net/manual/en/function.include.php > > Try file_get_contents instead, as in the below example: > http://www.jennysjunket.com/magpierss/rss_fetch.inc";);?> > > And if that's not enabled on your server, try using CURL as outlined in > this tutorial: > http://phpsense.com/php/php-curl-functions.html > > Adam > > -- > Nephtali: PHP web framework that functions beautifully > http://nephtaliproject.com >
Re: [PHP] Re: Pulling my hair out over an include_once();
ya, sorry i diden't specify, i'm trying to build a simple RSS (haha, fat chance it being simple, right?) reader for a site to import an ebay RSS feed and desplay the contense. I'm using Magpie to accomplish it. also, you'll be glad to know that your fix worked like a charm, all i need to do now is limit the number of results and orginize all of the data returned (images and such). my only curiousity about this now is what is up with that file path why woulden't using the URL work? On Sun, Mar 21, 2010 at 2:13 AM, Adam Richardson wrote: > On Sun, Mar 21, 2010 at 1:45 AM, Stan Vassilev wrote: > >> >> Hi, >> >> As the error says, this is a problem with the server configuration. >> In your php.ini file, allow_url_include should be enabled. >> >> As an alternative, if you have allow_url_include off, but allow_url_fopen >> on, you can file_get_contents() that URL and eval() it. >> >> Keep in mind you need *absolute* trust that the URL won't serve malicious >> PHP code, or change and break your site. If you need to run this code, it's >> a lot better to save the file from your browser and store it with your site, >> then include it locally. It'll be also faster this way. >> >> Regards, >> Stan Vassilev >> >> >> >> ah, i forgot to properly phrase my question... what am i doing wrong, and >>> how do i make it work? slash, could you guys/girls point me towards a >>> tutorial that will give me a hand? >>> Thanks again, >>> Watson >>> >>> On Sun, Mar 21, 2010 at 1:00 AM, Watson Blair >> >wrote: >>> >>> Hey all, i'm sure i'm missing something glaringly obvious, but i have yet to find a solution to this online... so heres the line of code that i'm getting hung up on: http://www.jennysjunket.com/magpierss/rss_fetch.inc ");?> which gives me this: *Warning*: include() [function.include]: URL file-access is disabled in the server configuration in */home/content/81/5634781/html/ebay.php* on line*1* *Warning*: include(http://www.jennysjunket.com/magpierss/rss_fetch.inc) [ function.include]: failed to open stream: no suitable wrapper could be found in */home/content/81/5634781/html/ebay.php* on line *1* *Warning*: include() [function.include]: Failed opening ' http://www.jennysjunket.com/magpierss/rss_fetch.inc' for inclusion (include_path='.:/usr/local/php5/lib/php') in * /home/content/81/5634781/html/ebay.php* on line *1* * * ive got all of my permissions set as open as i can, but i'm still baffled about it. Thanks, Watson >>> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > Actually, after looking at the link you mentioned, I see it's PHP (I'm > sorry, I didn't check the link before), and I'm wondering if you were just > trying to include a file that's already on your server. Grabbing a PHP file > from a remote source for parsing is a bad idea in terms of security, so > hopefully that's not what you're doing. > > If the file is on your server, then the path would be something like below > judging by your error message: > include_once("/home/content/81/5634781/html/magpierss/rss_fetch.inc"); ?> > > Adam > > -- > Nephtali: PHP web framework that functions beautifully > http://nephtaliproject.com >
Re: [PHP] Re: Pulling my hair out over an include_once();
On Sun, Mar 21, 2010 at 2:20 AM, Watson Blair wrote: > ya, sorry i diden't specify, i'm trying to build a simple RSS (haha, fat > chance it being simple, right?) reader for a site to import an ebay RSS feed > and desplay the contense. I'm using Magpie to accomplish it. also, you'll be > glad to know that your fix worked like a charm, all i need to do now is > limit the number of results and orginize all of the data returned (images > and such). my only curiousity about this now is what is up with that file > path why woulden't using the URL work? > > > On Sun, Mar 21, 2010 at 2:13 AM, Adam Richardson wrote: > >> On Sun, Mar 21, 2010 at 1:45 AM, Stan Vassilev wrote: >> >>> >>> Hi, >>> >>> As the error says, this is a problem with the server configuration. >>> In your php.ini file, allow_url_include should be enabled. >>> >>> As an alternative, if you have allow_url_include off, but allow_url_fopen >>> on, you can file_get_contents() that URL and eval() it. >>> >>> Keep in mind you need *absolute* trust that the URL won't serve malicious >>> PHP code, or change and break your site. If you need to run this code, it's >>> a lot better to save the file from your browser and store it with your site, >>> then include it locally. It'll be also faster this way. >>> >>> Regards, >>> Stan Vassilev >>> >>> >>> >>> ah, i forgot to properly phrase my question... what am i doing wrong, and how do i make it work? slash, could you guys/girls point me towards a tutorial that will give me a hand? Thanks again, Watson On Sun, Mar 21, 2010 at 1:00 AM, Watson Blair >>> >wrote: Hey all, i'm sure i'm missing something glaringly obvious, but i have > yet > to find a solution to this online... so heres the line of code that i'm > getting hung up on: > > http://www.jennysjunket.com/magpierss/rss_fetch.inc > ");?> > > which gives me this: > > *Warning*: include() [function.include]: URL file-access is disabled in > the server configuration in */home/content/81/5634781/html/ebay.php* on > line*1* > > *Warning*: include(http://www.jennysjunket.com/magpierss/rss_fetch.inc) > [ > function.include]: failed to open stream: no suitable wrapper could be > found in */home/content/81/5634781/html/ebay.php* on line *1* > > *Warning*: include() [function.include]: Failed opening ' > http://www.jennysjunket.com/magpierss/rss_fetch.inc' for inclusion > (include_path='.:/usr/local/php5/lib/php') in * > /home/content/81/5634781/html/ebay.php* on line *1* > * > * > ive got all of my permissions set as open as i can, but i'm > still baffled about it. > Thanks, > Watson > > >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >> Actually, after looking at the link you mentioned, I see it's PHP (I'm >> sorry, I didn't check the link before), and I'm wondering if you were just >> trying to include a file that's already on your server. Grabbing a PHP file >> from a remote source for parsing is a bad idea in terms of security, so >> hopefully that's not what you're doing. >> >> If the file is on your server, then the path would be something like below >> judging by your error message: >> > include_once("/home/content/81/5634781/html/magpierss/rss_fetch.inc"); ?> >> >> Adam >> >> -- >> Nephtali: PHP web framework that functions beautifully >> http://nephtaliproject.com >> > > Because of the potential security issues, the option to supply URL's is often not enabled: http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen Most of the time you can just look at your error messages when an include doesn't work on your server to figure out what the local path should be. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com
Re: [PHP] Re: Pulling my hair out over an include_once();
cool. tip: if you're gonna use libs like magpie, in 1 or more projects on a webserver, i'd put it in htdocs/lib/magpie-x.y.z, (x.y.z=versionnumber), then require_once('/lib/magpie-x.y.z/[magpie top include script.inc]') it at the top of htdocs/projectName/index.php or if it's only to be used in a specific function of the website, at the top of where-ever the code handles(starts) that function. an alternative is htdocs/projectName/lib/magpie-x.y.z it's not necessary to do it this way, but it does provide faster management of libs and a decrease in bug-count. On Sun, Mar 21, 2010 at 7:28 AM, wrote: > Duly noted. Thanks for baring with me on this one guys! > Sent from my Verizon Wireless BlackBerry > > -Original Message- > From: Rene Veerman > Date: Sun, 21 Mar 2010 07:26:24 > To: Watson Blair > Subject: Re: [PHP] Re: Pulling my hair out over an include_once(); > > if you're going to use php software, put it on the server it must run > on, and require_once() it with an absolute or relative path, not a > URL. That's a golden rule for security, stability and performance > reasons. > > On Sun, Mar 21, 2010 at 7:20 AM, Watson Blair wrote: >> ya, sorry i diden't specify, i'm trying to build a simple RSS (haha, fat >> chance it being simple, right?) reader for a site to import an ebay RSS feed >> and desplay the contense. I'm using Magpie to accomplish it. also, you'll be >> glad to know that your fix worked like a charm, all i need to do now is >> limit the number of results and orginize all of the data returned (images >> and such). my only curiousity about this now is what is up with that file >> path why woulden't using the URL work? >> >> On Sun, Mar 21, 2010 at 2:13 AM, Adam Richardson wrote: >> >>> On Sun, Mar 21, 2010 at 1:45 AM, Stan Vassilev wrote: >>> Hi, As the error says, this is a problem with the server configuration. In your php.ini file, allow_url_include should be enabled. As an alternative, if you have allow_url_include off, but allow_url_fopen on, you can file_get_contents() that URL and eval() it. Keep in mind you need *absolute* trust that the URL won't serve malicious PHP code, or change and break your site. If you need to run this code, it's a lot better to save the file from your browser and store it with your site, then include it locally. It'll be also faster this way. Regards, Stan Vassilev ah, i forgot to properly phrase my question... what am i doing wrong, and > how do i make it work? slash, could you guys/girls point me towards a > tutorial that will give me a hand? > Thanks again, > Watson > > On Sun, Mar 21, 2010 at 1:00 AM, Watson Blair >wrote: > > Hey all, i'm sure i'm missing something glaringly obvious, but i have >> yet >> to find a solution to this online... so heres the line of code that i'm >> getting hung up on: >> >> http://www.jennysjunket.com/magpierss/rss_fetch.inc >> ");?> >> >> which gives me this: >> >> *Warning*: include() [function.include]: URL file-access is disabled in >> the server configuration in */home/content/81/5634781/html/ebay.php* on >> line*1* >> >> *Warning*: include(http://www.jennysjunket.com/magpierss/rss_fetch.inc) >> [ >> function.include]: failed to open stream: no suitable wrapper could be >> found in */home/content/81/5634781/html/ebay.php* on line *1* >> >> *Warning*: include() [function.include]: Failed opening ' >> http://www.jennysjunket.com/magpierss/rss_fetch.inc' for inclusion >> (include_path='.:/usr/local/php5/lib/php') in * >> /home/content/81/5634781/html/ebay.php* on line *1* >> * >> * >> ive got all of my permissions set as open as i can, but i'm >> still baffled about it. >> Thanks, >> Watson >> >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php >>> Actually, after looking at the link you mentioned, I see it's PHP (I'm >>> sorry, I didn't check the link before), and I'm wondering if you were just >>> trying to include a file that's already on your server. Grabbing a PHP file >>> from a remote source for parsing is a bad idea in terms of security, so >>> hopefully that's not what you're doing. >>> >>> If the file is on your server, then the path would be something like below >>> judging by your error message: >>> >> include_once("/home/content/81/5634781/html/magpierss/rss_fetch.inc"); ?> >>> >>> Adam >>> >>> -- >>> Nephtali: PHP web framework that functions beautifully >>> http://nephtaliproject.com >>> >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php