Re: [PHP] Newbie Still Looking for a Mentor
Pardon Me Sir...I do not blurt. I simple asked a question. It was up to you to be nice or be a total a** and you choose the latter. P. Westover Nick Wilson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then P. Westover blurted I'm looking for someone who has some extra time, who will answer my questions and guide me in the right direction with a project I'd like to create. I would like to work with one person, because everyone has their own way of doing things. I would like to avoid the too many cooks syndrome. That's a little unrealistic don't you think? The best way to learn php is to experiment, when it goes wrong consult the manual, and if you still don't get it come here. I have been studying the 6 books I bought, but I feel I'm missing something. That's a lot of books, the only thing you should be missing is a whole heap of cash. Please...only respond if you can follow through. I'll give the details to the responders and then you decide if you want to take me on or not. As a list member I'm always happy to lend a hand in those area's I'm knowlegeable in. That's the beuty of it. It doesn't matter how good you are there will always be areas that you are weak in, but on a list like this you'll always find someone strong in the area you need help with. - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UQ5NHpvrrTa6L5oRAuODAJ97RvOauV09phHjIYeLZL36Xl4aTQCdGUT+ SLaj5D3RTbcElFmp996bzoY= =Tb4z -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] outbound traffic, sessions reg expressions
Hi, I want to create a file (out.php???) which measures and keeps stats on the sites we link OUT to, including affiliates... i've got a few ideas how to do this, so that's not the problem... the problem is that a lot of the content on the site is contributed through writers, not programmers, and since we know and trust these contributors, we're comfortable with them being allowed to add links in the text, etc etc, and don't strip those tags. however, it's one thing to teach a whole heap of writers to link in this way: A HREF=http://somewhere; TARGET=_newclick/a but it's a lot harder (or perhaps, more prone to errors, etc) to ask them to do something like: A HREF=out.php?url=http://somewhere.com;click/a ... and then if it's wise to take the special characters out, replacing them with ASCI (eg %20), then it's virtualy impossible. THEN I thought about the fact that i'll be looking to add URL based sessiosn to the site soon, which will require all links to carry a session id... again, too much to ask of them, and too unreliable. So, one solution would be to use regular expressions to analyse text for links, determin if they are internal or external, check for target=_new, encode sessions, etc etc. Big job for me, maybe not for some of the regexp pros :) OR, another option would be to establish a custom tag LINK (for internal) and ELINK for external pages eg ELINK http://somewhere.com;click/a, and let PHP convert it to a suitable link, with sessions, TARGET=_new, etc etc... and better still, take that link, and pipe it through something like out.php as discussed above, without anyone having to worry about fussy syntax, sessions, etc. Has anyone tried anything like this? has anyone got code snippets, or perhaps the ability to write the reg exps? Many thanks, Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Newbie Still Looking for a Mentor
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then P. Westover blurted Pardon Me Sir...I do not blurt. I simple asked a question. It was up to you to be nice or be a total a** and you choose the latter. Hey, that's just the attribution, no offence was intended, *lots* of people customize their attributions. I see all kinds of things 'and then John Smith muttered', and my favourite 'Alas, at some point hitherto John Smith hath spake thusly' nobody else seems bothered, I just wanted to agree with you on that rather silly post you were commenting on not insult you. - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8URdhHpvrrTa6L5oRAnZEAKCnpTdNDMn99SZxlILVIG1mtYnRcwCfZIMz DkWhYdI95HUGzGX23ASwYkQ= =Ar0f -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Newbie Still Looking for a Mentor
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Nick Wilson blurted nobody else seems bothered, I just wanted to agree with you on that rather silly post you were commenting on not insult you. My mistake, I thought this was a differnt thread :) Same thing applies though I, no insult intended, I hope it was only a misunderstanding over my mail attribution and not the content of my post that upset you? - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8URgsHpvrrTa6L5oRAnZOAKCnVWHZ2ctF2XIQ3tlCyaJGfihfWgCfTt8L lVl+gAjZHWHG+vFYBp/8xwY= =pPsL -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Correct URL's
Hi I have a HTML-Form where user's can enter their website-address. Some of you know the resulting problem for sure: most users enter www.php.net, some users enter http://www.php.net; and some others enter http://www.php.net/;. The last version is IMHO the most correct form. (http://www.php.net; is commonly used, but afaik it's either the webbrowser or the webserver which appends the missing /). So my problem was to rewrite the url's so that entered URL's will be displayed correct, no matter how the user entered it. For this purpose I wrote following function: function rewriteURL($url, $base=){ $purl = parse_url($url); if (!isset($purl['scheme']) || (!$purl['scheme'])){ $url = http://.$url; } $purl = parse_url($url); if ((!isset($purl['path'])) || (!$purl['path'])){ $url .= '/'; } return $url; } My Questions: -Are there URLs which could be entered correct and become wrong when rewritten with that function? (Yes, I have tested the function myself, but there are too many possibilities so it's impossible for me to cover all of them) -What was the best way to check, if the give address really exists? (I thought on a test like this: $exists = true; @fopen($url) or $exists = false; return $exists;) TIA Stefan Rusterholz
[PHP] move_uploaded_file() query
Sorry for my past ignorance using this news site forum I can only out this down to my lack of knowledge. I have been work on me first script for some time now and have been making good progress up until now. I have a script that adds a author to the database, ID, Name, Email, Picture Name. When a author is added it uploads their details plus it uploads and renames the image...that is working fine. It all falls down when I try and call the new file name to show the picture. It is uploading the original file name to the database and not the renamed version. I would be very grateful for any pointers on how this small problem can be solved. I hope this makes more sense than previous threads I have submitted. Cheers Will Here is the script as it stands: $sql = INSERT INTO $table_name (id, name, email, picture_name) VALUES ('$id', '$name', '$email', '$picture_name') ; $result = @mysql_query($sql, $connection) or die (couldn't execute query); if ($picture != ) { $path = /home/main/main/php/; $datee = date(sdFy); move_uploaded_file($picture,$path . $datee . $picture_name); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Help with regular expressions
Hi Daniel, José daniel ramos wey ... Hi! I´m new to regular expressions, and it seems to be an art to make it work as expected. I´m trying to remove all single-line comments from an string - that´s everything after // to the end of a line. I expected that this would do the job: ereg_replace(//[[:alnum:]]*\n,,$string), but it didn´t work. Any tips? First off, IMO, you're better off using pcre regex functions than the posix ones: http://www.php.net/preg_replace ? $string = // line 1\nNormal line\n// line 2 with a few odd characters\£$%^*()_\nAnother normal line.; $string = preg_replace('!^//.*$!m', '', $string); echo $string; ? Your regex is basically saying this: //[[:alnum:]]*\n Match anywhere in the string (you have no anchor as to where the // should start), consume anything that is alphanumeric (0 through 9, a through z), as many times as they occur, followed by a new line. Thus, your regex would consume stuff like this: //sdfdfffsdfsdfsdd12345678900987sdfsdbfs but not // sdfdfffsdfsdfsdd12345678900987sdfsdbfs or // this is a comment. as for my example, I'm using exclamation marks as the delimiters, the m modifier which matches $ at the end of every newline, and ^ at the start of every new line. So: !^//.*$!m Means ^ at the start of the line // if there are two of these .* match everything $ up to the end of the new line and replace it with nothing. Check the pattern modifiers etc in the manual. HTH ~James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] date and time triggerring
Hi there, Is there any one who could give me an idea regarding the date and time triggering PHP script. This date and time script whould gives an output if ever it hit Jan 1 and print's it's year. Any idea? Thanks in advance, and also to all who keeps on helping a newbie like me. Regards, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Correct URL's
Stefan Rusterholz wrote: Part 1.1Type: Plain Text (text/plain) Encoding: quoted-printable What was the best way to check, if the give address really exists? Just try this function: http://www.php.net/manual/en/function.gethostbyname.php It returns the IP address of the given domain. Normally a domain can be accessed by the browser if it has a valid IP address and everything is configured correctly. Please do not send HTML messages. Alexander -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] A link
snip Don't click the above link. Don't be so rough - we all tried this at some time - remember, just before it became an old joke? :-) And I didn't click on it either... Agreed, what a tit. For anyone vaguely interested, it's a redirect followed by a lame javascript. Have a look at the source code, quite safely, at: http://www.samspade.org/t/safe?u=http://m-net.arbornet.org/~fusion/ Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Correct URL's
- Original Message - From: Alexander Weber [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 10:34 AM Subject: Re: [PHP] Correct URL's Stefan Rusterholz wrote What was the best way to check, if the give address really exists? Just try this function: http://www.php.net/manual/en/function.gethostbyname.php It returns the IP address of the given domain. Normally a domain can be accessed by the browser if it has a valid IP address and everything is configured correctly. But if I understand this function right, It will only work for URLs like http://www.php.net/ - what if the user has a free space from his ISP which is located in a subdir like http://www.php.net/users/myhome/? Please do not send HTML messages. Sorry, Outlook is crap and I'm just too lazy to buy (on Win you have to buy almost everything) another e-mail client for my working machine. But I finally moved my ass and changed the options to send text-only mails. I hope you are happy now :) (m$ thought it was a good idea to hide those options as good as possible - I disagree with them, but that's just normal ;-) Alexander Stefan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] A link
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Jon Haworth blurted Agreed, what a tit. For anyone vaguely interested, it's a redirect followed by a lame javascript. Have a look at the source code, quite safely, at: http://www.samspade.org/t/safe?u=http://m-net.arbornet.org/~fusion/ What does that function do? What was he trying to achieve? - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8US+0HpvrrTa6L5oRApprAJ0arjxLjhhpBY+cS5c6F3SD8/3NqACgomJ9 R9UNz7vKVf9kJ4UYL9Ol9Os= =Z9ep -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Correct URL's
Stefan Rusterholz wrote: http://www.php.net/manual/en/function.gethostbyname.php But if I understand this function right, It will only work for URLs like http://www.php.net/ - what if the user has a free space from his ISP which is located in a subdir like http://www.php.net/users/myhome/? If you want to check subdirs you have to connect to the URL and look at the response. You should use gethostbyname to check the domain (use some regular expressions on the URL) and then try to connect to the server and send a HTTP request (fsockopen and some other functions). Then you can check the response for error messages like 404. Alexander -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] getenv() replacement when running as ISAPI ???
Hi there! Anybody knows a replacement for the built-in getenv()-function since it's not supported when running as an ISAPI-module under Internet Information Server 5.0 on Windows 2000 Professional (well, at least according to the manual). I've created a small counter that looks up the user's IP in a database in order to prevent duplicate hits when user is reloding the page and to track how many users are currently online. Suggestions welcome BTW, this is the code I'm using now (temporarily running the CGI version): === CUT HERE === // ... // Get user's IP and user agent (-- problem arises here --) $ip = ip2long(($tmp = getenv(HTTP_X_FORWARD_FOR)) ? $tmp : getenv(REMOTE_ADDR)); // -- and here -- $useragent = getenv(HTTP_USER_AGENT); // Check if visit already counted $id = 0; $counted = false; $r = mysql_query(SELECT visitor.id, visitor.ip, visitor.useragent, visits.timestamp FROM visitor, visits WHERE visitor.id = visits.visitor_id ORDER BY visitor.id DESC); // ... === CUT HERE === Christian Blichmann _ don't hesitate - email me with your thoughts: e-mail: [EMAIL PROTECTED] - please remove the .nospam from address. _ do you want to know more? web:http://www.blichmann.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [binarycloud-dev] Re: [PEAR-DEV] Re: [metabase-dev] RE:[PEAR-DEV] New Metabase Aniversary release
On Tue, 2002-01-22 at 22:17, Alex Black wrote: Template classes are also foundation components of modern applications. They are certainly important, but they do not prevent interoperability in the same way that different database abstraction packages do. application, using APIs that are slightly different is a bad thing. Of course, but no one forces you to do that. I, as a developer, can choose if I want to use PEAR::Metabase in my application or PEAR::DB. Yes, which is not a good idea. If you're tying to get people to use a common set of high quality classes, you'll need to introduce some standards. Remember, PEAR ist not Midgard. PEAR is no application framework. It's a pool of classes that follow coding standards. As the project leader of binarycloud, which is an application framework that uses some limited amount of PEAR code, I am obviously aware of the difference. I have no interest in PEAR as an application framework, I like it as it is: pool of classes that follow coding standards. It has been repeated over, and over, and over again that PEAR is not CPAN. If PEAR will allow multiple versions of a foundation component like database abstraction, then PEAR certainly is CPAN, with coding standards added. CPAN is huge and tangled because its owners did not want to make decisions. PEAR can be that as well, though given the extremely limited CVS access to the repository it doesn't strike me as a CPAN clone, it strikes me as a concerted effort to come up with a set of base classes for common needs in the development community. Thus my argument for one abstraction layer. if you guys are building CPAN with coding standards, great, but say so. I and no doubt others will finally shut up about this question and we can all get on with writing code and designing stuff that works. This points to the age-old problem with PEAR: no one can decide what it actually is, so this argument comes up in different forms about once every three months. Just decide: is PEAR: -CPAN with coding standards -PHP Base Classes That's a big difference. I'm currently writing The PEAR Manifest, a document that clearly defines PEAR once and for all. I'll post the first draft on pear-dev here when it's done, but to answer your question, there has been talk about a core set of packages for a while. In the manifest these are called PFC (PHP Foundation Classes), although it will not say which packages the PFC includes. The manifest also covers PECL, and how PEAR relates to applications and frameworks. - Stig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PEAR-DEV] Re: [binarycloud-dev] Re: [PEAR-DEV] Re:[metabase-dev] RE: [PEAR-DEV] New Metabase Aniversary release
On Tue, 2002-01-22 at 22:24, Björn Schotte wrote: * Alex Black wrote: Of course, but no one forces you to do that. I, as a developer, can choose if I want to use PEAR::Metabase in my application or PEAR::DB. Yes, which is not a good idea. If you're tying to get people to use a common set of high quality classes, you'll need to introduce some standards. But furthermore you need to assure that you don't influence people too much while promoting PEAR as the new solution on PHP's heaven. difference. I have no interest in PEAR as an application framework, I like it as it is: pool of classes that follow coding standards. Yep. If PEAR will allow multiple versions of a foundation component like database abstraction, then PEAR certainly is CPAN, with coding standards added. I really don't think so. If it would be, I can't see any disadvantages. Why should PEAR people force the developers to use the one and only DB abstraction class? Nobody is forcing anyone to do anything, but the fact is that if you want to make components that deal with databases, you need to support one or more database APIs. Most people will feel that supporting several database abstraction layers is a waste of time, so we wish to provide _one_ API that all PEAR components can leverage. If we are too chicken to make this decision, we can't make interoperable components. Now we've even decided to merge PEAR DB and Metabase, and today it seems most people are tired of having multiple database layers, and welcome this effort. I don't understand why this is an issue for you, could you explain? - Stig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] getting a LAMP job in this economy
This has been an interesting thread, so I'll toss in my unique point of view... I have never held a full time job for anyone but myself. I find good opportunity and take advantage of it. I make decent money also. I have not marketed myself as a PHP developer, but rather as a problem finder and solver. Many times, clients do not know what they need - you need to find the appropriate solution to their problem, even though they do not know what their problem is! If you become well at doing this, you *will* be able to find business. Maybe it takes a passion for the field. But you do need to be able to recognize the issues and apply your vast knowledge (from many different areas) to it, and come up with a solution that your clients did not even know was possible. Now, this will not happen all the time, but when it does, you will be getting more business from them, and other businesses that they talk to. For those of you that have a mind for business, there are hundreds of unique opportunities that you can use to generate money. The site I am currently working on is owned by three people (including me). The each of us bring a very different skill to the table. I bring technical skills and problem solving, partner 1 brings Sales and marketing, partner 2 brings financial backing and a mind for business. The result is a site that is expected to top $1,000,000/year by 2003. When I first encountered the above venture (it is only 1 year old), I did not know PHP (I have had other experience - not web based though). I said I'll have your site working in 7 weeks. What a seven weeks! But I spent some crazy hours working on it, learned PHP, MySQL, CSS, HTML, etc..., and delivered the site (3 days late). Look for niche groups of people that you can market a particular, useful service to. Keep your eyes peeled - you will turn things up. In the mean time, learn. Become not only good, but excellent. When you have mastered PHP, master MySQL. When you have that down, learn how TCP/IP works, learn C, learn Perl, learn how to write Windows Apps that interface with the data on your Web server. Read, Read, Read. Feed your brain, be observant, and you will find ways to market yourself. More and more in the job market today, I see people that are good in 1 area. But one area is not good enough for most business issues. My hobby (that's what I call it) is finishing my Electro-Mechanical Engineering Technology Degree. They have the right idea - output students that can help a business with electronice, robotics, computers, plc's, mechanics, machining, etc... The student may not be fluent in all, but they know enough about different areas, that they can come up with ideas for solutions, and then figure out the details are. Keep in mind, a Job is not the only way to go. Learn, learn, learn more. Just my (limited) experience. Jason Garber IonZoft.com At 09:32 PM 1/24/2002 -0500, you wrote: Vincent Stoessel wrote: On another list that I am on someone made this very bold statement: I've seen a lot of jobs for ColdFusion Oracle or MS SQL server experience combinations. Don't let anyone fool you, PHP/MySQL is not going to land you a job [;)] now, as someone that was making avery good living doing Linux based web application development last year and now among the jobless I am beginning to question the validity of having all of my eggs in the LAMP (linux apache mysql php) basket. I just recently built a NT4 to do some win based development on. I still have not installed any development enviroment cause it just feels so alien. Has anyone else out there feeling the pressure of going to the win32 side to pay the bills. Thoughts? This really depends on how you want to work and/or approach 'jobs'. Do you consider a job a place to go for 40 hours a week and get a paycheck? Or is it more than that? Being able to positively improve an employer's bottom line is always a plus you can bring to any 'job' - you're there to do work and make them money too. If you can help by furthering the use of Linux/PHP/etc due to the licensing cost issues, so much the better. I will never again (bold words I know) *merely* have a job where I'm told what to do by someone who doesn't really give a rat's ass about me. :) (been there done that too many times). When approaching a job now, I would be more proactive about what impact I can make in a company, and the Linux/PHP skills/experience would be a facet of that, no doubt. Sure, there are many people advertising for ASP developers, etc. Perhaps they're not finding qualified people, and need to advertise? I'd say PHP/MYSQL won't land you a job, but neither will CF, or Java, or anything else. You need to sell YOURSELF, and if you sell your ability to further a company's objectives (make money) many won't care what you use, or at least won't care to the point of restricting you. There will always be shops that are CF
[PHP] PHP 4.0.6 Problem, Cannot load /usr/local/apache/libexec/libphp4.so
Hey there, I have some problems loading the php module. Apache was compiled from sources with mod_ssl and is located in /usr/local/apache. MySQL 4.23.47 was also compiled from sources and is located in /usr/local/mysql PHP was compiled from source with these options: ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/apxs --prefix=/usr/local/php --with-openssl=/usr/local/ssl --with-zlib --with-bz2 (I included the --with-zlib for the uncompress not resolv thing buggy so that ain't it) In httpd.conf LoadModule php4_module libexec/libphp4.so AddModule mod_php4.c (the addmodule is not within any containers (the make install had put it within the SSL containers, I put it upwards, the error is on the LoadModule though) apachectl start gives this error: Syntax error on line 206 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: cannot open shared object file: cannot load shared object file: No such file or directory bin/apachectl start: httpd could not be started Kind regards, Ferry van Steen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4.0.6 Problem, Cannot load /usr/local/apache/libexec/libphp4.so -SOLVED-
SOLVED, sorry about this. My mistake. -- Forwarded Message -- Subject: PHP 4.0.6 Problem, Cannot load /usr/local/apache/libexec/libphp4.so Date: Fri, 25 Jan 2002 12:36:09 +0100 From: TD - Sales International Holland B.V. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hey there, I have some problems loading the php module. Apache was compiled from sources with mod_ssl and is located in /usr/local/apache. MySQL 4.23.47 was also compiled from sources and is located in /usr/local/mysql PHP was compiled from source with these options: ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/apxs --prefix=/usr/local/php --with-openssl=/usr/local/ssl --with-zlib --with-bz2 (I included the --with-zlib for the uncompress not resolv thing buggy so that ain't it) In httpd.conf LoadModule php4_module libexec/libphp4.so AddModule mod_php4.c (the addmodule is not within any containers (the make install had put it within the SSL containers, I put it upwards, the error is on the LoadModule though) apachectl start gives this error: Syntax error on line 206 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: cannot open shared object file: cannot load shared object file: No such file or directory bin/apachectl start: httpd could not be started Kind regards, Ferry van Steen --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] cURL documentaion
Hello NG, did anyone know an other documentation as the PHP manual or the manpages or locations as http://curl.haxx.se/ , http://www.php.net? Especially the exitcodes and solutions for it! Thanks a lot Roman Eich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PEAR-DEV] Re: [binarycloud-dev] Re: [PEAR-DEV] Re: [metabase-dev] RE: [PEAR-DEV] New Metabase Aniversary release
* Stig S. Bakken wrote: this effort. I don't understand why this is an issue for you, could you explain? I already explained it several times. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php.exe has generated some errors and will be closed by windows
Hi friends, I am getting the problem everytime "php.exe has generated some errors and will be closed by windows". I kept header function after completion of authentication to navigate to the corresponding page. I am facing this problem every time. If I remove that header function once and by running it one time and again by keeping the same header function again then it z working properly. How can I overcome this problem?? Any help greatly appreciable. Thanks in advance. -Balaji --- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Is there anyone who could help me?
Hiyas I'm not sure my last message was received, so I'll send my question once again: Well, I'm working on a webmailer-system (a php3-based pop3-client) that can and will be used by different users from the machine it's running on and I was wondering if there was any way to do something like an 'su', changing the user the script is executed under to the user currently logged in by the script. Reason: I'd like to give users the ability to save their options and preferences for the mailer and data for other mail-accounts. I'd like to accomplish this with a file in the users homedir, something like the usual .something config files, chowned to the logged in user and set to his/ her permissions... Can somebody help me? Ciao Tobias Schweitzer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Write to file?
Hello folks I want to write to a textfile, but I want a row for each string I write to the file. As it is now when I write to the file it just starts writing where the last string ends.. What should I do? =) Thanks! //M. -- Mårten Andersson Loddbygatan 2 60218 Norrköping Sverige ICQ: 86515830 URL: http://www.vanvett.net/marten
Re: [PHP] Write to file?
* and then Mårten Andersson blurted I want to write to a textfile, but I want a row for each string I write to the file. As it is now when I write to the file it just starts writing where the last string ends.. What should I do? =) Have you tried \n at the end of your string? -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com msg47400/pgp0.pgp Description: PGP signature
Re: [PHP] Uploading a file
Jason - Using the recommended HTML, everything works *except* the file does not become part of the data sent back to the server. In fact, the VALUE from the INPUT element is not received (e.g. $filename== $HTTP_POST_VARS[filename];). I am using RH Linux 7.2 with Apache. Is there a parameter in the Apache that needs to be set for file uploads? Many thanks... Todd -- Dr. Todd Cary Ariste Software Petaluma, CA 94952 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uploading a file
Hi Jason You have set the form's ENCTYPE attribute to 'multipart/form-data' haven't you? FORM ENCTYPE='multipart/form-data' -- Shane On Friday 25 Jan 2002 2:08 pm, Todd Cary wrote: Jason - Using the recommended HTML, everything works *except* the file does not become part of the data sent back to the server. In fact, the VALUE from the INPUT element is not received (e.g. $filename== $HTTP_POST_VARS[filename];). I am using RH Linux 7.2 with Apache. Is there a parameter in the Apache that needs to be set for file uploads? Many thanks... Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] get image from DB problem
List, I'm using the following code to retrieve image from Mysql. My problem is how can I output another image if the given ID doesn't have an image on it??? I had already inserted a blank gif in the database in order to use it, but I've tried to check if ($resultado['Imagem_data'] == ) or null and outputs the blank gif, but didn't work. $conexao = new conexao(); $query = new Query($conexao); $sql = SELECT Imagem_data,Imagem_type FROM imagens WHERE CelebID='$celebID'; $query-executa($sql); $resultado = $query-dados(); $imagem_banco = $resultado['Imagem_data']; $type = $resultado['Imagem_type']; if($imagem_banco != ) { HEADER(Content-type: $type); echo($imagem_banco); } Thank's Rodrigo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP IDE
Who knows a good Php IDE for linux, like PHP Code ? Rafael Perazzo _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP IDE
Rafael Perazzo B Mota wrote: Who knows a good Php IDE for linux, like PHP Code ? Just have a look at www.activestate.com. They sell a product called Komodo. Alexander -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php: mpeg / avi / mov
Hi, I want to know the dimensions (width, height) of an mpeg / avi / mov file... does anyone know how I can arrange that with PHP or possibly via a UNIX command string? Greets, Edward -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] regexp to substitute incremental strings
Hello, I have a form whith a TEXTAREA FIELD to retrieve the html text of a message, and up to 10 file upload fields for images that may be linked from in that text. Now the text is uploaded fine, and so are all the images. Text is saved in UNIQUE_CODE.txt, and images in files UNIQUE_CODE_01.gif, UNIQUE_CODE_02.jpg, etc etc. All this is OK too. The problem is to convert all the SRC strings of the IMG tags in the original text to relative URLS. i.e. from: IMG SRC=C:\dir1\dir2\dir3\img1.gif blah blah blah some text, html markup... IMG SRC=img2.jpg blah blah again to: IMG SRC=UNIQUE_CODE_01.gif blah blah blah some text, html markup... IMG SRC=UNIQUE_CODE_02.jpg blah blah again What is the right regexp to handle this, either in a while loop (how?) or all by itself? The closer I've come to the solution is: IMG SRC=UNIQUE_CODE_02.gif blah blah blah some text, html markup... IMG SRC=UNIQUE_CODE_02.jpg blah blah again Meaning OK if there is only one image, only the last loaded image is pointed to otherwise, because I keep rewriting the previous tags. Sorry for not posting my code here, I'm out of town and have just been told of this problem by phone by the site owner... Any help is appreciated, mweb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uploading a file
On Friday 25 January 2002 22:08, Todd Cary wrote: Jason - Using the recommended HTML, everything works *except* the file does not become part of the data sent back to the server. In fact, the VALUE from the INPUT element is not received (e.g. $filename== $HTTP_POST_VARS[filename];). I am using RH Linux 7.2 with Apache. Is there a parameter in the Apache that needs to be set for file uploads? If in doubt please check the manual. The uploaded file info are found in $HTTP_POST_FILES not $HTTP_POST_VARS. If you're using php-4.1.0 or above please check manual as $HTTP_POST_FILES will be deprecated in the near future. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Dying is easy. Comedy is difficult. -- Actor Edmond Gween, on his deathbed. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] move_uploaded_file() query
On Friday 25 January 2002 17:35, Will Hives wrote: Sorry for my past ignorance using this news site forum I can only out this down to my lack of knowledge. I have been work on me first script for some time now and have been making good progress up until now. I have a script that adds a author to the database, ID, Name, Email, Picture Name. When a author is added it uploads their details plus it uploads and renames the image...that is working fine. It all falls down when I try and call the new file name to show the picture. It is uploading the original file name to the database and not the renamed version. I would be very grateful for any pointers on how this small problem can be solved. I hope this makes more sense than previous threads I have submitted. Cheers Will Here is the script as it stands: $sql = INSERT INTO $table_name (id, name, email, picture_name) VALUES ('$id', '$name', '$email', '$picture_name') ; $result = @mysql_query($sql, $connection) or die (couldn't execute query); if ($picture != ) { $path = /home/main/main/php/; $datee = date(sdFy); move_uploaded_file($picture,$path . $datee . $picture_name); } Is this the *full* script? I don't see where you are setting $picture_name? Also what you are inserting into the database is not the same as what you are renaming your file to (you're adding a date string to the filename). Do you have a procedure to resolve the correct filename when retrieving the data from the db? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* All of life is a blur of Republicans and meat! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP IDE
Rafael Perazzo B Mota [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Who knows a good Php IDE for linux, like PHP Code ? Try Macromedia ColdFusion Studio 5.0, it has PHP syntax highlighting and is very customizable (Code Snippets, Code Completion, ...), but it's not primarily focused on PHP... Christian Blichmann _ don't hesitate - email me with your thoughts: e-mail: [EMAIL PROTECTED] - please remove the .nospam from address. _ do you want to know more? web:http://www.blichmann.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Resalution Dection
Jeff Sheltren [EMAIL PROTECTED] wrote in message 006901c1a552$ad42ebf0$0500a8c0@ellaptop">news:006901c1a552$ad42ebf0$0500a8c0@ellaptop... Yes, you can use javascript to get the user's resolution: screen.width screen.colorDepth You can also use window.innerWidth window.innerHeight (at least in Opera 4.x+ and NN4.x) or use document.body.clientWidth document.body.clientHeight (in IE) or through the DOM (Document Object Model, see http://www.w3c.org): document.body.offsetWidth document.body.offsetHeight This might be helpful for you as well... Christian Blichmann _ don't hesitate - email me with your thoughts: e-mail: [EMAIL PROTECTED] - please remove the .nospam from address. _ do you want to know more? web:http://www.blichmann.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Printing JPEG images generated with ImageJPEG with IE/WIN
Hm, it could be that IE tries to reload the picture (which isn't there anymore because the form-data has been expired). Perhaps saving the picture temporarly on the server will prevent the problem. Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: getting a LAMP job in this economy
On Thursday, January 24, 2002, at 09:32 PM, Michael Kimsal wrote: Being able to positively improve an employer's bottom line is always a plus you can bring to any 'job' - you're there to do work and make them money too. If you can help by furthering the use of Linux/PHP/etc due to the licensing cost issues, so much the better. This is a good point. I'm using the LAMP scheme right now for my employer (though I haven't yet explained the advantages). I'm hoping that, when I'm done, I can provide a report explaining how much was saved by going with open source solutions -- right now the only two purchases made specifically for my project were 1) Mac OS X 10.1 2) Extra memory for the Linux server (and I'd like them to buy me the full version of BBedit so I don't have to use the lite -- $89 upgrade) Is there a resource that helps me weigh the cost-effectiveness of the choices I made? (Note that the savings aren't as great as you might think -- we already have Oracle and a hosting service that provides ASP, but I wonder what the licenses would have cost us.) Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Building my site... again
I started my HTML career back in the days when the newest MS Word-version came with a save as html-function. I saved as HTML, read the code, and learned by myself bit by bit. By the time I got my hands on HTML for dummies, I realized I was no dummy after all :) But now, asking this, I feel kinda dumb... Its got to do with PHP, search engines, meta-tags and headers. I am building my site like this: - I have an index.php-file, that takes two variables, page and subpage. A link on my site may look like this: a href=index.php?page=carssubpage=ferrari (for instance) Now, my index.php-file will do this: (basically) html body if($page){ include($page . .inc); } /body /html and my cars.inc will do this: if($subpage){ include($subpage . .inc); } Now. I would of course like for my site to be listed in the search engines, and I wouldn't mind getting search hits on both cars and ferrari. But. Will the web spiders and web crawlers ever follow a link like index.php?page=carssubpage=ferrari and will they ever index what they find there, and, and, and, and... Well... does anyone understand what I'm asking here? WOuld this be a good way to build my site to ensure getting hits from search engines, or should I do this some other way? Anyone know? - Torkil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] What if 1,000 people access the database at one time?
So let's say Bill is accessing a MySQL table and is about to UPDATE some information on a particular row. Meanwhile, Al is doing a sort on that same table. Couldn't Al's sorting possibly screw up Bill's updating?? Or does MySQL have some built in functions that prevent this? Thanks! Phil
[PHP] Connect to Mail-Server
Hello! Somewhere I read something on how to connect to a mail-server with php and to send and receive mails on a very basic level (calling Helo to the mail-server and so on). Does anybody know, where I can get those information exactly? Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Torkil Johnsen blurted Now. I would of course like for my site to be listed in the search engines, and I wouldn't mind getting search hits on both cars and ferrari. But. Will the web spiders and web crawlers ever follow a link like index.php?page=carssubpage=ferrari and will they ever index what they find there, and, and, and, and... Some will, some wont. The trick is to use something like this index.php/cars/ferrari using Apache's backward searching feature. Together with a very simple .htaccess you can fool Apache into looking for the dirctory 'ferrari' and when it doesn't find it look for the dir cars (php assigns these values to the vars $page and $subpage) and when it finally finds index.php you can feed it those vars and let it do its stuff. I can't remember all the details as it was ages ago that I did this on my site but you can find a very good tutorial on www.sitepoint.com you'll have to do a little searching as it was written quite a while ago but it'll be well worth your while. - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UYBCHpvrrTa6L5oRAuwdAJ9PWgFKOylhOrPz6rv7KBifXcbdjgCfUQax 7csTk0GnAC17z8ie8RGFqYU= =NaWj -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP and NT hashes
I'm looking for a way to have php form NT hashes from passwords for storage in mysql for distribution to samba smbpassword files ... this possible? Thanks! Anthony -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Building my site... again
Note, This will not work with PHP as a CGI. Best regards, Andrew Hill * and then Torkil Johnsen blurted Now. I would of course like for my site to be listed in the search engines, and I wouldn't mind getting search hits on both cars and ferrari. But. Will the web spiders and web crawlers ever follow a link like index.php?page=carssubpage=ferrari and will they ever index what they find there, and, and, and, and... Some will, some wont. The trick is to use something like this index.php/cars/ferrari using Apache's backward searching feature. Together with a very simple .htaccess you can fool Apache into looking for the dirctory 'ferrari' and when it doesn't find it look for the dir cars (php assigns these values to the vars $page and $subpage) and when it finally finds index.php you can feed it those vars and let it do its stuff. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
Now. I would of course like for my site to be listed in the search engines, and I wouldn't mind getting search hits on both cars and ferrari. But. Will the web spiders and web crawlers ever follow a link like index.php?page=carssubpage=ferrari and will they ever index what they find there, and, and, and, and... Well... does anyone understand what I'm asking here? WOuld this be a good way to build my site to ensure getting hits from search engines, or should I do this some other way? Anyone know? To ensure that the search engines like you and your pages, you can make your URLs appear more normal by doing something like this: URL= http://you.com/index.php/cars/ferrari Then... in your code you can access the additional data by looking at the $PATH_INFO variable: ? $pathitems = explode(/,$PATH_INFO); $page = $pathitems[1]; $subpage = $pathitems[2]; ? Hope this helps, Daniel J. Lashua -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What if 1,000 people access the database at one time?
Phil, To start with MySQL tables aren't sorted unless some type of maintenance is taking place, and many of those operations can be done on copies of the tables. Check http://www.mysql.com/doc/T/a/Table_maintenance.html for more information. Given that, I would expect the person maintaining the database would take it off line. The sort is handled by the way in which you use ORDER BY in your SELECT statement, so it doesn't affect the underlying table structure. MySQL is thread-safe, so different users can execute SELECT and UPDATE's simultaneously. A SELECT wouldn't affect an UPDATE. In terms of timeliness of UPDATEs and SELECTs, that's almost a non-issue as one cannot know in advance what will be updated or inserted. Regards - Miles Thompson At 10:22 AM 1/25/2002 -0500, Phil Schwarzmann wrote: So let's say Bill is accessing a MySQL table and is about to UPDATE some information on a particular row. Meanwhile, Al is doing a sort on that same table. Couldn't Al's sorting possibly screw up Bill's updating?? Or does MySQL have some built in functions that prevent this? Thanks! Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Andrew Hill blurted Note, This will not work with PHP as a CGI. How come? - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UYGlHpvrrTa6L5oRAiOUAJ4+utKQrhQ2Vy4533lLjriNO8sXmQCfRJrw cackhuwr2ACMGFu/fbYxfcs= =3wVL -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Question: $_* etc or $HTTP_*_VARS etc
I am going through some code that I wrote recently and trying to change it so that I can turn register globals off in my php.ini. However, before I do that I want to make sure I am using the right variables. I read in the manual that $HTTP_*_VARS has been 'replaced' by $_* is this correct? Should I be using $_* syntax then? The only reason I am asking instead of trusting the manual is because I'd hate to have misread something and thought I understood it, recoded my site, and then realized I used the wrong variables. So if someone could just tell me one or the other I'd be happy. (Oh I'm using php 4.1.1 if that makes a difference since I believe the manual said the $_* syntax started at 4.1.0?) Thanks, Zara -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then daniel blurted To ensure that the search engines like you and your pages, you can make your URLs appear more normal by doing something like this: URL= http://you.com/index.php/cars/ferrari That will still cause a problem though won't it (i think I wrote my example URL this way also!) as the index.php gets in the way. Hence the use of a .htaccess to force php to treat a file called 'index' as a php file. Like: URL= http://you.com/index/cars/ferrari - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UYKgHpvrrTa6L5oRAoiuAJ4nfc5TD1xjOlOHXZpa/m+lPEIGjQCaArY9 RCJ7Rb7TE8WWDPU3/yFi7hQ= =tJZl -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Building my site... again
Nick, Dunno, but in my experience (and that of a few people who also opened bugs on it) any path info that is not real causes the CGI to bomb out with an Internal Server Error. So while this will work: index.php?foo=bar This will not, since there is no physical directory foo and no file bar: index.php/foo/bar Best regards, Andrew Hill -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 11:03 AM To: PHP-General Subject: Re: [PHP] Building my site... again -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Andrew Hill blurted Note, This will not work with PHP as a CGI. How come? - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UYGlHpvrrTa6L5oRAiOUAJ4+utKQrhQ2Vy4533lLjriNO8sXmQCfRJrw cackhuwr2ACMGFu/fbYxfcs= =3wVL -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] A link
Stupid. Animates a window that says You should not have come here! to dance around the screen, then locks up the browser by having two new windows call each other in a loop... gotta love 'Force Quit' on Mac OS X. Or 'kill' in any other Unix. Or 'turn JS off' in your browser. Erik On Friday, January 25, 2002, at 05:13 AM, Nick Wilson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Jon Haworth blurted Agreed, what a tit. For anyone vaguely interested, it's a redirect followed by a lame javascript. Have a look at the source code, quite safely, at: http://www.samspade.org/t/safe?u=http://m-net.arbornet.org/~fusion/ What does that function do? What was he trying to achieve? - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8US+0HpvrrTa6L5oRApprAJ0arjxLjhhpBY+cS5c6F3SD8/3NqACgomJ9 R9UNz7vKVf9kJ4UYL9Ol9Os= =Z9ep -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP is a Bloated Kludge, discuss!
Don't feed the troll.. Php [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On a conceptual level, I for one am a great fan of the kludge. Every piece of software is a trade off between performance and speed of development. You can have the fastest app in the world for $1,000,000 in development time OR you can write up a in-elegant solution in 5minutes ($50) and if its slow buy a bigger server for $5000. You choose. Taken in relation to PHP. I would rather have the developers of it release new code that is not optimized, then have 1 release every two years, full of very pretty blocks of code designed to make the hardcore OOP textbook fanatic orgasm. Check out mozilla.org if you want to see what elegant programmers can do. - 2 years later a web browser intended to be small and fast, can know take out your trash, wash your car - and guess what? no release 1.0 yet. Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Andrew Hill blurted Nick, Dunno, but in my experience (and that of a few people who also opened bugs on it) any path info that is not real causes the CGI to bomb out with an Internal Server Error. Hi Andrew, check out my .htacces, I'm sure this would help you do it :) # .htacces file containing Apache directives # for 'search engine friendly' indexing and # custom error pages # First the 404 ErrorDocument 404 /general/404.php # Now the page handlers files articles ForceType application/x-httpd-php /files HTH - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UYSkHpvrrTa6L5oRAuyvAJ45FhFMet/FHetUGaMaBSTrL6oFgwCcD6QD zWXIc3wqOYulBo/pPS0LVGw= =MMsp -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: What if 1,000 people access the database at one time?
Phil Schwarzmann wrote: So let's say Bill is accessing a MySQL table and is about to UPDATE some information on a particular row. Meanwhile, Al is doing a sort on that same table. Couldn't Al's sorting possibly screw up Bill's updating?? Or does MySQL have some built in functions that prevent this? Thanks! Phil This is really better suited to the mysql list but anyway - In your case If Al started the sort first the update would wait until the select is finished for the update. MYsql has this wonderful feature called table locking - so an update needs to lock the table preventing access to it. So your data wont get stuffed, you'll just get the typical MYsql slowness when you've got a lot of updating and reading going on. You need not suffer this get a database that doesn't block readers (eg Al wanting to read the table while bill updates it) use something like Postgresql (postgresql.org) or Fierbird (firebirdsql.org) both are free. Or you could use INNodb tables in MYsql as they don't block readers either. But MYsql is missing a lot of basic stuff like sub selects so if you have a choice dump MYsql. MYsql is not noted for its performance with a lot of concurrent connections. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: phpwiki save button
On Thursday 24 January 2002 10:07 am, Tim Ward wrote: I think you just need to add the timestamp to the start of the story before you save it, i.e. $content = date(d/m/Y H:i:s - ) . $content; Where do I put this? I'm still floundering. Sorry. btw...Thanks for all your help so far. Tim or am I missing something? Tim www.chessish.com --- snip // snip --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: regexp to substitute incremental strings
Hi mweb, try this: ? $string = IMG SRC=\C:\dir1\dir2\dir3\img1.gif\ blah blah blah some text, html markup... IMG SRC=\img2.jpg\ blah blah again; $string = preg_replace(/IMG SRC=\.*?([0-9])\.(gif|jpg)\/i, IMG SRC=\UNIQUE_CODE_0$1.$2\, $string); echo nl2br($string); ? ~James Mweb wrote in message ... Hello, What is the right regexp to handle this, either in a while loop (how?) or all by itself? The closer I've come to the solution is: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] fopen and sending data to a remote url
hi folks, apart from using fopen, is there another way of just sending data to a remote url on the fly without leaving your current page? thanks dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: getting a LAMP job in this economy
Erik Price wrote: This is a good point. I'm using the LAMP scheme right now for my employer (though I haven't yet explained the advantages). I'm hoping that, when I'm done, I can provide a report explaining how much was saved by going with open source solutions -- right now the only two purchases made specifically for my project were 1) Mac OS X 10.1 2) Extra memory for the Linux server (and I'd like them to buy me the full version of BBedit so I don't have to use the lite -- $89 upgrade) Is there a resource that helps me weigh the cost-effectiveness of the choices I made? (Note that the savings aren't as great as you might think -- we already have Oracle and a hosting service that provides ASP, but I wonder what the licenses would have cost us.) I don't think there are any resources that address that because it's really very broad and to some extent a bit subjective. Your point about your hosting provider already providing ASP is part of that. It's already provided for free - well, you're not getting 100% of that machine. There may be 200 other accounts on there, all of which affect your performance. Same is true in shared linux accounts, no doubt, but my experience has been that LAMP is better at resource sharing/balancing without bogging down (anecdotal only - I have no hard proof). But if you're noticing slow downs on your site, especially if you're getting decent traffic, you have to upgrade to a dedicated machine. At that point, the licensing costs come in to play, although MS has extremely competitive ASP (app service provider) plans for hosting SQLserver, ASP, etc to try to minimize the cost for hosting providers doing dedicated machines. Free is still free, and they can't quite beat that yet. :) If you're stuck in 'hosting' environments, you'll be hard pressed to show the cost savings, because it's often $5-$10/month difference for comparable ASP or LAMP setups. The difference comes in, imo, in upgrading to full server(s). You've got the one time hit, plus the cost of PCAnywhere or something (you could live with VNC I guess) to do remote admin, plus the security track record. I'd be happy to discuss more of this with you if you want to take it off list if this is getting too offtopic. Michael Kimsal http://www.tapinternet.com/php PHP Training Courses 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
Nick- That will still cause a problem though won't it (i think I wrote my example URL this way also!) as the index.php gets in the way. Hence the use of a .htaccess to force php to treat a file called 'index' as a php file. Like: URL= http://you.com/index/cars/ferrari Nah... the search engines don't care at all. However if you're picky, you can rename the file from index.php to index (or whatever you want) and then add a ForceType via Apache's .htaccess like this: Files index ForceType application/x-httpd-php /Files Put... that step is really for cleanliness of the URL, as the spiders don't care at all. Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: Uploading a file
Sorry if this is obvious but . . . have you checked whether your server is running in safe mode? I had the same problem and finally realized that it would NEVER work cause the webserver was running in safe mode. (Disclaimer here -- I'm no sysadmin and don't know if Linux even has a safemode!) I'm not sure how to get around this. There are certain specific people I'd like to be able to upload PDFs to the webserver. But I don't want them to have full FTP privileges. I guess one solution would be to find/write an FTP program that you can use to give people limited upload privileges -- for example they can only upload into one specific directory and they can only upload pdfs. I haven't found any such program, so I guess I could write one -- if I knew how to write an ftp program :) PHP has an ftp module I believe, though I'm sure my ISP passed on installing that one. Any ideas, no matter how outlandish, are much appreciated. So many cool things to learn, so little time. Rita -Original Message- From: Todd Cary [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 2:12 PM To: [EMAIL PROTECTED] Subject: Uploading a file For some reason, I cannot get the following code to work - the file is not sent to the server. Is there something obviously wrong? I am using Apache on Linux (RH 7.2). Todd form method=post name=upload action=uploadfile.php enctype=multipart/form-data table border=0 cellpadding=0 cellspacing=0 width=652 tr td width=40/td td width=197Submit this file:/td td width=409 input type=file name=userfile /td /tr /table div align=center font size=3input type=submit/font /div /form -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Reg Exp Help
I am trying to code a regular expression that will match at the beginning of the string the contents of $password, followed by 0 or more occurrences of white space, followed by the contents of $int_id. The match should be case insensitive. Here are some examples of the strings: This one has a 6 character $password, followed by two white spaces, followed by a single character $int_id 9a9b9c z This one has a 8 character $password, followed by zero white spaces, followed by a single character $int_id 7d2ad345b This one has a 5 character $password, followed by three white spaces, followed by a four character $int_id d22ad bbaw Here is the regular expression I am trying to use that does not find the match and produces Warning: REG_BADRPT. (eregi(^\$password+[[:space:]]*+\$int_id, $file_array[$i])) Any corrections? Thanks in advance. Zach Curtis POPULUS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building my site... again
Andrew- Note, This will not work with PHP as a CGI. I honestly don't know, as I don't run PHP as a CGI. However... if there is a problem with this, I would be inclined to think that it was Apaches fault, and not PHPs. Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Help with regular expressions
Daniel, Hi! I´m new to regular expressions, and it seems to be an art to make it work as expected. I´m trying to remove all single-line comments from an string - that´s everything after // to the end of a line. I expected that this would do the job: ereg_replace(//[[:alnum:]]*\n,,$string), but it didn´t work. Any tips? RegEx can be expensive. Always ask do I need one? In this case, use a string find to locate the // and the following \n (or whatever marks the end of line on your/supported OpSys), then substring or string replace. If would be quite interesting to see a performance comparison on this - if you've got time... =dn PS if you were working with alpha-text and had to consider upper and lower case, then things might sound very different! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Reg Exp Help
The password and int_id begin and end in fixed positions. password begins in position 13 and can occupy up to 8 characters int_id begins in position 21 and can occupy up to 4 characters Sometimes a password (or int_id) may occupy all of those fixed position or only some of the fixed positions, it's variable. Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 9:58 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help how can I see that it isn't a 6 char $password with a 3 char $int_id ?? This one has a 8 character $password, followed by zero white spaces, followed by a single character $int_id 7d2ad345b Edward - Original Message - From: Zach Curtis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 5:51 PM Subject: [PHP] Reg Exp Help I am trying to code a regular expression that will match at the beginning of the string the contents of $password, followed by 0 or more occurrences of white space, followed by the contents of $int_id. The match should be case insensitive. Here are some examples of the strings: This one has a 6 character $password, followed by two white spaces, followed by a single character $int_id 9a9b9c z This one has a 8 character $password, followed by zero white spaces, followed by a single character $int_id 7d2ad345b This one has a 5 character $password, followed by three white spaces, followed by a four character $int_id d22ad bbaw Here is the regular expression I am trying to use that does not find the match and produces Warning: REG_BADRPT. (eregi(^\$password+[[:space:]]*+\$int_id, $file_array[$i])) Any corrections? Thanks in advance. Zach Curtis POPULUS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: What if 1,000 people access the database at one time?
Michael Waples wrote: Phil Schwarzmann wrote: So let's say Bill is accessing a MySQL table and is about to UPDATE some information on a particular row. Meanwhile, Al is doing a sort on that same table. Couldn't Al's sorting possibly screw up Bill's updating?? Or does MySQL have some built in functions that prevent this? Thanks! Phil snip wrong reply ah I guess you don't mean a select but table maintenance stuff. Should have read it more carefully. Still you'll be safe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to echo the /n, /r, etc... to the HTML display?
Hi! I have been working on this part for a few days now! It had become appareant that HTML is not able to do this, so I'm trying to get it to work in PHP but no luck! The string I see like this is when I run the UNIX command od -av filename |more. --clip here-- del cr lf cr lf cr lf cr 020 lf P A G E sp 1 sp sp sp D A T E sp sp 0401 - 2 5 - 2 0 0 2 sp sp T I M E sp 0601 0 : 3 8 : 1 4 sp sp P @ F E P sp 100 sp V 0 0 1 sp sp T C A 1 cr --clip end-- So, you see, if I use the PHP function, nl2br(), that took care of the cr and the lf. But it doesn't take care of the sp so how do I fix that? This sp when work correctly will be able to justify the text on each line. Anyone know? thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] WinNT extensions
IMAP support was not compiled into the Windows version of PHP. Unfortunately, compiling it by hand is very difficult. It requires having Microsoft Visual C++, along with a bunch of other tools. So...it looks like you'll need to use another method to view mail. Sorry for the bad news. Yes if you want to compile php_imap.dll yourself than you need all these tools, but luckily kind folks in the PHP community compile it for you. So if you download the full binary from www.php.net (http://www.php.net/do_download.php?download_file=php-4.1.1-Win32.zip) you can simply include it in php.ini. So I do not at all understand the provider's problem. I would not recommend using dl(), because a) I think it has been deprecated more or less and b) it is not so fast. Florian I thought imap functionality was in a dll which can be loaded dynamically: dl(php_imap.dll); imap_open(a,u,p); Can anyone please enlighten me? Is it built in? They use PHP 4.1.1. Malcolm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Florian Clever http://fc.clever-soft.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Reg Exp Help
Hmmm. I am searching thru a flat file that has been loaded into an array ($file_array[$i]). As each iteration of the array is loaded (each row of the flat file) , I was trying to search for this unique combination. The $password is not unique. And $int_id is not unique enough (e.g., a, b, c, etc.) to be searched for on its own. However, $password and $int_id joined together is unique. Also, the $password and $int_id are in a fixed position in each header row, however, not every row in the flat file is a header row (no...I didn't create a flat file in this way!). I am confident the correct regular expression would resolve this. I will keep thinking about substr() and trim(), but I don't see how to use those to resolve this issue. Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 10:29 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help but if the positions as fixed, why don't you use the substr, and then trim th result? Edward - Original Message - From: Zach Curtis [EMAIL PROTECTED] To: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 6:12 PM Subject: RE: [PHP] Reg Exp Help The password and int_id begin and end in fixed positions. password begins in position 13 and can occupy up to 8 characters int_id begins in position 21 and can occupy up to 4 characters Sometimes a password (or int_id) may occupy all of those fixed position or only some of the fixed positions, it's variable. Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 9:58 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help how can I see that it isn't a 6 char $password with a 3 char $int_id ?? This one has a 8 character $password, followed by zero white spaces, followed by a single character $int_id 7d2ad345b Edward - Original Message - From: Zach Curtis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 5:51 PM Subject: [PHP] Reg Exp Help I am trying to code a regular expression that will match at the beginning of the string the contents of $password, followed by 0 or more occurrences of white space, followed by the contents of $int_id. The match should be case insensitive. Here are some examples of the strings: This one has a 6 character $password, followed by two white spaces, followed by a single character $int_id 9a9b9c z This one has a 8 character $password, followed by zero white spaces, followed by a single character $int_id 7d2ad345b This one has a 5 character $password, followed by three white spaces, followed by a four character $int_id d22ad bbaw Here is the regular expression I am trying to use that does not find the match and produces Warning: REG_BADRPT. (eregi(^\$password+[[:space:]]*+\$int_id, $file_array[$i])) Any corrections? Thanks in advance. Zach Curtis POPULUS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Must results from MySQL fetches always be an Array??
This is sort of a is there an easier/better way kind of question. No error or problem, but I'd like to know how others handle it. I'm fetching single elements of data from several tables, then piecing it together. Here's an example of one element I need to fetch: $series = mysql_fetch_array(mysql_query(SELECT key2 FROM models WHERE lang='$lang' AND recordname='$model',$db)); Now I realize that with this function $series will always be an array, even if it contains just one element (which it does). What I'd like to know is, can I write that statement so that $series is created just as a string? (So that I don't have to write $series = $series[0]; immediately afterwards in order to treat $series as a $string.) ...Rene --- René Fournier [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Reg Exp Help
Here is part of my actual code, if that makes any difference. $password // this var was retrieved from db $int_id // this var was retrieved from db $file_array = file($DOCUMENT_ROOT/dir/file.dat); $count = count($file_array); if ($count == 0) echo pNo records found in .dat file./p; for ($i = 0; $i $count; $i++) { if (eregi(^\$password+[[:space:]]*+\$int_id, $file_array[$i])) { // do stuff } } Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 10:29 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help but if the positions as fixed, why don't you use the substr, and then trim th result? Edward - Original Message - From: Zach Curtis [EMAIL PROTECTED] To: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 6:12 PM Subject: RE: [PHP] Reg Exp Help The password and int_id begin and end in fixed positions. password begins in position 13 and can occupy up to 8 characters int_id begins in position 21 and can occupy up to 4 characters Sometimes a password (or int_id) may occupy all of those fixed position or only some of the fixed positions, it's variable. Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 9:58 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help how can I see that it isn't a 6 char $password with a 3 char $int_id ?? This one has a 8 character $password, followed by zero white spaces, followed by a single character $int_id 7d2ad345b Edward - Original Message - From: Zach Curtis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 5:51 PM Subject: [PHP] Reg Exp Help I am trying to code a regular expression that will match at the beginning of the string the contents of $password, followed by 0 or more occurrences of white space, followed by the contents of $int_id. The match should be case insensitive. Here are some examples of the strings: This one has a 6 character $password, followed by two white spaces, followed by a single character $int_id 9a9b9c z This one has a 8 character $password, followed by zero white spaces, followed by a single character $int_id 7d2ad345b This one has a 5 character $password, followed by three white spaces, followed by a four character $int_id d22ad bbaw Here is the regular expression I am trying to use that does not find the match and produces Warning: REG_BADRPT. (eregi(^\$password+[[:space:]]*+\$int_id, $file_array[$i])) Any corrections? Thanks in advance. Zach Curtis POPULUS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to echo the /n, /r, etc... to the HTML display?
I suppose sp is space? Two suggestions: Why don't you do pre (print here the string as-is. newlines and spaces will be kept as they are by the browser) /pre Another Possibility: $string = preg_replace(/\\s/, nbsp;, $string); I hope I addressed your problem and didn't miss the point best regards Stefan Rusterholz - Original Message - From: Scott Fletcher [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 6:31 PM Subject: [PHP] How to echo the /n, /r, etc... to the HTML display? Hi! I have been working on this part for a few days now! It had become appareant that HTML is not able to do this, so I'm trying to get it to work in PHP but no luck! The string I see like this is when I run the UNIX command od -av filename |more. --clip here-- del cr lf cr lf cr lf cr 020 lf P A G E sp 1 sp sp sp D A T E sp sp 0401 - 2 5 - 2 0 0 2 sp sp T I M E sp 0601 0 : 3 8 : 1 4 sp sp P @ F E P sp 100 sp V 0 0 1 sp sp T C A 1 cr --clip end-- So, you see, if I use the PHP function, nl2br(), that took care of the cr and the lf. But it doesn't take care of the sp so how do I fix that? This sp when work correctly will be able to justify the text on each line. Anyone know? thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Must results from MySQL fetches always be an Array??
On Fri, 25 Jan 2002, [ISO-8859-1] René Fournier wrote: $series = mysql_fetch_array(mysql_query(SELECT key2 FROM models WHERE lang='$lang' AND recordname='$model',$db)); Now I realize that with this function $series will always be an array, even if it contains just one element (which it does). What I'd like to know is, can I write that statement so that $series is created just as a string? (So that I don't have to write $series = $series[0]; immediately afterwards in order to treat $series as a $string.) If you're sure that mysql_fetch_array is always returning an array with a single element, you could use implode to convert the array to a string... $series = implode('', mysql_fetch_array(mysql_query( ... Check http://www.php.net/manual/en/function.implode.php for details on the implode function. mh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] dynamic variables in sq?l
Hi all! I have this form with some choices: form Enter how many cars you want:input type=text name=number select size=1 name=car option selectedford/option optionbmw/option optionmercedes/option /select And then I am trying to get the price out of a table in my database with this code: $sql = mysql_query(SELECT '$car' FROM varetabell where carid='$carid' ); $myrow= mysql_fetch_array($sql); $x = $myrow[$car]; $price = $x * $number; Shouldn't this work? Or am I missing something here? Best regards Raymond -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] dynamic variables in sq?l
Can you show how your mysql table is set up? Otherwise I am not quite sure what you are trying to do with your SQL statement. Jeff And then I am trying to get the price out of a table in my database with this code: $sql = mysql_query(SELECT '$car' FROM varetabell where carid='$carid' ); $myrow= mysql_fetch_array($sql); $x = $myrow[$car]; $price = $x * $number; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Reg Exp Help
YES! I was working that out as well. One correction though, this line should read: $temp_int_id = trim(substr($file_array[$i], 21, 4)); I guess the lesson learned is to use substr() when the length of the $string is fixed. Since I have to use substr() and trim() twice, I wonder if this has more or less overhead than a single regular expression? Thank you. Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 11:36 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help You said: The password and int_id begin and end in fixed positions. password begins in position 13 and can occupy up to 8 characters int_id begins in position 21 and can occupy up to 4 characters Sometimes a password (or int_id) may occupy all of those fixed position or only some of the fixed positions, it's variable. so that would make the code like this: Here is part of my actual code, if that makes any difference. $password // this var was retrieved from db $int_id // this var was retrieved from db $file_array = file($DOCUMENT_ROOT/dir/file.dat); $count = count($file_array); if ($count == 0) echo pNo records found in .dat file./p; for ($i = 0; $i $count; $i++) { $temp_pass = trim(substr($file_array[$i], 13, 8)); $temp_int_id = trim(substr, $file_array[$i], 21, 4)); if ($temp_pass == $password $temp_int_id == $int_id) { // do stuff } } Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 10:29 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help but if the positions as fixed, why don't you use the substr, and then trim th result? Edward - Original Message - From: Zach Curtis [EMAIL PROTECTED] To: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 6:12 PM Subject: RE: [PHP] Reg Exp Help The password and int_id begin and end in fixed positions. password begins in position 13 and can occupy up to 8 characters int_id begins in position 21 and can occupy up to 4 characters Sometimes a password (or int_id) may occupy all of those fixed position or only some of the fixed positions, it's variable. Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 9:58 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help how can I see that it isn't a 6 char $password with a 3 char $int_id ?? This one has a 8 character $password, followed by zero white spaces, followed by a single character $int_id 7d2ad345b Edward - Original Message - From: Zach Curtis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 5:51 PM Subject: [PHP] Reg Exp Help I am trying to code a regular expression that will match at the beginning of the string the contents of $password, followed by 0 or more occurrences of white space, followed by the contents of $int_id. The match should be case insensitive. Here are some examples of the strings: This one has a 6 character $password, followed by two white spaces, followed by a single character $int_id 9a9b9c z This one has a 8 character $password, followed by zero white spaces, followed by a single character $int_id 7d2ad345b This one has a 5 character $password, followed by three white spaces, followed by a four character $int_id d22ad bbaw Here is the regular expression I am trying to use that does not find the match and produces Warning: REG_BADRPT. (eregi(^\$password+[[:space:]]*+\$int_id, $file_array[$i])) Any corrections? Thanks in advance. Zach Curtis POPULUS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] dynamic variables in sq?l
mysql table is set up like this: -- bmw | ford | mercedes | -- 100 | 50 | 120 | It is just a very simple one. - Original Message - From: Jeff Sheltren [EMAIL PROTECTED] To: Raymond Lilleodegard [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 25, 2002 8:00 PM Subject: Re: [PHP] dynamic variables in sq?l Can you show how your mysql table is set up? Otherwise I am not quite sure what you are trying to do with your SQL statement. Jeff And then I am trying to get the price out of a table in my database with this code: $sql = mysql_query(SELECT '$car' FROM varetabell where carid='$carid' ); $myrow= mysql_fetch_array($sql); $x = $myrow[$car]; $price = $x * $number; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Dual Pentium Pro 200 vs. Single Pentium II 450
I've set up a PHP server (using Apache, MySQL and PHP module) successfully on the follwoing systems: Win98, Pentium120, 32MB Ram -- pretty fast Win95, 486-100Mhz, 16MB Ram -- Was speedy apart from the dodgy hard disk Win95, 486-25Mhz, 8Mb Ram -- chugs along quite nicely as a personal web server. I think either of your two configurations would be more than sufficient as Mike has said. I've never had any serious performance problems on any hardware using PHP and Apache. LJ Phil Schwarzmann [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have two PCs, one is a Dual Pentium Pro 200Mhz and the other is a Pentium II 450Mhz (both have 64MB) I want to set one of them up using Linux Red Hat 7.2, Apache, MySQL, and PHP. I only plan to have about 1-3 users accessing it at any one time. Which of those CPUs do you think is better? Will Linux take full advantage of those Dual Processors? Thanks for your advice! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Outreaching (announcement)
I downloaded the current version to test, and I don't know how you call it stable enough to use. I continually get permission denied errors accessing the DB. Some of them go away if I refresh, others don't. And yes, the user has full permissions to the relevant DB. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 8:14 PM To: [EMAIL PROTECTED] Subject: [PHP] Outreaching (announcement) Hi all! As posted some time ago, the company I'm working for developed a GPL system for project development (basically keeping in touch with the customers while developing a project). I think this project may be of some interest for some of you (well, hopefully, for may of you), so here's the manifesto: __ OPT (Outreach Project Tool) is a PHP general-purpose virtual commonplace for customers and developers to collaborate in developing projects. The system provides documents archive, e-mail archive, request tracker, task management, knowledge base, news administration, newsletter support and a lot of other features (some project-based, some system-based). __ Hope this may help some of you with your customers! The current version is 0.9 (beta - the first public release), but it's stable and comes with a nice setup interface (yes, I have been thinking of you guys). This release has been tested for more than eight months in a production environment, with real customers. So, the URL is http://sourceforge.net/projects/outreach - and you know my e-mail for complaints :-) HTH Bogdan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Question: $_* etc or $HTTP_*_VARS etc
To add on to this question, I have an upload script that I use on my site and now that I have registered globals off, I can't seem to find where the auto-generated $*_name $*_type $*_size variables are going... Anyone have any insight? I thought they would be in $_POST['$*_name'] but they aren't showing up there. Help is appreciated, Zara -Original Message- From: Gonzalez, Zara E Sent: Friday, January 25, 2002 10:02 AM To: 'PHP-General' Subject: [PHP] Question: $_* etc or $HTTP_*_VARS etc I am going through some code that I wrote recently and trying to change it so that I can turn register globals off in my php.ini. However, before I do that I want to make sure I am using the right variables. I read in the manual that $HTTP_*_VARS has been 'replaced' by $_* is this correct? Should I be using $_* syntax then? The only reason I am asking instead of trusting the manual is because I'd hate to have misread something and thought I understood it, recoded my site, and then realized I used the wrong variables. So if someone could just tell me one or the other I'd be happy. (Oh I'm using php 4.1.1 if that makes a difference since I believe the manual said the $_* syntax started at 4.1.0?) Thanks, Zara -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Question: $_* etc or $HTTP_*_VARS etc
http://www.php.net/manual/en/features.file-upload.php $HTTP_POST_FILES or $_FILES -Rasmus On Fri, 25 Jan 2002, Gonzalez, Zara E wrote: To add on to this question, I have an upload script that I use on my site and now that I have registered globals off, I can't seem to find where the auto-generated $*_name $*_type $*_size variables are going... Anyone have any insight? I thought they would be in $_POST['$*_name'] but they aren't showing up there. Help is appreciated, Zara -Original Message- From: Gonzalez, Zara E Sent: Friday, January 25, 2002 10:02 AM To: 'PHP-General' Subject: [PHP] Question: $_* etc or $HTTP_*_VARS etc I am going through some code that I wrote recently and trying to change it so that I can turn register globals off in my php.ini. However, before I do that I want to make sure I am using the right variables. I read in the manual that $HTTP_*_VARS has been 'replaced' by $_* is this correct? Should I be using $_* syntax then? The only reason I am asking instead of trusting the manual is because I'd hate to have misread something and thought I understood it, recoded my site, and then realized I used the wrong variables. So if someone could just tell me one or the other I'd be happy. (Oh I'm using php 4.1.1 if that makes a difference since I believe the manual said the $_* syntax started at 4.1.0?) Thanks, Zara -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Question: $_* etc or $HTTP_*_VARS etc
Hrm. Thanks. Apparently they didn't feel like listing $_FILES here: http://www.php.net/release_4_1_0.php $_GET - contains form variables sent through GET $_POST - contains form variables sent through POST $_COOKIE - contains HTTP cookie variables $_SERVER - contains server variables (e.g., REMOTE_ADDR) $_ENV - contains the environment variables $_REQUEST - a merge of the GET variables, POST variables and Cookie variables. In other words - all the information that is coming from the user, and that from a security point of view, cannot be trusted. $_SESSION - contains HTTP variables registered by the session module (no $_FILES) Ahh well. Now I know. Thanks. -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 1:11 PM To: Gonzalez, Zara E Cc: 'PHP-General' Subject: RE: [PHP] Question: $_* etc or $HTTP_*_VARS etc http://www.php.net/manual/en/features.file-upload.php $HTTP_POST_FILES or $_FILES -Rasmus On Fri, 25 Jan 2002, Gonzalez, Zara E wrote: To add on to this question, I have an upload script that I use on my site and now that I have registered globals off, I can't seem to find where the auto-generated $*_name $*_type $*_size variables are going... Anyone have any insight? I thought they would be in $_POST['$*_name'] but they aren't showing up there. Help is appreciated, Zara -Original Message- From: Gonzalez, Zara E Sent: Friday, January 25, 2002 10:02 AM To: 'PHP-General' Subject: [PHP] Question: $_* etc or $HTTP_*_VARS etc I am going through some code that I wrote recently and trying to change it so that I can turn register globals off in my php.ini. However, before I do that I want to make sure I am using the right variables. I read in the manual that $HTTP_*_VARS has been 'replaced' by $_* is this correct? Should I be using $_* syntax then? The only reason I am asking instead of trusting the manual is because I'd hate to have misread something and thought I understood it, recoded my site, and then realized I used the wrong variables. So if someone could just tell me one or the other I'd be happy. (Oh I'm using php 4.1.1 if that makes a difference since I believe the manual said the $_* syntax started at 4.1.0?) Thanks, Zara -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Install wddx extention for php 4.1.1
We tried to install php 4.1.1 with wddx support on our Solaris 2.8 with gcc 3.0. We installed expat library 1.2 (download from http://www.jclark.com/xml/expat.html) and wddx 1.0a. We also installed apache 1.3.22 which comes with expat support). We configure our php with the following options: --with-xml --enable-wddx --with-expat-dir=/depot/package/expat_1.2 However, we keep getting the following error messages: In file included from internal_functions.c:66: /site4/web_kit_1.0_rodgers/php_4.1.1/ext/wddx/php_wddx.h:26:19: expat.h: No such file or directory There is no header file called expat.h in either expat 1.2 package or apache 1.3.22 package. Did we install the wrong expat package? Which package do we have to install in order to get wddx compiled in php? Thanks, Ziying Sherwin P. S. I am not on this mailing list, please send your response to: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Install wddx extention for php 4.1.1
Try leaving off the --with-expat-dir switch completely. PHP comes with its own expat. On Fri, 25 Jan 2002, Ziying Sherwin wrote: We tried to install php 4.1.1 with wddx support on our Solaris 2.8 with gcc 3.0. We installed expat library 1.2 (download from http://www.jclark.com/xml/expat.html) and wddx 1.0a. We also installed apache 1.3.22 which comes with expat support). We configure our php with the following options: --with-xml --enable-wddx --with-expat-dir=/depot/package/expat_1.2 However, we keep getting the following error messages: In file included from internal_functions.c:66: /site4/web_kit_1.0_rodgers/php_4.1.1/ext/wddx/php_wddx.h:26:19: expat.h: No such file or directory There is no header file called expat.h in either expat 1.2 package or apache 1.3.22 package. Did we install the wrong expat package? Which package do we have to install in order to get wddx compiled in php? Thanks, Ziying Sherwin P. S. I am not on this mailing list, please send your response to: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] use linux commands within php
How can I count the number of lines in the uploaded file. ($userfile) What's wrong with the command below. Thanks $fp = popen (usr/bin/wc -l $userfile, r); __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: dynamic variables in sq?l
Than you very much for all help! I see that my database design is a little dumb, so I'll just make another one. Best regards Raymond Raymond Lilleodegard [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all! I have this form with some choices: form Enter how many cars you want:input type=text name=number select size=1 name=car option selectedford/option optionbmw/option optionmercedes/option /select And then I am trying to get the price out of a table in my database with this code: $sql = mysql_query(SELECT '$car' FROM varetabell where carid='$carid' ); $myrow= mysql_fetch_array($sql); $x = $myrow[$car]; $price = $x * $number; Shouldn't this work? Or am I missing something here? Best regards Raymond -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Check browser-type?
Hello. I need to check wich browser-type and/or OS an visitor have to a page Im developing. I need to know if the browser /OS is a handheld computer.. Or at least check if its NOT a handheld computer. Is this posible with PHP? I have just started with this programing language and its a bit difficult to search in PHP.net when I dont know exactly what I am looking for.. =) Thanks. //Mårten -- Mårten Andersson Loddbygatan 2 60218 Norrköping Sverige ICQ: 86515830 URL: http://www.vanvett.net/marten
Re: [PHP] use linux commands within php
try this ? system (/usr/bin/wc -l $userfile t.txt); $fd =fopen('t.txt', 'r'); $buffer=fgets($fd,8); echo ($buffer); fclose($fd); ? On Fri, 25 Jan 2002 11:41:44 -0800 (PST) toni baker [EMAIL PROTECTED] wrote: How can I count the number of lines in the uploaded file. ($userfile) What's wrong with the command below. Thanks $fp = popen (usr/bin/wc -l $userfile, r); __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- +---+ | Pablo Dall'Oglio _ | | Univates - IT Department °v° | | Linux User n. 223253 /(_)\| | The best source is the source code^ ^ | +---+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Check browser-type?
* and then Mårten Andersson blurted Hello. I need to check wich browser-type and/or OS an visitor have to a page Is this posible with PHP? I have just started with this programing language and its a bit difficult to search in PHP.net when I dont know exactly what I am looking for.. =) Check out $HTTP_USER_AGENT It contains all you need. There is a good tutorial on this at www.sitepoint,com (you'll have to search) and all the other good sites have covered it. eg, www.phpbuilder.com www.devshed.com Have fun. -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com msg47464/pgp0.pgp Description: PGP signature
RE: [PHP] Check browser-type?
http://www.php.net/manual/en/function.get-browser.php -Original Message- From: Mårten Andersson [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 1:47 PM To: [EMAIL PROTECTED] Subject: [PHP] Check browser-type? Hello. I need to check wich browser-type and/or OS an visitor have to a page Im developing. I need to know if the browser /OS is a handheld computer.. Or at least check if its NOT a handheld computer. Is this posible with PHP? I have just started with this programing language and its a bit difficult to search in PHP.net when I dont know exactly what I am looking for.. =) Thanks. //Mårten -- Mårten Andersson Loddbygatan 2 60218 Norrköping Sverige ICQ: 86515830 URL: http://www.vanvett.net/marten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Must results from MySQL fetches always be an Array??
This is sort of a is there an easier/better way kind of question. No error or problem, but I'd like to know how others handle it. I'm fetching single elements of data from several tables, then piecing it together. Here's an example of one element I need to fetch: $series = mysql_fetch_array(mysql_query(SELECT key2 FROM models WHERE lang='$lang' AND recordname='$model',$db)); Now I realize that with this function $series will always be an array, even if it contains just one element (which it does). What I'd like to know is, can I write that statement so that $series is created just as a string? (So that I don't have to write $series = $series[0]; immediately afterwards in order to treat $series as a $string.) ...Rene function mysql_get_one_field($stmt,$db) { $res = mysql_query($stmt,$db); $series = mysql_fetch_array($res); mysql_free_result($res); return $series[0]; } Daniel J. Lashua -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] use linux commands within php
try this ? system (/usr/bin/wc -l $userfile t.txt); $fd =fopen('t.txt', 'r'); $buffer=fgets($fd,8); echo ($buffer); fclose($fd); ? Or... if you really just want to count the number of lines in a file... do this: ? $ary = file(filename.txt); print There are . count($ary) . lines in filename.txt; ? This offers the advantage of having the file loaded into an array, since... chances are you want to do something with it after you spit out how many lines are in it. Daniel J. Lashua -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] strings and \n
Ok I'm having a problem with the new line char \n in strings. I'm trying to contrast an email that gets sent with the mail() function. Here is what I'm doing. $message = line1\n; $message .= line2\n\n; $message .= line3\n; ... $message = lne99; mail (email, subject, $message); but when the email is received not all the new lines r taken. Can anyone help me. Also where can I get a list of all the special chars like \n and what they meain. Greg
Re: [PHP] Must results from MySQL fetches always be an Array??
try $something=settype(mysql_result($variable,0),string); - Original Message - From: daniel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 12:25 PM Subject: Re: [PHP] Must results from MySQL fetches always be an Array?? This is sort of a is there an easier/better way kind of question. No error or problem, but I'd like to know how others handle it. I'm fetching single elements of data from several tables, then piecing it together. Here's an example of one element I need to fetch: $series = mysql_fetch_array(mysql_query(SELECT key2 FROM models WHERE lang='$lang' AND recordname='$model',$db)); Now I realize that with this function $series will always be an array, even if it contains just one element (which it does). What I'd like to know is, can I write that statement so that $series is created just as a string? (So that I don't have to write $series = $series[0]; immediately afterwards in order to treat $series as a $string.) ...Rene function mysql_get_one_field($stmt,$db) { $res = mysql_query($stmt,$db); $series = mysql_fetch_array($res); mysql_free_result($res); return $series[0]; } Daniel J. Lashua -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] strings and \n
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Greg Sidelinger blurted Ok I'm having a problem with the new line char \n in strings. I'm trying to contrast an email that gets sent with the mail() function. Here is what I'm doing. $message = line1\n; $message .= line2\n\n; $message .= line3\n; but when the email is received not all the new lines r taken. Can anyone help me. Also where can I get a list of all the special chars like \n and what they meain. I think you need to try \r\n (poss. other way round) That should do it. - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UcZYHpvrrTa6L5oRAuliAJ4vouXleTkRY6IvSva2xS6BBnJHMgCeKHJW n3BzuUtk5LYJ3gra3SqxnXs= =fgqQ -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] break statement usage
Hello, all I have a quick question about using the break statement from within a switch() statement. After accepting user input from a form, I want to run this input through some error checking via PHP code (not Javascript error checking). So the first thing is the code puts the input through to a couple of error functions (this is all inside of a switch statement that is determined by a radio button on the previous page). If the error functions show the input as invalid, I echo back a specific error-message telling the user which field needs to be fixed, and then break to end the case statement. That way the input never comes near the database functions (mysql_query()) if it is invalid input. Is this a poor way to code -- using the break as a shortcut to jump out of the switch statement? Are there other ways that break can be used -- such as from loops? I've been learning Python on the side, and in that language, the break statement is used often, sometimes in a loop like while 1 do some code if condition is true break This is basically an infinite loop until the condition is true -- though I've never seen a WHILE loop in PHP that is formed this way (using a 1 to make it happen infinitely until a condition is met and then BREAKing out of the loop). Usually, at least from what I've seen, PHP WHILE loops are constructed so that they terminate when a condition is met specified immediately after the WHILE, as in: while (x $number_of_iterations) { do some code } So what I'm wondering is, Is it bad coding practice to make heavy use of break statements in switch() flow control? Thank you for your opinions, Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] break statement usage
Good day, Actually, using the break statement is the accepted, proper way to break out of a switch statement, just as it is in other programming languages. And yes, the break statement can be used to terminate other loops, such as while and for, just like in other languages. Using it there is not considered bad programming practice either, although in the case of the while statement you should try to utilize the loop condition if possible. FYI, the command to break to the next iteration of a loop is continue. The PHP site has very good documentation on the usage and appropriateness for switch, break and continue. I would highly recommend you take a look, if you have not already. Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 2:11 PM To: PHP Subject: [PHP] break statement usage Hello, all I have a quick question about using the break statement from within a switch() statement. After accepting user input from a form, I want to run this input through some error checking via PHP code (not Javascript error checking). So the first thing is the code puts the input through to a couple of error functions (this is all inside of a switch statement that is determined by a radio button on the previous page). If the error functions show the input as invalid, I echo back a specific error-message telling the user which field needs to be fixed, and then break to end the case statement. That way the input never comes near the database functions (mysql_query()) if it is invalid input. Is this a poor way to code -- using the break as a shortcut to jump out of the switch statement? Are there other ways that break can be used -- such as from loops? I've been learning Python on the side, and in that language, the break statement is used often, sometimes in a loop like while 1 do some code if condition is true break This is basically an infinite loop until the condition is true -- though I've never seen a WHILE loop in PHP that is formed this way (using a 1 to make it happen infinitely until a condition is met and then BREAKing out of the loop). Usually, at least from what I've seen, PHP WHILE loops are constructed so that they terminate when a condition is met specified immediately after the WHILE, as in: while (x $number_of_iterations) { do some code } So what I'm wondering is, Is it bad coding practice to make heavy use of break statements in switch() flow control? Thank you for your opinions, Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] break statement usage
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Erik Price blurted So what I'm wondering is, Is it bad coding practice to make heavy use of break statements in switch() flow control? That's exactly the point of the break statement, it was designed to be used in a switch statement to 'break' from the statement. It replaces the need for complex and untidy 'if else' monsters. tip Try to keep your posts a little shorter if only for the sake of the dialup users ;) /tip Cheers - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8Uc0PHpvrrTa6L5oRAvcAAJ9Z67PVwgyNN7WFpf/R0wvN97IMkgCgm53O 1TbPTWhwyl8FNEhtLRRYv/c= =UDbQ -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Outreaching (announcement)
That has been reported by someone else earlier today and I really don't know what the problem is - could you please provide some more info? What's your MySQL version? Does it happen on all pages or only on some? What does the error message say (please copy ALL of the data on the page). Thanks! Bogdan Matthew Walker wrote: I downloaded the current version to test, and I don't know how you call it stable enough to use. I continually get permission denied errors accessing the DB. Some of them go away if I refresh, others don't. And yes, the user has full permissions to the relevant DB. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 8:14 PM To: [EMAIL PROTECTED] Subject: [PHP] Outreaching (announcement) Hi all! As posted some time ago, the company I'm working for developed a GPL system for project development (basically keeping in touch with the customers while developing a project). I think this project may be of some interest for some of you (well, hopefully, for may of you), so here's the manifesto: __ OPT (Outreach Project Tool) is a PHP general-purpose virtual commonplace for customers and developers to collaborate in developing projects. The system provides documents archive, e-mail archive, request tracker, task management, knowledge base, news administration, newsletter support and a lot of other features (some project-based, some system-based). __ Hope this may help some of you with your customers! The current version is 0.9 (beta - the first public release), but it's stable and comes with a nice setup interface (yes, I have been thinking of you guys). This release has been tested for more than eight months in a production environment, with real customers. So, the URL is http://sourceforge.net/projects/outreach - and you know my e-mail for complaints :-) HTH Bogdan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] strings and \n
\r\n or \n\r is not helping. The thing that confuses me is that some of the \n lines work just fine while others do not. So if anyone give give me a hint y it is not working all the time please send me email. Greg -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 3:56 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] strings and \n -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Greg Sidelinger blurted Ok I'm having a problem with the new line char \n in strings. I'm trying to contrast an email that gets sent with the mail() function. Here is what I'm doing. $message = line1\n; $message .= line2\n\n; $message .= line3\n; but when the email is received not all the new lines r taken. Can anyone help me. Also where can I get a list of all the special chars like \n and what they meain. I think you need to try \r\n (poss. other way round) That should do it. - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UcZYHpvrrTa6L5oRAuliAJ4vouXleTkRY6IvSva2xS6BBnJHMgCeKHJW n3BzuUtk5LYJ3gra3SqxnXs= =fgqQ -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] WinNT extensions
Don't you pay them for the very difficult stuff! Paul Roberts [EMAIL PROTECTED] - Original Message - From: Malcolm [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 11:04 AM Subject: [PHP] WinNT extensions Hi all I am building a simple web based mail app. I tried to contact my mail server using imap_open() but all I got was this: Fatal error: Call to undefined function: imap_open() in d:\... on line 15 I got in touch with my provider who replied: IMAP support was not compiled into the Windows version of PHP. Unfortunately, compiling it by hand is very difficult. It requires having Microsoft Visual C++, along with a bunch of other tools. So...it looks like you'll need to use another method to view mail. Sorry for the bad news. I thought imap functionality was in a dll which can be loaded dynamically: dl(php_imap.dll); imap_open(a,u,p); Can anyone please enlighten me? Is it built in? They use PHP 4.1.1. Malcolm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]