|
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: Mon Oct 29 2001 - 18:15:42 CST
php-general Digest 30 Oct 2001 00:15:42 -0000 Issue 964
Topics (messages 72707 through 72797):
Re: Problems sending mails with PHP
72707 by: Bruno
Re: SSI
72708 by: Patrick Dunford
Re: Array
72709 by: Tim Ward
Email limit
72710 by: Richard Baskett
72713 by: Matt Friedman
GD GIF or PNG Detect Part 2
72711 by: Chris
72712 by: Daniel Reichenbach
Re: Sending two attachments
72714 by: Jason G.
Session handling with cookies??
72715 by: Andy
72761 by: Olexandr Vynnychenko
best linux choice for php / mysql ???
72716 by: webmaster
PHP templates vs XML
72717 by: DL Neil
72738 by: php.alister.dnsalias.com
Displaying "please wait"
72718 by: DL Neil
"Database tags" ala Lasso
72719 by: Sverre Johan Tøvik
72749 by: l0t3k
Re: php/Oracle db connection
72720 by: toni baker
72722 by: Andrew Hill
fopen for ftp transfers
72721 by: Scott
72751 by: Frewuill Rodriguez
72774 by: CC Zona
parsing XML turorials, suggestions
72723 by: bill
72771 by: Christian Reiniger
protecting files
72724 by: WebDev
72733 by: Kurt Lieber
I cannot figure this one out! I'm going crazy! :)
72725 by: Richard Marks
72726 by: Rasmus Lerdorf
72727 by: Mark Roedel
Where does mysql keep the records data
72728 by: PHP Mail
72731 by: Kurt Lieber
72735 by: Henrik Hudson
Re: [PHP-DB] Performance problems in NC
72729 by: WebDev
hmm, thanks, but now i have even more troubles :\
72730 by: Richard Marks
arg, this is crazy :\ - i dont get it, is the variable, uhm, NOT GLOBAL or something?
72732 by: Richard Marks
72736 by: Rasmus Lerdorf
and now i get
72734 by: Richard Marks
72737 by: Rasmus Lerdorf
Problem with very big array !
72739 by: Nicolas Guilhot
72773 by: Matthew Loff
Re: Excel to MySQL
72740 by: Mike Frazer
is there a way of using fnctl locks from php?
72741 by: Richard Hollis
Re: What is a class
72742 by: Mike Frazer
how to pass true/false or "no argument"
72743 by: John A. Grant
72752 by: John A. Grant
72755 by: Richard Hollis
72763 by: Henrik Hudson
Re: Problem appending data in a file with fopen("ftp://...","a")
72744 by: Dave Létourneau
Re: PHP changing my JavaScript??
72745 by: Moloko
Re: Absolute #$#$ silliness
72746 by: Mike Frazer
Using php to verify fields in form...
72747 by: Jason
72757 by: Richard Hollis
72758 by: Mike Frazer
72764 by: Henrik Hudson
apache1.3.22 won't start with php4.0.6
72748 by: edward.quick.btinternet.com
72762 by: Mark Roedel
72778 by: Edward Quick
72789 by: Michael A. Peters
72795 by: Fotwun
72797 by: Brian Clark
session start error
72750 by: André Castanheira
72756 by: Richard Hollis
Re: security
72753 by: Zeev Suraski
Mailing list
72754 by: Nikola Karoviæ
72768 by: Frewuill Rodriguez
72769 by: Nikola Karoviæ
72782 by: p.whiter
downloading images
72759 by: Heidi Belal
72760 by: Richard S. Crawford
Streaming context
72765 by: James Webb
Re: Syntax Needed
72766 by: Christian Reiniger
Re: switch-statement overrides use of global arrays?
72767 by: Christian Reiniger
Re: Speeding up program
72770 by: Emile Bosch
User Authentication against remote authentication server
72772 by: Zhu George-CZZ010
72788 by: Frewuill Rodriguez
72790 by: Kurt Lieber
Architecture : Handling timezones in a web application
72775 by: l0t3k
72777 by: Erik H. Mathy
separating lines in a text area field
72776 by: Don
72783 by: Nikola Karoviæ
spaces vs in form fields
72779 by: Greg
72781 by: Richard S. Crawford
curl and HTTPS
72780 by: Gerard Onorato
PHP and Wget
72784 by: fragman_dk
72787 by: Mark
counting sheeps
72785 by: Nikola Karoviæ
72786 by: Frewuill Rodriguez
72791 by: Martín Marqués
Fatcow and MySQL-Front
72792 by: René Fournier
72793 by: Martín Marqués
Re: Function not found
72794 by: David Robley
Re: User Authentication against remote authentication serve r [ LDAP ]
72796 by: Johnson, Kirk
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:
Yes, I restarted the apache web server. ¿I suppose this is enough, no?
Bruno
"Cc Zona" <cczona
nospam.invalid> wrote in message
news:20011029091433.65184.qmail
pb1.pair.com...
> In article <20011029084855.53531.qmail
pb1.pair.com>,
> burnett
euskal.org (Bruno) wrote:
>
> > Yesterday everything was working fine, but today I got to my office and
my
> > PHP couldn't send mails anymore. I get the next message in the apache
log :
> >
> > sh: sendmail -t -i: command not found
> >
> > I've tried to change the php.ini mail section to point to the exact
sendmail
> > path, but I get the same message.
>
> You did restart the server after making the changes to php.ini, right?
>
> From <http://php.net/configuration>: "The configuration file (called
> php3.ini in PHP 3.0, and simply php.ini as of PHP 4.0) is read when PHP
> starts up. For the server module versions of PHP, this happens only once
> when the web server is started."
>
> --
> CC
attached mail follows:
The virtual( ) function is the same as #include on Apache
If you're running a script, you may need to simulate the CGI variables as
they aren't automatically available to a script that you would normally run
with the #exec SSI directive.
=================================
Patrick Dunford, Christchurch, NZ
http://pdunford.godzone.net.nz/
http://www.trainweb.org/ferrymead/
> -----Original Message-----
> From: Gary [mailto:gbland
worldnet.att.net]
> Sent: Monday, 29 October 2001 14:59
> To: php-general
lists.php.net
> Subject: Re: [PHP] SSI
>
>
> Yes I do, it is to run a pre-exiting program. I figured it out. I was
> uing double quotes in the ssi and excaping them when echoing. I should
> of been using single quotes.
>
> Thanks
> Gary
>
> Christian Dechery wrote:
>
> > At 19:04 28/10/01 -0500, Gary wrote:
> >
> >> How do you get a SSI to work on a php page?
> >
> >
> > you don't need SSI if you're running PHP... just use include()...
> >
> > _____________________________
> > . Christian Dechery
> > . . Gaita-L Owner / Web Developer
> > . . http://www.webstyle.com.br
> > . . http://www.tanamesa.com.br
> >
>
>
attached mail follows:
This seems way too complicated. I do this sort of thing all the time from a
mysql db. I've no idea where you're getting the data from but if it was from
a mysql db I'd just do
$result = mysql_query("SELECT field1, field2, field3, field4 FROM tablename
WHERE condition");
while ($array = Mysql_fetch_array($result)) $values[] = $array;
...
you van then do ...
foreach($values as $row)
{ echo(" {$row["field1"]}, {$row["field1"]}, {$row["field1"]}<br>");
// or whatever you want to do
}
Tim Ward
----------
From: De Necker Henri [SMTP:deNeckerH
ford.co.za]
Sent: 29 October 2001 07:26
To: PHP-General (E-mail)
Subject: RE: Array
Now i did the following :
My output is only null or blank values!,but my data is there!
while($row=db_range()){
list($co_id,$surname,$init,$ba) = $row;
echo "$co_id $surname<br>"; # This works perfect!
$values[$i]['id'] = $co_id;
$values[$i]['surname'] = $surname;
$values[$i]['init'] = $init;
$values[$i]['ba'] = $ba;
$cid = $values[$i]['id'];
echo "$id<br>" ; # Doesnt wanna work
list($a,$b,$c,$d) = $values[$i];
echo "$a" ; # Doesnt wanna work
$i++;
}//end while 1
attached mail follows:
What is the limit to the amount of emails you can send out at once.. or in a
for loop, to php's mail function?
Rick
attached mail follows:
I imagine that's only limited by your available bandwidth. If you try to
send emails out faster than your bandwidth will allow you'll get a slowdown
on your email server.
I use sleep() between each email to lessen the load on the server.
Matt.
----- Original Message -----
From: "Richard Baskett" <rick
baskettcase.com>
To: "PHP General" <php-general
lists.php.net>
Sent: Monday, October 29, 2001 6:43 AM
Subject: [PHP] Email limit
> What is the limit to the amount of emails you can send out at once.. or in
a
> for loop, to php's mail function?
>
> Rick
>
>
> --
> 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 received good advice from my previous question:
Before creating a graphic, I would like to detect what type of graphic
files are supported. For example if GD is enabled and GIF Support is
available I'll create an GIF image. I know phpinfo() will tell me this
but I don't want to burden the user with this check.
I implemented the following:
if (ImageTypes() & IMG_GIF)
{
echo "GIF support enabled";
}
elseif (ImageTypes() & IMG_PNG)
{
echo "PNG support enabled";
else
{
echo "This install of PHP does NOT support graphics creation";
}
However when there are no GD libraries installed the following error is
thrown:
Fatal error: Call to undefined function: imagetypes()…
Any suggestions to prevent the error message being thrown. Are there
other methods to detect the presence GD libraries before testing for GIF
or PNG support?
Regards,
Chris
attached mail follows:
> However when there are no GD libraries installed the
> following error is
> thrown:
> Fatal error: Call to undefined function: imagetypes()…
>
> Any suggestions to prevent the error message being thrown. Are there
> other methods to detect the presence GD libraries before
> testing for GIF
> or PNG support?
How about using something like this?
if (function_exists('ImageTypes')) {
// GD functions are available
} else {
// GD functions not available
}
http://www.php.net/manual/en/function.function-exists.php is the place
in the manual :)
Daniel
attached mail follows:
I believe one of your boundarys has -- at the end. According to the RFC
dealing with this subject, stick -- on the end of only the last boundary.
-Jason Garber
IonZoft.com
At 02:13 PM 10/12/2001 +0530, Sharat Hegde wrote:
>Hello,
>
>I am trying to send multiple attachments by email from my PHP program (two
>to be precise).
>
>I have put the relevant codes to send attachments, and separated it with the
>Message Boundary. The first attachment comes fine. The second attachment is
>also coming to my Inbox, but for some reason, Outlook Express (my mail
>client) does not recognize the 2nd attachment. The message header and the
>size of the email indicates that the content has two attachments.
>
>Any clues?
>
>The email looks like this after the standard headers for From and To:
>
>MIME-Version: 1.0
>Content-Type: multipart/mixed; boundary="Message-Boundary"
>
>This is a MIME encoded message.
>
>--Message-Boundary
>Content-Type: text/plain; charset="iso-8859-1"
>
>Testing mail component
>
>--Message-Boundary
>Content-Type: application/octet-stream; name="ValleyView1.csv"
>Content-Transfer-Encoding: base64
>Content-Disposition: attachment; filename="ValleyView1.csv"
>
>Um9vbUlkLFNlcmlhbE51bWJlcixEaXNwbGF5T3JkZXIsRGVzY3JpcHRpb24sUmF0ZVR5cGUsQWR1
>bHRQcmljZSxDaGlsZFByaWNlLE51bURheXMsTWluUGVyc29ucyxNYXhQZXJzb25zLEFwcGxpY2Fi
>bGVEYXlzClIwMDIsMiwxLERvdWJsZSAzIG5pZ2h0cyxWQUwsMjI1LjAwLDAuMDAsMywxLDIsIjAs
>MSwyIgpSMDAyLDEsMixEb3VibGUgNCBuaWdodHMsVkFMLDI4MC4wMCwwLjAwLDQsMSwyLCIwLDEi
>Cg==
>
>--Message-Boundary--
>Content-Type: application/octet-stream; name="junk.txt"
>Content-Transfer-Encoding: base64
>Content-Disposition: attachment; filename="junk.txt"
>
>SnVuayBUZXh0IEZpbGUKTGluZTIKTGluZTMK
>
>--Message-Boundary--
>
>--
>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:
Hello,
I have developed a member login system with cookies. Now I have the prob,
that the session stayes existend when the browser is closed. This could
couse a problem in Internet caffes for example. As second thing, I have
realized, that it depends on the clients clock!! I am sending a cookie which
expires in time() + $expireseconds. Unfortunatelly the time command takes
the tim from the server and the cookie expires checking the client time.
So... does anybody know how...
1) I get the system to delete the cookie as soon as I leave the site, or
close it
2) How to work on the same time.
Thanx for any help
Cheers Andy
attached mail follows:
Hello Andy,
Monday, October 29, 2001, 3:39:51 PM, you wrote:
A> So... does anybody know how...
A> 1) I get the system to delete the cookie as soon as I leave the site, or
A> close it
Use logout with setcookie("name", 0, ...)
A> 2) How to work on the same time.
Pass information about date/time via GET or better POST variable(s).
-- Best regards, Olexandr mailto:supaboyi.com.ua
attached mail follows:
I've been using PHP/mySQL on my web host's site for a year or so, and I now need to create my own installation ...
Given my relatively limited linux background, which distribution woud I find easiest to install? I'll be needing PHP, mySQL, and PDFlib ...
I've done my homework, I've studied every linux text I could get my hands on, and I feel like I'm ready to start ... but I don't want to install one distribution, only to find that it is inappropriate for my needs ... Call me lazy, but I only want to do this once (this week, anyway).
Any help would be most appreciated.
Thanks,
Kenn
attached mail follows:
In an on-again-off-again desultory style, I keep trying to find the time to study template systems - and quite separately see if I can find a practical use for XML.
The idea of a template system is that the HTML code/presentation of the final view to the user/browser, can be devised/maintained quite separately from the PHP code required to pull data out of the back-end db/processing/whatever. Correct?
The systems I've looked at do this by allowing you to put 'tags' into the HTML which are subsequently expanded/replaced with 'real data' by the template processor immediately before presentation to the browser.
Now, again broadly speaking, XML allows us to define our own tags, which are subsequently ... Correct?
So: when would you use a template system and when would you use XML? (and thus: on which one should I concentrate my research? )
Any all pointers/references to online information sources will be much appreciated. =dn
attached mail follows:
On Mon, 29 Oct 2001 14:02:32 -0000, you wrote:
>The idea of a template system is that the HTML code/presentation of the final view to the user/browser, can be >devised/maintained quite separately from the PHP code required to pull data out of the back-end >db/processing/whatever. Correct? > >The systems I've looked at do this by allowing you to put 'tags' into the HTML which are subsequently >expanded/replaced with 'real data' by the template processor immediately before presentation to the browser. > >Now, again broadly speaking, XML allows us to define our own tags, which are subsequently ... Correct? > >So: when would you use a template system and when would you use XML? >(and thus: on which one should I concentrate my research? )
I tend to use FastTemplate or similar systems to template most of my output - be that output HTML, Javascript - or XML. That, and the way a program is structured (collecting, processing and only then outputting it in whatever format) makes adding in different assortments of data in a variety of output formats truely trivial.
In the current case, it's book information, so I collect ISBN data, which gets output. In an upcoming project, it will be news snippets - press releases and the like, where the templates will be updated and added to at will for different styles of output, as well as serialised (PHP/WDDX) and XML/RDF/Javascript output .
The XML related templates of which you speak are generally XSL Templates, which are a programming language in themselves, and the XML parsing into XSL is an extensive overhead to carry.
Alister
attached mail follows:
Is there someone 'up' on the way Apache works who can offer some comment please?
Th "how do I display 'please wait' " question was asked by someone (else) last week. The standard answer is "no" - server-side PHP assembles an HTML page, and when it is completed the whole page is transmitted from the web server to the browser. However is this strictly true?
I managed to do something warned about in lesson two of ComSc 101, and put my PHP into a never-ending loop (hey, after all these years, it's just to keep me humble...). What was happening was that a database record would be read in, a whole pile of debug 'echo's sent to the screen to demonstrate the processing, then the next record, and so on... the governor/loop limit code failed and was stuck on 'true' so while true loop forever...
What I saw on the screen - particularly the behavior of the scroll bars, was that a certain amount of data (let's call it a 'buffer') was produced within Apache, and then it would be sent to the screen, then there would be a short pause, then another 'buffer' load would be displayed in the browser, then a pause... This behavior similar to response from a long-distance www link or taking stuff down a slow dial-up line from an overloaded server; BUT everything on my machine is local !
Does this mean that Apache retains a certain amount of the page internally, but once the volume grows, Apache relieves storage pressure by transmitting even though the whole HTML page has not yet been resolved? If so, any idea what the 'buffer' size might be? Or is there any way to adjust that 'buffer' size HTML page by page?
Enquiring minds and all that... =dn
attached mail follows:
Hi,
For the futurists around here: Is there any chance that php will include "database tags" ala Lasso? For those who don't know what I mean, here's an axample (not quite correct Lasso code, but it should get the point across):
[db select="somedb"] [db query="sql"]
<table>
[record] <tr> <!-- everything in this tag is repeated for each record <td> [field="name"] </td> <td> [field="address"] </td> </tr> [/record] </table>
Err... You get the point... Or, for those of you who have problems recognizing simple stuff when you see it (like myself when trying to learn applescript when I was used to stuff like C), the point is that you don't have to do all that annoying escaping of quotes, and if you open the code in a graphical editor, you can edit to your heart's delight, cuz the db tags stays put.
Regards,
Sverre Johan Toevik
-- <disclaimer> I speak for myself only! </disclaimer> "to be yourself, in a world that tries, night and day, to make you just like everybody else - is to fight the greatest battle there ever is to fight, and never stop fighting" -- e.e. cummings
attached mail follows:
> For the futurists around here: Is there any chance that php will > include "database tags" ala Lasso?
highly unlikely, but you can achieve similar ends with one of the template engines for PHP. with a little work, you should be able to accomplish the same ends. check out Smarty (dont remeber the URL - check Hotscripts.com) and see what you come up with.
Sverre Johan Tøvik <sverre.tovik
tibe.no> wrote in message
news:a05101004b8031706353a
[193.215.214.144]...
> Hi,
>
For those who don't know what I
> mean, here's an axample (not quite correct Lasso code, but it should
> get the point across):
>
> [db select="somedb"]
> [db query="sql"]
>
> <table>
>
> [record]
> <tr>
> <!-- everything in this tag is repeated for each record
> <td>
> [field="name"]
> </td>
> <td>
> [field="address"]
> </td>
> </tr>
> [/record]
> </table>
>
>
> Err... You get the point... Or, for those of you who have problems
> recognizing simple stuff when you see it (like myself when trying to
> learn applescript when I was used to stuff like C), the point is that
> you don't have to do all that annoying escaping of quotes, and if you
> open the code in a graphical editor, you can edit to your heart's
> delight, cuz the db tags stays put.
>
>
> Regards,
>
> Sverre Johan Toevik
> --
> <disclaimer> I speak for myself only! </disclaimer>
> "to be yourself, in a world that tries, night and day, to make you just
> like everybody else - is to fight the greatest battle there ever is to
> fight, and never stop fighting" -- e.e. cummings
attached mail follows:
After running openlink.sh and the set command the following variables or set:
ODBCINI=/usr/local/src/bin/odbc.ini ODBCINSTINI=/usr/local/src/bin/odbcinst.ini OLDPWD=/home/httpd/html/ronsdev OPTERR=1 OPTIND=1 ORACLE_HOME=/home/oracle/OraHome1 ORACLE_SID=data1
However when odbctest I still get the following error:
Enter ODBC connect string (? shows list): DSN=[pc963];UID=test;PWD=test OpenLink: RPC: Unknown host [OpenLink][ODBC]RPC: Unknown host, SQLSTATE=08004 [OpenLink][ODBC]Connection rejected by data source, SQLSTATE=08004
Have a nice day.[tbaker
PC963 tbaker]$
/usr/local/src/odbcsdk/examples/odbctest
OpenLink ODBC Demonstration program
This program shows an interactive SQL processor
Enter ODBC connect string (? shows list): DSN=[pc963];UID=scott;PWD=tiger OpenLink: RPC: Unknown host [OpenLink][ODBC]RPC: Unknown host, SQLSTATE=08004 [OpenLink][ODBC]Connection rejected by data source, SQLSTATE=08004
Any ideas as to what may be the problem.
--- Andrew Hill <ahill
openlinksw.com> wrote:
> Toni,
>
> You need to enter a string of the syntax:
>
> DSN=[name of your dsn]
>
> Since nothing shows up with a "?" I bet you haven't
> set your ODBCINI
> environment variables.
> Running the openlink.sh against the current shell
> should do this: .
> openlink.sh
> If you are doing it by hand, you need to set:
> ODBCINI (pointing to the odbc.ini)
> ODBCINSTINI (pointitng to the odbcinst.ini)
> LD_LIBARARY_PATH (pointing to the lib directory that
> contains the
> libiodbc.so file)
>
> DSNs need to be configured in the odbc.ini
>
> Best regards,
> Andrew Hill
> Director of Technology Evangelism
> OpenLink Software http://www.openlinksw.com
> Universal Data Access & Data Integration Technology
> Providers
>
> > -----Original Message-----
> > From: toni baker [mailto:tanknank
yahoo.com]
> > Sent: Friday, October 26, 2001 11:11 AM
> > To: ahill
openlinksw.com;
> php-general
lists.php.net
> > Subject: RE: [PHP] php/Oracle db connection
> >
> >
> > When I run odbctest I get the following prompt:
> >
> > OpenLink ODBC Demonstration program
> > This program shows an interactive SQL processor
> >
> > Enter ODBC connect string (? shows list): ?
> >
> > DSN | Description
> >
>
---------------------------------------------------------------
> >
> > Enter ODBC connect string (? shows list):
> >
> > What ODBC connet string should I enter here?
> >
> > Thanks Toni.
> >
> > --- Andrew Hill <ahill
openlinksw.com> wrote:
> > > Toni,
> > >
> > > Note the "Unknown host".
> > > Check your odbc.ini for the Host field of the
> DSN
> > > you are using.
> > > Ensure it's resolvable. Try an IP address
> instead
> > > maybe.
> > >
> > > Also, set the variables in the environment and
> see
> > > if your DSN works in
> > > odbctest without PHP in the mix.
> > >
> > > Best regards,
> > > Andrew Hill
> > > Director of Technology Evangelism
> > > OpenLink Software http://www.openlinksw.com
> > > Universal Data Access & Data Integration
> Technology
> > > Providers
> > >
> > > > -----Original Message-----
> > > > From: toni baker [mailto:tanknank
yahoo.com]
> > > > Sent: Thursday, October 25, 2001 4:56 PM
> > > > To: php-general
lists.php.net
> > > > Subject: [PHP] php/Oracle db connection
> > > >
> > > >
> > > > I have successfully compiled php with linked
> iODBC
> > > > driver manager as an Apache shared module.
> > > However
> > > > when trying to connect php to the Oracle
> database
> > > I
> > > > get an error. The error and the sample
> connection
> > > > code is below.
> > > >
> > > > Warning: SQL error: [OpenLink][ODBC]RPC:
> Unknown
> > > host,
> > > > SQL state 08004 in SQLConnect in
> > > > /home/httpd/html/ronsdev/putenv.php on line 9
> > > > can not connect to DSN: data1.tsl.state.tx.us
> > > >
> > > > <?
> > > >
> > >
> >
>
putenv("LD_LIBRARY_PATH=/usr/local/src/odbcsdk/lib");
> > > >
> > >
> >
>
putenv("ODBCINSTINI=/usr/local/src/bin/odbcinst.ini");
> > > > putenv("ODBCINI=/usr/local/src/bin/odbc.ini");
> > > > $dsn="data1.tsl.state.tx.us";
> > > > $user="scott";
> > > > $password="tiger";
> > > > $sql="SELECT * FROM scott.emp";
> > > > if($conn_id=odbc_connect("$dsn","","")) {
> > > > echo "connected to DSN: $dsn";
> > > > if($result=odbc_do($conn_id, $sql)) {
> > > > echo "executing '$sql'";
> > > > echo "Results: ";
> > > > odbc_result_all($result);
> > > > echo "freeing result";
> > > > odbc_free_result($result);
> > > > }
> > > > else {
> > > > echo "can not execute '$sql'";
> > > > }
> > > > echo "closing connection $conn_id";
> > > > odbc_close($conn_id);
> > > > }
> > > > else {
> > > > echo "can not connect to DSN: $dsn";
> > > > }
> > > > ?>
> > > >
> > > > Can someone help with this?
> > > > Thanks Toni
> > > >
> > > >
> __________________________________________________
> > > > Do You Yahoo!?
> > > > Make a great connection at Yahoo! Personals.
> > > > http://personals.yahoo.com
> > > >
> > > > --
> > > > 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
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Make a great connection at Yahoo! Personals.
> > http://personals.yahoo.com
> >
> > --
> > 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
>
__________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
attached mail follows:
Toni,
Do you actually have the OpenLink Multi-Tier drivers installed?? :)
Installing and linking iODBC as you have done is only half of what you need to get PHP working with ODBC. You will still need an ODBC driver. The OpenLink ODBC drivers currently available for Unix are multi-tier, so you need to have a server component (oplrqb) running as well.
If you do have these components running, then examing the values in your odbc.ini - try an IP address instead of hostname.
Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers
> -----Original Message-----
> From: toni baker [mailto:tanknank
yahoo.com]
> Sent: Monday, October 29, 2001 9:59 AM
> To: ahill
openlinksw.com; php-general
lists.php.net
> Subject: RE: [PHP] php/Oracle db connection
>
>
> After running openlink.sh and the set command the
> following variables or set:
>
> ODBCINI=/usr/local/src/bin/odbc.ini
> ODBCINSTINI=/usr/local/src/bin/odbcinst.ini
> OLDPWD=/home/httpd/html/ronsdev
> OPTERR=1
> OPTIND=1
> ORACLE_HOME=/home/oracle/OraHome1
> ORACLE_SID=data1
>
> However when odbctest I still get the following error:
>
> Enter ODBC connect string (? shows list):
> DSN=[pc963];UID=test;PWD=test
> OpenLink: RPC: Unknown host
> [OpenLink][ODBC]RPC: Unknown host, SQLSTATE=08004
> [OpenLink][ODBC]Connection rejected by data source,
> SQLSTATE=08004
>
> Have a nice day.[tbaker
PC963 tbaker]$
> /usr/local/src/odbcsdk/examples/odbctest
> OpenLink ODBC Demonstration program
> This program shows an interactive SQL processor
>
> Enter ODBC connect string (? shows list):
> DSN=[pc963];UID=scott;PWD=tiger
> OpenLink: RPC: Unknown host
> [OpenLink][ODBC]RPC: Unknown host, SQLSTATE=08004
> [OpenLink][ODBC]Connection rejected by data source,
> SQLSTATE=08004
>
> Any ideas as to what may be the problem.
>
> --- Andrew Hill <ahill
openlinksw.com> wrote:
> > Toni,
> >
> > You need to enter a string of the syntax:
> >
> > DSN=[name of your dsn]
> >
> > Since nothing shows up with a "?" I bet you haven't
> > set your ODBCINI
> > environment variables.
> > Running the openlink.sh against the current shell
> > should do this: .
> > openlink.sh
> > If you are doing it by hand, you need to set:
> > ODBCINI (pointing to the odbc.ini)
> > ODBCINSTINI (pointitng to the odbcinst.ini)
> > LD_LIBARARY_PATH (pointing to the lib directory that
> > contains the
> > libiodbc.so file)
> >
> > DSNs need to be configured in the odbc.ini
> >
> > Best regards,
> > Andrew Hill
> > Director of Technology Evangelism
> > OpenLink Software http://www.openlinksw.com
> > Universal Data Access & Data Integration Technology
> > Providers
> >
> > > -----Original Message-----
> > > From: toni baker [mailto:tanknank
yahoo.com]
> > > Sent: Friday, October 26, 2001 11:11 AM
> > > To: ahill
openlinksw.com;
> > php-general
lists.php.net
> > > Subject: RE: [PHP] php/Oracle db connection
> > >
> > >
> > > When I run odbctest I get the following prompt:
> > >
> > > OpenLink ODBC Demonstration program
> > > This program shows an interactive SQL processor
> > >
> > > Enter ODBC connect string (? shows list): ?
> > >
> > > DSN | Description
> > >
> >
> ---------------------------------------------------------------
> > >
> > > Enter ODBC connect string (? shows list):
> > >
> > > What ODBC connet string should I enter here?
> > >
> > > Thanks Toni.
> > >
> > > --- Andrew Hill <ahill
openlinksw.com> wrote:
> > > > Toni,
> > > >
> > > > Note the "Unknown host".
> > > > Check your odbc.ini for the Host field of the
> > DSN
> > > > you are using.
> > > > Ensure it's resolvable. Try an IP address
> > instead
> > > > maybe.
> > > >
> > > > Also, set the variables in the environment and
> > see
> > > > if your DSN works in
> > > > odbctest without PHP in the mix.
> > > >
> > > > Best regards,
> > > > Andrew Hill
> > > > Director of Technology Evangelism
> > > > OpenLink Software http://www.openlinksw.com
> > > > Universal Data Access & Data Integration
> > Technology
> > > > Providers
> > > >
> > > > > -----Original Message-----
> > > > > From: toni baker [mailto:tanknank
yahoo.com]
> > > > > Sent: Thursday, October 25, 2001 4:56 PM
> > > > > To: php-general
lists.php.net
> > > > > Subject: [PHP] php/Oracle db connection
> > > > >
> > > > >
> > > > > I have successfully compiled php with linked
> > iODBC
> > > > > driver manager as an Apache shared module.
> > > > However
> > > > > when trying to connect php to the Oracle
> > database
> > > > I
> > > > > get an error. The error and the sample
> > connection
> > > > > code is below.
> > > > >
> > > > > Warning: SQL error: [OpenLink][ODBC]RPC:
> > Unknown
> > > > host,
> > > > > SQL state 08004 in SQLConnect in
> > > > > /home/httpd/html/ronsdev/putenv.php on line 9
> > > > > can not connect to DSN: data1.tsl.state.tx.us
> > > > >
> > > > > <?
> > > > >
> > > >
> > >
> >
> putenv("LD_LIBRARY_PATH=/usr/local/src/odbcsdk/lib");
> > > > >
> > > >
> > >
> >
> putenv("ODBCINSTINI=/usr/local/src/bin/odbcinst.ini");
> > > > > putenv("ODBCINI=/usr/local/src/bin/odbc.ini");
> > > > > $dsn="data1.tsl.state.tx.us";
> > > > > $user="scott";
> > > > > $password="tiger";
> > > > > $sql="SELECT * FROM scott.emp";
> > > > > if($conn_id=odbc_connect("$dsn","","")) {
> > > > > echo "connected to DSN: $dsn";
> > > > > if($result=odbc_do($conn_id, $sql)) {
> > > > > echo "executing '$sql'";
> > > > > echo "Results: ";
> > > > > odbc_result_all($result);
> > > > > echo "freeing result";
> > > > > odbc_free_result($result);
> > > > > }
> > > > > else {
> > > > > echo "can not execute '$sql'";
> > > > > }
> > > > > echo "closing connection $conn_id";
> > > > > odbc_close($conn_id);
> > > > > }
> > > > > else {
> > > > > echo "can not connect to DSN: $dsn";
> > > > > }
> > > > > ?>
> > > > >
> > > > > Can someone help with this?
> > > > > Thanks Toni
> > > > >
> > > > >
> > __________________________________________________
> > > > > Do You Yahoo!?
> > > > > Make a great connection at Yahoo! Personals.
> > > > > http://personals.yahoo.com
> > > > >
> > > > > --
> > > > > 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
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Make a great connection at Yahoo! Personals.
> > > http://personals.yahoo.com
> > >
> > > --
> > > 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
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
>
> --
> 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:
Hi-
I am attempting to transfer files from one server to another via ftp. I am wondering if this is the best method to transfer files within PHP or should I seek other methods. Here is the way I am doing it now:
$sendfile =
fopen("ftp:user:letmein
10.1.1.1/testfile", "w");
Thanks
attached mail follows:
what about using ftp functions from PHP?
http://www.php.net/manual/en/ref.ftp.php
----- Original Message -----
From: "Scott" <scott
scottah.com>
To: <php-general
lists.php.net>
Sent: Monday, October 29, 2001 10:58 AM
Subject: [PHP] fopen for ftp transfers
> Hi-
>
> I am attempting to transfer files from one server to another via ftp. I
> am wondering if this is the best method to transfer files within PHP or
> should I seek other methods. Here is the way I am doing it now:
>
> $sendfile =
> fopen("ftp:user:letmein
10.1.1.1/testfile", "w");
>
> Thanks
>
>
> --
> 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:
In article <Pine.LNX.4.33.0110290955460.9429-100000
kelly.talon.net>,
scott
scottah.com (Scott) wrote:
> I am attempting to transfer files from one server to another via ftp. I
> am wondering if this is the best method to transfer files within PHP or
> should I seek other methods. Here is the way I am doing it now:
>
> $sendfile =
> fopen("ftp:user:letmein
10.1.1.1/testfile", "w");
-- CC
attached mail follows:
Need to get started parsing XML documents. I've developed a program to write them XML a database, but now I need to read them to obtain, for example, the (cdata) value of <title> which is nested inside <book>, etc.
What's the best place to start? Does DOMXML have a future?
Tutorials?
Suggestions?
kind regards,
bill hollett
attached mail follows:
On Monday 29 October 2001 16:25, bill wrote: > Need to get started parsing XML documents. I've developed a program to > write them XML a database, but now I need to read them to obtain, for > example, the (cdata) value of <title> which is nested inside <book>, > etc. > > What's the best place to start? Does DOMXML have a future?
Sure. But it's a bit overkill if you just want to read XML (sequentially). http://php.net/manual/en/ref.xml.html
-- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/)This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match.
- /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him.
attached mail follows:
Hi
what is the script that was mentioned a while back that you use to allow apache access to a directory that has all world/group access turned off. It think the discussion was protecting mysql information on a shared server.
I know this is a popular topic, sorry. I did check the archives but could not find that script name that was mentioned.
Thanks, -Merle
attached mail follows:
On Monday 29 October 2001 07:37 am, you wrote:
> what is the script that was mentioned a while back that you use to > allow apache access to a directory that has all world/group access > turned off. I
php-cgiwrap.
--kurt
attached mail follows:
mebbe you can figure out why this dont work! :)
Parse error: parse error, expecting `')'' in /(PATH NOT SHOWN TO PUBLIC,SORRY) /www.gzmsoftware.f2s.com/php/fractal.php on line 2
--------------------------------------------------------------------------------
<? function box( int $im,int $x,int $y,int $x2,int $y2,int $color ) { imageline( $im,$x,$y,$x2,$y,$color ); imageline( $im,$x,$y2,$x2,$y2,$color ); imageline( $im,$x,$y,$x,$y2,$color ); imageline( $im,$x2,$y,$x2,$y2,$color ); } function Square(int $x,int $y,int $size,int $pcolor ) { if ($size < 50) break; box($img,$x,$y,$x+$size,$y-$size,$pcolor ); Square($x-$size/4,$y+$size/4,$size/2,$pcolor ); Square($x+$size-$size/4,$y+$size/4,$size/2,$pcolor ); Square($x-$size/4,$y-$size+$size/4,$size/2,$pcolor ); Square($x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor ); } Header ("Content-type: image/png"); $img = imagecreate ($width,$height); $color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b); $pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b); imagerectangle($img,0,0,$width,$height,$color); Square ( -1000,1000,2000,$pixel_color ); imagepng($img); ?>
--------------------------------------------------------------------------------
Please give me a hand.
thanks,
Sincerely,
GZM Software® WebMaster
webmaster
gzmsoftware.f2s.com
http://www.gzmsoftware.f2s.com
attached mail follows:
You don't put type declarations in PHP functions. ie. get rid of all the "int" things there on line two.
-Rasmus
On Mon, 29 Oct 2001, Richard Marks wrote:
> mebbe you can figure out why this dont work! :)
>
> Parse error: parse error, expecting `')'' in /(PATH NOT SHOWN TO PUBLIC,SORRY) /www.gzmsoftware.f2s.com/php/fractal.php on line 2
>
> --------------------------------------------------------------------------------
>
> <?
> function box( int $im,int $x,int $y,int $x2,int $y2,int $color )
> {
> imageline( $im,$x,$y,$x2,$y,$color );
> imageline( $im,$x,$y2,$x2,$y2,$color );
> imageline( $im,$x,$y,$x,$y2,$color );
> imageline( $im,$x2,$y,$x2,$y2,$color );
> }
> function Square(int $x,int $y,int $size,int $pcolor )
> {
> if ($size < 50)
> break;
> box($img,$x,$y,$x+$size,$y-$size,$pcolor );
> Square($x-$size/4,$y+$size/4,$size/2,$pcolor );
> Square($x+$size-$size/4,$y+$size/4,$size/2,$pcolor );
> Square($x-$size/4,$y-$size+$size/4,$size/2,$pcolor );
> Square($x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor );
> }
> Header ("Content-type: image/png");
> $img = imagecreate ($width,$height);
> $color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b);
> $pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b);
> imagerectangle($img,0,0,$width,$height,$color);
> Square ( -1000,1000,2000,$pixel_color );
> imagepng($img);
> ?>
>
> --------------------------------------------------------------------------------
>
> Please give me a hand.
> thanks,
> Sincerely,
> GZM Software® WebMaster
> webmaster
gzmsoftware.f2s.com
> http://www.gzmsoftware.f2s.com
>
>
attached mail follows:
> -----Original Message-----
> From: Richard Marks [mailto:rmarks
gzmsoftware.f2s.com]
> Sent: Monday, October 29, 2001 9:49 AM
> To: php-general
lists.php.net
> Subject: [PHP] I cannot figure this one out! I'm going crazy! :)
>
>
> mebbe you can figure out why this dont work! :)
>
> Parse error: parse error, expecting `')'' in /(PATH NOT SHOWN
> TO PUBLIC,SORRY) /www.gzmsoftware.f2s.com/php/fractal.php on line 2
>
> --------------------------------------------------------------
> ------------------
>
> <?
> function box( int $im,int $x,int $y,int $x2,int $y2,int $color )
Try changing this to
function box ($im, $x, $y, $x2, $y2, $color)
(Also in your other function definition.)
--- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell
attached mail follows:
On my system the mysql and test databases are created in /var/db/mysql/
I created a database called publish and it likewise was stored in /var/db/mysql/publish.
I needed to start over with the work on publish so I deleted the publish directory. #rm -R /var/db/mysql/publish.
BUT after re-creating the tables all the records still existed, so the records weren't in /var/db/mysql/publish. Where is it?
# rm -R /var/db/mysql/publish # mysqladmin create publish # mysql mysql> use publish mysql> CREATE TABLE eZAddress_AddressType ( ID int(11) NOT NULL, Name varchar(50), ListOrder int(11) DEFAULT '0' NOT NULL, Removed int(1) DEFAULT '0' NOT NULL, PRIMARY KEY (ID) );
mysql> INSERT INTO eZAddress_AddressType VALUES (1,'Home address',1,0); ERROR 1062: Duplicate entry '1' for key 1
Where dat data at?
attached mail follows:
On Monday 29 October 2001 07:51 am, you wrote: > I needed to start over with the work on publish so I deleted the publish > directory. #rm -R /var/db/mysql/publish.
Um, not that it's PHP-related, but...
You should use "drop database" instead of manually removing the file.
mysql> drop database databasename
--kurt
attached mail follows:
To delete a database, the best thing to do is login to your mysql DB directly, ie: mysql -u root -p (the root user is the MySQL root, not the sytem root) and supply the password at the prompt. Then do:
DROP DATABASE publish;
This will delete it "correctly". Something that I do is put all my table creations into a file and at the top I put DROP DATABASE name and then recreate it and all my tables. This will reset your database nicely and you can pipe this script into your mysql above, ie:
mysql -u root -p < scriptname
Hope that helps.
Henrik
On Monday 29 October 2001 09:51, PHP Mail wrote: > On my system the mysql and test databases are created in /var/db/mysql/ > > I created a database called publish and it likewise was stored in > /var/db/mysql/publish. > > I needed to start over with the work on publish so I deleted the publish > directory. #rm -R /var/db/mysql/publish. > > BUT after re-creating the tables all the records still existed, so the > records weren't in /var/db/mysql/publish. Where is it? > > # rm -R /var/db/mysql/publish > # mysqladmin create publish > # mysql > mysql> use publish > mysql> CREATE TABLE eZAddress_AddressType ( > ID int(11) NOT NULL, > Name varchar(50), > ListOrder int(11) DEFAULT '0' NOT NULL, > Removed int(1) DEFAULT '0' NOT NULL, > PRIMARY KEY (ID) > ); > > mysql> INSERT INTO eZAddress_AddressType VALUES (1,'Home address',1,0); > ERROR 1062: Duplicate entry '1' for key 1 > > Where dat data at?
--Henrik Hudson lists
rhavenn.net
attached mail follows:
Hello,
Andy I have been trying to solve the same problem.
But after some testing I have found that it is not only db access that causes the lag, it seems to be when submitting forms. I wrote a very simple test script have a form reload itself. In IE it happens almost instantly, but in NC it takes up to 5 secs (this is a lot since it is running locally, no network involved at all).
And the script does have html and body tags (open and close) in there.
Does NC process forms more vigorously before submitting than IE does?? I don't know. -Merle
Monday, October 29, 2001, 11:43:27 AM, you wrote:
MN> This could be due to missing tags such as /body and /html
>> -----Original Message-----
>> From: Andy [mailto:news.letters
gmx.de]
>> Sent: Monday, October 29, 2001 6:41 AM
>> To: php-db
lists.php.net
>> Subject: [PHP-DB] Performance problems in NC
>>
>>
>> Hi there,
>>
>> I have problems with the performance while using NC. It
>> workes fine with IE.
>> As soon as I access the db. It takes aproximatelly 1 -2 min
>> till I see the
>> page.
>>
>> Does anybody know some help?
>>
>> Thank you
>>
>> Andy
>>
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: php-db-unsubscribe
lists.php.net
>> For additional commands, e-mail: php-db-help
lists.php.net
>> To contact the list administrators, e-mail:
>> php-list-admin
lists.php.net
>>
attached mail follows:
thanks, but go here, and see what it does now.
http://www.gzmsoftware.f2s.com/php/fractal.html
can ya help mee?
thanks,
Sincerely,
GZM Software® WebMaster
webmaster
gzmsoftware.f2s.com
http://www.gzmsoftware.f2s.com
attached mail follows:
what in the world is wrong here?
--------------------------------------------------------------------------------
<? Header ("Content-type: image/png"); $img = imagecreate ($width,$height); $color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b); $pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b); function box( $img, $x, $y, $x2, $y2, $color ) { imageline( $img,$x,$y,$x2,$y,$color ); imageline( $img,$x,$y2,$x2,$y2,$color ); imageline( $img,$x,$y,$x,$y2,$color ); imageline( $img,$x2,$y,$x2,$y2,$color ); } function Square( $x, $y, $size, $pcolor ) { if ($size < 50) break; box($img,$x,$y,$x+$size,$y-$size,$pcolor ); Square($img,$x-$size/4,$y+$size/4,$size/2,$pcolor ); Square($img,$x+$size-$size/4,$y+$size/4,$size/2,$pcolor ); Square($img,$x-$size/4,$y-$size+$size/4,$size/2,$pcolor ); Square($img,$x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor ); } imagerectangle($img,0,0,$width,$height,$color); Square ($img, -1000,1000,2000,$pixel_color ); imagepng($img); ?>
--------------------------------------------------------------------------------
thanks,
Sincerely,
GZM Software® WebMaster
webmaster
gzmsoftware.f2s.com
http://www.gzmsoftware.f2s.com
attached mail follows:
Please read http://us.php.net/manual/en/language.variables.scope.php
On Mon, 29 Oct 2001, Richard Marks wrote:
> what in the world is wrong here?
>
> --------------------------------------------------------------------------------
>
> <?
> Header ("Content-type: image/png");
> $img = imagecreate ($width,$height);
> $color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b);
> $pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b);
> function box( $img, $x, $y, $x2, $y2, $color )
> {
> imageline( $img,$x,$y,$x2,$y,$color );
> imageline( $img,$x,$y2,$x2,$y2,$color );
> imageline( $img,$x,$y,$x,$y2,$color );
> imageline( $img,$x2,$y,$x2,$y2,$color );
> }
> function Square( $x, $y, $size, $pcolor )
> {
> if ($size < 50)
> break;
> box($img,$x,$y,$x+$size,$y-$size,$pcolor );
> Square($img,$x-$size/4,$y+$size/4,$size/2,$pcolor );
> Square($img,$x+$size-$size/4,$y+$size/4,$size/2,$pcolor );
> Square($img,$x-$size/4,$y-$size+$size/4,$size/2,$pcolor );
> Square($img,$x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor );
> }
> imagerectangle($img,0,0,$width,$height,$color);
> Square ($img, -1000,1000,2000,$pixel_color );
> imagepng($img);
> ?>
>
> --------------------------------------------------------------------------------
>
> thanks,
> Sincerely,
> GZM Software® WebMaster
> webmaster
gzmsoftware.f2s.com
> http://www.gzmsoftware.f2s.com
>
attached mail follows:
hmm I found out that I had to add "global $img;" in my functions, but dangit now I get this error!
--------------------------------------------------------------------------------
<br>
<b>Fatal error</b>: Cannot break/continue 1 levels
in <b>/(MY PATH)/www.gzmsoftware.f2s.com/php/fractal.php</b> on line <b>18</b><br>
--------------------------------------------------------------------------------
any clue?
thanks,
Sincerely,
GZM Software® WebMaster
webmaster
gzmsoftware.f2s.com
http://www.gzmsoftware.f2s.com
attached mail follows:
You can't 'break' out of a function. You need to use 'return'. You might want to try one of the many irc channels instead. This mailing list really isn't for line-by-line debugging of your scripts.
-Rasmus
On Mon, 29 Oct 2001, Richard Marks wrote:
> hmm I found out that I had to add "global $img;" in my functions,
> but dangit now I get this error!
>
> --------------------------------------------------------------------------------
>
> <br>
> <b>Fatal error</b>: Cannot break/continue 1 levels
> in <b>/(MY PATH)/www.gzmsoftware.f2s.com/php/fractal.php</b> on line <b>18</b><br>
> --------------------------------------------------------------------------------
> any clue?
> thanks,
> Sincerely,
> GZM Software® WebMaster
> webmaster
gzmsoftware.f2s.com
> http://www.gzmsoftware.f2s.com
>
attached mail follows:
Hi guys,
I have an sql query returning a result of nearly 150 000 rows. I use the PEAR DB::getAll method to retrieve this result as an array which is very big indeed (about 300Mb). I can't use the MySQL LIMIT statement because I need to do sorting stuff on the result array. My concern is that even after processing the last line of the script, the process continue running for about 20~30 minutes (I am watching running processes using the unix command 'top'). For information, querying the database, sorting the array and displaying results with a pager system only takes 3 minutes.
I have made a short example that reproduces the problem. If you could test it (IT WILL USE ABOUT 120Mb OF RAM) and tell me if you've got the same problem it would be nice. You need to create a test database with the following table :
CREATE TABLE test ( id mediumint(20) NOT NULL, text varchar(255) NOT NULL default '', PRIMARY KEY (id) )
Then populate it with 150 000 rows using the populate.php script. Finally, execute the query.php script and use top to see if the process stops running quickly. For me it takes a lot of time to end (more than 20 minutes). If you empty the database table, remove one character from the string in the insertInto function and populate it again, it should work correctly.
Thanks for any answer !!
PS : I am using PHP 4.06, MySQL 3.23.41 and Apache on a bi-processor linux box with 1Gb RAM.
//-------------- // populate.php //-------------- <?php require_once("DB.php");
function getmicrotime() { list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); }
function insertInto(&$db) { for ($cpt = 0; $cpt < 150000; $cpt++) { $result = $db->query("INSERT INTO test VALUES('$cpt', 'This is the very big test n° $cpt. With more text. This time it will take more memory, and more time to execute. This is very strange. I do not understand why ???????????????')"); } }
$db = DB::connect("mysql://user:password
localhost/test");
$time_start = getmicrotime();
insertInto($db);
$time_end = getmicrotime(); $time = $time_end - $time_start; echo "Execution time : $time seconds"; ?> //------------- //End of populate.php //-------------
//------------- //query.php //------------- <?php require_once("DB.php");
function getmicrotime() { list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); }
$db = DB::connect("mysql://user:password
localhost/test");
$time_start = getmicrotime();
$result = $db->getAll("SELECT * from test");
$time_end = getmicrotime(); $time = $time_end - $time_start; echo "Execution time : $time seconds"; ?> //-------------- //End of query.php //--------------
attached mail follows:
What prevents you from doing this iteratively, (not loading all 150,000 rows into memory, but processing each row sequentially)?
-----Original Message-----
From: Nicolas Guilhot [mailto:nguilhot
METabolic-EXplorer.com]
Sent: Monday, October 29, 2001 11:44 AM
To: Php General MailingList
Subject: [PHP] Problem with very big array !
Hi guys,
I have an sql query returning a result of nearly 150 000 rows. I use the PEAR DB::getAll method to retrieve this result as an array which is very big indeed (about 300Mb). I can't use the MySQL LIMIT statement because I need to do sorting stuff on the result array. My concern is that even after processing the last line of the script, the process continue running for about 20~30 minutes (I am watching running processes using the unix command 'top'). For information, querying the database, sorting the array and displaying results with a pager system only takes 3 minutes.
I have made a short example that reproduces the problem. If you could test it (IT WILL USE ABOUT 120Mb OF RAM) and tell me if you've got the same problem it would be nice. You need to create a test database with the following table :
CREATE TABLE test ( id mediumint(20) NOT NULL, text varchar(255) NOT NULL default '', PRIMARY KEY (id) )
Then populate it with 150 000 rows using the populate.php script. Finally, execute the query.php script and use top to see if the process stops running quickly. For me it takes a lot of time to end (more than 20 minutes). If you empty the database table, remove one character from the string in the insertInto function and populate it again, it should work correctly.
Thanks for any answer !!
PS : I am using PHP 4.06, MySQL 3.23.41 and Apache on a bi-processor linux box with 1Gb RAM.
//-------------- // populate.php //-------------- <?php require_once("DB.php");
function getmicrotime() { list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); }
function insertInto(&$db) { for ($cpt = 0; $cpt < 150000; $cpt++) { $result = $db->query("INSERT INTO test VALUES('$cpt', 'This is the very big test n° $cpt. With more text. This time it will take more memory, and more time to execute. This is very strange. I do not understand why ???????????????')"); } }
$db = DB::connect("mysql://user:password
localhost/test");
$time_start = getmicrotime();
insertInto($db);
$time_end = getmicrotime(); $time = $time_end - $time_start; echo "Execution time : $time seconds"; ?> //------------- //End of populate.php //-------------
//------------- //query.php //------------- <?php require_once("DB.php");
function getmicrotime() { list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); }
$db = DB::connect("mysql://user:password
localhost/test");
$time_start = getmicrotime();
$result = $db->getAll("SELECT * from test");
$time_end = getmicrotime(); $time = $time_end - $time_start; echo "Execution time : $time seconds"; ?> //-------------- //End of query.php //--------------
-- 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:
Dump the Excel DB to a text file and use the string parsing functions. Working with two large databases will suck up most of your system resources; working with a large text file one line at a time and one database one record of a time may be a little slower but it is going to be a million times easier on your system.
Mike Frazer
"Daniel Harik" <gatop
hot.ee> wrote in message
news:9925197131.20011027161132
hot.ee...
> Hello guys
>
> Thank You very much for your previous replies, could u help me with 1
> more thing?
>
> You see i have huge(for me) 100 000 record access table, i wanted to
> convert it to mysql, i thought of making php convertor that uses odbc
> and mysql, but maybe there is faster way?
>
> And other thought was also read in RAW format excel file with perl,
> and take advantage of DBI?
>
> Anyways how would u do it?
>
> Thank You very much
>
attached mail follows:
flock does not work because works differently.
is there a way to access fnctl locking directly from php?
attached mail follows:
Think of a class as a car:
The car as a whole is one "object", while it is made up of several smaller components that serve various "functions". You can also store different things in the trunk of the car that will be useful later (these would be the class variables).
Now lets think of it in programming sense:
PHP allows for object-oriented programming through their class/object interfaces. All they really do is serve as a place to dump functions and variables that are made to work with one another directly, and in many cases to prevent non-related functions and processes from accessing their data directly (although this is one of the best things about Object-Oriented Programing, PHP hasn't entirely implemented it yet).
A simple class:
class car { var $color; var $doors; var $year; var $model; var $fuel;
function car() { $doors = "4"; $year = "2001"; $model = "PHP Class Car"; }
function addFuel($gallons) { $this->fuel += $gallons; }
var paintCar($newcolor) { $this->color = $newcolor; } }
The class encapsulates all this information. To use this stuff you need to create a variable of type car:
$myCar = new car;
Doing this automatically calls the "constructor" function if one is present. The constructor is a function with the same name as the class (this rule varies a bit depending on your version of PHP; read the manual for details). In the constructor, certain variables are given default values and certain functions can be called if needed.
After that you can access variable data using $myCar->[variable name]. Functions are called the same way: $myCar->myFunction($myArgs);
Those are the basics. There's a great deal more to learn about OOP. If you really want to learn about OOP, get a book on C, C++ or Java. These are probably the three best implementations of OOP (and it really originated in its current form with C++).
Mike Frazer
"Jack" <jackps1
speedlink.com.hk> wrote in message
news:20011027104720.66614.qmail
pb1.pair.com...
> Dear all
> I'm fresh on PHP, there is a question which i don't understand , even i
had
> read the book about PHP.
> There is a Class and object in PHP, but i don't quite understand what is
> that for.
> I had look at some of the Example in PHP.net and i know most of it, but
> there is a operator :
> $this->edible = $edible;
> What is the "$this -> " stand for?
>
> Could someone please tell me more???
> Thx
>
> jack
> jackps
netvigator.com
>
>
attached mail follows:
I've written several functions with optional "string" parameters. They work fine. But I've never written one that accepts an optional "bool" parameter and I'm now confused.
I would like to have this: somefunction("hello"); somefunction("hello",false); somefunction("hello",true);
function somefunction($text,$xxx="") { if($xxx){ $xxx parameter was passed as true or false }else{ $xxx parameter was not passed } }
Which is correct for the default initialization of $xxx: $xxx=false; $xxx=null; $xxx="";
How do I distinguish between false and "$xxx parameter not passed"? Do I use isset()? Do I use ===?
Thanks.
-- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here
attached mail follows:
"John A. Grant" <jazrant
zsc.nrcan.zc.ca> wrote in message
news:20011029170132.18355.qmail
pb1.pair.com...
[...]
> How do I distinguish between false and "$xxx parameter not
> passed"? Do I use isset()? Do I use ===?
Well, I guess I should have done some homework first. This code seems to work fine:
function somefunction($text,$xxx=null) { if(isset($xxx)){ echo $xxx ? "true" : "false"; }else{ echo "null"; } echo "\n"; }
somefunction("hello"); somefunction("hello",true); somefunction("hello",false);
It prints: null true false
which is what I want.
-- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here
attached mail follows:
yeah, but i wanted to know the answer... so it wasn't a total waste of time :)
"John A. Grant" <jazrant
zsc.nrcan.zc.ca> wrote in message
news:20011029180736.62955.qmail
pb1.pair.com...
> "John A. Grant" <jazrant
zsc.nrcan.zc.ca> wrote in message
> news:20011029170132.18355.qmail
pb1.pair.com...
> [...]
> > How do I distinguish between false and "$xxx parameter not
> > passed"? Do I use isset()? Do I use ===?
>
> Well, I guess I should have done some homework first. This
> code seems to work fine:
>
attached mail follows:
If $xxx isn't defined at all, its default is NULL, so your if statement should work as is. If $xxx is not defined, then you should get thrown down to the else. There is a difference between false and NULL.
On Monday 29 October 2001 10:50, John A. Grant wrote: > I've written several functions with optional "string" parameters. > They work fine. But I've never written one that accepts an optional > "bool" parameter and I'm now confused. > > I would like to have this: > somefunction("hello"); > somefunction("hello",false); > somefunction("hello",true); > > function somefunction($text,$xxx="") > { > if($xxx){ > $xxx parameter was passed as true or false > }else{ > $xxx parameter was not passed > } > } > > Which is correct for the default initialization of $xxx: > $xxx=false; > $xxx=null; > $xxx=""; > > How do I distinguish between false and "$xxx parameter not > passed"? Do I use isset()? Do I use ===? > > Thanks.
--Henrik Hudson lists
rhavenn.net
attached mail follows:
I got the same error message when i opened it with "w"... A append operation opens the file in r/w? I'm not sure... I though it needed a "+" : a+, w+... anyway, I think I'm gonna use a database (mysql) and it will be easy to to what I need but this problem is very strange.
Thanks!
> Aha -- I understand. I also didn't see the first time that you're using FTP. > You can't fopen() a file for read/write through FTP. You can do one, or the > other, but not both. > > http://www.php.net/manual/en/function.fopen.php
attached mail follows:
sounds like that's the problem - I am using session_start() as well so will give your idea a try!
many thanks
Moloko
"_lallous" <elias_bachaalany
yahoo.com> wrote in message
news:20011029112951.31328.qmail
pb1.pair.com...
> it happened to me when i enter the page for the very first time and I use
> session_start()
attached mail follows:
Exactly. Java borrows from C/C++ a great deal, and they tend to look similar overall, but they are totally different languages.
PHP and Perl are much easier to learn if you already knew the other one fairly well, but the differences are vast. After learning at least the basics of seven languages, I'm ready to suggest we make one universal one :)
Mike Frazer
"Cc Zona" <cczona
nospam.invalid> wrote in message
news:20011027004010.29248.qmail
pb1.pair.com...
> In article <3BD9FD6D.F2A6EE71
courrier.usherb.ca>,
> jtjohnston
courrier.usherb.ca (Jtjohnston) wrote:
>
> > > RTM <http://www.php.net/manual/en/language.variables.php>:
> > >
> > > "Variable names follow the same rules as other labels in PHP. A valid
> > > variable name starts with a letter or underscore, followed by any
number of
> > > letters, numbers, or underscores."
> >
> > So $_1a is legal?! Confusing given $_ in Perl.
>
> <shrug> PHP isn't Perl, Perl isn't PHP. Approaching one language with the
> expectation that it will follow the conventions of another will only give
> you a headache.
>
> --
> CC
attached mail follows:
I am new to php and I have been using a book to learn a bit about it and well I could not find a chapter on how to use php to verify a form is filled out properly, for instance I have a form with 3 fields... name, email and words. once the user clicks the submit button i want it to verify those 3 fields before running the php script to pass the info to a database. I have used java-script for this function in the past but would like to use php. Anyone know how i can accomplish this? Thanks in advance, Jason
attached mail follows:
form passes to your php file
your php file checks the variables with the same name of that of the form fields.
you can then test htey have all been set accordingly
e.g.
$FieldName etc.
"Jason" <jlgerfen
hotmail.com> wrote in message
news:20011029172548.34104.qmail
pb1.pair.com...
> I am new to php and I have been using a book to learn a bit about it and
> well I could not find a chapter on how to use php to verify a form is
filled
> out properly, for instance I have a form with 3 fields... name, email and
> words. once the user clicks the submit button i want it to verify those 3
> fields before running the php script to pass the info to a database. I
have
> used java-script for this function in the past but would like to use php.
> Anyone know how i can accomplish this? Thanks in advance, Jason
>
>
attached mail follows:
I believe he was asking how to actually verify them, but I could be wrong...
There are two ways to do it that are quick and painless. One involves matching with a regular expression (and since my regular expression knowledge is no longer up to snuff I won't even attempt to explain it in depth). The other is with the String functions. There are about 900 ways to do it with string functions. Here is a for-instance:
To verify that there is a
in an email address:
$test = strpos($email, "
"); // Test >= 0 if true, FALSE if false
You can also tokenize the string using the strtok() function and then compare both the user ID and the domain/host information to your desired conditions.
All in all. the best way is with a regular expression. However, you'll need to get help from someone else on that as I've forgotten most of the stuff about regex's. Spent too much time progrmaming other things :)
Mike Frazer
"Richard Hollis" <rhollis
keypoint.demon.co.uk> wrote in message
news:20011029182205.77075.qmail
pb1.pair.com...
> form passes to your php file
>
> your php file checks the variables with the same name of that of the form
> fields.
>
> you can then test htey have all been set accordingly
>
> e.g.
>
> $FieldName etc.
>
>
> "Jason" <jlgerfen
hotmail.com> wrote in message
> news:20011029172548.34104.qmail
pb1.pair.com...
> > I am new to php and I have been using a book to learn a bit about it and
> > well I could not find a chapter on how to use php to verify a form is
> filled
> > out properly, for instance I have a form with 3 fields... name, email
and
> > words. once the user clicks the submit button i want it to verify those
3
> > fields before running the php script to pass the info to a database. I
> have
> > used java-script for this function in the past but would like to use
php.
> > Anyone know how i can accomplish this? Thanks in advance, Jason
> >
> >
>
>
attached mail follows:
Assuming you know what your field names are, they get passed in to the PHP script as variables.
Using regular expressions you can check your variables for values you want/don't want. If they aren't what you want print an error message and tell the user to go back or something similar.
It's the same process as doing it with Javascript, except its after the user hits submit.
Henrik
On Monday 29 October 2001 11:44, Jason wrote:
> I am new to php and I have been using a book to learn a bit about it and > well I could not find a chapter on how to use php to verify a form is > filled out properly, for instance I have a form with 3 fields... name, > email and words. once the user clicks the submit button i want it to verify > those 3 fields before running the php script to pass the info to a > database. I have used java-script for this function in the past but would > like to use php. Anyone know how i can accomplish this? Thanks in advance, > Jason
--Henrik Hudson lists
rhavenn.net
attached mail follows:
Hi,
Does anyone know how to get round this problem? I have just installed Apache 1.3.22 but when I load php4.0.6 it won't run.
Please email me at edward.quick
btinternet.com.
Thanks,
Ed.
attached mail follows:
> -----Original Message-----
> From: edward.quick
btinternet.com
> [mailto:edward.quick
btinternet.com]
> Sent: Monday, October 29, 2001 11:29 AM
> To: php-general
lists.php.net
> Subject: [PHP] apache1.3.22 won't start with php4.0.6
>
>
> Does anyone know how to get round this problem? I have just
> installed Apache 1.3.22 but when I load php4.0.6 it won't run.
Does it give you any messages when it fails to run? Put anything useful in your Apache error logs?
--- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell
attached mail follows:
Absolutely nothing.
----- Original Message -----
From: "Mark Roedel" <MarkRoedel
letu.edu>
To: <edward.quick
btinternet.com>; <php-general
lists.php.net>
Sent: Monday, October 29, 2001 7:15 PM
Subject: RE: [PHP] apache1.3.22 won't start with php4.0.6
> -----Original Message-----
> From: edward.quick
btinternet.com
> [mailto:edward.quick
btinternet.com]
> Sent: Monday, October 29, 2001 11:29 AM
> To: php-general
lists.php.net
> Subject: [PHP] apache1.3.22 won't start with php4.0.6
>
>
> Does anyone know how to get round this problem? I have just
> installed Apache 1.3.22 but when I load php4.0.6 it won't run.
Does it give you any messages when it fails to run? Put anything useful in your Apache error logs?
--- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell
attached mail follows:
On Mon, 29 Oct 2001 17:28:39 +0000 (GMT)
edward.quick
btinternet.com wrote:
> Hi, > > Does anyone know how to get round this problem? I have just installed Apache 1.3.22 but when I load php4.0.6 it won't run.
The error you are receiving when you try to start apache would be of assistance.
>
> Please email me at edward.quick
btinternet.com.
>
> Thanks,
>
> Ed.
>
> --
> 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
>
-- -=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters http://24.5.29.77:10080/
attached mail follows:
uhhh... the php psychic says she needs your birthdate and name first. =P
but really, give some useful info. what OS? how is PHP compiled... are you using the CGI style standalone, or is it compiled into Apache, or is it a apache module? Whats the error it gives you on the console when trying to run it. Whats the error produced in the apache log? etc...
> -----Original Message-----
> From: edward.quick
btinternet.com [mailto:edward.quick
btinternet.com]
> Sent: Monday, October 29, 2001 10:29 AM
> To: php-general
lists.php.net
> Subject: [PHP] apache1.3.22 won't start with php4.0.6
>
>
> Hi,
>
> Does anyone know how to get round this problem? I have just
> installed Apache 1.3.22 but when I load php4.0.6 it won't run.
>
> Please email me at edward.quick
btinternet.com.
>
> Thanks,
>
> Ed.
>
> --
> 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:
Hi Edward,
4:25:53 PM on 10/29/2001, Edward Quick wrote:
> Absolutely nothing.
Don't take this as my assuming you're incompetent. It's just that we need more information about your system in order to help you.
You wrote:
> I have just installed Apache 1.3.22 but when I load php4.0.6 it > won't run
Define "load php4.0.6" exactly. Did you build PHP as a DSO (--with-apxs) or did you build it into httpd (--with-apache)? Did you install from an RPM?
Assuming Apache is installed in one of the usual places, and assuming you're on a Unix or Linux system..
What happens when you run:
$ `which apachectl` configtest
Does it say "Syntax OK"?
What do you get when you run:
$ updatedb
followed by:
$ locate libphp4 | grep so
If nothing there, do you see "mod_php4.c" when you run this:
$ `which httpd` -l | grep php
Find your apache error_log, do this:
$ tail -f /path/to/apache/error_log
Then in another shell start apache:
$ `which apachectl` start
Does the "tail" window say anything at _all_?
We need more information..
-- -Brian Clark | PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies.
attached mail follows:
Hi, I use php 4.0.6 and I would like to do the following :
teste_classe1.php <? require ("classes.inc"); session_start(); echo("<html>"); echo("<body>"); session_register($tb); $tb = new tabela("tb_area_interesse", "Área de Interesse"); ?>
<a href=teste_classe2.php>teste_classe2</a> </body> </html>
teste_classe2.php
<? require ("classes.inc"); session_start(); echo("<html>"); echo("<body>"); $result = $tb->qual_tabela(); echo $result; session_unregister($tb); session_destroy(); ?> </body> </html>
When I load teste_classe1.php, its ok, but when I click on teste_classe2 link I receive :
Fatal error: Call to a member function on a non-object in /home/httpd/html/curriculum/adm/teste_classe2.php on line 6
any ideas ???
Obrigado, André Castanheira Carioca Engenharia S.A. +55 21 3891-2200 r; 2325
attached mail follows:
try:
session_register("tb");
$tb = new tabela("tb_area_interesse", "Área de Interesse");
then after using sesion_start() in the next script $tb should contain your object.
Richard
"Cdré «góvîj érg" <aocastanheira
cariocaengenharia.com.br> wrote in
message news:1004377989.3bdd97852e644
webmail.cariocaengenharia.com.br...
> Hi,
> I use php 4.0.6 and I would like to do the following :
>
> teste_classe1.php
> <?
> require ("classes.inc");
> session_start();
> echo("<html>");
> echo("<body>");
> session_register($tb);
> $tb = new tabela("tb_area_interesse", "Área de Interesse");
> ?>
>
> <a href=teste_classe2.php>teste_classe2</a>
> </body>
> </html>
>
>
> teste_classe2.php
>
> <?
> require ("classes.inc");
> session_start();
> echo("<html>");
> echo("<body>");
> $result = $tb->qual_tabela();
> echo $result;
> session_unregister($tb);
> session_destroy();
> ?>
> </body>
> </html>
>
>
> When I load teste_classe1.php, its ok, but when I click on teste_classe2
link I
> receive :
>
> Fatal error: Call to a member function on a non-object
> in /home/httpd/html/curriculum/adm/teste_classe2.php on line 6
>
>
> any ideas ???
>
> Obrigado,
> André Castanheira
> Carioca Engenharia S.A.
> +55 21 3891-2200 r; 2325
attached mail follows:
My opinion differs from Rasmus in this case - I think that most of the points he makes in his study are quite accurate and well analyzed. Be sure to keep current when the next release of PHP comes out - it's going to provide infrastructure to handle some of the more dangerous issues that Shaun pointed out.
Zeev
At 08:49 26/10/2001, Joseph Blythe wrote:
>ok thanks, think I fall in that category too, but doing my best to change it
>:)
>
>-----Original Message-----
>From: Rasmus Lerdorf [mailto:rasmus
php.net]
>Sent: Friday, 26 October 2001 4:05 PM
>To: Joseph Blythe
>Cc: php-general
lists.php.net
>Subject: Re: [PHP] security
>
>
>Has been around for quite a while and pretty much all the points are
>address right in the PHP documentation at http://php.net/security which is
>a much more informed source to study. The guy who wrote that scarlet
>report only had a very thin grasp of the concepts.
>
>-Rasmus
>
>On Fri, 26 Oct 2001, Joseph Blythe wrote:
>
> > just stummbled across this great study by Shaun Clowes on php security,
>this
> > is just the kind of information I have been looking for, thought others
> > could also benefit from it.
> >
> > http://www.securereality.com.au/studyinscarlet.txt
> >
> > found during google search: PHP Security
> >
> > cheers,
> >
> > joseph
> >
> >
> >
>
>
>--
>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:
Hi, Im looking for some mailing list script that would have option to send mails in batch mode, to prevent server overloading and to sent all mails in personal mode, not to send them in bcc, or anything. I have looked allready on hotscripts.com ang phpresourceindex etc, but all e-mails with that options aren't free.
Thanks!
attached mail follows:
you mean like majordomo? it's not php but perl
www.majordomo.com
----- Original Message -----
From: "Nikola Karoviæ" <avdijaa
yahoo.com>
To: <php-general
lists.php.net>
Sent: Monday, October 29, 2001 12:34 PM
Subject: [PHP] Mailing list
> Hi,
> Im looking for some mailing list script that would have option to send
mails
> in batch mode, to prevent server overloading and to sent all mails in
> personal mode, not to send them in bcc, or anything.
> I have looked allready on hotscripts.com ang phpresourceindex etc, but all
> e-mails with that options aren't free.
>
> Thanks!
>
>
> --
> 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:
no, not like majordomo, like octeth mailing list manager http://www.octeth.com/, only some thats free
----- Original Message -----
From: Frewuill Rodriguez <frewuill
merlin-corp.com>
To: Nikola Karoviæ <avdijaa
yahoo.com>; <php-general
lists.php.net>
Sent: 29. listopad 2001 21:21
Subject: Re: [PHP] Mailing list
> you mean like majordomo? it's not php but perl
>
> www.majordomo.com
>
> ----- Original Message -----
> From: "Nikola Karoviæ" <avdijaa
yahoo.com>
> To: <php-general
lists.php.net>
> Sent: Monday, October 29, 2001 12:34 PM
> Subject: [PHP] Mailing list
>
>
> > Hi,
> > Im looking for some mailing list script that would have option to send
> mails
> > in batch mode, to prevent server overloading and to sent all mails in
> > personal mode, not to send them in bcc, or anything.
> > I have looked allready on hotscripts.com ang phpresourceindex etc, but
all
> > e-mails with that options aren't free.
> >
> > Thanks!
> >
> >
> > --
> > 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:
Hi
For an excellent perl solution try mojo mail at:
This has all you want and more, and it is open source.......
FYI I use this and currently have approx 1300 subscribers, this has not let me down yet.
Regards Paul
----- Original Message -----
From: "Nikola Karoviæ" <avdijaa
yahoo.com>
To: <php-general
lists.php.net>
Sent: Monday, October 29, 2001 4:34 PM
Subject: [PHP] Mailing list
: Hi,
: Im looking for some mailing list script that would have option to send
mails
: in batch mode, to prevent server overloading and to sent all mails in
: personal mode, not to send them in bcc, or anything.
: I have looked allready on hotscripts.com ang phpresourceindex etc, but all
: e-mails with that options aren't free.
:
: Thanks!
:
:
: --
: 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, I'd like users to be able to download images from on my site. The images are pretty big, so i've made thumbnails for each. I can display each thumbnail, but how can i get it so that once the user clicks on the thumbnail, they get to download the whole image. I'd like it to work without having the user to right click and choose 'save image as'. Any ideas?! Thanks, Heidi
===== Heidi Belal ICQ# 32127109
A bus stops at a bus station. A train stops at a train station. On my desk I have a work station...
__________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
attached mail follows:
With some of the newer broswers, you may be able to re-define the functionality of the context menu via JavaScript. Visit http://www.dynamicdrive.com; I think that there are some examples there, and you might be able to redirect the "save image as..." functionality there (I wouldn't count on it, though).
Another option might be to zip up the larger image as a zip file and create a link to that zip file through the thumbnail image. That way, when the user clicks on the thumbnail, they are prompted with a "save as..." dialogue box and they can then save the document on their own computer. They still have to unzip it though.
Other than that, I think you're out of luck. The problem is that saving an image onto a computer is a client-side function, which you can have no control over with server-side programs such as PHP or Perl. If you can come up with a way for a web page to mess around with the source code of Netscape or IE, then you might be able to do things like control the "save image as..." functionality, or disable the back button, but that seems pretty unlikely to me.
At 10:47 AM 10/29/2001, you wrote: >Hey, >I'd like users to be able to download images from on >my site. The images are pretty big, so i've made >thumbnails for each. I can display each thumbnail, >but how can i get it so that once the user clicks on >the thumbnail, they get to download the whole image. >I'd like it to work without having the user to right >click and choose 'save image as'. >Any ideas?! >Thanks, >Heidi
Sliante, Richard S. Crawford
http://www.mossroot.com
mailto:rscrawford
mossroot.com
AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford
"It is only with the heart that we see rightly; what is essential is
invisible to the eye." --Antoine de Saint Exupéry
"Push the button, Max!"
attached mail follows:
I'm trying to find a way to make streaming context for an internet game web site, like continual updates from the game and game info for players, I was looking around but can't find a function to help me, if you can point me in the right direction please drop me a line
- James
attached mail follows:
On Sunday 28 October 2001 20:53, jtjohnston wrote: > Jokes aside, I still don't get it.
*g*
> This works: > mysql_pconnect($host,"AccountName","beep");
> Why doesn;'t this? > > $myconnection = mysql_pconnect($host,$MyTable,$MyPassword);
Compare what arguments you pass. Especially the second one. In the first example you supply your account name. That's fine. mysql_pconnect expects it in that place. The second time you use the table name instead of the acctname, so it tries to log in with username $MyTable, passwd $MyPassword
And unless you have a very weird setup this will always fail :)
-- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/)This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match.
- /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him.
attached mail follows:
On Sunday 28 October 2001 22:17, Imar de Vries wrote: > Hi all, > > a very frustrating problem. For some reason I am not able to pass on an > array between two functions, although I declare it global in both of > them. I suspect my use of a switch statement to control the flow of the
[...]
> switch ($action) { > default: > main(); > break; > case "test_one": > test_one(); > break; > }
[...]
> print ("<p><form method=\"post\" action=\"arraytest.php\" > enctype=\"multipart/form-data\">"); > ?> > <input type="hidden" name="action" value="test_one"> > <input type="submit" value="Test" tabindex="6"> > </form> > <? > }
So you want to share the array across *requests* That doesn't have *anything* to do with "global".
Have a look at how HTTP works - each request is an isolated execution of a PHP script. it doesn't have any idea of what other pages the user already looked at. To archieve your stuff you need session management (phpbuilder.com has a nice tutorial on this)
-- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/)This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match.
- /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him.
attached mail follows:
wrote some code..
<? function test($testid) { echo "called from $testid!<br>"; return 4; }
echo "DOING THE FIRST TEST<BR>"; for ($i = 0; $i < test('first'); $i++) { //doStuff }; echo "<br>"; echo "DOING THE SECOND EMILE COMPACT BLAH TEST<BR>"; for ($i = 0; $i < ($num?$num:($num = test('second'))); $i++) { //doStuff };
//for ($i = 0; $i < ($num?$num:($num = mysql_num_rows($Results))); $i++) {
//}; ?>
tralalal good luck
"David Robley" <huntsman
www.nisu.flinders.edu.au> schreef in bericht
news:01091910452903.15278
www...
> On Tue, 18 Sep 2001 20:56, Niklas Lampén wrote:
> > How big difference does it make in speed in these:
> >
> > <?
> > for ($i = 0; $i < mysql_num_rows($Results); $i++) {
> > blah
> > };
> > ?>
> >
> > or
> >
> > <?
> > $n = mysql_num_rows($Results);
> > for ($i = 0; $i < $n; $i++) {
> > blah
> > };
> > ?>
> >
> > So actually I'm asking how much more/less it takes time to do the
> > comparing against mysql_num_rows() insted of comparing against a
> > variable.
> >
> >
> > Niklas
>
> Will deppend on the environment in which you are running it. to test it
> on your environment, try running each say ten thousand times in a loop,
> and use a timer like microtime to check how long it takes.\
>
> Then you can let us all know the answer.
>
> --
> David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
> CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
>
> Why can't we just spell it orderves?
attached mail follows:
sorry, this might be a little bit off the topic, but I really hope you could help anwering this question.
It's pretty clear how to use web server to authenticate the users/groups, for example, if we are using Apache, the userID and password will be stored in the browser's cache, and be sent to the web server to do the authentiation whenenver a page is requested.
However, if the authentication server is not the web server, instead, it is a remote independent server. How can we manage the user authentications at the web server side?
Thank you very much in advance!
attached mail follows:
may be you can write a script (perl/php/*) which try to check/log/whatever on the remote user sending a login/password, so if it returns ok yo can use it to deny/allow the access to your local webserver.. it's like a kind of authentication proxy
----- Original Message -----
From: "Zhu George-CZZ010" <George.Z.Zhu
motorola.com>
To: <php-general
lists.php.net>
Sent: Monday, October 29, 2001 4:39 PM
Subject: [PHP] User Authentication against remote authentication server
>
> sorry, this might be a little bit off the topic, but I really hope you
could help anwering this question.
>
> It's pretty clear how to use web server to authenticate the
users/groups, for example, if we are using Apache, the userID and password
will be stored in the browser's cache, and be sent to the web server to do
the authentiation whenenver a page is requested.
>
> However, if the authentication server is not the web server, instead,
it is a remote independent server. How can we manage the user
authentications at the web server side?
>
> Thank you very much in advance!
>
> --
> 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:
> However, if the authentication server is not the web server, instead, > it is a remote independent server. How can we manage the user > authentications at the web server side?
Use LDAP.
http://www.php.net/manual/en/ref.ldap.php
attached mail follows:
we have developed an application that in use at institutions throughout the U.S and hosted centrally, and we need to figure out how to handle timezone issues for time related data in the database. how have others handled the issue ? our thought is to associate a timezone with the institution and store all times in the DB as UTC. conversions from UTC to local time would happen only as