php-general Digest 22 Mar 2003 13:25:23 -0000 Issue 1953
Topics (messages 140651 through 140677):
md5 & cookies
140651 by: Sebastian
Re: Sessions question
140652 by: Beauford.2002
140673 by: Jason Wong
Resume PHP Sockets?
140653 by: Richard Mikalsen
Re: How to delay a header( Location: )
140654 by: Richard Mikalsen
Re: detecting end of line - php 4.1.2
140655 by: Travers Carter
retrieve data from mysql db
140656 by: gert vonck
Re: Apache + PHP - when using as module, can one have PHPs run as
140657 by: ADFH
Re: Cookie or Session??
140658 by: Justin French
140672 by: Jason Wong
Re: How to detect if a cookie is set?
140659 by: Paonarong Buachaiyo
Re: Session Not Working
140660 by: Paonarong Buachaiyo
Re: Sessions
140661 by: Justin French
140669 by: Adam -
how to test string to see if it is a date or time?
140662 by: DomIntCom
Test the server.
140663 by: Vincent M.
140665 by: Sebastian
Wrapping text output
140664 by: Philip J. Newman
140666 by: Sebastian
140671 by: Justin French
Re: web services
140667 by: Nikunj Virani
140674 by: Alexandru COSTIN
Re: ob_start problem
140668 by: Mr Percival
Compile problem.
140670 by: Serge Paquin
variales within define constants
140675 by: Dan Rossi
140677 by: Daniel Diehl
Re: fast template class
140676 by: rush
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
hello all,
Cookie noob here :s
how do I add md5 hash so it encrypts the password only in the cookie? and
how do I increase the expire time to 30 days? Here's the snip:
setcookie("pass","$HTTP_POST_VARS[password]",time()+(3600*24*7));
Thanks in advanced.
cheers,
- Sebastian
--- End Message ---
--- Begin Message ---
I don't quite understand this. If a user is on my site and then decides to
go into his favourites and go to yahoo.com - this won't work. I think you
are assuming the user is going to click on something I have set up - I want
this to be invisible - however this user decides to leave my site. It
appears though from the answers I have received - that this is not
possible....
B.
----- Original Message -----
From: "Kevin Stone" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Friday, March 21, 2003 4:21 PM
Subject: Re: [PHP] Sessions question
> This is one of those rare things in programming that can only be done one
> way. Absolutely the only way to kill the session when a user leaves your
> site is to go through a script and then redirect after the session has
been
> destroyed. For this to work every outgoing link on your website will have
> to point to a script. Then you'll pass the redirect url or url id (that
> referse to a url in your database) through the link and redirect after
> session_destroy() has killed the session.
>
> The link can look like this:
> <a href="exit.php?url=http://www.thiersite.com">www.theirsite.com</a>
>
> The script will look something like this:
> <? // exit.php
> session_start();
> session_destroy();
> header("Location: ".$_POST['url']);
> ?>
>
> Keep in mind if you want to do this then the user will not be able to use
> his/her back button in order to return to your website unless you define
an
> additional redirect in a conditional that states "if the session is not
> active then go here".
>
> Voodoo. *LOL*
>
> - Kevin
>
>
> ----- Original Message -----
> From: "Beauford.2002" <[EMAIL PROTECTED]>
> To: "Ford, Mike [LSS]" <[EMAIL PROTECTED]>; "'Justin French'"
> <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]>
> Sent: Friday, March 21, 2003 12:56 PM
> Subject: Re: [PHP] Sessions question
>
>
> > So is there anyway to do this - perl, javascript, voodo?
> >
> >
> > ----- Original Message -----
> > From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]>
> > To: "'Justin French'" <[EMAIL PROTECTED]>; "Beauford.2002"
> > <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]>
> > Sent: Friday, March 21, 2003 11:04 AM
> > Subject: RE: [PHP] Sessions question
> >
> >
> > > > -----Original Message-----
> > > > From: Justin French [mailto:[EMAIL PROTECTED]
> > > > Sent: 21 March 2003 15:59
> > > >
> > > > on 22/03/03 2:27 AM, Beauford.2002 ([EMAIL PROTECTED]) wrote:
> > > >
> > > > > What about cookies - someone said if you put no time limit
> > > > on a cookie it
> > > > > dies when you leave the site - I'm not sure about this, but
> > > > any help is
> > > > > appreciated.
> > > >
> > > > I think it's defined as "when the browser is closed", not
> > > > "when the browser
> > > > is no longer in your domain"
> > >
> > > That is correct.
> > >
> > > Cheers!
> > >
> > > Mike
> > >
> > > ---------------------------------------------------------------------
> > > Mike Ford, Electronic Information Services Adviser,
> > > Learning Support Services, Learning & Information Services,
> > > JG125, James Graham Building, Leeds Metropolitan University,
> > > Beckett Park, LEEDS, LS6 3QS, United Kingdom
> > > Email: [EMAIL PROTECTED]
> > > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On Saturday 22 March 2003 08:09, Beauford.2002 wrote:
> I don't quite understand this. If a user is on my site and then decides to
> go into his favourites and go to yahoo.com - this won't work. I think you
> are assuming the user is going to click on something I have set up - I want
> this to be invisible - however this user decides to leave my site. It
> appears though from the answers I have received - that this is not
> possible....
You're right it is not possible and quite rightly so. I wouldn't want a site
to know when I have 'left' their site.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Lee's Law:
Mother said there would be days like this,
but she never said that there'd be so many!
*/
--- End Message ---
--- Begin Message ---
Is it possible to resume persistent sockets opened with pfsockopen?
I really need to know if it's possible to resume a socket from another
script, like if I've saved the socket into a session variable.
Thank You
--- End Message ---
--- Begin Message ---
You can use sleep?
Like:
sleep(2);
Header("Location: blah");
"Webmaster Mbt" <[EMAIL PROTECTED]> skrev i melding
news:[EMAIL PROTECTED]
> Hi I need to delay the jump of a page that uses header(location: ) to
jump.
>
> Ive tried adding a , after the file name (that's how we do it on html) but
> it doesn't work
>
>
>
> Any Ideas?
>
>
>
> EJB
>
>
--- End Message ---
--- Begin Message ---
Paul Godard wrote:
> Hi
>
> I am trying to get php 4.1.2 to read a Mac file (exported from
> FileMaker Pro) and split it into different lines using the following
> but php does not recognize the end of line. For some tech reason I
> cannot upgrade php now but I need to be able to read my Mac files
> now. What is the easiest : edit the Mac file and replace the end of
> line or modify the script below? In any case I need help to know
> exactly what to do.
>
> // first read the entire file
> $file = file($Export_ImageBank);
>
> // process each line in turn
> foreach ($lines as $line_num => $line) {
>
>
> // first split tab-separated fields
>
list($Image_ID,$Mark_Check,$Image_Good,$Image_VeryGood,$Image_ShortCodeOrgan,$Image_Number,$Image_SubFolder,$Image_Format,$Image_MaxPxWidth,$Image_MaxPxHeight,$Image_Year,$Image_Month,$Image_Subject,$Image_CodeCountry,$Image_Region,$Image_Location,$Image_Collection,$Image_Caption,$Image_CodePrice)
> = explode("\t", $line);
>
> Please email me directly at [EMAIL PROTECTED] Thanks.
>
Something like this should work for text files from any platform, the Vertical
Tab conversion is filemaker specific and only really needed if there are line
breaks embedded in the file maker fields.
// Read the entire file as a string
$fp = fopen($Export_ImageBank", "r");
$file_buffer = fread($fp, filesize($Export_ImageBank));
fclose($fp);
// Convert DOS/Windows line breaks (\r\n) to UNIX line breaks (\n)
$file_buffer = str_replace("\r\n", "\n", $file_buffer);
// Convert MAC line breaks (\r) to UNIX line breaks (\n)
$file_buffer = str_replace("\r", "\n", $file_buffer);
// Break the string up into an arrray of lines
$file = explode("\n", $file_buffer);
// process each line in turn
foreach ($lines as $line_num => $line) {
// Unfilemaker each line (Vertical Tab --> \n), filemaker uses Vertical Tabs
// to represent line breaks inside fields, so we convert them to \n
$line = str_replace("\013", "\n", $line);
...
--
Travers Carter - Noggin - http://www.noggin.com.au/
--- End Message ---
--- Begin Message ---
hello,
i'm not very good with php and mysql, so this can look like a silly easy
question.
I have a mysql database named 'oh'. there are 20 tables under it.
Now, i want to retrieve 1 image and some text (8 to be exact), and store
them in a table with php-code.
I want to have 1 table with 3 column, and the first two are divided into 8
rows each.
1st column, 1st row, shows like this example : the boss :
2nd column, 1st row, shows : mr.Van dooren
3rd column is for image)
what i should retrieve from my table is the actual name of the field (boss),
the value of that field (mr.Van dooren) en one time an image.
How can i load them into such a table?
with this code, i can show 1 image. :os
<?php
$sql = @mysql_query("SELECT picture_right FROM info_general") or die
(mysql_error());
while($a_row = mysql_fetch_array($sql))
{
$img_1= $a_row["picture_right"];
}
mysql_close();
?>
<img src="<? echo($img_1); ?>">
Can someone help me please?
Mvg,
Gert Vonck
_________________________________________________________________
--- End Message ---
--- Begin Message ---
> I suggest if a file then put it outside Apache's document root or use an
> environment variable.
I'm working in a VWS environment - whilst I am in contact with the
system administrator, I don't have access to any config outside of my
own account.
> My older version of php is quite happy with 700 permissions, unless I've
> got this wrong. The owner is the Apache user.
Hrmm.. So if I got the ISP to chown the file me.webserver and then set
chmod 640, making sure that every user's PHP settings meant they
couldn't work with/read files outside their home directories, and all
other scripting systems were equally configured, or set to run SUID user
(Ie. Perl), this should render the file in question inaccessible to
other users excl. the webserver group and root?
--- End Message ---
--- Begin Message ---
on 22/03/03 4:18 AM, Jason Wong ([EMAIL PROTECTED]) wrote:
> Bottom line is if your site requires to login you should make it mandatory
> that the user enables cookies on their browser.
mandatory seems a little harsh... I haven't seen any bad side effects of
trans sid yet (granted, I haven't pushed it to the limits with javascript or
anything like that).
why can't the OP rely on cookies where available, and trans sid where not,
and offer an advisory that cookies are a preferred, supported, advised way
to login, rather than mandatory?
justin
--- End Message ---
--- Begin Message ---
On Saturday 22 March 2003 11:38, Justin French wrote:
> on 22/03/03 4:18 AM, Jason Wong ([EMAIL PROTECTED]) wrote:
> > Bottom line is if your site requires to login you should make it
> > mandatory that the user enables cookies on their browser.
>
> mandatory seems a little harsh... I haven't seen any bad side effects of
> trans sid yet (granted, I haven't pushed it to the limits with javascript
> or anything like that).
>
> why can't the OP rely on cookies where available, and trans sid where not,
> and offer an advisory that cookies are a preferred, supported, advised way
> to login, rather than mandatory?
According to the OP, using cookies did not work for some people. Someone
suggested using sessions, as I pointed out in my previous mail, sessions
still rely on the browser accepting them (unless you use trans sid). In tests
that we did quite a while ago (back in 4.0.6) we found that trans sid wasn't
100% reliable (fails in mid-session under some circumstances), this problem
may have been fixed since so YMMV.
My opinion is that it's a simpler and more direct approach to have a statement
like
"To login your browser must accept cookies"
rather than
"You can try to login without cookies, sometimes it may work, sometimes it
may fail, sometimes you may get logged out for no apparent reason, in these
cases please enable cookies on your browser"
:)
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
/usr/news/gotcha
*/
--- End Message ---
--- Begin Message ---
I usuallly use
if ( isset($_COOKIE["Name"]) ) {
.....
}
But if there have any output before this code I use
ob_start();
your output...
if ( isset($_COOKIE["Name"]) ) {
.....
}
ob_end_flush();
"Webmaster Mbt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi I'm trying to make a script that first figures out if a cookie is set,
if
> not,do this, if so, do that.
>
> Can I use:
>
> Isset($HTTP_COOKIE_VARS['nick'] or what should I use?
>
> EJB
>
>
--- End Message ---
--- Begin Message ---
Try
if ( isset($_SESSION['verified_user'])==1) {
...
}
or in main.php try to print out if there any variable or not?
<?PHP
session_start();
print_r($_SESSION['verified_user']);
?>
"Guru Geek" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I'm trying to use sessions for the first time.
>
> I have a log in script that gets the user to enter their name and
> password. Then the script compares the entered data to a database. If
> the entered data matches whats in the database then the user is granted
> access to the main php script.
>
> basically my code in the log in script is this:
>
> if ($user_data = = $database_data) {
> $_SESSION['verified_user']=1;
> header("Location:http://www.myserver.com/main.php");
> exit;
>
> The opening code in my main.php script is this:
> session_start();
> if ( isset($_SESSION['verified_user'])) {
> run the whole script
> }else {
> return to log in page
> exit;
> }
>
> Anyone care to clue me in as to why I'm always sent back to the log in
> page even when the log in is correct?
>
> Did I miss the session boat all together? Perhaps I'm not grasping it
> at all..
>
> Thanks,
> Roger
>
>
>
>
>
>
>
--- End Message ---
--- Begin Message ---
on 22/03/03 4:39 AM, Adam - ([EMAIL PROTECTED]) wrote:
> Just a thought about sessions, they still rely on cookies working, unless
> you pass the session id with every link on the page. If you set your
> php.ini file to automatically put the session id in ever link on your page,
> that's great, but what if you don't have access to the php.ini file which
> is common with shared hosting. I'v read somewhere that you can put a
> php.ini file with those settings in the current working directory and it
> will read in the settings from it. Is that true and would you have to put a
> copy of the ini file in every folder that you used in order for it to work??
That's sort-of right.
1. PHP would need to be compiled with enable trans sid first
2. You can override SOME php.ini values with a .htaccess file (placed in a
directory), but this is NOT a copy of the php.ini, it's a method of
overriding values. You'd also need your ISP to grant you permission to run
such files. They work from a certain directory down, so if you placed the
file in your doc root, it would apply recursivly down to each folder bewlow
it.
example:
<IfModule mod_php4.c>
php_flag register_globals off
php_flag magic_quotes_runtime on
php_flag magic_quotes_gpc on
</IfModule>
3. You can also override some php.ini values by using things like PHP's
ini_set() function in your scripts.
Justin
--- End Message ---
--- Begin Message ---
Hi,
So with the .htaccess you could enable trans sid. That's interesting to
know. I guess you could just use the session and have a session check to
require the person to have cookies. Most sites these days seem to require
it.. mail.yahoo.com does, if you try and login without cookies you'll get a
message. A lot of sites use the trans sid, because it makes it "work" if
the user doesn't have cookies.
Thanks for the info
Adam
At 03:00 PM 3/22/2003 +1100, Justin French wrote:
on 22/03/03 4:39 AM, Adam - ([EMAIL PROTECTED]) wrote:
> Just a thought about sessions, they still rely on cookies working, unless
> you pass the session id with every link on the page. If you set your
> php.ini file to automatically put the session id in ever link on your page,
> that's great, but what if you don't have access to the php.ini file which
> is common with shared hosting. I'v read somewhere that you can put a
> php.ini file with those settings in the current working directory and it
> will read in the settings from it. Is that true and would you have to put a
> copy of the ini file in every folder that you used in order for it to
work??
That's sort-of right.
1. PHP would need to be compiled with enable trans sid first
2. You can override SOME php.ini values with a .htaccess file (placed in a
directory), but this is NOT a copy of the php.ini, it's a method of
overriding values. You'd also need your ISP to grant you permission to run
such files. They work from a certain directory down, so if you placed the
file in your doc root, it would apply recursivly down to each folder bewlow
it.
example:
<IfModule mod_php4.c>
php_flag register_globals off
php_flag magic_quotes_runtime on
php_flag magic_quotes_gpc on
</IfModule>
3. You can also override some php.ini values by using things like PHP's
ini_set() function in your scripts.
Justin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I have a form that is passing a date variable, and a time variable. I will
be using these for a query, and will use the date function to do some
formatting on it.
now, I would like to idiot proof it a bit, but can't find any functions for
this (hoping something similar to is_numeric exists).
does anybody have any commands, or some code that would allow me to make
sure a variable is a valid date or time.
thanks,
Jeff
--- End Message ---
--- Begin Message ---
Hello,
Is there anyway to check these two things:
- If the server is an Unix server.
- If a command is available on the server.
For exemple, I need to test if the shell command unzip is avalaible to do:
exec("unzip ...something...") ;
So I can test if exec is available doing:
if(function_exists(exec)) {
...
}
But how to test if a shell command is available on the server and if the
server is an Unix-like server ?
Thanks.
--- End Message ---
--- Begin Message ---
put this in a .php file:
<?php phpinfo(); ?>
it'll tell you what OS, (usually)
check if safe mode is on.. if it's on then usually you can't "exec"
anything.
cheers,
- Sebastian
----- Original Message -----
From: "Vincent M." <[EMAIL PROTECTED]>
| Hello,
|
| Is there anyway to check these two things:
| - If the server is an Unix server.
| - If a command is available on the server.
|
| For exemple, I need to test if the shell command unzip is avalaible to do:
| exec("unzip ...something...") ;
| So I can test if exec is available doing:
| if(function_exists(exec)) {
| ...
| }
|
| But how to test if a shell command is available on the server and if the
| server is an Unix-like server ?
|
| Thanks.
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, visit: http://www.php.net/unsub.php
|
--- End Message ---
--- Begin Message ---
$my_data = "This is a really long string that could go on for ever and ever
and ever and ever and ever and ever and ever and ever and ever and ever and
ever and ever and ever and don't wrap to my table it makes it bigger";
echo $my_data;
How can I make this wrap to the table?
------
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
$my_data = wordwrap( $my_data, 50 );
http://www.php.net/manual/en/function.wordwrap.php
it'll wrap after 50 charcters... change "50" to what you want it to start
wrapping at. If $my_data is inside a <table> it should wrap the text
automatically unless you tell the table not to wrap ..
cheers,
- Sebastian
----- Original Message -----
From: "Philip J. Newman" <[EMAIL PROTECTED]>
| $my_data = "This is a really long string that could go on for ever and
ever
| and ever and ever and ever and ever and ever and ever and ever and ever
and
| ever and ever and ever and don't wrap to my table it makes it bigger";
|
| echo $my_data;
|
| How can I make this wrap to the table?
|
|
| ------
| Philip J. Newman.
| Head Developer
| [EMAIL PROTECTED]
|
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, visit: http://www.php.net/unsub.php
|
--- End Message ---
--- Begin Message ---
on 22/03/03 3:57 PM, Philip J. Newman ([EMAIL PROTECTED]) wrote:
> $my_data = "This is a really long string that could go on for ever and ever
> and ever and ever and ever and ever and ever and ever and ever and ever and
> ever and ever and ever and don't wrap to my table it makes it bigger";
>
> echo $my_data;
>
> How can I make this wrap to the table?
Errrrr:
<table width="330">
<tr><td><?=$my_data?></td></tr>
</table>
This text will wrap inside a table, according to every browser I've ever
used.
If you want to wrap for other purposes, eg email or raw text, then
$my_data = wordwrap($my_data,65);
will word-wrap at 65 characters, which is pretty pointless with variable
width fonts, but okay with fixed width fonts.
Justin
--- End Message ---
--- Begin Message ---
Hi Guys,
I want to create webservices using NUSoap + PHP. I have gone through NUSoap
Site at http://dietrich.ganx4.com/nusoap/faq.php but havenot found any thing
to start with. Can any body point me to some good examples + Manuals on the
matter.
PHP Webservices sounds promising and i think using NUSoap is the best
alternative at present. Does any one have better ideas ?
Thanks and Regards,
Nikunj Virani
--- End Message ---
--- Begin Message ---
Hello,
> Hi Guys,
>
> I want to create webservices using NUSoap + PHP. I have gone through
NUSoap
> Site at http://dietrich.ganx4.com/nusoap/faq.php but havenot found any
thing
> to start with. Can any body point me to some good examples + Manuals on
the
> matter.
>
> PHP Webservices sounds promising and i think using NUSoap is the best
> alternative at present. Does any one have better ideas ?
You will find our open source Krysalis platform interesting for PHP web
services.
http://www.interakt.ro/products/Krysalis/
You can also read my chapter for the Wrox (it's bancrupcy is a major
losss..) "Professional PHP Web Services" at
ftp://www.interakt.ro/pub/Krysalis/Professional%20web%20services%20with%20Kr
ysalis.pdf
We hope that this will give you a healthy start.
Krysalis does not include an API like (SOAPx4 or NuSOAP), but is based on
XML streaming and transformation, ans you will see an alternative of using
SOAP for other goals than RPC.
Alexandru
>
>
> Thanks and Regards,
> Nikunj Virani
--
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 411 2610
--- End Message ---
--- Begin Message ---
That is what I thought, but it isnt.. after doing some testing it seems to only do it
the first time the page is loaded in the session, if i hit refresh then the problem
doesnt occur.
is it possible that it has anything to do with the session_start and session_name
that is used at the top of the page before the ob_start is called?
> *guess* you're including the footer twice, or are calling ob_end_flush()
> more than once.....
>
> not anywhere near sure though!!
>
> Justin
>
> 21/03/03 11:33 PM, Mr Percival ([EMAIL PROTECTED]) wrote:
>
> > Hi,
> >
> > I have a page that has an include at the top of the page and an include at the
> > bottom of the page.
> >
> > in the top include file I have added the command:
> >
> > ob_start("ob_gzhandler");
> > in the bottom include I have added:
> >
> > ob_end_flush(); <-- i thought this was supposed to be run to clean up at the
> > end of the page.
> >
> > Most of the time everything is fine, but on occasions it will give an
> > "warning" error:
> >
> > Warning: ob_gzhandler() [ref.outcontrol]: output handler 'ob_gzhandler' cannot
> > be used twice in /blahblah/includes/bottom.inc on line 25
> >
> > line 25 is the line
> > ob_end_flush();
> >
> > I dont understand why it only comes up sometimes and what I am doing for that
> > to happen, can anyone help me?
> >
> > Thanks! :))
>
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
--- End Message ---
--- Begin Message ---
Hello,
I am just upgrading to mySQL 4. As per the recommendation at www.mysql.com I am
recompiling programs that link against the mysql client. When I try to compile
PHP-4.3.1 I get many many lines similar to:
/usr/lib/mysql/libmysqlclient.a(net.o): In function `net_request_file':
net.o(.text+0x918): multiple definition of `net_request_file'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x918): first defined here
/usr/lib/mysql/libmysqlclient.a(net.o): In function `my_net_init':
net.o(.text+0xa90): multiple definition of `my_net_init'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0xa90): first defined here
/usr/lib/mysql/libmysqlclient.a(net.o): In function `net_end':
net.o(.text+0xb68): multiple definition of `net_end'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0xb68): first defined here
/usr/lib/mysql/libmysqlclient.a(net.o): In function `net_clear':
net.o(.text+0xb8c): multiple definition of `net_clear'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0xb8c): first defined here
/usr/lib/mysql/libmysqlclient.a(net.o): In function `net_flush':
net.o(.text+0xbf8): multiple definition of `net_flush'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0xbf8): first defined here
/usr/lib/mysql/libmysqlclient.a(net.o): In function `my_net_write':
net.o(.text+0xc3c): multiple definition of `my_net_write'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0xc3c): first defined here
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1
What is going wrong? I did a make clean first. My current compiled PHP seems to be
working find and talked to the database but I am concerned that I am unable to
recompile PHP.
I've search the archives and google and have come up with nothing. Any help is
appriciated.
Thanks,
Serge.
--- End Message ---
--- Begin Message ---
hi guys i'm sure i've done this before but is it possible ?
i would like it to show up like this
define('CONSTANT','Hello $var');
$var = "Dan";
echo CONSTANT
--- End Message ---
--- Begin Message ---
Just try it :)
> -----Original Message-----
> From: Dan Rossi [mailto:[EMAIL PROTECTED]
> Sent: Samstag, 22. März 2003 08:09
> To: Php-General
> Subject: [PHP] variales within define constants
>
>
> hi guys i'm sure i've done this before but is it possible ?
>
> i would like it to show up like this
>
> define('CONSTANT','Hello $var');
>
> $var = "Dan";
>
> echo CONSTANT
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
"Gilberto Garcia Jr." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I´m a newbie on this class. But i´m getting this error.
can you post snippet of the code and exact error that you get?
rush
--
http://www.templatetamer.com/
--- End Message ---