Re: [PHP] PHP on one box, Apache on another?
> I don't know the details of this request (like why., but as soon as I > know I'll tell you) but can Apache live on one box with all PHP requests > being handled on another box? Yeah, but what you're likely to end up with is apache on one machine just passing requests to and from apache-mod_php-your_app on another machine. Or, you could use some other web server on the second machine, might even be something dead-simple, like a shell process running command-line PHP (don't do that unless you know how and why already) or a perl (php?) script that passes things on to the PHP cgi. Are you familiar with Tomcat? The typical production arrangement with Tomcat, except for sites that use very little static html, is to have Apache handle the static html, and Tomcat handle the jsp/java. Apache and Tomcat can definitely be on separate machines. I think I have read somewhere reports of some project working to set up a similar special-purpose php-template server for php, but that may be just my imagination. -- Joel Rees, programmer, Kansai Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP on one box, Apache on another?
> Hi, > > > I told him that support for PHP was compiled into Apache and that it > > would be impractical. I asked if he wanted the DB on another box. I > > asked if he wated the scripts on another box. I am quite sure that there > > is no particular logic behind the request as I have not received any > > answers. If he tells me more I'll let you know. > > We had a request for this type of setup a couple months ago. The only > logic behind it was a guy who didn't have any idea what he was talking about > reading somewhere that you should have 3 servers per application you setup. > 1. Web Server, 2. File Server, File server, of course, has nothing to do with php unless you write the file server in php. 8*| Or, perhaps that mod_php is usually compiled into the file server. (Is this possibly echos of iSCSI?) > 3. DB Server. After we all got done laughing > him off the phone call, we setup 2 servers, 1. Web/Files, 2. DB. > Fortunately he decided to listen that day. Perhaps what he meant by web server was firewall (i. e., handling the internet interface), and by file server he meant what we now call web server (i. e., presenting the view of the file system that the outside world is supposed to see)? -- Joel Rees, programmer, Kansai Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-general as REPLY TO
> > You'll have to learn to adjust then I guess. And do those 2k really > > matter? Come on... Just get a good mailer that defaults to > > "Reply-All" > > (like, mutt, pine, pcpine) > > Some of us don't have the choice -- we work in a corporate or institutional > environment where the decision is made centrally. (Hence M$ Outlook 98 here!!!) There is a setting in MSOutlook/MSOE to wrap your lines, say, at 62 or 70. I don't remember my experiences with MSOE on Mac very well, but MSOE on MSW2k had little triangles on buttons in various places. If you hit the button, you got the standard function. If you hit the triangle, you got a pop-up menu. Pop-up menu for replies included basically all the potential reply addresses (according to MS judgement of potential reply addresses). Look around, maybe you can find something like that on MSOutlook 98. We had some virus problems here last year, and now MS mail clients are banned. The company standardized on Becky for the MSWxx boxes, which is a really nice client, all sorts of features for mailing lists, newsgroups, etc. The filter setup is a little weird, but it works great. So I am beginning to forget the "conveniences" of MSOE on MSW2k, as well, which is not something I mind forgetting. But I have to admit, I find it puzzling why copy/pasting a mail address should be considered such an inconvenience. I admit, copy/paste on MSWxx feels clumsier than on a Mac, but the operations are fundamental to GUI. I also find it a puzzle why so many companies seem to think that MSOutlook's advantages outweigh the problems of having to bolt antivirus on everything (and the occasional slip-through that then proceeds to dirty entire subnets), but that is a separate topic. -- Joel Rees, programmer, Kansai Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Betr: [PHP] php - printer button
On Tue, 1 Jul 2003 [EMAIL PROTECTED] wrote: > > On Tue, 1 Jul 2003, Dore van Hoorn wrote: > > > This is not exactly what you've asked for, but perhaps you're able to use > > it anyway. It is the PHP script I use to create a print-friendly page: > > Everything between and
[PHP] Previous Basic Auth clarified
Hi All I think I missed a bit to my Basic Auth issue which I hope to clarify here. 1) User successfully logins into my UNIX/Apache/Php site using my MySql/SESSION/$_POST combo. 2) Now I need to send a username:password pair to a Windows box to allow access to a Basic Auth protected resource on the Win box. 3) The aim is to seamlessly pass the u:p pair to the win box for auth and allow my user to access the resource. I thought that after doing my checking than sending the u:p pair like this: http://username:[EMAIL PROTECTED]://10.0.0.1/dir in a similar fashion to browser ftping would do the trick but it doesn't . Can anyone help me with this please. Server 1 = FreeBSD/Apache1.3/PHP.4.3 Server 2 = Win2K Server Thanks in advance for any help Dave C --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.493 / Virus Database: 292 - Release Date: 25/06/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT (kinda): Mod_rewrite
On Tue, 01 Jul 2003 22:38:38 -0700, John wrote: >When using mod_rewrite, is there any way to post variables from a form the >way you want to. > >eg >a text box called first name >another textbox called second name >action being http://www.searcher.com/search > >and the result being >http://www.searcher/search/firstname/secondname > >is this possible?? i dont think so E... I'm not totally sure I understand what you are asking for, but I do know the following should work: 1) Create a index.php file in the /search/ directory that expects two "GET" parameters. 2) Set up the following mod_rewrite: RewriteRule /search/([^/]+)/(.+) /www/htdocs/search/index.php?First=$1&Last=$2 Should allow this: > http://www.searcher.com/search/firstname/secondname to call index.php as: > http://www.searcher/search/index.php?First=firstname&Second=secondname Hope this helps. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How can I get all vars
Hi, Can somebody say how can I get all vars and their values from a script. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP user group
Does anyone know of a PHP user group near Gurnee, IL. I found one in Chicago, but its a little far to go and they meet in the middle of the day on Sat. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php - printer button
lol we we just discussing this at work the printer functions are only for windoze , there is jscript window.print() to bring up the printer dialog , a project i just did implemented htmldoc which outputted the formatted content to pdf which was a more well formed format for printing rather than from the browser itself > hi, > > PHP dos have some printer_* functions. had a look? :-) > > -shiva > > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> >> Dear all, >> >> I have research about library automation engine in my library. >> developing on PHP + MySQL >> We need to develop printer utility at some module to get print out >> transaction. >> >> Can I do this utility using SUBMIT BUTTON under HTML & PHP? >> how to make the php printer script? >> help... please & thanks >> >> Regard, >> Nasar >> >> >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] safe_mode and file/directory ownership
Take a look at safe_mode_gid, it tells PHP to do safe mode owner checking using the group id rather than user id. safe_mode_gid boolean By default, Safe Mode does a UID compare check when opening files. If you want to relax this to a GID compare, then turn on safe_mode_gid. Whether to use UID (FALSE) or GID (TRUE) checking upon file access. http://www.php.net/manual/en/features.safe-mode.php Other than that consider turning off safe mode if you have access to it, or turn it off for your virtual host. Jason Paul Chvostek wrote: I've got a script whose configuration creates a storage directory owned by the web server in which files get stored, also owned by the web server. With safe_mode in effect, I'm getting errors like: Warning: file_exists() [function.file-exists]: SAFE MODE Restriction in effect. The script whose uid is 10054 is not allowed to access /path/to/some/data owned by uid 80 in /path/to/some/file.php on line 111 Wouldn't it make sense for safe_mode also to allow read access to files owned by the web server's process as well as the directory owner's? Obviously, a process running as uid 80 won't be able to suid to another user. If I make the directory owned by the user, the files will be inaccessible, but if I make the directory uid 80, then *it* will be inaccessible. Is there some other solution to storing (and then retrieving) files with safe_mode on? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Items displayed left and right, help newman.
On Jul 2, 2003, "Mark Tehara" claimed that: |Where should i start with the lodgic. I'm trying to list a group of items | | |Left: item one, Right: Item 2 | | |This is repeated | |I can only seem to get them to go str8 down not left then right. | | |Any Ideas? | |/ Mark Perhaps you want an html table? Maybe using a counter of some sort to keep track of your left right ? Perhaps you want to use to output left item, 20-strlen(left_item) spaces, right item \n? Perhaps to pull the values, your counter will increment by 2. value[counter] on left, value[counter+1] on right? Perhaps create the page in only html the way you want it to appear, then look for patterns that can be created by looping through a logic structure (like www.netfobs.org/dates.php)? Jeff -- Registered Linux user #304026. "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import" Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and gd
PHP 4.3.2 has GD bundled with it, if you compile it from source do --with-gd to use the bundled library. It sounds like you need to install GD2, you can find it on freshmeat.net or probably find an RPM for your distro somewhere. If you have libjpeg and libpng I've had no problems using the bundled GD library with PHP, if you take the PHP compile line from phpinfo() it should be pretty easy to recompile your PHP and at the same time upgrade to 4.3.2 :). Take a look at http://www.php.net/manual for install instructions if you need more information. Jason David Miller wrote: Hello I hope someone can help me. I use my local machine to develop and then upload to whatever site. I have one site that does some image resizing, uses a call to imagecreatetruecolor. Works fine on the host and used to work fine on my local machine. But now that I come back to make some changes it no longer works on local machine. I get this warning: Warning: imagecreatetruecolor(): requires GD 2.0 or later. I was using RedHat 8.0 and a short time back I ran up2date that upgraded the php but not the gd. I think this is where the problem came in. I tried to upgrade gd but there were dependicies that seem like it would reguire updating half the system. If I remember gd 2.0 wanted db4.1 and db4.0 is used by many, many things. I thought it would be easier to simply upgrade from RedHat 8 to RedHat 9 which is what I did. It took me all day to get everything straighened out and running again but I still have the same problem getting the same warning. If I run a script that contains the following: // Show all information, defaults to INFO_ALL phpinfo(); ?> I am told that I am now running PHP Version 4.2.2 and if I go down to the gd section the second line says GD Version 1.6.2 or higher. I tried uninstalling and reinstalling the php but this didn't help. Thanks David Miller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Items displayed left and right, help newman.
Dude, Can you not use something like while and then add a for ($i=1 to ... lodgic... (o; - Original Message - From: "Mark Tehara" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Cc: "Philip J. Newman" <[EMAIL PROTECTED]> Sent: Wednesday, July 02, 2003 3:56 PM Subject: [PHP] Items displayed left and right, help newman. Where should i start with the lodgic. I'm trying to list a group of items Left: item one, Right: Item 2 This is repeated I can only seem to get them to go str8 down not left then right. Any Ideas? / Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 2values on form, help in catching as one.
You could do it a couple different ways, if you just want to combine the values the easiest way is: $v_template = $_REQUEST['TemplateOne'] . $_REQUEST['TemplateTwo']; If you want a space between the two values expand on this idea using: $v_template = $_REQUEST['TemplateOne'] . ' ' . $_REQUEST['TemplateTwo']; If you get a minute checkout the PHP manual at http://www.php.net/manual, it covers this topic and has quite a few useful tips in it. Jason Miranda, Joel Louie M wrote: I have this php code (below), My form passes 2 values w/c is TemplateOne and TemplateTwo I was wondering how could I make that in php to catch the value as one only? I tried this and it didn't work. But if the value is just one the case display it. Any ideas? switch($v_template) { case 'TemplateOne': echo "one"; break; case 'TemplateTwo': echo "two"; break; } ?> -- Thank you, Miranda, Louie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Items displayed left and right, help newman.
Where should i start with the lodgic. I'm trying to list a group of items Left: item one, Right: Item 2 This is repeated I can only seem to get them to go str8 down not left then right. Any Ideas? / Mark
Re: [PHP] Removed the bundled MySQL client library. (Sterling)
On Tue, 1 Jul 2003 23:51:09 -0400 "Vincent Bouret" <[EMAIL PROTECTED]> wrote: > I found this in the ChangeLog of PHP5: Removed the bundled MySQL client > library. (Sterling) > > What does that mean? We can't access MySQL anymore from PHP? > Check this thread: http://marc.theaimsgroup.com/?t=10569918734&r=1&w=2 - E - __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Session vs Cookie Issues
Hi Mike, based on what you're saying, I gather that if I were to choose to use cookies, and if cookies were rejected by the user, PHP will default to using sessions? : quote :--- The only major flaw I've found with PHP's session support is that it doesn't appear to be possible to force the data to be written without also closing the session. : End Quote : Is the above a serious flaw which I need to be aware of? Thanks Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: Mike Migurski [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 11:47 AM To: Ow Mun Heng Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Session vs Cookie Issues > I know this topic has been talked about a LOT but all the info >I've managed to get from google is that there is no center / best option >to choose between using sessions or cookies. You're comparing apples and oranges -- cookies are one of the mechanisms by which PHP implements sessions. The other is URL-munging. So if you use sessions, odds are cookies are coming along for the ride. What you definitely /don't/ want to do is to store application data in the cookie itself, due to various security (public machines) and technical (4k size limit) concerns. PHP's built-in session support uses the cookie data as an identifier, to match a user to the data stored in a session file, and in general this is the way to go. The only major flaw I've found with PHP's session support is that it doesn't appear to be possible to force the data to be written without also closing the session. In general, PHP's session features are pretty complete, and easily modifiable. To clear up a few items below: >Cons of Sessions >1. saves it in /tmp - world viewable not necessarily so, see php.net/session_save_path >2. Session ID may be easy to guess unless I md5 the sessionID before >sending it out you can define your own session id if you'd like, see php.net/session_id for example, to help deter session fixation, you might require that the session be a hash of certain environment variables, such as remote IP or user-agent string. >Cons of cookies >1. cookies can be rejected by users >2. if rejected, means session can't be preserved across pages?? (this I'm >not sure) this is where URL-munging will come into play; PHP will resort to this if cookies are rejected. >3. cookie is stored in user's hard drive. What is user using public PC? don't use the cookie to store application data - use it to determine the user's identity. This is the behavior that PHP's session features encapsulate. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Removed the bundled MySQL client library. (Sterling)
I found this in the ChangeLog of PHP5: Removed the bundled MySQL client library. (Sterling) What does that mean? We can't access MySQL anymore from PHP? Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session vs Cookie Issues
> I know this topic has been talked about a LOT but all the info >I've managed to get from google is that there is no center / best option >to choose between using sessions or cookies. You're comparing apples and oranges -- cookies are one of the mechanisms by which PHP implements sessions. The other is URL-munging. So if you use sessions, odds are cookies are coming along for the ride. What you definitely /don't/ want to do is to store application data in the cookie itself, due to various security (public machines) and technical (4k size limit) concerns. PHP's built-in session support uses the cookie data as an identifier, to match a user to the data stored in a session file, and in general this is the way to go. The only major flaw I've found with PHP's session support is that it doesn't appear to be possible to force the data to be written without also closing the session. In general, PHP's session features are pretty complete, and easily modifiable. To clear up a few items below: >Cons of Sessions >1. saves it in /tmp - world viewable not necessarily so, see php.net/session_save_path >2. Session ID may be easy to guess unless I md5 the sessionID before >sending it out you can define your own session id if you'd like, see php.net/session_id for example, to help deter session fixation, you might require that the session be a hash of certain environment variables, such as remote IP or user-agent string. >Cons of cookies >1. cookies can be rejected by users >2. if rejected, means session can't be preserved across pages?? (this I'm >not sure) this is where URL-munging will come into play; PHP will resort to this if cookies are rejected. >3. cookie is stored in user's hard drive. What is user using public PC? don't use the cookie to store application data - use it to determine the user's identity. This is the behavior that PHP's session features encapsulate. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 2values on form, help in catching as one.
I have this php code (below), My form passes 2 values w/c is TemplateOne and TemplateTwo I was wondering how could I make that in php to catch the value as one only? I tried this and it didn't work. But if the value is just one the case display it. Any ideas? -- Thank you, Miranda, Louie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php - printer button
hi, PHP dos have some printer_* functions. had a look? :-) -shiva <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Dear all, > > I have research about library automation engine in my library. > developing on PHP + MySQL > We need to develop printer utility at some module to get print out > transaction. > > Can I do this utility using SUBMIT BUTTON under HTML & PHP? > how to make the php printer script? > help... please & thanks > > Regard, > Nasar > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] online file management
Hello, I have developed a package which is exactly same what you explained here. It is PHP-MySQL (Windows/Linux)combination. I have another older version which was PHP-MSAccess (Windows). If you want I can give you logins for test purposes. This system is currently in use. I have to creat identical system for you on another server. Please let me know if you are interested in this. Let me know Suhas _ Suhas S Pharkute. P O Box 8551, Pocatello ID 83209. 1.208.221.3896 http://myweb.cableone.net/psuhas _ - Original Message - From: "Paul Chvostek" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 8:03 PM Subject: [PHP] online file management > > Hiya. > > I'm looking for a tool that will allow online file management, with a UI > something like that of a traditional FTP client. > > The ideal candidate would authenticate based on a MySQL table and would > be able to handle multiple users with unique base directories. I'd > rather not use an PHP-based FTP client, but I'm open to that if nothing > else is available. > > Before I write one myself, is there a package that has already been > built that any one can recommend (or recommend against)? > > Thanks. :-) > > -- > Paul Chvostek <[EMAIL PROTECTED]> > it.canadahttp://www.it.ca/ > Free PHP web hosting!http://www.it.ca/web/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Email troubles
Hello, On 06/30/2003 07:30 PM, Sparky Kopetzky wrote: I'm getting this error while sending email with mail(): Warning: mail(): SMTP server response: 550 5.7.1 <[EMAIL PROTECTED]>... Relaying denied in (path to my program) How do I turn relaying on?? I think that means you need to authenticate. The mail() function has no authentication support. You may want to try this class that comes with a subclass for sending messages via SMTP that supports authentication. It comes also with a wrapper function named smtp_mail() that emulates the mail() function so you can use it as replacement without changing your scripts too much: http://www.phpclasses.org/mimemessage You also need this for message delivery. http://www.phpclasses.org/smtpclass -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and gd
Hello I hope someone can help me. I use my local machine to develop and then upload to whatever site. I have one site that does some image resizing, uses a call to imagecreatetruecolor. Works fine on the host and used to work fine on my local machine. But now that I come back to make some changes it no longer works on local machine. I get this warning: Warning: imagecreatetruecolor(): requires GD 2.0 or later. I was using RedHat 8.0 and a short time back I ran up2date that upgraded the php but not the gd. I think this is where the problem came in. I tried to upgrade gd but there were dependicies that seem like it would reguire updating half the system. If I remember gd 2.0 wanted db4.1 and db4.0 is used by many, many things. I thought it would be easier to simply upgrade from RedHat 8 to RedHat 9 which is what I did. It took me all day to get everything straighened out and running again but I still have the same problem getting the same warning. If I run a script that contains the following: // Show all information, defaults to INFO_ALL phpinfo(); ?> I am told that I am now running PHP Version 4.2.2 and if I go down to the gd section the second line says GD Version 1.6.2 or higher. I tried uninstalling and reinstalling the php but this didn't help. Thanks David Miller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Minimizing Database Hits
Hello, On 07/01/2003 07:41 PM, Ralph wrote: I wrote class that contains a function that retrieves users shopping cart items from database and then returns an array with qty, item number , item name, etc. So now whenever I want to retrieve the users cart I use the following: $cart_contents = $cart->get_cart_contents(); I then iterate through $cart_contents to display info. Now I am trying to minimize the number of hits to the database so my question is, am I querying the database every time I call on $cart_contents? A common solution is to serialize() and cache the results in disk files. For arbitrary data caching, you may want to try this class: http://www.phpclasses.org/filecacheclass -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Image Verification (On Submit)
Hello, On 07/02/2003 12:00 AM, Joel Louie M Miranda wrote: Can someone give me a suggestion or a howto where could I get some idea on how to do image verification? Like on yahoo.com signup where you need to enter the text on the image to process your order. This class does what you want: Class: CAPTCHA http://www.phpclasses.org/captcha -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] safe_mode and file/directory ownership
I've got a script whose configuration creates a storage directory owned by the web server in which files get stored, also owned by the web server. With safe_mode in effect, I'm getting errors like: Warning: file_exists() [function.file-exists]: SAFE MODE Restriction in effect. The script whose uid is 10054 is not allowed to access /path/to/some/data owned by uid 80 in /path/to/some/file.php on line 111 Wouldn't it make sense for safe_mode also to allow read access to files owned by the web server's process as well as the directory owner's? Obviously, a process running as uid 80 won't be able to suid to another user. If I make the directory owned by the user, the files will be inaccessible, but if I make the directory uid 80, then *it* will be inaccessible. Is there some other solution to storing (and then retrieving) files with safe_mode on? Thanks. -- Paul Chvostek <[EMAIL PROTECTED]> it.canadahttp://www.it.ca/ Free PHP web hosting!http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Image Verification (On Submit)
> Can someone give me a suggestion or a howto where could I get some idea on > how to do image verification? Like on yahoo.com signup where you need to > enter the text on the image to process your order. It's not a difficult process.. Basically, Design an image which has a lot of noise in the background (some sort of odd pattern) and then use the GD functions to write a string on top of that pattern and display it on your form (and keep track of the string you wrote).. then ask the user to type that string in and check it on submit :) John -- -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- John Coggeshall john at coggeshall dot org http://www.coggeshall.org/ -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Image Verification (On Submit)
Hello, Can someone give me a suggestion or a howto where could I get some idea on how to do image verification? Like on yahoo.com signup where you need to enter the text on the image to process your order. -- Thanks, Louie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session vs Cookie Issues
Hi All, I know this topic has been talked about a LOT but all the info I've managed to get from google is that there is no center / best option to choose between using sessions or cookies. Pros of Sessions 1. PHP does it all automatically 2. Can also be defined but I don't know how(yet) Cons 1. saves it in /tmp - world viewable 2. Session ID may be easy to guess unless I md5 the sessionID before sending it out Pros of Cookies 1. can be generated via functions 2. Can be stored in mysql & looked up each time user comes to the site (this i found out from mantis-bugtracker) 3. can be set using PHP setcookie function Cons 1. cookies can be rejected by users 2. if rejected, means session can't be preserved across pages?? (this I'm not sure) 3. cookie is stored in user's hard drive. What is user using public PC? Can anyone please help explain which is better in terms of performance & security? For cookies and the way that mantis does it(I looked through the code to learn - newb), each time a page is accessed, php will query the database for the cookie string and compare it as a means of identification. Doesn't this affects performance if I were to need to query the database A LOT? (presuming that my site generates a lot of traffic.) I'm assuming here that accessing the /tmp is faster than accessing the database. Is there a way to put the /tmp location somewhere secure and not world viewable? Please Don't flame me.. I'm just asking. Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT (kinda): Mod_rewrite
When using mod_rewrite, is there any way to post variables from a form the way you want to. eg a text box called first name another textbox called second name action being http://www.searcher.com/search and the result being http://www.searcher/search/firstname/secondname is this possible?? i dont think so and sorry 4 d capitals last time round!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] CHECKING A PAGE EXISTS
How do I, in PHP, check if a submitted URL exists and doesnt return a 404 error. can i open it with fopen and somehow get the HTTP response or does it require something else -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parsing fgetcsv using tab (\t)
Yea, that is what I'm going to do for a back up. After mucking with this for a couple of days, I've about had it. Jeff Harris wrote: > On Jul 1, 2003, "Chris" claimed that: > > |I'm trying to create an form where the user can upload a datafile to the > |server. The datafile will be txt or csv and contain multiple records. I > |would like the user to supply the field delimiter like (,) comma , (\t) > |tab or something else. The data records are then parsed using fgetcsv. > | > |The problem I'm having is trying to recover the tab character from the > |form post. If I print out what is received from my form I see the > |following \\t. I realize that the addition of the extra slash is > |expected, but what I don't know how to do is prepair this varable to use > |it in my fgetcsv argument. > | > |I've tried using stripslash but nothing seems to work for me. > | > |Strangely, if is set a variable in my processing script like: > | > |$field_terminater = "\t"; > | > |Then supply this to: $newRecord = fgetcsv($f, $size,$field_terminater) > |everything works fine. If I use the variable passed from my form the > |records are not getting parsed. > | > |Any suggestions would be appreciated. > |Chris > | > [Not PHP] > Hard code the choices using radio buttons or a select on the form. There > shouldn't be too many commonly used delimiters, and those that use > uncommon delimiters will have to adjust. > [/Not PHP] > > Then, use the value submitted to choose the delimiter in the php script. > > Jeff > -- > Registered Linux user #304026. > "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import" > Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED > Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] online file management
Hiya. I'm looking for a tool that will allow online file management, with a UI something like that of a traditional FTP client. The ideal candidate would authenticate based on a MySQL table and would be able to handle multiple users with unique base directories. I'd rather not use an PHP-based FTP client, but I'm open to that if nothing else is available. Before I write one myself, is there a package that has already been built that any one can recommend (or recommend against)? Thanks. :-) -- Paul Chvostek <[EMAIL PROTECTED]> it.canadahttp://www.it.ca/ Free PHP web hosting!http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sharing Cookies with Java?
>>Can php share cookies with java servlets? Specifically, can php use >>cookies written by a java servlet? > >I don't know about Java, but JavaScript can use php cookies and >vice-versa. A cookie is a cookie is a cookie, regardless of the originating technology -- browsers should treat them all identically, so your only restrictions will be the ones built into HTTP itself. See the RFC (linked from the php.net cookie docs) or netscape's info for a few brief notes on the various restrictions placed on cookie data: http://wp.netscape.com/newsref/std/cookie_spec.html - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] states
In a message dated 7/1/2003 3:56:28 PM Pacific Daylight Time, [EMAIL PROTECTED] writes: >Does anyone know of any built in functions or options for the US states? >I want to make a drop down menu and some other things which have the 50 >states in it. Is there any shortcut for this with PHP, or do I need to >do it all manually in HTML? Please let me know. Thanks. Here's code that will create a dropdown list of states. It uses functions called getNames and getCodes that create arrays of the state names and state codes. The functions that create the arrays are attached. $state\n"; } ?> Good luck, Janet "AL" , "AK" , "AZ" , "AR" , "CA" , "CO" , "CT" , "DE" , "DC" , "FL" , "GA" , "HI" , "ID" , "IL" , "IN" , "IA" , "KS" , "KY" , "LA" , "ME" , "MD" , "MA" , "MI" , "MN" , "MS" , "MO" , "MT" , "NE" , "NV" , "NH" , "NJ" , "NM" , "NY" , "NC" , "ND" , "OH" , "OK" , "OR" , "PA" , "RI" , "SC" , "SD" , "TN" , "TX" , "UT" , "VT" , "VA" , "WA" , "WV" , "WI" , "WY" ); return $stateCode; } function getNames() { $stateName = array(1=> "Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "District of Columbia", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Ontario", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"); return $stateName; } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Rotating text
On Tue, 1 Jul 2003 15:41:47 -0700, you wrote: >What would the best way to rotate text 90 degrees? Using php's image >generator? Some fancy HTML I don't know about? Or something else? CSS http://www.ssi-developer.net/css/vertical-text.shtml But as to browser support *shrug*. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sharing Cookies with Java?
I don't know about Java, but JavaScript can use php cookies and vice-versa. -Original Message- From: Jiann-Ming Su [mailto:[EMAIL PROTECTED] Sent: 1. júlí 2003 19:50 To: [EMAIL PROTECTED] Subject: [PHP] Sharing Cookies with Java? Can php share cookies with java servlets? Specifically, can php use cookies written by a java servlet? -- Jiann-Ming Su [EMAIL PROTECTED] 404-712-2603 Development Team Systems Administrator General Libraries Systems Division -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] need help w/ sql query - update and select at once
Actually, when I took another look at the manual, it says: Starting with MySQL Version 4.0.4, you can also perform UPDATE operations that cover multiple tables: UPDATE items,month SET items.price=month.price WHERE items.id=month.id; So it is even newer than 4.0.1 -Original Message- From: Andrew McCombe [mailto:[EMAIL PROTECTED] Sent: 1. júlí 2003 23:33 To: [EMAIL PROTECTED] Subject: Re: [PHP] need help w/ sql query - update and select at once > Theoretically, you should be able to do a multi-table update since MYSQL > 3.23, like this: > > UPDATE tablename, tablename2 SET tablename.field1 = 'yes' WHERE > tablename.userid = tablename2.userid; > > I haven't tested it, though. > Sorry, no you can't do this in 3.23.*. MySQL > 4.01 supports this. Regards Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] have some free time?
You need to return $x out of the function. So do this: function hello() { print 'hello ' . $name; $x = 1; return ($x); } etc Then call it assigned to a variable: $x = hello(); echo $x; bye(); Kyle Babich wrote: I think this is short example of my problem... $name = 'kyle'; function hello() { print 'hello ' . $name; $x = 1; } function bye() { if ($x == 1) print 'x = 1'; else print 'x != 1'; } hello(); bye(); ?> Right now this returns: hello x != 1 What do I have to do to get bye() to return 'x = 1'? I tried declaring the x = 1 in hello() global and I tried declaring it static. On Tue, 01 Jul 2003 17:27:48 -0500, "Kyle Babich" <[EMAIL PROTECTED]> said: Any php programmers out there have a little free time? I've been trying to find the bug in my logging system forever and I've all but given up. If anyone else wants to try their luck then... http://babich.us/log/source/log.php.txt http://babich.us/log/source/config.inc.php.txt http://babich.us/log/source/test.php.txt http://babich.us/log/source/clearLogs.inc.php.txt http://babich.us/log/source/logIpData.inc.php.txt http://babich.us/log/source/logAgentData.inc.php.txt http://babich.us/log/source/logLangData.inc.php.txt I have a feeling that it is an obvious, simple error that I am missing. Anyway, back to the bug hunting... -- Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] states
> Does anyone know of any built in functions or options for the US states? > I want to make a drop down menu and some other things which have the 50 > states in it. Is there any shortcut for this with PHP, or do I need to > do it all manually in HTML? Please let me know. Thanks. Here's one: http://px.sklar.com/code.html?id=164 Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] states
> Does anyone know of any built in functions or options for the US states? > I want to make a drop down menu and some other things which have the 50 > states in it. Is there any shortcut for this with PHP, or do I need to > do it all manually in HTML? Please let me know. Thanks. > > Matt Hi Matt, Short answer - No. PHP Doesn't have ant short function to generate drop down lists or menus. Your best bet is to look at http://www.webreference.com/dhtml/hiermenus/ and build your HM_Arrays.js from scratch (or 'borrow' the select box from other sites.) Regards Andrew ps. as a European, I get very annoyed with the number of websites that ask for address details and then only give State/County/Area options for US states. I know the U.S.A is big - but the rest of the world is bigger. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] web site security: how to hide login info for mysql-connection
I played around with this, but couldn't get this to work in my httpd.conf: php_value disable_functions phpinfo Not sure why. I did discover, however, that the username and password will no show up in phpinfo UNLESS phpinfo() is called from within the directory, in our example that would be /var/www/html/mydatabase. That would mean that in order for someone to get the user/pass, they would have to write a php script into my directory. Any more thoughts? This seems very appealing to me. Thanks, Peter Janett New Media One Web Services, LLC http://www.newmediaone.net [EMAIL PROTECTED] (303)828-9882 -Original Message- From: Derick Rethans [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2003 2:59 PM To: Wendell Brown Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] web site security: how to hide login info for mysql-connection On Mon, 30 Jun 2003, Wendell Brown wrote: > On Mon, 30 Jun 2003 13:50:21 -0600, Peter Janett wrote: > > > > > php_value mysql.default_user fred > > php_value mysql.default_password secret > > php_value mysql.default_host server.example.com > > > > H what about phpinfo()? It shows those settings in the clear. php_value disable_functions phpinfo Derick -- "Interpreting what the GPL actually means is a job best left to those that read the future by examining animal entrails." - Derick Rethans http://derickrethans.nl/ International PHP Magazine http://php-mag.net/ - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] have some free time?
I think this is short example of my problem... Right now this returns: hello x != 1 What do I have to do to get bye() to return 'x = 1'? I tried declaring the x = 1 in hello() global and I tried declaring it static. On Tue, 01 Jul 2003 17:27:48 -0500, "Kyle Babich" <[EMAIL PROTECTED]> said: > Any php programmers out there have a little free time? I've been trying > to find the bug in my logging system forever and I've all but given up. > If anyone else wants to try their luck then... > > http://babich.us/log/source/log.php.txt > http://babich.us/log/source/config.inc.php.txt > http://babich.us/log/source/test.php.txt > http://babich.us/log/source/clearLogs.inc.php.txt > http://babich.us/log/source/logIpData.inc.php.txt > http://babich.us/log/source/logAgentData.inc.php.txt > http://babich.us/log/source/logLangData.inc.php.txt > > I have a feeling that it is an obvious, simple error that I am missing. > Anyway, back to the bug hunting... > -- > Kyle > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how can I logout autamaitcally (using session)
Thanks a lot. Ye, I am using Apache. So how can I set when the session expires? I should just set the "session.gc_maxlifetime" item in php.ini file or I should write my program? thanks!! - Original Message - From: "Kris Yates" <[EMAIL PROTECTED]> To: "sunwei" <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 2:30 PM Subject: Re: [PHP] how can I logout autamaitcally (using session) > I presume you are running Apache. Apache cannot detect a browser > closing. The user would have to click a logout button, which would > execute session destroy or whatever and redirect them to another page. > That is what I do. My server is set to expire sessions after one hour. > So, if a user just closes the browser, it will eventually be deleted > automatically by Apache. > > HTH > > Kris > > sunwei wrote: > > >when the user close all the IE windows, should the session be destroyed > >autamatically? > >it seems in my website, the session is not destroyed autamatically, so that other > >people > >open the IE and see that he can access the website without logging in. so what I > >should do? > > > >thanks a lot for any help or suggestion. > > > >wei sun > > > > > >
RE: [PHP] how can I logout autamaitcally (using session)
Did you even read the docs on sessions? http://us4.php.net/manual/en/function.session-destroy.php http://us4.php.net/manual/en/function.session-unset.php http://us4.php.net/manual/en/function.session-unregister.php *sigh* Please people, think and at least do the simplest of searching on the site before firing off an email to 10,000 people on this list. > -Original Message- > From: sunwei [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 01, 2003 2:13 PM > To: [EMAIL PROTECTED] > Subject: [PHP] how can I logout autamaitcally (using session) > > > when the user close all the IE windows, should the session be > destroyed autamatically? > it seems in my website, the session is not destroyed > autamatically, so that other people > open the IE and see that he can access the website without > logging in. so what I should do? > > thanks a lot for any help or suggestion. > > wei sun > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] states
Does anyone know of any built in functions or options for the US states? I want to make a drop down menu and some other things which have the 50 states in it. Is there any shortcut for this with PHP, or do I need to do it all manually in HTML? Please let me know. Thanks. Matt
Re: [PHP] Minimizing Database Hits
> I wrote class that contains a function that retrieves users shopping > cart items from database and then returns an array with qty, item number > , item name, etc. > > So now whenever I want to retrieve the users cart I use the following: > > $cart_contents = $cart->get_cart_contents(); > > I then iterate through $cart_contents to display info. Now I am trying > to minimize the number of hits to the database so my question is, am I > querying the database every time I call on $cart_contents? One way of doing this is to store the shopping cart as session data and using a class to read the session rather than the DB. Doing it this way means that the DB is only accessed before the shopper puts the item in their cart. Once it's there, the sesion holds the data and the DB load is reduced. We use this system in many of our sites. Regards Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Minimizing Database Hits
Only if your code is calling the database...if $cart_contents is set on the page and you call the var $car_contents over and over then no...the initialization of the var is the only time if it is called in get_cart_contents()... -- BigDog On Tue, 2003-07-01 at 16:41, Ralph wrote: > I wrote class that contains a function that retrieves users shopping > cart items from database and then returns an array with qty, item number > , item name, etc. > > So now whenever I want to retrieve the users cart I use the following: > > $cart_contents = $cart->get_cart_contents(); > > I then iterate through $cart_contents to display info. Now I am trying > to minimize the number of hits to the database so my question is, am I > querying the database every time I call on $cart_contents? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Rotating text
What would the best way to rotate text 90 degrees? Using php's image generator? Some fancy HTML I don't know about? Or something else? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Minimizing Database Hits
I wrote class that contains a function that retrieves users shopping cart items from database and then returns an array with qty, item number , item name, etc. So now whenever I want to retrieve the users cart I use the following: $cart_contents = $cart->get_cart_contents(); I then iterate through $cart_contents to display info. Now I am trying to minimize the number of hits to the database so my question is, am I querying the database every time I call on $cart_contents? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Validating XML strings
As of now i dont think that DOMXML functions support the validation of dtds or schemas...I have been looking for the past couple of days and did not find anything... I have not verified the xml extension for it but i doubt that that option is there either... -- BigDog On Tue, 2003-07-01 at 14:00, Moore, Christie wrote: > I am parsing an xml string using the DOM package in php. Is there > anyway to validate the xml string against a schema or a dtd with DOM. I > know it is still experimental but I didn't know if something like that > existed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] have some free time?
Any php programmers out there have a little free time? I've been trying to find the bug in my logging system forever and I've all but given up. If anyone else wants to try their luck then... http://babich.us/log/source/log.php.txt http://babich.us/log/source/config.inc.php.txt http://babich.us/log/source/test.php.txt http://babich.us/log/source/clearLogs.inc.php.txt http://babich.us/log/source/logIpData.inc.php.txt http://babich.us/log/source/logAgentData.inc.php.txt http://babich.us/log/source/logLangData.inc.php.txt I have a feeling that it is an obvious, simple error that I am missing. Anyway, back to the bug hunting... -- Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .inc.php
|- Original Message - |From: "Kyle Babich" <[EMAIL PROTECTED]> |To: "PHP-General" <[EMAIL PROTECTED]> |Sent: Tuesday, July 01, 2003 3:38 PM |Subject: [PHP] .inc.php | | |> When .inc.php files are included they are also executed whenever the |> script is executed right? |> -- |> Kyle |> On Jul 1, 2003, "Suhas Pharkute" claimed that: |it not because of extension .php |it is because of start and end tags |you can have a file .abc with php tags and it will work | |I have it working on my server | |Suhas | -- php.net (http://www.php.net/include/) quoth "When a file is included, parsing drops out of PHP mode and into HTML mode at the beginning of the target file, and resumes again at the end. For this reason, any code inside the target file which should be executed as PHP code must be enclosed within valid PHP start and end tags." -- Registered Linux user #304026. "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import" Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parsing fgetcsv using tab (\t)
On Jul 1, 2003, "Chris" claimed that: |I'm trying to create an form where the user can upload a datafile to the |server. The datafile will be txt or csv and contain multiple records. I |would like the user to supply the field delimiter like (,) comma , (\t) |tab or something else. The data records are then parsed using fgetcsv. | |The problem I'm having is trying to recover the tab character from the |form post. If I print out what is received from my form I see the |following \\t. I realize that the addition of the extra slash is |expected, but what I don't know how to do is prepair this varable to use |it in my fgetcsv argument. | |I've tried using stripslash but nothing seems to work for me. | |Strangely, if is set a variable in my processing script like: | |$field_terminater = "\t"; | |Then supply this to: $newRecord = fgetcsv($f, $size,$field_terminater) |everything works fine. If I use the variable passed from my form the |records are not getting parsed. | |Any suggestions would be appreciated. |Chris | [Not PHP] Hard code the choices using radio buttons or a select on the form. There shouldn't be too many commonly used delimiters, and those that use uncommon delimiters will have to adjust. [/Not PHP] Then, use the value submitted to choose the delimiter in the php script. Jeff -- Registered Linux user #304026. "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import" Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .inc.php
it not because of extension .php it is because of start and end tags you can have a file .abc with php tags and it will work I have it working on my server Suhas - Original Message - From: "Kyle Babich" <[EMAIL PROTECTED]> To: "PHP-General" <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 3:38 PM Subject: [PHP] .inc.php > When .inc.php files are included they are also executed whenever the > script is executed right? > -- > Kyle > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Nested mysql_query()'s
Problem was a fat-finger - meant 'bid' not 'bids'... Doh!!! Sparky - Thanks again. - Original Message - From: "Shena Delian O'Brien" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 16:01 Subject: [PHP] Re: Nested mysql_query()'s > Sparky Kopetzky wrote: > > Hi! > > > > I've got two nested queries where one looks up data based on values returned from the first. > > > > $lot_query = "SELECT * FROM LOT WHERE lot_category_id=" . $lot_category . > > " AND lot_close_time>" . time(); > > $lot_result = mysql_query($lot_query, $CONNECT_ID); > > > > if ($lot_result) > > { > > while ($row = mysql_fetch_array($lot_result)) > > { > > blah-blah-blah... > > > > $bid_query = "select * from bids where bid_lot_id=" . $lot_id . > > " order by bid_amount"; > > $bid_result = mysql_query($bid_query, $CONNECT_ID); > > $bid_count = mysql_num_rows($bid_result); > > > > blah-blah-blah... > > > > I get this error message: "Warning: mysql_num_rows(): supplied > > argument is not a valid MySQL result resource " from the second > > query. Do I need a second $CONNECT_ID for a second link to > mysql_query #2?? > > No... you don't even need to use a connect ID. It should work fine if > you just use mysql_query($bid_query) > > The problem is likely that the query is failing for some reason and thus > not generating a proper result. Do an echo mysql_error($CONNECT_ID) to > figure out if there's an error in your syntax, etc. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Nested mysql_query()'s
Sparky Kopetzky wrote: Hi! I've got two nested queries where one looks up data based on values returned from the first. $lot_query = "SELECT * FROM LOT WHERE lot_category_id=" . $lot_category . " AND lot_close_time>" . time(); $lot_result = mysql_query($lot_query, $CONNECT_ID); if ($lot_result) { while ($row = mysql_fetch_array($lot_result)) { blah-blah-blah... $bid_query = "select * from bids where bid_lot_id=" . $lot_id . " order by bid_amount"; $bid_result = mysql_query($bid_query, $CONNECT_ID); $bid_count = mysql_num_rows($bid_result); blah-blah-blah... I get this error message: "Warning: mysql_num_rows(): supplied > argument is not a valid MySQL result resource " from the second > query. Do I need a second $CONNECT_ID for a second link to mysql_query #2?? No... you don't even need to use a connect ID. It should work fine if you just use mysql_query($bid_query) The problem is likely that the query is failing for some reason and thus not generating a proper result. Do an echo mysql_error($CONNECT_ID) to figure out if there's an error in your syntax, etc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Nested mysql_query()'s
No need for another connect as long as selecting from same server as the same user. Perhaps there are no bids for some of the lot_id's? Perhaps you do not care that there are bids returned and want to shut mysql_num_rows up by prepending the @ sign in front of it. Like @mysql_num_rows($bid_result) James On Tuesday 01 July 2003 05:53 pm, Sparky Kopetzky wrote: > Hi! > > I've got two nested queries where one looks up data based on values > returned from the first. > > $lot_query = "SELECT * FROM LOT WHERE lot_category_id=" . $lot_category > . " AND lot_close_time>" . time(); > $lot_result = mysql_query($lot_query, $CONNECT_ID); > > if ($lot_result) > { > while ($row = mysql_fetch_array($lot_result)) > { > blah-blah-blah... > > $bid_query = "select * from bids where bid_lot_id=" . $lot_id . > " order by bid_amount"; > $bid_result = mysql_query($bid_query, $CONNECT_ID); > $bid_count = mysql_num_rows($bid_result); > > blah-blah-blah... > > I get this error message: "Warning: mysql_num_rows(): supplied argument is > not a valid MySQL result resource " from the second query. Do I need a > second $CONNECT_ID for a second link to mysql_query #2?? > > Robin E. Kopetzky > Black Mesa Computers/Internet Services > www.blackmesa-isp.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Nested mysql_query()'s
Hi! I've got two nested queries where one looks up data based on values returned from the first. $lot_query = "SELECT * FROM LOT WHERE lot_category_id=" . $lot_category . " AND lot_close_time>" . time(); $lot_result = mysql_query($lot_query, $CONNECT_ID); if ($lot_result) { while ($row = mysql_fetch_array($lot_result)) { blah-blah-blah... $bid_query = "select * from bids where bid_lot_id=" . $lot_id . " order by bid_amount"; $bid_result = mysql_query($bid_query, $CONNECT_ID); $bid_count = mysql_num_rows($bid_result); blah-blah-blah... I get this error message: "Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource " from the second query. Do I need a second $CONNECT_ID for a second link to mysql_query #2?? Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net
Re: [PHP] .inc.php
And when functions are defined in *.inc.php they can be executed in the main program? (I just finished writing a logging system and php isn't giving me any errors so I'm trying to figure out what is gong wrong.) On 01 Jul 2003 17:43:16 -0400, "Yann Larrivee" <[EMAIL PROTECTED]> said: > Yes beacause the real extension is .php > > > On Tue, 2003-07-01 at 17:38, Kyle Babich wrote: > > When .inc.php files are included they are also executed whenever the > > script is executed right? > > -- > > Kyle > -- > Yann Larrivee <[EMAIL PROTECTED]> > > -- Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .inc.php
Yes beacause the real extension is .php On Tue, 2003-07-01 at 17:38, Kyle Babich wrote: > When .inc.php files are included they are also executed whenever the > script is executed right? > -- > Kyle -- Yann Larrivee <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .inc.php
When .inc.php files are included they are also executed whenever the script is executed right? -- Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how can I logout autamaitcally (using session)
when the user close all the IE windows, should the session be destroyed autamatically? it seems in my website, the session is not destroyed autamatically, so that other people open the IE and see that he can access the website without logging in. so what I should do? thanks a lot for any help or suggestion. wei sun
RE: [PHP] need help w/ sql query - update and select at once
Theoretically, you should be able to do a multi-table update since MYSQL 3.23, like this: UPDATE tablename, tablename2 SET tablename.field1 = 'yes' WHERE tablename.userid = tablename2.userid; I haven't tested it, though. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 1. júlí 2003 02:33 To: [EMAIL PROTECTED] Subject: [PHP] need help w/ sql query - update and select at once hi i'm trying to get this sql query to work, i'm trying to update and select at the same time, i'm not even sure if this is even possible update db.tablename set field1='yes' where (select * from db.tablename,db.tablename2 where db.tablename.userid=db.tablename2.userid); basically i have a column called 'userid'. this column exists in both tablename, and tablename2. where the value of userid in tablename is equal to the value of userid in tablename2, i'd like to set the value of field1 to 'yes'. can this be done from the command line? or am i better off writing another php page to accomplish this? thanks again redmond -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] File upload: type and size question
http://is.php.net/manual/en/features.file-upload.php There you can see how to use the $_FILES autoglobals ($HTTP_POST_FILES in php versions prior 4.1.0) to get the size of the uploaded file in bytes. So, for example, you can do this before saving the uploaded file: if($_FILES['userfile']['size'] > $maxsize){ echo "Error. The file was to large. Max file size is $maxsize."; } -Original Message- From: Dani Matielo [mailto:[EMAIL PROTECTED] Sent: 1. júlí 2003 14:25 To: [EMAIL PROTECTED] Subject: [PHP] File upload: type and size question Hello, could someone help me? I am trying to limit the type and size of the files to be uploaded, but I can't find how to do this. I have seen examples on how to limit to image types, with the MIME function. The problem is, the type of file I want is audio, extensions MP3 or WAV. The max file size should be 150Kb. Thank you for your help! :)) Dani --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.488 / Virus Database: 287 - Release Date: 5/6/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP application using gettext
Hi , i have been looking for php web application that uses the Gettext extension to facilitate the translation. However i did not really find any. Anybody as good example of application that uses it and an explanation why people don't use it other then the fact that you need the extension to be installed on the server in order for people to use your application . Thanks -- Yann Larrivee <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parsing fgetcsv using tab (\t)
I'm trying to create an form where the user can upload a datafile to the server. The datafile will be txt or csv and contain multiple records. I would like the user to supply the field delimiter like (,) comma , (\t) tab or something else. The data records are then parsed using fgetcsv. The problem I'm having is trying to recover the tab character from the form post. If I print out what is received from my form I see the following \\t. I realize that the addition of the extra slash is expected, but what I don't know how to do is prepair this varable to use it in my fgetcsv argument. I've tried using stripslash but nothing seems to work for me. Strangely, if is set a variable in my processing script like: $field_terminater = "\t"; Then supply this to: $newRecord = fgetcsv($f, $size,$field_terminater) everything works fine. If I use the variable passed from my form the records are not getting parsed. Any suggestions would be appreciated. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Subtracting dates in php
Try : Difference between two dates (i.e. between today and a date in future). The program is based on php-timestamp, but in your browser you see the usual dates(i.e.: dd.mm.) http://examples.weberdev.com/get_example.php3?count=3240 Find the Difference between today's date and a future day. http://examples.weberdev.com/get_example.php3?count=3198 how can I output the difference between two dates? http://examples.weberdev.com/get_example.php3?count=95 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Mike Mannakee [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 7:22 AM To: [EMAIL PROTECTED] Subject: [PHP] Subtracting dates in php Anyone know of an easy way to add or subtract dates in php the way you can in mysql? Easier, that is, than coding the logic by hand? This seems like a total pain. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Validating XML strings
I am parsing an xml string using the DOM package in php. Is there anyway to validate the xml string against a schema or a dtd with DOM. I know it is still experimental but I didn't know if something like that existed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file pointer
On Tue, 01 Jul 2003 10:59:53 -0500, Kyle Babich wrote: >How would I set the file pointer to the very end of the last line of the >file? Assuming you are trying to append to the file you can do the following (open output append): $fHandle = fopen( "file.txt", "a" ); or you can fopen the file in read mode (or whatever) and then do an fseek... $fHandle = fopen( "file.txt", "r" ); fseek( $fHandle, 0, SEEK_END ); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Zend
Hello, On 07/01/2003 02:27 AM, Gladk wrote: Can anybody give me direct link for downloading Zend Optimizer. I tried to do it a lot of times from the official site, but after accepting agreement nothing happens Maybe Zend site has some alergy to your browser or vice-versa. :-) BTW, if you are looking for optimizers, you may want to try also Turck. This is an all in one Open Source PHP extension, that not only does PHP code optimizing like Zend Optimizer but also does code caching, code encoding, content caching, session handling in shared memory, etc... All good things that help to make your site fly: http://www.turcksoft.com/en/e_mmc.htm -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sharing Cookies with Java?
Can php share cookies with java servlets? Specifically, can php use cookies written by a java servlet? -- Jiann-Ming Su [EMAIL PROTECTED] 404-712-2603 Development Team Systems Administrator General Libraries Systems Division -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array_intersect()
Is this function still broken in php 4.3.0+? The manual says it was broken in PHP 4.0.4. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Zend
I just went here...accepted and it began downloading.. http://www.zend.com/store/getfreefile.php?pid=13&zbid=550 -Original Message- From: Gladk [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 1:45 PM To: [EMAIL PROTECTED] Subject: [PHP] Zend Hi ALL! Sorry I repeat the question, but novody answered.. Can anybody give me direct link for downloading Zend Optimizer. I tried to do it a lot of times from the official site, but after accepting agreement nothing happens. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Class not working after PHP 4.2.3
It would probably be much easier to help you if you just stated exactly what data was being fed to mail() when it fails (try to make a simple case). In fact, just determining that might help you determine if the problem actually has anything to do with mail(), or something else in the code. Jeremy Mário_Gamito <[EMAIL PROTECTED]> wrote: Hi, I have this class for sending mail, which worked until PHP 4.2.3 Since 4.3.0 it stops functioning. No error message. The mail is simply not send. I've searched everywhere and found no explanation for this behaviour. Any help would be appreciated. Warm regards, Mário Gamito
FW: [PHP] PHP5 - Bugs
-Original Message- From: Michael A Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 1:40 PM To: Jay Blanchard Subject: RE: [PHP] PHP5 - Bugs I'm running on a RH9 box with Apache2. Going to pages that include the PEAR::DB file throw DNS errors, but much simpler pages do not seem to... -Michael On Tue, 2003-07-01 at 09:41, Jay Blanchard wrote: > [snip] > Can't figure this out... whenever I try to use any mysql functions or > anything, I get problems. PHP throws a DNS error... what's up with that? > [/snip] > > Hey, > > Give us some more information and we might be able to start helping you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reg Ex to search for both Integer and Comma-spaced Integer
- Original Message - From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]> To: "'Kevin Stone'" <[EMAIL PROTECTED]>; "PHP-General" <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 12:19 PM Subject: RE: [PHP] Reg Ex to search for both Integer and Comma-spaced Integer > > -Original Message- > > From: Kevin Stone [mailto:[EMAIL PROTECTED] > > Sent: 01 July 2003 18:07 > > > > $string = "Mark's average score was 544."; > > preg_match("/average score was ([0-9]+)/", $string, $matches); > > $score = $matches(1); > > > > $string = "Julie's average score was 10,443."; > > preg_match("/average score was ([0-9]+,[0-9]+)/", $string, $matches); > > $score = $matches(1); > > > > How do I combine these two queries so that the reg-ex matches > > both the comma > > spaced integer and regular integer? > > preg_match("/average score was ([0-9]+(,[0-9]+)*)/", $string, $matches); > > should do it. > > Cheers! > > Mike Excelent thinking Mike that's exactly the result I was after. Thanks! - Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Reg Ex to search for both Integer and Comma-spaced Integer
> -Original Message- > From: Kevin Stone [mailto:[EMAIL PROTECTED] > Sent: 01 July 2003 18:07 > > $string = "Mark's average score was 544."; > preg_match("/average score was ([0-9]+)/", $string, $matches); > $score = $matches(1); > > $string = "Julie's average score was 10,443."; > preg_match("/average score was ([0-9]+,[0-9]+)/", $string, $matches); > $score = $matches(1); > > How do I combine these two queries so that the reg-ex matches > both the comma > spaced integer and regular integer? preg_match("/average score was ([0-9]+(,[0-9]+)*)/", $string, $matches); should do it. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reg Ex to search for both Integer and Comma-spaced Integer
On Wednesday 02 July 2003 01:07, Kevin Stone wrote: You have started a new thread by taking an existing posting and replying to it while you changed the subject. That is bad, because it breaks threading. Whenever you reply to a message, your mail client generates a "References:" header that tells all recipients which posting(s) your posting refers to. A mail client uses this information to build a threaded view ("tree view") of the postings. With your posting style you successfully torpedoed this useful feature; your posting shows up within an existing thread it has nothing to do with. Always do a fresh post when you want to start a new thread. To achieve this, click on "New message" instead of "Reply" within your mail client, and enter the list address as the recipient. You can save the list address in your address book for convenience. > I'm a little confused by something. I need to build a reg-ex to scrape for > both plain integers and comma spaced integers in the same place in the same > string at the same time. For example.. [snip] -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I am just a nice, clean-cut Mongolian boy. -- Yul Brynner, 1956 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Class not working after PHP 4.2.3
Hi, I have this class for sending mail, which worked until PHP 4.2.3 Since 4.3.0 it stops functioning. No error message. The mail is simply not send. I've searched everywhere and found no explanation for this behaviour. Any help would be appreciated. Warm regards, Mário Gamito class html_mime_mail{ var $mime; var $html; var $body; var $do_html; var $multipart; var $html_text; var $html_images; var $headers; var $parts; var $charset; var $charsetlist; /*** ** Constructor function. Sets the headers ** if supplied. ***/ function html_mime_mail($headers = ''){ $this->html_images = array(); $this->headers = array(); $this->parts = array(); $this->charsetlist = array('iso' => 'us-ascii', 'big5' => 'big5', 'gb' => 'gb2312'); $this->charset = 'us-ascii'; if($headers == '') return TRUE; if(is_string($headers)) $headers = explode("\n", trim($headers)); for($i=0; $i if(is_array($headers[$i])) for($j=0; $jheaders[] = $headers[$i][$j]; if($headers[$i] != '') $this->headers[] = $headers[$i]; } } /*** ** Accessor function to set the body text. ** Body text is used if it's not an html ** mail being sent. ***/ function set_body($text = ''){ if(is_string($text)){ $this->body = $text; return TRUE; } return FALSE; } /*** ** Accessor function to return the mime ** class variable. Purely for debug. ***/ function get_mime(){ if(!isset($this->mime)) $this->mime = ''; return $this->mime; } /*** ** Function to set a header. Shouldn't ** really be necessary as you could use ** the constructor and send functions, ** it's here nonetheless. Takes any number ** of arguments, which can be either ** strings or arrays full of strings. ** this function is php4 only and will ** return false otherwise. Will return ** true upon finishing. ***/ function add_header(){ if((int)phpversion() < 4) return FALSE; $args = func_get_args(); for($i=0; $i if(is_array($args[$i])) for($j=0; $jheaders[] = $args[$i][$j]; if($args[$i] != '') $this->headers[] = $args[$i]; } return TRUE; } /*** ** Accessor function to set the content charset. ** Matt add 2000/10/19 ***/ function set_charset($charset = '', $raw = FALSE){ if($raw == TRUE){ $this->charset = $charset; return TRUE; } if(is_string($charset)){ while(list($k,$v) = each($this->charsetlist)){ if($k == $charset){ $this->charset = $v; return TRUE; } } } return FALSE; } /*** ** Adds a html part to the mail. ** Also replaces image names with ** content-id's. ***/ function add_html($html, $text){ $this->do_html = 1; $this->html = $html; $this->html_text = $text; if(is_array($this->html_images) AND count($this->html_images) > 0){ for($i=0; $ihtml_images); $i++) $this->html = ereg_replace($this->html_images[$i]['name'], 'cid:'.$this->html_images[$i]['cid'], $this->html); } } /*** ** Builds html part of email. ***/ function build_html($orig_boundary){ $sec_boundary = '=_'.md5(uniqid(time())); $thr_boundary = '=_'.md5(uniqid(time())); if(count($this->html_images) == 0){ $this->multipart.= '--'.$orig_boundary."\n"; $this->multipart.= 'Content-Type: multipart/alternative;'.chr(10).chr(9).'boundary="'.$sec_boundary."\"\n\n\n"; $this->multipart.= '--'.$sec_boundary."\n"; $this->multipart.= 'Content-Type: text/plain; cha
Re: [PHP] Problems compiling PHP 5.0.0b1
Humm from what i remember ( i saw a snap that did not work with dom about last week). In the help there was a not about dom5 i compiled with dom5 and it worked for me. But now in the latest snap dom5 option is gone. But compiling php with dom support works well. So try to compile --with-dom5 (if the option is there) On Tue, 2003-07-01 at 13:11, Mauricio Cuenca wrote: > Hello, > > I've tried several times compiling PHP 5.0.0b1 on a Linux RedHat 8.0 using > this configure command: > ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5 > > And I get the following error: > configure: error: libxml2 version 2.5.1 or greater required. > > Then, I downloaded and compiled libxml 2.5.7 and the same error appears. > > I've compiled several diffrent versions of PHP before without problems. Has > anyone had a similar problem ? > > TIA, > > _ > Mauricio Cuenca -- Yann Larrivee <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Zend
Hi ALL! Sorry I repeat the question, but novody answered.. Can anybody give me direct link for downloading Zend Optimizer. I tried to do it a lot of times from the official site, but after accepting agreement nothing happens. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP5 - Bugs
[snip] Can't figure this out... whenever I try to use any mysql functions or anything, I get problems. PHP throws a DNS error... what's up with that? [/snip] Hey, Give us some more information and we might be able to start helping you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP5 - Bugs
Which platform are you running on? Marco On Tue, 2003-07-01 at 13:39, Michael A Smith wrote: > Hey, > > Can't figure this out... whenever I try to use any mysql functions or > anything, I get problems. PHP throws a DNS error... what's up with that? > > -Michael -- Marco Tabini President Marco Tabini & Associates, Inc. 28 Bombay Avenue Toronto, ON M3H 1B7 Canada Phone: (416) 630-6202 Fax: (416) 630-5057 Web: http://www.tabini.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP5 - Bugs
Hey, Can't figure this out... whenever I try to use any mysql functions or anything, I get problems. PHP throws a DNS error... what's up with that? -Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Email troubles
Looks like your SMTP server needs for your to authenticate first. -->Jonathan I made a discovery today. I found a computer. Wait a second, this is cool. It does what I want it to. If it makes a mistake, it's because I screwed it up. Not because it doesn't like me... Or feels threatened by me... Or thinks I'm a smart ass... Or doesn't like teaching and shouldn't be here... -Original Message- From: Sparky Kopetzky [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2003 5:31 PM To: PHP General Subject: [PHP] Email troubles I'm getting this error while sending email with mail(): Warning: mail(): SMTP server response: 550 5.7.1 <[EMAIL PROTECTED]>... Relaying denied in (path to my program) How do I turn relaying on?? Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems compiling PHP 5.0.0b1
If you installed libxml2 from source--rather than from RPM--chances are that it's been installed in a folder other than the system library directory (/usr/lib). It's probably in /usr/local/lib instead. So you can do one of two things: either reconfigure libxml2 specifying --prefix=/usr or reconfigure PHP --with-libxml-dir= and your actual libxml2 installation path. Cheers, Marco On Tue, 2003-07-01 at 13:11, Mauricio Cuenca wrote: > Hello, > > I've tried several times compiling PHP 5.0.0b1 on a Linux RedHat 8.0 using > this configure command: > ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5 > > And I get the following error: > configure: error: libxml2 version 2.5.1 or greater required. > > Then, I downloaded and compiled libxml 2.5.7 and the same error appears. > > I've compiled several diffrent versions of PHP before without problems. Has > anyone had a similar problem ? > > TIA, > > _ > Mauricio Cuenca -- Marco Tabini President Marco Tabini & Associates, Inc. 28 Bombay Avenue Toronto, ON M3H 1B7 Canada Phone: (416) 630-6202 Fax: (416) 630-5057 Web: http://www.tabini.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem working with sockets
Hello all! I'm having problems getting the below working. I'm actually trying to get a telnet socket connection working but I figured that getting it to talk a web server would suite the same purpose to begin with. Any ideas why it stops right after the comment "Getting welcome banner stuff"? Thanks, John Cole -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems compiling PHP 5.0.0b1
If you didn't install the RPM of the libxml higher then 2.5.1, I would assume there's a configure line like --with-libxml=/path or something similar to that you have to specify where you installed it when you compiled it. On Tue, 2003-07-01 at 13:11, Mauricio Cuenca wrote: > Hello, > > I've tried several times compiling PHP 5.0.0b1 on a Linux RedHat 8.0 using > this configure command: > ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5 > > And I get the following error: > configure: error: libxml2 version 2.5.1 or greater required. > > Then, I downloaded and compiled libxml 2.5.7 and the same error appears. > > I've compiled several diffrent versions of PHP before without problems. Has > anyone had a similar problem ? > > TIA, > > _ > Mauricio Cuenca -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems compiling PHP 5.0.0b1
Hello, I've tried several times compiling PHP 5.0.0b1 on a Linux RedHat 8.0 using this configure command: ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5 And I get the following error: configure: error: libxml2 version 2.5.1 or greater required. Then, I downloaded and compiled libxml 2.5.7 and the same error appears. I've compiled several diffrent versions of PHP before without problems. Has anyone had a similar problem ? TIA, _ Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-general as REPLY TO
oops - maybe i should have kept my big mouth shut! ha. anyway, it doesn't look like it's going to change. >php_thread --end "php-general as REPLY TO" Mark wrote: But that would not solve the problem being discussed. None of the webmail services that I've tried have a "reply-to-list" feature. --- Jim Lucas <[EMAIL PROTECTED]> wrote: You could signup with a company like yahoo.com or hotmail or bend.com and you could then have a web based email service. You ALWAYS have choices... :) Jim Lucas - Original Message - From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]> To: "'Derick Rethans'" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, July 01, 2003 3:08 AM Subject: RE: [PHP] php-general as REPLY TO -Original Message- From: Derick Rethans [mailto:[EMAIL PROTECTED] Sent: 30 June 2003 22:47 On Mon, 30 Jun 2003, Doug Essinger-Hileman wrote: Having said this, I suspect that you and I will continue to disagree, which is perfectly okay. If this list changes the default I will be happy. If it doesn't, I will learn to adjust. One request I make is that folk, including you, Derick, refrain from sending replies to my email to both the list *and* my personal inbox. There's no need to waste the bandwidth. You'll have to learn to adjust then I guess. And do those 2k really matter? Come on... Just get a good mailer that defaults to "Reply-All" (like, mutt, pine, pcpine) Some of us don't have the choice -- we work in a corporate or institutional environment where the decision is made centrally. (Hence M$ Outlook 98 here!!!) Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Reg Ex to search for both Integer and Comma-spaced Integer
I'm a little confused by something. I need to build a reg-ex to scrape for both plain integers and comma spaced integers in the same place in the same string at the same time. For example.. $string = "Mark's average score was 544."; preg_match("/average score was ([0-9]+)/", $string, $matches); $score = $matches(1); $string = "Julie's average score was 10,443."; preg_match("/average score was ([0-9]+,[0-9]+)/", $string, $matches); $score = $matches(1); How do I combine these two queries so that the reg-ex matches both the comma spaced integer and regular integer? Thanks! - Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-general as REPLY TO
But that would not solve the problem being discussed. None of the webmail services that I've tried have a "reply-to-list" feature. --- Jim Lucas <[EMAIL PROTECTED]> wrote: > You could signup with a company like yahoo.com or hotmail or > bend.com and > you could then have a web based email service. > > You ALWAYS have choices... :) > > Jim Lucas > - Original Message - > From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]> > To: "'Derick Rethans'" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, July 01, 2003 3:08 AM > Subject: RE: [PHP] php-general as REPLY TO > > > > > -Original Message- > > > From: Derick Rethans [mailto:[EMAIL PROTECTED] > > > Sent: 30 June 2003 22:47 > > > > > > On Mon, 30 Jun 2003, Doug Essinger-Hileman wrote: > > > > > > > Having said this, I suspect that you and I will continue to > > > disagree, > > > > which is perfectly okay. If this list changes the default I > will be > > > > happy. If it doesn't, I will learn to adjust. One request I > make is > > > > that folk, including you, Derick, refrain from sending > > > replies to my > > > > email to both the list *and* my personal inbox. There's no > need to > > > > waste the bandwidth. > > > > > > You'll have to learn to adjust then I guess. And do those 2k > really > > > matter? Come on... Just get a good mailer that defaults to > > > "Reply-All" > > > (like, mutt, pine, pcpine) > > > > Some of us don't have the choice -- we work in a corporate or > institutional environment where the decision is made centrally. > (Hence M$ > Outlook 98 here!!!) > > > > Cheers! > > > > Mike > > > > > - > > Mike Ford, Electronic Information Services Adviser, > > Learning Support Services, Learning & Information Services, > > JG125, James Graham Building, Leeds Metropolitan University, > > Beckett Park, LEEDS, LS6 3QS, United Kingdom > > Email: [EMAIL PROTECTED] > > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file pointer
$data = file('c:\blah.txt'); $lineyouwant = $data[(count($data)-1)]; Not necessarily most efficient, but it works. > At 10:59 AM 7/1/2003 -0500, Kyle Babich wrote: > >How would I set the file pointer to the very end of the last line of the > >file? > > > >ex. ahkjhff > >asdjfhlkajf > >sdfhaksljdh > >kasjdhkjlfh > >asdjfhklajs > >askjdhjfdjf//here > > > >Thanks, > >-- > >Kyle > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file pointer
$data = file('c:\blah.txt'); $lineyouwant = $data[(count($data)-1)]; Not necessarily most efficient, but it works. > At 10:59 AM 7/1/2003 -0500, Kyle Babich wrote: > >How would I set the file pointer to the very end of the last line of the > >file? > > > >ex. ahkjhff > >asdjfhlkajf > >sdfhaksljdh > >kasjdhkjlfh > >asdjfhklajs > >askjdhjfdjf//here > > > >Thanks, > >-- > >Kyle > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file pointer
Start by checking the file functions in the manual - there are some interesting options for foen(). Miles At 10:59 AM 7/1/2003 -0500, Kyle Babich wrote: How would I set the file pointer to the very end of the last line of the file? ex. ahkjhff asdjfhlkajf sdfhaksljdh kasjdhkjlfh asdjfhklajs askjdhjfdjf//here Thanks, -- Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Curl
Sorry for the repost but it looks like weekends are not the best time to ask questions. Does anyone know of a way to see the exact request that Curl is sending (other than just printing the variable that is posted)? Daryl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: HTMLENTITES(); & the pound sign
What does the html look like? Mike "Bob pilly" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am using PHP Version 4.3.2-RC1 > > Can someone please clarify the htmlentities() function > for me? I have a variable called $notes2 that is > pulled from a database that has a pound sign in it. > When i echo that do the screen i get the following > output: > > echo $notes; > > output= £5,000 > > Instead of £5,000 > > I thought that if i did $notes=htmlentities($notes); > or echo htmlentities($notes); then the output would be > £5,000 but this isnt the case. Can someone see where i > am going wrong? > > Thanks for anyhelp in advance! > > > > > > > > Want to chat instantly with your online friends? Get the FREE Yahoo! > Messenger http://uk.messenger.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fwrite() question
On Tuesday 01 July 2003 22:12, Adam Williams wrote: > when I do that, nothing is written to news.txt, and I'm not sure why. Well find out why! > This is the entire script: > > if ($_POST['news']) > { > $fp = fopen( "news.txt", "w"); Add some error-checking to see whether fopen() was successful. See examples in manual for details. > $success = fwrite( $fp, "$POST_['news']" ); As has already been pointed out you don't need the double-quotes. And it should be $_POST['news']. > fclose($fp); > > if (!success) This should be: if (!$success) And please trim your post! -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* We come to bury DOS, not to praise it. (Paul Vojta, [EMAIL PROTECTED], paraphrasing a quote of Shakespeare) */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php