[PHP] User notes script
Hi Where do I download the user notes script? One that allows people to add notes to documentation like on the PHP manual? I want to try it out on an HTML manual. Suman -- http://sumankumar.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP page counter
there is one here : http://www.phpclasses.org/browse/package/2212.html see if it suffices your need, thanks, vedanta On 9/11/05, Michelle Konzack <[EMAIL PROTECTED]> wrote: > G'Morning *, > > Does anyone know, where I can get a PHP-Code for > a high performance page counter ? > > I need one, which can handle very high traffic > (15.000 Hits/h) becase my own one sucks (locking). :-/ > > It can be text/plain or php-gd based. > > Greetings > Michelle > > -- > Linux-User #280138 with the Linux Counter, http://counter.li.org/ > Michelle Konzack Apt. 917 ICQ #328449886 >50, rue de Soultz MSM LinuxMichi > 0033/3/8845235667100 Strasbourg/France IRC #Debian (irc.icq.com) > > > -- *~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Payflow Pro compile error
On Sunday 11 September 2005 16:46, the author Dan Harrington contributed to the dialogue on- [PHP] Payflow Pro compile error: >Greetings, > >It seems that I've gone around and around on this issue starting with PHP3 >every time I install a new server. > >And here I am again. > >OS: >Linux 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 i686 i386 >GNU/Linux >php-5.0.4 >library with pfpro listed in /etc/ld.so.conf and I ran ldconfig... > >-- >And when I type: > >./configure --with-mysql=/usr/local/mysql >--with-apxs=/usr/local/apache/bin/apxs --with-curl --enable-mbstring=en >--with-pfpro > >or > >./configure --with-mysql=/usr/local/mysql >--with-apxs=/usr/local/apache/bin/apxs --with-curl --enable-mbstring=en >--with-pfpro=/usr/local/src/verisign/payflowpro/linux/lib > >or > >./configure --with-mysql=/usr/local/mysql >--with-apxs=/usr/local/apache/bin/apxs --with-curl --enable-mbstring=en >--with-pfpro=/usr/local/lib > >or anything else I can think of, I get this error message: > >[.] >checking for Verisign Payflow Pro support... yes >checking for pfproInit in -lpfpro... no >checking for PNInit in -lpfpro... no >configure: error: The pfpro extension requires version 2 or 3 of the SDK > >And I'm dead. > >Anyone have similar situation that knows what to do? Is it the Enterprise >Linux v.3 Is it the PHP 5? > >(I have an Enterprise Linux 2 with PHP4 that works just fine!) > >Thanks >Dan This might be useful: from http://us2.php.net/pfpro After weeks of searching and trying to install Payflow Pro on Red Hat Enterprise Linux 3, I finally was able to make it work. Naturally I was very hesitant to recompile my php configuration, but with a little help from redhat, and about 3 hours, it was installed. I'll try to outline the steps as best I can. I'm running RedHat EL 3.0, php-4.3.2, apache 2.0.46. Anyone running EL 3 is a member of the redhat network, so use up2date to download the latest php source rpm. up2date --get-source php (this will download the source rpm into /var/spool/up2date) rpm -i /var/spool/up2date/php-4.3.2 (or whatever version of php it gives you, installing this source rpm will not affect your current php configuration) cd /usr/src/redhat/SPECS rpmbuild -bp php.spec (unpack the sources and apply patches) I had a couple of dependency requirements (imap-devel, unixODBC-devel; yours may vary; up2date 'whatever you need'; if you had to install dependant rpms, run rpmbuild -bp php.spec again) vi php.spec (edit the spec file and include the --with-pfpro) on line 285 or 286, you'll see where the ./configure command is generated. Adjust any defaults as necessary, I didn't need to, and add --with-pfpro=[DIR]. Make sure to place this outside the if's, I placed mine before ifarch(%ix86). If you followed the instructions above, and unpacked pfpro into /usr/local, you would add --with-pfpro=--with-pfpro=/usr/local/verisign/payflowpro/sunsparc, where my version was linuxrh9. I'm running modssl, my config was --with-pfpro=shared,/usr/local. Make sure that you have followed php.net's instructions and copied pfpro.h and libpfpro.so to the appropriate directories. Now that we've added our config line, build the rpm. You will get a compile error if you have the incorrect version of the SDK. RedHat EL users should have downloaded the SDK for RedHat 9.x. rpmbuild -bb php.spec (this will take awhile) **According to documentation on redhat, new versions of rpm added a feature which causes a build termination if it finds files not "intended" to be included in the package. Obviously, since we added pfpro, it wasn't intended to be there. To get around this do the follow: Edit your php.spec file (same one from earlier), and include %define _unpackaged_files_terminate_build 0 I added this as the second line under the comments, mine looks like this: %{!?oracle:%define oracle 0} %define _unpackaged_files_terminate_build 0 This will allow the build to continue with these unpackaged files. 5 minutes later, if no errors were returned, it should that it build a whole bunch of rpms, all related to php. Now lets install them. Redhat recommeded uninstalling existing rpms and installing these new ones, as opposed to using rpm -Uvh. So, uninstall the cooresponding php rpms. If it complains about dependancies, use --nodeps. Now, install rpm -i your new ones. You can install them all on the same line if you'd like. rpm -i php-4.x.x. php-imap-4.x. php-mysql-4.x.x Done! Now to quote Sean from below: 5) Copy /usr/src/redhat/BUILD/php-X.X.X/build-apache/modules/pfpro.so to /usr/lib/php4. 6) Add "extension=pfpro.so" to /etc/php.d/pfpro.ini using the other .ini files as templates. Restart apache, and you should now be able to invoke the Payflow Pro functions! mark at tuscaloosadesigncompany dot com 25-Sep-2004 04:02 After upgrading my slackware system's glibc to 2.3.3 (which is the first version of glibc on slackware that
[PHP] Payflow Pro compile error
Greetings, It seems that I've gone around and around on this issue starting with PHP3 every time I install a new server. And here I am again. OS: Linux 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 i686 i386 GNU/Linux php-5.0.4 library with pfpro listed in /etc/ld.so.conf and I ran ldconfig... -- And when I type: ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs --with-curl --enable-mbstring=en --with-pfpro or ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs --with-curl --enable-mbstring=en --with-pfpro=/usr/local/src/verisign/payflowpro/linux/lib or ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs --with-curl --enable-mbstring=en --with-pfpro=/usr/local/lib or anything else I can think of, I get this error message: [.] checking for Verisign Payflow Pro support... yes checking for pfproInit in -lpfpro... no checking for PNInit in -lpfpro... no configure: error: The pfpro extension requires version 2 or 3 of the SDK And I'm dead. Anyone have similar situation that knows what to do? Is it the Enterprise Linux v.3 Is it the PHP 5? (I have an Enterprise Linux 2 with PHP4 that works just fine!) Thanks Dan
RE: [PHP] Best way to update PHP on RH 9
3rd way... if you have linux (and you do!) you can get yum. yum install php provided you have your yum paths/repos set properly, it'll more or less walk through the dependency issues for you... what ever you do, you can/should be expecting that some app will scream that you're now using a wrong version of php!!! welcome to dependency hell!!! -bruce -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED] Sent: Sunday, September 11, 2005 11:46 AM To: php-general@lists.php.net Subject: Re: [PHP] Best way to update PHP on RH 9 On 9/11/05, Todd Cary <[EMAIL PROTECTED]> wrote: > I have RH 9 on our server and if I try to use a rpm for php-4.3.9 or > greater, there are many unresolved dependencies. What is the best way > around this problem? There are at least a couple ways around this problem. 1) Follow the rpm dependencies until you fulfill them all. There are lots of great rpm sites around, rpmfind.net, freshrpms.net, etc. This option has two possible outcomes: a) You succeed and finally get your desired PHP version installed. b) You fail and your box is a mess of mostly-upgraded rpms. 2) Rip out your PHP rpms and install PHP from source. I don't use rpm based distros much anymore, but I usually go for option #2 anyway. -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ -- 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] PHP Sessions
Chris Wagner wrote: i recently started using PHP's sessions. i am finding that the sessions seem to "expire" after 20 or 30 minutes -- or, at least the variables which i set, within $_SESSION, are getting cleared after this relatively short amount of time. before calling session_start(), i do a few initializations: ini_set('session.use_cookies', 1); ini_set('session.use_trans_sid', 0); ini_set('session.save_handler', 'files'); ini_set('session.serialize_handler', 'php'); ini_set('session.name', 'session-id'); i am not setting the 'session.cache_expire' INI variable, and even did a check to make sure it was not being modified, and i found that it contains the default value of 180 (minutes). furthermore, the *cookie* is not expiring. i've also checked 'session.cookie_lifetime', and it is 0 (zero, for "until browser is closed"). i've also checked the browser's cookie list, and the cookie is still around at the time that i lose my session variables. does anyone have any ideas as to why i may be losing my session variables so early? Check session.gc_lifetime or similar. That is the garbage collection routine that goes through and deletes any session data files (in /tmp or wherever your setup puts them) that are older than that config setting value. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Sessions
hello, i recently started using PHP's sessions. i am finding that the sessions seem to "expire" after 20 or 30 minutes -- or, at least the variables which i set, within $_SESSION, are getting cleared after this relatively short amount of time. before calling session_start(), i do a few initializations: ini_set('session.use_cookies', 1); ini_set('session.use_trans_sid', 0); ini_set('session.save_handler', 'files'); ini_set('session.serialize_handler', 'php'); ini_set('session.name', 'session-id'); i am not setting the 'session.cache_expire' INI variable, and even did a check to make sure it was not being modified, and i found that it contains the default value of 180 (minutes). furthermore, the *cookie* is not expiring. i've also checked 'session.cookie_lifetime', and it is 0 (zero, for "until browser is closed"). i've also checked the browser's cookie list, and the cookie is still around at the time that i lose my session variables. does anyone have any ideas as to why i may be losing my session variables so early? thank you! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best way to update PHP on RH 9
On 9/11/05, Todd Cary <[EMAIL PROTECTED]> wrote: > I have RH 9 on our server and if I try to use a rpm for php-4.3.9 or > greater, there are many unresolved dependencies. What is the best way > around this problem? There are at least a couple ways around this problem. 1) Follow the rpm dependencies until you fulfill them all. There are lots of great rpm sites around, rpmfind.net, freshrpms.net, etc. This option has two possible outcomes: a) You succeed and finally get your desired PHP version installed. b) You fail and your box is a mess of mostly-upgraded rpms. 2) Rip out your PHP rpms and install PHP from source. I don't use rpm based distros much anymore, but I usually go for option #2 anyway. -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Best way to update PHP on RH 9
I have RH 9 on our server and if I try to use a rpm for php-4.3.9 or greater, there are many unresolved dependencies. What is the best way around this problem? Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stripping control M character (^M)
Philip Hallstrom wrote: Hello All, I'm having some issues with carriage returns. Specifically the control M character (^M). I have attempted to clean and validate the file I'm creating. Here's the code. while ($row = mysql_fetch_array($result)){ // assign and clean vars $artist = trim($row[artist]); $tdDate = trim($row[start_date]); $venue = trim($row[venue]); $city = trim($row[CITY]); $state = trim($row[STATE]); $country = trim($row[COUNTRY]); $tdId = trim($row[td_id]); // create string $line = "$artist|||$tdDate||$venue|$city|$state|$country|$tdId\n"; // validate the string if(preg_match("/.*.|||.*.||.*.|.*.|.*.|.*.|.*.n\//", $line)){ // record is correct so write line to file fwrite($handle,$line); } } So ^M slips right by trim and my preg_match line. Where is the carriage return appearing in your line of output? Trim will remove these, but only at the beginning/end of a string so if $artist = "Paul\rNowosielski" that won't get cleaned up... Maybe run them through ereg_replace() using "[\n\r]" as a pattern? Or maybe use the m modifier? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] date and time conversion
babu wrote: Hi, how to convert DD.MM.YYand HH:MM:SS into mysql date( '-MM-DD' ) and time format. I think the time is same as HH:MM:SS. [EMAIL PROTECTED] ~ $ php -r 'echo date("Y-m-d",strtotime(str_replace(".","/","12.12.05")))."\n";' 2005-12-12 Hope that helps :) See http://php.net/date http://php.net/strtotime http://php.net/mktime For more information -- Burhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] date and time conversion
Hi, how to convert DD.MM.YYand HH:MM:SS into mysql date( '-MM-DD' ) and time format. I think the time is same as HH:MM:SS. Are there any php built in functions , or need to convert them using regular expressions. thanks babu - How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos. Get Yahoo! Photos
Re: [PHP] Date/Time Display for recurring monthly event
[EMAIL PROTECTED] wrote: Burhan, Thank you for replying, it is very much appreciated. Perhaps I did not state what I needed as well as I should have. I'm looking for the code which displays the date of the second Thursday of each month on a web page. I have to insert this code at 5 different locations on that webpage for different meetings. The scenario below describes how it needs to work. This month for example, September, the second Thursday is September 8, 2005. Up until midnight of September 8th the date on the webpage should read September 8, 2005. When midnight arrives on September 8th, the date displayed should change to October 13, 2005. If you can still help me I would be grateful. Oh, so you want to display the next available Thursday. $current_month_thursday = strtotime("2nd Thursday",mktime(0,0,0,date("m")-1,0,2005)); if (strtotime("now") > $current_month_thursday) { //First thursday has passed, show the first thursday //of the next month echo 'Next Meeting Date : '; $next_month = mktime(0,0,0,date("m")+1,0,date("Y")); echo date("r",strtotime("2nd Thursday",$next_month)); } else { // This month's second thursday hasn't passed yet echo date("r",$current_month_thursday); } ?> This prints : [EMAIL PROTECTED] ~ $ php -q date2.php Next Meeting Date : Thu, 13 Oct 2005 00:00:00 +0300 Hope this helps, and please, reply to the list and not directly to me so others may contribute and learn. Regards, Burhan [EMAIL PROTECTED] -Original Message- From: Burhan Khalid [mailto:[EMAIL PROTECTED] Sent: Sunday, September 11, 2005 6:55 AM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] Date/Time Display for recurring monthly event [EMAIL PROTECTED] wrote: Having a heck of time getting anything to work, can anyone make a suggestion to the following. I need a webpage that displays 5 recurring meeting dates, i.e. the second Wednesday, Thursday, and Friday of each month in five different locations. echo date("r",strtotime("second Wednesday",strtotime("1st October")))."\n"; echo date("r",strtotime("second Thursday",strtotime("1st October")))."\n"; echo date("r",strtotime("second Friday",strtotime("1st October")))."\n\n"; echo "For all months of the year (for loop way) : \n\n"; for($x = 1; $x <=12; ++$x) { $current_month = date("F",mktime(0,0,0,$x,1,date("Y"))); echo 'For the month of '.$current_month.":\n\n"; echo date("r",strtotime("second Wednesday",strtotime("1st ".$current_month)))."\n"; echo date("r",strtotime("second Thursday",strtotime("1st ".$current_month)))."\n"; echo date("r",strtotime("second Friday",strtotime("1st ".$current_month)))."\n\n"; } echo "For all months of the year (array_map way) : \n\n"; function findDates($month) { $current_month = date("F",mktime(0,0,0,$month,1,date("Y"))); $x[] = date("r",strtotime("second Wednesday",strtotime("1st ".$current_month))); $x[] = date("r",strtotime("second Thursday",strtotime("1st ".$current_month))); $x[] = date("r",strtotime("second Friday",strtotime("1st ".$current_month))); return $x; } $dates = array_map('findDates',range(1,12)); echo 'For the month of December : '."\n"; print_r($dates[11]); ?> Enjoy :) -- Burhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Date/Time Display for recurring monthly event
[EMAIL PROTECTED] wrote: Having a heck of time getting anything to work, can anyone make a suggestion to the following. I need a webpage that displays 5 recurring meeting dates, i.e. the second Wednesday, Thursday, and Friday of each month in five different locations. echo date("r",strtotime("second Wednesday",strtotime("1st October")))."\n"; echo date("r",strtotime("second Thursday",strtotime("1st October")))."\n"; echo date("r",strtotime("second Friday",strtotime("1st October")))."\n\n"; echo "For all months of the year (for loop way) : \n\n"; for($x = 1; $x <=12; ++$x) { $current_month = date("F",mktime(0,0,0,$x,1,date("Y"))); echo 'For the month of '.$current_month.":\n\n"; echo date("r",strtotime("second Wednesday",strtotime("1st ".$current_month)))."\n"; echo date("r",strtotime("second Thursday",strtotime("1st ".$current_month)))."\n"; echo date("r",strtotime("second Friday",strtotime("1st ".$current_month)))."\n\n"; } echo "For all months of the year (array_map way) : \n\n"; function findDates($month) { $current_month = date("F",mktime(0,0,0,$month,1,date("Y"))); $x[] = date("r",strtotime("second Wednesday",strtotime("1st ".$current_month))); $x[] = date("r",strtotime("second Thursday",strtotime("1st ".$current_month))); $x[] = date("r",strtotime("second Friday",strtotime("1st ".$current_month))); return $x; } $dates = array_map('findDates',range(1,12)); echo 'For the month of December : '."\n"; print_r($dates[11]); ?> Enjoy :) -- Burhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: date of file?
Am 2005-09-11 03:08:22, schrieb [EMAIL PROTECTED]: > In addition to reading the names of the files in a directory, I also > need to read the date the file was modified. filemtime() Greetings Michelle -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/3/8845235667100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
[PHP] date of file?
In addition to reading the names of the files in a directory, I also need to read the date the file was modified. Right now I've got this: if ($handle = opendir("$path")) { $b=0; while (false !== ($file[$b] = readdir($handle))) { $b++; } closedir($handle); } What function do I need to use to do this? I'm working in php4. Andrew Darrow Kronos1 Productions www.pudlz.com
[PHP] PHP page counter
G'Morning *, Does anyone know, where I can get a PHP-Code for a high performance page counter ? I need one, which can handle very high traffic (15.000 Hits/h) becase my own one sucks (locking). :-/ It can be text/plain or php-gd based. Greetings Michelle -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/3/8845235667100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
Re: [PHP] Convert a timestamp to RFC822??
This one time, at band camp, Brian Dunning <[EMAIL PROTECTED]> wrote: > I get my timestamp from the db in this format (I don't have control > over this): > > 2004-05-14 13:24:48 > > I need to convert it to RFC822 to make it a valid RSS pubDate field > like this: > > Wed, 02 Oct 2002 13:00:00 GMT > > How can I do that? I'm tearing my hair out here (what's left)... SELECT *, DATE_FORMAT(yourdatecolumn,'%d, %m,%Y %h:%i %p') AS your_date FROM table just change the %m options to suit the format you wish. You will then have a field called your_date that you can access in your loop like while($row=mysql_fetch_array($result)) { echo $row['your_date']; } enjoy, 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