Re: [PHP] Changing maximum upload file size

2004-05-23 Thread Rachel Rodriguez

--- Matt Palermo <[EMAIL PROTECTED]> wrote:
> Does this allow you to work with larger files than
> the maximum specified in
> the php.ini or just smaller ones?
> 
> Thanks,
> 
> Matt Palermo
> http://sweetphp.com

The max specified in the php.ini are the largest size
you can upload regardless of what you specify
elsewhere in a script.

http://us3.php.net/manual/en/configuration.directives.php?PHPSESSID=784345a22e754c39b9a843d0dd0b6229#ini.upload-max-filesize

The attribute MAX_FILE_SIZE in your form, regardless
of what you set it to, would not override the settings
in php.ini.  To answer your question then, the
attribute set in your form would only allow for file
uploads of sizes equal to or less than the
upload_max_filesize setting in your php.ini file.

=
~Rachel




__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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



Re: [PHP] Changing maximum upload file size

2004-05-23 Thread Matt Palermo
Does this allow you to work with larger files than the maximum specified in
the php.ini or just smaller ones?

Thanks,

Matt Palermo
http://sweetphp.com


"Rachel Rodriguez" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> --- Matt Palermo <[EMAIL PROTECTED]> wrote:
> > Is there a way to change the maximum file upload
> > size in a PHP script?  Kind
> > of like the way you can change the error reporting
> > in a script, but I just
> > want to adjust the max file upload size.  Does
> > anyone know if this can be
> > done?
>
> The PHP manual mentions just such a thing using the
> attribute MAX_FILE_SIZE in your form:
>
> http://us4.php.net/features.file-upload
>
> For server-wide limitiations, you'd need to
> additionally modify your php.ini file.
>
>
> =
> ~Rachel
>
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Domains - Claim yours for only $14.70/year
> http://smallbusiness.promotions.yahoo.com/offer

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



Re: [PHP] Changing maximum upload file size

2004-05-23 Thread Rachel Rodriguez

--- Matt Palermo <[EMAIL PROTECTED]> wrote:
> Is there a way to change the maximum file upload
> size in a PHP script?  Kind
> of like the way you can change the error reporting
> in a script, but I just
> want to adjust the max file upload size.  Does
> anyone know if this can be
> done?

The PHP manual mentions just such a thing using the
attribute MAX_FILE_SIZE in your form: 

http://us4.php.net/features.file-upload

For server-wide limitiations, you'd need to
additionally modify your php.ini file.


=
~Rachel




__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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



[PHP] Changing maximum upload file size

2004-05-23 Thread Matt Palermo
Is there a way to change the maximum file upload size in a PHP script?  Kind
of like the way you can change the error reporting in a script, but I just
want to adjust the max file upload size.  Does anyone know if this can be
done?

Thanks,

Matt Palermo
http://sweetphp.com

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



Re: [PHP] Help w/ PHP Sessions

2004-05-23 Thread Curt Zirzow
* Thus wrote Justin Kozuch ([EMAIL PROTECTED]):
> Hi All,
> 
> ...
> 
> Here is the code that I have on the login form, called index.php
> 
> 
>  mysql_select_db($database_verspeeten, $verspeeten);
> $query_rs_authlevel = "SELECT tbl_users.id_authlevel FROM tbl_users";
> $rs_authlevel = mysql_query($query_rs_authlevel, $verspeeten) or 
> die(mysql_error());
> $row_rs_authlevel = mysql_fetch_assoc($rs_authlevel);
> $totalRows_rs_authlevel = mysql_num_rows($rs_authlevel);

I'm not exactly sure why this is all here, besides there
potentially being more than one row, it's never used again.


> ?>
>  // *** Register the variable named id_authlevel
> session_start();

Luckily php is nice and doesn't consider the you're php/html break
above should have had a carriage return sent.


> session_register("id_authlevel");

Is register globals on?  this will only work if it is on.

> $id_authlevel = "id_authlevel";

Again, not entirely sure what this is for. I'm assuming you're
really wanting to do something with your $rs_authlevel here. But
I'm not entirely sure what that would be.

> 
> $loginFormAction = $_SERVER['PHP_SELF'];
> if (isset($accesscheck)) {

Where is $accesscheck comming from?


>   $GLOBALS['PrevUrl'] = $accesscheck;
>   session_register('PrevUrl');
>
> ...
> 
>   if (isset($_SESSION['PrevUrl']) && false) {

Using $_SESSION, leads me to believe you havn't read the manual
page about session_register(). Excpecially the parts with the
bolded 'Warning'.



>   $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
> }
> header("Location: " . $MM_redirectLoginSuccess );
>   }
>   else {
> header("Location: ". $MM_redirectLoginFailed );

The script wont end with these header() calls; it will continue on
and send the form to the client.  If you have any session stuff
pass this point it will be executed as well.


>   }
> }
>
> ...
> 
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml";>
> 
> 
> .:. Verspeeten Computer Systems - Help Desk Mainframe .:.
> 
> 
> 
> 
>  if ($id_authlevel == 1) {
>echo "admin";
> } elseif ($id_authlevel == 2) {
>echo "manager";
> } elseif ($id_authlevel == 3) {
>echo "tech";
> }
> ?>

- No session_start()
- is register globals on?
- are you mixing $_SESSION and session_register() together?
- If your sessions do work $id_authlevel will be none of those
  values but "id_authlevel"



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] mySQL table output...

2004-05-23 Thread Rachel Rodriguez
My apologies, I accidentally clicked some key
combination in Yahoo that sent off my message before I
finished.  Here we go again:

while ($row = mysql_fetch_array($sql_result))
{
$col_1 = $row['column1'];
$col_2 = $row['column2'];
$col_3 = $row['column3'];
$val_1 = $row['value1'];
// and so on, you get the idea
}

I won't write out all of the HTML you'll need for
creating your , but if you can manage that
yourself, then the only thing else you need to do is
insert the following into the  cells:

 // and so on for each value

I have seen many instances where PHP coders wish to
include the HTML structure in the while loop itself. 
That is just as well and will certainly make the task
of creating each row of the table much easier.  

I separated the HTML from the while loop to
(hopefully) explain things more clearly in case you're
using a 3rd party product (such as Dreamweaver) to
generate your table and simply need to know how to
insert your PHP values into it.

--- Rachel Rodriguez <[EMAIL PROTECTED]>
wrote:
> 
> --- Russell P Jones <[EMAIL PROTECTED]> wrote:
> > I just want to print out a table from mySQL. Thats
> > it. into an html table.
> > 
> > Column 1 |  Col 2 | Col 3
> > -
> > Val 1|  val 2 | val 3
> > Val 4|  val 5 | val 6
> > 
> > 
> > any ideas on how to do this?
> 
> Sure, this is a fairly common thing to do.  Use a
> while loop.
> 
> while ($row = mysql_fetch_array($result))
> {
> 
> > 
> > Russ Jones
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php
> > 
> 
> 
> =
> ~Rachel
> 
> 
>   
>   
> __
> Do you Yahoo!?
> Yahoo! Domains – Claim yours for only
$14.70/year
> http://smallbusiness.promotions.yahoo.com/offer 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
~Rachel




__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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



Re: [PHP] mySQL table output...

2004-05-23 Thread Rachel Rodriguez

--- Russell P Jones <[EMAIL PROTECTED]> wrote:
> I just want to print out a table from mySQL. Thats
> it. into an html table.
> 
> Column 1 |  Col 2 | Col 3
> -
> Val 1|  val 2 | val 3
> Val 4|  val 5 | val 6
> 
> 
> any ideas on how to do this?

Sure, this is a fairly common thing to do.  Use a
while loop.

while ($row = mysql_fetch_array($result))
{

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


=
~Rachel




__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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



[PHP] mySQL table output...

2004-05-23 Thread Russell P Jones
I just want to print out a table from mySQL. Thats it. into an html table.

Column 1 |  Col 2 | Col 3
-
Val 1|  val 2 | val 3
Val 4|  val 5 | val 6


any ideas on how to do this?

Russ Jones

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



[PHP] Help w/ PHP Sessions

2004-05-23 Thread Justin Kozuch
Hi All,
I am creating an admin panel for a client, and part of the panel uses a 
menu system that, depending on the logged-in user's authorization level, 
displays certain menu items.

Here is the code that I have on the login form, called index.php


mysql_select_db($database_verspeeten, $verspeeten);
$query_rs_authlevel = "SELECT tbl_users.id_authlevel FROM tbl_users";
$rs_authlevel = mysql_query($query_rs_authlevel, $verspeeten) or 
die(mysql_error());
$row_rs_authlevel = mysql_fetch_assoc($rs_authlevel);
$totalRows_rs_authlevel = mysql_num_rows($rs_authlevel);
?>

// *** Register the variable named id_authlevel
session_start();
session_register("id_authlevel");
$id_authlevel = "id_authlevel";

$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($accesscheck)) {
  $GLOBALS['PrevUrl'] = $accesscheck;
  session_register('PrevUrl');
}
if (isset($_POST['username'])) {
  $loginUsername=$_POST['username'];
  $password=$_POST['password'];
  $MM_fldUserAuthorization = "";
  $MM_redirectLoginSuccess = "mainframe.php";
  $MM_redirectLoginFailed = "loginscripts/error.php";
  $MM_redirecttoReferrer = false;
  mysql_select_db($database_verspeeten, $verspeeten);
  $LoginRS__query=sprintf("SELECT username, password FROM tbl_users 
WHERE username='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername : 
addslashes($loginUsername), get_magic_quotes_gpc() ? $password : 
addslashes($password));

  $LoginRS = mysql_query($LoginRS__query, $verspeeten) or 
die(mysql_error());
  $loginFoundUser = mysql_num_rows($LoginRS);
  if ($loginFoundUser) {
 $loginStrGroup = "";

  if (isset($_SESSION['PrevUrl']) && false) {
  $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];	
}
header("Location: " . $MM_redirectLoginSuccess );
  }
  else {
header("Location: ". $MM_redirectLoginFailed );
  }
}
?>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>


.:. Verspeeten Computer Systems - Help Desk Login .:.


@import url("assets/css/verspeeten.css");
.:. please login .:. Lost username/password? VCS HelpDesk v.1 Here is the code that I have on the main page, which is what they will see once they have logged in, this page is called mainframe.php http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> .:. Verspeeten Computer Systems - Help Desk Mainframe .:. The issue that I am facing right now, is that whenever I try to login, it spits back this error: Notice: Undefined variable: id_authlevel in c:\inetpub\wwwroot\verspeetensystems\mainframe.php on line 11 Notice: Undefined variable: id_authlevel in c:\inetpub\wwwroot\verspeetensystems\mainframe.php on line 13 Notice: Undefined variable: id_authlevel in c:\inetpub\wwwroot\verspeetensystems\mainframe.php on line 15 I was wondering if any of you would be able to shed some light on why this is happening. It's making me absolutely bonkers. I've looked at the PHP site for clues, but I can't seem to figure it out. If you have any ideas, let me know. I'd be glad to hear them. Sincerely, Justin Kozuch -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to insert, change and remove fields like Enum

2004-05-23 Thread Don Read

On 21-May-2004 Andre wrote:
> 
> Hello...
> Someone now or have script's about   insert, change and remove fields
> like Enum in one table.
> Thanks .
> 

For sets (Emum should be similar) :

function getsetvalues($tbl, $fld) {
global $dbconn;

$search=array('set(', ')', "'");

$qry="SHOW COLUMNS FROM $tbl LIKE '$fld'";
$r = $dbconn->Execute($qry);
if ($row = $r->FetchRow()) {
if (! empty($row['Default']))
$cv['__Default__'] = stripslashes($row['Default']);
$s=str_replace($search, '', stripslashes($row['Type']));
$l=explode(',', $s);
foreach($l as $v) 
$cv[$v] = 1;
}
return($cv);
}

// add to set:
$cv[$new] = 1;
$dflt = $cv['__Default__']; unset($cv['__Default__']);
$s = implode("','", array_keys($cv));
$qry = "ALTER TABLE $tbl CHANGE COLUMN 
  $fld $fld SET('$s') NOT NULL DEFAULT '$dflt'";

// I'm sure you can figure out the rest

Regards,
-- 
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

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



[PHP] DOM XML output whitespace

2004-05-23 Thread Dan Phiffer
Hello,
Is there a way to get DOM XML to insert human-friendly whitespace 
between elements created programmatically? I'm using PHP 5 these days, 
so I guess I'm looking for some way to tell a DomDocument to prettify 
its save() output.

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


[PHP] Re robi: Re:[PHP] Is there any good examples of PHPLIB?

2004-05-23 Thread phplist
Hi~robi!

Thank you,troby,my friend!
With your guidance I found first time that PEAR is a very good coding tool which 
I'd  like to learn later.But my server provider do not have it;fortunately,I overcomed 
the difficultys of PHPLIB by debugging and testing yesterday.
To respond your kindness,I provide a good website to you which you probably not 
knowed  before,that is http://www.phpclasses.org .How many PHP codes,classes and 
examples free shared here!I like the site very much.I'm from China,I'd like to make 
friends with you and any other PHP users:-)

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



[PHP] Re: sessions

2004-05-23 Thread Torsten Roehr
"Maarten Weyn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It worked for 5 minutes after a reboot, but now i get the same problem
>
> what happens is that on every session_start();
> a new sessid is created how comes it doesn't use the old one

Haven't followed this thread yet. Are you using cookies or passing the
session id via GET?

Regards,

Torsten Roehr

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



Re: [PHP] sessions

2004-05-23 Thread Martin Geisler
[EMAIL PROTECTED] (Richard Davey) writes:

> Perhaps - imagine how many scripts out there would break if it did
> :) (not that I'd care, I code exclusively with E_ALL)
>
> Actually, doesn't PHP5 do this?

The following test gives just one 'Notice: Use of undefined constant
foo...' message when I run it with PHP5:

 'bar');
echo $array[foo] . "\n";
error_reporting(E_ALL);
echo $array[foo] . "\n";
?>

-- 
Martin Geisler  My GnuPG Key: 0xF7F6B57B

PHP EXIF Library  |  PhpWeather  |  PhpShell
http://pel.sf.net/|  http://phpweather.net/  |  http://gimpster.com/
Read/write EXIF data  |  Show current weather|  A shell in a browser

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



[PHP] Re: sessions

2004-05-23 Thread Maarten Weyn
It worked for 5 minutes after a reboot, but now i get the same problem

what happens is that on every session_start();
a new sessid is created how comes it doesn't use the old one


"Maarten Weyn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> All my session_start() calls were working fine.
> But since yesterday the vars i use does not keep there value
> i use $_SESSION['varname']
>
> Nothing has been changed to the server normally, but on all my sites it
does
> work anymore
>
> i think the problem is that when i use session_start() and then for
example
> $_SESSION[username] = 'test';
>
> on at an other page:
>
> session_start()
> then echo $_SESSION[username] gives blanco.
>
> How can this be?

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



Re: Re[2]: [PHP] sessions

2004-05-23 Thread Curt Zirzow
* Thus wrote Maarten Weyn ([EMAIL PROTECTED]):
> it works back after a reboot

What works how after what is booted when?


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Re: How to display all keys in a multi-dim array?

2004-05-23 Thread Torsten Roehr
"Richard Davey" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello Torsten,
>
> Sunday, May 23, 2004, 6:44:08 PM, you wrote:
>
> >> $array = array();
> >> $array['a'] = "1";
> >> $array['a']['b'] = "2";
> >> $array['a']['b']['c'] = "3";
> >> $array['a']['b']['c']['d'] = "4";
>
> TR> Could you describe a bit more in detail what you mean with "based on
search
> TR> result for 4"?
>
> I know that 4 is a *unique value* in my multi-dim array, but I do not
> know the key names that exist under-neath it because they were created
> dynamically. In other words - how do I find out all of the keys that
> hold the value 4?

So you basically want to search for the value and get its key(s), right?
Take a look at array_search():
http://de.php.net/manual/en/function.array-search.php

There are also some user comments on multi-dim arrays that might help you.

Hope this helps,

Regards,

Torsten

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



Re: [PHP] Re: How to display all keys in a multi-dim array?

2004-05-23 Thread Richard Davey
Hello Torsten,

Sunday, May 23, 2004, 6:44:08 PM, you wrote:

>> $array = array();
>> $array['a'] = "1";
>> $array['a']['b'] = "2";
>> $array['a']['b']['c'] = "3";
>> $array['a']['b']['c']['d'] = "4";

TR> Could you describe a bit more in detail what you mean with "based on search
TR> result for 4"?

I know that 4 is a *unique value* in my multi-dim array, but I do not
know the key names that exist under-neath it because they were created
dynamically. In other words - how do I find out all of the keys that
hold the value 4?

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



[PHP] apache suexec, CGI PHP and filesystem stuff

2004-05-23 Thread Peter Risdon
I posted a few days ago about problems with filesystem commands like 
copy(), move_uploaded_file(), backticked shell commands and so on while 
using CGI PHP under apache suexec.

It seems that these only work in directory trees starting in the 
directory in which the script itself resides. So if the script is in, 
say, /usr/home/user/website/cgi-bin then none of these will work except 
on (executable) files and directories in this directory or its 
sub-directories. So an attempt to move_uploaded_file() to 
/usr/home/user/website/pages/images/ will fail but will succeed if aimed 
at /usr/home/user/website/cgi-bin/images

Symbolic links provide a workaround in cases like the one I've been 
looking at, where I want to provide a form in a website control panel to 
upload images for display in the site.

I'm posting this so it's available to others, because I haven't found 
any mention of this (or any other) solution when googling.

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


[PHP] Re: How to display all keys in a multi-dim array?

2004-05-23 Thread Torsten Roehr
"Richard Davey" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> I am trying to work out how to display all of the keys in a
> multi-dimensional array (not their values). For example:
>
> $array = array();
> $array['a'] = "1";
> $array['a']['b'] = "2";
> $array['a']['b']['c'] = "3";
> $array['a']['b']['c']['d'] = "4";
>
> What I need is to be able to somehow print out the values a,b,c and d
> based on the search result for "4".
>

Could you describe a bit more in detail what you mean with "based on search
result for 4"?

Thanks and best regards,

Torsten Roehr

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



Re: Re[4]: [PHP] sessions

2004-05-23 Thread Maarten Weyn
no i cleaned the /tmp dir,
now the problem occurs again




"Richard Davey" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello Maarten,
>
> Sunday, May 23, 2004, 4:13:27 PM, you wrote:
>
> MW> it works back after a reboot
> MW> but does anybody know how it could have happened?
>
> Maybe your temp directory got full?
>
> Best regards,
>
> Richard Davey
> -- 
>  http://www.launchcode.co.uk - PHP Development Services
>  "I am not young enough to know everything." - Oscar Wilde

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



[PHP] How to display all keys in a multi-dim array?

2004-05-23 Thread Richard Davey
Hi all,

I am trying to work out how to display all of the keys in a
multi-dimensional array (not their values). For example:

$array = array();
$array['a'] = "1";
$array['a']['b'] = "2";
$array['a']['b']['c'] = "3";
$array['a']['b']['c']['d'] = "4";

What I need is to be able to somehow print out the values a,b,c and d
based on the search result for "4".

Is this even possible?

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



Re[4]: [PHP] sessions

2004-05-23 Thread Richard Davey
Hello Maarten,

Sunday, May 23, 2004, 4:13:27 PM, you wrote:

MW> it works back after a reboot
MW> but does anybody know how it could have happened?

Maybe your temp directory got full?

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



[PHP] Re: sessions

2004-05-23 Thread Maarten Weyn
it works back after a reboot

but does anybody know how it could have happened?




"Maarten Weyn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> All my session_start() calls were working fine.
> But since yesterday the vars i use does not keep there value
> i use $_SESSION['varname']
>
> Nothing has been changed to the server normally, but on all my sites it
does
> work anymore
>
> i think the problem is that when i use session_start() and then for
example
> $_SESSION[username] = 'test';
>
> on at an other page:
>
> session_start()
> then echo $_SESSION[username] gives blanco.
>
> How can this be?

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



Re: Re[2]: [PHP] sessions

2004-05-23 Thread Maarten Weyn
it works back after a reboot

but does anybody know how it could have happened?
"Richard Davey" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello Jeroen,
>
> Sunday, May 23, 2004, 4:00:46 PM, you wrote:
>
> >> Should username have quote around it?   Wouldn't it try to make it a
constant otherwise?
> >> echo $_SESSION['username']
>
> JS> Unfortunately, imho, php doesn't seem to care that much in such cases
;-)
> JS> $_SESSION[username] will have the same result as $_SESSION['username']
>
> It cares enough to raise a script Warning ;)
>
> Best regards,
>
> Richard Davey
> -- 
>  http://www.launchcode.co.uk - PHP Development Services
>  "I am not young enough to know everything." - Oscar Wilde

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



Re[3]: [PHP] sessions

2004-05-23 Thread Richard Davey
Hello Jeroen,

Sunday, May 23, 2004, 4:05:12 PM, you wrote:

>> It cares enough to raise a script Warning ;)

JS> That's true, but it should be giving an error instead of a warning imho ;-)

Perhaps - imagine how many scripts out there would break if it did :)
(not that I'd care, I code exclusively with E_ALL)

Actually, doesn't PHP5 do this?

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



Re[2]: [PHP] sessions

2004-05-23 Thread Jeroen Serpieters
On Sun, 23 May 2004, Richard Davey wrote:

>
> It cares enough to raise a script Warning ;)
>

That's true, but it should be giving an error instead of a warning imho ;-)

-- 
Jeroen

Anybody who thinks a little 9,000-line program [Java] that's distributed free and can 
be cloned by anyone
is going to affect anything we do at Microsoft  has his head screwed on wrong.
-- Bill Gates

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



Re[2]: [PHP] sessions

2004-05-23 Thread Richard Davey
Hello Jeroen,

Sunday, May 23, 2004, 4:00:46 PM, you wrote:

>> Should username have quote around it?   Wouldn't it try to make it a constant 
>> otherwise?
>> echo $_SESSION['username']

JS> Unfortunately, imho, php doesn't seem to care that much in such cases ;-)
JS> $_SESSION[username] will have the same result as $_SESSION['username']

It cares enough to raise a script Warning ;)

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



Re: [PHP] sessions

2004-05-23 Thread Jeroen Serpieters
On Sun, 23 May 2004, Daniel Clark wrote:

>
> Should username have quote around it?   Wouldn't it try to make it a constant 
> otherwise?
>
> echo $_SESSION['username']
>

Unfortunately, imho, php doesn't seem to care that much in such cases ;-)
$_SESSION[username] will have the same result as $_SESSION['username']

-- 
Jeroen

Be nice to nerds. Chances are you'll end up working for one.
-- Bill Gates

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



Re: [PHP] sessions

2004-05-23 Thread Daniel Clark
Should username have quote around it?   Wouldn't it try to make it a constant 
otherwise?

echo $_SESSION['username']

>>Hi,
>>
>>All my session_start() calls were working fine.
>>But since yesterday the vars i use does not keep there value
>>i use $_SESSION['varname']
>>
>>Nothing has been changed to the server normally, but on all my sites it does
>>work anymore
>>
>>i think the problem is that when i use session_start() and then for example
>>$_SESSION[username] = 'test';
>>
>>on at an other page:
>>
>>session_start()
>>then echo $_SESSION[username] gives blanco.
>>
>>How can this be?

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



[PHP] sessions

2004-05-23 Thread Maarten Weyn
Hi,

All my session_start() calls were working fine.
But since yesterday the vars i use does not keep there value
i use $_SESSION['varname']

Nothing has been changed to the server normally, but on all my sites it does
work anymore

i think the problem is that when i use session_start() and then for example
$_SESSION[username] = 'test';

on at an other page:

session_start()
then echo $_SESSION[username] gives blanco.

How can this be?

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



[PHP] mod_php + oracle

2004-05-23 Thread André Ventura Lemos
Though I have:

OCI8 Supportenabled  
Revision$Revision: 1.183.2.12 $  
Oracle Version  10.1  
Compile-time ORACLE_HOME/opt/oracle/product/10.1.0/db_1  
Libraries Used  no value

and
'--with-oci8=/opt/oracle/product/10.1.0/db_1' showing up on phpinfo();,
I get:

Fatal error: Call to undefined function: ora_logon() in
/var/www/localhost/htdocs/teste.php on line 4

and

Fatal error: Call to undefined function: oci_connect() in
/var/www/localhost/htdocs/teste.php on line 2


Help?



-- 
I/O, I/O,
It's off to disk I go,
A bit or byte to read or write,
I/O, I/O, I/O...



signature.asc
Description: This is a digitally signed message part


[PHP] Re: Random Record Retrieval

2004-05-23 Thread Martin Geisler
[EMAIL PROTECTED] (Robb Kerr) writes:

> How's that for alliteration in a subject line?

Very nice! :-)

> [...]  And, if this is the best way to go, unfortunately I don't
> know how to write a random number generator in PHP so would
> appreciate any help.

Your idea sounds good, and luckily you don't have to build your own
random generator, behold:

  http://php.net/rand

Then call rand() with two arguments: the minimum and maximum ID, and
it will give you a random integer back between those two numbers.

You could also opt to have MySQL make the random number for you, and
then do a query like

  SELECT * FROM table ORDER BY RAND() LIMIT 1;

Then you wont have to deal with figuring out the number of rows in the
table as you would in the PHP case.  You can also increse the limit
to, say, 3 and then show three random quotes on your pages.  See

  http://dev.mysql.com/doc/mysql/en/Mathematical_functions.html#IDX1363

for a description of RAND() in MySQL.

-- 
Martin Geisler  My GnuPG Key: 0xF7F6B57B

PHP EXIF Library  |  PhpWeather  |  PhpShell
http://pel.sf.net/|  http://phpweather.net/  |  http://gimpster.com/
Read/write EXIF data  |  Show current weather|  A shell in a browser

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



Re: [PHP] Using php to modify a css file

2004-05-23 Thread Jednorozec Pokojowiec
On Sun, 23 May 2004 01:19:44 -0400 (EDT), [EMAIL PROTECTED] (Michal
Migurski) wrote:

>> Without a > not shouldn't make any difference -- but it does.
>
>It will only make a difference if the HTTP response from the server is
>different somehow -- contains junk, wrong headers, that sort of thing. The
>only way to reliably diagnose such problems is to figure out a way to view
>the entire HTTP response, headers and all. I use curl for this, but you
>might not have access to a command line.

Thanks for pointing me to curl.  When the css file is being parsed by
php the Content-Type changes to text/html.  It works just fine if I
add the following two lines to the beginning of the file:
ob_start();
header( 'Content-Type: text/css' );
I still don't know why it worked on the remote server since it's doing
the same thing.

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



Re: [PHP] Is there any good examples of PHPLIB?

2004-05-23 Thread robi
Da Su 23. May 2004 10:07 dsx wrote:
> Is there any good examples of PHPLIB?I can only write very simple
> programs of PHPLIB,but when the functions and classes added,  I cannot hold
> it.So I'd like to learn some code examples of it,who can provide me some or
> a website about it? Thank you in advance.

Hello,

If I can advice to you move to object oriented coding,
I meaning classes and object and then learn PEAR
pear.php.net, it is framework you can find classes
for everything you may work on.

troby

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



[PHP] Is there any good examples of PHPLIB?

2004-05-23 Thread dsx
Is there any good examples of PHPLIB?I can only write very simple programs of 
PHPLIB,but when the functions and classes added,  I cannot hold it.So I'd like to 
learn some code examples of it,who can provide me some or a website about it?
Thank you in advance.

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