[PHP] Grrrrr... Re: Returned mail: User unknown
On 20 Sep 2006, at 22:47 , [EMAIL PROTECTED] wrote: - The following addresses had permanent fatal errors - [EMAIL PROTECTED] -Transcript of session follows - ... while talking to postoffice.local.: RCPT To:[EMAIL PROTECTED] 550 5.1.1 unknown or illegal alias: [EMAIL PROTECTED] I can't be the only person getting these in response to every message I sent the list, can I? Can someone unsub this person? -- I hope someday you know the indescribable joy of having children, and of paying someone else to raise them. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: storing function names in db and running them as row is output?
blackwater dev wrote: First, the example I have is not the real situation, just an example so I don't want to get into why are you doing it like that, etc. Just want to see if it's possible. Basically, I want to store stuff in a text field in a db like this johns name is ucfirst('john adams') . When I cycle through that row for output in my php script, I want it to not see ucfirst as text but as the php function and run ithow is the possible? Thanks. use Smarty for that? http://smarty.php.net/crashcourse.php Kae -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] add functions to a class
Hi all, I tried to add functions to a class, but it doesn't seem to work. Here's an example: ? class Test { function Test () { $funcName = 'writeFoo'; $$funcName = create_function ('', 'echo (foo.\n);'); $writeFoo (); $writeFoo2 = $writeFoo; $writeFoo2 (); $this-writeFoo = $writeFoo; $this-writeFoo (); } } $test = new Test (); ? This outputs: foo. foo. PHP Fatal error: Call to undefined method Test::writeFoo() in /test.php on line 11 Both $writeFoo () and $writeFoo2 () are executed, so it principally works, but once used in the object, it doesn't work anymore. Any idea how that is supposed to work? Gratefully, Tsenle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Is there a list of all Timezones as an array or someting?
Mathijs van Veluw wrote: Hello there, I need to have a selectbox filled with the available timezones of PHP. We are using v5.1.x, and it supports the date_default_timezone_set() etc.. As value you can give a string to what timezone. I want all these strings within an array or something so i can create a selectbox so users can select it. Thx in advance. Well, taken from [http://www.php.net/manual/en/timezones.php] here's the full list: $TZ = array('Africa/Abidjan', 'Africa/Accra', 'Africa/Addis_Ababa', 'Africa/Algiers', 'Africa/Asmera', 'Africa/Bamako', 'Africa/Bangui', 'Africa/Banjul', 'Africa/Bissau', 'Africa/Blantyre', 'Africa/Brazzaville', 'Africa/Bujumbura', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Ceuta', 'Africa/Conakry', 'Africa/Dakar', 'Africa/Dar_es_Salaam', 'Africa/Djibouti', 'Africa/Douala', 'Africa/El_Aaiun', 'Africa/Freetown', 'Africa/Gaborone', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Kampala', 'Africa/Khartoum', 'Africa/Kigali', 'Africa/Kinshasa', 'Africa/Lagos', 'Africa/Libreville', 'Africa/Lome', 'Africa/Luanda', 'Africa/Lubumbashi', 'Africa/Lusaka', 'Africa/Malabo', 'Africa/Maputo', 'Africa/Maseru', 'Africa/Mbabane', 'Africa/Mogadishu', 'Africa/Monrovia', 'Africa/Nairobi', 'Africa/Ndjamena', 'Africa/Niamey', 'Africa/Nouakchott', 'Africa/Ouagadougou', 'Africa/Porto-Novo', 'Africa/Sao_Tome', 'Africa/Timbuktu', 'Africa/Tripoli', 'Africa/Tunis', 'Africa/Windhoek', 'America/Adak', 'America/Anchorage', 'America/Anguilla', 'America/Antigua', 'America/Araguaina', 'America/Argentina/Buenos_Aires', 'America/Argentina/Catamarca', 'America/Argentina/ComodRivadavia', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/La_Rioja', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/San_Juan', 'America/Argentina/Tucuman', 'America/Argentina/Ushuaia', 'America/Aruba', 'America/Asuncion', 'America/Atikokan', 'America/Atka', 'America/Bahia', 'America/Barbados', 'America/Belem', 'America/Belize', 'America/Blanc-Sablon', 'America/Boa_Vista', 'America/Bogota', 'America/Boise', 'America/Buenos_Aires', 'America/Cambridge_Bay', 'America/Campo_Grande', 'America/Cancun', 'America/Caracas', 'America/Catamarca', 'America/Cayenne', 'America/Cayman', 'America/Chicago', 'America/Chihuahua', 'America/Coral_Harbour', 'America/Cordoba', 'America/Costa_Rica', 'America/Cuiaba', 'America/Curacao', 'America/Danmarkshavn', 'America/Dawson', 'America/Dawson_Creek', 'America/Denver', 'America/Detroit', 'America/Dominica', 'America/Edmonton', 'America/Eirunepe', 'America/El_Salvador', 'America/Ensenada', 'America/Fort_Wayne', 'America/Fortaleza', 'America/Glace_Bay', 'America/Godthab', 'America/Goose_Bay', 'America/Grand_Turk', 'America/Grenada', 'America/Guadeloupe', 'America/Guatemala', 'America/Guayaquil', 'America/Guyana', 'America/Halifax', 'America/Havana', 'America/Hermosillo', 'America/Indiana/Indianapolis', 'America/Indiana/Knox', 'America/Indiana/Marengo', 'America/Indiana/Petersburg', 'America/Indiana/Vevay', 'America/Indiana/Vincennes', 'America/Indianapolis', 'America/Inuvik', 'America/Iqaluit', 'America/Jamaica', 'America/Jujuy', 'America/Juneau', 'America/Kentucky/Louisville', 'America/Kentucky/Monticello', 'America/Knox_IN', 'America/La_Paz', 'America/Lima', 'America/Los_Angeles', 'America/Louisville', 'America/Maceio', 'America/Managua', 'America/Manaus', 'America/Martinique', 'America/Mazatlan', 'America/Mendoza', 'America/Menominee', 'America/Merida', 'America/Mexico_City', 'America/Miquelon', 'America/Moncton', 'America/Monterrey', 'America/Montevideo', 'America/Montreal', 'America/Montserrat', 'America/Nassau', 'America/New_York', 'America/Nipigon', 'America/Nome', 'America/Noronha',
[PHP] Extension in free pascal
Hi, does anybody know how to write extension in FreePascal? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] add functions to a class
This will not work. $this-bla(); This is a PHP Syntax and tries to get the Class method, PHP dont look for a variable name at all! It seams me strange also, that you try this, you should create the method for the class itself, or extend it. But this shoul work: class Test { function Test () { $funcName = 'writeFoo'; $$funcName = create_function ('', 'echo (foo.\n);'); $writeFoo (); $writeFoo2 = $writeFoo; $writeFoo2 (); $this-writeFoo = $writeFoo; return call_user_func($this-writeFoo, 'arg1, arg2'); } } on Wednesday 20 September 2006 15:07, Kelsang Tsenle wrote: Hi all, I tried to add functions to a class, but it doesn't seem to work. Here's an example: ? class Test { function Test () { $funcName = 'writeFoo'; $$funcName = create_function ('', 'echo (foo.\n);'); $writeFoo (); $writeFoo2 = $writeFoo; $writeFoo2 (); $this-writeFoo = $writeFoo; $this-writeFoo (); } } $test = new Test (); ? This outputs: foo. foo. PHP Fatal error: Call to undefined method Test::writeFoo() in /test.php on line 11 Both $writeFoo () and $writeFoo2 () are executed, so it principally works, but once used in the object, it doesn't work anymore. Any idea how that is supposed to work? Gratefully, Tsenle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a list of all Timezones as an array or someting?
Christopher Watson wrote: Might also want to have a look-see at the Date_TimeZone class of the PEAR::Date package. It seems pretty comprehensive with regard to time zone coverage. -Christopher Thx.. i take a look at that.. But we have a strict rule. No PHP4 only PHP5 OO. So that is not queite the option. I Do have a list of all options that date_default_timezone_set() excepts. So i think i am going to use that as my options where the user can select there right zone. This will work with Daylight savings etc.. So i don't have to count for that. Thx for the help :). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extension in free pascal - OT
Pascal?? this is a PHP list, you are on the wrong place! on Thursday 21 September 2006 11:12, Bronislav Klucka wrote: Hi, does anybody know how to write extension in FreePascal? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extension in free pascal - OT
Of course I want to write extension for PHP :) but I want to write it in FPC... Brona Thomas Munz wrote: Pascal?? this is a PHP list, you are on the wrong place! on Thursday 21 September 2006 11:12, Bronislav Klucka wrote: Hi, does anybody know how to write extension in FreePascal? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to write PHP extension in FPC
Sorry for previous question, was not that clear at all Does anybody know how to write PHP extension in FreePascal? Thnx. Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extension in free pascal - OT
PHP is written in C. If you want to write a extension, you have to writte it in C. I dont think its possible, except you tranbslate the PHP C code to Pascal and start from scratch there :) So- no, not possible on Thursday 21 September 2006 11:22, Bronislav Klucka wrote: Of course I want to write extension for PHP :) but I want to write it in FPC... Brona Thomas Munz wrote: Pascal?? this is a PHP list, you are on the wrong place! on Thursday 21 September 2006 11:12, Bronislav Klucka wrote: Hi, does anybody know how to write extension in FreePascal? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extension in free pascal - OT
Extensions are basically dll/so files. There is generally no problem to take dll file written in C and use it in program written in FPS and vice versa (it's all about rewriting function's headers). So my question is, if this is possible generally, can it be done for PHP? Thomas Munz wrote: PHP is written in C. If you want to write a extension, you have to writte it in C. I dont think its possible, except you tranbslate the PHP C code to Pascal and start from scratch there :) So- no, not possible on Thursday 21 September 2006 11:22, Bronislav Klucka wrote: Of course I want to write extension for PHP :) but I want to write it in FPC... Brona Thomas Munz wrote: Pascal?? this is a PHP list, you are on the wrong place! on Thursday 21 September 2006 11:12, Bronislav Klucka wrote: Hi, does anybody know how to write extension in FreePascal? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to write PHP extension in FPC
On Thu, 21 Sep 2006 10:25:49 +0100, Bronislav Klucka [EMAIL PROTECTED] wrote: Does anybody know how to write PHP extension in FreePascal? It probably can be done, but you'd need to ensure that the .so/.dll you create conforms to all the requirements needed for the engine to use it. However, it would almost certainly be quicker to learn C. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extension in free pascal - OT
Well, depends. If you wanna create build-in extensions ( as far as i know those works a bit faster ), you have to use C. In case you wanna make a dynamic extension it can work 'Theoretically'. But you need to load the PHP shared headers also so the compiler understand the DLLs as far as i know, and you dont have them in Pascal. It is also a really BAD idea to writte it in a different language then it is orginaly written in my opinion. on Thursday 21 September 2006 11:32, Bronislav Klucka wrote: Extensions are basically dll/so files. There is generally no problem to take dll file written in C and use it in program written in FPS and vice versa (it's all about rewriting function's headers). So my question is, if this is possible generally, can it be done for PHP? Thomas Munz wrote: PHP is written in C. If you want to write a extension, you have to writte it in C. I dont think its possible, except you tranbslate the PHP C code to Pascal and start from scratch there :) So- no, not possible on Thursday 21 September 2006 11:22, Bronislav Klucka wrote: Of course I want to write extension for PHP :) but I want to write it in FPC... Brona Thomas Munz wrote: Pascal?? this is a PHP list, you are on the wrong place! on Thursday 21 September 2006 11:12, Bronislav Klucka wrote: Hi, does anybody know how to write extension in FreePascal? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] add functions to a class
On 21 September 2006 10:19, Thomas Munz wrote: This will not work. $this-bla(); This is a PHP Syntax and tries to get the Class method, PHP dont look for a variable name at all! It seams me strange also, that you try this, you should create the method for the class itself, or extend it. But this shoul work: class Test { function Test () { $funcName = 'writeFoo'; $$funcName = create_function ('', 'echo (foo.\n);'); $writeFoo (); $writeFoo2 = $writeFoo; $writeFoo2 (); $this-writeFoo = $writeFoo; return call_user_func($this-writeFoo, 'arg1, arg2'); } You could also try {$this-writeFoo}() -- not certain about this (OOP is not my big thing), but worth a try. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Most stable combination of AMP?
Pawel Miroslawski wrote: On 9/20/06, Kae Verens [EMAIL PROTECTED] wrote: James Tu wrote: Hi: I'm trying to setup a dev environment using Apache, MySQL and PHP...to develop an application that will go to production. What is the most stable versions of the AMP components should I can install? The production environment will most likely live on a Linux machine. My dev environment will be on OS X. that's a religious question. some people advocate some distributions over others. Personally, I recommend Fedora - it's easy to install, and you can use yum and yumex (graphical yum) for package management. Kae -- Hi I agree it's a religious question. I prefer Debian, apt-get is a really comfortable tool and it install all require dependencies. All procedure LAMP install it only 4 commands ex. apt-get install php5 :) It's a very fast and nice (best what i know). Representant of debian's church ;) Paul I'm not quite sure if I got the original question right, so I'll just ask. You asked what are the most stable versions of Apache, MySQL and PHP that I should install?, yes? Apparently then, the 2 posters before me didn't quite get that ;) I'd go for latest versions of all. Period. (well, Apache 2.2 only if all extensions you want for it actually exist, otherwise stick with 2.1 or even 1.3.27 (though I wouldn't do that personally)). grt, - tul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php/css and .htaccess [SOLVED]
tedd wrote: I embedded php code inside css and changed my .htaccess to read -- FilesMatch \.(htm|html|css)$ SetHandler application/x-httpd-php /FilesMatch -- so that the css file would be processed and executed by php. The end result was that everything worked and did what I wanted. However, FireFox / Mozillia won't accept a css file if a .htaccess file reads as indicated above. Christopher Weldon answered: That shouldn't be expected. The SetHandler only applies to the Apache handler side, as browsers should not be able to read those files (.htaccess). So, are you 100% positive that PHP is in fact processing the file? Christopher , this is what I'm sure of: 1. My css file has php code in it. 2. Without the .htaccess as noted above, the php code is not processed. 3. With the .htaccess as above, the php code *is* processed. 4. All (most popular) browsers, except for FF/Mozillia, allow php inside of css. Please note that, Kreme and Wind (sounds like a Rock group) provided the answer, which was to add a header to the css file, like so: header('Content-Type: text/css; charset=ISO-8859-1'); So, it wasn't that the browsers were reading the .htaccess file, but rather because of the .htaccess file FireFox/Mozillia required a header in the css file just to keep things straight (my understanding). Now, this header coupled with the above .htaccess allows php code to be embedded within a css file AND work for all popular browsers, including FireFox/Mozillia. This is simply amazing, at least to me, and completes my next step toward world domination. :-. Many thanks gang for your most excellent and mondo kewl advice. tedd PS: So much talent here wasted on programming. :-) -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a list of all Timezones as an array or someting?
At 8:47 PM -0600 9/20/06, Google Kreme wrote: On 20 Sep 2006, at 06:15 , Chris Boget wrote: $timeZonesArray = array( 'GMT'= array( 'GMT' = +0 // GMT Er... ok, but that seems to be missing quite a lot. For example, I notice that India Standard Time (IST; UTC +5:30) is missing from your array. Granted, it's only 1.1 Billion people and the largest English speaking population in the world... (or second most, depending on whom you ask). Or did you just forget to paste the Asia portion of the array? Good point -- but, the question is, is it important enough for you to post a corrected version? No offense, but it's one thing to point out an error, it's another to provide a correction for it. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php/css and .htaccess [SOLVED]
On 9/21/06, tedd [EMAIL PROTECTED] wrote: tedd wrote: I embedded php code inside css and changed my .htaccess to read -- FilesMatch \.(htm|html|css)$ SetHandler application/x-httpd-php /FilesMatch -- so that the css file would be processed and executed by php. The end result was that everything worked and did what I wanted. However, FireFox / Mozillia won't accept a css file if a .htaccess file reads as indicated above. Christopher Weldon answered: That shouldn't be expected. The SetHandler only applies to the Apache handler side, as browsers should not be able to read those files (.htaccess). So, are you 100% positive that PHP is in fact processing the file? Christopher , this is what I'm sure of: 1. My css file has php code in it. 2. Without the .htaccess as noted above, the php code is not processed. 3. With the .htaccess as above, the php code *is* processed. 4. All (most popular) browsers, except for FF/Mozillia, allow php inside of css. Please note that, Kreme and Wind (sounds like a Rock group) provided the answer, which was to add a header to the css file, like so: header('Content-Type: text/css; charset=ISO-8859-1'); So, it wasn't that the browsers were reading the .htaccess file, but rather because of the .htaccess file FireFox/Mozillia required a header in the css file just to keep things straight (my understanding). Now, this header coupled with the above .htaccess allows php code to be embedded within a css file AND work for all popular browsers, including FireFox/Mozillia. This is simply amazing, at least to me, and completes my next step toward world domination. :-. Many thanks gang for your most excellent and mondo kewl advice. tedd PS: So much talent here wasted on programming. :-) -- --- http://sperling.com http://ancientstones.com http://earthstones.com tedd, So with this approach you're able to tailor css styles for specific browsers and their particular implementations of css, rather than employ hacks directly in the css?? David
Re: [PHP] php/css and .htaccess [SOLVED]
At 10:37 AM -0500 9/21/06, David Giragosian wrote: On 9/21/06, tedd mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: -snip- Now, this header coupled with the above .htaccess allows php code to be embedded within a css file AND work for all popular browsers, including FireFox/Mozillia. -snip- tedd, So with this approach you're able to tailor css styles for specific browsers and their particular implementations of css, rather than employ hacks directly in the css?? David: Yes, plus much more. This is similar to getting php/html to play nice together. What I've discovered here (if no one has considered this before, which I would think is highly doubtful) is a way to embed php code within css (like html) to do anything you want. You see, my chief complaint with css over the years has been its lack of variables. Many in the css camp say that the lack of variables is a feature and not a drawback -- and I understand them not wanting the unclean masses to contaminate their pure language. But, not knowing any better, I've always wanted to use variables in css. A few years back, I published my limited version of how to use variables in css: http://www.sperling.com/examples/pcss/ But for most, it was too problematic to implement and had limited scope. However, what I've discovered here is that by adding the proper .htaccess file and the addition of a header in the css file, you can do anything you want from within a css file -- which includes adding variables, adding includes, performing computations, browser sniffing, and I think anything else you can do in php. The extent could be as unlimited as php/html -- I don't know the full extent. As far as I'm concerned, this is a significant discovery for me -- I'm always trying to get different languages to work together. However, to others, perhaps this technique has been obvious or too trivial to mention. I don't know, but I haven't found any references that address this technique. To the gang -- is this something new, or am I getting excited over nothing? In any event, I'll be adding how to do it to my web site so I can lead others astray. :-) Thanks. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help understanding/debugging the following script:
Hi all. If you look at the code below, the return() does not produce any output. No errors were displayed on screen before I added 'error_reporting(E_ALL);'. (Error message: Notice: Undefined variable: this in /oop/test1/index.php on line 35, commented on below) Trying to echo/print ordinary text or variables works fine. I have some experience coding PHP scripts, but are new on how-to use/write OOP scripts. (Sample found at: http://www.purephotoshop.com/view.php?id=71) Here's the Code: ?php error_reporting(E_ALL); class Bike { var $num_speeds, $speed; var $rotation; var $running = FALSE; // You can set default values for properties, these values must be constant // Change speed method function change_speed( $increment = TRUE ) { // ... } // Pedal and brake methods function pedal() { // ... } function brake() { // ... } // Turn method function turn( $angle ) { // ... } } // Inside the change_speed() method if( !$this-running ) // This is line 35 { return; } if( $increment $this-speed != $this-num_speeds ) { $this-speed++; return; } if( $this-speed != 1 ) { $this-speed--; } ? I will be thankful for any help/hints that leads to a solution. If anymore info are needed, please let me know. Regards, Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help understanding/debugging the following script:
On Thu, 2006-09-21 at 19:26 +0200, Martin Bach Nielsen wrote: Hi all. If you look at the code below, the return() does not produce any output. No errors were displayed on screen before I added 'error_reporting(E_ALL);'. (Error message: Notice: Undefined variable: this in /oop/test1/index.php on line 35, commented on below) Trying to echo/print ordinary text or variables works fine. I have some experience coding PHP scripts, but are new on how-to use/write OOP scripts. (Sample found at: http://www.purephotoshop.com/view.php?id=71) Here's the Code: ?php error_reporting(E_ALL); class Bike { var $num_speeds, $speed; var $rotation; var $running = FALSE; // You can set default values for properties, these values must be constant // Change speed method function change_speed( $increment = TRUE ) { // ... } // Pedal and brake methods function pedal() { // ... } function brake() { // ... } // Turn method function turn( $angle ) { // ... } } // Inside the change_speed() method if( !$this-running ) // This is line 35 You're not within a class method. Cheers, Rob. { return; } if( $increment $this-speed != $this-num_speeds ) { $this-speed++; return; } if( $this-speed != 1 ) { $this-speed--; } ? I will be thankful for any help/hints that leads to a solution. If anymore info are needed, please let me know. Regards, Martin -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Frustrated trying to get help from your site
Am 2006-09-18 14:43:12, schrieb Jon Anderson: As an aside, I think that the online and offline (downloadable) PHP documentation is probably the clearest, best organized and complete set of documentation for any programming language I've run into online. I wish, the downloadable documentation would include all those examples since this is, WHY the Documentation is realy great. I have bougth a PHP book which does not have more infos as the downloadable documentation... Thats Frustrating! :-( Greetings Michelle Konzack Systemadministrator Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/6/6192519367100 Strasbourg/France IRC #Debian (irc.icq.com) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fatal error: session_start(): Failed to initialize storage module
Hi, Fatal error: session_start(): Failed to initialize storage module in /home/vernoncompany.biz/includes/validations.php on line 2 validation.php: #1 ?php #2 session_start(); # ... Two weeks ago I got this essage first time. And since, I'm getting more often. Last three days at aleast once a day when open my website. According Google, it's problem with php.ini setup. PHP Version 4.3.4 System Linux 2.6.3-7mdkenterprise #1 SMP Wed Mar 17 15:00:05 CET 2004 i686 Build Date Mar 22 2004 21:23:38 Configure Command './configure' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--enable-discard-path' '--disable-force-cgi-redirect' '--enable-shared' '--disable-static' '--disable-debug' '--disable-rpath' '--enable-pic' '--enable-inline-optimization' '--enable-memory-limit' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php' '--with-pear=/usr/share/pear' '--enable-magic-quotes' '--enable-debugger' '--enable-track-vars' '--with-exec-dir=/usr/bin' '--with-versioning' '--with-mod_charset' '--with-regex=php' '--enable-track-vars' '--enable-trans-sid' '--enable-safe-mode' '--enable-ctype' '--enable-ftp' '--with-gettext=/usr' '--enable-posix' '--enable-session' '--enable-sysvsem' '--enable-sysvshm' '--enable-yp' '--with-openssl=/usr' '--without-kerberos' '--with-ttf' '--with-freetype-dir=/usr' '--with-zlib=/usr' '--with-zlib=/usr' '--with-zlib-dir=/usr' '--without-pear' Extensions listed here are (or will be soon) available as external modules. To install one or all of these, use urpmi php-EXTENSION_NAME mysql pgsql sqlite gd imap ldap bcmath bz2 calendar cpdf crack curl cyrus db dba dba_bundle dbase dbx dio domxml exif fbsql fdf filepro fribidi gmp hwapi hyperwave iconv imagick informix ingres_ii interbase ircg java mbstring mcal mcrypt mcve mhash mime_magic ming mnogosearch msession msql mssql ncurses notes oci8 odbc oracle overload ovrimos pam_auth pcntl pdf pfpro pspell qtdom readline recode rrdtool shmop snmp smbauth sockets swf sybase sybase_ct sysvmsg tokenizer wddx xml xmlrpc xslt yaz zip adodb mmcache apd cybercash cybermut mono mqseries netools python spplus spread inifile Server API Apache 2.0 Handler Virtual Directory Support disabled Configuration File (php.ini) Path /etc/php.ini Scan this dir for additional .ini files /etc/php additional .ini files parsed/etc/php/23_gd.ini, /etc/php/34_mysql.ini PHP API 20020918 PHP Extension 20020429 Zend Extension 20021010 Debug Build no Thread Safety disabled Registered PHP Streams php, http, ftp, https, ftps, compress.zlib session Session Support enabled Registered save handlersfiles user Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire180 180 session.cache_limiter nocache nocache session.cookie_domain no valueno value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_fileno valueno value session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 36003600 session.gc_probability 1 1 session.namePHPSESSID PHPSESSID session.referer_check no valueno value session.save_handlerfiles files session.save_path /tmp/tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookiesOff Off session.use_trans_sid Off Off Thanks for any help. -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Grrrrr... Re: Returned mail: User unknown
On Thursday 21 September 2006 10:09, Google Kreme wrote: On 20 Sep 2006, at 22:47 , [EMAIL PROTECTED] wrote: - The following addresses had permanent fatal errors - [EMAIL PROTECTED] -Transcript of session follows - ... while talking to postoffice.local.: RCPT To:[EMAIL PROTECTED] 550 5.1.1 unknown or illegal alias: [EMAIL PROTECTED] I can't be the only person getting these in response to every message I sent the list, can I? no. quite irritating Can someone unsub this person? -- I hope someday you know the indescribable joy of having children, and of paying someone else to raise them. -- --- Børge Kennel Arivene http://www.arivene.net --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php/css and .htaccess [SOLVED]
On 9/21/06, tedd [EMAIL PROTECTED] wrote: At 10:37 AM -0500 9/21/06, David Giragosian wrote: On 9/21/06, tedd mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: -snip- Now, this header coupled with the above .htaccess allows php code to be embedded within a css file AND work for all popular browsers, including FireFox/Mozillia. -snip- tedd, So with this approach you're able to tailor css styles for specific browsers and their particular implementations of css, rather than employ hacks directly in the css?? David: Yes, plus much more. This is similar to getting php/html to play nice together. What I've discovered here (if no one has considered this before, which I would think is highly doubtful) is a way to embed php code within css (like html) to do anything you want. You see, my chief complaint with css over the years has been its lack of variables. Many in the css camp say that the lack of variables is a feature and not a drawback -- and I understand them not wanting the unclean masses to contaminate their pure language. But, not knowing any better, I've always wanted to use variables in css. A few years back, I published my limited version of how to use variables in css: http://www.sperling.com/examples/pcss/ But for most, it was too problematic to implement and had limited scope. However, what I've discovered here is that by adding the proper .htaccess file and the addition of a header in the css file, you can do anything you want from within a css file -- which includes adding variables, adding includes, performing computations, browser sniffing, and I think anything else you can do in php. The extent could be as unlimited as php/html -- I don't know the full extent. As far as I'm concerned, this is a significant discovery for me -- I'm always trying to get different languages to work together. However, to others, perhaps this technique has been obvious or too trivial to mention. I don't know, but I haven't found any references that address this technique. To the gang -- is this something new, or am I getting excited over nothing? In any event, I'll be adding how to do it to my web site so I can lead others astray. :-) Thanks. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I've been doing this with CSS and JavaScript a while now. Especially with external JavaScript that is generated based on the current page... like validation and such. One exception is I make the file extensions php so my editor makes them pretty for me, but still always adding the appropriate headers I haven't ran into any problems.
Re: [PHP] Grrrrr... Re: Returned mail: User unknown
How odd, I had no idea that the software on this list would forward my bounces to the group. I've been trying rather unsuccessfully to unsubscribe for about a month. I've tried both emailing the unsubscribe address manually, and replying to the auto-generated emails that the php.net site generates. I even human email address with a description of the problem. After none of those options worked, I decided that bouncing was worth a try. I figured the mail software was intelligent enough to interpret a bounce, because it was warning me about bounced emails. Anyway, sorry for the inconvenience, hopefully this will get resolved. Dan On Sep 21, 2006, at 2:23 PM, Børge Holen wrote: On Thursday 21 September 2006 10:09, Google Kreme wrote: On 20 Sep 2006, at 22:47 , [EMAIL PROTECTED] wrote: - The following addresses had permanent fatal errors - [EMAIL PROTECTED] -Transcript of session follows - ... while talking to postoffice.local.: RCPT To:[EMAIL PROTECTED] 550 5.1.1 unknown or illegal alias: [EMAIL PROTECTED] I can't be the only person getting these in response to every message I sent the list, can I? no. quite irritating Can someone unsub this person? -- I hope someday you know the indescribable joy of having children, and of paying someone else to raise them. -- --- Børge Kennel Arivene http://www.arivene.net --- -- 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] Grrrrr... Re: Returned mail: User unknown
At 4:09 PM -0400 9/21/06, Dan Holevoet wrote: How odd, I had no idea that the software on this list would forward my bounces to the group. I've been trying rather unsuccessfully to unsubscribe for about a month. I've tried both emailing the unsubscribe address manually, and replying to the auto-generated emails that the php.net site generates. I even human email address with a description of the problem. After none of those options worked, I decided that bouncing was worth a try. I figured the mail software was intelligent enough to interpret a bounce, because it was warning me about bounced emails. Anyway, sorry for the inconvenience, hopefully this will get resolved. Dan: I hope so, I've been receiving them as well. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] web browser shows blank page when accessing *.php file
We are publishing an ical calendar from a mac on a webserver running apache on solaris 8. However, its suddenly stopped working via webrowser. I have tried to stop and start the httpd to get it going again but to no avail. when I access through safari or explorer on OSX.4 the access_log file says mac-abarnes.fmri.columbia.edu - abarnes [19/Sep/2006:15:51:47 -0400] GET / HTTP/1.1 302 5 mac-abarnes.fmri.columbia.edu - abarnes [19/Sep/2006:15:52:47 -0400] GET /week.php HTTP/1.1 200 5 and the error_log file says [Tue Sep 19 15:53:57 2006] [error] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /websites/ical/functions/ ical_parser.php on line 494 Not quite sure where to go from here. thanks Anna http://ical.fmri.columbia.edu/week.php
[PHP] +AFs-OT+AF0- Working with version control
Hello, This is off topic but I wanted to get the list member's opinions on the subject as it will probably benefit someone else. Currently I don't use version control at all. What I do instead is have one directory that contains my development website and one directory that contains the live website which I do not directly modify. When I need to fix something or add a new feature I edit the development site and copy the files that I've changed. Sometimes I will start on a new feature before I am able to finish a previous one. This is a major problem when the features overlap and I have to edit the same file for both features. Even if I finish one of the features I cannot publish the files because the other feature is not ready yet. What I'm looking to the list for is how I can overcome this through version control. What I'm thinking I'd do is create a base level (say v1.0) that I then create a branch for every new feature and then merge those things together. The issue I see in this case is the merging. Is this a sound strategy or should I just realize that I can't publish until all current features enhancements are completed? Thanks, Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] +AFs-OT+AF0- Working with version control
Chris W. Parker wrote: Hello, This is off topic but I wanted to get the list member's opinions on the subject as it will probably benefit someone else. Currently I don't use version control at all. What I do instead is have one directory that contains my development website and one directory that contains the live website which I do not directly modify. When I need to fix something or add a new feature I edit the development site and copy the files that I've changed. Sometimes I will start on a new feature before I am able to finish a previous one. This is a major problem when the features overlap and I have to edit the same file for both features. Even if I finish one of the features I cannot publish the files because the other feature is not ready yet. What I'm looking to the list for is how I can overcome this through version control. What I'm thinking I'd do is create a base level (say v1.0) that I then create a branch for every new feature and then merge those things together. The issue I see in this case is the merging. Is this a sound strategy or should I just realize that I can't publish until all current features enhancements are completed? Thanks, Chris. What you are currently doing would be similar if you were using source control, only you would have the ability to revert to previous functions, and have better logging for changes to your files So, I would advocate using some source control, like subversion to make life a little more orderly. As for your problem... of course it is always *ideal* to complete one branch/feature before you start a new branch/feature, but often times we do not live in *ideal* worlds, so merging becomes a necessary evil. source control / configuration management will not really solve this problem, but it will provide better tools to attack the problem. So, I would sit down and google for the Subversion Red Book and read through some of that to get your started. As I said before you will find some of the method similar to what you are currently doing, it will just document your journey a little better. -B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] web browser shows blank page when accessing *.php file
On Thu, 21 Sep 2006 17:13:44 -0400, Anna Barnes [EMAIL PROTECTED] wrote: and the error_log file says [Tue Sep 19 15:53:57 2006] [error] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /websites/ical/functions/ ical_parser.php on line 494 What is there in line 494 of ical_parser.php? -- - Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática| '@' || 'unl.edu.ar'; Universidad Nacional| DBA, Programador, del Litoral | Administrador - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] +AFs-OT+AF0- Working with version control
At 2:21 PM -0700 9/21/06, Chris W. Parker wrote: Hello, This is off topic but I wanted to get the list member's opinions on the subject as it will probably benefit someone else. -snip- Is this a sound strategy or should I just realize that I can't publish until all current features enhancements are completed? Thanks, Chris. Chris: I've been thinking about this as well. Please forgive my naiveness if the gang already has a better way, but the method I used to do application development was that I started with a folder that contained all my code, which I named v1.0. Whenever I reached a milestone of some type I thought significant, I duplicated the entire working folder; renamed the duplicate the next version (i.e., v1.01); and started working with the new folder. If I screwed up, then I could always trash the new folder, duplicate the previous version and start again. It was a system that worked for me. At the end of the development cycle, I would have a long thread of development versions. Often, I found that intermediate folders provided branches for other development -- so, keeping intermediate development versions was a plus. Now, it's a bit different working with folders on the web because you have one root (live) folder and making changes can be problematic. However, there's enough similarity that I often follow the same method as I used in application development. For example, my current site http://sperling.com is alive and running well. However, I am doing a complete rewrite of the site. As such I duplicated the entire site and placed it in another directory, namely: http://sperling.com/a -- and I work on that. When I feel that revision is ready, I will save the current root directory to my desktop, delete it on my server and then pull everything out of my a directory and make it the new root. For me, that would take just a few minutes. For more complex sites, where the change must be instant, I would look into using the .htaccess file to change the root index. If there are better development schemes, I would like to hear about them as well. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] +AFs-OT+AF0- Working with version control
On Thu, 2006-09-21 at 18:11 -0400, tedd wrote: At 2:21 PM -0700 9/21/06, Chris W. Parker wrote: Hello, This is off topic but I wanted to get the list member's opinions on the subject as it will probably benefit someone else. -snip- Is this a sound strategy or should I just realize that I can't publish until all current features enhancements are completed? Thanks, Chris. Chris: I've been thinking about this as well. Please forgive my naiveness if the gang already has a better way, but the method I used to do application development was that I started with a folder that contained all my code, which I named v1.0. Whenever I reached a milestone of some type I thought significant, I duplicated the entire working folder; renamed the duplicate the next version (i.e., v1.01); and started working with the new folder. If I screwed up, then I could always trash the new folder, duplicate the previous version and start again. It was a system that worked for me. At the end of the development cycle, I would have a long thread of development versions. Often, I found that intermediate folders provided branches for other development -- so, keeping intermediate development versions was a plus. Now, it's a bit different working with folders on the web because you have one root (live) folder and making changes can be problematic. However, there's enough similarity that I often follow the same method as I used in application development. For example, my current site http://sperling.com is alive and running well. However, I am doing a complete rewrite of the site. As such I duplicated the entire site and placed it in another directory, namely: http://sperling.com/a -- and I work on that. When I feel that revision is ready, I will save the current root directory to my desktop, delete it on my server and then pull everything out of my a directory and make it the new root. For me, that would take just a few minutes. For more complex sites, where the change must be instant, I would look into using the .htaccess file to change the root index. If there are better development schemes, I would like to hear about them as well. Use CVS or SubVersion already. I'm not familiar with SubVersion, though from what I hear it's has all the features of CVS. At any rate, you create you directory, and files and stuff, add them all to the repository. If you want a snapshot just tag the repository with a name. This will create what you call directory versions. At any time you can check out the repository for a given tag, or revert a file to a given revision, or just view changes between revision X and Y or X and Z (skipping Y). Get in the habit of commiting your stuff often at any given sub-milestone where you haven't broken the code. Then if you screw up, you can retrieve any single file's revision and backup only as much as you need. CVS also supports branching though I'm less familiar with it. Seriously though... you have what? 4 or 5 directory clones on the go? I can get any version of any file anywhere through 1 to 1 million versions. You can also check out files according to date so that you have a snapshot representative of a point in time. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: +AFs-OT+AF0- Working with version control
Robert Cummings wrote: On Thu, 2006-09-21 at 18:11 -0400, tedd wrote: At 2:21 PM -0700 9/21/06, Chris W. Parker wrote: Hello, This is off topic but I wanted to get the list member's opinions on the subject as it will probably benefit someone else. -snip- Is this a sound strategy or should I just realize that I can't publish until all current features enhancements are completed? Thanks, Chris. Chris: I've been thinking about this as well. Please forgive my naiveness if the gang already has a better way, but the method I used to do application development was that I started with a folder that contained all my code, which I named v1.0. Whenever I reached a milestone of some type I thought significant, I duplicated the entire working folder; renamed the duplicate the next version (i.e., v1.01); and started working with the new folder. If I screwed up, then I could always trash the new folder, duplicate the previous version and start again. It was a system that worked for me. At the end of the development cycle, I would have a long thread of development versions. Often, I found that intermediate folders provided branches for other development -- so, keeping intermediate development versions was a plus. Now, it's a bit different working with folders on the web because you have one root (live) folder and making changes can be problematic. However, there's enough similarity that I often follow the same method as I used in application development. For example, my current site http://sperling.com is alive and running well. However, I am doing a complete rewrite of the site. As such I duplicated the entire site and placed it in another directory, namely: http://sperling.com/a -- and I work on that. When I feel that revision is ready, I will save the current root directory to my desktop, delete it on my server and then pull everything out of my a directory and make it the new root. For me, that would take just a few minutes. For more complex sites, where the change must be instant, I would look into using the .htaccess file to change the root index. If there are better development schemes, I would like to hear about them as well. Use CVS or SubVersion already. I'm not familiar with SubVersion, though from what I hear it's has all the features of CVS. I would strongly recommend subversion over CVS. I've used CVS for many years and can't believe how much better things are now I've switched to SVN. I second Brad's recommendation of reading http://subversion.red-bean.com/ - The Subversion Book. It makes for excellent reading. You can quite easily work on a trunk project, make multiple changes and use it for general development work. (e.g. /trunk/myproject/) When you are ready for your first deployment, you create a staging branch (/branches/myproject/staging) using the svn cp command. You then test this version in a simulated live environment. Other developers can carry on working on /trunk/myproject while you work. If you need to make any changes (e.g. bugs found during staging process), just commit to the /branches/myproject/staging branch (don't worry we'll merge this back to trunk in a bit). Once you are happy, you are ready for the first deployment. Use svn cp to create your deployment branch (e.g. /branches/myproject/deployed). Also to keep a permanent record, you should tag this deployment (again using svn cp to e.g. /tags/myproject/deployed-2006092201). On your production environment, just check out /branch/myproject/deployed (you could use the tag, but it will be more complex when updating on next deployment (it would require using svn switch rather than just svn up). Now just merge any commits made to the staging brach back to trunk (use svn merge). Now carry on development. Now you're ready for deployment 2! This time the staging branch has already been made so no need to use svn cp to create it. Just svn merge all the changesets made to trunk since your last deployment. Again test it and commit any required bugfixes. Then use svn merge to apply all the changesets in the staging branch to the deployment branch since you lasted deployed (it may just be one, but could be more if there are bugfixes). Once you have commited these changes, make a new tag with svn cp for your records (tags do not take up any real disk space to don't worry about them even if your project is huge!) On your production environment just run svn up. Oh, don't forget to merge any bugfixes made to your staging branch back to trunk! If in an emergency you need to roll back, just issue an svn switch REPO/tags/myproject/deployed-date of previous deployment and you're back to how you were. Hope this simple process helps - read the SVN book to get a better understanding of the terms I've used. Col. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] web browser shows blank page when accessing *.php file
On 9/21/06, Anna Barnes [EMAIL PROTECTED] wrote: We are publishing an ical calendar from a mac on a webserver running apache on solaris 8. However, its suddenly stopped working via webrowser. I have tried to stop and start the httpd to get it going again but to no avail. when I access through safari or explorer on OSX.4 the access_log file says You are being rather specific to browsers, so does this mean this behaviour doesn't happen when you use Firefox on OSX or IE/FF on windows? mac-abarnes.fmri.columbia.edu - abarnes [19/Sep/2006:15:51:47 -0400] GET / HTTP/1.1 302 5 mac-abarnes.fmri.columbia.edu - abarnes [19/Sep/2006:15:52:47 -0400] GET /week.php HTTP/1.1 200 5 and the error_log file says [Tue Sep 19 15:53:57 2006] [error] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /websites/ical/functions/ ical_parser.php on line 494 Not quite sure where to go from here. As mentioned, you need to evaluate what line 494 is actually doing.. is this a loop of some sort that is causing the max execution timeout? Is there a browser specific thing that causes the line 494 to timeout. What exactly is going on in the 494 area of ical_parser.php thanks Anna http://ical.fmri.columbia.edu/week.php btw, your signature url doesnt work without a proper username and password. Curt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] web browser shows blank page when accessing *.php file
Hi Curt and Martin, Thanks for getting back to me. I'll take a look at the exact line 474 tomorrow. The reason I didn't mention it specifically is that it's only suddenly stopped working and nothing in that code has changed. It doesn't work in any browser, netscape, IE, firefox etc on Solaris9 or WindowsXP The 'signature url' is actually the calendar function that doesn't work. I wanted to know if it works outside our LAN. What's weird is that it asks for the username and password, it authenticates but then won't load the page. kindest regards Anna Curt Zirzow wrote: On 9/21/06, Anna Barnes [EMAIL PROTECTED] wrote: We are publishing an ical calendar from a mac on a webserver running apache on solaris 8. However, its suddenly stopped working via webrowser. I have tried to stop and start the httpd to get it going again but to no avail. when I access through safari or explorer on OSX.4 the access_log file says You are being rather specific to browsers, so does this mean this behaviour doesn't happen when you use Firefox on OSX or IE/FF on windows? mac-abarnes.fmri.columbia.edu - abarnes [19/Sep/2006:15:51:47 -0400] GET / HTTP/1.1 302 5 mac-abarnes.fmri.columbia.edu - abarnes [19/Sep/2006:15:52:47 -0400] GET /week.php HTTP/1.1 200 5 and the error_log file says [Tue Sep 19 15:53:57 2006] [error] PHP Fatal error: Maximum execution time of 60 seconds exceeded in /websites/ical/functions/ ical_parser.php on line 494 Not quite sure where to go from here. As mentioned, you need to evaluate what line 494 is actually doing.. is this a loop of some sort that is causing the max execution timeout? Is there a browser specific thing that causes the line 494 to timeout. What exactly is going on in the 494 area of ical_parser.php thanks Anna http://ical.fmri.columbia.edu/week.php btw, your signature url doesnt work without a proper username and password. Curt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help converting C to PHP
Hello, I am attempting to convert this code for generating the digits of pi from the original C (below) to PHP. long k=4e3,p,a[337],q,t=1e3; main(j){for(;a[j=q=0]+=2,--k;) for(p=1+2*k;j337;q=a[j]*k+q%p*t,a[j++]=q/p) k!=j2?:printf(%.3d,a[j-2]%t+q/p/t);} I converted this to a more readable form: long k=4e3; int p; int a[337]; int q; int t=1e3; main(j){ for(;a[j=q=0]+=2,--k;){ for(p=1+(2*k);j337;q=(a[j]*k)+((q%p)*t),a[j++]=(q/p)){ if (j2 k==1) printf(%.3d,(a[j-2]%t)+((q/p)/t)); } } } and then changed it to PHP syntax $k=4e3; $p=0; $a=array(); $q=0; $t=1e3; for(;$a[$j=$q=0]+=2,--$k;){ for($p=1+(2*$k);$j337;$q=($a[$j]*$k)+(($q%$p)*$t),$a[$j++]=($q/$p)){ if ($j2 $k==1) printf(%.3d,($a[$j-2]%$t)+(($q/$p)/$t)); } } The C code correctly gives me pi, but the PHP code gives me some other number which is not pi. What am I missing? Tom. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help converting C to PHP
This one time, at band camp, Tom Atkinson [EMAIL PROTECTED] wrote: Hello, I am attempting to convert this code for generating the digits of pi from the original C (below) to PHP. is this for codegolf? Kevin -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help converting C to PHP
Yes, it is. Kevin Waterson wrote: This one time, at band camp, Tom Atkinson [EMAIL PROTECTED] wrote: Hello, I am attempting to convert this code for generating the digits of pi from the original C (below) to PHP. is this for codegolf? Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] web browser shows blank page when accessing *.php file
On 9/21/06, anna barnes [EMAIL PROTECTED] wrote: Hi Curt and Martin, Thanks for getting back to me. I'll take a look at the exact line 474 tomorrow. The reason I didn't mention it specifically is that it's only suddenly stopped working and nothing in that code has changed. It doesn't work in any browser, netscape, IE, firefox etc on Solaris9 or WindowsXP if it is happening in these cases then it is very likely a code change or behaviou that was unexected. till we get some sor of sniplet of the relevant code aroudn 474 it will be hard to tell wht the issue is. The 'signature url' is actually the calendar function that doesn't work. I wanted to know if it works outside our LAN. What's weird is that it asks for the username and password, it authenticates but then won't load the page. This is a total seperat issue, and probably resides in the core login method the ical system uses. Curt/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help converting C to PHP
On 9/21/06, Kevin Waterson [EMAIL PROTECTED] wrote: This one time, at band camp, Tom Atkinson [EMAIL PROTECTED] wrote: heh.. nice little twist. Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help converting C to PHP
On 9/21/06, Tom Atkinson [EMAIL PROTECTED] wrote: Hello, I am attempting to convert this code for generating the digits of pi from the original C (below) to PHP. long k=4e3,p,a[337],q,t=1e3; main(j){for(;a[j=q=0]+=2,--k;) for(p=1+2*k;j337;q=a[j]*k+q%p*t,a[j++]=q/p) k!=j2?:printf(%.3d,a[j-2]%t+q/p/t);} wow this is rather bad. it would probably be better to write this in asm, it would be easier to read than the way it is in C. I converted this to a more readable form: what about using: php.net/pi note the precision description. or are we talking about a different pi. Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help converting C to PHP
This one time, at band camp, Curt Zirzow [EMAIL PROTECTED] wrote: what about using: php.net/pi note the precision description. or are we talking about a different pi. The goal of the codegolf.com challenge is to print pi to 1000 places. The programmer to do it in the least keystrokes is the winner. Kevin -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help converting C to PHP
pi() does not give me enough decimal places, I need the first 1000. Curt Zirzow wrote: On 9/21/06, Tom Atkinson [EMAIL PROTECTED] wrote: Hello, I am attempting to convert this code for generating the digits of pi from the original C (below) to PHP. long k=4e3,p,a[337],q,t=1e3; main(j){for(;a[j=q=0]+=2,--k;) for(p=1+2*k;j337;q=a[j]*k+q%p*t,a[j++]=q/p) k!=j2?:printf(%.3d,a[j-2]%t+q/p/t);} wow this is rather bad. it would probably be better to write this in asm, it would be easier to read than the way it is in C. I converted this to a more readable form: what about using: php.net/pi note the precision description. or are we talking about a different pi. Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help converting C to PHP
Definitely looks like a grouping and/or precedence problem. Wish I had more time to examine it. Fine-tooth those parens again. -Christopher -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help converting C to PHP
I have solved the problem. The variables are declared as and forced to remain integers in C but PHP converts them to float during division. This messed up the maths. Also there was a slight difference in formatting for printf(). Tom Atkinson wrote: Hello, I am attempting to convert this code for generating the digits of pi from the original C (below) to PHP. long k=4e3,p,a[337],q,t=1e3; main(j){for(;a[j=q=0]+=2,--k;) for(p=1+2*k;j337;q=a[j]*k+q%p*t,a[j++]=q/p) k!=j2?:printf(%.3d,a[j-2]%t+q/p/t);} I converted this to a more readable form: long k=4e3; int p; int a[337]; int q; int t=1e3; main(j){ for(;a[j=q=0]+=2,--k;){ for(p=1+(2*k);j337;q=(a[j]*k)+((q%p)*t),a[j++]=(q/p)){ if (j2 k==1) printf(%.3d,(a[j-2]%t)+((q/p)/t)); } } } and then changed it to PHP syntax $k=4e3; $p=0; $a=array(); $q=0; $t=1e3; for(;$a[$j=$q=0]+=2,--$k;){ for($p=1+(2*$k);$j337;$q=($a[$j]*$k)+(($q%$p)*$t),$a[$j++]=($q/$p)){ if ($j2 $k==1) printf(%.3d,($a[$j-2]%$t)+(($q/$p)/$t)); } } The C code correctly gives me pi, but the PHP code gives me some other number which is not pi. What am I missing? Tom. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php