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 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
[PHP] mysql detect
helo all , what command in linux , to see default direcktory instalation mysql database dan mysql library ## With best regards ! Roy Daniel , ST IT Application Support Development Engineer - PT BERCA [EMAIL PROTECTED] // [EMAIL PROTECTED] ICQNumber : # 103507581 // Phone Cell : 0816-1192832 ## -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Java Applet to PHP Communication
Hello, I need to be able to communicate from a Java Applet to a PHP program on the server to enable Live Connect for data. This is what I intend to do: In my web application, a Java Script program will call a Java Applet which then calls the PHP program on the server. The PHP program works like a servlet and passes the result back to the Java applet which passes the information back to the JavaScript program. How can a Java applet work with a PHP program? Are there any special precautions / programming issues involved? Thanks in advance With Regards, Sharat * Disclaimer: The information in this e-mail and any attachments is confidential / privileged. It is intended solely for the addressee or addressees. If you are not the addressee indicated in this message, you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Java Applet to PHP Communication
Sharat Hegde wrote: Hello, I need to be able to communicate from a Java Applet to a PHP program on the server to enable Live Connect for data. This is what I intend to do: In my web application, a Java Script program will call a Java Applet which then calls the PHP program on the server. The PHP program works like a servlet and passes the result back to the Java applet which passes the information back to the JavaScript program. How can a Java applet work with a PHP program? Are there any special precautions / programming issues involved? Thanks in advance With Regards, Sharat Not anything that you wouldn't have to pay attention to in passing stuff between applications in other instances. I'd use XML/SOAP to pass around the data. There are many reasons to do this, I wont list them here just because there are plenty of articles on the web advocating the use of XML. The added bonus is the buzzword factor. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mysql detect
Hello, On 07/02/2003 04:05 AM, [EMAIL PROTECTED] wrote: what command in linux , to see default direcktory instalation mysql database dan mysql library ./configure ? -- 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
Re: [PHP] Session vs Cookie Issues
I've had similar issues using cookies. The cookie was storing my details but only for the duration of the session despite having set the expiry date to a time well into the future. Any ideas for why this may have happened? 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. Mike - can you expand on your point above? Thanks, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Template Programme!
Hello, Is there any template-processing programme designed for PHP5? Thanks! Jupiter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session Performance questions
Hi, I'm working on a CMS like system. Its uses heavly SQL for page rendering. Yesterday I made a stress test. System stable for just 30 secs (for 60 request per sec, An Athlon750 with 320 mb ram). My investigation is Apache stalls when writing sessions. System uses sessions for store sniffed browser information. Which is faster, writing 2 or 3 k data into session or sql db (after serializing) Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] online file management
- Original Message - From: Paul Chvostek [EMAIL PROTECTED] 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. On Tue, Jul 01, 2003 at 09:44:01PM -0600, Suhas Pharkute wrote: 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. I'm interested in an established package with support by the user community, not a package with source distribution restrictions and prohibitive licensing fees. If you release your software for public review, I'll happily consider it. Otherwise, I guess I'll write my own -- 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] safe_mode and file/directory ownership
Jason, safe_mode_gid may indeed be the solution, though it seems to go way too far in relaxing things. It's the functionality of safe_mode that I want ... with the proviso that the web server should be able to read files that it writes. I will not consider turning off safe_mode entirely, any more than I will consider giving customers shell access to my servers. That would seem to be foolhardy. But that may just be the paranoia talking. p On Tue, Jul 01, 2003 at 10:19:01PM -0700, Jason Sheets wrote: 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. 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? -- 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] Geting information from XML
please i need like those classes , because i have to read from XML and insert into MySQL.. Nabil Stephen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There are a lot of classes that parse XML files. I can send you a few functions I made myself to parse a paticular type of XML file. It should help you get started. With bubblegum in my shoe, Stephen Craton Senior Executive Web Developer Mophus.com, Inc. - Original Message - From: Denis C (ahuk [EMAIL PROTECTED]) To: PHP List [EMAIL PROTECTED] Sent: Monday, June 30, 2003 12:58 PM Subject: [PHP] Geting information from XML Can someone tell how to get information from an XML file, without the F* commands, in PHP? e.g.: ? xml version=1.0 ? messages subjectHello/subject /messages -- 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] dynamic classes or dynamic extends ?
Hello i plan to reorganize my CMS code. The idee is to only use classes for the hole system. There should be a Core class to handle the whole functionality (Login, Backend, Permission, Modules) Every Module as a class (News, Pictures ...) the construct should be like this class Core extends Backend { } class Backend extends News { } class News { } if i have more modules as only one class Backend must extends News, Pictures i could make a temp class to extend the Module only if the module is called class Backend extends Temp { } rquire_once 'class to inlude in case of Module' --- file for class News class Temp extends News { } class News { } --- file for class Picture --- class Temp extends Picture { } class Picture { } in this case I must always write the Temp class in every Module Class maybe there is a ohter solution for this ? I'm working with ITX_Templates, DB from PEAR and wenn i split the classes i must always assign the objects to the other classes. BR Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Java Applet to PHP Communication
Thanks Justin, Do you have any leads on where I can get info on accessing XML data using SOAP from a Java Applet. I know how to parse XML data. Regards, Sharat Hegde Phone: 6575800 Ext 4610 Direct: 6566615 -Original Message- From: justin gruenberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 1:27 PM To: Sharat Hegde Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Java Applet to PHP Communication Sharat Hegde wrote: Hello, I need to be able to communicate from a Java Applet to a PHP program on the server to enable Live Connect for data. This is what I intend to do: In my web application, a Java Script program will call a Java Applet which then calls the PHP program on the server. The PHP program works like a servlet and passes the result back to the Java applet which passes the information back to the JavaScript program. How can a Java applet work with a PHP program? Are there any special precautions / programming issues involved? Thanks in advance With Regards, Sharat Not anything that you wouldn't have to pay attention to in passing stuff between applications in other instances. I'd use XML/SOAP to pass around the data. There are many reasons to do this, I wont list them here just because there are plenty of articles on the web advocating the use of XML. The added bonus is the buzzword factor. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php * Disclaimer: The information in this e-mail and any attachments is confidential / privileged. It is intended solely for the addressee or addressees. If you are not the addressee indicated in this message, you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] have some free time?
-Original Message- From: Kyle Babich [mailto:[EMAIL PROTECTED] Sent: 02 July 2003 00:19 I think this is short example of my problem... ?php $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. Possibilities: function hello($x) { print 'hello ' . $name; $x = 1; } function bye($x) { if ($x == 1) print 'x = 1'; else print 'x != 1'; } hello($y); bye($y); -- function hello() { print 'hello ' . $name; $x = 1; return $x; } function bye($x) { if ($x == 1) print 'x = 1'; else print 'x != 1'; } $y = hello(); bye($y); -- function hello() { global $x; print 'hello ' . $name; $x = 1; } function bye() { global $x; if ($x == 1) print 'x = 1'; else print 'x != 1'; } hello(); bye(); 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] Quickie - manipulating strings
Hi, I need to manipulate a string to insert a space 3 characters from the right end. eg: turn 'ng23fgh' into 'ng23 fgh', or 'hfdgskfjgh23kj' into 'hfdgskfjgh2 3kj'. Any help gratefully received. Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: dynamic classes or dynamic extends ?
off tangent slightly - Have u looked at smarty templates smarty.php.net Must admit I played with ITX and a few others but smarty wins for me pete Torsten Rosenberger wrote: Hello i plan to reorganize my CMS code. The idee is to only use classes for the hole system. There should be a Core class to handle the whole functionality (Login, Backend, Permission, Modules) Every Module as a class (News, Pictures ...) the construct should be like this class Core extends Backend { } class Backend extends News { } class News { } if i have more modules as only one class Backend must extends News, Pictures i could make a temp class to extend the Module only if the module is called class Backend extends Temp { } rquire_once 'class to inlude in case of Module' --- file for class News class Temp extends News { } class News { } --- file for class Picture --- class Temp extends Picture { } class Picture { } in this case I must always write the Temp class in every Module Class maybe there is a ohter solution for this ? I'm working with ITX_Templates, DB from PEAR and wenn i split the classes i must always assign the objects to the other classes. BR Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Quickie - manipulating strings
from the manual Example 1. Basic substr() usage ?php $rest = substr(abcdef, 1);// returns bcdef $rest = substr(abcdef, 1, 3); // returns bcd $rest = substr(abcdef, 0, 4); // returns abcd $rest = substr(abcdef, 0, 8); // returns abcdef // Accessing via curly braces is another option $string = 'abcdef'; echo $string{0};// returns a echo $string{3};// returns d ? If start is negative, the returned string will start at the start'th character from the end of string. Example 2. Using a negative start ?php $rest = substr(abcdef, -1);// returns f $rest = substr(abcdef, -2);// returns ef $rest = substr(abcdef, -3, 1); // returns d ? have fun Pete Matt Macleod wrote: Hi, I need to manipulate a string to insert a space 3 characters from the right end. eg: turn 'ng23fgh' into 'ng23 fgh', or 'hfdgskfjgh23kj' into 'hfdgskfjgh2 3kj'. Any help gratefully received. Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php - printer button
thanks for all who respons my problem, i was found solution java script at http://javascriptsource.com/ with keyword printer button thanks again... rg nasar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql detect
locate mysql.lib? Can you be a bit more specific? Marco On Wed, 2003-07-02 at 03:05, [EMAIL PROTECTED] wrote: helo all , what command in linux , to see default direcktory instalation mysql database dan mysql library ## With best regards ! Roy Daniel , ST IT Application Support Development Engineer - PT BERCA [EMAIL PROTECTED] // [EMAIL PROTECTED] ICQNumber : # 103507581 // Phone Cell : 0816-1192832 ## -- 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] Using INCLUDES in SAFE MODE
I currently have all my users in safe-mode to prevent them from running shell commands via php. I would still like for them to be able to access certain folders (i.e. PEAR, basic_functions, etc..) that reside out of their root. Since safe_mode prevents this, is there a way in the domain's config, to allow access to *specific* directories when in safe_mode? TIA ++ Mike Yrabedra (President) 323 Incorporated Home of MacDock, MacAgent and MacSurfshop ++ W: http://www.323inc.com/ P: 770.382.1195 F: 734.448.5164 E: [EMAIL PROTECTED] I: ichatmacdock ++ Whatever you do, work at it with all your heart, as working for the Lord, not for men. ~Colossians 3:23 {{{ ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How can I get all vars
get_defined_vars (); ? Slava wrote: 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] Forms PHP
Hello everyone, I have a form that gets filled out and within this form there is a link to add additional information in a new form. When this information is saved I would like the browser to redirect to the previous form (this I can do) but with all the details they have already filled out still in the text boxes. What is the easiest way to do this using PHP? Many thanks Gary Ogilvie
[PHP] outputting xml declaration
Hello, The folowing code gives an error: print ?xml version=\1.0\?; This is probably because I print a questionmark? How can I avoid that an error is generated? Besides it's not an error in the way that it gives an errorstring but it writes the output in the error_log of apache... Greetings, -- Steven Apostolou [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] outputting xml declaration
Question mark's are not special or reserved in strings like $'s are. That shouldn't be the problem. On Wed, 2003-07-02 at 09:33, Steven Apostolou wrote: Hello, The folowing code gives an error: print ?xml version=\1.0\?; This is probably because I print a questionmark? How can I avoid that an error is generated? Besides it's not an error in the way that it gives an errorstring but it writes the output in the error_log of apache... Greetings, -- Steven Apostolou [EMAIL PROTECTED] -- 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] Forms PHP
[snip] I have a form that gets filled out and within this form there is a link to add additional information in a new form. When this information is saved I would like the browser to redirect to the previous form (this I can do) but with all the details they have already filled out still in the text boxes. What is the easiest way to do this using PHP? [/snip] By maintaining the POST (assuming you're using POST)variables and calling them into the form values when reloaded. If you go to the second page store the POST variables in hidden form input types, then grab them when the second page is POSTED. Does this make sense? Not enough caffeine for me yet... Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] outputting xml declaration
[snip] print ?xml version=\1.0\?; This is probably because I print a questionmark? How can I avoid that an error is generated? Besides it's not an error in the way that it gives an errorstring but it writes the output in the error_log of apache... [/snip] Search the archives of this list, the subject comes up often. HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Forms PHP
[snip] By maintaining the POST (assuming you're using POST)variables and calling them into the form values when reloaded. If you go to the second page store the POST variables in hidden form input types, then grab them when the second page is POSTED. Does this make sense? Not enough caffeine for me yet...[/snip] So basically I need to have 2 versions of the first page, is that right? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Forms PHP
[snip] By maintaining the POST (assuming you're using POST)variables and calling them into the form values when reloaded. If you go to the second page store the POST variables in hidden form input types, then grab them when the second page is POSTED. Does this make sense? Not enough caffeine for me yet...[/snip] So basically I need to have 2 versions of the first page, is that right? :) [/snip] Not really, test for emptiness of the variable (isset())...if it is set display it, if not show it as blank. HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Forms PHP[Scanned]
If I've understood your initial email correctly another approach would be to save the contents of the form to your database and populate the form fields presented subsequently with information retrieved from the database. You can use the header function to redirect to whatever page you wish once the information has been saved. Regards, Michael Egan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Forms PHP
[snip] Not really, test for emptiness of the variable (isset())...if it is set display it, if not show it as blank. HTH! Jay [/snip] You'll have to forgive me as I am unfamiliar with PHP, still a beginner!! So if I have a page (page1.php) which is my first page with a form. When I click a normal link within this form it takes me to page2.php. This page has another smaller form. When the submit button in this form is clicked it updates the database with no problems and displays a link - linking back to page1.php (I have decided not to use redirect). How do load the page and fill all the text boxes with the information that was already written - because this information (from page1.php, first form) has not been saved to the database yet. You probably knew this anyway - but I had to go through that process to satisfy myself!! Many Thanks Gary Ogilvie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Forms PHP[Scanned]
Wouldn't I then be saving the contents of that page twice in the database? -Original Message- From: Michael Egan [mailto:[EMAIL PROTECTED] Sent: 02 July 2003 14:53 To: PHP General Subject: RE: [PHP] Forms PHP[Scanned] If I've understood your initial email correctly another approach would be to save the contents of the form to your database and populate the form fields presented subsequently with information retrieved from the database. You can use the header function to redirect to whatever page you wish once the information has been saved. Regards, Michael Egan -- 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] Forms PHP
On Wed, 2 Jul 2003 14:45:27 +0100, Gary Ogilvie [EMAIL PROTECTED] wrote: [snip] By maintaining the POST (assuming you're using POST)variables and calling them into the form values when reloaded. If you go to the second page store the POST variables in hidden form input types, then grab them when the second page is POSTED. Does this make sense? Not enough caffeine for me yet...[/snip] So basically I need to have 2 versions of the first page, is that right? :) No, in your first form you have code like ?php if ((!isset($_POST)) || (!isset($_POST['foo']))) { $foo = set default value here; } else { $foo = $_POST['foo']; } ? form method=post action=form2.php input type=text name=foo value=?php echo $foo;? / ... /form and in the second form you have: form method=post action=form1.php input type=hidden name=foo value=?php echo $_POST['foo'];? / ... /form Cheers, Greg. -- Greg Wiley www.wileysworld.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] outputting xml declaration
Disable short open tags. yann On Wed, 2003-07-02 at 09:33, Steven Apostolou wrote: Hello, The folowing code gives an error: print ?xml version=\1.0\?; This is probably because I print a questionmark? How can I avoid that an error is generated? Besides it's not an error in the way that it gives an errorstring but it writes the output in the error_log of apache... Greetings, -- Steven Apostolou [EMAIL PROTECTED] -- Yann Larrivee [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Forms PHP
Ah I understand that - many thanks. -Original Message- From: Greg Wiley [mailto:[EMAIL PROTECTED] Sent: 02 July 2003 14:59 To: Gary Ogilvie; 'PHP General' Subject: Re: [PHP] Forms PHP On Wed, 2 Jul 2003 14:45:27 +0100, Gary Ogilvie [EMAIL PROTECTED] wrote: [snip] By maintaining the POST (assuming you're using POST)variables and calling them into the form values when reloaded. If you go to the second page store the POST variables in hidden form input types, then grab them when the second page is POSTED. Does this make sense? Not enough caffeine for me yet...[/snip] So basically I need to have 2 versions of the first page, is that right? :) No, in your first form you have code like ?php if ((!isset($_POST)) || (!isset($_POST['foo']))) { $foo = set default value here; } else { $foo = $_POST['foo']; } ? form method=post action=form2.php input type=text name=foo value=?php echo $foo;? / ... /form and in the second form you have: form method=post action=form1.php input type=hidden name=foo value=?php echo $_POST['foo'];? / ... /form Cheers, Greg. -- Greg Wiley www.wileysworld.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Forms PHP
[snip] You'll have to forgive me as I am unfamiliar with PHP, still a beginner!! So if I have a page (page1.php) which is my first page with a form. When I click a normal link within this form it takes me to page2.php. This page has another smaller form. When the submit button in this form is clicked it updates the database with no problems and displays a link - linking back to page1.php (I have decided not to use redirect). How do load the page and fill all the text boxes with the information that was already written - because this information (from page1.php, first form) has not been saved to the database yet. You probably knew this anyway - but I had to go through that process to satisfy myself!! [/snip] If you are just clicking on a link instead of submitting the information you have not populated any variables...so no recall is available unless the clicked link is formatted to hold the variables (a GET). For instance a href = someotherpage.php?name=GaryClick Here/a $_GET['name'] is equal to Gary You can do it for more than one variable... a href = someotherpage.php?name=Garyaddress=ChicagoClick Here/a $_GET['name'] is equal to Gary $_GET['address'] is equal to Chicago HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] passthru() problem
I'm trying to get the output of a shell command with PHP This is the command I'm Trying to execute, I also tried using system instead of passthru ?php passthru(ftpwho -v, $return_var); echo $return_var; ? Both cases passthru and system Outputed 2 but should have outputted something like this: standalone FTP daemon [17899]: 21852 geiri[ 4h45m] (n/a) STOR /UPLOAD_HERE/moviemusic/The Soprano's - Music from the HBO Original Series KB/s: 143.87 client: client.client.de [12.2.2.3] server: 62.145.135.125:2121 (shiiit.serbinn.com) location: /MP3/ Music/ Any Idea about what could be wrong
Re: [PHP] outputting xml declaration
you can always print like so... print '?xml version=1.0?'; Then the parser does not try to parse inside the line. However, I dont know what will happen when you have short_open_tags in your php.ini file turned on...i usually turn it all of.. -- BigDog On Wed, 2003-07-02 at 07:33, Steven Apostolou wrote: Hello, The folowing code gives an error: print ?xml version=\1.0\?; This is probably because I print a questionmark? How can I avoid that an error is generated? Besides it's not an error in the way that it gives an errorstring but it writes the output in the error_log of apache... Greetings, -- Steven Apostolou [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Java Applet to PHP Communication
you want to use either dom or saxon to parse the xml within java. So your applet can call some class that loads, parses and then does something with the xml. Usually you want to use a sax parser for the speed, however you can use a dom parser to manipulate the dom tree... -- BigDog On Wed, 2003-07-02 at 05:02, Sharat Hegde wrote: Thanks Justin, Do you have any leads on where I can get info on accessing XML data using SOAP from a Java Applet. I know how to parse XML data. Regards, Sharat Hegde Phone: 6575800 Ext 4610 Direct: 6566615 -Original Message- From: justin gruenberg [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 1:27 PM To: Sharat Hegde Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Java Applet to PHP Communication Sharat Hegde wrote: Hello, I need to be able to communicate from a Java Applet to a PHP program on the server to enable Live Connect for data. This is what I intend to do: In my web application, a Java Script program will call a Java Applet which then calls the PHP program on the server. The PHP program works like a servlet and passes the result back to the Java applet which passes the information back to the JavaScript program. How can a Java applet work with a PHP program? Are there any special precautions / programming issues involved? Thanks in advance With Regards, Sharat Not anything that you wouldn't have to pay attention to in passing stuff between applications in other instances. I'd use XML/SOAP to pass around the data. There are many reasons to do this, I wont list them here just because there are plenty of articles on the web advocating the use of XML. The added bonus is the buzzword factor. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php * Disclaimer: The information in this e-mail and any attachments is confidential / privileged. It is intended solely for the addressee or addressees. If you are not the addressee indicated in this message, you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] states
On Tue, 2003-07-01 at 16:55, Matt Palermo wrote: Does anyone know of any built in functions or options for the US states? Nope no built in function for this... 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. You can create your own function to build this for you. I have always put the 50 states in a database and used that for all my html and output requirements. You can google state abbreviations and use that in a database or file. -- BigDog -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: passthru() problem
I don't know much about System or passthru - but doesn't it have to be something like: passthru(ftpwho -v, $return_var); echo $return_var; Because it is a reference Parameter und without the the function can't put the value into $return_var. Greetings Kristin Schesonka passthru(ftpwho -v, $return_var); echo $return_var; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Forms PHP - Thanks
Thanks all, I shall try these methods now. I may be a while - the form is pretty large :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] outputting xml declaration
Ok never mind about what I said, brain lapse, I was focusing so hard on the ? that I didn't realize it was next to the . Doh. On Wed, 2003-07-02 at 09:43, Jay Blanchard wrote: [snip] print ?xml version=\1.0\?; This is probably because I print a questionmark? How can I avoid that an error is generated? Besides it's not an error in the way that it gives an errorstring but it writes the output in the error_log of apache... [/snip] Search the archives of this list, the subject comes up often. HTH! Jay -- 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] Quick ? ... how come this doesn't work?
I'm trying to get the 1st and last day of the current week. I ty to do this: $startofweek = date(Y-m-d,mktime (0,0,0,date(m) ,date(d)-date(w),date(Y))); $endofweek = date(Y-m-d,mktime (0,0,0,date(m) ,date(d,strtotime($startofweek))+6,date(Y))); echo $startofweek. --- .$endofweek; $startofweek is correct, but if you run it for a week that has it's beginning date in an other month (like this week), the $endofweek is in the wrong month. What gives? If I change -date(w) to -1 or anything else that stays within the current month, it works. What do you think? Is there a better way to do this? - Anthony -- 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.
It's not clear what you're trying to do. If the values are for a radio button or checkbox, use the same name for both buttons. The values have to be mutually exclusive for what you;re trying to do to work. You could do something like this: if (isset($_REQUEST['TemplateOne']) { $test=$_REQUEST['TemplateOne']; } elseif (isset($_REQUEST['TemplateTwo']) { $test=$_REQUEST['TemplateTwo']; } else { $test=; } echo $test; -- or this: $test=0 if (isset($_REQUEST['TemplateOne']) { $test=1; } if (isset($_REQUEST['TemplateTwo']) { $test+=2; } switch ($test) { case 1: echo one; break; case 2: echo two; break; case 3: echo one and two; break; } Without knowing what you're actually trying to do, however, we're all just shooting in the dark. --- Miranda, Joel Louie M [EMAIL PROTECTED] 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? ?php $v_template = $_REQUEST['TemplateOne'] ; $v_template = $_REQUEST['TemplateTwo'] ; 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 = 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] Using INCLUDES in SAFE MODE
if you are on a linux system, you could always symlink the folders into the public_html dir. Jim Lucas - Original Message - From: MIKE YRABEDRA [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 5:36 AM Subject: [PHP] Using INCLUDES in SAFE MODE I currently have all my users in safe-mode to prevent them from running shell commands via php. I would still like for them to be able to access certain folders (i.e. PEAR, basic_functions, etc..) that reside out of their root. Since safe_mode prevents this, is there a way in the domain's config, to allow access to *specific* directories when in safe_mode? TIA ++ Mike Yrabedra (President) 323 Incorporated Home of MacDock, MacAgent and MacSurfshop ++ W: http://www.323inc.com/ P: 770.382.1195 F: 734.448.5164 E: [EMAIL PROTECTED] I: ichatmacdock ++ Whatever you do, work at it with all your heart, as working for the Lord, not for men. ~Colossians 3:23 {{{ ++ -- 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] outputting xml declaration
try this print \?xml version=\1.0\\?; This might fix it. - Original Message - From: Steven Apostolou [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 6:33 AM Subject: [PHP] outputting xml declaration Hello, The folowing code gives an error: print ?xml version=\1.0\?; This is probably because I print a questionmark? How can I avoid that an error is generated? Besides it's not an error in the way that it gives an errorstring but it writes the output in the error_log of apache... Greetings, -- Steven Apostolou [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Session vs Cookie Issues
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? If you chose to use sessions, and cookies were rejected by the user, then PHP would append the session ID to each internal link, in order to preserve the session ID between requests. If you just used cookies with no supplemental method, and cookies were rejected by the user, then your method would break. - 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] Session vs Cookie Issues
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. Mike - can you expand on your point above? I've running into this problem where--in an app with a lot of OOP and reference-passing, on a shared host--requests would die out before reaching the end, though they'd do enough work to be useful. I can't seem to be able to fix the instability (see below), but I was able to work around one of the flaws of the session support: normally the user's session data is read from a file, typically in /tmp, at the start of a request. This data is manipulated by the script when values in $GLOBALS['_SESSION'] are changed, and then it's written back to the file at the end of the request. My issue was that frequently, my scripts wouldn't finish correctly, session data would not be written to the file, and therefore it would be lost between requests. I had hoped to find a function like session_write_close() that did not have the side effect of closing the session altogether, but instead I ended up rolling my own, with more frequent disk writes at crucial junctures. If anyone can help shed any light on the sort of instability I'm seeing, that would really help. Apache child processes die right and left, with segfaults and bus errors. - 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] weird issues w/PHP install
I have installed PHP numerous times using the same configuration and this is the first time I have run into this issue. solaris 2.8 on e3500 apache 1.3.27 ( --enable-module=so --prefix=/usr/local/apache) php 4.3.2 ( --with-apxs --with-mysql --with-mssql=/usr/local/freetds --enable-ftp --with-mcrypt=/usr/local --with-pear --with-zlib ) mcrypt, freetds both installed fine installation of PHP is fine attempt to restart apache give: Syntax error on line 205 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file /usr/local/apache/libexec/libphp4.so: symbol ap_block_alarms: referenced symbol not found Google of this error returns some issues with zlib around the php 4.0 - 4.2 versions. any thoughts would be extremely helpful. mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 2 Jul 2003 16:10:52 -0000 Issue 2152
php-general Digest 2 Jul 2003 16:10:52 - Issue 2152 Topics (messages 153655 through 153725): Re: Email troubles 153655 by: Manuel Lemos Re: online file management 153656 by: Suhas Pharkute 153685 by: Paul Chvostek Re: php - printer button 153657 by: Shivanischal A 153669 by: daniel.electroteque.org 153674 by: Jyry Kuukkanen 153694 by: nasar.digilib.umm.ac.id 2values on form, help in catching as one. 153658 by: Miranda, Joel Louie M 153664 by: Jason Sheets 153720 by: Mark Re: Session vs Cookie Issues 153659 by: Mike Migurski 153661 by: Ow Mun Heng 153682 by: Matt MacLeod 153723 by: Mike Migurski 153724 by: Mike Migurski Removed the bundled MySQL client library. (Sterling) 153660 by: Vincent Bouret 153662 by: - Edwin - Items displayed left and right, help newman. 153663 by: Mark Tehara 153665 by: Mark Tehara 153667 by: Jeff Harris Re: php and gd 153666 by: Jason Sheets Re: safe_mode and file/directory ownership 153668 by: Jason Sheets 153686 by: Paul Chvostek PHP user group 153670 by: Erich Kolb How can I get all vars 153671 by: Slava 153697 by: sven Re: OT (kinda): Mod_rewrite 153672 by: Wendell Brown Previous Basic Auth clarified 153673 by: Dave Carrera Re: php-general as REPLY TO 153675 by: Joel Rees Re: PHP on one box, Apache on another? 153676 by: Joel Rees 153677 by: Joel Rees mysql detect 153678 by: RoyD.bercacakra.com 153681 by: Manuel Lemos 153695 by: Marco Tabini Java Applet to PHP Communication 153679 by: Sharat Hegde 153680 by: justin gruenberg 153689 by: Sharat Hegde 153714 by: Ray Hunter Template Programme! 153683 by: Jupiter Wen Session Performance questions 153684 by: Sancar Saran Re: Geting information from XML 153687 by: Nabil dynamic classes or dynamic extends ? 153688 by: Torsten Rosenberger 153692 by: Pete Morganic Re: have some free time? 153690 by: Ford, Mike [LSS] Quickie - manipulating strings 153691 by: Matt MacLeod 153693 by: Pete Morganic Using INCLUDES in SAFE MODE 153696 by: MIKE YRABEDRA 153721 by: Jim Lucas Forms PHP 153698 by: Gary Ogilvie 153701 by: Jay Blanchard 153703 by: Gary Ogilvie 153704 by: Jay Blanchard 153706 by: Gary Ogilvie 153708 by: Greg Wiley 153710 by: Gary Ogilvie 153711 by: Jay Blanchard outputting xml declaration 153699 by: Steven Apostolou 153700 by: Adam Voigt 153702 by: Jay Blanchard 153709 by: Yann Larrivee 153713 by: Ray Hunter 153718 by: Adam Voigt 153722 by: Jim Lucas Re: Forms PHP[Scanned] 153705 by: Michael Egan 153707 by: Gary Ogilvie passthru() problem 153712 by: david 153716 by: Kristin Schesonka Re: states 153715 by: Ray Hunter Re: Forms PHP - Thanks 153717 by: Gary Ogilvie Quick ? ... how come this doesn't work? 153719 by: Anthony weird issues w/PHP install 153725 by: Michael Geier Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- 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/ ---End Message--- ---BeginMessage--- 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.
[PHP] Free Service to Secure PHP Code
Hello PHP Developers, Now a free service is available to secure PHP code. This service is located at http://encphp.sspsoft.com Now you can encrypt your PHP files with online encryptor and get one of loader module to run these files. This program is still under development, your suggestions/comments/questions will be valuable input. If in any case of a non-working incidence, please email at [EMAIL PROTECTED] No limits! No restrictions! Use it, its FREE!! _ Encrypt your PHP code for FREE at http://encphp.sspsoft.com _ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Free Service to Secure PHP Code
You sure thats a valid URL? Is it new? Because my DNS doesn't resolve it. On Wed, 2003-07-02 at 12:14, Suhas Pharkute wrote: Hello PHP Developers, Now a free service is available to secure PHP code. This service is located at http://encphp.sspsoft.com Now you can encrypt your PHP files with online encryptor and get one of loader module to run these files. This program is still under development, your suggestions/comments/questions will be valuable input. If in any case of a non-working incidence, please email at [EMAIL PROTECTED] No limits! No restrictions! Use it, its FREE!! _ Encrypt your PHP code for FREE at http://encphp.sspsoft.com _ -- 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] Free Service to Secure PHP Code
If your DNS is not resolveing http://encphp.sspsoft.com Please click here FIRST : http://ns1.webhostdns.us and then click here. http://encphp.sspsoft.com For some reason my webhost/DNS is not working properly. I hope they will solve this problem soon. Sorry for the inconvenience Suhas _ Encrypt your PHP code for FREE at http://encphp.sspsoft.com _ - Original Message - From: Adam Voigt [EMAIL PROTECTED] To: Suhas Pharkute [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 10:30 AM Subject: Re: [PHP] Free Service to Secure PHP Code You sure thats a valid URL? Is it new? Because my DNS doesn't resolve it. On Wed, 2003-07-02 at 12:14, Suhas Pharkute wrote: Hello PHP Developers, Now a free service is available to secure PHP code. This service is located at http://encphp.sspsoft.com Now you can encrypt your PHP files with online encryptor and get one of loader module to run these files. This program is still under development, your suggestions/comments/questions will be valuable input. If in any case of a non-working incidence, please email at [EMAIL PROTECTED] No limits! No restrictions! Use it, its FREE!! _ Encrypt your PHP code for FREE at http://encphp.sspsoft.com _ -- 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] strip white space
I am not sure how to go about this and hope that someone can help here. I have a variable like the following: $team_name=BV Stars Black; it has two spaces between the words Stars and Black. What I am trying to do is to take this variable, check for and strip the following: 1. Leading spaces 2. Ending spaces 3. Double (or more) spaces in the variable leaving only one space between words. Does php have any built in function that I can not find that will do this? Thank You in Advance Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP 5.0.0 Beta 1? better called alpha zero
PHP5 Beta1? yesterday i have downloaded the bin version of php5 for windows. here are some problems that i have during my install / test. some of them i have solved but a few i can't figure out. 1. if you have installed apache1.3x and php4 before and want upgrade to apache 1.3.x and php5 then you must replace the entry in the httpd.conf from : LoadModule php4_module c:/php/sapi/php4apache.dll to LoadModule php5_module c:/php/sapi/php4apache.dll otherwise apache does not start. this is install.doc in the php distribution tells you to use the first statement. it seems that the docs need some work to reflect the new php5 config/install statements. 2. PHP5 comes without the clientlibs of mysql!!! i find it very confusing that there is no more info about this on www.php.net nor mysql.com so what with lamp and wamp (will it be lans and wans for the new sqlite) ok they don't budle mysql and php but how can we do it with php5 + mysql where is the info , the how to ? 3. PHP5 have a completely new domxml extension . where is it ? the recomended - php.ini in the distribution confuses you again with old module entries that doesn't work. what they meen with a complete new extension is it so new that we can't see it? ;-) 4. i can't understand why they call it php5 beta1 , as long as mysql doesnt work it can only called php5 alpha zero. find infomation about php5 or the mysql probl. or domxml is like searching for topsecret documents. i find if they don't get mysql working the old way they will be so incompatible that they can think again if they will introduce new syntax like double underscore methods and other old stuff. __constructor() why not constructor() ... Sterling Hughes [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] The PHP development community is proud to announce the release of PHP 5 Beta 1. Both source packages and a Win32 build are available, you can find these packages at http://www.php.net/downloads.php. For a complete list of changes, please refer to http://www.php.net/ChangeLog-5.php. Some of the more major changes include: - PHP5 features the Zend Engine 2. For a list of Zend Engine 2 changes, please visit http://www.php.net/zend-engine-2.php. - XML support has been completely redone in PHP5, all extensions are now focused around the excellent libxml2 library (http://www.xmlsoft.org/). - SQLite has been bundled with PHP. For more information on SQLite, please visit their website, http://www.hwaci.com/sw/sqlite/. - Streams have been greatly improved, including the ability to access low-level socket operations on streams. - Due to issues surrounding the MySQL 4.0 license, the MySQL libraries are no longer bundled with PHP. For more information on these licensing changes please see the MySQL licensing policy [1] Note: This is a beta version. It should not be used in production or even semi-production web sites. There are known bugs in it, and in addition, some of the features may change (based on feedback). We encourage you to download and play with it (and report bugs[2] if you find any!), but please do not replace your production installations of PHP 4 at this time. [1] http://www.mysql.com/products/licensing.html [2] http://bugs.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DEV] Re: PHP 5.0.0 Beta 1? better called alpha zero
On Wed, 2 Jul 2003, Jaaboo wrote: PHP5 Beta1? yesterday i have downloaded the bin version of php5 for windows. here are some problems that i have during my install / test. some of them i have solved but a few i can't figure out. 1. if you have installed apache1.3x and php4 before and want upgrade to apache 1.3.x and php5 then you must replace the entry in the httpd.conf from : LoadModule php4_module c:/php/sapi/php4apache.dll to LoadModule php5_module c:/php/sapi/php4apache.dll otherwise apache does not start. this is install.doc in the php distribution tells you to use the first statement. it seems that the docs need some work to reflect the new php5 config/install statements. PHP5 Beta 1 (Get it :) is a beta. How to install the stable version is documented, but beta's are intended, IMO, for developers and experienced users to try. 2. PHP5 comes without the clientlibs of mysql!!! i find it very confusing that there is no more info about this on www.php.net nor mysql.com so what with lamp and wamp (will it be lans and wans for the new sqlite) ok they don't budle mysql and php but how can we do it with php5 + mysql where is the info , the how to ? Due to the MySQL client library changing it's licensing terms from public domain to GPL it can no longer be included with PHP. A clause is being worked on to allow for this in the future. 3. PHP5 have a completely new domxml extension . where is it ? the recomended - php.ini in the distribution confuses you again with old module entries that doesn't work. what they meen with a complete new extension is it so new that we can't see it? ;-) In ext/domxml . Again it's beta. There are kinks to be ironed out. :) 4. i can't understand why they call it php5 beta1 , as long as mysql doesnt work it can only called php5 alpha zero. Erm, it's beta because it is a beta. It has a new engine and new structure and new... Please don't send this and other musings to all of the available user lists. Elfyn -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] strip white space
would $team_name = trim(ereg_replace( +, , $team_name )); do it? -Original Message- From: Steve Buehler [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 9:50 AM To: PHP Subject: [PHP] strip white space I am not sure how to go about this and hope that someone can help here. I have a variable like the following: $team_name=BV Stars Black; it has two spaces between the words Stars and Black. What I am trying to do is to take this variable, check for and strip the following: 1. Leading spaces 2. Ending spaces 3. Double (or more) spaces in the variable leaving only one space between words. Does php have any built in function that I can not find that will do this? Thank You in Advance Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-QA] Re: [PHP-DEV] Re: PHP 5.0.0 Beta 1? better called alphazero
[note to all: do not crosspost this, [EMAIL PROTECTED] is the forum to discuss it] On Wed, 2 Jul 2003, Elfyn McBratney wrote: Due to the MySQL client library changing it's licensing terms from public domain to GPL it can no longer be included with PHP. A clause is being worked on to allow for this in the future. This is only true for libmysql 4. It iw perfectly to bundle the 3.x libraries, but we still do not do that because our policy is not to bundling something that doesn't make sense. If you install MYSQL on your server, you usually install the client libraries too, so there is no realy problem here at all. 4. i can't understand why they call it php5 beta1 , as long as mysql doesnt work it can only called php5 alpha zero. Then it will always be an alpha. And MySQL does work fine, you just have to install the client libraries yourself. 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
[PHP] Re: outputting xml declaration
print '?xml version=1.0?'; Steven Apostolou wrote: Hello, The folowing code gives an error: print ?xml version=\1.0\?; This is probably because I print a questionmark? How can I avoid that an error is generated? Besides it's not an error in the way that it gives an errorstring but it writes the output in the error_log of apache... Greetings, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strip white space
Figures, right after I emailed this, I found it after looking for over an hour. Here is the result and some people had emailed me parts of this: $team_name= BV Stars Black; wsstrip($team_name); function wsstrip($str) { $str=ereg_replace (' +', ' ', trim($str)); $str=ereg_replace([\r\t\n],,$str); } echo $team_name; // Would produce the following line BV Stars Black Thank you all for helping on this. I found the answer by David Gillies at: http://us4.php.net/trim Another question is this. The in wsstrip($str). Does that mean that it takes the input to the function as Global and changes it Globally? I am assuming that because that is what the whole function seems to do for me. Thanks again everybody Steve At 11:49 AM 7/2/2003 -0500, you wrote: I am not sure how to go about this and hope that someone can help here. I have a variable like the following: $team_name=BV Stars Black; it has two spaces between the words Stars and Black. What I am trying to do is to take this variable, check for and strip the following: 1. Leading spaces 2. Ending spaces 3. Double (or more) spaces in the variable leaving only one space between words. Does php have any built in function that I can not find that will do this? Thank You in Advance Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- This message has been scanned for viruses and dangerous content by the MailScanner at ow4, and is believed to be clean. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Connect Active Directory using LDAP... please help :)
The big issue that you will face will be with getting the dn correct for it to work.. I have connected to ldap exchange to do authentication and pull user data and it was a real hassle to get the dn correct.. -- BigDog On Tue, 2003-07-01 at 15:41, Vince C wrote: Hi everyone, I tried to connect to Active Directory (AD) by using php. I heard that it could use LDAP to achieve it. I have written some code on my machine (Win2000) and try to connect to AD. It looks like the it could connect, bind, and even search (I determined base on the line I placed). However, it return 0 entries. If I used the same filter and use utilites lpd.exe on Windows 2000 Server (the AD machine). I could return some entries. I am hestitating whether do I made some mistake on my program, or something other than my code. Does anyone know what the problem is? Any comment are welcome! Thanks! Vince P.S. Here is my code: HTML HEAD !-- brandcheck.php -- TITLE Brand New Checking.. /TITLE /HEAD BODY pfont size =4AD Test/font/p table width =100% border=1 cellspacing=0 cellpadding=0 ?php $ldaphost= company.com; if(!($ldap = ldap_connect($ldaphost,389))){ die(ldap server cannot be reached); } else { $oudc = dc=company, dc=com; $dn2 = ; $password = ; echo pConnected and ready to bind...; if (!($res = @ldap_bind($ldap, $dn2, $password))) { print(ldap_error($ldap) . BR); die (Could not bind the $dn2); echo pCouldn't bind ; } else { echo pBinded and Ready to search; echo brLDAP = $ldap; echo broudc = $oudc; // $filter=((objectClass=user)(objectCategory=person)(|(sn=sorg))); $filter= sn=*; $sr=ldap_search($ldap,$oudc,$filter); echo pnumber of entries found: . ldap_count_entries($ldap, $sr) . p; echo brfilter = $filter; echo brsr=$sr; if (!$sr) { die(psearch failed\n); } else { echo p Searched and ready for get entries.; $info= ldap_get_entries($ldap, $sr); for ($i=0; $i$info[count]; $i++) { print (TR); print (TD width=15% . $info[$i][cn][0] . . $info[$i][sn][0] . /TD); print (TD width=85% . $info[$i][mail][0] . /TD); print (/TR); print brIn the display FOR loop; } echo br After loop.; } } ldap_unbind($ldap); echo pLDAP unbinded; } ? /table /BODY /HTML Thanks in advance! Vince -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Mysql Limit
I've created a script that reads a sorted mysql query and outputs specific results into text files defined by the start and limit of mysql. The database holds 178 records. I want to start my output on #9 with 10 records per page. Should leave me with 17 equal pages right? $count = 178 $start = 8; (Mysql starts at record 0) $per_page = 10; $page = 1; while ($start = $count) { $fp = fopen(Page$page.txt, w); mysql_connect ($host, $user, $pass); mysql_select_db ($database); $result = mysql_query (SELECT * FROM internal_listings, agents WHERE internal_listings.agent = agents.name AND category = 'Standard' ORDER by area,price LIMIT $start, $per_page); if ($row = mysql_fetch_array($result)) { do { ##misc ouput to file $fp for 10 records in query } while($row = mysql_fetch_array($result)); } fclose($fp); mysql_close(); $start = $start + $per_page; $page++; } When I run the script outlined above I get 18 pages. Page number 18 is blank as it should be as there should be no more listings to output to a text file but why is there a page number 18 to begin with? It should end with page number 17. Thanks in advance for any insight, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Mysql Limit
It looks like your adding 10 to 8 thus getting 18... of course I maybe looking at this wrong - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 9:23 AM Subject: [PHP] PHP and Mysql Limit I've created a script that reads a sorted mysql query and outputs specific results into text files defined by the start and limit of mysql. The database holds 178 records. I want to start my output on #9 with 10 records per page. Should leave me with 17 equal pages right? $count = 178 $start = 8; (Mysql starts at record 0) $per_page = 10; $page = 1; while ($start = $count) { $fp = fopen(Page$page.txt, w); mysql_connect ($host, $user, $pass); mysql_select_db ($database); $result = mysql_query (SELECT * FROM internal_listings, agents WHERE internal_listings.agent = agents.name AND category = 'Standard' ORDER by area,price LIMIT $start, $per_page); if ($row = mysql_fetch_array($result)) { do { ##misc ouput to file $fp for 10 records in query } while($row = mysql_fetch_array($result)); } fclose($fp); mysql_close(); $start = $start + $per_page; $page++; } When I run the script outlined above I get 18 pages. Page number 18 is blank as it should be as there should be no more listings to output to a text file but why is there a page number 18 to begin with? It should end with page number 17. Thanks in advance for any insight, Ed -- 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] strip white space
Steve Buehler wrote: Another question is this. The in wsstrip($str). Does that mean that it takes the input to the function as Global and changes it Globally? I am assuming that because that is what the whole function seems to do for me. No, it means that it passes a reference to the variable rather than the value. In other words, any changes made to the variable in the function will change the variable passed in too. See http://us2.php.net/references -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] print html code
Hello, I want to make a php site which can generate a html code and display it on the screen. (Display the code itself.) I use htmlspecialchars() function. It works fine, but now I have to add about 200 lines of static html code to print it out. If I put all of the code in a string than it will appear in a single line. (Maybe it works, but not nice) How can I easy print out more lines of html code with php? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Mysql Limit
|- Original Message - |From: [EMAIL PROTECTED] |To: [EMAIL PROTECTED] |Sent: Wednesday, July 02, 2003 9:23 AM |Subject: [PHP] PHP and Mysql Limit | | | | I've created a script that reads a sorted mysql query and outputs specific | results into text files defined by the start and limit of mysql. The | database holds 178 records. I want to start my output on #9 with 10 | records per page. Should leave me with 17 equal pages right? | | $count = 178 | $start = 8; (Mysql starts at record 0) | $per_page = 10; | $page = 1; | | while ($start = $count) { | | $fp = fopen(Page$page.txt, w); [snip] On Jul 2, 2003, Chris Sherwood claimed that: |It looks like your adding 10 to 8 thus getting 18... of course I maybe |looking at this wrong | Then, once you've done it enough times, $start = $count = 178. [code] while ($start = $count) { // when $start = $count = 178, you won't retrive any data [/code] I would probably also move as much of the mysql_connect as possible to outside the loop. It only needs to be done once. -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] print html code
Karina S wrote: Hello, I want to make a php site which can generate a html code and display it on the screen. (Display the code itself.) I use htmlspecialchars() function. It works fine, but now I have to add about 200 lines of static html code to print it out. If I put all of the code in a string than it will appear in a single line. (Maybe it works, but not nice) How can I easy print out more lines of html code with php? This has nothing to do with PHP, but try putting code and /code tags around the HTML. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php my sql question
I have a web site that has my sql installed. The web server is 1st host web and they do not provide much support other than referral to my sql and php web site. I know how to set up a database from a text file then upload to an sql database. Now I want to write code to make it open and access it. This is where I am stuck. The web site uses an apache server. Must I install php on my local machine? When I save a web page with a php extension, it defaults to an html page and it will not work when I upload. -- Jerome A. Jackson Information Services Coordinator Advancement Services Virginia Commonwealth University Post Office Box 842026 Richmond, Virginia 23284-2026 Phone: 804-828-2043 Fax: 804-828-0884 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: print html code
try echo ie... echo pthis is a paragraph/pr\n\; the r\n\ is a return character and newline character. Karina S [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I want to make a php site which can generate a html code and display it on the screen. (Display the code itself.) I use htmlspecialchars() function. It works fine, but now I have to add about 200 lines of static html code to print it out. If I put all of the code in a string than it will appear in a single line. (Maybe it works, but not nice) How can I easy print out more lines of html code with php? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP-QA] Re: [PHP-DEV] Re: PHP 5.0.0 Beta 1? bettercalled alph...
On Wed, 2 Jul 2003 [EMAIL PROTECTED] wrote: Well, I haven't figured out how to get it working on Windows yet. So, could you tell me how? There is a php_mysql.dll in the version on snaps, but it doesn't work. It gives an error: invalid library (maybe not a PHP library). So, I don't see any way to do it except to compile it on Windows and I haven't a clue how to do that. That's already under investigation, and it might alreay have been fixed in the latest snaps. 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
[PHP] Re: PHP user group
there are php user groups hmmm... there should a listing for that. someone should start a list... i wish there was one near me... Erich Kolb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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
[PHP] Re: have some free time?
your links don't work... Kyle Babich [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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] PHP and Mysql Limit
Yes, the next page of results would start at #18. The page number only increments by 1. Ed On Wed, 2 Jul 2003, Chris Sherwood wrote: It looks like your adding 10 to 8 thus getting 18... of course I maybe looking at this wrong - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 9:23 AM Subject: [PHP] PHP and Mysql Limit I've created a script that reads a sorted mysql query and outputs specific results into text files defined by the start and limit of mysql. The database holds 178 records. I want to start my output on #9 with 10 records per page. Should leave me with 17 equal pages right? $count = 178 $start = 8; (Mysql starts at record 0) $per_page = 10; $page = 1; while ($start = $count) { $fp = fopen(Page$page.txt, w); mysql_connect ($host, $user, $pass); mysql_select_db ($database); $result = mysql_query (SELECT * FROM internal_listings, agents WHERE internal_listings.agent = agents.name AND category = 'Standard' ORDER by area,price LIMIT $start, $per_page); if ($row = mysql_fetch_array($result)) { do { ##misc ouput to file $fp for 10 records in query } while($row = mysql_fetch_array($result)); } fclose($fp); mysql_close(); $start = $start + $per_page; $page++; } When I run the script outlined above I get 18 pages. Page number 18 is blank as it should be as there should be no more listings to output to a text file but why is there a page number 18 to begin with? It should end with page number 17. Thanks in advance for any insight, Ed -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] comparing two arrays
Hi - I have two arrays that need to be compared. I need to know if their values match or not. Currently I have: $array1 = array(a, b, c, d); $array2 = array(c, d, e, f, g); $intersect = array_intersect($array1,$array2); $num1 = count($array1); $num2 = count($intersect); Then I can compare $num1 to $num2 to see where I stand on the comparison. Less than, greater than, or equal. Only there's a problem with this if there are identical values in an array: $array1 = array(e, e); $array2 = array(c, d, e, f, g); The intersect for this returns e twice instead of the once that I need for my code. It's true that in array1 there was indeed two matches, but in array2 there was only 1 match, and that is the match that matters in my code. Does this make sense? Is there a way to do this that I'm missing...? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Mysql Limit
On Wed, 2 Jul 2003, Jeff Harris wrote: Then, once you've done it enough times, $start = $count = 178. [code] while ($start = $count) { // when $start = $count = 178, you won't retrive any data [/code] The recordset would not alway contain an even number of records resulting in 10 records per page. It may contain something like 1027 records which should then produce 103 pages. 102 pages each with 10 records and one page of only 7 records. Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] print html code
On Wed, 2 Jul 2003 19:40:37 +0200, Karina S wrote: I want to make a php site which can generate a html code and display it on the screen. (Display the code itself.) See if this will do what you want: http://us2.php.net/manual/en/function.highlight-string.php or http://us2.php.net/manual/en/function.highlight-file.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: PHP user group
Searching google.com for 'php user groups' turns up dozens of links. -Dan Joseph -Original Message- From: Ray Hunter [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 2:22 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: PHP user group there use to be phpusergroups.org but not sure if that is still going on... i know of 2 for utah and colorado... 1. Colorado = http://coloradophp.org 2. Utah = http://phpslc.com Perhaps others will add to the list. -- BigDog On Wed, 2003-07-02 at 12:06, erythros wrote: there are php user groups hmmm... there should a listing for that. someone should start a list... i wish there was one near me... Erich Kolb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hi All i need help..
Hi All I want to install PHP under Suse 8.2. How can I do it? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] converting between timezone
Does anyone know of a function or class that can convert timeszones including daylight saving time (DST). You pass it the date/time and the current timezone and the new timezone and it returns the new date/time. I need it to work on a windows platform too. Thanks, Mark. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: print html code
try echo ie... echo pthis is a paragraph/pr\n\; the r\n\ is a return character and newline character. Karina S [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I want to make a php site which can generate a html code and display it on the screen. (Display the code itself.) I use htmlspecialchars() function. It works fine, but now I have to add about 200 lines of static html code to print it out. If I put all of the code in a string than it will appear in a single line. (Maybe it works, but not nice) How can I easy print out more lines of html code with php? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: have some free time?
your links don't work... Kyle Babich [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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] Re: PHP user group
there are php user groups hmmm... there should a listing for that. someone should start a list... i wish there was one near me... Erich Kolb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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 user group
[snip] there are php user groups hmmm... there should a listing for that. someone should start a list... i wish there was one near me... [/snip] If we knew where you were we might be able to point you in the right direction. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] comparing two arrays
Michael A Smith wrote: Look at array_diff() (http://php.net/array_diff). That ought to do what you want. Yes! Thank you :) -Michael On Wed, 2003-07-02 at 10:15, Shena Delian O'Brien wrote: Hi - I have two arrays that need to be compared. I need to know if their values match or not. Currently I have: $array1 = array(a, b, c, d); $array2 = array(c, d, e, f, g); $intersect = array_intersect($array1,$array2); $num1 = count($array1); $num2 = count($intersect); Then I can compare $num1 to $num2 to see where I stand on the comparison. Less than, greater than, or equal. Only there's a problem with this if there are identical values in an array: $array1 = array(e, e); $array2 = array(c, d, e, f, g); The intersect for this returns e twice instead of the once that I need for my code. It's true that in array1 there was indeed two matches, but in array2 there was only 1 match, and that is the match that matters in my code. Does this make sense? Is there a way to do this that I'm missing...? -- Give to a good cause! * http://www.modestneeds.org/ Shena Delian O'Brien * http://www.darklock.com/shena/ The Graphics Kitty! * http://www.darklock.com/abstract/ Fantasy Age * http://www.fantasyage.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passthru() problem
On Wednesday 02 July 2003 22:04, david wrote: I'm trying to get the output of a shell command with PHP This is the command I'm Trying to execute, I also tried using system instead of passthru ?php passthru(ftpwho -v, $return_var); echo $return_var; ? passthru (et al) expects the command argument to be a string. -- 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 -- /* Dental health is next to mental health. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Quick ? ... how come this doesn't work?
On Wednesday 02 July 2003 22:37, Anthony wrote: Please use a descriptive subject! I'm trying to get the 1st and last day of the current week. I ty to do this: $startofweek = date(Y-m-d,mktime (0,0,0,date(m) ,date(d)-date(w),date(Y))); $endofweek = date(Y-m-d,mktime (0,0,0,date(m) ,date(d,strtotime($startofweek))+6,date(Y))); echo $startofweek. --- .$endofweek; $startofweek is correct, but if you run it for a week that has it's beginning date in an other month (like this week), the $endofweek is in the wrong month. What gives? If I change -date(w) to -1 or anything else that stays within the current month, it works. What do you think? Is there a better way to do this? Something simple like this ought to work: echo strftime('%Y-%m-%d', strtotime (Sunday)), \n; echo strftime('%Y-%m-%d', strtotime (last Monday)), \n; For the first day of the week you may need to check whether it is already a Monday (or Sunday depending on your conventions). -- 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 -- /* Afternoon very favorable for romance. Try a single person for a change. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with PHP installation Under windows 2003
Hi there i was bussy with installing the PHP package under windows 2003 when i do it with the CGI bin i ill always get error 404 and ca not find that problem when i use the ASPI way it's can not be loaded.. any idea please tell me. best regards Dennis Verdaasdonk Project Engineer Transics Nederland BV Galvaniweg 15 4207 HL GORINCHEM Nederland Tel:+31(0)183 617886 Fax: +31(0)183 614633 Mobile: +31(0)653924807 E-mail: [EMAIL PROTECTED] Website: http://www.transics.com/ www.transics.com ***DISCLAIMER*** Email transmission cannot be guaranteed to be secure or error free as information may have been intercepted, lost, destroyed, falsified, and may be tardy or incomplete. No guarantee whatsoever can be offered as to the content and integrity of this electronical message. If verification is required, please ask for a hardcopy. This email and any attachments or references thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. If you are not the designated recipient, please delete this message and any attachments thereto and notify the sender by return email. Any use of the information contained herein by persons other than the designated recipient(s) is prohibited. TRANSICS NV explicitly refuses any responsibility ensuing from this message or the improper use thereof. Any damage to a Third Party arising from the improper use of this email or the information contained therein is hereby transmitted to the person who put this email to improper use. This email ought to be free from any viruses that could harm to the computer system of the recipient. TRANSICS NV is in no way liable for any damage caused by any virus transmitted by this email. The conditions mentioned above also apply to any attachments to this email. By reading this email or opening any attachments thereto, you explicitly agree to the above. Thank you for your cooperation.
Re: [PHP] print html code
You could always use PLAINTEXT at the top of the screen. Jim Lucas - Original Message - From: Wendell Brown [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Karina S [EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 11:27 AM Subject: Re: [PHP] print html code On Wed, 2 Jul 2003 19:40:37 +0200, Karina S wrote: I want to make a php site which can generate a html code and display it on the screen. (Display the code itself.) See if this will do what you want: http://us2.php.net/manual/en/function.highlight-string.php or http://us2.php.net/manual/en/function.highlight-file.php -- 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] Hi All i need help..
On Jul 2, 2003, Beogradjanin claimed that: |Hi All I want to install PHP under Suse 8.2. How can I do it? | | | |Thanks Unless you have a custom install, probably the easiest way is to install the rpms through YaST. -- 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 my sql question
On Thursday 03 July 2003 01:47, Jerome A. Jackson/AC/VCU wrote: I have a web site that has my sql installed. YOUR sql? You mean MySQL? The web server is 1st host web and they do not provide much support other than referral to my sql and php web site. I know how to set up a database from a text file then upload to an sql database. Now I want to write code to make it open and access it. As you're posting to a php list then I assume you're going to be writing in php? This is where I am stuck. The web site uses an apache server. Must I install php on my local machine? You don't *need* to install php on your local machine unless you want to test your pages before uploading them. In which case you need to install php on top of a webserver. When I save a web page with a php extension, it defaults to an html page and it will not work when I upload. What exactly do you mean by it defaults to an html page ? Does the webserver on your host have php installed? If not, then you've got the wrong hosting package -- change to one which support php. -- 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 -- /* Many people are desperately looking for some wise advice which will recommend that they do what they want to do. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Connect Active Directory using LDAP... please help :)
Hi everyone, I tried to connect to Active Directory (AD) by using php. I heard that it could use LDAP to achieve it. I have written some code on my machine (Win2000) and try to connect to AD. It looks like the it could connect, bind, and even search (I determined base on the line I placed). However, it return 0 entries. If I used the same filter and use utilites lpd.exe on Windows 2000 Server (the AD machine). I could return some entries. I am hestitating whether do I made some mistake on my program, or something other than my code. Does anyone know what the problem is? Any comment are welcome! Thanks! Vince P.S. Here is my code: HTML HEAD !-- brandcheck.php -- TITLE Brand New Checking.. /TITLE /HEAD BODY pfont size =4AD Test/font/p table width =100% border=1 cellspacing=0 cellpadding=0 ?php $ldaphost= company.com; if(!($ldap = ldap_connect($ldaphost,389))){ die(ldap server cannot be reached); } else { $oudc = dc=company, dc=com; $dn2 = ; $password = ; echo pConnected and ready to bind...; if (!($res = @ldap_bind($ldap, $dn2, $password))) { print(ldap_error($ldap) . BR); die (Could not bind the $dn2); echo pCouldn't bind ; } else { echo pBinded and Ready to search; echo brLDAP = $ldap; echo broudc = $oudc; // $filter=((objectClass=user)(objectCategory=person)(|(sn=sorg))); $filter= sn=*; $sr=ldap_search($ldap,$oudc,$filter); echo pnumber of entries found: . ldap_count_entries($ldap, $sr) . p; echo brfilter = $filter; echo brsr=$sr; if (!$sr) { die(psearch failed\n); } else { echo p Searched and ready for get entries.; $info= ldap_get_entries($ldap, $sr); for ($i=0; $i$info[count]; $i++) { print (TR); print (TD width=15% . $info[$i][cn][0] . . $info[$i][sn][0] . /TD); print (TD width=85% . $info[$i][mail][0] . /TD); print (/TR); print brIn the display FOR loop; } echo br After loop.; } } ldap_unbind($ldap); echo pLDAP unbinded; } ? /table /BODY /HTML Thanks in advance! Vince -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Authentication system
I am in the process of scripting a site which requires authentication. I've no problems with the scripts allowing folk to register, login, logout, change password, etc. However, this morning I've begun to work on providing some security in the form of preventing someone from registering as another person. This site will be limited to those who are members of a particular electronic (religious) community. I want to be able to verify that the person registering as George Fox, for instance, is George Fox. At the point where they fill out the registration form, I am sending them an email, informing them that they have been registered. On many sites I've gone to, the process then includes a requirement that the person reply to the message. Now I need to learn how to take the incoming message and process it. I am assuming that the processing can be done by php. Any suggestions, either on how to do this, or where I might learn how to do this? Doug -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] print html code
Jim Lucas wrote: You could always use PLAINTEXT at the top of the screen. And violate every single HTML standard. AFAIK, plaintext was never a real tag. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] print html code
So what, it would do what was requested. :) Jim Lucas - Original Message - From: Leif K-Brooks [EMAIL PROTECTED] To: Jim Lucas [EMAIL PROTECTED] Cc: Wendell Brown [EMAIL PROTECTED]; [EMAIL PROTECTED]; Karina S [EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 12:30 PM Subject: Re: [PHP] print html code Jim Lucas wrote: You could always use PLAINTEXT at the top of the screen. And violate every single HTML standard. AFAIK, plaintext was never a real tag. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- 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] Authentication system
At the point where they fill out the registration form, I am sending them an email, informing them that they have been registered. On many sites I've gone to, the process then includes a requirement that the person reply to the message. Now I need to learn how to take the incoming message and process it. I am assuming that the processing can be done by php. Any suggestions, either on how to do this, or where I might learn how to do this? You may find it easier to include, in the e-mail, a uniquely-generated, limited-time URL that the person can visit to verify that they have received the e-mail. This will remove the burden of having to set up a system that responds to e-mail commands. - 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] Browscap
Hi everybody, I'm trying to get_browser() function, but everytime I get from my apache could not open browscap.ini for reading. Does someone know how to correct it, or is there any other way how to determine users browser type and OS without using browscap? Thanks Milan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] print html code
In browsers that refuse to follow standards, maybe. Breaking standards is a bad thing. Jim Lucas wrote: So what, it would do what was requested. :) -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] phpDocumentor 1.2.1 release is imminent
Hello, Those of you who found bugs in release 1.2.0 (or 1.2.0a for those who used pear install), please acquire a copy of anonymous cvs, branch RELEASE_1_2_0, and verify that the bug has been fixed, we will be releasing the new version tomorrow or the next day. Anonymous CVS instructions are at http://www.phpdoc.org Regards, Greg -- phpDocumentor http://www.phpdoc.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Calculating Largest Member of Array
I'd like to calculate the largest member of this array without taking into account the first value which is obvisouly not numeric. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php