RE: [PHP] Job Recruitment and Support Ticketing Appz

2005-02-05 Thread yangshiqi
Pls go to sourceforge or freshmeat.net.

 
Best regards,
Yang Shiqi
 
 
 

-Original Message-
From: Jason Paschal [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 05, 2005 3:53 AM
To: php-general@lists.php.net
Subject: [PHP] Job Recruitment and Support Ticketing Appz

A friend of mine is looking for one each of the following web appz:

1) Job Recruitment
A bundle of scripts that will allow someone to manage job listings and
accept applications online.

2) Online Support Ticketing 
Users submit issues, and they are resolved by the support team. 
Resolutions may be shared in a searchable knowledgebase.

Anyone know of any solid PHP projects that deal with these issues? 
Just didn't want to reinvent the wheel.

Thank you,
Jason

-- 
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] Problem with session

2005-02-05 Thread Thone
Hi,
  I don't know what I did it wrong but i can send any variable through 
seesion. I have something like this:
//page1.php
session_start();
$_SESSION['time_to_expire'] = time + ALIVE_TIME;

//page2.php
session_start();
print isset($_SESSION['time_to_expire']);
always get '0';
thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Trying to match two tables' data

2005-02-05 Thread Alp
Hi experts,

Here's the scenario:
- 3 lines of data is present in a table
- 2 lines of detail lines (corresponding to the above) are needed to be
entered into a second table

Result needed is:
table1line1table1line2table1line3 (as column headers)
table2line1table2line2table2line3 (as first line of detail)
table2line4table2line5table2line6 (as second line of detail)

I might be in a wrong approach in accomplising this and would highly
appreciate any corrections. In short, column header data is entered into a
table, then number of detail lines are obtained (in general, i.e. 2), the
display should show 2 lines of input boxes under each header text in the
browser for data entry into these detail lines.

Clear as mud? Its getting there for me slowly...

Thanks in advance.

Alp

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem with session

2005-02-05 Thread Greg Donald
On Sat, 05 Feb 2005 17:53:01 +0700, Thone <[EMAIL PROTECTED]> wrote:
> Hi,
>I don't know what I did it wrong but i can send any variable through
> seesion. I have something like this:
> //page1.php
> session_start();
> $_SESSION['time_to_expire'] = time + ALIVE_TIME;
> 
> //page2.php
> session_start();
> print isset($_SESSION['time_to_expire']);
> 
> always get '0';

How are you passing the session from one page to the next?  You can
pass it in the url or you can use transparent sessions (cookies).


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Php Problem Parsing or so I think

2005-02-05 Thread Carinus Carelse
I got a PHP program running in a Apache 2.0.52 webserver with PHP
4.3.10. The page is supposed to go to a predefined place and pick a raw
email file and use the exim command to forward it.   The PHP page is
contained in a link with certain variables when I define the variables
on the command line and then copy the exim command out of the PHP it
works perfectly with no problems but when I use the link to parse the
variables I get an error message in the browser Illegitimate format.  I
am including a copy of the link I click on to call the page below. I
wonder if someone on the list can may be help me.  Have I compiled PHP
wrong or is the code itself wrong. Or is there a better way to do the
below.

Thank you in advance
Carinus


 
http://localhost.domain.com/mailrelease/Release.php?id=1CwdBD-0002z8-1K&date=20050203&[EMAIL
 PROTECTED]



 Releasing  to all recipients 


 Releasing email messageto 
 


/var/www/html/spam/$date/$file");
  echo(" Message released ");
}
else
{
  echo("$file, $name, or $date is not legitimate format!\n");
}
?>




Re: [PHP] Problem with session

2005-02-05 Thread Thone
Greg Donald wrote:
On Sat, 05 Feb 2005 17:53:01 +0700, Thone <[EMAIL PROTECTED]> wrote:
Hi,
  I don't know what I did it wrong but i can send any variable through
seesion. I have something like this:
//page1.php
session_start();
$_SESSION['time_to_expire'] = time + ALIVE_TIME;
//page2.php
session_start();
print isset($_SESSION['time_to_expire']);
always get '0';

How are you passing the session from one page to the next?  You can
pass it in the url or you can use transparent sessions (cookies).

I would like to pass it through Cookie. But, I also tried to pass it by 
calling, using strip_tags(SID)

page2.php?PHPSESSID=
But the result is the same. I wonder whether I have to register 
PHPSESSID on the page2.php? or I can just pass PHPSESSID and call 
session_start().

Thank you.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] wait function

2005-02-05 Thread Alessandro Rosa
I would write down an efficient WAIT function.
The one I did was as follows:

function microdelay($delay) {
$UNUSED_PORT=31238;
@fsockopen("tcp://localhost",$UNUSED_PORT,$errno,$errstr,$delay);
}

But it does not seem to work well.

Any suggestion?

Regards

Alessandro


RE: [PHP] wait function

2005-02-05 Thread Mike
> I would write down an efficient WAIT function.
> The one I did was as follows:
> 
> function microdelay($delay) {
> $UNUSED_PORT=31238;
> @fsockopen("tcp://localhost",$UNUSED_PORT,$errno,$errstr,$delay);
> }
> 


Are you looking for something like sleep()?

http://us2.php.net/manual/en/function.sleep.php

-M

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] wait function

2005-02-05 Thread Jochem Maas
Mike wrote:
I would write down an efficient WAIT function.
The one I did was as follows:
function microdelay($delay) {
$UNUSED_PORT=31238;
@fsockopen("tcp://localhost",$UNUSED_PORT,$errno,$errstr,$delay);
}

Are you looking for something like sleep()?
http://us2.php.net/manual/en/function.sleep.php
and for microseconds, depending on your OS + PHP version you may have
access to this function:
http://us2.php.net/manual/en/function.usleep.php
-M
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] array_map in conjunction with user_call_func_array - inconsistency

2005-02-05 Thread Jochem Maas
so nobody has any idea? I checked the bug DB btw and couldn't find anything
Jochem Maas wrote:
listers,
I was playing around with call_user_func_array() and array_map() on
PHP 5.0.2 (cli) (built: Nov  9 2004 19:00:36) and noticed the that
calling call_user_func_array() on 'array_map' with more than 2 args
(i.e. more than just the name of the callback and array
argument that are required for 'array_map') then a numerically indexed 
array
is returned, where as with just the minimum 2 args the associative keys 
of array
are maintained:

question is have I missed something, am I doing something wrong or it this
a 'buglet'?
===
function array_map_assoc($callback, $arr)
{
$keys = array_keys($arr);
$args = func_get_args();
$arr = call_user_func_array("array_map", $args);
/* return the fixed array */
return $arr;
}
// couldn't figure out how else
// to use a single quote with php -r in a bash shell
$sq = chr(39);
// start array
$arr1 = array("name" => "\"{$sq}Testing{$sq}\"",
"email" => "\"Yadda{$sq}s \"YADDa\"\"");

$arr2 = array_map_assoc("strip_tags", $arr1);
$arr3 = array_map_assoc("htmlentities", $arr2, array( ENT_QUOTES, 
ENT_QUOTES ));
$arr4 = array_map_assoc("htmlentities", $arr2);
$arr5 = array_map_assoc("strip_tags", $arr1, array( "", "" ));

echo "-\n\n";
var_dump($arr1, $arr2, $arr3, $arr4, $arr5);
===
OUTPUTS ON MACHINE:
-
array(2) {
  ["name"]=>
  string(11) ""'Testing'""
  ["email"]=>
  string(63) ""Yadda's "YADDa"""
}
array(2) {
  ["name"]=>
  string(11) ""'Testing'""
  ["email"]=>
  string(17) ""Yadda's "YADDa"""
}
array(2) {
  [0]=>
  string(31) ""'Testing'""
  [1]=>
  string(42) ""Yadda's "YADDa"""
}
array(2) {
  ["name"]=>
  string(21) ""'Testing'""
  ["email"]=>
  string(37) ""Yadda's "YADDa"""
}
array(2) {
  [0]=>
  string(11) ""'Testing'""
  [1]=>
  string(17) ""Yadda's "YADDa"""
}


rgds,
Jochem
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Problems with PHP and MySQL

2005-02-05 Thread Sarah
Hi,
I'm relatively new to PHP, but have already written a few functional 
web-based scripts. I recently decided to implement a MySQL-based system, 
but hit the following problem...

I have PHP version 5.03, and MySQL v 4.19. I downloaded and compiled 
both, and both work perfectly alone. However, when I run a command-line 
app to manipulate my database, I get the following error:

__
[EMAIL PROTECTED]:~# ./useradmin -a -u unclebulgaria -p uberwomble
constructor called
Fatal error: Call to undefined function mysql_connect() in 
veep/useradmin on line 16

Fatal error: Call to undefined function mysql_close() in /veep/useradmin 
on line 22
[EMAIL PROTECTED]:~#
__

You might think 'Aah! the doofus has forgotten to link MySQL into the 
compiled PHP interpreter'.

However, my phpinfo() page gives the following information:
__
Configure command:
'./configure' '--with-apxs2=/opt/apache/sbin/apxs' '--prefix=/usr' 
'--sysconfdir=/etc/php5' '--with-dba' '--with-db4' '--with-auth' 
'--with-zlib' '--with-tiff' '--with-jpeg' '--with-mysql=/usr'
__

And...
__
MySQL-related data:
mysql
MySQL Support   enabled
Active Persistent Links 0
Active Links0
Client API version  4.1.9
MYSQL_MODULE_TYPE   external
MYSQL_SOCKET/tmp/mysql.sock
MYSQL_INCLUDE   -I/usr/include/mysql
MYSQL_LIBS  -L/usr/lib -lmysqlclient
Directive   Local Value Master Value
mysql.allow_persistent  On  On
mysql.connect_timeout   60  60
mysql.default_host  localhost   localhost
mysql.default_password  wurms   wurms
mysql.default_port  33063306
mysql.default_socketno valueno value
mysql.default_user  wiggly  wiggly
mysql.max_links Unlimited   Unlimited
mysql.max_persistentUnlimited   Unlimited
mysql.trace_modeOff Off
_
Finally, the client program is:
_
#!/usr/bin/php

class UserDB
{
static $user='wiggly';
static $pass='wurms';
static $db='multimedia_access';
private $m_link;
private $m_live;
function __construct()
{
print("constructor called\n");
$this->m_link = mysql_connect('localhost', self::$user, 
self::$pass);
$this->m_live = mysql_select_db(self::db);
}
function __destruct()
{
mysql_close($this->m_link);
print("destructor called");
}
	function Add($u, $p)
	{
		$H = md5($u, true);
		// $R = mysql_query("INSERT INTO users (userkey, user, password) 
values ($H, $u, $p)", $this->m_link);
		$S = mysql_real_escape_string("INSERT INTO users (userkey, user, 
password) values ('$H', '$u', '$p')", $this->m_link);
		$R = mysql_query($S, $this->m_link);
		if (!$R)
		{
			printf("SQL query error during Add operation\n");
		}
		return $R;
	}

function Delete($u)
{
$H=md5($u, true);
$R=mysql_query("DELETE FROM users WHERE userkey=$H");
if ($R)
{
$R=mysql_query("DELETE FROM iplist WHERE userkey=$H");
}
if (!$R)
{
printf("SQL query error during Add operation\n");
}
return $R;
}
function Replace($u, $p)
{
return 0;
}
function Tabulate()
{
$R=mysql_query("SELECT user,password FROM TABLE users");
if (!$R)
{
printf("SQL query error during List operation\n");
}
$N=mysql_num_rows($R);
if ($N > 0)
{
while($Row = mysql_fetch_row($R))
{
foreach($Row as $K => $V)
{
$Col = mysql_field_name($R ,$K);
printf("%s='%s', ", $Col, $V);
}
printf("\n");
}
}
return $R;
}
}
function Usage($text)
{
	printf("useradmin:\n\tuseradmin (-a|-d|-r) -u  -p 
\n\n");
	printf("\t-a - add given user.\n");
	printf("\t-d - delete given user.\n");
	printf("\t-r - replace given user.\n");
	printf("\t-l -

[PHP] RE: wait function

2005-02-05 Thread Alessandro Rosa
Yes, guys, SLEEP was what I was looking for.
I took up the code I showed before from such a
php site, but it did work on a linux server anyway.

I would try the alternative of SLEEP: I was not
so much aware of it.

Yours,

Alessandro





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] $_SERVER['REQUEST_URI'] being trimmed

2005-02-05 Thread Verdon Vaillancourt
On 3-Feb-05, at 3:46 PM, Richard Lynch wrote:
Your very problem is that you are NOT encoding the URL data, so the
browser is trying to do it for you, only it can't be sure whether & is
supposed to be data or is supposed to separate your URL arguments.
http://php.net/urlencode
Thanks for the tip re urlencode(). I had tried that before I posted, 
but I was doing it at the wrong side of the process. I was using it in 
my switch file on the referrer being returned to location: instead of 
on the link I was passing to my switch file. When I changed my link 
to...

French

...the problem was fixed. DOH!

You may also want to just include the switch.php whenever 
userLangChoice
is set in the URL:

--- langchoic.inc -

You can simply:  on every page or in a
globals file you already include, and then you're not wasting a bunch 
of
HTTP connections bouncing around with the header or worrying about your
URL getting munged.

French";
  echo "English";
?>
I tried a few quick tests with this method and variations of it. I 
could get it to set a cookie like '[en] => ' or '[fr] => ' but I could 
not get it to set a cookie like '[userLang] => en'. Even if I worked 
that out though, there is a disadvantage to this approach, in that 
(AFAIK) the page has to be refreshed before the server will be aware of 
the new cookie value on the client, not desirable in this situation 
where I'm offering bilingual content.

My thoughts in using the switch.php file was to set the cookie, make 
the server aware of it so it can deliver appropriate content, and 
return to the URL intact at the end of the process, without any new 
vars in it.

With your reminder about urlencode, this is all playing nicely now.
Thanks,
verdon

Verdon Vaillancourt wrote:
I am trying to build a simple mechanism to allow visitors to set a 
site
preference (stored in a cookie) by clicking on a link. I want the
cookie set and the original page reloaded with the new cookie set, 
when
a visitor clicks on the link.

My link looks like this...
French
My file switch.php looks like this...

setcookie("userLang", $userLangChoice);
 if ($sender == "")
$sender = "index.php";
 else
$sender = "$sender";
  header("location:".$sender);
?>
Now, for the most part this works fine, but in some cases, my 
referring
URL ($sender) is being truncated. Simple URLs such as
'/listingsearch.php?Category%5B%5D=Hunting' work fine, although it is
being returned as '/listingsearch.php?Category[]=Hunting'. More 
complex
URLs like
'/listingsearch.php?
Accommodation%5B%5D=Outpost&Category%5B%5D=Fishing&Region%5B%5D=North-
West' are being truncated at the first variable down to
'/listingsearch.php?Accommodation[]=Outpost'

Is there something I can do to make sure the referring URL is not
truncated and it would also be nice if it was left alone and not
encoded or decoded.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problems with PHP and MySQL

2005-02-05 Thread Jochem Maas
Sarah wrote:
Hi,
I'm relatively new to PHP, but have already written a few functional 
web-based scripts. I recently decided to implement a MySQL-based system, 
but hit the following problem...

I have PHP version 5.03, and MySQL v 4.19. I downloaded and compiled 
both, and both work perfectly alone. However, when I run a command-line 
app to manipulate my database, I get the following error:

__
[EMAIL PROTECTED]:~# ./useradmin -a -u unclebulgaria -p uberwomble
constructor called
Fatal error: Call to undefined function mysql_connect() in 
veep/useradmin on line 16

Fatal error: Call to undefined function mysql_close() in /veep/useradmin 
on line 22
[EMAIL PROTECTED]:~#
__

I _think_, given the version of MySQL you are using, you should compile in
and use the mysqli extension iso of the mysql extension.
 ^!
these to links may help you:
http://www.zend.com/php5/articles/php5-mysqli.php
http://be.php.net/mysqli
failing that you might want to check this page for an overview of funcs you
can use to determine exactly what is available, with more accuracy than 
phpinfo()
e.g.:
var_dump( extension_loaded("mysql"),
  extension_loaded("mysqli"),
  get_loaded_extensions(),
  get_extension_funcs ("mysql"),
  get_extension_funcs ("mysqli") );   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] correction to my previous mail

2005-02-05 Thread Sasidhar Kalagara
hi Geeks!!!

   I am sorry that there are some changes to my previous mail to the group.

As of my prev mail, It is OU Eng College event and LUG, Hyd is only
Supporting for the event Voluntarily. we are in no way sponsoring for
the event.

OU Eng college Students are conducting their annual techfest and in
which they had an event called LUG Festival on 19th of February. they
had asked for the speakers from LUG, Hyderabad and some of our luggies
are voluntarily supporting the event with some sessions and workshops.

They need  a session on LAMP and so if  the members of this group can
support us with ur  voluntary participation that wld be of great help
for the students particpating in the event.

regards
sasi

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Connecting To Multiple MySQL Databases

2005-02-05 Thread NathanielGuy#21
Worked like a charm, thanks!
--nathan


On Thu, 03 Feb 2005 20:33:17 -0700, Dan Trainor <[EMAIL PROTECTED]> wrote:
> NathanielGuy#21 wrote:
> > I know this may be slightly off topic for a PHP listserv but I cant
> > find my answer anywhere else.  I start off generating a page connected
> > to one database as a certain user and I call a script that requires a
> > connection to a second database as a different user.  Is there any way
> > I could open that connection while maintaining the current one aswell?
> >  The connection of the script is opend and closed before any more of
> > the other page is generated.  Im not sure how to go about solving this
> > problem other than rewriting my script.  Any ideas?
> >
> > --nathan
> >
> 
> I'm a bit new myself, but why not call the resources seperate names?
> 
> $sql1 = mysql_connect($host1, $user1, $pass1);
> 
> $sql2 = mysql_connect($host2, $user2, $pass2);
> 
> Hope that helps
> -dant
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
http://www.blacknute.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problems with PHP and MySQL

2005-02-05 Thread Bruce Douglas
disregard if you've already done this...

you might want to do a quick php app with phpinfo, to determine if/what version 
of mysql php sees.. it's quite possible that php isn't seeing/interfacing with 
mysql. 

php needs to not only be built with a version of mysql, but the php.ini file 
also needs to be setup correctly.

-bruce


-Original Message-
From: Jochem Maas <[EMAIL PROTECTED]>
Sent: Feb 5, 2005 8:46 AM
To: Sarah <[EMAIL PROTECTED]>
Cc: php-general@lists.php.net
Subject: Re: [PHP] Problems with PHP and MySQL

Sarah wrote:
> Hi,
> 
> I'm relatively new to PHP, but have already written a few functional 
> web-based scripts. I recently decided to implement a MySQL-based system, 
> but hit the following problem...
> 
> I have PHP version 5.03, and MySQL v 4.19. I downloaded and compiled 
> both, and both work perfectly alone. However, when I run a command-line 
> app to manipulate my database, I get the following error:
> 
> __
> [EMAIL PROTECTED]:~# ./useradmin -a -u unclebulgaria -p uberwomble
> constructor called
> 
> Fatal error: Call to undefined function mysql_connect() in 
> veep/useradmin on line 16
> 
> Fatal error: Call to undefined function mysql_close() in /veep/useradmin 
> on line 22
> [EMAIL PROTECTED]:~#
> __
> 

I _think_, given the version of MySQL you are using, you should compile in
and use the mysqli extension iso of the mysql extension.
 ^!

these to links may help you:

http://www.zend.com/php5/articles/php5-mysqli.php
http://be.php.net/mysqli

failing that you might want to check this page for an overview of funcs you
can use to determine exactly what is available, with more accuracy than 
phpinfo()
e.g.:

var_dump( extension_loaded("mysql"),
  extension_loaded("mysqli"),
  get_loaded_extensions(),
  get_extension_funcs ("mysql"),
  get_extension_funcs ("mysqli") ); 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Trying to match two tables' data - Resolved (for now at least)

2005-02-05 Thread Alp
I have solved it through a sort of nested loop.

print '';

$x = 0;
while ($x < $colcnt) {
 $coltitle = mysql_result($prccols,$x,"colhdr");
 print ''.$coltitle.'';
 $x++;
 }

print '';
$i = 1;
while ($i <= $pricing_details) {
 print '';
 $c=0;
 while ($c < $colcnt) {
  print '';
  print '';
  print '';
  print '';
  print '';
  print '';
  $c++;
  }
 Print '';
 $i++;
 }
print '';

Thanks anyway.

Alp

"Alp" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi experts,
>
> Here's the scenario:
> - 3 lines of data is present in a table
> - 2 lines of detail lines (corresponding to the above) are needed to be
> entered into a second table
>
> Result needed is:
> table1line1table1line2table1line3 (as column headers)
> table2line1table2line2table2line3 (as first line of detail)
> table2line4table2line5table2line6 (as second line of detail)
>
> I might be in a wrong approach in accomplising this and would highly
> appreciate any corrections. In short, column header data is entered into a
> table, then number of detail lines are obtained (in general, i.e. 2), the
> display should show 2 lines of input boxes under each header text in the
> browser for data entry into these detail lines.
>
> Clear as mud? Its getting there for me slowly...
>
> Thanks in advance.
>
> Alp

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problems with PHP and MySQL

2005-02-05 Thread Bruce Douglas
sarah...

rather than deal with classes/objs... (at least initially)

just create a simple php/mysql app that sets up the user/passwd/host for the 
db, and see if you can do a successful mysql_connect check the return/error 
codes to see if the call/code works

this will quickly tell you if you actually have php/mysql setup properly...

once you've done this... you can get into the guts of your app, to determine 
where the prob is

-bruce


-Original Message-
From: Sarah <[EMAIL PROTECTED]>
Sent: Feb 5, 2005 7:41 AM
To: php-general@lists.php.net
Subject: [PHP] Problems with PHP and MySQL

Hi,

I'm relatively new to PHP, but have already written a few functional 
web-based scripts. I recently decided to implement a MySQL-based system, 
but hit the following problem...

I have PHP version 5.03, and MySQL v 4.19. I downloaded and compiled 
both, and both work perfectly alone. However, when I run a command-line 
app to manipulate my database, I get the following error:

__
[EMAIL PROTECTED]:~# ./useradmin -a -u unclebulgaria -p uberwomble
constructor called

Fatal error: Call to undefined function mysql_connect() in 
veep/useradmin on line 16

Fatal error: Call to undefined function mysql_close() in /veep/useradmin 
on line 22
[EMAIL PROTECTED]:~#
__


You might think 'Aah! the doofus has forgotten to link MySQL into the 
compiled PHP interpreter'.

However, my phpinfo() page gives the following information:

__
Configure command:

'./configure' '--with-apxs2=/opt/apache/sbin/apxs' '--prefix=/usr' 
'--sysconfdir=/etc/php5' '--with-dba' '--with-db4' '--with-auth' 
'--with-zlib' '--with-tiff' '--with-jpeg' '--with-mysql=/usr'
__

And...

__

MySQL-related data:

mysql
MySQL Support   enabled
Active Persistent Links 0
Active Links0
Client API version  4.1.9
MYSQL_MODULE_TYPE   external
MYSQL_SOCKET/tmp/mysql.sock
MYSQL_INCLUDE   -I/usr/include/mysql
MYSQL_LIBS  -L/usr/lib -lmysqlclient

Directive   Local Value Master Value
mysql.allow_persistent  On  On
mysql.connect_timeout   60  60
mysql.default_host  localhost   localhost
mysql.default_password  wurms   wurms
mysql.default_port  33063306
mysql.default_socketno valueno value
mysql.default_user  wiggly  wiggly
mysql.max_links Unlimited   Unlimited
mysql.max_persistentUnlimited   Unlimited
mysql.trace_modeOff Off
_


Finally, the client program is:

_

#!/usr/bin/php
m_link = mysql_connect('localhost', self::$user, 
self::$pass);
$this->m_live = mysql_select_db(self::db);
}

function __destruct()
{
mysql_close($this->m_link);
print("destructor called");
}

function Add($u, $p)
{
$H = md5($u, true);
// $R = mysql_query("INSERT INTO users (userkey, user, 
password) 
values ($H, $u, $p)", $this->m_link);
$S = mysql_real_escape_string("INSERT INTO users (userkey, 
user, 
password) values ('$H', '$u', '$p')", $this->m_link);
$R = mysql_query($S, $this->m_link);
if (!$R)
{
printf("SQL query error during Add operation\n");
}
return $R;
}

function Delete($u)
{
$H=md5($u, true);
$R=mysql_query("DELETE FROM users WHERE userkey=$H");
if ($R)
{
$R=mysql_query("DELETE FROM iplist WHERE userkey=$H");
}
if (!$R)
{
printf("SQL query error during Add operation\n");
}
return $R;
}

function Replace($u, $p)
{
return 0;
}

function Tabulate()
{
$R=mysql_query("SELECT user,password FROM TABLE users");
if (!$R)
{
printf("SQL query error during List operation\n");
}

$N=mysql_num_rows($R);

if ($N > 0)
{
while($Row = mysql_fetch_row($R))
{
foreach($Row as $K => $V)
{
   

Re: [PHP] Connecting To Multiple MySQL Databases

2005-02-05 Thread Tony Di Croce
OK... Here's a slightly different, but related question...

Can database connection resources be serialiazed and re-used in a
different script invocation? For example, can I open a DB connection,
assign it to a $_SESSION[] variable and then later use it on a
different page? Somehow, I doubt it...


On Sat, 5 Feb 2005 11:34:01 -0600, NathanielGuy#21 <[EMAIL PROTECTED]> wrote:
> Worked like a charm, thanks!
> --nathan
> 
> 
> On Thu, 03 Feb 2005 20:33:17 -0700, Dan Trainor <[EMAIL PROTECTED]> wrote:
> > NathanielGuy#21 wrote:
> > > I know this may be slightly off topic for a PHP listserv but I cant
> > > find my answer anywhere else.  I start off generating a page connected
> > > to one database as a certain user and I call a script that requires a
> > > connection to a second database as a different user.  Is there any way
> > > I could open that connection while maintaining the current one aswell?
> > >  The connection of the script is opend and closed before any more of
> > > the other page is generated.  Im not sure how to go about solving this
> > > problem other than rewriting my script.  Any ideas?
> > >
> > > --nathan
> > >
> >
> > I'm a bit new myself, but why not call the resources seperate names?
> >
> > $sql1 = mysql_connect($host1, $user1, $pass1);
> >
> > $sql2 = mysql_connect($host2, $user2, $pass2);
> >
> > Hope that helps
> > -dant
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> --
> http://www.blacknute.com/
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
Send REAL USPS letters from the Web!
http://www.quickymail.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Connecting To Multiple MySQL Databases

2005-02-05 Thread John Holmes
Tony Di Croce wrote:
OK... Here's a slightly different, but related question...
Can database connection resources be serialiazed and re-used in a
different script invocation? For example, can I open a DB connection,
assign it to a $_SESSION[] variable and then later use it on a
different page? Somehow, I doubt it...
No. The connection is automatically closed at the end of the script if 
you don't do it yourself.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Where's xml in PHP5?

2005-02-05 Thread Brian V Bonini
Just compiled PHP5 usign --enable-xml (though I see it is supposed to be
enabled by defaut however I'm getting 'call to undefined function'
errors now.

Fatal error: Call to undefined function xml_parser_create() in
bla/bla/bla on line xxx

phpinfo(): http://gfx-design.com/test/

Apache is 2.x

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [suspicious - maybe spam] Re: [PHP] Re: mcrypt public and private key

2005-02-05 Thread Daniel Bowett
Richard Lynch wrote:
Daniel Bowett wrote:
Marek Kilimajer wrote:
Daniel Bowett wrote:

Hi,
I have been reading up on the mcrypt function. Is it possible to use
it with a public and private key pair or just with a single key?
Cheers.
mcrypt supports only single key
Is there anything out there that supports public/private key other than
using gpg through the command line?

http://php.net/ssh2 MIGHT have what you need...
This isn't really what I am after. I need to store some data encrypted 
in a database on a web server and then later download it and decrypt it. 
Hence why I think a public/private key is more secure.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problems with PHP and MySQL

2005-02-05 Thread Sarah
Fixed. It was a combination of the commandline version of PHP 503 not 
building by default, *and* my having to use the 'mysqli' interface as 
you suggested. The object interface to mysql works quite nicely.

Many thanks,
Sarah
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Global and Local include_path settings

2005-02-05 Thread John Nichel
Hey, I'm running a box which hosts quite a few virtual hosts, and I want 
to configure it to where all vhosts have access to a global include 
directory (for things like PEAR and Smarty), as well as access to a 
local include directory for each virtual host.  My current config has me 
setting paths like this inside of each vhost directive in Apache

php_value include_path ".:/path/to/global:/path/to/local"
What I'm wondering is if anyone knows of a way to set the global path in 
one location, and 'append' the local path in the vhosts directive.  Kind 
of like on a *nix system where I can set a global path once...

PATH=/usr/bin
And append to that somewhere else on the system
PATH=$PATH:/usr/local/bin
I've tried setting the global path in the php.ini, and the local path in 
both the httpd.conf and .htaccess file, but both of those overwrite the 
global path, and since PHP values do not exist outside of php, I can't 
set it like above.

Not really a problem if there isn't a way to do it dynamically...it 
would just be nice to 'centralize' my global include.  TIA

--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Global and Local include_path settings

2005-02-05 Thread Jason Wong
On Sunday 06 February 2005 07:27, John Nichel wrote:
> Hey, I'm running a box which hosts quite a few virtual hosts, and I
> want to configure it to where all vhosts have access to a global
> include directory (for things like PEAR and Smarty), as well as access
> to a local include directory for each virtual host.  My current config
> has me setting paths like this inside of each vhost directive in
> Apache
>
> php_value include_path ".:/path/to/global:/path/to/local"
>
> What I'm wondering is if anyone knows of a way to set the global path
> in one location, and 'append' the local path in the vhosts directive. 

One method (not sure whether it's the best or most efficient) is to use an 
auto_prepend_file to set the local component(s) of the path.

-- 
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
--
New Year Resolution: Ignore top posted posts

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Global and Local include_path settings

2005-02-05 Thread John Nichel
Jason Wong wrote:
On Sunday 06 February 2005 07:27, John Nichel wrote:
Hey, I'm running a box which hosts quite a few virtual hosts, and I
want to configure it to where all vhosts have access to a global
include directory (for things like PEAR and Smarty), as well as access
to a local include directory for each virtual host.  My current config
has me setting paths like this inside of each vhost directive in
Apache
php_value include_path ".:/path/to/global:/path/to/local"
What I'm wondering is if anyone knows of a way to set the global path
in one location, and 'append' the local path in the vhosts directive. 

One method (not sure whether it's the best or most efficient) is to use an 
auto_prepend_file to set the local component(s) of the path.

Yeah, I was thinking about that route, but just as I was reading your 
response, I thought up a new 'problem' for myself.  Even if I set it in 
the httpd.conf, a .htaccess, or in a file that I auto_prepend, if the 
end user on one of the vhosts uses the ini_set(), it will be 
overwritten.  I could turn off the ability for users to set a local 
include path, but I'd like to give them as much *freedom* as possible. 
It's not an issue at the moment, since I'm the only one who does any php 
code on the box (I have a 'designer' who helps me out from time to time, 
but he doesn't mess with any PHP), but sooner or later, I'm probably 
going to pick up a customer who wants to handle his/her own code.  I 
guess if I'm feeling really brave, I could brush up on my C code, and 
modify the source so that ini_set() will append, and not overwrite the 
include path.

--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] about watermark

2005-02-05 Thread yangshiqi
Does anyone can recommend some app about watermark(open source)?

Coz I want to use it in our production, so I must use sth which is certified
very safely and fast.

Thx.

 

Best regards,

Yang Shiqi

 

 

 

 



Re: [PHP] Problem with session

2005-02-05 Thread Theeraputh Mekathikom
I found the problem. I have passed SID using GET and then using 
session_id($_GET['sid']);, it works fine.
But it seems that I cannot use cookie at all. I tried to set cookie 
manually, setcookie();. Nothing happen, I cannot
retrive my variable using $_COOKIE['sid'];. Is there anyway to check 
cookie enabling? My web browser
seems to be ok since I can accept cookies from other site. I do wonder 
whether that it is because the server PHP
configuration.

Best Regards,
Thone
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] about watermark

2005-02-05 Thread daniel
i am pretty sure GD can watermark ?

> Does anyone can recommend some app about watermark(open source)?
>
> Coz I want to use it in our production, so I must use sth which is
> certified very safely and fast.
>
> Thx.
>
>
>
> Best regards,
>
> Yang Shiqi
>
>
>
>
>
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Problem with session

2005-02-05 Thread yangshiqi
Make sure that in your php.ini, include this:
variables_order = "GPC"
gpc_order = "GPC"

there C means $_COOKIES

 
Best regards,
Yang Shiqi
 
 
 

-Original Message-
From: Theeraputh Mekathikom [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 06, 2005 2:52 PM
To: yangshiqi
Cc: php-general@lists.php.net
Subject: Re: [PHP] Problem with session

I found the problem. I have passed SID using GET and then using 
session_id($_GET['sid']);, it works fine.
But it seems that I cannot use cookie at all. I tried to set cookie 
manually, setcookie();. Nothing happen, I cannot
retrive my variable using $_COOKIE['sid'];. Is there anyway to check 
cookie enabling? My web browser
seems to be ok since I can accept cookies from other site. I do wonder 
whether that it is because the server PHP
configuration.

Best Regards,
Thone

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php