php-general Digest 23 Aug 2003 06:02:48 -0000 Issue 2253

Topics (messages 160425 through 160482):

Re: Question for you guys and gals
        160425 by: CPT John W. Holmes

isset bug?
        160426 by: Christian Calloway
        160430 by: Curt Zirzow
        160435 by: Christian Calloway
        160450 by: Robert Cummings

I wish I knew more about multi-dimensional arrays
        160427 by: Verdon vaillancourt
        160429 by: Ray Hunter

Re: File upload + permissions + .htaccess in php
        160428 by: Ryan A

Re: timestamp
        160431 by: John Taylor-Johnston
        160433 by: Gabriel Guzman
        160437 by: John Taylor-Johnston
        160438 by: Gabriel Guzman
        160444 by: CPT John W. Holmes
        160445 by: John Taylor-Johnston

CMS question.
        160432 by: Edmond Baroud

Re: rich text editing
        160434 by: Andy Crain

File upload & restrictive permissions
        160436 by: Doug Parker

'&' Sign in _GET Parameter
        160439 by: Pushpinder Singh Garcha
        160442 by: Gabriel Guzman
        160443 by: CPT John W. Holmes
        160448 by: Pushpinder Singh Garcha

anyone have any idea as to how to display a message after a page has started loading??
        160440 by: Jeffrey D. Means
        160441 by: Matt Babineau
        160446 by: Dan Joseph
        160453 by: Robert Cummings

Re: Getting browser resolution??
        160447 by: erythros

Clean Up the sand box time
        160449 by: John Taylor-Johnston
        160452 by: Robert Cummings
        160482 by: John Taylor-Johnston

PHP and directory permissions
        160451 by: Lowell Allen

Trading senerio
        160454 by: Joaco

Re: google style paginating
        160455 by: Rob Yelvington
        160475 by: Robert Cummings

float precision format not being kept
        160456 by: Rob Yelvington
        160469 by: CPT John W. Holmes

Re: WYSIWYG editor for PHP
        160457 by: Rob Yelvington

need help figuring out how to delete rows?
        160458 by: Deadsam

PHPOPENCHAT: he script tried to execute a method or access a property of an incomplete 
object.
        160459 by: Robert Mena

Server variables on IIS
        160460 by: Sid
        160467 by: CPT John W. Holmes

eval function
        160461 by: Matthias Wulkow
        160481 by: Tom Rogers

Deleting same values from an array
        160462 by: Stephen Craton
        160466 by: CPT John W. Holmes
        160470 by: Stephen Craton

STRING_FORMAT
        160463 by: Dale Hersh
        160464 by: Curt Zirzow

Shortcuts/aliases/sym-links?
        160465 by: Dan Phiffer

linking via SSH to another server.
        160468 by: Vail, Warren

Access denied problem, please help
        160471 by: Ryan A
        160473 by: Jim Lucas

Making a cookie never expire
        160472 by: Stevie D Peele
        160477 by: CPT John W. Holmes

safe_mode_include_dir
        160474 by: Mark Clarkstone

What's user_dir?
        160476 by: DvDmanDT

auto_prepend_file
        160478 by: Dennis Gearon

Using PHP to get size of mySQL data?
        160479 by: Jeff Lewis
        160480 by: Robert Cummings

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 ---
From: "Curt Zirzow" <[EMAIL PROTECTED]>

> > Or cheat and use output buffering.
>
> IMO, thats an even more lazy way of doing it.

I agree entirely. I hate even giving that option, but it is there. That's
why I said he could "cheat" :)

---John Holmes...


--- End Message ---
--- Begin Message ---
Ok, here's the deal. I like to use $_GET and $_POST variables without values
to notify my scripts that some action must be taken. For example, given the
following URL:

http://blahdomain/blah.php?productid=1&edit

or given the following form element:

<input type=hidden name="edit">

My blah.php script will check if edit set using the following line:

if (isset($_REQUEST["edit"]))
{
..
}

and then it will take the appropriate actions (lets just say its updating a
record in the database). Locally I am running PHPv4.3.2, and everything
works fine. I have been working on a large web-based application for the
last month, and yesterday I put it up live. Our host unfortunately runs
PHPv4.2.1 and I have no access to the conf files (those bastards) and
globals are set to on. Low and behold, the isset function returns false when
a $_POST or $_GET variable is passed but contains no value, which would be
exactly the same thing as checking the variable itself:

if ($_REQUEST["edit"]) { }

What I want and needed to do was check for the existance of the variable,
not whether it has a value. So is this a bug, a feature or just some random
happening? Thank guys

PHP ROCKS



--- End Message ---
--- Begin Message ---
* Thus wrote Christian Calloway ([EMAIL PROTECTED]):
> Ok, here's the deal. I like to use $_GET and $_POST variables without values
> to notify my scripts that some action must be taken. For example, given the
> following URL:
> 
> http://blahdomain/blah.php?productid=1&edit
> 
> or given the following form element:
> 
> <input type=hidden name="edit">

simply add a value="1" and it will fix your problem.

> 
> My blah.php script will check if edit set using the following line:
> 
> if (isset($_REQUEST["edit"]))
> {
> ..
> }
> 
> and then it will take the appropriate actions (lets just say its updating a
> record in the database). Locally I am running PHPv4.3.2, and everything
> works fine. I have been working on a large web-based application for the
> last month, and yesterday I put it up live. Our host unfortunately runs
> PHPv4.2.1 and I have no access to the conf files (those bastards) and
> globals are set to on. Low and behold, the isset function returns false when
> a $_POST or $_GET variable is passed but contains no value, which would be
> exactly the same thing as checking the variable itself:
> 


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

--- End Message ---
--- Begin Message ---
What I was trying to avoid is exactly that. It would require changing links
and hidden fields throughout the entire application, which would take hours
to track down. I am looking for a nice lazy and easy fix.


"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Christian Calloway ([EMAIL PROTECTED]):
> > Ok, here's the deal. I like to use $_GET and $_POST variables without
values
> > to notify my scripts that some action must be taken. For example, given
the
> > following URL:
> >
> > http://blahdomain/blah.php?productid=1&edit
> >
> > or given the following form element:
> >
> > <input type=hidden name="edit">
>
> simply add a value="1" and it will fix your problem.
>
> >
> > My blah.php script will check if edit set using the following line:
> >
> > if (isset($_REQUEST["edit"]))
> > {
> > ..
> > }
> >
> > and then it will take the appropriate actions (lets just say its
updating a
> > record in the database). Locally I am running PHPv4.3.2, and everything
> > works fine. I have been working on a large web-based application for the
> > last month, and yesterday I put it up live. Our host unfortunately runs
> > PHPv4.2.1 and I have no access to the conf files (those bastards) and
> > globals are set to on. Low and behold, the isset function returns false
when
> > a $_POST or $_GET variable is passed but contains no value, which would
be
> > exactly the same thing as checking the variable itself:
> >
>
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."



--- End Message ---
--- Begin Message ---
This should help:

    http://www.php.net/manual/en/function.array-key-exists.php

Cheers,
Rob.


On Fri, 2003-08-22 at 13:26, Curt Zirzow wrote:
> * Thus wrote Christian Calloway ([EMAIL PROTECTED]):
> > Ok, here's the deal. I like to use $_GET and $_POST variables without values
> > to notify my scripts that some action must be taken. For example, given the
> > following URL:
> > 
> > http://blahdomain/blah.php?productid=1&edit
> > 
> > or given the following form element:
> > 
> > <input type=hidden name="edit">
> 
> simply add a value="1" and it will fix your problem.
> 
> > 
> > My blah.php script will check if edit set using the following line:
> > 
> > if (isset($_REQUEST["edit"]))
> > {
> > ..
> > }
> > 
> > and then it will take the appropriate actions (lets just say its updating a
> > record in the database). Locally I am running PHPv4.3.2, and everything
> > works fine. I have been working on a large web-based application for the
> > last month, and yesterday I put it up live. Our host unfortunately runs
> > PHPv4.2.1 and I have no access to the conf files (those bastards) and
> > globals are set to on. Low and behold, the isset function returns false when
> > a $_POST or $_GET variable is passed but contains no value, which would be
> > exactly the same thing as checking the variable itself:
> > 
> 
> 
> 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
> 
> 
-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

--- End Message ---
--- Begin Message ---
Hi, please don't chuckle (too loudly) at my attempts to learn ;)

I'm trying to create what I think would be a multi-dimensional array from a
mysql result set, to use in some example code I got off this list last week.

The example renedring code I want to work with is...

<?php

$data = array('A', 'B', 'C', 'D', 'E', 'F', 'G');
$rowlength = 3;

echo ("<table>");
for ($i = 0; $i < sizeof ($data); $i += $rowlength)
{
    echo ("<tr>");
    for ($j = 0; $j < $rowlength; $j++)
    {
        if (isset ($data[$i+$j]))
        {
            echo ("<td>{$data[$i+$j]}</td>");
        } else {
            echo ("<td>&nbsp;</td>");
        }
    }
    echo ("</tr>");
}
echo ("</table>");



?>

I trying to create the $data array from my query results like this...

$sql = "select * from table limit 0,5";
$result = mysql_query ($sql);
$number = mysql_numrows ($result);

for ($x = 0; $x < sizeof (mysql_fetch_array($result)); $x ++) {
    $data = implode (',',$result[$x]);
}

I had hoped this would get me the six arrays on the page (where I could then
extract the values). I've also tried a number of similar approaches but am
consistently getting six error messages on the page along the lines of

Warning :  implode() [ function.implode ]: Bad arguments. in

I know I'm missing something basic and would appreciate any pointers.

Thanks,
Verdon


--- End Message ---
--- Begin Message ---
mysql result as a multi-dimensional array:

while( $row = mysql_fetch_array($result) ) {
  $rows[] = $row;
}

now you have a multi-dimensional array that contains each row in rows...

examples:
row 1 col 1 - $rows[0][0]
row 3 col 2 - $rows[3][2]

hth

--
bigdog


On Fri, 2003-08-22 at 10:37, Verdon vaillancourt wrote:
> Hi, please don't chuckle (too loudly) at my attempts to learn ;)
> 
> I'm trying to create what I think would be a multi-dimensional array from a
> mysql result set, to use in some example code I got off this list last week.
> 
> The example renedring code I want to work with is...
> 
> <?php
> 
> $data = array('A', 'B', 'C', 'D', 'E', 'F', 'G');
> $rowlength = 3;
> 
> echo ("<table>");
> for ($i = 0; $i < sizeof ($data); $i += $rowlength)
> {
>     echo ("<tr>");
>     for ($j = 0; $j < $rowlength; $j++)
>     {
>         if (isset ($data[$i+$j]))
>         {
>             echo ("<td>{$data[$i+$j]}</td>");
>         } else {
>             echo ("<td>&nbsp;</td>");
>         }
>     }
>     echo ("</tr>");
> }
> echo ("</table>");
> 
> 
> 
> ?>
> 
> I trying to create the $data array from my query results like this...
> 
> $sql = "select * from table limit 0,5";
> $result = mysql_query ($sql);
> $number = mysql_numrows ($result);
> 
> for ($x = 0; $x < sizeof (mysql_fetch_array($result)); $x ++) {
>     $data = implode (',',$result[$x]);
> }
> 
> I had hoped this would get me the six arrays on the page (where I could then
> extract the values). I've also tried a number of similar approaches but am
> consistently getting six error messages on the page along the lines of
> 
> Warning :  implode() [ function.implode ]: Bad arguments. in
> 
> I know I'm missing something basic and would appreciate any pointers.
> 
> Thanks,
> Verdon
> 


--- End Message ---
--- Begin Message ---
Hey,
Thanks for replying.

the paths i am using are as follows:

$UserUploadDir="/usr163/home/r/y/ryanknig/public_html/BWH-Ads-Images";
$UserUploadURL = "http://jumac.com/BWH-Ads-Images";;

But they still dont work....any ideas?

Thanks,
-Ryan





> I've had this problem twice recently.
>
> Once it was because I'd foolishly moved a script that used relative
pathnames.
> The result was that I was trying to access a file outside the DocumentRoot
> and it didn't matter what the permissions on the file were, it wasn't
trying
> to open that one at all!
>
> The other time is more confusing. I'd gone through all directory and file
> ownerships and they were okay. In the end, in desperation, I chgrp'd the
file
> to be mine (leaving ownership alone) and it worked. This is on my list of
> things to come back to!
>
> HTH
>
> Nick
>
> On Thursday 21 Aug 2003 10:30 am, Ryan A wrote:
> > Hi,
> > I am trying to upload something into a directory on my server but always
i
> > am getting a permission denied ONLY from this server...i have tried it
on 2
> > other servers and they seem to be working fine but i have to get it
working
> > on this server as this server is the fastest and our production server.
> >
> > I have looked at the folder permissions and CHMODED/changed them from
644
> > to 766 and finally 777 but am getting the same error, i then had a look
at
> > the php info file (http://jumac.com/phpinfo.php) and i see
file_uploading
> > is set to 1 and 1, safe mode is off, i am not too familier with file
> > uploading so is this right? if not, how can i change it? hopefully via a
> > .htaccess as I dont have access to the php.ini file directly.
> >
> > Let me again point out that this problem only seems to be on this
server,
> > the scripts including the upload is working perfectly on the other test
> > servers/sites.
> >
> > Kindly reply,
> > -Ryan A.
> >
> >
> > We will slaughter you all! - The Iraqi (Dis)information ministers site
> > http://MrSahaf.com
>
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
Anyone? Please :)

John Taylor-Johnston wrote:

> This is what I'm using so far. But I need to put in a time stamp to calculate if the 
> visitor is new. I want to use the IP so if the ip saved in MySQL is older than 60 
> minutes, it will write a new record, if not, don't:
>
> $myconnection = mysql_connect($server,$user,$pass);
> mysql_select_db($db,$myconnection);
>
> $getaddr = $_SERVER['REMOTE_ADDR'];
> $gethost = gethostbyaddr($_SERVER['REMOTE_ADDR']);
> $EntryDate = date("Y-m-d");
>
> $sql = "INSERT INTO $table (IPAddress,RemoteHost,EntryDate) 
> values('$getaddr','$gethost','$EntryDate')";
> mysql_query($sql);
>
> $myconnection = mysql_connect($server,$user,$pass);
> mysql_select_db($db,$myconnection);
> $result = mysql_query("SELECT * FROM $table", $myconnection);
> $num_rows = mysql_num_rows($result);
>
> echo "document.write(\"$num_rows visitors. \");";

--
John Taylor-Johnston
-----------------------------------------------------------------------------
"If it's not open-source, it's Murphy's Law."

  ' ' '   Collège de Sherbrooke:
 ô¿ô   http://www.collegesherbrooke.qc.ca/languesmodernes/
   -     Université de Sherbrooke:
          http://compcanlit.ca/
          819-569-2064



--- End Message ---
--- Begin Message ---
On Thu, 2003-08-21 at 22:23, John Taylor-Johnston wrote:
> Not teasing, I know I could do this with some ready made script, but I want to make 
> my own.
> 
> I'm making a counter.
> 
> CREATE TABLE `counter` (
>   `IPAddress` VARCHAR NOT NULL ,
>   `RemoteHost` VARCHAR NOT NULL ,
>   `TimeStamp` TIMESTAMP NOT NULL,

try not naming your timestamp column a reserved word...  just a guess

>   `Date` VARCHAR NOT NULL
> )
> 
> 
> Question 1, how do I create a timestamp, (My SQL above does not work.), if this is 
> indeed what I want to do.

see above

> Question 2, how can I read TimeStamp and if the elapsed time between visits is more 
> than 60 minutes, I insert a new record?

umm... look at:

http://us4.php.net/time
and
http://www.mysql.com/doc/en/DATETIME.html

one thing to look out for is php and mysql deal with time in different
ways, so you may have to do some conversion... but this should get you
started. 

> Where do I start?

the above 2 links.



--- End Message ---
--- Begin Message ---
I'm creating a counter.

I want a timestamp where I can calculate if a time stamp is older than one hour, if so 
do X, if not do Y.

>Gabriel Guzman wrote:
>http://us4.php.net/time
>and
>http://www.mysql.com/doc/en/DATETIME.html

I have looked at both, especially http://www.mysql.com/doc/en/DATETIME.html
I got my fields to work. Did something stupid.

I'm using timestamp(14) which makes YYYYMMDDHHMMSS
therefore: 20030822033746 becomes:
2003-08-22-03:37:46 (I don't get a lot of sleep I guess :)  )

But this is a little difficult to extract a calculation.
In Javascript, however, it seems easier.

<script>
var expdate = new Date();

//################# Cookie Stuff
#####################################
// COOKIE EXPIRATION VARIABLES
// Set cookie to expire in 12 hours
// 1000 milliseconds (milliseconds per second)
// * 60 milliseconds (seconds per minute)
// * 60 milliseconds (minutes per hour)
// * 12 milliseconds (hours per day)
// * 1 milliseconds (days)
// -----------------
// = 12 hours

expdate.setTime (expdate.getTime() + (1000*60*60*12*1));
</script>

Is this the way to go in PHP? And how do I do it? Or is there a better way to have a 
timestamp?

John

-------snip this is the code I have so far -----

CREATE TABLE `counter` (
  `id` int(10) NOT NULL auto_increment,
  `IPAddress` varchar(100) NOT NULL default '',
  `RemoteHost` varchar(100) NOT NULL default '',
  `EntryDate` date NOT NULL default '0000-00-00',
  `MyTimeStamp` timestamp(14) NOT NULL,
  `MyTime` time NOT NULL default '00:00:00',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=6 ;

$myconnection = mysql_connect($server,$user,$pass);
mysql_select_db($db,$myconnection);

$getaddr = $_SERVER['REMOTE_ADDR'];
$gethost = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$EntryDate = date("Y-m-d");

$sql = "INSERT INTO $table (IPAddress,RemoteHost,EntryDate)
values('$getaddr','$gethost','$EntryDate')";

mysql_query($sql);

$myconnection = mysql_connect($server,$user,$pass);
mysql_select_db($db,$myconnection);

$result = mysql_query("SELECT * FROM $table", $myconnection);
$num_rows = mysql_num_rows($result);

echo "document.write(\"$num_rows visitors. \");";



--- End Message ---
--- Begin Message ---
On Fri, 2003-08-22 at 11:50, John Taylor-Johnston wrote:
> I'm creating a counter.
> 
> I want a timestamp where I can calculate if a time stamp is older than one hour, if 
> so do X, if not do Y.

so, you have the timestamp already correct?  in your mysql db.  all you
should need to do is get the unix timestamp from that field: 

SELECT UNIX_TIMESTAMP(whateveryourtimestampfieldiscalled) from mytable
where foo;

and compare it to the current time from php:

$timeStampTime = value you got from DB;
$currentTime = time();

these are just integers, so you can easily look to see if the timestamp
is over an hour old.  A unix timestamp is simply the number of seconds
that have elapsed since the beginning of the unix epoch, so if you know
how many seconds there are in an hour, you can determine if the
$timeStampTime is over an hour old.

something like: 

if $timeStampTime + 3600 < $currentTime { 
  echo "I'm over an hour old"; 
} else {
  echo "I'm not an hour old";
}

should work. 

hth,
gabe.


--- End Message ---
--- Begin Message ---
From: "John Taylor-Johnston" <[EMAIL PROTECTED]>


> I'm creating a counter.
>
> I want a timestamp where I can calculate if a time stamp is older than one
hour, if so do X, if not do Y.

SELECT * FROM Table WHERE timestamp_column < NOW() - INTERVAL 60 MINUTE

will give you all rows that have a timestamp column that's over 60 minutes
old. Adapt to your needs.

---John Holmes..


--- End Message ---
--- Begin Message ---
Indeed easier than I thought?! :)
timestamp(14) is ok :)
Thanks John!
John
-- 
http://compcanlit.ca/

Quoting "CPT John W. Holmes" <[EMAIL PROTECTED]>:
> SELECT * FROM Table WHERE timestamp_column < NOW() - INTERVAL 60 MINUTE
> will give you all rows that have a timestamp column that's over 60 minutes
> old. Adapt to your needs.
> ---John Holmes..

--- End Message ---
--- Begin Message ---
Hi all,

I have a friend who have paid a developper to build him a CMS. This honest 
programmer did that (supposedly developped it on his own), encoded the CMS 
with Ioncube and did some other unethical activities as well. To make a long 
story short, I have read some articles about decoding and cracking the source 
/ reverse engineering, and it looks like it is time consuming and also 
illegal.

I have taken snapshots of the CMS and put them available to whoever is 
interested in giving me a hand to see if this CMS is an open source one?
note the php files: categories_list.php, content_list.php and 
content_edit.php.
the CM is also capable to upload in batch... ?
It might be a mix of CMS and an Image Gallery script pakcage.. I also see that 
Smarty (template engine) is installed in the same root directory of the CMS, 
I am not familiar with Smarty, and since the code is encoded I have no way to 
tell wether it's being used with it or not..

Any hints would be appreciated!

snapshots available here:
http://www.onlinecardonation.com/img1.jpg
http://www.onlinecardonation.com/img2.jpg
http://www.onlinecardonation.com/img3.jpg

PS: the CMS is not used for the website above where I put the images :)

Thanks!

Ed.

-- 
Edmond Baroud 
Senior UNIX sysadmin             mailto:[EMAIL PROTECTED]
Fingerprint  140F 5FD5 3FDD 45D9 226D  9602 8C3D EAFB 4E19 BEF9
"UNIX is very user friendly, it's just picky about who its friends are."



--- End Message ---
--- Begin Message ---
The only problem in doing so, for me at least, is in editing text
created by htmlarea. Nonsupported users who get a normal textarea
pre-loaded with html generated by htmlarea could break tags, etc., on
updates. I wrote a class I use to work around this by: determining which
type of textarea they'll get (wysiwyg htmlarea or plain textarea), and
if they're using a plain textarea and editing html, all html except for
bold, italics and underline tags are replaced with markers. The plain
textarea user then can add standard bb style tags, [b], [i], etc., then
on submit the bb tags will be converted to html, and the original html
will be added back in, properly nested, etc. If you'd like to use it,
I'd be happy to email it. I'm sure it could use a few extra sets of
eyes.
Andy

> -----Original Message-----
> From: Nelson Rodríguez-Peña Alarcón [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 6:46 PM
> To: Redmond Militante
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Re: rich text editing
> 
> Hi,
> 
> Redmond Militante wrote:
>  >
> > (...) what do people generally do when using an activex rich text
> > editor and the user is using a non supported browser?
> 
> You can display a textarea. It'd allow users to edit/add content in a
> simpler, less powered way.
> 
> --
> regards,
> 
> ------------------------------------------------------------
> Nelson Rodríguez-Peña A.
> Diseño y Desarrollo Web y Multimedia
> ------------------------------------------------------------
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
Recently I had a problem with file uploading on a server I use, and the
problem was that the tmp/ directory was not set.  Now that it has been set,
the images do upload, but the file permissions end up being very
restrictive - something like (-rw-------) - so the images obviously do not
show up on the web.  I know I could login and chmod tihs, but since we have
clients upload their own images, it goes without saying that this would be a
major inconvenience.  Our sysadmin, who is relatively clueless, suggested
that I add a php chmod function to my scripts.  I suppose this would work,
but I don't understand why my scripts once worked without this function -
the files uploaded and were web-viewable.  I checked both the target
directory and tmp/ directory, and both are fit for web viewing.

Any ideas as to how I could fix this?

Thanks...


------------------------------------------------------------
http://www.phreshdesign.com



--- End Message ---
--- Begin Message --- Hello All,

I am using an application where I retrieve user profile from a MySQL DB using the Company Name . I pass the name of the company to the PHP script as a '$_GET' parameter. e.g. when the name of the company is 'IBM'. , the URL with the query string would look like :
http://masterstream.com/CRM/full_profile_1.php?name=IBM


Now one of the records had a name : PSG & Inc. , in this case the URL with the query string would look like
http://masterstream.com/CRM/full_profile_1.php?name=PSG%20&%20Inc.


However in the case of the latter I am not able to pull out any records from the MySQL database. It says that "no records with the name were found". I went ahead and tweaked the name of the company, to remove the "&" sign in 'PSG & Inc.' Now the query works fine. Can some one throw some light here. I am sure something minor is to be done when passing the name of the company in the parent script.

Thanks in advance
--Pushpinder



--- End Message ---
--- Begin Message ---
On Fri, 2003-08-22 at 12:05, Pushpinder Singh Garcha wrote:
> Hello All,
> 
>   I am using an application where I retrieve user profile from a MySQL 
> DB using the Company Name .  I pass the name of the company to the PHP 
> script as a '$_GET' parameter. e.g. when the name of the company is 
> 'IBM'. , the URL with the query string would look like :
> http://masterstream.com/CRM/full_profile_1.php?name=IBM
> 
> Now one of the records had a name : PSG & Inc. , in this case the URL 
> with the query string would look like
> http://masterstream.com/CRM/full_profile_1.php?name=PSG%20&%20Inc

no, this is not how it should look... the '&' in the above query string
is saying the variable 'name' ends and a new variable follows.  If you
are submitting this in a form using method=get... it should look
something like:  

?name=PSG+%26+Inc

if you are really passing this in a form using method=get, then this
should be handled automatically. 

how are you accessing the passed variable?  

$_GET['name']  ?? 




--- End Message ---
--- Begin Message ---
From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]>

>   I am using an application where I retrieve user profile from a MySQL
> DB using the Company Name .  I pass the name of the company to the PHP
> script as a '$_GET' parameter. e.g. when the name of the company is
> 'IBM'. , the URL with the query string would look like :
> http://masterstream.com/CRM/full_profile_1.php?name=IBM
>
> Now one of the records had a name : PSG & Inc. , in this case the URL
> with the query string would look like
> http://masterstream.com/CRM/full_profile_1.php?name=PSG%20&%20Inc.
>
> However in the case of the latter I am not able to pull out any records
> from the MySQL database. It says that "no records with the name were
> found".   I went ahead and tweaked the name of the company, to remove
> the "&" sign in 'PSG & Inc.'   Now the query works fine.  Can some one
> throw some light here. I am sure something minor is to be done when
> passing the name of the company in the parent script.

The & character separates variables in the query string, so it must be
encoded if it appears in the data. Take a look at
http://us2.php.net/urlencode

---John Holmes...


--- End Message ---
--- Begin Message --- Thanks for the link,

$link = $row['company'];
<a href=\"full_profile_1.php?name=', urlencode($link),' \">

However this does not seem to work / what am I missing ?

Thanks
-Pushpinder



On Friday, August 22, 2003, at 03:23 PM, CPT John W. Holmes wrote:

From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]>

  I am using an application where I retrieve user profile from a MySQL
DB using the Company Name .  I pass the name of the company to the PHP
script as a '$_GET' parameter. e.g. when the name of the company is
'IBM'. , the URL with the query string would look like :
http://masterstream.com/CRM/full_profile_1.php?name=IBM

Now one of the records had a name : PSG & Inc. , in this case the URL
with the query string would look like
http://masterstream.com/CRM/full_profile_1.php?name=PSG%20&%20Inc.

However in the case of the latter I am not able to pull out any records
from the MySQL database. It says that "no records with the name were
found". I went ahead and tweaked the name of the company, to remove
the "&" sign in 'PSG & Inc.' Now the query works fine. Can some one
throw some light here. I am sure something minor is to be done when
passing the name of the company in the parent script.

The & character separates variables in the query string, so it must be encoded if it appears in the data. Take a look at http://us2.php.net/urlencode

---John Holmes...


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



--- End Message ---
--- Begin Message ---
I am looking for a way to say please wait generating thumbnails... while
actually doing so.  I have tried calling the JavaScript alert() function
before starting the image processing but it waits for the page to
complete loading before displaying the alert box.  anyone have any ideas
on this??  BTW: at the time I am trying to display a message I have
already started output to the browser.
 
---
Jeffrey D. Means
CIO for MeansPC
[EMAIL PROTECTED]
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003
 

--- End Message ---
--- Begin Message ---
Perhaps you wrap a table around your image and set the background="" of
the table to an image of the same size that says "Loading Thumbnails",
then when the image loads, it loads over the background.

Matt

On Fri, 2003-08-22 at 15:08, Jeffrey D. Means wrote:
> I am looking for a way to say please wait generating thumbnails... while
> actually doing so.  I have tried calling the JavaScript alert() function
> before starting the image processing but it waits for the page to
> complete loading before displaying the alert box.  anyone have any ideas
> on this??  BTW: at the time I am trying to display a message I have
> already started output to the browser.
>  
> ---
> Jeffrey D. Means
> CIO for MeansPC
> [EMAIL PROTECTED]
>  
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003
>  


--- End Message ---
--- Begin Message ---
Hi,

> I am looking for a way to say please wait generating thumbnails... while
> actually doing so.  I have tried calling the JavaScript alert() function
> before starting the image processing but it waits for the page to
> complete loading before displaying the alert box.  anyone have any ideas
> on this??  BTW: at the time I am trying to display a message I have
> already started output to the browser.

        Try looking up the flush() function on php.net.  That _might_ do what you
want.

-Dan Joseph


--- End Message ---
--- Begin Message ---
Also make sure you don't have output buffering or compression on for the
page in question.

Cheers,
Rob.


On Fri, 2003-08-22 at 16:42, Dan Joseph wrote:
> Hi,
> 
> > I am looking for a way to say please wait generating thumbnails... while
> > actually doing so.  I have tried calling the JavaScript alert() function
> > before starting the image processing but it waits for the page to
> > complete loading before displaying the alert box.  anyone have any ideas
> > on this??  BTW: at the time I am trying to display a message I have
> > already started output to the browser.
> 
>       Try looking up the flush() function on php.net.  That _might_ do what you
> want.
> 
> -Dan Joseph
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

--- End Message ---
--- Begin Message ---
you don't need to get the screen resolution for that. if you still want the
screen resolution you'll have to look at javascript. just assign the
pictures width to 25%. no matter the screen size, or resolution ie will set
the picture to 25% of the window. it's pure html...

<img src="image.jpg" width="25%" />


"Bjarke Andersen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi
>
> I've just started with PHP and i trying to find a function for getting the
> screen resolution, if that i posible??
> I need it to resize pictures, so that nomatter what resolution a user
haves,
> a picture allways uses for example 25% of the width of the screen...
>
> I hope someone can help me!
>
> Thanks
>   Bjarke
>
>



--- End Message ---
--- Begin Message ---
This is my favourite question. Can I clean up my 'if then' statements a tad?
Must be a cleaner way?
Still learning, still having fun :)
Thanks,
John

 $news = mysql_query($sql) or die(print "document.write(\"".mysql_error()."\");");

 $found = 0;
 while ($mydata = mysql_fetch_object($news))
 {
  if($getaddr == $mydata->IPAddress)
  {
  $found = 1;
  }
 }

  if ($found > 0)
  {
  echo "document.write(\"$getaddr already visited. \");";
  }else{
  echo "document.write(\"insert $getaddr into $table. \");";
  }




--- End Message ---
--- Begin Message ---
Absolutely, the best way *tongue in cheek* is to format as follows:

$news = mysql_query($sql) or die( print "document.write(\"".mysql_error()."\");");

$found = 0;
while( $mydata = mysql_fetch_object( $news ) )
{
    if( $getaddr == $mydata->IPAddress )
    {
        $found = 1;
    }
}

if( $found > 0 )
{
    echo "document.write(\"$getaddr already visited. \");";
}
else
{
    echo "document.write(\"insert $getaddr into $table. \");";
}

Look how neat that is, who could possibly come up with a better style of
formatting than that!?

Cheers,
Rob.


On Fri, 2003-08-22 at 17:26, John Taylor-Johnston wrote:
> This is my favourite question. Can I clean up my 'if then' statements a tad?
> Must be a cleaner way?
> Still learning, still having fun :)
> Thanks,
> John
> 
>  $news = mysql_query($sql) or die(print "document.write(\"".mysql_error()."\");");
> 
>  $found = 0;
>  while ($mydata = mysql_fetch_object($news))
>  {
>   if($getaddr == $mydata->IPAddress)
>   {
>   $found = 1;
>   }
>  }
> 
>   if ($found > 0)
>   {
>   echo "document.write(\"$getaddr already visited. \");";
>   }else{
>   echo "document.write(\"insert $getaddr into $table. \");";
>   }


-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

--- End Message ---
--- Begin Message ---
Yes, but must be a better way to setup my if.then's ?
John


--- End Message ---
--- Begin Message ---
I developed a script which updates some static HTML pages. The script
creates temporary files and opens them for writing. It then reads the HTML
content of PHP-generated pages and writes that to the temp files. If that's
successful, it copies the temp files to the static files, thus updating
them. This worked without problem for several months, but recently started
throwing a permissions error:

> Warning: fopen(temp_list_auctions.html): failed to open stream:
> Permission denied in
> /home/williams/public_html/generate_auction_lists.php on line 55
> Unable to open temporary file (temp_list_auctions.html) for writing.

The same script still works fine in public_html/dev, which is a directory I
use for testing. I asked the commercial host why this has become a problem
and why it works in public_html/dev but not in public_html. Here's the reply
(which does not explain why it once worked):

> The reason the problem occurs in the public_html directory is because
> the directory is owned by user: williams group: nobody. Your account is
> setup like this so no one can write into your root directory, except a perl
> script or a PHP script on your site executed as a CGI. By chmoding the
> public_html directory to 777 you make the ownership settings useless. The
> directory named dev is owned by user: williams group: williams so your PHP
> script has no trouble writing to it with 757 permissions.
> 
> So you could either chmod the public_html directory to 777 or we could chown
> the directory to user: williams group: williams.

I don't want the public_html directory set to 777, but I certainly want PHP
to be able to update files. Is there a security problem with having
public_html owned by user: williams, group: williams? Would it be better to
rewrite my script so that it doesn't need to create files?

Comments on the best approach for security and reliability would be
appreciated.

--
Lowell Allen


--- End Message ---
--- Begin Message ---
I am trying to create an interface that will allow two users do do a trade
of items live on the web. What I want to happen, and I have seen it done on
other sites, is open a window that both people see on their machine and are
able to offer trades. Once the trade is accepted by both people, the system
should update the database.

How can I create such an iterface?



--- End Message ---
--- Begin Message --- The Pear Pager class works like a champeen, too. It'll paginate results however you'd like it to.

~Rob


Chris W. Parker wrote:
Robert Cummings <mailto:[EMAIL PROTECTED]>
    on Thursday, August 21, 2003 4:46 PM said:


Don't retrieve ALL the queries then
only display a subset. Otherwise what's the point of using the LIMIT
clause for conservation of resources?  The "SELECT COUNT( * ) FROM
foo" query is usually optimized to be extremely fast so the first
query is almost negligible in contrast to the second.


Heh... I've never really used COUNT() so I'll have to see how much it
speeds up my searching. :)


Good idea!


Chris.


--- End Message ---
--- Begin Message ---
IMHO a PEAR pager package sounds like a sledgehammer when all that's
needed is a hammer.

Cheers,
Rob.

On Fri, 2003-08-22 at 17:59, Rob Yelvington wrote:
> The Pear Pager class works like a champeen, too.  It'll paginate results 
> however you'd like it to.
> 
> ~Rob
> 
> 
> Chris W. Parker wrote:
> > Robert Cummings <mailto:[EMAIL PROTECTED]>
> >     on Thursday, August 21, 2003 4:46 PM said:
> > 
> > 
> >>Don't retrieve ALL the queries then
> >>only display a subset. Otherwise what's the point of using the LIMIT
> >>clause for conservation of resources?  The "SELECT COUNT( * ) FROM
> >>foo" query is usually optimized to be extremely fast so the first
> >>query is almost negligible in contrast to the second.
> > 
> > 
> > Heh... I've never really used COUNT() so I'll have to see how much it
> > speeds up my searching. :)
> > 
> > 
> > Good idea!
> > 
> > Chris.

-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

--- End Message ---
--- Begin Message --- I have a list of floats that I need to put into an array, when I put them into an array manually the floats lose their format, for example:

$a = array(1=>3.50807443617658E-4);

print $a[1] returns: 0.00035080744361766

I'm familiar with round() and all the math functions, but I'm stumped.

Any light anyone can shed on this would be appreciated. ;)

Thanks,

~Rob Yelvington


--- End Message ---
--- Begin Message --- Rob Yelvington wrote:

I have a list of floats that I need to put into an array, when I put them into an array manually the floats lose their format, for example:

$a = array(1=>3.50807443617658E-4);

print $a[1] returns: 0.00035080744361766

I'm familiar with round() and all the math functions, but I'm stumped.

I don't know if any of these work or not, but it's about all I could find:


http://www.faqchest.com/prgm/php-l/php-01/php-0108/php-010814/php01080315_24951.html

http://www.visualbasicforum.com/t35177.html

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





--- End Message ---
--- Begin Message --- Active State's Komodo and Zend Studio are both awesome! I used to use Dreamweaver, but it's syntax highlighting stinks...IMHO.

~Rob


Bix wrote:
I use dreamweaver in live data mode quite often, really works a treat!

Set up a a site and in the testing server, just set it as /beta or the like,
then edit your script, and run it in live data and you can feed it
post/get/cookie data on the fly.

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
I need a WYSIWYG editor for PHP. That is all.
Can any1 advice me one( or more :-) )?
[/snip]

Dreamweaver?




--- End Message ---
--- Begin Message ---
Hi Im making a chatroom using flash and php, the one problem Im having is
deleting rows.
What I'm looking for is when they click on the button to send the message
into php-->mySql  it will also
check to see how many rows are in that table and if they are greater then
40, then to delete the rows
over 40, starting with the oldest ones ASC. I thought about using the chatID
number but that will change
everytime. So I was thinking of having it check for how many rows there is
if its greater then 40 rows then
delete thgose over 40 ASC.
Hope I explained it good enough :)
Anyhow if anyone has a solution for this I would really appreciate it.
Thanks in advance
Deadsam




--- End Message ---
--- Begin Message ---
Hi,

I've installed and tested phpopenchat 3.0b2 in my
development machine (Apache/1.3.27 (Unix) 
(Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6
PHP/4.3.0) with no problems.

When I moved to the "real server" (PHP Version 4.3.2)
it keeps giving me this answer

Fatal error: Unknown(): The script tried to execute a
method or access a property of an incomplete object.
Please ensure that the class definition
<b>adodb_mysql</b> of the object you are trying to
operate on was loaded _before_ the session was started
in /var/www/html/chat/include/class.Chat.inc on line
1130

I've used the test.php script that comes with no
problem (it basically tests for user/password,
existance of directories)

Any ideias ?

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

--- End Message ---
--- Begin Message ---
Hello,

I am trying to migrate a PHP script and just realized that the IIS server I am working 
on does not have the REQUEST_URI, SCRIPT_FILE_NAME and DOCUMENT_ROOT server variables. 
This makes the script malfunction.

Does anyone know how I can get these variables?

If you would like to see info on this server go to http://216.95.232.174/info.php

Thank you,

- Sid

--- End Message ---
--- Begin Message --- Sid wrote:

Hello,

I am trying to migrate a PHP script and just realized that the IIS server I am working on does not have the REQUEST_URI, SCRIPT_FILE_NAME and DOCUMENT_ROOT server variables. This makes the script malfunction.

Does anyone know how I can get these variables?

If you would like to see info on this server go to http://216.95.232.174/info.php

You have all of the info you need. If you don't have a variable present on your info.php page, then it's just not there. Take combinations of what is available and make what you need. That's your only option.


--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





--- End Message ---
--- Begin Message ---
Hi php-general,

I have a question about eval();

I'm having multiple pagenames I store in a database. I also have a lot
of functions starting with "content" and then the name of the pages
taken from the database. Ex: pagenames = about,download functions =
contentAbout(), contentDownload().
Now I would like to have a loop of if to make the decision which
function to use, like:
for($i = 0; $i < sizeof($databasepagename);$i++){
  if($_SERVER["PHP_SELF"] == $databasepagename[$i])
    eval("content".$databasepagename[$i]."();");
}
but that doesn't work...

How could I achieve that? Thanks for answering...

SvT

-- 
Who is the ennemy?


--- End Message ---
--- Begin Message ---
Hi,

Saturday, August 23, 2003, 8:38:32 AM, you wrote:
MW> Hi php-general,

MW> I have a question about eval();

MW> I'm having multiple pagenames I store in a database. I also have a lot
MW> of functions starting with "content" and then the name of the pages
MW> taken from the database. Ex: pagenames = about,download functions =
MW> contentAbout(), contentDownload().
MW> Now I would like to have a loop of if to make the decision which
MW> function to use, like:
MW> for($i = 0; $i < sizeof($databasepagename);$i++){
MW>   if($_SERVER["PHP_SELF"] == $databasepagename[$i])
MW>     eval("content".$databasepagename[$i]."();");
MW> }
MW> but that doesn't work...

MW> How could I achieve that? Thanks for answering...

MW> SvT

MW> -- 
MW> Who is the ennemy?

This should do it:

eval('${"content".$databasepagename}[$i]();');

-- 
regards,
Tom


--- End Message ---
--- Begin Message ---
Hello,

I have an array called $stems that has a bunch of numbers in it like 2, 5, 4, 4, 2, 6, 
8. What I want to do is delete a section of the array that has the same number. In the 
example of the numbers I listed, I'd want to delete one of the number 4's, and one of 
the number 2's so that it would read this: 2, 5, 4, 6, 8 instead. I'm really clueless 
as to how to do this, any ideas?

Thanks,
Stephen Craton

--- End Message ---
--- Begin Message --- Stephen Craton wrote:
Hello,

I have an array called $stems that has a bunch of numbers in it like 2, 5, 4, 4, 2, 6, 8. What I want to do is delete a section of the array that has the same number. In the example of the numbers I listed, I'd want to delete one of the number 4's, and one of the number 2's so that it would read this: 2, 5, 4, 6, 8 instead. I'm really clueless as to how to do this, any ideas?

Wild guess here, but maybe array_unique()??? ;)


--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





--- End Message ---
--- Begin Message ---
Haha, thanks. I was looking at array functions earlier but didn't think to
look at it since it seemed like something completely different. Oh well,
thanks!

Thanks,
Stephen Craton
----- Original Message ----- 
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "Stephen Craton" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 6:43 PM
Subject: Re: [PHP] Deleting same values from an array


> Stephen Craton wrote:
> > Hello,
> >
> > I have an array called $stems that has a bunch of numbers in it like 2,
5, 4, 4, 2, 6, 8. What I want to do is delete a section of the array that
has the same number. In the example of the numbers I listed, I'd want to
delete one of the number 4's, and one of the number 2's so that it would
read this: 2, 5, 4, 6, 8 instead. I'm really clueless as to how to do this,
any ideas?
>
> Wild guess here, but maybe array_unique()??? ;)
>
> -- 
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> PHP|Architect: A magazine for PHP Professionals – www.phparch.com
>
>
>
>
>
>


--- End Message ---
--- Begin Message ---
I have looked in the online manual for mssql and it describes a function
called string_format that will allow one to format your data stored in your
database. I am just not sure how to use it in a select statement and I can't
seem to find any examples of how to use it.

Any ideas?

Thanks,
Dale




--- End Message ---
--- Begin Message ---
* Thus wrote Dale Hersh ([EMAIL PROTECTED]):
> I have looked in the online manual for mssql and it describes a function
> called string_format that will allow one to format your data stored in your
> database. I am just not sure how to use it in a select statement and I can't
> seem to find any examples of how to use it.

Where exactly is this string_format described ?



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

--- End Message ---
--- Begin Message ---
Has anybody out there written code to facilitate the maintanance
(reading/resolving, writing) of Windows's shortcuts, Mac OS's aliases, or
Unix's symbolic links? I couldn't find anything in the File System section
of PEAR, but maybe there's other code out there for this sort of thing? Or
maybe something built into the core language that I'm not aware of?

Thanks for any pointers,
-Dan



--- End Message ---
--- Begin Message ---
It appears that I need to use exec() to execute the ssh command to, in turn, execute a 
command on a distant machine.  Are there better ways to do this?
 
Any tricks to retrieving the output of the remote command?  Do I need to use scp for 
this?
 
My server using Linux, and remote machines may be Sun or AIX.
 
thanks,
 
Warren Vail

--- End Message ---
--- Begin Message ---
Hi,
I am trying to upload something into a directory on my server but always i
am getting a permission denied ONLY from this server...i have tried it on 2
other servers and they seem to be working fine but i have to get it working
on this server as this server is the fastest and our production server.

I have looked at the folder permissions and CHMODED/changed them from 644 to
766 and finally 777 but am getting the same error, i then had a look at the
php info file (http://jumac.com/phpinfo.php) and i see file_uploading is set
to 1 and 1, safe mode is off, i am not too familier with file uploading so
is this right? if not, how can i change it? hopefully via a .htaccess as I
dont have access to the php.ini file directly.

These are my paths:
$UserUploadDir="/usr163/home/r/y/ryanknig/public_html/BWH-Ads-Images";
$UserUploadURL = "http://jumac.com/BWH-Ads-Images";;


Let me again point out that this problem only seems to be on this server,
the scripts including the upload is working perfectly on the other test
servers/sites.

Kindly reply,
-Ryan A.



We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com



--- End Message ---
--- Begin Message ---
how about giving the specs on all three servers?

So WE can see the differences.

Jim Lucas
----- Original Message ----- 
From: "Ryan A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 5:39 PM
Subject: [PHP] Access denied problem, please help


> Hi,
> I am trying to upload something into a directory on my server but always i
> am getting a permission denied ONLY from this server...i have tried it on
2
> other servers and they seem to be working fine but i have to get it
working
> on this server as this server is the fastest and our production server.
>
> I have looked at the folder permissions and CHMODED/changed them from 644
to
> 766 and finally 777 but am getting the same error, i then had a look at
the
> php info file (http://jumac.com/phpinfo.php) and i see file_uploading is
set
> to 1 and 1, safe mode is off, i am not too familier with file uploading so
> is this right? if not, how can i change it? hopefully via a .htaccess as I
> dont have access to the php.ini file directly.
>
> These are my paths:
> $UserUploadDir="/usr163/home/r/y/ryanknig/public_html/BWH-Ads-Images";
> $UserUploadURL = "http://jumac.com/BWH-Ads-Images";;
>
>
> Let me again point out that this problem only seems to be on this server,
> the scripts including the upload is working perfectly on the other test
> servers/sites.
>
> Kindly reply,
> -Ryan A.
>
>
>
> We will slaughter you all! - The Iraqi (Dis)information ministers site
> http://MrSahaf.com
>
>
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
How can I make a cookie never expire?

Thanks,

Stevie

________________________________________________________________
The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!

--- End Message ---
--- Begin Message --- Stevie D Peele wrote:

How can I make a cookie never expire?

You can't.


--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





--- End Message ---
--- Begin Message ---
does this include sub dirs ?

--
bye



--- End Message ---
--- Begin Message ---
End
(stopps some mail daemons or whatever I hope)
Can someone explain the user_dir and doc_root directives for me..?

; The directory under which PHP opens the script using /~username used only
; if nonempty.

isn't easy enought for me to understand.. Will PHP like filenametranslate it
or what?

Thanks in advance...
-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]



--- End Message ---
--- Begin Message --- Is there any settings that will silently disable the ability for a <.htaccess> file to use the

php_value auto_prepend_value "some file name"

directive? Some safe mode thing, or an ini setting or something?

The people at the host I'm at just CAN'T seem to get it working on my site. It's an ensim site.

I have errors turned on, and it doesn't even give an error. It's like the line doesn't exist.

If I had a browning light with some sabotted tungsten carbide slugs, I'd fix the G*^(*^N server,

after three days of messing with this. :-)



--- End Message ---
--- Begin Message ---
I want to query a table of text articles and when selecting them I am
wondering if I can grab the actual size of the articles in question.
 
So if someone has two articles, I want to see if they have reache 100kb
in total.
 
Does that make sense to anyone? is that possible with PHP?
 
Jeff 

--- End Message ---
--- Begin Message ---
Untested, but looks about right:

    select sum( length( article_text ) ) as total
    from articles_table
    where user_id = 'user to match";

This is SQL though, so it's kinda OT.

Cheers,
Rob.


On Fri, 2003-08-22 at 22:45, Jeff Lewis wrote:
> I want to query a table of text articles and when selecting them I am
> wondering if I can grab the actual size of the articles in question.
>  
> So if someone has two articles, I want to see if they have reache 100kb
> in total.
>  
> Does that make sense to anyone? is that possible with PHP?
>  
> Jeff 
-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

--- End Message ---

Reply via email to