|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Thu Mar 15 2001 - 07:58:05 CST
php-general Digest 15 Mar 2001 13:58:05 -0000 Issue 568
Topics (messages 43946 through 44026):
Re: Anyone running their own Servers & DNS versus renting space/services from an ISP or Hosting??
43946 by: Paul Warner
43955 by: Andre Bajew
Re: JavaDoc?
43947 by: Yasuo Ohgaki
43996 by: Bård Farstad
44009 by: Ulf Wendel
Print MySQL DB as Exel File?
43948 by: Jeff Oien
43951 by: Jason Murray
43958 by: Andrew Hill
43959 by: Pierre-Yves Lemaire
43961 by: Reinke Bonte
43962 by: Jeff Oien
Re: How upload files to protected directories?
43949 by: Mig
44015 by: Christian Reiniger
Re: How do you keep your scripts secure?
43950 by: Chris Lee
43954 by: Jerry Artman
Re: [?] How to make many one line forms in a loop?
43952 by: Brinkman, Theodore
Re: my page is in the error log
43953 by: seth.brivo.com
43960 by: Yasuo Ohgaki
Re: Help please
43956 by: Peter Houchin
Re: tutorials on good database design
43957 by: Nold, Mark
URGENT: Can't see picture
43963 by: Mike Yuen
43964 by: Jason Lotito
SVG Scripting
43965 by: Ted Goranson
43978 by: Chris Adams
normal for Apache to hang?
43966 by: Derek Sivers
44017 by: Christian Reiniger
Statistics function
43967 by: Lauri Vain
43971 by: Rick St Jean
43986 by: Chris Adams
43990 by: Chris Adams
44012 by: Derek Sivers
44018 by: Christian Reiniger
that whole system() thing again
43968 by: Daniel Lynn
43969 by: Jack Dempsey
43970 by: Daniel Lynn
43973 by: Jack Dempsey
44005 by: CC Zona
Abobe FDF and PHP
43972 by: Dustin Leggans
44022 by: Uwe Steinmann
Re: IMAP sort help.
43974 by: Terrence Wong
44008 by: Terrence Wong
Creating Files Windows vs Unix
43975 by: Andrew V. Romero
43977 by: David Robley
43979 by: Andrew V. Romero
43984 by: David Robley
44019 by: Christian Reiniger
Mail
43976 by: Wade Halsey
Re: software localization with PHP
43980 by: Don Read
php or Mysql for DATE?
43981 by: Dhaval Desai
43983 by: David Smith
43988 by: David Robley
44014 by: Tiki
Not Looping...
43982 by: WreckRman2
43985 by: David Robley
Re: Array help
43987 by: Don Read
function() for mysql-enum-field-values-to-array
43989 by: Dennis Gearon
Compile probs with php-4.0.4pl1
43991 by: Wolfgang Ebneter
mail() problem
43992 by: Vegard
Is linkage to C/C++ lib or programs in Unix possible?
43993 by: Martin Lam
43995 by: Maxim Derkachev
Fetch side with Cookies
43994 by: Martin Thoma
External file?
43997 by: Tristan.Pretty.risk.sungard.com
popen
43998 by: aadish
Dynamic Arrays?
43999 by: RealGM
Problems with email digest
44000 by: Greig, Euan
Own User authentification
44001 by: Holger Rothaug
Re: NEWBEE - How do I preload 25< gifs?
44002 by: Visa Kopu
Will my script run after redirect?
44003 by: Carfield Yim
Code snippet archive
44004 by: Stefen Lars
newbie php authentication quest.
44006 by: Christian Boesch
Showing source with .phps extension?
44007 by: Anders Pettersson
POST Method.
44010 by: Nick Davies
44025 by: Peter
Re: Executing a string with both html and php inside it..
44011 by: Aviv Revach
44013 by: Christian Reiniger
Number in extense
44016 by: Marcel Henrique Scandolara - Wide
URL / address
44020 by: Geer
44023 by: Matt Williams
Finding the depth
44021 by: Harshdeep S Jawanda
OPENSSL problem
44024 by: eXXos
Re: Function to compare an array with another array
44026 by: Fang Li
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Why not lease a dedicated machine in your favourite flavour. That way you
have the reliability of a hosting company that monitors 24-hrs, provides
generators, UPS, etc. but will have full control over site, configuration,
etc. There are many dedicated servers available in NT/2000/Linux/Cobalt
Raq/etc. that start at < $100 USD/mo. Understand, though that you are
responsible for updates, etc. including security.
-- P
----- Original Message -----
From: "Andre Bajew" <AndreBajew
TechnologyArt.com>
To: <php-general
lists.php.net>
Sent: Wednesday, March 14, 2001 7:51 PM
Subject: [PHP] Anyone running their own Servers & DNS versus renting
space/services from an ISP or Hosting??
> Hi all,
>
> I'm contemplating moving one of my larger sites off of a hosting company
> over to my own PIII 1 Gigahertz. Thoughts right now are to use IIS 5.0 and
> either SQL Server or MySQL. I can currently get a fixed IP address DSL
> connection at 1.5 meg download and 512 Upload for fairly cheap. The reason
I
> would do this is control, control, control.
>
> Is anyone out there running their own servers (not leased/rented form some
> service)? Is it as easy as registering a domain name server with Network
> Solutions and that's it? Also, how does one go about getting DNS updates
> from the outside world to stay current with other DNS's?
>
> Any input would be sincerely appreciated!
> Andre
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
My thanks to all for the input. I will be taking a closer look at leasing a
dedicated machine which will still give me what I am after, ie. ability to
compile, install, upgrade, software when/where I need but without some of
the sysadmin headaches.
Thanks again to everyone !!
Andre
-----Original Message-----
From: Paul Warner [mailto:pwarner
winners-circle.com]
Sent: Wednesday, March 14, 2001 8:07 PM
To: Andre Bajew; php-general
lists.php.net
Subject: Re: [PHP] Anyone running their own Servers & DNS versus renting
space/services from an ISP or Hosting??
Why not lease a dedicated machine in your favourite flavour. That way you
have the reliability of a hosting company that monitors 24-hrs, provides
generators, UPS, etc. but will have full control over site, configuration,
etc. There are many dedicated servers available in NT/2000/Linux/Cobalt
Raq/etc. that start at < $100 USD/mo. Understand, though that you are
responsible for updates, etc. including security.
-- P
----- Original Message -----
From: "Andre Bajew" <AndreBajew
TechnologyArt.com>
To: <php-general
lists.php.net>
Sent: Wednesday, March 14, 2001 7:51 PM
Subject: [PHP] Anyone running their own Servers & DNS versus renting
space/services from an ISP or Hosting??
> Hi all,
>
> I'm contemplating moving one of my larger sites off of a hosting company
> over to my own PIII 1 Gigahertz. Thoughts right now are to use IIS 5.0 and
> either SQL Server or MySQL. I can currently get a fixed IP address DSL
> connection at 1.5 meg download and 512 Upload for fairly cheap. The reason
I
> would do this is control, control, control.
>
> Is anyone out there running their own servers (not leased/rented form some
> service)? Is it as easy as registering a domain name server with Network
> Solutions and that's it? Also, how does one go about getting DNS updates
> from the outside world to stay current with other DNS's?
>
> Any input would be sincerely appreciated!
> Andre
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
> So i've heard bits and pieces that JavaDoc can parse out comments about
> php...
>
> does anyone have an example of a command line call to javadoc passing a PHP
> file?
PHPDoc or PHP Documentator, I guess.
Regards,
Yasuo Ohgaki
attached mail follows:
On Thursday 15 March 2001 02:59, Jonathan Sharp wrote:
> So i've heard bits and pieces that JavaDoc can parse out comments about
> php...
>
> does anyone have an example of a command line call to javadoc passing a PHP
> file?
I've written an alternative PHP documentation tool. You can get it from:
http://developer.ez.no/article/static/35/
-- Bård Farstad Systems developer ez.no | developer.ez.no | zez.org
attached mail follows:
Jonathan Sharp schrieb: > > So i've heard bits and pieces that JavaDoc can parse out comments about > php...
That's wrong. JavaDoc utilizes the Java Compiler. Check the PEAR repository there's a JavaDoc like tool in it.
Ulf
-- Ulf Wendel, NetUSE AG Siemenswall, D-24107 Kiel Tel: +49 431 386 436 00, Fax: +49 431 386 435 99
attached mail follows:
Could anyone help me out with how to print the entire contents of a database as an Excel file? I'm familiar with the header:
header("Content-Type: application/vnd.ms-excel");
just not sure how to go about it beyond that. I have this code and am not sure what do do after it. Thanks. Jeff Oien
while ($row = mysql_fetch_array($result)) { $Event = $row['Event']; $First_Name = $row['First_Name']; $Last_Name = $row['Last_Name']; $Title = $row['Title']; $Organization = $row['Organization']; $Phone = $row['Phone']; $Email = $row['Email']; $date = $row['date']; $id = $row['id'];
attached mail follows:
> Could anyone help me out with how to print the entire contents of a > database as an Excel file? I'm familiar with the header: > > header("Content-Type: application/vnd.ms-excel"); > > just not sure how to go about it beyond that. I have this code and > am not sure what do do after it. Thanks.
Excel spreadsheets are in a proprietary format as far as I know.
However, if you output the database one line = one row, and tab delimit the lines, Excel will notice you're importing a text file and give you some appropriate options (select delimiter, etc).
I'd go for tab delimiting over comma delimiting, since your text fields will probably contain commas but will *very* *exceedingly* rarely have tabs.
I've ripped some code out of phpMyAdmin to do this (ta Tobias, if you're watching ;)) - I can post it if you want to.
Jason
-- Jason Murray jasonmmelbourneit.com.au Web Design Team, Melbourne IT Fetch the comfy chair!
attached mail follows:
While not directly involving PHP, you certainly open up a database table in Excel, just create it as a pivot table or data import from a DSN. You can create spreadsheets based on specific SQL queries and table joins, that Excel will work happily with.
Hope this helps!
Best regards, Andrew --------------------------------------- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com
On 3/14/01 9:28 PM, "Jason Murray" <Jason.Murray
melbourneit.com.au> wrote:
>> Could anyone help me out with how to print the entire contents of a >> database as an Excel file? I'm familiar with the header: >> >> header("Content-Type: application/vnd.ms-excel"); >> >> just not sure how to go about it beyond that. I have this code and >> am not sure what do do after it. Thanks. > > Excel spreadsheets are in a proprietary format as far as I know. > > However, if you output the database one line = one row, and tab delimit > the lines, Excel will notice you're importing a text file and give you > some appropriate options (select delimiter, etc). > > I'd go for tab delimiting over comma delimiting, since your text fields > will probably contain commas but will *very* *exceedingly* rarely have > tabs. > > I've ripped some code out of phpMyAdmin to do this (ta Tobias, if you're > watching ;)) - I can post it if you want to. > > Jason
attached mail follows:
Hello,
The header will make netscape offer you a download of the file, and IE will open it in a excell format.
For the display, just put your result in a nice html table and excell will convert it, it's quite simple.
print "<table>"; print "<th>Event</th>"; ... print all your header here
while ($row = mysql_fetch_array($result)) { print "<tr>\n"; print "<td>". $row['Event'] ."</td>\n"; and so on...
} </table>
hope it help, py
----- Original Message -----
From: Jason Murray <Jason.Murray
melbourneit.com.au>
To: <jeff
webdesigns1.com>; PHP <php-general
lists.php.net>
Sent: Thursday, March 15, 2001 2:28 AM
Subject: RE: [PHP] Print MySQL DB as Exel File?
> > Could anyone help me out with how to print the entire contents of a
> > database as an Excel file? I'm familiar with the header:
> >
> > header("Content-Type: application/vnd.ms-excel");
> >
> > just not sure how to go about it beyond that. I have this code and
> > am not sure what do do after it. Thanks.
>
> Excel spreadsheets are in a proprietary format as far as I know.
>
> However, if you output the database one line = one row, and tab delimit
> the lines, Excel will notice you're importing a text file and give you
> some appropriate options (select delimiter, etc).
>
> I'd go for tab delimiting over comma delimiting, since your text fields
> will probably contain commas but will *very* *exceedingly* rarely have
> tabs.
>
> I've ripped some code out of phpMyAdmin to do this (ta Tobias, if you're
> watching ;)) - I can post it if you want to.
>
> Jason
>
> --
> Jason Murray
> jasonm
melbourneit.com.au
> Web Design Team, Melbourne IT
> Fetch the comfy chair!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
I know very little about php, but since you have already received a bunch of useless answers, I thought I add my guesswork.
In php 4 you can access MS documents through Microsofts OLE interface. That means you can manipulate an .xls file as you would be able to in VisualBasic. You should look for something called COM in your documentation.
I should add that I have never done it in php, only in perl...
Goodluck
-ren
----- Original Message -----
From: "Jeff Oien" <jeff
webdesigns1.com>
To: "PHP" <php-general
lists.php.net>
Sent: Thursday, March 15, 2001 10:25 AM
Subject: [PHP] Print MySQL DB as Exel File?
> Could anyone help me out with how to print the entire contents of a
> database as an Excel file? I'm familiar with the header:
>
> header("Content-Type: application/vnd.ms-excel");
>
> just not sure how to go about it beyond that. I have this code and
> am not sure what do do after it. Thanks.
> Jeff Oien
>
> while ($row = mysql_fetch_array($result)) {
> $Event = $row['Event'];
> $First_Name = $row['First_Name'];
> $Last_Name = $row['Last_Name'];
> $Title = $row['Title'];
> $Organization = $row['Organization'];
> $Phone = $row['Phone'];
> $Email = $row['Email'];
> $date = $row['date'];
> $id = $row['id'];
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
I didn't think they were useless. Jason said he would post some code if I wanted. Yes, I would like to see it. Pierre's post was very helpful and is the solution I will use for now. ren's posts were a little over my head. :) I'm sure you're really smart but not very helpful for someone new like me. Jeff Oien
> I know very little about php, but since you have already received a bunch of
> useless answers, I thought I add my guesswork.
>
> In php 4 you can access MS documents through Microsofts OLE interface. That
> means you can manipulate an .xls file as you would be able to in
> VisualBasic. You should look for something called COM in your documentation.
>
> I should add that I have never done it in php, only in perl...
>
> Goodluck
>
>
> -ren
>
> > Could anyone help me out with how to print the entire contents of a
> > database as an Excel file? I'm familiar with the header:
> >
> > header("Content-Type: application/vnd.ms-excel");
> >
> > just not sure how to go about it beyond that. I have this code and
> > am not sure what do do after it. Thanks.
> > Jeff Oien
> >
> > while ($row = mysql_fetch_array($result)) {
> > $Event = $row['Event'];
> > $First_Name = $row['First_Name'];
> > $Last_Name = $row['Last_Name'];
> > $Title = $row['Title'];
> > $Organization = $row['Organization'];
> > $Phone = $row['Phone'];
> > $Email = $row['Email'];
> > $date = $row['date'];
> > $id = $row['id'];
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Keith Vance wrote:
> You should be able to do something using PHP, try looking here, > http://www.php.net/manual/cs/features.file-upload.php > I think there is just a communication problem between you and your hosting > company. They don't allow ftp uploads, but as long as you are doing it > through http, it should work fine. There is also some good stuff about > this on http://www.phpbuilder.com. I do it all the time and my hosting > company couldn't care less, but your's may be different and you may have > to switch or should switch to someone else if you can't get the http > upload to work. > > Keith
Hello Keith, thanks very much. Sorry because I forgot explain following: picture files really are uploaded to host server, because I check temp file and they are ok (I check $userfile_temp variable). My problem is: I can't move, copy, rename or anything else other than 'open and read' this file. Whenever I try exec copy commands I receive 'copy command denied for /web/.....'. You know temp files will be deleted when script terminates, so I die with my pictures in hand.
Thanks again
Mig
attached mail follows:
On Thursday 15 March 2001 03:26, you wrote:
> Hello Keith, thanks very much. Sorry because I forgot explain > following: picture files really are uploaded to host server, because I > check temp file and they are ok (I check $userfile_temp variable). My > problem is: I can't move, copy, rename or anything else other than > 'open and read' this file. Whenever I try exec copy commands I receive
Well, you want to store them in the database anyway, so "open and read" is sufficient. And for retrieving them you don't need GD. So you should have no problems.
-- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)Pretty cool, the kind of power information technology puts in our hands these days.
- Securityfocus on probing 36000000 hosts for known problems in 3 weeks
attached mail follows:
the much easier method is to change all your code extensions to be either parsed or forbidden in httpd.conf
<Files *.egn> AllowOverride AuthConfig FileInfo Indexes Limit Options Order allow,deny Deny from all </Files>
or
AddType application/x-httpd-php .inc .php .php3 .phtml .egn .wml
that will protect agains people typing the url in their broswer to get the code. to prevent people from ftp'ing in and getting others code, not just their own use protftpd, this will allow every user to have their own root dir.
DefaultRoot ~/wwwroot/
in the users home dir, ie. /home/lee make a symbolic link callred wwwroot to where ever you want their home ftp dir to be.
ln -s /home/httpd/vhosts/lee.com /home/lee/wwwroot
done.
--Chris Lee Mediawaveonline.com
ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120
lee
mediawaveonline.com
"Jack Dempsey" <dempsejn
georgetown.edu> wrote in message news:3AB01B1F.8976F5AC
georgetown.edu... Murph wrote: > > Hi. > > So, I've written all this nifty code and I'd like to do what I can from having it pilfered. > > What do you do to keep your stuff safe? > > Murph > > www.murphatnight.com > __________________________________________________________________ > Brian Murphy - 193A Lowell St., Apt. 24 - Methuen, MA 01844 - (978) 725-6654
hey murph,
i have the same issue...the only thing i've found so far is the zend encoder....cept it costs money...too much for me....so, if you're worried about keeping others from looking at it on your server, i suppose you could change perms...but then you'd have to make sure they can still be accessed on the web....if you are selling them or putting them on others servers, i really don't know what you can do....
jack
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Actually, I think the best thing is to offer good service and value to your customer . Then why would anyone want to invest the time to decompile your work to change it?
On 3/14/01 8:30 PM, "Jack Dempsey" <dempsejn
georgetown.edu> wrote:
> Murph wrote: >> >> Hi. >> >> So, I've written all this nifty code and I'd like to do what I can from >> having it pilfered. >> >> What do you do to keep your stuff safe? >> >> Murph >> >> www.murphatnight.com >> __________________________________________________________________ >> Brian Murphy - 193A Lowell St., Apt. 24 - Methuen, MA 01844 - (978) 725-6654
attached mail follows:
Try it this way instead (my apologies for any typos, I'm getting ready to leave work and didn't bother to test it, but it should get the concept across).
- - - - - <?php error_reporting(E_ALL); include("/home/httpd/php/open_db.inc");
// default setting for $sort_term if ($sort_term == null) { $sort_term = "lid"; }
$sql = "SELECT lid, remote_addr, php_self, uid, event_time FROM website_log ORDER BY $sort_term ASC";
$result = mysql_query($sql, $db); $rows = mysql_num_rows($result); ?> <center> <b><u>Log File Dump</u></b> <br> <br> <table bgcolor=#000000> <tr> <td bgcolor=#000000> <table cellpadding=4 cellspacing=0 bgcolor=#ffffff> <tr> <th> <a href="<?php echo $PHP_SELF;?>?sort_term=lid">Log ID#</a> </th> <th> <a href="<?php echo $PHP_SELF;?>?sort_term=remote_addr">Remote Address</a> </th> <th> <a href="<?php echo $PHP_SELF;?>?sort_term=php_self">File Accessed</a> </th> <th> <a href="<?php echo $PHP_SELF;?>?sort_term=uid">Accessed By</a> </th> <th> <a href="<?php echo $PHP_SELF;?>?sort_term=event_time">On this Date</a> </th> </tr> <?php while ($row = mysql_fetch_array($result)) { $log_id = $row["lid"]; $remote_address = $row["remote_addr"]; $file_id = $row["php_self"]; $user_id = $row["uid"]; $time_of_event = $row["event_time"];
?> <tr> <td> <form name="log_id_search" action="<?php echo $PHP_SELF;?>" method="POST"> <input type="hidden" name="sql_search_type" value="log_id"/> <input type=hidden name="search_key" value="<?php echo $log_id;?>"/> <input type="submit" name="search_this" value="<?php echo $log_id;?>"/> </form> </td> <td> <?php echo $remote_address;?> </td> <td> <?php echo $file_id;?> </td> <td> <?php echo $user_id;?> </td> <td> <?php echo $time_of_event;?> </td> </tr> <?php } mysql_free_result($result); mysql_close($db); ?> </table> </td> </tr> </table> </center> - - - - -
attached mail follows:
> I was checking my error log and the entire post-PHP contents of a > page was in my error log. I checked the access log and the page was > requested but the client got back 0 bytes. very strange. > > It looks like it happened a few times. > > I'm using Apache 1.3.14 on RH 7.0 with PHP 4.0.4pl1.
Great! I was hoping it wasn't only me. This is the same problem that I am experiencing, which I posted here earlier today.
I am using a similar setup, only I'm using RH 6.2.
I can produce the problem if the post-process page is extremely large (hundreds of kB). This is accomplished easily if you try to send back an mp3 file, for example. Anyway, if I cancel the stream in mid-send, the file itself gets written to the error log. I can make this happen repeatedly. I've tried the same code on Apache 1.3.12 + php 4.0.1 and php 4.0.3pl1 and it does /not/ happen. So far, I can only make this happen w/ Apache 1.3.14 + PHP 4.0.4pl1. I'm also currently fetching other versions of the two to see if it is isolated on 1.3.14 + 4.0.4pl1.
I want to note that it doesn't matter if it's text or binary, if it's large enough for me to cancel in mid-stream, it'll end up in apache error_log.
very strange.
You are not alone, Seth
attached mail follows:
> > > I was checking my error log and the entire post-PHP contents of a > > page was in my error log. I checked the access log and the page was > > requested but the client got back 0 bytes. very strange. > > > > It looks like it happened a few times. > > > > I'm using Apache 1.3.14 on RH 7.0 with PHP 4.0.4pl1. > > Great! I was hoping it wasn't only me. This is the same problem that I am experiencing, which I posted here earlier today. > > I am using a similar setup, only I'm using RH 6.2. > > I can produce the problem if the post-process page is extremely large (hundreds of kB). This is accomplished easily if you try to send back an mp3 file, for example. Anyway, if I cancel the stream in mid-send, the file itself gets written to the error log. I can make this happen repeatedly. I've tried the same code on Apache 1.3.12 + php 4.0.1 and php 4.0.3pl1 and it does /not/ happen. So far, I can only make this happen w/ Apache 1.3.14 + PHP 4.0.4pl1. I'm also currently fetching other versions of the two to see if it is isolated on 1.3.14 + 4.0.4pl1. > > I want to note that it doesn't matter if it's text or binary, if it's large enough for me to cancel in mid-stream, it'll end up in apache error_log. > > very strange. > > You are not alone, > Seth
FYI. I think this is fixed in CVS version.
Regards,
Yasuo Ohgaki
attached mail follows:
Ok, thanks David for your help,
now to change a character set in mysql do you have to recomplie it even though the char set i want to use is in the /usr/local/share/mysql/charsets directory?
-----Original Message-----
From: David Robley [mailto:huntsman
flinders.edu.au]
Sent: Thursday, March 15, 2001 12:00 PM
To: Peter Houchin; Php-General
Lists. Php. Net
Subject: Re: [PHP] Help please
On Wed, 14 Mar 2001 23:18, Peter Houchin wrote:
> Hi,
> when i try and access my database from a web page i get this error
>
> MySQL Connection Failed: Can't initialize character set 12 (path:
> default)
>
> can some one please help me out with the "Can't initialize character
> set 12 (path: defualt) cuz i don't understand what it means by the
> character set 12 since the line it mentions is a simple mysql_connect()
> ...
>
> if any one could shed any light on this it would be great
>
> thanks
>
> Peter Houchin
> peterh
sunrentals.com.au
Check out this link - may be the answer you are looking for.
http://http://mirror.aarnet.edu.au/pub/mysql/doc/C/a/Cannot_initialize_chara cter_set.html
-- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
attached mail follows:
----------------------------------------------------------------------------
-----------------
Disclaimer: The information contained in this email is intended only for the
use of the person(s) to whom it is addressed and may be confidential or
contain legally privileged information. If you are not the intended
recipient you are hereby notified that any perusal, use, distribution,
copying or disclosure is strictly prohibited. If you have received this
email in error please immediately advise us by return email at
postmaster
normandy.com.au and delete the email document without making a
copy.
----------------------------------------------------------------------------
-----------------
Have a look at http://www.phpbuilder.com/columns/barry20000731.php3 for an overview of db design and http://www.phpbuilder.com/columns/joe20010104.php3
I havent read either in depth but they seem OK.
As a nice litle SQL overview i often recommended http://w3.one.net/~jhoffman/sqltut.htm which is a nice handy overview of all the various SQL commands.
Have fun.
(Funnily enough out of all my textbooks on DB design my favourite refresher on Normalisation theory is a photocopy of a chapter from a "Visual Basic 3 and Databases" pretty embarrassing but i've helped several people with it ;)
mn
Mark Nold
markn
enspace.com <mailto:markn
enspace.com>
Senior Consultant
Change is inevitable, except from vending machines.
-----Original Message-----
From: Justin French [mailto:justin
indent.com.au]
Sent: Wednesday, March 14, 2001 10:45 AM
Cc: php
Subject: Re: [PHP] tutorials on good database design
Jason Murray wrote:
> True - I find the best way to explain database design to someone is by > having them design a database (as with someone here last week whom I > helped out with an office sports tipping database as a little how-to-SQL > project) and help them out as they go.
First up, thanks to everyone for the quick replies!! Went out to lunch, came back, lot's of replies -- thanks :)
I'll have to dig through the hard drive, and find the data stuff that i was working on a while back, so that we can discuss a real world example.
I'll probably post it late today or tomorrow.
Justin
attached mail follows:
I'm having a ton of trouble trying to get pictures to display. At first, I thought I had the problem fixed - but that's because the pictures reside on my machine. So instead of providing a path to the pictures like: c:/phpweb/userpics/ I tried absolute paths like ../userpics and that doesn't seem to have worked either.
Here's a snippet of my code and i'm hoping someone can help me out on this.
Thanks, Mike
<?PHP $filedir = "../userpics";
//check for jpg format if($fupload_type == "image/pjpeg") { //copy picture to new directory if(copy($fupload, "$filedir/$CUserName.jpg")) { //show picture print ("<img src=\"$filedir/$CUserName.jpg\"); } } ?>
attached mail follows:
It might not be it, but this stood out...
<?PHP $filedir = "../userpics";
//check for jpg format if($fupload_type == "image/pjpeg") { //copy picture to new directory if(copy($fupload, "$filedir/$CUserName.jpg")) { //show picture // You forgot the closing '>' tag...and you are escaping the '"' print ("<img src=\"$filedir/$CUserName.jpg\">"); } } ?>
Jason Lotito www.NewbieNetwork.net Where those who can, teach; and those who can, learn.
> -----Original Message-----
> From: Mike Yuen [mailto:myuen
ucalgary.ca]
> Sent: Wednesday, March 14, 2001 9:01 PM
> To: php-general
lists.php.net
> Subject: [PHP] URGENT: Can't see picture
>
>
> I'm having a ton of trouble trying to get pictures to display. At first,
> I thought I had the problem fixed - but that's because the pictures reside
> on my machine. So instead of providing a path to the pictures like:
> c:/phpweb/userpics/ I tried absolute paths like ../userpics and that
> doesn't seem to have worked either.
>
> Here's a snippet of my code and i'm hoping someone can help me out on
> this.
>
> Thanks,
> Mike
>
> <?PHP
> $filedir = "../userpics";
>
> //check for jpg format
> if($fupload_type == "image/pjpeg")
> {
> //copy picture to new directory
> if(copy($fupload, "$filedir/$CUserName.jpg"))
> {
> //show picture
> print ("<img src=\"$filedir/$CUserName.jpg\");
> }
> }
> ?>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Friends--
I know (at least the claim) that PHP can do marvelous thing to Flash files (with libswf), presumably including "streaming" realtime feedback of a script's action.
But I find the Flash user interface just buttugly and like LiveMotion instead. LM can readily create SVG. So two questions please:
Is there an existing library for SVG manipulation? Are there enthusiasts for this option?
If SWF is indicated, is there any known difference so far as libswf is concerned between Flash and LiveMotion generated SWF?
Many thanks.
Best, Ted
_____________
Ted Goranson
Fusecap and Sirius-Beta, Virginia Beach USA
757/426-6704
tedg
sirius-beta.com
Symmetry Conference: http://www.isis-s.unsw.edu.au
attached mail follows:
In php.general, you wrote: >I know (at least the claim) that PHP can do marvelous thing to Flash >files (with libswf), presumably including "streaming" realtime >feedback of a script's action.
It can't. PHP can generate Flash files directly (and using Ming - it beats libswf handily - http://www.opaque.net/ming/) but cannot edit existing movies. Since Flash allows you to load other Flash movies on the fly, you can mix static and dynamically generated Flash movies into the same presentation. As an example, you might have a master interface which is carefully hand-tuned in Flash/LiveMotion and has specific areas where generated movies are loaded.
Flash does offer the ability to load content from URLs, but not in a live fashion - you need Director / multi-user server for that. Since Director allows Flash objects, you could theoretically have your Flash interact with the server by sending communications through Director / MUS, but I haven't personally done this. Since Flash / Director performance will already be pathetic, introducing any sort of network overhead would probably reduce it to comical levels.
>Is there an existing library for SVG manipulation? Are there >enthusiasts for this option?
SVG files are XML, which means you can use either of PHP's native XML parsers to do low-level manipulation (the entire SVG + scripting option should be very similar to conventional HTML + CSS + JavaScript work).
If you're doing much at all, I'd strongly recommend you develop the appropriate function libraries / objects using the underlying primitives. I'm doing this with some extensive Flash generation and it greatly civilizes things - you cannot plan ahead too much with this.
>If SWF is indicated, is there any known difference so far as libswf >is concerned between Flash and LiveMotion generated SWF?
libswf / ming can't edit existing files; if you're using LoadMovie, either one should be identical. On thing which may be an issue is Action Script - if LiveMotion doesn't support it or causes problems "navigating" the action script variable hierarchy, getting multiple movies to cooperate would be difficult and kludgy.
attached mail follows:
Does your Apache hang? Is that normal? To have commands sitting for 1-2 minutes?
Using Apache 1.3.17 + PHP 4.0.4pl1 + newest MySQL on a Debian Linux box.
I use PHP for pretty much everything. So I have Apache set to parse all files as PHP. But that's never been a problem before. (This is a new server, therefore new Apache, PHP, MySQL, etc.)
Any ideas?
Check out this "top" report:
53 processes: 52 sleeping, 1 running, 0 zombie, 0 stopped CPU states: 0.2% user, 0.7% system, 0.0% nice, 99.0% idle Mem: 512452K av, 503160K used, 9292K free, 0K shrd, 7260K buff Swap: 979956K av, 0K used, 979956K free 372228K cached
PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND [[.... snip some other processes here ....]] 12345 www 9 0 4648 4648 2240 S 0 0.0 0.9 1:05 httpd 12346 www 9 0 4792 4792 2244 S 0 0.0 0.9 1:12 httpd 12347 www 9 0 4600 4600 2240 S 0 0.0 0.8 1:08 httpd 12348 www 9 0 4964 4964 2240 S 0 0.0 0.9 1:08 httpd 12349 www 10 0 4912 4912 2292 S 0 0.0 0.9 1:08 httpd 12352 www 9 0 4868 4868 2248 S 0 0.0 0.9 1:04 httpd 12358 www 9 0 4736 4736 2248 S 0 0.0 0.9 1:05 httpd 12359 www 9 0 4744 4744 2240 S 0 0.0 0.9 1:09 httpd 12360 www 9 0 5036 5036 2428 S 0 0.0 0.9 1:10 httpd 12361 www 9 0 4656 4656 2248 S 0 0.0 0.9 1:12 httpd 12377 mysql 9 0 6624 6624 2076 S 0 0.0 1.2 0:04 mysqld 12378 mysql 9 0 6624 6624 2076 S 0 0.0 1.2 0:05 mysqld
Whaddya think?
attached mail follows:
On Thursday 15 March 2001 06:37, you wrote: > Does your Apache hang? > Is that normal? > To have commands sitting for 1-2 minutes?
> PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME > COMMAND [[.... snip some other processes here ....]] > 12345 www 9 0 4648 4648 2240 S 0 0.0 0.9 1:05 > httpd 12346 www 9 0 4792 4792 2244 S 0 0.0 0.9 > 1:12 httpd 12347 www 9 0 4600 4600 2240 S 0 0.0 0.8 > 1:08 httpd 12348 www 9 0 4964 4964 2240 S 0 0.0 0.9 > 1:08 httpd 12349 www 10 0 4912 4912 2292 S 0 0.0 > 0.9 1:08 httpd 12352 www 9 0 4868 4868 2248 S 0 0.0 > 0.9 1:04 httpd 12358 www 9 0 4736 4736 2248 S 0 > 0.0 0.9 1:05 httpd 12359 www 9 0 4744 4744 2240 S 0 > 0.0 0.9 1:09 httpd 12360 www 9 0 5036 5036 2428 S > 0 0.0 0.9 1:10 httpd 12361 www 9 0 4656 4656 2248 S > 0 0.0 0.9 1:12 httpd 12377 mysql 9 0 6624 6624 2076 S > 0 0.0 1.2 0:04 mysqld 12378 mysql 9 0 6624 6624 2076 S > 0 0.0 1.2 0:05 mysqld
Apache isn't hanging - it's just keeping its existing subprocesses at hand in case some new request comes in. If apache would spawn a new subprocess on each request it would be painfully slow.
-- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)Pretty cool, the kind of power information technology puts in our hands these days.
- Securityfocus on probing 36000000 hosts for known problems in 3 weeks
attached mail follows:
Hello everybody,
How does the behind the scenes work by PHP exactly go? Does the PHP thread remain active so long as the information is sent to the visitor? Or will PHP parse the code and send it to Apache which will send the data to the user itself?
The reason that I'm asking this is I'm writing a statistics add-on for one of my sites and was wondering whether the code below would give the time in which PHP parses the code or in which the data gets streamed to the user.
$time_one = microtime(void); fpassthru($file); $time_two = microtime(void); // + here will be the code to calculate the difference // betweeen $time_one and $time_two
Would I get information about my server (parsing time) or would I get some information about the requesters internet connection (how fast will my files get to the user). Both would be pretty important!
PS What are the advanced statistics programs out there? I wouldn't mind seeing a sample report (any commercial or non-commercial).
Thanks in advance in advance!
Yours, Lauri
attached mail follows:
Here is what happens... I am skipping a few steps here and there.... etc..
you type url and run.
the broswer finds the server... the server looks at he extension of the document and sends the page to the php engine. The engine parses through the doc, writing to the buffer (unless told to stream info) The page is completed... the engine returns an ok to the server.. the server then dumps the buffer out to the browser.
All through this process there is a live thread between your browser and the server. unless you send a cancel.
Rick
At 07:40 AM 3/15/01 +0200, Lauri Vain wrote:
>Hello everybody,
>
>How does the behind the scenes work by PHP exactly go? Does the PHP thread
>remain active so long as the information is sent to the visitor? Or will PHP
>parse the code and send it to Apache which will send the data to the user
>itself?
>
>The reason that I'm asking this is I'm writing a statistics add-on for one
>of my
>sites and was wondering whether the code below would give the time in
>which PHP
>parses the code or in which the data gets streamed to the user.
>
> $time_one = microtime(void);
> fpassthru($file);
> $time_two = microtime(void);
> // + here will be the code to calculate the difference
> // betweeen $time_one and $time_two
>
>Would I get information about my server (parsing time) or would I get some
>information about the requesters internet connection (how fast will my
>files get
>to the user). Both would be pretty important!
>
>PS What are the advanced statistics programs out there? I wouldn't mind
>seeing
>a sample report (any commercial or non-commercial).
>
>Thanks in advance in advance!
>
>Yours,
>Lauri
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
##########################################################
# Rick St Jean,
# rstjean
internet.look.ca
# President of Design Shark,
# http://www.designshark.com/
# Quick Contact: http://www.designshark.com/messaging.ihtml
# Tel: 905-684-2952
##########################################################
attached mail follows:
On 14 Mar 2001 22:11:10 -0800, Rick St Jean <rstjean
internet.look.ca> wrote:
>All through this process there is a live thread between your browser and
>the server.
>unless you send a cancel.
One minor addition - the connection will close when you hit cancel but the PHP code can continue running if you choose. This can be quite handy if you want to make sure your code can finish running or clean up nicely before quitting.
attached mail follows:
On 14 Mar 2001 21:39:05 -0800, Lauri Vain <optima
hot.ee> wrote:
>How does the behind the scenes work by PHP exactly go? Does the PHP thread
>remain active so long as the information is sent to the visitor? Or will PHP
>parse the code and send it to Apache which will send the data to the user
>itself?
1 Apache receives the request and determines that it's a PHP script. 2 PHP parses your code 3 PHP executes your code 4 PHP passes output back to Apache 5 Apache sends output to the browser (optionally through things like SSL) 6 Apache finishes request (e.g. logs it, closes a non-persistent connection)
The catch is that steps 4/5 may repeat - this depends on your output buffering setup. PHP can wait and send everything when the script finishes, send output in blocks or send every output from each echo/print immediately. (PHP can also do things like compress that output on the fly, but that's a separate conversation)
>The reason that I'm asking this is I'm writing a statistics add-on for one of >my sites and was wondering whether the code below would give the time in >which PHP parses the code or in which the data gets streamed to the user.
You'd get the time needed to read the file and either send it or add it to the output buffer (depending on your output buffer config as mentioned above). By the time your code is executed, PHP will have already parsed your script (with the exception of things like conditional / variable include()s and require()s), so you'd only get the time required to execute the code, not parse it.
If you want to get round-trip times including transmission to the user, you'd need to have some way of getting the user's browser to record a second request, which introduces a lot of potential variables.
It might be interesting to see how something relying entirely on client-side calculation like the code below would compare with other approaches (e.g. Header("Location: measure.php?start=" . time()) where measure.php just does $elapsed = time() - $start). It should remove almost all of the server-side latency and, in theory, would give some reasonable indication of how long it takes to transfer a file over the intermediate network connection, which would give you a reasonable idea of available bandwidth.
(Disclaimer: completely untested code written just now which has never been seen by anything other than vi. Caveat programmer.)
<html> <head> <script lang="javascript"> Start = new Date();
function record_elapsed() { Now = new Date(); Elapsed = Now.getTime() - Start.getTime(); recordTimeImg = new Image(); recordTimeImg = "recorder.php?Elapsed=" + Elapsed; } </script> <? flush(); /* send this as quickly as possible */ ?> </head> <body OnLoad="record_elapsed();"> ... a fair amount of text / HTML ... </body> </html>
attached mail follows:
>the connection will close when you hit cancel but the PHP >code can continue running if you choose.
Really?!?
How do you choose to have the PHP script continue even if a browser leaves/dumps? I've always wanted to do that. Didn't know it was possible.
attached mail follows:
On Thursday 15 March 2001 08:34, you wrote:
> If you want to get round-trip times including transmission to the user, > you'd need to have some way of getting the user's browser to record a > second request, which introduces a lot of potential variables.
Why not simply use "ab" (the benchmarking app that comes with apache)?
-- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)Pretty cool, the kind of power information technology puts in our hands these days.
- Securityfocus on probing 36000000 hosts for known problems in 3 weeks
attached mail follows:
ok, figured my problem out.. apparently system() and exec() and all tha can't be called from php if it is runnig as an apache mod.. anyone know a way around this?
-Daniel
attached mail follows:
Daniel Lynn wrote:
>
> ok, figured my problem out.. apparently system() and exec() and all tha
> can't be called from php if it is runnig as an apache mod.. anyone know
> a way around this?
>
> -Daniel
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
umm, you sure bout that? i could be sleep typing, but that seems totally off... http://www.php.net/manual/en/function.system.php
jack
attached mail follows:
Well, no, I'm not sure... I, personally, am a graphic designer that used to program and somehow got suckered into programming again.. however, the person in charge of teh server came to this conclusion for us and wether he is righ or wrong, we have to face the fact that the exact same code to make the system call used to work and now doesn't. There is no error or warning, and it happened right around when we sopped running php as a cgi script and started running it as an apache mod... ::shrug:: so, what he says makes some degree of sense anyway.
-Daniel
Jack Dempsey wrote:
> Daniel Lynn wrote:
> >
> > ok, figured my problem out.. apparently system() and exec() and all tha
> > can't be called from php if it is runnig as an apache mod.. anyone know
> > a way around this?
> >
> > -Daniel
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> umm, you sure bout that? i could be sleep typing, but that seems totally
> off...
> http://www.php.net/manual/en/function.system.php
>
> jack
attached mail follows:
ok, i gotcha...what's the call? perhaps there's an error with the actual call...do you have any code you can show?
jack
Daniel Lynn wrote:
>
> Well, no, I'm not sure... I, personally, am a graphic designer that used to
> program and somehow got suckered into programming again.. however, the person
> in charge of teh server came to this conclusion for us and wether he is righ
> or wrong, we have to face the fact that the exact same code to make the system
> call used to work and now doesn't. There is no error or warning, and it
> happened right around when we sopped running php as a cgi script and started
> running it as an apache mod... ::shrug:: so, what he says makes some degree of
> sense anyway.
>
> -Daniel
>
> Jack Dempsey wrote:
>
> > Daniel Lynn wrote:
> > >
> > > ok, figured my problem out.. apparently system() and exec() and all tha
> > > can't be called from php if it is runnig as an apache mod.. anyone know
> > > a way around this?
> > >
> > > -Daniel
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> > umm, you sure bout that? i could be sleep typing, but that seems totally
> > off...
> > http://www.php.net/manual/en/function.system.php
> >
> > jack
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
[quotes reordered and trimmed]
In article <3AB05CAF.ECA3C69E
fast.net>, waylund
fast.net (Daniel Lynn)
wrote:
> > > apparently system() and exec() and all tha can't be called from php > > > if it is runnig as an apache mod..
> the person in charge of teh server came to this conclusion for us and > wether he is righ or wrong, we have to face the fact that the exact > same code to make the system call used to work and now doesn't. There > is no error or warning, and it happened right around when we sopped > running php as a cgi script and started running it as an apache mod...
The new install may be using a different php.ini file, or someone may have recently changed a php.ini setting. There's a new-ish option called "disable_functions" which can be used to selectively turn off functions--system() and exec() being two of the more obvious targets for this. Call phpinfo() to check whether a global or local setting is preventing those functions from running.
-- CC
attached mail follows:
Hello,
My internet provider does not have the $HTTP_POST_VARS variable enabled... What would be the easiest way to capture submitted PDF form data without having this variable?
Thanks Dustin Leggans
attached mail follows:
On Thu, Mar 15, 2001 at 01:17:38AM -0500, Dustin Leggans wrote: > Hello, > > My internet provider does not have the $HTTP_POST_VARS variable enabled... > What would be the easiest way to capture submitted PDF form data without > having this variable? > According to the source the latest php does provide all field as php variables similar to html form fields. This means you wouldn't need HTTP_POST_VARS.
Uwe
-- Uwe.Steinmannfernuni-hagen.de Tel: +2331 987 4528 Fax: +2331 987 375
attached mail follows:
Hi chris.
The codes works on my linux box too. But retaining the codes, I proceed to connect to a imap server on a APPLE machine. Everything works except it stops at imap_sort. Is there a conflict between mac and linux??
terrence
Chris Lee wrote:
> imap functions are notorious for not returning anything usfull, same with xslt functions.
>
> $headers = imap_sort($this->imap_stream, SORTARRIVAL, 1, SE_UID );
>
> this wrks on my linux box. its almost exactly the same as yours. one thing I found is try playing with
>
> if ($this->imap_folder)
> $this->imap_stream =
imap_open($this->imap_stream_string, $this->imap_username, $this->imap_password);
> else
> $this->imap_stream =
imap_open($this->imap_stream_string, $this->imap_username, $this->imap_password, OP_HALFOPEN);
>
> if there is a folder then do no use OP_HALFOPEN. I had to use this to get nntp working right.
>
> --
>
> Chris Lee
> Mediawaveonline.com
>
> ph. 250.377.1095
> ph. 250.376.2690
> fx. 250.554.1120
>
> lee
mediawaveonline.com
>
> "Terrence Wong" <terrence
edlabs.com> wrote in message news:3AAF6B99.F0E4B5A0
edlabs.com...
> This command works without problems on a local unix server.
> However, when I tried the exact same code , $sortmail =
> imap_sort($mailbox,SORTSIZE,1) on a remote imap server running on mac,
> it produces problems. (no error messages)
>
> I am unable to check the error messages as they are none. And adding on
> to that, the HTML have been terminated without any error messages
> without completing the entire html closing tags.
>
> All functions works, except imap_sort?
>
> Anyone? any ideas?
> terrence
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Is there a possibility that the imap_sort function is not capatible with APPLE servers? For my unix server, I have used the lastest imap services?
Still problem persist for imap_sort to APPLE imap servers.
terrence
Chris Lee wrote:
> imap functions are notorious for not returning anything usfull, same with xslt functions.
>
> $headers = imap_sort($this->imap_stream, SORTARRIVAL, 1, SE_UID );
>
> this wrks on my linux box. its almost exactly the same as yours. one thing I found is try playing with
>
> if ($this->imap_folder)
> $this->imap_stream =
imap_open($this->imap_stream_string, $this->imap_username, $this->imap_password);
> else
> $this->imap_stream =
imap_open($this->imap_stream_string, $this->imap_username, $this->imap_password, OP_HALFOPEN);
>
> if there is a folder then do no use OP_HALFOPEN. I had to use this to get nntp working right.
>
> --
>
> Chris Lee
> Mediawaveonline.com
>
> ph. 250.377.1095
> ph. 250.376.2690
> fx. 250.554.1120
>
> lee
mediawaveonline.com
>
> "Terrence Wong" <terrence
edlabs.com> wrote in message news:3AAF6B99.F0E4B5A0
edlabs.com...
> This command works without problems on a local unix server.
> However, when I tried the exact same code , $sortmail =
> imap_sort($mailbox,SORTSIZE,1) on a remote imap server running on mac,
> it produces problems. (no error messages)
>
> I am unable to check the error messages as they are none. And adding on
> to that, the HTML have been terminated without any error messages
> without completing the entire html closing tags.
>
> All functions works, except imap_sort?
>
> Anyone? any ideas?
> terrence
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Today I was uploading my completed script to my school's server at http://www.u.arizona.edu/~avr/school/questionanswer.phtml?questionFileName=testQA and noticed when I fill in the form and hit submit, I get a lot of errors such as unable to access current working directory, unable to access my file, and unable to find file identifier. In problem shooting, I changed the permissions of all the files for this script so that everyone can read write and execute them but I still get the errors. I suspect it has to do with the way my script creates a file. In qa.php3 I have the following line which seems to create a file if it does not exist: $answerFile = "$questionFileName-A.txt"; Then I go along and open this later with $wa=fopen("$answerFile","a"); In problem shooting I tried uploading a blank file with the name $questionFileName-A.txt and it worked just fine after that, but that will not work for my long term goals On my home computer with win98, apache, and php this seems to work without a hitch (even if the file doesn't exist), but appartently it doesn't work for my school's server. I was wondering why it works on my computer but not on the server (I suspect it may have something to do with security)??
To get around this, I supose I need a few lines of code that first test if my file exist and then if it doesn't I will have to create it using the touch command?? Any other ideas?
-Thanks Andrew V. Romero To reply personally, remove all numbers from my address.
attached mail follows:
On Thu, 15 Mar 2001 17:20, Andrew V. Romero wrote: > Today I was uploading my completed script to my school's server at > http://www.u.arizona.edu/~avr/school/questionanswer.phtml?questionFileN >ame=testQA and noticed when I fill in the form and hit submit, I get a > lot of errors such as unable to access current working directory, > unable to access my file, and unable to find file identifier. In > problem shooting, I changed the permissions of all the files for this > script so that everyone can read write and execute them but I still get > the errors. I suspect it has to do with the way my script creates a > file. In qa.php3 I have the following line which seems to create a file > if it does not exist: > $answerFile = "$questionFileName-A.txt"; Then I go along and open this > later with $wa=fopen("$answerFile","a"); > In problem shooting I tried uploading a blank file with the name > $questionFileName-A.txt and it worked just fine after that, but that > will not work for my long term goals On my home computer with win98, > apache, and php this seems to work without a hitch (even if the file > doesn't exist), but appartently it doesn't work for my school's server. > I was wondering why it works on my computer but not on the server (I > suspect it may have something to do with security)?? > > To get around this, I supose I need a few lines of code that first test > if my file exist and then if it doesn't I will have to create it using > the touch command?? Any other ideas?
Is this a *nix server? In which case you may have problems with the directory permissions. Note that the directory as well as file permissions must be set to allow the webserver user to read and write if you wish to create files. Also the directory structure must at least allow access down the tree to the point where you are working.
-- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
attached mail follows:
I believe it is a *nix server. I haven't looked into directory permissions before but that is an area I will definately look into. If this was a problem with the directory permissions, would the problem still disappear if a file with the correct name was already in the directory? -Thanks Andrew V. Romero To reply personally, remove all numbers from address. ICQ# 54080914
David Robley wrote:
> On Thu, 15 Mar 2001 17:20, Andrew V. Romero wrote:
> > Today I was uploading my completed script to my school's server at
> > http://www.u.arizona.edu/~avr/school/questionanswer.phtml?questionFileN
> >ame=testQA and noticed when I fill in the form and hit submit, I get a
> > lot of errors such as unable to access current working directory,
> > unable to access my file, and unable to find file identifier. In
> > problem shooting, I changed the permissions of all the files for this
> > script so that everyone can read write and execute them but I still get
> > the errors. I suspect it has to do with the way my script creates a
> > file. In qa.php3 I have the following line which seems to create a file
> > if it does not exist:
> > $answerFile = "$questionFileName-A.txt"; Then I go along and open this
> > later with $wa=fopen("$answerFile","a");
> > In problem shooting I tried uploading a blank file with the name
> > $questionFileName-A.txt and it worked just fine after that, but that
> > will not work for my long term goals On my home computer with win98,
> > apache, and php this seems to work without a hitch (even if the file
> > doesn't exist), but appartently it doesn't work for my school's server.
> > I was wondering why it works on my computer but not on the server (I
> > suspect it may have something to do with security)??
> >
> > To get around this, I supose I need a few lines of code that first test
> > if my file exist and then if it doesn't I will have to create it using
> > the touch command?? Any other ideas?
>
> Is this a *nix server? In which case you may have problems with the
> directory permissions. Note that the directory as well as file
> permissions must be set to allow the webserver user to read and write if
> you wish to create files. Also the directory structure must at least
> allow access down the tree to the point where you are working.
>
> --
> David Robley | WEBMASTER & Mail List Admin
> RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
> AusEinet | http://auseinet.flinders.edu.au/
> Flinders University, ADELAIDE, SOUTH AUSTRALIA
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Thu, 15 Mar 2001 17:41, Andrew V. Romero wrote: > I believe it is a *nix server. I haven't looked into directory > permissions before but that is an area I will definately look into. If > this was a problem with the directory permissions, would the problem > still disappear if a file with the correct name was already in the > directory? > -Thanks > Andrew V. Romero > To reply personally, remove all numbers from address. > ICQ# 54080914 >
If the permissions on the file were right, I think yes.
To point out another possible problem
$answerFile = "$questionFileName-A.txt"; Then I go along and open this later with $wa=fopen("$answerFile","a");
Actually the fopen attempts to create the file if it doesn't exist. But I'd be worried about the $ in your filename? If php tried to parse that as a variable you may get unexpected results? I think that $answerFile might contain the value '.txt' Try echoing it and see....
[I'm off home now.]
-- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
attached mail follows:
On Thursday 15 March 2001 07:50, you wrote:
> file. In qa.php3 I have the following line which seems to create a file > if it does not exist: > $answerFile = "$questionFileName-A.txt"; Then I go along and open this > later with $wa=fopen("$answerFile","a"); > In problem shooting I tried uploading a blank file with the name > $questionFileName-A.txt and it worked just fine after that, but that > will not work for my long term goals On my home computer with win98,
Ok, Assuming that your school server is an *nix system I think I know the solution.
Apparently fopen () works fine if you just append to an existing file, but fails if it has to create a new file. So - do you have write permissions for the directory you place the file in (creating a file means modifying (i.e. writing to) the directory) ?
> To get around this, I supose I need a few lines of code that first test > if my file exist and then if it doesn't I will have to create it using > the touch command?? Any other ideas?
If I'm right this won't work as well.
-- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)Pretty cool, the kind of power information technology puts in our hands these days.
- Securityfocus on probing 36000000 hosts for known problems in 3 weeks
attached mail follows:
Hi
im having a slight problem with this mail class, it works fine up until the loop runs more than 13 times, is this a looping problem or a mail problem? Ive attatched the mail class and the code is below:
include "./include/mime_mail.inc"; $fp=fopen(TestFile.txt, "w"); /*loop certain number of times */ for ($val = 0; $val < $NumCases; ++$val){ if ($val < $NumCases) {
blah blah
fwrite($fp,"$FName$IDNum$Addr1$sep$Addr2$sep$Addr3 etc etc"); /*these are vars written to the test file*/
} else { /*do nothing*/ } fclose( $fp );
$filename = TestFile.txt;
$content_type ="text/plain";
$fd = fopen($filename, "r");
$data = fread($fd, filesize($filename)); fclose($fd);
/*create new mail object $mail = new mime_mail;
$mail->from = "mailto:blah
blah.com;
$mail->to = "$Address";
$mail->subject = "Test";
$mail->body = "Test file sent";
$mail->add_attachment($data, $filename, $content_type);
$mail ->send();
Im really stumped here, any help will be greatly appreciated
Thanks Wade
attached mail follows:
On 14-Mar-01 Tao wrote: > Kevin, > > Thanks for the reply. This will not solve my problem. The problem is, for > some > languages the sentence structure may be different. For example, the > sentence > may need to be, > $greeting = "$first_name, welcome!" > as opposed to, > $greeting = "Welcome, $first_name!" > > Or, it can come in a different form, like, > $greeting = "Good morning, $first_name." > > These specificity need to be in the language file, not the scripts. > > Tao >
I use a MySQL table to localis(z)e both words & printf formats:
+-------+------+----------------+-------------------+ | catid | lang | strid | strval | +-------+------+----------------+-------------------+ | | de | Statistics for | Stand vom %s | | | de | Statistics | Statistik | | | sv | Statistics | Statistik | | | en | Statistics for | Statistics for %s | | | en | Statistics | Statistics | | | sv | Statistics for | Statistik för %s | +-------+------+----------------+-------------------+
+-------+------+---------------+----------------------------------------+ | catid | lang | strid | strval / +-------+------+---------------+----------------------------------------+ | | en | Topsignupurls | Top %d signup URL's for %s | | | de | Topsignupurls | Ãbersteigen Sie %d signup URL's für %s | | | sv | Topsignupurls | Topp %d försäljnings URLs för %s | +-------+------+---------------+----------------------------------------+
If the phrase structure is likely to be different, you store the printf specification as well. example:
body_beg(SITENAME.' '.nls('Statistics')); // title & open body ... $ds=formatdate($dte); // localized date string ... printf('<H5>' .nls('Statistics for') ."</H5>\n", $ds); ... printf('<H5>'.nls('Topsignupurls').' </H5>', 30, $ds);
Regards,
-- Don Read dreadtexas.net -- If you are going to sin, sin against God, not the bureaucracy. God will forgive you but the bureaucrats won't.
attached mail follows:
I want to have a posting column wherein people can post their messages and when a new message is posted the Curent date has to be added in the mysql database.
Do u think I should use Php to generate the date or should I have mysql to generate the date.
I am also going to allow people to search for messages as per date. For example
Search for messasges in the last week and stuff..
Please advice me..
THank You Dhaval Deasi
__________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/
attached mail follows:
Try using
<? $date = date ("Y-m-d H:i:s"); ?>
which formats the same as MySQL...
-----Original Message-----
From: Dhaval Desai [mailto:dhaval_adams
yahoo.com]
Sent: Thursday, March 15, 2001 2:19 AM
To: php-general
lists.php.net
Subject: [PHP] php or Mysql for DATE?
I want to have a posting column wherein people can post their messages and when a new message is posted the Curent date has to be added in the mysql database.
Do u think I should use Php to generate the date or should I have mysql to generate the date.
I am also going to allow people to search for messages as per date. For example
Search for messasges in the last week and stuff..
Please advice me..
THank You Dhaval Deasi
__________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Thu, 15 Mar 2001 17:49, Dhaval Desai wrote: > I want to have a posting column wherein people can > post their messages and when a new message is posted > the Curent date has to be added in the mysql database. > > Do u think I should use Php to generate the date or > should I have mysql to generate the date. > > I am also going to allow people to search for messages > as per date. For example > > Search for messasges in the last week and stuff.. > > > Please advice me.. > Have a look at the mysql manual in particular the date/time data types and how some can be automatically updated.
-- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
attached mail follows:
You can also use the curdate() function in the MYSQL syntax. e.g. insert into table (datefield) values (curdate());
Cheers Kee Yong
attached mail follows:
I am having problems figuring out how to loop to show more then one record... Any help would be great... All I can get is the first record...
Thanks...
Code:
<?php
$db = mysql_connect("localhost", "root", "*****"); mysql_select_db("indywebdesign",$db);
$invoices_result = mysql_query("select * from invoices WHERE customerid=$id ORDER BY invoiceid DESC"); $invoices = mysql_fetch_array($invoices_result);
?>
<TR> <TD BGCOLOR="#EAEAEA"><FONT FACE="Tahoma" SIZE="2"><?php echo $invoices["date"] ?></FONT></TD> <TD BGCOLOR="#EAEAEA"><FONT FACE="Tahoma" SIZE="2"><?php echo $invoices["amount"] ?></FONT></TD> <TD BGCOLOR="#EAEAEA" COLSPAN="2"><FONT FACE="Tahoma" SIZE="2"><?php echo $invoices["description"] ?></FONT></TD> </TR>
attached mail follows:
On Thu, 15 Mar 2001 17:48, WreckRman2 wrote: > I am having problems figuring out how to loop to show more then one > record... Any help would be great... All I can get is the first > record... > > Thanks... > > Code: > > <?php > > $db = mysql_connect("localhost", "root", "*****"); > mysql_select_db("indywebdesign",$db); > > $invoices_result = mysql_query("select * from invoices WHERE > customerid=$id ORDER BY invoiceid DESC"); > $invoices = mysql_fetch_array($invoices_result); > > ?> > > <TR> > <TD BGCOLOR="#EAEAEA"><FONT FACE="Tahoma" SIZE="2"><?php echo > $invoices["date"] ?></FONT></TD> > <TD BGCOLOR="#EAEAEA"><FONT FACE="Tahoma" SIZE="2"><?php echo > $invoices["amount"] ?></FONT></TD> > <TD BGCOLOR="#EAEAEA" COLSPAN="2"><FONT FACE="Tahoma" > SIZE="2"><?php echo $invoices["description"] ?></FONT></TD> > </TR>
Check out the example in the manual for mysql_fetch_array, using a while loop. Also see extracrt to save a bit of typing :-)
-- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
attached mail follows:
On 15-Mar-01 Chris wrote: > Hi, > Is there a way to do an array_pop with php3? > >
unset($dirs[sizeof($dirs)-1]); // php4 array_pop();
Regards,
-- Don Read dreadtexas.net -- If you are going to sin, sin against God, not the bureaucracy. God will forgive you but the bureaucrats won't.
attached mail follows:
Someone gave me the idea, and I coded it tonight use for making option lists of legal values from a mysql field that is enum'd. You don't have to know the values ahead of time. <function>---------------------------------------------------------------------- function mysql_fetch_enums( $link, $table_name, $field_name ){ $mysql_datatype_field = 1; if (!$result = mysql_query ("SHOW COLUMNS FROM $table_name LIKE '$field_name'", $link ) ){ $output=0; } else { $mysql_column_data = mysql_fetch_row( $result ); if ( !$enum_data= $mysql_column_data[$mysql_datatype_field] ){ $output=0; } else if ( !$buffer_array=explode("'", $enum_data) ){ $output = 0; } else { $i = 0; reset ($buffer_array); while (list(, $value) = each ($buffer_array)) { if( $i % 2 ) $output[] = $value; ++$i; } } } return $output; } </function>----------------------------------------------------------------------
<test>---------------------------------------------------------------------- <?php $link = mysql_connect ( 'SERVER', 'USER', 'PASSWORD' ) or die ("Could not connect"); mysql_select_db('DATABASE', $link) or die ("Could not select database"); $holder = mysql_fetch_enums ( $link, 'TABLE_NAME', 'FIELD_NAME' ); $i=0; reset ($holder); while (list(, $value) = each ($holder)) { echo "UseForOption$i: $value<br>\n"; ++$i; } mysql_close(); ?> </test> ----------------------------------------------------------------------
-- ________________________________________________________________ Sites by friends of mine: http://www.myhiddentreasures.com/ ________________________________________________________________ WARNING personal propaganda signature TAKE WHAT YOU LIKE AND LEAVE THE RESTSINCE OUR GOVERNMENT WON'T PRESERVE OUR CLIMATE, IT'S UP TO US! Imagine ** yourself ** and your kids now an endangered species <1>Inflate automobile tires to near maximum in summer, -2psi in winter <2>add insulation to house and hot water heater, and refrigerator, <3>combine trips in cars, make less of them <4>buy cars, sports vehicles and recreational vehicles with good if not best mileage <4>put awnings over windows is summer, remove in winter. <5> add solar hot water heating. <6>Push for energy recycling clothes dryers <7> walk more, play outside with your kids! <8> let your grass grow to 3-4 inches, chokes weeds, saves water and energy, keeps house cooler <9> Put WHITE or REFLECTIVE materials on roofs to send energy back into space. <10> Vote for burial of logging slash onsite in logging areas for better watersheds and less burned vegetation. <11> compost your leaves and grass, bury in flower beds, lawns, gardens, or give away. <12> VOTE for energy and CO2 ratings on ALL products and foods. KNOW how much damage your purchases do to the climate. <13> Give your kids less stuff and more of you. <14> recycle everything you can <15> limit your children to an average 1 per adult between all your marriages. (Only REPLACE yourself, not expand the population)
attached mail follows:
Hi guys and girls,
i've got some probs compiling php-4.04pl1. I Upgraded my machine ( shouldn't have done in the first place ) to SuSE7.1 Kernel 2.1.18, downloaded apache 1.3.19 and compiled apache with no problems. Then trying to compile php-4.0.4pl1 i've run into the problem that the linker couldn' t find the pam libs. They are in /lib and added /lib to my ld.so.conf and ran ldconfig. But still the same error compiling php.
Any hints to solve the problem ?
Thanks a lot
Wolfgang
attached mail follows:
I have php4 and Apache running on Windows 2000, and Im not able to get the mail-function to work. The mailsystem is on an other PC, and so I added SMTP=<mailservers IP-address> in the php.ini file. But still I get "Failed to connect" when I run mail(). I have heard that there can be a problem if the mailserver is separated from the webserver and you have a firewall? Do I have to do anything in the mailsystem? Or maybe in httpd.conf ??
Please enlighten me!
Vegard.
attached mail follows:
Hi,
Is it possible to make PHP be able to communicate with existing C/C++ libaries/programs in Unix/Linux environments? That is, I may send a message to the C/C++ stuff, and get some feedbacks from them.
This is needed because there are already some C/C++ codes in use, and it is not a good idea to re-write them.
Thanks for helps!
Best regards, Martin Lam
attached mail follows:
Hello Martin,
Thursday, March 15, 2001, 11:20:58 AM, you wrote: ML> Is it possible to make PHP be able to communicate with existing C/C++ ML> libaries/programs in Unix/Linux environments? That is, I may send a ML> message to the C/C++ stuff, and get some feedbacks from them.
For programs, use system() (if they can accept arguments in a comand string and return values to STDOUT). For libraries - only if you wrote a PHP extension using those libraries. PHP programs have no C-style access to memory, so they can not communicate with C libraries that not aware of PHP.
-- Best regards, Maxim Derkachev mailto:kotbooks.ru Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia
attached mail follows:
Hello !
I have a side, which I can only access when a special cookie is set. I want to access and analyse the side with php.
So I could not use fopen("http://www.thesidename.com", "r"), because this will not transmit the cookie.
I thought of something with sockets and sending a HTTP-Get with the cookie. But I have no idea: - How to use the socket - How to send the GET - How to send the Cookie - How to recieve the data
Any help is welcome !
Martin
attached mail follows:
Morning, I have a section of HTML that Is added to a page if a user logs in successfully. Itis about 30 lines long, and I have included it in each page. What I would like to do, is to have the HTML on a seperate file, and have the PHP call it if and when a user logs in. Is this possible?
Tris...
********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.
This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses.
**********************************************************************
attached mail follows:
Hi all
I used popen to fork a process to password chaning program. The webserver has access to execute that program. This is the snippet
$pp = popen("passwd user", "w"); fwrite($pp, "password\n"); fwrite($pp, "password\n"); pclose($oo);
if i see the log the program executes but the password is not changed. What could be the reason??
aadish http://www.stxbatch94.com ___________________________________________________ GO.com Mail Get Your Free, Private E-mail at http://mail.go.com
attached mail follows:
Hi,
I have a bit of a dilemma.
I have a number of array attributes, eg. $arrayname["var1"], $arrayname["var2"], $arrayname["var2"], etc. up to 58, and I want to write these into the database.
What I am hoping to do is create a counter that goes through the insert routine, updating the numerical value of "var". The problem is.. everything I have tried hasn't worked.
I have tried things like...
$counter=1;
$arrayname[["var".$counter1]]; $arrayname["var$counter1"]; ...and variations thereof. Everything I have tried has failed.
PLEASE can someone help??
attached mail follows:
Every two or three times that I receive the email digest for this mailing list, I get a single text file attachment and the following message instead of a set of message attachments. Is this a problem with my mail server or the list server?
This message uses a character set that is not supported by the Internet Service. To view the original message content, open the attached message. If the text doesn't display correctly, save the attachment to disk, and then open it using a viewer that can display the original character set.
Euan Greig
Technical Consultant
BRANN DATA
euan.greig
brann.com
01285 645997
************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.
**************************************************************************
attached mail follows:
Hi!
I want to have an own user authentification based on a mysql-DB connect. Afterwards I link the user to the specific directory, the user has been authentified for. This user-specific directory is secured by an .htaccess file and therefor a authentification window sent by the web server pops up to ask for the login again.
Is there a way to prevent the 2. window to appear? Can I set the environment variables manually after my own (first) user authetification?
Any help is appreciated.
Holger
attached mail follows:
In article <98p4a1$mbn$1
toye.p.sourceforge.net>,
Laf
DHSaps.dk ("Lars Falsig") wrote:
> I need to preload lots of graphics for user-controlled animation, changing > graphics fast. > Include() and/or require() works to slow. > > Any suggestions?
You can't do that with PHP as it's *server-side* scripting language. Image caching must be done client-side, using for example JavaScript.
Try this in the HEAD section of your HTML page:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!--
if (document.images) { img01 = new Image(); img01.src = "path/to/your/image.gif"; img02 = new Image(); img02.src = "path/to/your/other_image.gif"; // and so on... }
// --> </SCRIPT>
- Visa
attached mail follows:
If I have code like:
if( $i == 0) { print "<meta http-equiv=refresh content=\"0;url=$url\">"; } $i++; I find that $i++ will run but I hope it don't, if I alter the code to:
if( $i == 0) { print "<meta http-equiv=refresh content=\"0;url=$url\">"; exit; } $i++; Will it work? Is it have any side-effect?
attached mail follows:
Hello all
One part of the task that I have been recently been assigned involves creating a 'code archive' of sample applications for a certain Visual Basic control. The idea is that a web visitor can download code snippets and the associated Visual Basic project file in a .zip file. By playing with the code snippet (of which there are about 100), the web visitor can then learn more about how the Visual Basic control works.
The code archive should have all the usual features: description of how the code snippet works, date entered into the archive etc. In a nutshell, the code archive should look something like the one at:
Before I start work on my own, I was wondering if anyone else had created such a code archive? Or whether there perhaps exists one as an open source project somewhere?
If you have any idea where I could get such a (set of) script(s), I would love to hear from you.
TIA
S
_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
attached mail follows:
hi i want to protect a page (lets say its name is test.php) with authentication. therefore i included auth.php as follows:
test.php: <?php include "mysql.inc.php"; //open database link include "auth.php"; authentication(); .....?>
this is auth.php:
<?php function authentication() { if(!isset($PHP_AUTH_USER)) { Header("WWW-Authenticate: Basic realm=\"test Realm\""); Header("HTTP/1.0 401 Unauthorized"); echo "you canceled the authentication, access denied\n"; exit; } else { $query="select * from users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; $result = mysql_query($query,$link); $num = mysql_numrows($result); if($num==1) { return; } else { echo "wrong user or password"; exit; } } } ?>
the problem is that when i want to open test.php i get the authentication box, then i enter username and password and then i get again this box. i can enter the user and passwd 3 times, then i get the error message "you canceled the authentication" form my auth.php function. but when i copy the source code from auth.php to a new file without as function {} and substitute the return with echo "hi"; it works. has anyone an idea. thanks chris
attached mail follows:
On my Linux RH 6.2 computer, when working with Apache, mySQL and PHP, there is no problems showing the source code to my code developing friends. If I rename the php-file to phps it works just well.
BUT, when doing the very same thing on my W98 or W2k machines, the source code will not show. The configuration is the same in httpd.conf and I've checked it out.
Is this problem known? Does not the W32 platform support phps?
Anders Pettersson
attached mail follows:
How do i forward POST data from a php script. Obviously GET is simple (just script.php?$QUERY_STRING) but how does it work with post?
Thanks.
Nick.
attached mail follows:
Check out using php_curl
HTH Peter
"Nick Davies" <nick
sensei.co.uk> wrote in message
news:Pine.LNX.4.21.0103151137020.12925-100000
server.sensei.co.uk...
>
> How do i forward POST data from a php script. Obviously GET is simple
> (just script.php?$QUERY_STRING) but how does it work with post?
>
>
> Thanks.
>
> Nick.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hey!
The function 'eval()' can't be used here.
I already tried working with it and failed. eval() is being used for running PHP code. My string contains HTML tags with PHP code inside(in '<?php' and '?>' tags), not only PHP as eval() requires.
Do you have any other suggestion?
Thank you in advance -
Aviv Revach
At 18:54 14/03/01 -0500, Andrew Hill wrote: >Aviv, > >eval() > >http://www.php.net/manual/en/function.eval.php > >Best regards, >Andrew
>On 3/13/01 6:35 PM, "Aviv Revach" <aviv_r
brillianet.com> wrote:
>
> > Hey!
> >
> > What should I do in order to execute the next string:
> > $str = "<html>\n"
> > $str .= "blabla\n";
> > $str .= " <?php echo \"hello!\"; ?>\n";
> > $str .= "blabla\n";
> > $str .= "</html>\n";
> >
> > When I tried using 'echo' with the string, but the php code didn't work...
> >
> > Is there any way of doing this without writing this string to a file
> > and include'ing it? (that would be rather slow!)
> >
> >
> > Thank you in advance -
> >
> > Aviv Revach
> >
> > BRILLIANeT Website -
> > http://www.brillianet.com/
> >
BRILLIANeT Website - http://www.brillianet.com/
attached mail follows:
On Wednesday 14 March 2001 12:50, you wrote:
> My string contains HTML tags with PHP code inside(in '<?php' and '?>' > tags), not only PHP as eval() requires. > > Do you have any other suggestion?
AFAIK there's no other way than using include().
Why do you need that anyway?
> > > What should I do in order to execute the next string: > > > $str = "<html>\n" > > > $str .= "blabla\n"; > > > $str .= " <?php echo \"hello!\"; ?>\n"; > > > $str .= "blabla\n"; > > > $str .= "</html>\n"; > > > > > > When I tried using 'echo' with the string, but the php code didn't > > > work...
-- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)Pretty cool, the kind of power information technology puts in our hands these days.
- Securityfocus on probing 36000000 hosts for known problems in 3 weeks
attached mail follows:
How could make a function to write number in extense, example: Write 10 soon below appears TEN
How ?
Thanks
Marcel Henrique
attached mail follows:
Hi there,
Does anyone know how I can read the address of URL the user filled in in his/her browser???
Greetings,
Geer
attached mail follows:
> Does anyone know how I can read the address of URL the user filled in in > his/her browser???
I presume you mean when asking for page on your server.
$REQUEST_URI
see.
http://uk.php.net/manual/en/language.variables.predefined.php
for more details and others
M
attached mail follows:
Hi all,
To explain my problem, I'll have to draw a directory structure (please bear with me :-):
<web-server-document-root> | +--<dir:common-pics> | +--<dir:sub-dir1> | | | +--<dir:sub-sub-dir1> | +--<dir:sub-dir2> | +--<dir:sub-sub-dir2> | | | +--<dir:sub-sub-sub-dir1> | +--<dir:sub-sub-dir3>
The directory <common-pics> contains some pictures that will be common to the whole site. I want to use purely relative links, of the form ../../../<common-pics>/pic1.gif (for files in the directory <sub-sub-sub-dir1>), to link to these common images (this link will be ../../<common-pics>/pic1.gif for <sub-sub-dir1>, <sub-sub-dir2> and <sub-sub-dir3> etc.).
How can I (essentially) determine the depth of a document wrt the document root? Basically, I want to have a funtion (say, findDepth()) that I can use to write out my image tags in the following form:
<img src="<?echo findDepth();?>/<common-pics>/pic1.gif">
which will produce the correct number of double-dot-slash (../) strings.
What help can PHP offer me - i.e., how can I write my hypothetical findDepth() function? Please help!!
COROLLARY 1:
If the hypothetical function findDepth() returns the appropriate string, does it _need_ to be echoed or will just putting <?findDepth();?> in the correct place work?
Thanks!
-- Regards, Harshdeep Singh Jawanda.
attached mail follows:
Hi,
I'm stuck for serveral days now on the following problem : whatever I try, i can't get the openssl_seal function to work. Even the sample code in the documentation doesn't work. I precise that the .dll is well loaded, I don't get any error while trying to call the functions of the openssl lib.
I use PHP 4.0.4 on a NT4 server, with IIS. I also tried PHP 4.0.4 on a WIN2K server with IIS and Apache. Same result.
I use the following code :
---------------------------------- $data="test data";
$fp = fopen("test.cer", "r"); $cert = fread($fp, 8192); fclose($fp); $k = openssl_get_publickey($cert); openssl_seal($data, $sealed, $ekeys, array($k)); openssl_free_key($k);
echo $sealed; -----------------------------------
$k returns a correct id BUT $sealed and $ekeys remains ALWAYS blank/false, as if the seal function didn't work at all.
I used certs generated by openssl.exe on NT, with bit depth for RSA encoding of 384, 512, and 1024, the result is the same. $sealed is always blank.
I precise that with the same certs/private keys couples, the functions openssl_sign & verify are working perfectly.
So anyone has an idea of the problem ?
Thanks for your help,
eXXos.
attached mail follows:
Hi, I am trying to use the Function ArrayCompare, but it always has an error in "if(($key = array_search($element, $array2)) == false)", and also I couldn't get the page of http://www.stivesdirect.com/e-mail-disclaimer.html Would you please give me a clue? Thanks!
Fang
-----Original Message-----
From: Tim Ward [mailto:tim.ward
stivesdirect.com]
Sent: March 5, 2001 5:48 AM
To: 'Jimmy Bäckström'; PHP General List
Subject: [PHP] RE: Function to compare an array with another array
function ArrayCompare($array1, $array2) { $answer = new Array() foreach ($array1 as $element) { if (($key = array_search($element, $array2)) === false) { $answer[$key] = $array2[$key]; } } return $answer; }
this will return an array that is a copy of the first array with only those elements that are not in array2. If you only want the first one either just use the first one( foreach(){ ... break;}) or put a break in the if.
Tim Ward Senior Systems Engineer
Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html
> -----Original Message-----
> From: Jimmy Bäckström [mailto:broder_b
chello.se]
> Sent: 05 March 2001 06:38
> To: PHP General List
> Subject: Function to compare an array with another array
>
>
> Shu!
> I need some help here.
> I have a script where I want to compare two arrays with
> eachother, and return one value from that does not exists in
> both arrays. I have an array of pictures id number created
> from a database query. I use sessions to save id numbers of
> pictures into an array. I want the first array to be compared
> to the second and return the first key/value-pair that are
> not found in the session array...
> Is there a way I can do this?
>
> Thankful for any help!
> /Broder B
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]