[PHP] Combined Production + Development Hosting
I am beginning to host my own website, but I also develop other websites. I have no budget for new equipment so I need to do both production and development hosting on one system. I run Linux with apache, php + mysql. I need a way to essentially hosting two versions of PHP, 4 + 5, reading two different php.ini files. I was thinking of running two apache daemons reading two different configuration files using different PHP modules, which are reading different php.ini files, and listening on different ports. Does anyone have a better method for doing this? Thanks in advance, Watty
[PHP] phpMyAdmin equivalent
Does anyone know of a program equivalent to phpMyAdmin for managing PostgreSQL databases? Watty
RE: [PHP] phpMyAdmin equivalent
You can't google for something you don't know about ;) Thanks for that, looks exactly what I was looking for Watty > -Original Message- > From: raditha dissanayake [mailto:[EMAIL PROTECTED] > Sent: 14 August 2004 16:29 > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] phpMyAdmin equivalent > > Watty wrote: > > >Does anyone know of a program equivalent to phpMyAdmin for managing > >PostgreSQL databases? > > > >Watty > > > > > bet you didn't google for phppgadmin > > > -- > Raditha Dissanayake. > > http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload > Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader > Graphical User Inteface. Just 128 KB | with progress bar. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: [PHP-DB] How to create a new Table in prostgresql from a Webinterface
Try phppgadmin > -Original Message- > From: Michelle Konzack [mailto:[EMAIL PROTECTED] > Sent: 14 August 2004 16:32 > To: [EMAIL PROTECTED] > Subject: [PHP-DB] How to create a new Table in prostgresql from a > Webinterface > > Hello, > > Never I have done this before (no need) but now I need to create a > new table with some colums from a Webinterface and do not know how > to do that. > > Please can anyone point me into the right direction ? > > Thanks, Greetings > and nice Weekend > 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] phpMyAdmin equivalent
I'm an ignorant human being :| Watty > -Original Message- > From: Jason Wong [mailto:[EMAIL PROTECTED] > Sent: 14 August 2004 17:11 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] phpMyAdmin equivalent > > On Saturday 14 August 2004 23:25, Watty wrote: > > > You can't google for something you don't know about ;) > > Surely it would have crossed your mind to check on the postgresql site? > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > Pascal is not a high-level language. > -- Steven Feiner > */ > > -- > 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-General List] - Cron or script like Cron -
Add the functionality to the script that runs the benchmark. Watty > -Original Message- > From: francesco[AT]automationsoft[DOT]biz > [mailto:[EMAIL PROTECTED] > Sent: 14 August 2004 17:34 > To: PHP General List > Subject: [PHP] [PHP-General List] - Cron or script like Cron - > > Hi all, > I have a script that generate a benchmark report, in *.csv, every day. > I want to have the possibility to send me this report every day at the > same time, during night, i.e. at the 03.00 am. I know that there is Cron > that give me the possibility to do this, but I'm not the server manager > and I cannot use Cron. I find a good alternative script, called Pseudo- > Cron, but it runs only when the page that contains script is called. > There is a script that have the same function of Cron but is only php, or > there is another way to call Cron or anyother way to use Cron? > All helps are very appreciated. > Thank's all. > Francesco > [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP templates
Try http://smarty.php.net/, I haven't used it myself but I have heard good things about it. Watty > -Original Message- > From: Octavian Rasnita [mailto:[EMAIL PROTECTED] > Sent: 14 August 2004 22:03 > To: [EMAIL PROTECTED] > Subject: [PHP] PHP templates > > Hi all, > > I have seen that there are many templating systems for PHP. Which is the > most used and the best you have found? > Can you recommend me a free and good templating system? > > Thank you. > > Teddy > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Log parsing
I have a dynamic IP address, I used everydns.net as a DNS server. I have a bash script that runs with cron that checks the current IP of the machine with the DNS record so that if my IP changes; it can run the update program. I would like to do some thorough availability reports, so I started by writing the result of the bash script to a log file. I want to parse the log file to give me availability reports. The log file is in the form: 08/14/04 09:10:01 [TAB] S - when the IP check returns OK 08/14/04 09:10:01 [TAB] U - when the IP need to be synchronised The process does not run when the computer is not on, so that needs to be taken into consideration. Can anyone come up with a script that will carry out this process efficiently? Thanks in advance, Watty
RE: [PHP] Log parsing
We know because the IP check run every 5 minutes by cron, and if it has no run within 5:01 minutes then the computer is off, or the script isn't working. But we should assume that the computer is off is there is not a record for that 5 minute slot. Alternatively we could write another line into the log when the computer shuts down. Watty > -Original Message- > From: John Holmes [mailto:[EMAIL PROTECTED] > Sent: 15 August 2004 01:52 > To: Watty > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Log parsing > > Watty wrote: > > > I would like to do some thorough availability reports, so I started by > > writing the result of the bash script to a log file. I want to parse the > > log file to give me availability reports. The log file is in the form: > > 08/14/04 09:10:01 [TAB] S - when the IP > > check returns OK > > 08/14/04 09:10:01 [TAB] U - when the IP need > > to be synchronised > > > > The process does not run when the computer is not on, so that needs to > > be taken into consideration. > > Is there any entry for when the script/computer is started or stopped? > If not, you're not going to be able to determine the actual uptime. If > one entry is S, then two hours pass and an entry is U, how do we know if > the computer was on or off during that time? > > Basically how this is going to work: > > 1. Read first two lines, $line[1], $line[2], using fgets() > 2. Use strtotime() to convert timestamps and subtract > to determine the elapsed time between them > 3. Add difference to either $U_time or $S_time based > upon status (S or U) in $line[1] > 4. Set $line[1] = $line[2] > 5. Read next line of file into $line[2] > 6. GOTO #2 > > Then you'll have total $U_time and total $S_time and you can calculate > your percentages from there. > > -- > > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > php|architect: The Magazine for PHP Professionals - www.phparch.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Log parsing
I have got a messy script working, thanks for the help John. It's attached if anyone would mind helping me hack it up. There is also a copy of a sample log file. Watty > -Original Message- > From: John Holmes [mailto:[EMAIL PROTECTED] > Sent: 15 August 2004 01:52 > To: Watty > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Log parsing > > Watty wrote: > > > I would like to do some thorough availability reports, so I started by > > writing the result of the bash script to a log file. I want to parse the > > log file to give me availability reports. The log file is in the form: > > 08/14/04 09:10:01 [TAB] S - when the IP > > check returns OK > > 08/14/04 09:10:01 [TAB] U - when the IP need > > to be synchronised > > > > The process does not run when the computer is not on, so that needs to > > be taken into consideration. > > Is there any entry for when the script/computer is started or stopped? > If not, you're not going to be able to determine the actual uptime. If > one entry is S, then two hours pass and an entry is U, how do we know if > the computer was on or off during that time? > > Basically how this is going to work: > > 1. Read first two lines, $line[1], $line[2], using fgets() > 2. Use strtotime() to convert timestamps and subtract > to determine the elapsed time between them > 3. Add difference to either $U_time or $S_time based > upon status (S or U) in $line[1] > 4. Set $line[1] = $line[2] > 5. Read next line of file into $line[2] > 6. GOTO #2 > > Then you'll have total $U_time and total $S_time and you can calculate > your percentages from there. > > -- > > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > php|architect: The Magazine for PHP Professionals - www.phparch.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Log parsing
I'll try that in another way; feel free to give me your hacks for it: $maxdiff ) { print $diftime ."\n"; $missed = $diftime / $diff; $unavail += $missed; $total += $missed; if ( $unavailog ) { } else { $downtime[$cntdown][start] = $ptime; $unavailog = TRUE; } } if( trim( $bits[1] ) == "U" ) { if ( $unavailog ) { } else { $downtime[$cntdown][start] = $ctime; $unavailog = TRUE; } $unavail++; } else { ## Once the down time has finished if ( $unavailog ) { $downtime[$cntdown][finish] = $ctime; $downtime[$cntdown][diff] = $downtime[$cntdown][finish] - $downtime[$cntdown][start]; $cntdown++; } $unavailog = FALSE; } $total++; $ptime = $ctime; } } ## Last time is registered as the timestamp of the last entry $lasttime = $ctime; $firsttime = date( "j/n/y H:i", $firsttime ); $lasttime = date( "j/n/y H:i", $lasttime ); ## Make sure the percentage is uptime, one decimal place $percentage = number_format( ( 100 - ( ( $unavail / $total ) * 100 ) ), 1 ); print "$percentage% uptime from $firsttime to $lasttime\n"; ## Need to make this look pretty print_r( $downtime ); ?> example log file: 1092528602 S 1092528901 S 1092529201 S 1092529502 S 1092530102 S 1092530401 S 1092530701 S 1092531601 S 1092531902 S 1092532201 S 1092532501 U
[PHP] Compile
Is it possible to compile a PHP script? And if so, how? Watty
[PHP] Replacing variables
I have a HTML form class which declares a format array on construction, which contains the format of the form per line. Then it creates an array which defines the input boxes styles of a form. I need a method of arbitrarily adding each of the input boxes into the format array on output. Could anyone help out with that? Thanks in advance, Watty