[PHP] Re: Emtying Variables
Thanks for the tips guys. I'll be using session cookies on another site - need to bone up first though. I decided to post to a new page, that way the user has to click a link to back and in doing so the form reloads and refreshes the data without creating a submission. Cheap and cheerful...! -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What's the best way of emptying my variables once my form has done with them because although I disconnect from the database if the user refreshes the screen it sends another e-mail to me. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: old guy newbie needs some help
Bob. New myself but have started reading around sessions and found that you need two things enabled at the server end: track_vars trans-sid and bruce is right - you need to make sure the session_start command is immediately after the opening PHP tag. -- - Michael Mason Arras People www.arraspeople.co.uk - Bob Imperial [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] While I realize this is elementary to most of you, I am just getting started with php, moving from coldfusion :) I am currently reading through the chapter on sessions and running into a little issue that after making many changes to my php.ini file, I continue to get the following errors while running this: ?php session_start(); echo pYour session ID is .session_id()./p; ? Errors: Warning: session_start(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124, O_RDWR) failed: No such file or directory (2) in c:\inetpub\wwwroot\phptest\listing10.1.php on line 15 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\phptest\listing10.1.php:13) in c:\inetpub\wwwroot\phptest\listing10.1.php on line 15 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\inetpub\wwwroot\phptest\listing10.1.php:13) in c:\inetpub\wwwroot\phptest\listing10.1.php on line 15 Your session ID is ff8651f382492ae56f436690d81ff124 Warning: Unknown(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 sorry this is so elementary but have to start somewhere, I am running php 4 on a win2k box w/IIS5. Though this does return a session id it's obviously not persistent on reload, an example of a session.save_path on a windows box would be great TIA just another old guy trying to learn new stuff. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: easiest way to CREATE XML with PHP5?
Answered my own question: XML_Serializer http://pear.php.net/manual/en/package.xml.xml-serializer.php Good stuff. Nice and easy. Feed it an assoc. array and away it goes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: CGI / PHP max_exec_time
well, my problem was that the fopen hasn't timed out this means i dont have a valid fp to set set_stream_timeout on. Im using fsockopen now and everything should be ok. next thing is - why does cgi php create sh zombies if its started from cron ? regards Head Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Head: mh i tracked the bug down to be an FOPEN on a URL so i need to set a timeout on FOPEN hows that possible ? Using php version 4.3.7 see: http://php.net/stream_set_timeout Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: old guy newbie needs some help
You don't have to put it right at the beginning of the file, it just has to be before any output. Please see: https://www.reversefold.com/tikiwiki/tiki-index.php?page=PHPFAQs#id681470 If that could use better wording and more info, let me know. On Sun, 18 Jul 2004 09:08:26 +0100, Harlequin [EMAIL PROTECTED] wrote: Bob. New myself but have started reading around sessions and found that you need two things enabled at the server end: track_vars trans-sid and bruce is right - you need to make sure the session_start command is immediately after the opening PHP tag. -- - Michael Mason Arras People www.arraspeople.co.uk - Bob Imperial [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] While I realize this is elementary to most of you, I am just getting started with php, moving from coldfusion :) I am currently reading through the chapter on sessions and running into a little issue that after making many changes to my php.ini file, I continue to get the following errors while running this: ?php session_start(); echo pYour session ID is .session_id()./p; ? Errors: Warning: session_start(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124, O_RDWR) failed: No such file or directory (2) in c:\inetpub\wwwroot\phptest\listing10.1.php on line 15 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\phptest\listing10.1.php:13) in c:\inetpub\wwwroot\phptest\listing10.1.php on line 15 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\inetpub\wwwroot\phptest\listing10.1.php:13) in c:\inetpub\wwwroot\phptest\listing10.1.php on line 15 Your session ID is ff8651f382492ae56f436690d81ff124 Warning: Unknown(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 sorry this is so elementary but have to start somewhere, I am running php 4 on a win2k box w/IIS5. Though this does return a session id it's obviously not persistent on reload, an example of a session.save_path on a windows box would be great TIA just another old guy trying to learn new stuff. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php !DSPAM:40fa2ddf325505209020524! -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .lnk extension for windows files / shortcuts
Trejkaz, I'll make you a deal. I'll test out some code for you on my windows box and you test out my code on your linux box. I'm also building unit tests into the package so it should be easy to test everything. In any case, I started testing this out a little more on my box and noticed a few problems on the windows side. Namely, if a filename ends with the .lnk extension (WinXP) then the file is supposed to be a shortcut / link to another file. In this case the realpath can return true, even though opening the file (through the file manager) will actually open up the file it points to. AFAIK this is because links in PHP are simply not supported for windows - you'll have to do that checking manually. function is_absolute($path) { if (PHP_OS == 'WINNT' || PHP_OS == 'WIN32') { $pattern = '/^[a-zA-z]:.*[^.lnk]$/'; return preg_match($pattern, $path); } else { return $path{0} == '/'; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] silly question: an IDE for php?
Not to start flame. I have been writing php using just vim for some time, it is a waste of time to put 'echo' statement everywhere to track variable values. I wonder what do the experienced users on php.net use for php development? Do you use IDE? Do you use Zend? Is there an alternative free (free as in 'beer') IDE rather than Zend that I can use to track variables, analize code and so like? I heard of bluefish, is it widely used? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Is Function Constants the Correct Term?
pre ? define(LOGIN,user); define(PASS,pass); define(DB,mysql); function dblogin($login,$pass,$db) { $mysql = mysql_connect(localhost,$login,$pass); mysql_select_db($db,$mysql); } ? /pre If you're trying to protect your login credentials, you could create a class for performing mysql actions. Then put the credentials into private/protected members or constants. ?php // This is an example. Using protected members instead of constants would be // more flexible (you can extend the class with wrappers for each database). class MySQL { const HOST = 'your_DSN'; const USER = 'Monty_Python'; const PASS = 'Your_father_was_a_hamster_and_your_mother_smelled_of_elderberries'; function __construct() { $this-connect(); } function connect () { mysql_connect(self::HOST, self::USER, self::PASS); } // query methods, etc. } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Book Required
[EMAIL PROTECTED] wrote: Programming PHP by O`Reilly :) Write-up says it STILL uses MySQL as it's database material ;( I don't know what Write-up you are refering to. The book is not tied to MySQL. It mentions it only as one of the many databases that PHP supports. The examples that I see, unless I missed something, on accessing a database from PHP use PEAR DB. So, I think this Write-up is misleading. http://www.oreilly.com/catalog/progphp/desc.html Programming PHP an excellent book. Probably, but given the stuff listed on the Full Description, I don't think it is worth my money ;) It's not clear to me what you mean by NON MYSQL books, so I don't know what to recommend. There are other books that teach PHP without focusing on MySQL. For instance, Core PHP programming has chapters for several different databases. PHP Developer's Cookbook shows how to make your programs database independent. PHP cookbook mainly shows database access using PEAR DB. PHP Bible focuses on MySQL and Oracle when showing how to write scripts for database use. There are others. This - I think - highlights the problem. *I* have been programing for 25+ years, but only switched to PHP last year. I decided not to worry too much about PHP4, and have only run with the Beta PHP5. PEAR DB was kicked in touch early on - ADOdb does everything I want, and is used by every third party package I use. MySQL has never had the facilities I have grown used to with Interbase/Firebird for the last several years, and it will be another year (or more) before they add the power that Firebird has in the engine with stored procedures, triggers and events - removing the need for a lot of in-line coding, and helping to load share. Bottom line, the on-line articles and examples are always going to be more use than a book, and the PHP manual is probably one of the best pieces of on-line material available :) -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using and Echoing Session Variables
Hi everyone. A few quick pointers if you have time... I've created a session, easy enough: ?php session_start(); ? I've created variables: $_SESSION['UserID'] = UserID; $_SESSION['Authorised']=yes; $_SESSION['logname'] = $logname; When a user clicks a link to a test page I created the following doesn't work though: echo $_SESSION[UserID]; Do I need to use the (again): ?php session_start(); ? ??? Confused...! Also - rather than list the session variables the way I am new line session, new line session etc. is there a better way...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
Harlequin wrote: Hi everyone. A few quick pointers if you have time... I've created a session, easy enough: ?php session_start(); ? I've created variables: $_SESSION['UserID'] = UserID; $_SESSION['Authorised']=yes; $_SESSION['logname'] = $logname; When a user clicks a link to a test page I created the following doesn't work though: echo $_SESSION[UserID]; Do I need to use the (again): ?php session_start(); ? Yep - any time you want sessions you need to start them (every page). This can be avoided with a php.ini setting, but that is just evil so we'll pretend I didn't suggest that :) ??? Confused...! Also - rather than list the session variables the way I am new line session, new line session etc. is there a better way...? The way you're assigning session variables is fine. There are other ways you *could* do it; what are you aiming for? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
you need to call session_start() on every page, yes. Also, if you're bored with assigning values like that, and you're sure you're not overwriting anything, you could try: $_SESSION = array('UserId'='userid', 'Authorised'='yes','etc'='blah'); However, remember that you don't need to REassign values to $_SESSION to keep them stored over multiple visits! :) hope that helps, - Tul Harlequin wrote: Hi everyone. A few quick pointers if you have time... I've created a session, easy enough: ?php session_start(); ? I've created variables: $_SESSION['UserID'] = UserID; $_SESSION['Authorised']=yes; $_SESSION['logname'] = $logname; When a user clicks a link to a test page I created the following doesn't work though: echo $_SESSION[UserID]; Do I need to use the (again): ?php session_start(); ? ??? Confused...! Also - rather than list the session variables the way I am new line session, new line session etc. is there a better way...? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Book Required
This - I think - highlights the problem. *I* have been programing for 25+ years, but only switched to PHP last year. I decided not to worry I would love to hear why you switched... although some might consider it off topic. too much about PHP4, and have only run with the Beta PHP5. PEAR DB was kicked in touch early on - ADOdb does everything I want, and is used by every third party package I use. MySQL has never had the facilities I have grown used to with Interbase/Firebird for the last several years, and it will be another year (or more) before they add the power that Firebird has in the engine with stored procedures, triggers and events - removing the need for a lot of in-line coding, and helping to load share. Bottom line, the on-line articles and examples are always going to be more use than a book, and the PHP manual is probably one of the best pieces of on-line material available :) I'd also add PEAR to your list. In general their libraries are very well written and serve as a good example codebase for PHP5. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
I've no problem declaring variables that way - used to it from VB anyway. Just wondered if there was a better way that's all. -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: Hi everyone. A few quick pointers if you have time... I've created a session, easy enough: ?php session_start(); ? I've created variables: $_SESSION['UserID'] = UserID; $_SESSION['Authorised']=yes; $_SESSION['logname'] = $logname; When a user clicks a link to a test page I created the following doesn't work though: echo $_SESSION[UserID]; Do I need to use the (again): ?php session_start(); ? Yep - any time you want sessions you need to start them (every page). This can be avoided with a php.ini setting, but that is just evil so we'll pretend I didn't suggest that :) ??? Confused...! Also - rather than list the session variables the way I am new line session, new line session etc. is there a better way...? The way you're assigning session variables is fine. There are other ways you *could* do it; what are you aiming for? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
OK, so here's my conundrum... After verifying the user and pulling all fields from the record I declare two variables (just testing here): $_SESSION['UserID'] = UserID; $_SESSION['FurtherComments'] = FurtherComments; on the next page I start a session, everything OK. I echo the UserID variable - fine. But the FurtherComments variable simply echoes FurtherComments even though there's a database field called FurtherComments. Strange one... -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi everyone. A few quick pointers if you have time... I've created a session, easy enough: ?php session_start(); ? I've created variables: $_SESSION['UserID'] = UserID; $_SESSION['Authorised']=yes; $_SESSION['logname'] = $logname; When a user clicks a link to a test page I created the following doesn't work though: echo $_SESSION[UserID]; Do I need to use the (again): ?php session_start(); ? ??? Confused...! Also - rather than list the session variables the way I am new line session, new line session etc. is there a better way...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
Harlequin wrote: OK, so here's my conundrum... After verifying the user and pulling all fields from the record I declare two variables (just testing here): $_SESSION['UserID'] = UserID; now contains the string / constant UserID $_SESSION['FurtherComments'] = FurtherComments; now contains the string / constant FurtherComments on the next page I start a session, everything OK. I echo the UserID variable - fine. But the FurtherComments variable simply echoes FurtherComments even though there's a database field called FurtherComments. You'd need to do the actual call to your database and select the FurtherComments field, then assign the result of that query to $_SESSION['FurtherComments']. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
Thanks very much Tularis :) -- - Michael Mason Arras People www.arraspeople.co.uk - Tularis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] you need to call session_start() on every page, yes. Also, if you're bored with assigning values like that, and you're sure you're not overwriting anything, you could try: $_SESSION = array('UserId'='userid', 'Authorised'='yes','etc'='blah'); However, remember that you don't need to REassign values to $_SESSION to keep them stored over multiple visits! :) hope that helps, - Tul Harlequin wrote: Hi everyone. A few quick pointers if you have time... I've created a session, easy enough: ?php session_start(); ? I've created variables: $_SESSION['UserID'] = UserID; $_SESSION['Authorised']=yes; $_SESSION['logname'] = $logname; When a user clicks a link to a test page I created the following doesn't work though: echo $_SESSION[UserID]; Do I need to use the (again): ?php session_start(); ? ??? Confused...! Also - rather than list the session variables the way I am new line session, new line session etc. is there a better way...? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
Michael session_start() starts and resumes a session placing it in script that is being called will make the variable visible. Mike
[PHP] Re: Using and Echoing Session Variables
So If I needed say 10 session variables all based on field values in the database I'd have to execute 10 separate queries and assign each variable separately...? If that's the case then fine - as I only need do it once I know, but it does seem a rather long winded way of doing things. -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: OK, so here's my conundrum... After verifying the user and pulling all fields from the record I declare two variables (just testing here): $_SESSION['UserID'] = UserID; now contains the string / constant UserID $_SESSION['FurtherComments'] = FurtherComments; now contains the string / constant FurtherComments on the next page I start a session, everything OK. I echo the UserID variable - fine. But the FurtherComments variable simply echoes FurtherComments even though there's a database field called FurtherComments. You'd need to do the actual call to your database and select the FurtherComments field, then assign the result of that query to $_SESSION['FurtherComments']. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
Harlequin wrote: So If I needed say 10 session variables all based on field values in the database I'd have to execute 10 separate queries and assign each variable separately...? If that's the case then fine - as I only need do it once I know, but it does seem a rather long winded way of doing things. Yes, this is pretty much the case. If you *really* wanted to you could avoid this by writing your own session handler - your custom session handler could then read/write each index into db columns if you want. The default handler acts the way it does because you might want to use non-db sources of information, or different databases, etc. http://www.php.net/session_set_save_handler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Book Required
Jason Barnett wrote: This - I think - highlights the problem. *I* have been programing for 25+ years, but only switched to PHP last year. I decided not to worry I would love to hear why you switched... although some might consider it off topic. All of my systems last century used Borland C++ and then Builder ( I never switched TO Delphi ;) ) Just like Borland's decision in 1999 to kill Interbase, their latest move to 'kill' BuilderC has left a bad taste in every Borland old timers mouth! At the same time more pressure was coming to remove the use of proprietary code on terminals, so a switch to web based access has been happening over the last couple of years. After playing with a number of options, Apache/PHP/Firebird settled as a good base that would run on Windows for those sites that insisted, or Linux for those already converted. I recently did a paper on Firebird and PHP at the Firebird conference, at which time a check back through the facts only improved the belief that I have made the right choice. too much about PHP4, and have only run with the Beta PHP5. PEAR DB was kicked in touch early on - ADOdb does everything I want, and is used by every third party package I use. SNIP I'd also add PEAR to your list. In general their libraries are very well written and serve as a good example codebase for PHP5. No thanks - someone will have to do a VERY good sales pitch on that now, it was a right pig last year, and now I can't be bothered to waste any more time on it :) The OTHER reason PHP was the right choice is the vast range of open source packages available that have proven to work easily with ADOdb and Firebird. -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SpanCease 'crap'
I have just had a message asking me to verify my eMail for this list. On clicking on the link it asks me to copy the numbers from the image into the text box, but the image is just a blank cyan grid. Can anybody responsible for starting this shead any light? -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
Jason Would there be anything wrong with using an include statement at the top of every page and the include page could then start a session, execute queries etc or would the session not start as it's not the first line in the page...? -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: So If I needed say 10 session variables all based on field values in the database I'd have to execute 10 separate queries and assign each variable separately...? If that's the case then fine - as I only need do it once I know, but it does seem a rather long winded way of doing things. Yes, this is pretty much the case. If you *really* wanted to you could avoid this by writing your own session handler - your custom session handler could then read/write each index into db columns if you want. The default handler acts the way it does because you might want to use non-db sources of information, or different databases, etc. http://www.php.net/session_set_save_handler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
Harlequin wrote: Jason Would there be anything wrong with using an include statement at the top of every page and the include page could then start a session, execute queries etc or would the session not start as it's not the first line in the page...? That's completely fine. The main thing is, you just want to have session keys get written before you start sending output. Just to throw out another idea... Do you plan on having session keys used for *every* page? If so, then you could set your php.ini auto_prepend_file to automatically process your session script for every request. The main downside is if you have pages that don't really need the session vaiables then you'll be wasting resources when serving those pages. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
Jason Barnett wrote: Harlequin wrote: Jason Would there be anything wrong with using an include statement at the top of every page and the include page could then start a session, execute queries etc or would the session not start as it's not the first line in the page...? That's completely fine. The main thing is, you just want to have session keys get written before you start sending output. Scratch that... you can modify session keys after you've started sending output. Jeez, I need to get to sleep :) Just to throw out another idea... Do you plan on having session keys used for *every* page? If so, then you could set your php.ini auto_prepend_file to automatically process your session script for every request. The main downside is if you have pages that don't really need the session vaiables then you'll be wasting resources when serving those pages. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [pgsql] connectivity problem
I have the following code [CODE] ?php $dbconn3 = pg_connect(host=somehost port=5432 dbname=adatabase user=postgres); ? [/CODE] And when i run the script I get Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: missing or erroneous pg_hba.conf file I have searched for pg_hba.conf, but I don't have it. Where should it be and what should it contain? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] (PHP5) Getting parent node from a DOMnode object
Hello everyone, I am usinng the following code to convert an xpath to a node. I was wondering if there is any way I can get the parent node of $node from the code below. Is there any other way that I can convert the xpath to the corresponding parent node? ? // Code for loading $dom_doc comes here $xpath = new DOMXPath($dom_doc); $path = $xpath-query($path); $node = $path-item(0); // Get the first node always ? Any help will be appreciated. Thanks - Sid -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [pgsql] connectivity problem
Well, then something went wrong with your postgres installation. This file should be somewhere in /etc (/etc/postgresql/pg_hba.conf for example). If this is your own system try to search for it, like this for example: find /etc -name pg_hba.conf If it is missing, you can create it yourself, but personally I think you should check WHY you don't have it, may be something more is missing. But to connect to a postgres database I think you need to read some more about postgres at least, so you know how it works and you can decide which way you want to connect to postgres (if you want to use the safe ident authentication, for example) I can paste some default entries into this mail for you (version 7.4.3): # TYPE DATABASEUSERIP-ADDRESSIP-MASK METHOD # Database administrative login by UNIX sockets local all postgresident sameuser # # All other connections by UNIX sockets local all all ident sameuser # # All IPv4 connections from localhost hostall all 127.0.0.1 255.255.255.255 ident sameuser # # All IPv6 localhost connections hostall all ::1 :::::: :ident sameuser hostall all :::127.0.0.1/128ident sameus er # # reject all other connection attempts hostall all 0.0.0.0 0.0.0.0 reject You can have a free read about postgresql at commandprompt.com, there is a O'Reilly book to be found there, freely available through the Public license. Good luck! Ugh! Blurg. --- When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity. [A. Einstein, 1938] http://jurgenstroo.com This one time, at band camp, Ciprian Constantinescu said: I have the following code [CODE] ?php $dbconn3 = pg_connect(host=somehost port=5432 dbname=adatabase user=postgres); ? [/CODE] And when i run the script I get Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: missing or erroneous pg_hba.conf file I have searched for pg_hba.conf, but I don't have it. Where should it be and what should it contain? -- 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] Is Function Constants the Correct Term?
* Thus wrote gohaku: Hi everyone, I have been experimenting with defining functions as constants. Below is what I am using to test Function Constants: pre ? define(LOGIN,user); define(PASS,pass); define(DB,mysql); define(DBLOGIN,dblogin(LOGIN,PASS,DB)); This is simply not allowed. see: http://php.net/define Hi curt, Can you elaborate on what is not allowed? Are you saying defining function constants are not allowed or are you saying redefining constants are not allowed? Thanks. -gohaku -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is Function Constants the Correct Term?
I have been experimenting with defining functions as constants. Below is what I am using to test Function Constants: pre ? define(LOGIN,user); define(PASS,pass); define(DB,mysql); define(DBLOGIN,dblogin(LOGIN,PASS,DB)); This is simply not allowed. see: http://php.net/define Can you elaborate on what is not allowed? Are you saying defining function constants are not allowed or are you saying redefining constants are not allowed? I believe the answer is that both concepts are not allowed. Constants, by their very definition, cannot be redefined (except for magic constants, which is a different thing). Also, constants must be set as scalar values. PHP doesn't support function-like macros as you might have seen in the C preprocessor. This is all in the PHP manual, under define() and constants. Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.net like doc pages
Ed Lazor wrote: phpNuke is also popular. And plenty of bugs and security holes ... Regards, Jordi. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [pgsql] connectivity problem
The file has to be only on the remote server (the one running the database) or on my server also? Jurgen Stroo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Well, then something went wrong with your postgres installation. This file should be somewhere in /etc (/etc/postgresql/pg_hba.conf for example). If this is your own system try to search for it, like this for example: find /etc -name pg_hba.conf If it is missing, you can create it yourself, but personally I think you should check WHY you don't have it, may be something more is missing. But to connect to a postgres database I think you need to read some more about postgres at least, so you know how it works and you can decide which way you want to connect to postgres (if you want to use the safe ident authentication, for example) I can paste some default entries into this mail for you (version 7.4.3): # TYPE DATABASEUSERIP-ADDRESSIP-MASK METHOD # Database administrative login by UNIX sockets local all postgresident sameuser # # All other connections by UNIX sockets local all all ident sameuser # # All IPv4 connections from localhost hostall all 127.0.0.1 255.255.255.255 ident sameuser # # All IPv6 localhost connections hostall all ::1 :::::: :ident sameuser hostall all :::127.0.0.1/128ident sameus er # # reject all other connection attempts hostall all 0.0.0.0 0.0.0.0 reject You can have a free read about postgresql at commandprompt.com, there is a O'Reilly book to be found there, freely available through the Public license. Good luck! Ugh! Blurg. -- - When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity. [A. Einstein, 1938] http://jurgenstroo.com This one time, at band camp, Ciprian Constantinescu said: I have the following code [CODE] ?php $dbconn3 = pg_connect(host=somehost port=5432 dbname=adatabase user=postgres); ? [/CODE] And when i run the script I get Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: missing or erroneous pg_hba.conf file I have searched for pg_hba.conf, but I don't have it. Where should it be and what should it contain? -- 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] Is Function Constants the Correct Term?
The specific statements: From http://us2.php.net/manual/en/language.constants.php 'Once a constant is defined, it can never be changed or undefined.' 'Only scalar data (boolean, integer, float and string) can be contained in constants.' 'Constants may not be redefined or undefined once they have been set' 'Constants may only evaluate to scalar values' Unambiguous. To paraphrase the comments from the old ANSI C group, Any violation of the rules may cause missles to fly from your nose. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] old guy newbie needs some help
Bob Imperial wrote: Warning: session_start(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124, O_RDWR) failed: No such file or directory (2) in c:\inetpub\wwwroot\phptest\listing10.1.php on line 15 You just need to set session.save_path in you php.ini file or use session_save_path() before you call session_start(). Either way, the path needs to be set to a valid path on your machine that the web server has access to read and write from. It looks like you're using IIS, so either set up the directory so Everyone can read/write from it or the IUSR_computername user, which is what IIS runs as. You are getting the error because PHP is looking for a /tmp folder (by default) which doesn't exist on your machine. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
My intention is: Include a file 1st line on file starts session Include another file, this will execute all the queries I need and set session variables. -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: Jason Would there be anything wrong with using an include statement at the top of every page and the include page could then start a session, execute queries etc or would the session not start as it's not the first line in the page...? That's completely fine. The main thing is, you just want to have session keys get written before you start sending output. Just to throw out another idea... Do you plan on having session keys used for *every* page? If so, then you could set your php.ini auto_prepend_file to automatically process your session script for every request. The main downside is if you have pages that don't really need the session vaiables then you'll be wasting resources when serving those pages. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Emtying Variables
On Sun, 18 Jul 2004 11:29:25 +1000 Trejkaz Xaoza [EMAIL PROTECTED] wrote: Php wrote: And you can also used a php variable to detect multiple submit: Even better would be using a token which you give to the user when the form is displayed. That way they can't accidentally submit the form on first entry to the site (and believe me, this can happen, because Konqueror occasionally remembers a form submission page was in its window the last time it was run, and tries to reload the page!) In order to tackle reload issues, I prefer to use 3 scripts: A: one to display the form B: one to receive it through POST and process it (ie. send email) C: one to display an OK or error message Of course, depending on situation, two or more of the above can be the same script behaving differently. To avoid the reload problem, moving from step B to step C is done via: header($_SERVER['SERVER_PROTOCOL'].' 303 See Other'); header('Location: C_script_here'); The 303 response forces the browser to use GET for the redirect location. So no matter how many times the user reloads C they will only get the OK or error message, no actuall re-processing is performed. And because the redirect was done via HTTP 3xx code, not JavaScript, if the user uses BACK in the browser they go directly to A. For all purposes, B is invisible to the user. -- Skippy - Romanian Web Developers - http://ROWD.ORG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Is Function Constants the Correct Term?
On Sun, 18 Jul 2004 05:44:21 -0400 Jason Barnett [EMAIL PROTECTED] wrote: If you're trying to protect your login credentials, you could create a class for performing mysql actions. Then put the credentials into private/protected members or constants. How does that protect them? Ultimately, the credentials are still plain text in the source. Nothing you do from PHP's point of view will protect them from someone who has access to the source or can inject code into yours. -- Skippy - Romanian Web Developers - http://ROWD.ORG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: silly question: an IDE for php?
A terrific IDE editor. Is a low cost shareware. http://www.waterproof.fr/ Zhang Weiwu wrote: Not to start flame. I have been writing php using just vim for some time, it is a waste of time to put 'echo' statement everywhere to track variable values. I wonder what do the experienced users on php.net use for php development? Do you use IDE? Do you use Zend? Is there an alternative free (free as in 'beer') IDE rather than Zend that I can use to track variables, analize code and so like? I heard of bluefish, is it widely used? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Using and Echoing Session Variables
On Sunday 18 July 2004 18:49, Harlequin wrote: So If I needed say 10 session variables all based on field values in the database I'd have to execute 10 separate queries and assign each variable separately...? You don't *need* to perform 10 separate queries unless you *have* to. -- 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 -- /* Most public domain software is free, at least at first glance. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: CGI / PHP max_exec_time
On Sunday 18 July 2004 16:28, Head wrote: next thing is - why does cgi php create sh zombies if its started from cron ? If you're invoking PHP from a shell then you really should be using the CLI version. -- 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 -- /* Go away, I'm all right. -- H.G. Wells' last words. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: old guy newbie needs some help
On Sunday 18 July 2004 16:08, Harlequin wrote: New myself but have started reading around sessions and found that you need two things enabled at the server end: track_vars Recent versions of PHP have track_vars enabled, period. trans-sid I believe you mean: session.use_trans_sid This is not strictly needed. It is only needed if you want to support clients that have disabled all forms of cookies. Read the docs for more info. and bruce is right - you need to make sure the session_start command is immediately after the opening PHP tag. Not strictly correct. Use session_start() *before* *any* *output* - the archives keep pointing this out. A quick search on the error message cannot send headers will lead to loads of answers. Yet people still keep asking this question over and over. -- 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 -- /* Divide the number of servings by two when reading the directions for reconstituting anything freeze-dried -- Murphy's Laws of Camping n16 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SpanCease 'crap'
On Sunday 18 July 2004 19:13, Lester Caine wrote: I have just had a message asking me to verify my eMail for this list. On clicking on the link it asks me to copy the numbers from the image into the text box, but the image is just a blank cyan grid. Can anybody responsible for starting this shead any light? It's displayed in 'invisible' ink. Try viewing using ultraviolet light. -- 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 -- /* The executioner is, I hear, very expert, and my neck is very slender. -- Anne Boleyn */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [pgsql] connectivity problem
On Sunday 18 July 2004 23:06, Ciprian Constantinescu wrote: The file has to be only on the remote server (the one running the database) or on my server also? On the server. You have not installed postgresql correctly. This is not a PHP issue. Refer to the postgresql docs, or ask on the postgresql list. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I had pancake makeup for brunch! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SpanCease 'crap'
Jason Wong wrote: On Sunday 18 July 2004 19:13, Lester Caine wrote: I have just had a message asking me to verify my eMail for this list. On clicking on the link it asks me to copy the numbers from the image into the text box, but the image is just a blank cyan grid. Can anybody responsible for starting this shead any light? It's displayed in 'invisible' ink. Try viewing using ultraviolet light. Any idea what frequency light I need ;) Had TWO more requests now with exactly the same problem. Is anybody else having the same trouble with this ? -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SpanCease 'crap'
On Monday 19 July 2004 01:58, Lester Caine wrote: Jason Wong wrote: On Sunday 18 July 2004 19:13, Lester Caine wrote: I have just had a message asking me to verify my eMail for this list. On clicking on the link it asks me to copy the numbers from the image into the text box, but the image is just a blank cyan grid. Can anybody responsible for starting this shead any light? Are you saying that you sent some message to this list and got back a message asking you to click on a link to confirm that you're not a spammer? If so then I misunderstood your problem. I originally thought that you got this as a result of trying to subscribe to the list so I tried subscribing just now and got the usual *reply* to confirm message. All I can say is !stop sending spam! If it happens every time and you're positive there's nothing in the contents of your mail that suggests spam then try sending your mail through a different mailserver. It's displayed in 'invisible' ink. Try viewing using ultraviolet light. Any idea what frequency light I need ;) You should use the lastest models which have auto frequency calibration. -- 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 -- /* My father was a God-fearing man, but he never missed a copy of the New York Times, either. -- E.B. White */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Book Required
In a message dated 7/18/2004 2:58:49 AM Pacific Daylight Time, [EMAIL PROTECTED] writes: [EMAIL PROTECTED] wrote: Programming PHP by O`Reilly :) Write-up says it STILL uses MySQL as it's database material ;( I don't know what Write-up you are refering to. The book is not tied to MySQL. It mentions it only as one of the many databases that PHP supports. The examples that I see, unless I missed something, on accessing a database from PHP use PEAR DB. So, I think this Write-up is misleading. http://www.oreilly.com/catalog/progphp/desc.html I'm still apparently not understanding what you mean by non-MySQL. I looked at the write-up at the link above and the only sentence I found in the entire write-up that mentioned MySQL was the following: Material on interacting with relational databases, such as MySQL and Oracle, using the database-independent PEAR DB library This sentence says that the book uses PEAR DB, not MySQL. It is database independent. From your other comments, I have the impression you don't want to use this book for other reasons, such as preferring ADOdb to PEAR DB. But I don't understand why you think this book is focussed on MySQL. I'm sorry to go on about this. I'm just concerned that someone reading these messages might be considering buying Programming PHP and get the impression that it is a PHP and MySQL book. It is not. It is database independent. I'm quite sure about this. I know this book well. I love it. I use this book almost every day. I promise I won't write any more on this subject. Janet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SpanCease 'crap'
On Sun, 18 Jul 2004 12:13:14 +0100, Lester Caine [EMAIL PROTECTED] wrote: I have just had a message asking me to verify my eMail for this list. On clicking on the link it asks me to copy the numbers from the image into the text box, but the image is just a blank cyan grid. Can anybody responsible for starting this shead any light? I got the same mail and the image worked fine in Firefox for me. Perhaps you should try a different browser? If that doesn't help, try turning off your firewall if you have one. -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] List mail going to spam in gmail
Most of the mails from php-general is going is marked as spam. is anyone else experiencing the same? Manoj -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Piping Error
I am working on creating a tool that processes mail for a support system. The script works, but still sends a bounce message. Code: http://www.janix.net/test/mail.phps When the script processes the e-mail, it sends a bounce with the output of the script. I got rid of the output in the bounce by adding -q to the first line, but I still get the following error in the bounce. - This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |/home/janix/www/test/rcvmail.php generated by [EMAIL PROTECTED] The following text was generated during the delivery attempt: -- pipe to |/home/janix/www/test/rcvmail.php generated by [EMAIL PROTECTED] -- - The server uses Sendmail. Does anyone have any idea what is causing this bounce and how I can fix it? -- Jason Williard [EMAIL PROTECTED] // www.jasondubya.com // -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SpanCease 'crap'
Justin Patrin wrote: I have just had a message asking me to verify my eMail for this list. On clicking on the link it asks me to copy the numbers from the image into the text box, but the image is just a blank cyan grid. Can anybody responsible for starting this shead any light? I got the same mail and the image worked fine in Firefox for me. Perhaps you should try a different browser? If that doesn't help, try turning off your firewall if you have one. I run the latest Mozilla, and the 'firewall' is my ADSL router so I can't change that. Since you are not seeing a problem with Firefox there is obviously something else wrong which I can see no mention of on the SpamCease site. I've asked the question direct to them, but obviously we have another chicken/egg situation, and they will not bother to read my eMail until I 'confirm' the very page I am having trouble with ;) I have re-enabled IE, copied the number(s) and killed IE again, but THAT is not something that should need to be done when using the latest version of Mozilla ? -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SpanCease 'crap'
Jason Wong wrote: Are you saying that you sent some message to this list and got back a message asking you to click on a link to confirm that you're not a spammer? If so then I misunderstood your problem. I originally thought that you got this as a result of trying to subscribe to the list so I tried subscribing just now and got the usual *reply* to confirm message. Like Justin, I got an email in response to a previous post that indicated that php.general is now protected by SpamCease and requested I confirmed who I was if I wanted to continue posting. All I can say is !stop sending spam! If it happens every time and you're positive there's nothing in the contents of your mail that suggests spam then try sending your mail through a different mailserver. Being a moderator on several lists and running several remote websites, changing my mail facilities is not practical. The problem has been fixed by running crappy IE to confirm the various emails and then striping it off again - something which I have no wish to do again ! So *IS* php.general now being routed through SpamCease, or is something else going on - anybody? -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: old guy newbie needs some help
On Mon, 19 Jul 2004 01:41:49 +0800 Jason Wong [EMAIL PROTECTED] wrote: Not strictly correct. Use session_start() *before* *any* *output* - the archives keep pointing this out. A quick search on the error message cannot send headers will lead to loads of answers. Yet people still keep asking this question over and over. Some of the newbies can't really help it. It's somewhat non-intuitive to realise that session_start() will issue send HTTP headers, which in turn must be issued before regular output. Personally, I'd suggest always starting a script with ob_start(), this way the whole load of problems created by HTTP headers dissapears. -- Skippy - Romanian Web Developers - http://ROWD.ORG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Q] Regex Woes
All, This should be dirt simple -- So simple, in fact, that I'm somewhat embarassed to make this post, but, oh well I need to find all lines that begin with the string 'WAZ' after reading from a url (http://www.atmos.washington.edu/data/zone_report.KSEW.html). While I've tried every combination of expressions under the sun (using the functions preg_match(), ereg()), I can not figure out a correct regexp for this task. I trim each line before submitting to preg_match() or ereg(). I also strip out the tags except for p and br. Would some kind sould show me the correct regexp? By the way, one of the simplest expressions, to follow the suggestion in the PHP Manual, is just '/WAZ/' or '/^WAZ/'. The former doesn't match WAZ anywhere in the string, and the latter doesn't find a match when WAZ is at the beginning of the string. Cheers, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List mail going to spam in gmail
Nope, mine go in the right placeunless it's spam. ;-) Make sure to click Not Spam so that you show it that it's not supposed to be spam. On Sun, 18 Jul 2004 20:23:42 +0100, Manoj Nahar [EMAIL PROTECTED] wrote: Most of the mails from php-general is going is marked as spam. is anyone else experiencing the same? Manoj -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php !DSPAM:40facc36215652015120550! -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Piping Error
It could possibly be the return value of the script. It could also be that some blank output is happening. Try adding this to the command line: /dev/null 21 This will send all output to /dev/null and send all error output alto to /dev/null. On Sun, 18 Jul 2004 12:57:04 -0700, Jason Williard [EMAIL PROTECTED] wrote: I am working on creating a tool that processes mail for a support system. The script works, but still sends a bounce message. Code: http://www.janix.net/test/mail.phps When the script processes the e-mail, it sends a bounce with the output of the script. I got rid of the output in the bounce by adding -q to the first line, but I still get the following error in the bounce. - This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |/home/janix/www/test/rcvmail.php generated by [EMAIL PROTECTED] The following text was generated during the delivery attempt: -- pipe to |/home/janix/www/test/rcvmail.php generated by [EMAIL PROTECTED] -- - The server uses Sendmail. Does anyone have any idea what is causing this bounce and how I can fix it? -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SpanCease 'crap'
On Sun, 18 Jul 2004 21:32:15 +0100, Lester Caine [EMAIL PROTECTED] wrote: Jason Wong wrote: Are you saying that you sent some message to this list and got back a message asking you to click on a link to confirm that you're not a spammer? If so then I misunderstood your problem. I originally thought that you got this as a result of trying to subscribe to the list so I tried subscribing just now and got the usual *reply* to confirm message. Like Justin, I got an email in response to a previous post that indicated that php.general is now protected by SpamCease and requested I confirmed who I was if I wanted to continue posting. All I can say is !stop sending spam! If it happens every time and you're positive there's nothing in the contents of your mail that suggests spam then try sending your mail through a different mailserver. Being a moderator on several lists and running several remote websites, changing my mail facilities is not practical. The problem has been fixed by running crappy IE to confirm the various emails and then striping it off again - something which I have no wish to do again ! As I said, I could see it in FireFox just fine So *IS* php.general now being routed through SpamCease, or is something else going on - anybody? No no, php-general isn't geing run through this service. One of the subscribers is using it, so when an e-mail goes to them through the list it wants you to confirm that you're not a spammer. -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Q] Regex Woes
Michael T. Peterson wrote: I need to find all lines that begin with the string 'WAZ' after reading from a url (http://www.atmos.washington.edu/data/zone_report.KSEW.html). While I've tried every combination of expressions under the sun (using the functions preg_match(), ereg()), I can not figure out a correct regexp for this task. This works. Read the entire file into a string (file_get_contents() works great here) and pass to this regex. $matches[0] will have your lines that start with WAZ. Example: ?php $file = asdf asdf asdf WAZ this is line 1 asdf asdf asdf asdf WAZ this is another line that should be matches fWAZ this is a line that shouldn't be matches WAZ one more for good measure and a bad one WAZ (whoa, who put that there!) asdf asdf asd fas df asdf; preg_match_all('/^WAZ.*/m',$file,$matches); print_r($matches[0]); ? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] building php5.0 as an apache module, with mysqli functionality
hi... this is cross posted to a number of lists as it seems to touch on all the apps... that said. i'm trying to build the PHP-5.0 version to run as an Apache mod. i need to work with mysql to get the mysqli function. i have rh8.0 linux. i'm using -httpd-2.0.50 (built from both rpm/src) -php-5.0 (building from source) -MySQL-4.1.3 (beta) tried with src/rpms.. -MySQL-Server -MySQL-devel -MySQL-shared my dir structure is pretty much the default i'm trying to build php using the following process ./configure .make clean make make install i'm trying to use the following configure ./configure --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc --with -mysql=/usr/include/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config - -with-ldap --with-pgsql ./configure --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc --with -mysql=/usr/local/mysql/include --with-mysqli=/usr/local/mysql/bin/mysql_co nfig --with-ldap --with-pgsql the issue i'm having is that i can't get make portion to work without returning multiple define errors like [EMAIL PROTECTED] php-5.0.0]# make /bin/sh /usr/src/php-5.0.0/libtool --silent --preserve-dup-deps --mode=link gcc -g -O2 -prefer-pic -rpath /usr/src/php-5.0.0/libs -avoid-version -module -L/usr/local/mysql/lib -R /usr/local/mysql/lib ext/libxml/libxml.lo ext/ctype/ctype.lo ext/dom/php_dom.lo ext/dom/attr.lo ext/dom/document.lo ext/dom/domerrorhandler.lo ext/dom/domstringlist.lo ext/dom/domexception.lo ext/dom/namelist.lo ext/dom/processinginstruction.lo ext/dom/cdatasection.lo ext/dom/documentfragment.lo ext/dom/domimplementation.lo ext/dom/element.lo ext/dom/node.lo ext/dom/string_extend.lo ext/dom/characterdata.lo ext/dom/documenttype.lo ext/dom/domimplementationlist.lo ext/dom/entity.lo ext/dom/nodelist.lo ext/dom/text.lo ext/dom/comment.lo ext/dom/domconfiguration.lo ext/dom/domimplementationsource.lo ext/dom/entityreference.lo ext/dom/notation.lo ext/dom/xpath.lo ext/dom/dom_iterators.lo ext/dom/typeinfo.lo ext/dom/domerror.lo ext/dom/domlocator.lo ext/dom/namednodemap.lo ext/dom/userdatahandler.lo ext/iconv/iconv.lo ext/ldap/ldap.lo ext/mysql/php_mysql.lo ext/mysqli/mysqli.lo ext/mysqli/mysqli_api.lo ext/mysqli/mysqli_prop.lo ext/mysqli/mysqli_nonapi.lo ext/mysqli/mysqli_fe.lo ext/mysqli/mysqli_report.lo ext/mysqli/mysqli_repl.lo ext/pcre/pcrelib/maketables.lo ext/pcre/pcrelib/get.lo ext/pcre/pcrelib/study.lo ext/pcre/pcrelib/pcre.lo ext/pcre/php_pcre.lo ext/pgsql/pgsql.lo ext/posix/posix.lo ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/simplexml/simplexml.lo ext/spl/php_spl.lo ext/spl/spl_functions.lo ext/spl/spl_engine.lo ext/spl/spl_iterators.lo ext/spl/spl_array.lo ext/spl/spl_directory.lo ext/spl/spl_sxe.lo ext/sqlite/sqlite.lo ext/sqlite/sess_sqlite.lo ext/sqlite/libsqlite/src/opcodes.lo ext/sqlite/libsqlite/src/parse.lo ext/sqlite/libsqlite/src/encode.lo ext/sqlite/libsqlite/src/auth.lo ext/sqlite/libsqlite/src/btree.lo ext/sqlite/libsqlite/src/build.lo ext/sqlite/libsqlite/src/delete.lo ext/sqlite/libsqlite/src/expr.lo ext/sqlite/libsqlite/src/func.lo ext/sqlite/libsqlite/src/hash.lo ext/sqlite/libsqlite/src/insert.lo ext/sqlite/libsqlite/src/main.lo ext/sqlite/libsqlite/src/os.lo ext/sqlite/libsqlite/src/pager.lo ext/sqlite/libsqlite/src/printf.lo ext/sqlite/libsqlite/src/random.lo ext/sqlite/libsqlite/src/select.lo ext/sqlite/libsqlite/src/table.lo ext/sqlite/libsqlite/src/tokenize.lo ext/sqlite/libsqlite/src/update.lo ext/sqlite/libsqlite/src/util.lo ext/sqlite/libsqlite/src/vdbe.lo ext/sqlite/libsqlite/src/attach.lo ext/sqlite/libsqlite/src/btree_rb.lo ext/sqlite/libsqlite/src/pragma.lo ext/sqlite/libsqlite/src/vacuum.lo ext/sqlite/libsqlite/src/copy.lo ext/sqlite/libsqlite/src/vdbeaux.lo ext/sqlite/libsqlite/src/date.lo ext/sqlite/libsqlite/src/where.lo ext/sqlite/libsqlite/src/trigger.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/parsedate.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/url_scanner.lo ext/standard/var.lo ext/standard/versioning.lo
[PHP] PHP Form Field Validation
Evening. Just wondering if there's a quick and easy way to validate form fields using PHP. Not really that concerned with actual content by using REGEX but want to ensure users have at-least bothered to put something in and if not display an error with the form field's name maybe. Any suggestions...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Form Field Validation
Hello, On 07/18/2004 07:42 PM, Harlequin wrote: Just wondering if there's a quick and easy way to validate form fields using PHP. Not really that concerned with actual content by using REGEX but want to ensure users have at-least bothered to put something in and if not display an error with the form field's name maybe. Any suggestions...? You may want to try this class that can generate forms that can validate either on the server side or client side: http://www.phpclasses.org/formsgeneration -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Form Field Validation
Harlequin wrote: Just wondering if there's a quick and easy way to validate form fields using PHP. Not really that concerned with actual content by using REGEX but want to ensure users have at-least bothered to put something in and if not display an error with the form field's name maybe. empty() -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error: unexpected T_ELSE on line 14...?
What the hell have I done this time...? Well, more to the point - what gave I missed...? if ($_SESSION[Authorised]=Yes); { // Body ~ Verified User: echo brbrbr; echo pThank you $UserCName, Now please just provide the following information and your aProfile will be loaded.; } else - The offending line...! { echo You need to go back and complete the fields correctly...!; } -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] separating a file extention
Hello all, Is there any easy and efficient way to separate files extention that vary in size? Some have 3 chars after the dot, some 2, some 1, some 4, some none. Examples: test.zip test.gz test.z test.jpeg test.jpg test (no extention) an have the result returned on a $fext field? I think this can also be done with email domains, returning the string right to the at sign. Thanks again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Error: unexpected T_ELSE on line 14...?
I figured it out. Got the semicolon at the end of that first line. Doh...! -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What the hell have I done this time...? Well, more to the point - what gave I missed...? if ($_SESSION[Authorised]=Yes); { // Body ~ Verified User: echo brbrbr; echo pThank you $UserCName, Now please just provide the following information and your aProfile will be loaded.; } else - The offending line...! { echo You need to go back and complete the fields correctly...!; } -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Form Field Validation
Simple as that eh...? If (formfieldname = empty()) { Do something { Else { do something else } ??? am I on the right tracks...? -- - Michael Mason Arras People www.arraspeople.co.uk - John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: Just wondering if there's a quick and easy way to validate form fields using PHP. Not really that concerned with actual content by using REGEX but want to ensure users have at-least bothered to put something in and if not display an error with the form field's name maybe. empty() -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [ mysqli ] how can i define the charset for mysqli
i want to use utf8 charset to connect the mysql4.1.x,and use the mysql charset for tables,columns. but i cant found the charset setting or function in php. how can i do it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [ mysqli ] how can i define the charset for mysqli
i want to use utf8 charset to connect the mysql4.1.x,and use the mysql charset for tables,columns. but i cant found the charset setting or function in php. how can i do it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error: unexpected T_ELSE on line 14...?
Harlequin wrote: if ($_SESSION[Authorised]=Yes); You know this will _always_ be true, don't you? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP5 Java Intgeration
how can I do that in php5 in windows ?
Re: [PHP] PHP Form Field Validation
not enough =s. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Embedded Email Directives
* Thus wrote Manuel Lemos: Hello, On 07/17/2004 03:11 AM, Curt Zirzow wrote: For SMTP, all lines should be ended with CR+LF, or else messages may be discarded by spam filters or other programs. However, if you use the mail() function it may do some filtering on its own. The mail() function does not do any filtering. Read the source first to learn more about it. I have read it, and am very familiar with it. Every time there is a post about mail() and the person is unfamiliar with properly sending SMTP headers or data to sendmail, You *claim* its a bug with php's mail() call without knowing what version of php they are using. You never ask if they are using windows which uses php's built in sendmail tool. Nor do you never ask what MTA that sendmail is really representing. If you pay more attention you may notice that I always say that it *sounds* like a PHP bug. I am not even saying that is necessarily a PHP bug. what ever you are trying to say about it being a bug or not, it is one of the worst ways i've ever seen anyone try to plug their site. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Form Field Validation
On Monday 19 July 2004 07:34, Harlequin wrote: Simple as that eh...? If (formfieldname = empty()) The canonical form is: if (empty($doo)) { ... } -- 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 -- /* The decision doesn't have to be logical; it was unanimous. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Form Field Validation
if (empty($_REQUEST['formfieldname'])) { //do something } else { //do something else } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] building php5.0 as an apache module, with mysqli functionality
On Monday 19 July 2004 06:32, bruce wrote: Wasn't a similar question posted lasted week? Check the archives. this is cross posted to a number of lists as it seems to touch on all the apps... Ths only serves to annoy a greater number of people. -- 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 -- /* Ontogeny recapitulates phylogeny. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Embedded Email Directives
Hello, On 07/18/2004 10:21 PM, Curt Zirzow wrote: For SMTP, all lines should be ended with CR+LF, or else messages may be discarded by spam filters or other programs. However, if you use the mail() function it may do some filtering on its own. The mail() function does not do any filtering. Read the source first to learn more about it. I have read it, and am very familiar with it. Every time there is a post about mail() and the person is unfamiliar with properly sending SMTP headers or data to sendmail, You *claim* its a bug with php's mail() call without knowing what version of php they are using. You never ask if they are using windows which uses php's built in sendmail tool. Nor do you never ask what MTA that sendmail is really representing. If you pay more attention you may notice that I always say that it *sounds* like a PHP bug. I am not even saying that is necessarily a PHP bug. what ever you are trying to say about it being a bug or not, it is one of the worst ways i've ever seen anyone try to plug their site. Wanting or not, the PHP mail() function alone always had many, many bugs, as you may see here: http://bugs.php.net/search.php?cmd=displaystatus=Allbug_type%5B%5D=Mail+related Anyway, I was wondering why would you bother to fight my explanations with so much persistence. In the beginning, it seemed that you were not really aware of the problems, but then you finally revealed yourself when you showed when you said it upsets you that I am one of those people that that try to plug their site. A quick search in Google for your name and it lead to this page. http://pear.php.net/user/curt Hey, you are a PEAR zealot! Now it makes all the sense of the world that you do not want me to lead people to the PHP Classes site. It seems you are one of those people that think of the PHP Classes site as a competitor of PEAR. I would not be surprised if you would enjoy if one day the PHP Classes site was shutdown so PEAR did not have any competitors! Man, relax. The PHP Classes site was not developed to compete with PEAR. As a matter of fact the PHP Classes site was created before PEAR with the specific intention to help me share many of my own classes so they could get as many testing as possible, helping me to improve them with bug reports and feature suggestions of their users. That is my benefit from bothering to spend so much time developing Open Source code and providing support to people that present problems that can be solved with classes that I wrote. I don't know if this interests you, but some time ago I gave an interview to a russian PHP magazine regarding the PHP Classes, its history and initiatives: http://www.phpinside.net/docs/mlemos.html So, it certainly does not bother that PEAR zealots and friends come to the mailing lists and help people recommending PEAR components that solve their problems, why does it bother that I come here and do the same suggesting components that I wrote that happen to be made available in the PHP Classes site (or not)? One suggestion: get over it. Better, if you have written any useful classes that could solve other people's problems, feel free to submit them to the PHP Classes site, even if you have contributed them to PEAR as well, and benefit from the feedback and recognition that you may get from sharing your work to the currently 170,000 subscribers of the site. Several PEAR related classes have been published there already. http://www.phpclasses.org/pear If you have written something innovating, you may even be nominated to the Innovation Award getting more recognition and prizes every month. http://www.phpclasses.org/award/innovation I am serious, welcome aboard! -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Piping Error
On Monday 19 July 2004 03:57, Jason Williard wrote: I am working on creating a tool that processes mail for a support system. The script works, but still sends a bounce message. Code: http://www.janix.net/test/mail.phps When the script processes the e-mail, it sends a bounce with the output of the script. I got rid of the output in the bounce by adding -q to the first line, but I still get the following error in the bounce. This question looks familiar ... a quick search of the archives ... aha, I answered this about two weeks ago: http://marc.theaimsgroup.com/?l=php-generalm=108890333925404w=2 It seems you have solved the output problem. Did you do anything on the exit code front? -- 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 -- /* The New England Journal of Medicine reports that 9 out of 10 doctors agree that 1 out of 10 doctors is an idiot. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [ mysqli ] how can i define the charset for mysqli
On Monday 19 July 2004 07:44, Unreal HSHH wrote: i want to use utf8 charset to connect the mysql4.1.x,and use the mysql charset for tables,columns. but i cant found the charset setting or function in php. how can i do it? Reposting this at 10 minute intervals will very likely annoy people into NOT answering your question. Please wait at least 1 day before reposting in cases of no response. -- 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 -- /* Fortify your front; you'll get your rear shot up -- Murphy's Military Laws n34 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] separating a file extention
On Monday 19 July 2004 07:22, C.F. Scheidecker Antunes wrote: Is there any easy and efficient way to separate files extention that vary in size? Please RTFM. A quick browse through the String functions would have broguht your attention to explode(). But the easiest solution is pathinfo(). -- 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 -- /* No, `Eureka' is Greek for `This bath is too hot.' -- Dr. Who */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] building php5.0 as an apache module, with mysqli functionality
* Thus wrote bruce: hi... this is cross posted to a number of lists as it seems to touch on all the apps... Please don't do this. i'm trying to use the following configure ./configure --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc --with -mysql=/usr/include/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config - -with-ldap --with-pgsql If you read the installation at http://php.net/mysqli, you can not include two versions of mysql and mysqli client libraries. the issue i'm having is that i can't get make portion to work without returning multiple define errors like [EMAIL PROTECTED] php-5.0.0]# make /bin/sh /usr/src/php-5.0.0/libtool --silent --preserve-dup-deps --mode=link [snip way to much output ] Can you compile mysql without mysqli and vise versa without problems? Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error: unexpected T_ELSE on line 14...?
* Thus wrote Harlequin: if ($_SESSION[Authorised]=Yes); { // Body ~ Verified User: echo brbrbr; echo pThank you $UserCName, Now please just provide the following information and your aProfile will be loaded.; } else - The offending line...! { echo You need to go back and complete the fields correctly...!; } You should really work on your indentation*: if ($_SESSION['Authorized'] == 'Yes' ) { echo 'p style=padding-top: 3em;Thank you.../p'; } else { echo 'pYou need to go back.../p'; } * I'll ignore the html part for now :) Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: separating a file extention
I'm a bit confused as to what you mean by posting the list into a text field (do you want to print_r the list?). But an easy, efficient (I think) way to do this is strrpos(). ?php function sort_extensions($a, $b) { $apos = ($pos = strrpos($a, '.')) ? (strlen($a) - $pos) : 0; $bpos = ($pos = strrpos($b, '.')) ? (strlen($b) - $pos) : 0; if ($apos == $bpos) { return 0; } return $apos $bpos ? -1 : 1; } $files = array('test.zip', 'test.gz', 'test.z', 'test.jpeg', 'test.jpg', 'test'); usort($files, 'sort_extensions'); echo 'pre'; print_r($files); echo '/pre'; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] building php5.0 as an apache module, with mysqli functionality
jason... there have been postings/etc... however, as far as i can tell, the posters haven't stated that their issues have been solved. as far as i know, they just gave up.. and said to hell with it!!! nothing in the archives points to a solution... but if you have a solution, and have actually gotten this to work.. it would be good to have a further conversation. peace. ps. as far as annoying someone. i'd rather somebody continue to post meaningful questions, to whomever/whatever lists are relevant, as somebody else might be trying to solve the same issue, or know someone who might have the solution... but this is just my $0.02 worth... which is about the same as anybody else's opinion!! -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Sunday, July 18, 2004 6:54 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] building php5.0 as an apache module, with mysqli functionality On Monday 19 July 2004 06:32, bruce wrote: Wasn't a similar question posted lasted week? Check the archives. this is cross posted to a number of lists as it seems to touch on all the apps... Ths only serves to annoy a greater number of people. -- 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 -- /* Ontogeny recapitulates phylogeny. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Is Function Constants the Correct Term?
If someone has access to the source then yes, you're screwed. But you can put your class library outside of the document root and keep the login information inside the class instead of keeping that information in your web pages. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error: unexpected T_ELSE on line 14...?
Hi, You have two problems in these line: Harlequin said: if ($_SESSION[Authorised]=Yes); 1. The obvious ; at the end of the line. 2. $_SESSION[Authorised]=Yes it's different to write: $_SESSION[Authorised]==Yes Cheers, -- Rodrigo Castro Hernandez -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error: unexpected T_ELSE on line 14...?
1. The obvious ; at the end of the line. 2. $_SESSION[Authorised]=Yes it's different to write: $_SESSION[Authorised]==Yes Gotta love c style languages where variable assignment is like variable comparison. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Embedded Email Directives
Sorry, but I have to respond to this because of the falicies that are involved with the whole issue. * Thus wrote Manuel Lemos: Hello, On 07/18/2004 10:21 PM, Curt Zirzow wrote: If you pay more attention you may notice that I always say that it *sounds* like a PHP bug. I am not even saying that is necessarily a PHP bug. what ever you are trying to say about it being a bug or not, it is one of the worst ways i've ever seen anyone try to plug their site. Wanting or not, the PHP mail() function alone always had many, many bugs, as you may see here: http://bugs.php.net/search.php?cmd=displaystatus=Allbug_type%5B%5D=Mail+related Ok so a lot of bugs have been submited, and I do notice that they are either green or gray. Of which, in case you didn't read the legend. green == CLOSED (aka resolved and fixed!!!) gray == bogus. meaning the person was using the function improperly. One is currently assigned and is related to W32 with a 'rcpt to' issue. The other *only* open one is complaining that the 5th argument isn't working, and if you *look* closely at that open ticket, I'm currently working with him to make sure it isn't a bug with php. Anyway, I was wondering why would you bother to fight my explanations with so much persistence. In the beginning, it seemed that you were not really aware of the problems, but then you finally revealed yourself when you showed when you said it upsets you that I am one of those people that that try to plug their site. I dont have a problem with Jason, Mr. Holmes, raditha or anybody who wishes to plug their work. The problem I have is someone falsely saying that php has a bug somewhere and say that their nifty little class fixes the problem when about 90% of the time it is due to the person not understanding the STMP protocol. I fight your explanations because they simply are bogus and dont have any substance. You claim on about 90% of the replies you make to people having problems with mail() that there is a problem with php, without, and I reiterate again... knowing what version of PHP they are using, what OS they are using, nor do you even take into consideration of what MTA they are using. and unlike what you suggested in one of your replies, MTA's differ greatly in their behaviour and cause a lot of reasons as why mail() simply isn't working. A quick search in Google for your name and it lead to this page. ooh.. http://pear.php.net/user/curt hah.. I didn't even know that existed. Hey, you are a PEAR zealot! Now it makes all the sense of the world that you do not want me to lead people to the PHP Classes site. It seems you are one of those people that think of the PHP Classes site as a competitor of PEAR. I would not be surprised if you would enjoy if one day the PHP Classes site was shutdown so PEAR did not have any competitors! Let me count how many packages i'm a maintainer of... lets see.. 0 + 0 makes ZERO! Ok. now you are *trying* to attack me personally. Why don't you look at all the google results to php-general and see how many times you've seen me suggest PEAR as a solution. You will simply find that I have suggested PEAR mabey 1 or 2 times out of the 3000 or so posts on php-general. If you need to know the reason why that account exists is because I'm a developer of PECL. You might want to do some research before making such idiotic statements. Man, relax. ok. i'm perfectly relaxed. The PHP Classes site was not developed to compete with PEAR. read above. about how I am not at all affiliated with PEAR. As a matter of fact the PHP Classes site was created before PEAR with the specific intention to help me share many of my own classes so they could get as many testing as possible, helping me to improve them with bug reports and feature suggestions of their users. and the saga continues... That is my benefit from bothering to spend so much time developing Open Source code and providing support to people that present problems that can be solved with classes that I wrote. more saga and drama you insist on dragging into this trying to keep you're self superiour to everone else. I don't know if this interests you, but some time ago I gave an interview to a russian PHP magazine regarding the PHP Classes, its history and initiatives: http://www.phpinside.net/docs/mlemos.html oh. someone actually took the time and had an interview with you? Even with these credentials your credibitly is still low, oh wait this is just propoganda of your site that you somehow can't keep out of your replies. So, it certainly does not bother that PEAR zealots and friends come to the mailing lists and help people recommending PEAR components that solve their problems, why does it bother that I come here and do the same suggesting components that I wrote that happen to be made available in the PHP Classes site (or not)? Again, I dont and never use PEAR. I've been here
Re: [PHP] separating a file extention
On 19/07/2004, at 9:22 AM, C.F. Scheidecker Antunes wrote: Is there any easy and efficient way to separate files extention that vary in size? Some have 3 chars after the dot, some 2, some 1, some 4, some none. Examples: test.zip test.gz test.z test.jpeg test.jpg test (no extention) ? $filename = something.foo.bah.jpeg; $bits = explode('.',$filename); $ext = $bits[count($bits)-1]; echo $ext; ? --- Justin French http://indent.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP5 Java Intgeration
Alawi albaity wrote: how can I do that in php5 in windows ? perhaps by reading about it.. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error: unexpected T_ELSE on line 14...?
* Thus wrote Rodrigo Castro Hernandez: Hi, You have two problems in these line: Harlequin said: if ($_SESSION[Authorised]=Yes); 1. The obvious ; at the end of the line. 2. $_SESSION[Authorised]=Yes it's different to write: $_SESSION[Authorised]==Yes nice catch. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Embedded Email Directives
Hello, On 07/19/2004 12:32 AM, Curt Zirzow wrote: If you pay more attention you may notice that I always say that it *sounds* like a PHP bug. I am not even saying that is necessarily a PHP bug. what ever you are trying to say about it being a bug or not, it is one of the worst ways i've ever seen anyone try to plug their site. Wanting or not, the PHP mail() function alone always had many, many bugs, as you may see here: http://bugs.php.net/search.php?cmd=displaystatus=Allbug_type%5B%5D=Mail+related Ok so a lot of bugs have been submited, and I do notice that they are either green or gray. Of which, in case you didn't read the legend. green == CLOSED (aka resolved and fixed!!!) gray == bogus. meaning the person was using the function improperly. One is currently assigned and is related to W32 with a 'rcpt to' issue. The other *only* open one is complaining that the 5th argument isn't working, and if you *look* closely at that open ticket, I'm currently working with him to make sure it isn't a bug with php. Even if no open bugs means that the mail function of the latest PHP version does not have any bugs, it does not mean that all users are using the latest version. Furthermore, no software can be guaranteed to be bug free, so the existance of unreported bugs or bugs that were reported but were marked as bogus because the developers could not have understood the reports very well or though they have fixed the bugs but just fixed the sympthomns, makes it perfectly valid to state that the PHP mail function may still have bugs that are not opened today. Anyway, I was wondering why would you bother to fight my explanations with so much persistence. In the beginning, it seemed that you were not really aware of the problems, but then you finally revealed yourself when you showed when you said it upsets you that I am one of those people that that try to plug their site. I dont have a problem with Jason, Mr. Holmes, raditha or anybody who wishes to plug their work. The problem I have is someone falsely saying that php has a bug somewhere and say that their nifty little class fixes the problem when about 90% of the time it is due to the person not understanding the STMP protocol. I fight your explanations because they simply are bogus and dont have any substance. You claim on about 90% of the replies you make to people having problems with mail() that there is a problem with php, without, and I reiterate again... knowing what version of PHP they are using, what OS they are using, nor do you even take into consideration of what MTA they are using. and unlike what you suggested in one of your replies, MTA's differ greatly in their behaviour and cause a lot of reasons as why mail() simply isn't working. As I explained before, it is not necessary to know in advance the version that the person is using to state by the presented sympthoms that the problem may be due to bugs in the mail function, present or past (it does not matter). Another detail is that you are distorting what I say. Saying that it sounds like a PHP mail function bug, is not the same as claiming it is a PHP mail function bug. If you want to be taken with credibility, stop distorting what I say. A quick search in Google for your name and it lead to this page. ooh.. http://pear.php.net/user/curt hah.. I didn't even know that existed. Hey, you are a PEAR zealot! Now it makes all the sense of the world that you do not want me to lead people to the PHP Classes site. It seems you are one of those people that think of the PHP Classes site as a competitor of PEAR. I would not be surprised if you would enjoy if one day the PHP Classes site was shutdown so PEAR did not have any competitors! Let me count how many packages i'm a maintainer of... lets see.. 0 + 0 makes ZERO! Which is not a necessary condition to be a PEAR zealot. Ok. now you are *trying* to attack me personally. Why don't you No, I am not. If you insisting view it that way to justify subsequent personal attacks directed to me, that is going to be your problem because I am not going to follow (un)justified attack tone. look at all the google results to php-general and see how many times you've seen me suggest PEAR as a solution. You will simply find that I have suggested PEAR mabey 1 or 2 times out of the 3000 or so posts on php-general. Come on, you are not convincing anybody here. It is not a problem to be a PEAR zealot to me. Everybody has preferences. Choosing and recommended PEAR packages is not a problem to me, as long you really intend to resolve the users problems. The PHP Classes site was not developed to compete with PEAR. read above. about how I am not at all affiliated with PEAR. Please, do not pretend now that your complaint was not directed to my recommendation of classes in the PHP Classes. As a matter of fact the PHP Classes site was created before PEAR with the specific intention to help me share many of my own classes so
[PHP] viewing PHP files on Internet Explorer 6
So I have Internet Explorer 6.0 with XP and have also installed Microsoft .NET framework 1.1. I can't get my .php files to be viewed with my web browser. html files are diplayed okay but with php files i get a blank screen. I guess i need plug-ins for Internet Explorer but i thought that .NET covered that. Btw, I'm using Apache 2 and MySQL 3.23 with PHP 5.0. Can anyone give me a helping hand? Thanks -rocky singh __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] viewing PHP files on Internet Explorer 6
So I have Internet Explorer 6.0 with XP and have also installed Microsoft .NET framework 1.1. I can't get my .php files to be viewed with my web browser. html files are diplayed okay but with php files i get a blank screen. I guess i need plug-ins for Internet Explorer but i thought that .NET covered that. Btw, I'm using Apache 2 and MySQL 3.23 with PHP 5.0. Can anyone give me a helping hand? Thanks A couple of suggestions: - Make sure you're accessing the PHP scripts via a URL (http://localhost/mypage.php) - Turn on display_errors in your php.ini file and then restart Apache. It's possible you have an error which is causing the blank screen. - If all else fails, run a simple phpinfo() script: ?php phpinfo(); ? to test your PHP installation. Hope that helps, Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] catch $variable with spaces, and convert them
Is it possible to catch $variables coming from a database that have spaces? my program generates something out of a database and just display them. now i did have an option for them to download the files, but some of my files have spaces. the quick way for me to do it is add %20 for all spaces on the filename. My problem now is, i dont know how to catch spaces and convert them to %20 ## code, using PEAR DB ## while ($q-fetchInto($row)) { print ( tr td width=90 align=center .$row[0]. /td tda href=FILES/ .$row[1]. .$row[1]. /a/td td .$row[2]. /td /tr ); }; ## end of code ## thanks -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: catch $variable with spaces, and convert them
This should work... enjoy! ## code, using PEAR DB ## while ($q-fetchInto($row)) { print ( tr td width=90 align=center .$row[0]. /td tda href=FILES/ .$row[1]. .$row[1]. /a/td tda href=FILES/ .rawurlencode($row[1]). .$row[1]. /a/td td .$row[2]. /td /tr ); }; ## end of code ## -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php