php-general Digest 21 Sep 2006 21:02:39 -0000 Issue 4360 Topics (messages 242013 through 242040):
Re: storing function names in db and running them as row is output?
242013 by: Kae Verens
242014 by: Kae Verens
add functions to a class
242015 by: Kelsang Tsenle
242018 by: Thomas Munz
242027 by: Ford, Mike
Re: Is there a list of all Timezones as an array or someting?
242016 by: M. Sokolewicz
242019 by: Mathijs van Veluw
242030 by: tedd
Extension in free pascal
242017 by: Bronislav Klucka
Re: Extension in free pascal - OT
242020 by: Thomas Munz
242021 by: Bronislav Klucka
242023 by: Thomas Munz
242024 by: Bronislav Klucka
242026 by: Thomas Munz
How to write PHP extension in FPC
242022 by: Bronislav Klucka
242025 by: Stut
Re: Most stable combination of AMP?
242028 by: M. Sokolewicz
Re: php/css and .htaccess [SOLVED]
242029 by: tedd
242031 by: David Giragosian
242032 by: tedd
242038 by: Eric Butera
Help understanding/debugging the following script:
242033 by: Martin Bach Nielsen
242034 by: Robert Cummings
Re: Frustrated trying to get help from your site
242035 by: Michelle Konzack
Fatal error: session_start(): Failed to initialize storage module
242036 by: afan.afan.net
Re: Grrrrr... Re: Returned mail: User unknown
242037 by: Børge Holen
242039 by: Dan Holevoet
242040 by: tedd
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---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 it....how is the possible? Thanks.use Smarty for that? http://smarty.php.net/crashcourse.php Kae
--- End Message ---
--- Begin Message ---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 it....how is the possible? Thanks.use Smarty for that? http://smarty.php.net/crashcourse.php Kae
--- End Message ---
--- Begin Message ---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 11Both $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
--- End Message ---
--- Begin Message ---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
--- End Message ---
--- Begin Message ---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
--- End Message ---
--- Begin Message ---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', 'America/North_Dakota/Center', 'America/North_Dakota/New_Salem', 'America/Panama', 'America/Pangnirtung', 'America/Paramaribo', 'America/Phoenix', 'America/Port-au-Prince', 'America/Port_of_Spain', 'America/Porto_Acre', 'America/Porto_Velho', 'America/Puerto_Rico', 'America/Rainy_River', 'America/Rankin_Inlet', 'America/Recife', 'America/Regina', 'America/Rio_Branco', 'America/Rosario', 'America/Santiago', 'America/Santo_Domingo', 'America/Sao_Paulo', 'America/Scoresbysund', 'America/Shiprock', 'America/St_Johns', 'America/St_Kitts', 'America/St_Lucia', 'America/St_Thomas', 'America/St_Vincent', 'America/Swift_Current', 'America/Tegucigalpa', 'America/Thule', 'America/Thunder_Bay', 'America/Tijuana', 'America/Toronto', 'America/Tortola', 'America/Vancouver', 'America/Virgin', 'America/Whitehorse', 'America/Winnipeg', 'America/Yakutat', 'America/Yellowknife', 'Antarctica/Casey', 'Antarctica/Davis', 'Antarctica/DumontDUrville', 'Antarctica/Mawson', 'Antarctica/McMurdo', 'Antarctica/Palmer', 'Antarctica/Rothera', 'Antarctica/South_Pole', 'Antarctica/Syowa', 'Antarctica/Vostok', 'Arctic/Longyearbyen', 'Asia/Aden', 'Asia/Almaty', 'Asia/Amman', 'Asia/Anadyr', 'Asia/Aqtau', 'Asia/Aqtobe', 'Asia/Ashgabat', 'Asia/Ashkhabad', 'Asia/Baghdad', 'Asia/Bahrain', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Beirut', 'Asia/Bishkek', 'Asia/Brunei', 'Asia/Calcutta', 'Asia/Choibalsan', 'Asia/Chongqing', 'Asia/Chungking', 'Asia/Colombo', 'Asia/Dacca', 'Asia/Damascus', 'Asia/Dhaka', 'Asia/Dili', 'Asia/Dubai', 'Asia/Dushanbe', 'Asia/Gaza', 'Asia/Harbin', 'Asia/Hong_Kong', 'Asia/Hovd', 'Asia/Irkutsk', 'Asia/Istanbul', 'Asia/Jakarta', 'Asia/Jayapura', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Kashgar', 'Asia/Katmandu', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuching', 'Asia/Kuwait', 'Asia/Macao', 'Asia/Macau', 'Asia/Magadan', 'Asia/Makassar', 'Asia/Manila', 'Asia/Muscat', 'Asia/Nicosia', 'Asia/Novosibirsk', 'Asia/Omsk', 'Asia/Oral', 'Asia/Phnom_Penh', 'Asia/Pontianak', 'Asia/Pyongyang', 'Asia/Qatar', 'Asia/Qyzylorda', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Saigon', 'Asia/Sakhalin', 'Asia/Samarkand', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tel_Aviv', 'Asia/Thimbu', 'Asia/Thimphu', 'Asia/Tokyo', 'Asia/Ujung_Pandang', 'Asia/Ulaanbaatar', 'Asia/Ulan_Bator', 'Asia/Urumqi', 'Asia/Vientiane', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Bermuda', 'Atlantic/Canary', 'Atlantic/Cape_Verde', 'Atlantic/Faeroe', 'Atlantic/Jan_Mayen', 'Atlantic/Madeira', 'Atlantic/Reykjavik', 'Atlantic/South_Georgia', 'Atlantic/St_Helena', 'Atlantic/Stanley', 'Australia/ACT', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Broken_Hill', 'Australia/Canberra', 'Australia/Currie', 'Australia/Darwin', 'Australia/Hobart', 'Australia/LHI', 'Australia/Lindeman', 'Australia/Lord_Howe', 'Australia/Melbourne', 'Australia/North', 'Australia/NSW', 'Australia/Perth', 'Australia/Queensland', 'Australia/South', 'Australia/Sydney', 'Australia/Tasmania', 'Australia/Victoria', 'Australia/West', 'Australia/Yancowinna', 'Europe/Amsterdam', 'Europe/Andorra', 'Europe/Athens', 'Europe/Belfast', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Chisinau', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Gibraltar', 'Europe/Guernsey', 'Europe/Helsinki', 'Europe/Isle_of_Man', 'Europe/Istanbul', 'Europe/Jersey', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/Luxembourg', 'Europe/Madrid', 'Europe/Malta', 'Europe/Mariehamn', 'Europe/Minsk', 'Europe/Monaco', 'Europe/Moscow', 'Europe/Nicosia', 'Europe/Oslo', 'Europe/Paris', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/San_Marino', 'Europe/Sarajevo', 'Europe/Simferopol', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Tirane', 'Europe/Tiraspol', 'Europe/Uzhgorod', 'Europe/Vaduz', 'Europe/Vatican', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Europe/Zaporozhye', 'Europe/Zurich', 'Indian/Antananarivo', 'Indian/Chagos', 'Indian/Christmas', 'Indian/Cocos', 'Indian/Comoro', 'Indian/Kerguelen', 'Indian/Mahe', 'Indian/Maldives', 'Indian/Mauritius', 'Indian/Mayotte', 'Indian/Reunion', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Chatham', 'Pacific/Easter', 'Pacific/Efate', 'Pacific/Enderbury', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Funafuti', 'Pacific/Galapagos', 'Pacific/Gambier', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Johnston', 'Pacific/Kiritimati', 'Pacific/Kosrae', 'Pacific/Kwajalein', 'Pacific/Majuro', 'Pacific/Marquesas', 'Pacific/Midway', 'Pacific/Nauru', 'Pacific/Niue', 'Pacific/Norfolk', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Palau', 'Pacific/Pitcairn', 'Pacific/Ponape', 'Pacific/Port_Moresby', 'Pacific/Rarotonga', 'Pacific/Saipan', 'Pacific/Samoa', 'Pacific/Tahiti', 'Pacific/Tarawa', 'Pacific/Tongatapu', 'Pacific/Truk', 'Pacific/Wake', 'Pacific/Wallis', 'Pacific/Yap', 'Brazil/Acre', 'Brazil/DeNoronha', 'Brazil/East', 'Brazil/West', 'Canada/Atlantic', 'Canada/Central', 'Canada/East-Saskatchewan', 'Canada/Eastern', 'Canada/Mountain', 'Canada/Newfoundland', 'Canada/Pacific', 'Canada/Saskatchewan', 'Canada/Yukon', 'CET', 'Chile/Continental', 'Chile/EasterIsland', 'CST6CDT', 'Cuba', 'EET', 'Egypt', 'Eire', 'EST', 'EST5EDT', 'Etc/GMT', 'Etc/GMT+0', 'Etc/GMT+1', 'Etc/GMT+10', 'Etc/GMT+11', 'Etc/GMT+12', 'Etc/GMT+2', 'Etc/GMT+3', 'Etc/GMT+4', 'Etc/GMT+5', 'Etc/GMT+6', 'Etc/GMT+7', 'Etc/GMT+8', 'Etc/GMT+9', 'Etc/GMT-0', 'Etc/GMT-1', 'Etc/GMT-10', 'Etc/GMT-11', 'Etc/GMT-12', 'Etc/GMT-13', 'Etc/GMT-14', 'Etc/GMT-2', 'Etc/GMT-3', 'Etc/GMT-4', 'Etc/GMT-5', 'Etc/GMT-6', 'Etc/GMT-7', 'Etc/GMT-8', 'Etc/GMT-9', 'Etc/GMT0', 'Etc/Greenwich', 'Etc/UCT', 'Etc/Universal', 'Etc/UTC', 'Etc/Zulu', 'Factory', 'GB', 'GB-Eire', 'GMT', 'GMT+0', 'GMT-0', 'GMT0', 'Greenwich', 'Hongkong', 'HST', 'Iceland', 'Iran', 'Israel', 'Jamaica', 'Japan', 'Kwajalein', 'Libya', 'MET', 'Mexico/BajaNorte', 'Mexico/BajaSur', 'Mexico/General', 'MST', 'MST7MDT', 'Navajo', 'NZ', 'NZ-CHAT', 'Poland', 'Portugal', 'PRC', 'PST8PDT', 'ROC', 'ROK', 'Singapore', 'Turkey', 'UCT', 'Universal', 'US/Alaska', 'US/Aleutian', 'US/Arizona', 'US/Central', 'US/East-Indiana', 'US/Eastern', 'US/Hawaii', 'US/Indiana-Starke', 'US/Michigan', 'US/Mountain', 'US/Pacific', 'US/Pacific-New', 'US/Samoa', 'UTC', 'W-SU', 'WET', 'Zulu' );
--- End Message ---
--- Begin Message ---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. -ChristopherThx.. 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 :).
--- End Message ---
--- Begin Message ---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 // GMTEr... 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
--- End Message ---
--- Begin Message ---Hi, does anybody know how to write extension in FreePascal? Brona
--- End Message ---
--- Begin Message ---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
--- End Message ---
--- Begin Message ---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
--- End Message ---
--- Begin Message ---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
--- End Message ---
--- Begin Message --- 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
--- End Message ---
--- Begin Message ---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
--- End Message ---
--- Begin Message ---Sorry for previous question, was not that clear at all Does anybody know how to write PHP extension in FreePascal? Thnx. Brona
--- End Message ---
--- Begin Message --- 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
--- End Message ---
--- Begin Message ---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 ;) PaulI'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
--- End Message ---
--- Begin Message ---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 Apachehandler 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
--- End Message ---
--- Begin Message ---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.comtedd, 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
--- End Message ---
--- Begin Message ---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
--- End Message ---
--- Begin Message ---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.phpI'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.
--- End Message ---
--- Begin Message ---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
--- End Message ---
--- Begin Message ---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. | `------------------------------------------------------------'
--- End Message ---
--- Begin Message ---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/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
--- End Message ---
--- Begin Message ---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 handlers files 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_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 3600 3600 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid Off Off Thanks for any help. -afan
--- End Message ---
--- Begin Message ---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 ---
--- End Message ---
--- Begin Message --- 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 irritatingCan 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
--- End Message ---
--- Begin Message ---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
--- End Message ---
