|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Fri Aug 17 2001 - 08:21:00 CDT
php-general Digest 17 Aug 2001 13:21:00 -0000 Issue 821
Topics (messages 63115 through 63179):
File uploads in PHP
63115 by: Dr. Evil
63117 by: Data Driven Design
63165 by: James Holloway
Re: problem with a hacker
63116 by: CC Zona
hacks we should know about
63118 by: Bob
63120 by: Rasmus Lerdorf
63122 by: Lawrence.Sheed.dfait-maeci.gc.ca
63123 by: Bob
63124 by: Rasmus Lerdorf
63138 by: ReDucTor
63139 by: Lawrence.Sheed.dfait-maeci.gc.ca
63164 by: Dave Freeman
63166 by: Bob
Errcode: 2 when running LOAD DATA LOCAL INFILE on server
63119 by: Yeong CN
63121 by: Yeong CN
OT win95/apache/ query
63125 by: rm
63134 by: Lawrence.Sheed.dfait-maeci.gc.ca
63135 by: David Robley
mysql_db_name not working (followup)
63126 by: Peter Ostry
Formatting Percents
63127 by: David Smith
63130 by: David Smith
63131 by: David Smith
63132 by: David Robley
63137 by: Evan Nemerson
Putting Include files outside of document root
63128 by: Tom Malone
63129 by: David Smith
Re: Is there a special character I here? (Regular Expressions)
63133 by: Guilherme Pinto
63136 by: Rasmus Lerdorf
Help.
63140 by: rajarajeswari balasubramanian
63149 by: Balaji Ankem
Startup
63141 by: Roman
63142 by: Lawrence.Sheed.dfait-maeci.gc.ca
63143 by: Daniel Rezny
63144 by: Krzysztof Helbin
63145 by: ERISEN, Mehmet Kamil
Re: How to resume session by id?
63146 by: Darius Ivanauskas
MySQL Error.
63147 by: ERISEN, Mehmet Kamil
63159 by: David Robley
ldap compile problem. Please read.
63148 by: Johan Vikerskog (ECS)
Re: [PHP-INST] ldap compile problem. Please read.
63150 by: Jani Taskinen
63151 by: Johan Vikerskog (ECS)
GD - ttf without anti-aliasing
63152 by: Tobias Strauß
63153 by: Rasmus Lerdorf
63161 by: Tobias Strauß
63162 by: Rasmus Lerdorf
Dnsquery
63154 by: J.Mueller, pro.vider.de GmbH
63155 by: Jon Haworth
63156 by: Gianluca Baldo
Re: [PHP-WIN] Installation failed ! Please Help!
63157 by: Phil Driscoll
63175 by: Elias Santiago
Meaningful URL Validator
63158 by: Stig-Ørjan Smelror
63160 by: ReDucTor
MySQL Queries - Which to Use?
63163 by: Kevin
63169 by: _lallous
Q: tutor about PHP
63167 by: Ivo Stoykov
HTTPS w/ header() ?
63168 by: _lallous
Re: [PHP-WIN] Re: [PHP] Re: [PHP-WIN] Installation failed ! Please Help!
63170 by: Angie Tollerson
63176 by: Angie Tollerson
Answer to Expired Form Results
63171 by: Richard Baskett
Auth atalk and samba
63172 by: Knut Sætre
Reload - erase ------------- please help!
63173 by: Alex Sofronie
Re: tutor about PHP
63174 by: _lallous
<input type=select MULTIPLE?????>
63177 by: Tamas Bucsu
63178 by: Daniel Rezny
merging arrays quickly
63179 by: Michael
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
My PHP script needs to receive some files. I've seen sites which
accept them; they have a Browse button which lets the user select a
file to send. That's what I want to do.
I have a few questions about this. First of all, this is with
php4.06. Secondly, the files are all going to be images, and not very
large: no more than 50k.
What's the best way to do this? I notice that PHP can store these
files on disk, but I'm going to be storing them in a DB. I would
rather receive them directly into a PHP variable. Is this possible?
Or should I take them in a file, and then read them back in to a
variable?
Also, if they need to go into a file, which directory is safest for
this? /tmp contains some important files. And finally, how do I
limit the maximum file size that PHP will accept?
Thanks
attached mail follows:
This is a very good tutorial on the subject.
http://www.thickbook.com/extra/php_fileupload.phtml
Data Driven Design
1506 Tuscaloosa Ave
Holly Hill, Florida 32117
http://www.datadrivendesign.com
Phone: (386) 226-8979
Websites That WORK For You
----- Original Message -----
From: "Dr. Evil" <drevil
sidereal.kz>
To: <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 10:06 PM
Subject: [PHP] File uploads in PHP
>
> My PHP script needs to receive some files. I've seen sites which
> accept them; they have a Browse button which lets the user select a
> file to send. That's what I want to do.
>
> I have a few questions about this. First of all, this is with
> php4.06. Secondly, the files are all going to be images, and not very
> large: no more than 50k.
>
> What's the best way to do this? I notice that PHP can store these
> files on disk, but I'm going to be storing them in a DB. I would
> rather receive them directly into a PHP variable. Is this possible?
> Or should I take them in a file, and then read them back in to a
> variable?
>
> Also, if they need to go into a file, which directory is safest for
> this? /tmp contains some important files. And finally, how do I
> limit the maximum file size that PHP will accept?
>
> Thanks
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Hi there,
I haven't tested any of this, and there are probably some things that need
adding, but it'll give you an idea at least.
Form element:
<input type="file" name="thefile">
// What files do we want?
$types_we_want = array("image/gif", "image/jpeg", "image/pjpeg"); // allows
jpegs and gifs
// What is the max size we want (in bytes)?
$size_we_want = (50 * 1024); // 50Kb
// function to test whether or not the file is an image, and whether it is
in the correct
// size restriction
function CheckImage($thefile, $thefile_name, $thefile_type, $thefile_size,
$types_we_want, $size_we_want) {
if (!in_array($thefile_type, $types_we_want)) {
// the file is of invalid type
return false;
} else
if ($thefile_size > $size_we_want) {
// too big
return false;
}
return true;
}
// function to explain what's wrong with the file
function AnImageError($thefile, $thefile_name, $thefile_type, $thefile_size,
$types_we_want, $size_we_want) {
if (!in_array($thefile_type, $types_we_want)) {
// the file is of invalid type
echo $thefile_name . " is not a jpeg or gif!";
} else
if ($thefile_size > $size_we_want) {
// too big
echo $thefile_name ." is bigger than the allowed file size of " .
($size_we_want / 1024) . "Kb";
}
}
// function to change the name of the image (if you don't do this, and one
person
// uploads a file named "name.jpg" and then another person uploads a file
with
// the same name, the second will overwrite the original
function NewImageName($thefile_name, $thefile_type) {
$timestamp = time(); // use a timestamp
$prefix = substr($thefile_name, 0, 2); // get two characters from the
beginning of the filename
// for a bit of randomness (use another function like mtsrand() (see
manual))
// for something better
if ($thefile_type == "image/jpeg" || $thefile_type == "image/pjpeg") {
// file is a jpeg
$ext = ".jpg";
} else {
// file is a gif
$ext = ".gif";
}
$newfilename = $prefix . $timestamp . $ext;
return $newfilename;
}
// function to upload the file.
function DoUploadFile($thefile, $thefile_name, $thefile_type, $thefile_size)
{
global $connection; // this contains details of your mysql connection
$size =
GetImageSize($thefile);
list($ignoreme,$width,$ignoremeagain,$height) = explode("\"",$size[3]);
// gets the width and height of the file
// rename the image with the function we defined above
$newfilename = NewImageName($thefile_name, $thefile_type);
// specify a directory to copy the temp file to in the following line
// eg /home/mysite/web/images
if (!
copy($thefile, "/path/to/store/files" . $newfilename)) {
echo "Sorry, something's gone wrong here.";
} else {
// insert the data into your table. the columns are the unique id
of the file,
// the date the file is uploaded in datetime format,
// the name of the file (varchar, 50), its size in bytes( int), its
width(int) and height(int).
$insert_data = "INSERT INTO mysql_table
(picid, picorigin, picname, picsize,
picwidth, picheight)
VALUES
('', NOW(), '$newfilename', '$thefile_size',
'$width', '$height')";
$do_upload =
mysql_query($insert_data, $connection);
if (!$do_upload) { // query failed
echo "There was an error with the database.";
} else {
echo "Thanks. " . $thefile_name . " has been uploaded.";
}
}
}
// Put it all together in your form handling
if ($thefile_name != "") {
if (!CheckImage($thefile, $thefile_name, $thefile_type, $thefile_size,
$types_we_want, $size_we_want)) {
AnImageError($thefile, $thefile_name, $thefile_type, $thefile_size,
$types_we_want, $size_we_want);
} else {
DoUploadFile($thefile, $thefile_name, $thefile_type, $thefile_size);
}
}
Hope that helps,
James.
"Dr. Evil" <drevil
sidereal.kz> wrote in message
news:20010817020656.14242.qmail
sidereal.kz...
>
> My PHP script needs to receive some files. I've seen sites which
> accept them; they have a Browse button which lets the user select a
> file to send. That's what I want to do.
>
> I have a few questions about this. First of all, this is with
> php4.06. Secondly, the files are all going to be images, and not very
> large: no more than 50k.
>
> What's the best way to do this? I notice that PHP can store these
> files on disk, but I'm going to be storing them in a DB. I would
> rather receive them directly into a PHP variable. Is this possible?
> Or should I take them in a file, and then read them back in to a
> variable?
>
> Also, if they need to go into a file, which directory is safest for
> this? /tmp contains some important files. And finally, how do I
> limit the maximum file size that PHP will accept?
>
> Thanks
attached mail follows:
In article <AKEALILCEDONMAKEGPNJCEBDCDAA.php
everythingisfutile.com>,
php
everythingisfutile.com (Craig Henderson) wrote:
> Today a hacker managed to overwrite the text file I was using to
> store all the messages, which really isn't that big a surprise considering
> the permissions to the folder it is kept in are wide open thanks to my
> hosting company.
>
> My question is, is there anything that I can do so that only PHP scripts on
> the server are able to access the file? Or am I going to have to contact my
> hosting company and see if they can figure out how to set the permissions
> properly?
How about option #3: walk away immediately from a hosting company that is
so blantantly negligent/ignorant about such an basic security issue? Yikes.
(Your FTP program doesn't allow you to change permissions? 'Cuz if your
current one doesn't, you might wanna check around for one of the other FTP
clients that do...)
-- CC
attached mail follows:
hi i found it very helpful to know about hacks such as the below list and was wondering if anyone had any more dumb mistakes they could tell us before we make them.
1. http://www.somesite.com/source.php3?url=/etc/passwd 2. http://www.somesite.com?page=../../../../etc/passwd 3. not setting .inc files to be parsed by php 4. setting directory ownership to nobody
_________________________________________________________
Do You Yahoo!?
Get your free
yahoo.com address at http://mail.yahoo.com
attached mail follows:
> hi i found it very helpful to know about hacks such as the below list > and was wondering if anyone had any more dumb mistakes they could tell > us before we make them. > > 1. http://www.somesite.com/source.php3?url=/etc/passwd > 2. http://www.somesite.com?page=../../../../etc/passwd > 3. not setting .inc files to be parsed by php
This is the wrong solution to securing include files. The correct solution is to block any direct access to .inc files by either putting them outside your document root or by using an Apache deny rule.
-Rasmus
attached mail follows:
my 2 cents
Anyone with a clue doesn't use /etc/passwd anymore *shadow password file*, so thats kind of depreciated...
Your php process should not be running as root - typically you will give apache its own group, and apache + php will only be able to access files which that group has permission for.
If you are running IIS on Windows, you are pretty screwed. More holes than a sieve. Change to apache or zeus.
.htaccess files or apache.conf can set .inc or other files not to be passed to the webbrowser. You can set it to be restrictive, so only files you specify can get opened in a browser.
turn off directory browsing in apache for directories without a default page.
any data passed via the browser interface is suspicious. sanitize it for your data.
eg if expecting a numeric value, check its numeric and zero it if not.
error checking in the code is good, but try not to show too much info about the server.
initialise all variables before using them. (in case someone passes something via get/post that may get used).
if you use any common scripts, change the default passwords - there are a gazillion sites out there with the default script passwords out there.
use an include file for database access passwords. keep this out of the webserver directory if possible.
eg (sample example, not a functional one!) website is in /home/website /home is out of webservers directories.
db.ini saved in /home <?php $db_pass="my password"; $db_user="username"; ?>
myphppage in /home/website <?php
require "/home/db.ini";
mysql_connect ($db_pass,$db_user); ?>
common sense gets 99% of things. If the usual holes aren't there the script kiddies will go to another site with more holes.
Don't forget to also keep up to date with recommended patches for your OS. Bugtraq.com and securityfocus.com are good places to keep up with both ends of the stick.
-----Original Message-----
From: Bob [mailto:whyisityou2
yahoo.com]
Sent: August 17, 2001 11:43 AM
To: php-general
lists.php.net
Subject: [PHP] hacks we should know about
hi i found it very helpful to know about hacks such as the below list and was wondering if anyone had any more dumb mistakes they could tell us before we make them.
1. http://www.somesite.com/source.php3?url=/etc/passwd 2. http://www.somesite.com?page=../../../../etc/passwd 3. not setting .inc files to be parsed by php 4. setting directory ownership to nobody
_________________________________________________________
Do You Yahoo!?
Get your free
yahoo.com address at http://mail.yahoo.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
rasmus, if password.inc is being parsed by php then how would you get the code??? won't it just be a blank page??? oh i thought up one more ...
4. checking for html tags and php scripting when accepting data from text boxes
Rasmus Lerdorf wrote:
> > hi i found it very helpful to know about hacks such as the below list > > and was wondering if anyone had any more dumb mistakes they could tell > > us before we make them. > > > > 1. http://www.somesite.com/source.php3?url=/etc/passwd > > 2. http://www.somesite.com?page=../../../../etc/passwd > > 3. not setting .inc files to be parsed by php > > This is the wrong solution to securing include files. The correct > solution is to block any direct access to .inc files by either putting > them outside your document root or by using an Apache deny rule. > > -Rasmus
_________________________________________________________
Do You Yahoo!?
Get your free
yahoo.com address at http://mail.yahoo.com
attached mail follows:
> rasmus, if password.inc is being parsed by php then how would you get the > code??? won't it just be a blank page??? oh i thought up one more ...
Include files are written to be included. They are tested and debugged in the scope of the file that is including it. Parsing such an include file outside of that scope can lead to security issues.
> 4. checking for html tags and php scripting when accepting data from text > boxes
HTML tags sure, but PHP tags? Unless you are doing an eval() on the text, the PHP tags will never get parsed by PHP.
-Rasmus
attached mail follows:
<?php
if(ereg("/", $file))
{
$file = file("loggedips.txt");
$fp = fopen("loggedips.txt", "w");
fwrite($fp, "\r\n".$REMOTE_ADDR." to ".$file);
for($i=0;$i<sizeof($file);$i++)
fwrite($fp, $file[$i]);
fclose($fp);
die("Hack attempt...IP Logged");
}
else
showsource($file);
?>
----- Original Message -----
From: "Bob" <whyisityou2
yahoo.com>
To: "Rasmus Lerdorf" <rasmus
php.net>
Cc: <php-general
lists.php.net>
Sent: Friday, August 17, 2001 2:17 PM
Subject: Re: [PHP] hacks we should know about
> rasmus, if password.inc is being parsed by php then how would you get the
> code??? won't it just be a blank page??? oh i thought up one more ...
>
> 4. checking for html tags and php scripting when accepting data from text
> boxes
>
>
> Rasmus Lerdorf wrote:
>
> > > hi i found it very helpful to know about hacks such as the below list
> > > and was wondering if anyone had any more dumb mistakes they could tell
> > > us before we make them.
> > >
> > > 1. http://www.somesite.com/source.php3?url=/etc/passwd
> > > 2. http://www.somesite.com?page=../../../../etc/passwd
> > > 3. not setting .inc files to be parsed by php
> >
> > This is the wrong solution to securing include files. The correct
> > solution is to block any direct access to .inc files by either putting
> > them outside your document root or by using an Apache deny rule.
> >
> > -Rasmus
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free
yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
/ might be a correct path not a hack attempt. here's something normalizes a directory for a given path passed to it.
eg /index.txt
eg ../../../ will get parsed out. such as in the http://www.somesite.com?page=../../../../etc/passwd
Originally written for a directory browse script i use for a /pics directory on www.shanghaiguide.com/pics
I used to use realpath, but it started working differently on my box in the 4.0.6 release, so I wrote this
function TruePath ($path){ //Not really optimized but it does work.
$patharray = explode ("/", $path); $path="";$count=count($patharray);//We have multiple count($patharray) so a minor bit faster. for ($i=0;$i<$count; $i++){ if ( $patharray[$i] == "." || $patharray[$i]== ".." || ( (($i+1) < $count) && ($patharray[$i+1]== "..")) ) { //If the current pos is a . ignore, if pos+1 == .. ignore, lastly if current = .. ignore. } else { $path .= $patharray[$i]."/"; } } //Trim trailing slash $path = substr($path,0,-1); return ($path); }
May or may not be useful for someone. I welcome an optimized one using a regex, this was my non regex attempt ;)
Cheers,
Lawrence.
-----Original Message-----
From: ReDucTor [mailto:sjdtmv
tpg.com.au]
Sent: August 17, 2001 1:42 PM
To: Bob; Rasmus Lerdorf
Cc: php-general
lists.php.net
Subject: Re: [PHP] hacks we should know about
<?php
if(ereg("/", $file))
{
$file = file("loggedips.txt");
$fp = fopen("loggedips.txt", "w");
fwrite($fp, "\r\n".$REMOTE_ADDR." to ".$file);
for($i=0;$i<sizeof($file);$i++)
fwrite($fp, $file[$i]);
fclose($fp);
die("Hack attempt...IP Logged");
}
else
showsource($file);
?>
----- Original Message -----
From: "Bob" <whyisityou2
yahoo.com>
To: "Rasmus Lerdorf" <rasmus
php.net>
Cc: <php-general
lists.php.net>
Sent: Friday, August 17, 2001 2:17 PM
Subject: Re: [PHP] hacks we should know about
> rasmus, if password.inc is being parsed by php then how would you get the
> code??? won't it just be a blank page??? oh i thought up one more ...
>
> 4. checking for html tags and php scripting when accepting data from text
> boxes
>
>
> Rasmus Lerdorf wrote:
>
> > > hi i found it very helpful to know about hacks such as the below list
> > > and was wondering if anyone had any more dumb mistakes they could tell
> > > us before we make them.
> > >
> > > 1. http://www.somesite.com/source.php3?url=/etc/passwd
> > > 2. http://www.somesite.com?page=../../../../etc/passwd
> > > 3. not setting .inc files to be parsed by php
> >
> > This is the wrong solution to securing include files. The correct
> > solution is to block any direct access to .inc files by either putting
> > them outside your document root or by using an Apache deny rule.
> >
> > -Rasmus
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free
yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On 17 Aug 01, at 0:08, Lawrence.Sheed
dfait-maeci.gc wrote:
Not that I particularly want to turn this thread into a debate about unix security, but...
> Anyone with a clue doesn't use /etc/passwd anymore *shadow password file*, > so thats kind of depreciated...
While this is true a great deal of damage can still be started with access to your passwd file - gaining access to this file will, at the very least, disclose a list of valid system users, their home directory and default shell. This sort of information is useful when it comes to compromising a system - just imagine the circumstance where someone has development work sitting in their home directory - you now know the home directory.
Of course, security through obscurity is never a valid approach but it's also worth trying to avoid the more obvious stuff if you can.
CYA, Dave
-----------------------------------------------------------------------
Outback Queensland Internet - Longreach, Outback Queensland - Australia
http://www.outbackqld.net.au mailto:dfreeman
outbackqld.net.au
-----------------------------------------------------------------------
attached mail follows:
just found this article and the author recommends the following for secure php scripting. what do the expects think?
**** - Set register_globals off This option will stop PHP creating global variables for user input. That is, if a user submits the form variable 'hello' PHP won't set $hello, only HTTP_GET/POST_VARS['hello']. This is the mother of all other options and is best single option for PHP security, it will also kill basically every third party application available and makes programming PHP a whole lot less convenient.
*** - Set safe_mode on I'd love to describe exactly what safe_mode does but it isn't documented completely. It introduces a large variety of restrictions including: - The ability to restrict which commands can be executed (by exec() etc) - The ability to restrict which functions can be used - Restricts file access based on ownership of script and target file - Kills file upload completely This is a great option for ISP environments (for which it is designed) but it can also greatly improve the security of normal PHP environments given proper configuration. It can also be a complete pain in the neck.
** - Set open_basedir This option prevents any file operations on files outside specified directories. This can effectively kill a variety of local include() and remote file attacks. Caution is still required in regards to file upload and session files.
** - Set display_errors off, log_errors on This prevents PHP error messages being displayed in the returned web page. This can effectively limit an attackers exploration of the function of the script they are attacking. It can also make debugging very frustrating.
* - Set allow_url_fopen off This stops remote files functionality. Very few sites really need this functionality, I absolutely recommend every site set this option.
_________________________________________________________
Do You Yahoo!?
Get your free
yahoo.com address at http://mail.yahoo.com
attached mail follows:
Hi. This is the script I write to upload a .csv file into my online mysql database :
$sql_query="LOAD DATA LOCAL INFILE '$textfile' INTO TABLE purchase FIELDS TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date,courier_service,remark)";
$sql_query=($sql_query); $result=mysql_query($sql_query); $error_message=mysql_error(); if(!$result) { echo"Error : $sql_query<br><p>"; echo"$error_message"; } else if($result) { echo"$sql_query<br><p>"; echo"successful"; }
When I try to run the script in localhost, it is work.But when I try in the server,it can't work and return the error message like that :
Error : LOAD DATA LOCAL INFILE 'C:\\purchase3.csv' INTO TABLE purchase FIELDS TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date,courier_service,remark)
File 'C:\purchase3.csv' not found (Errcode: 2)
I think it maybe the backsplashes that make the error occur..
so I change the script like that :
$sql_query=stripslashes($sql_query);
But it still return the error message like that :
Error : LOAD DATA LOCAL INFILE 'C:\purchase3.csv' INTO TABLE purchase FIELDS TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date,courier_service,remark)
File 'C:purchase3.csv' not found (Errcode: 2)
What happen actually...hope that somebody can help me. Thanks.
Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/
attached mail follows:
Hi. This is the script I write to upload a .csv file into my online mysql database :
$sql_query="LOAD DATA LOCAL INFILE '$textfile' INTO TABLE purchase FIELDS TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date,courier_service,remark)";
$sql_query=($sql_query); $result=mysql_query($sql_query); $error_message=mysql_error(); if(!$result) { echo"Error : $sql_query<br><p>"; echo"$error_message"; } else if($result) { echo"$sql_query<br><p>"; echo"successful"; }
When I try to run the script in localhost, it is work.But when I try in the server,it can't work and return the error message like that :
Error : LOAD DATA LOCAL INFILE 'C:\\purchase3.csv' INTO TABLE purchase FIELDS TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date,courier_service,remark)
File 'C:\purchase3.csv' not found (Errcode: 2)
I think it maybe the backsplashes that make the error occur..
so I change the script like that :
$sql_query=stripslashes($sql_query);
But it still return the error message like that :
Error : LOAD DATA LOCAL INFILE 'C:\purchase3.csv' INTO TABLE purchase FIELDS TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date,courier_service,remark)
File 'C:purchase3.csv' not found (Errcode: 2)
What happen actually...hope that somebody can help me. Thanks.
Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/
attached mail follows:
Couple of months ago my HD died, I replaced it, re-installed win95, reinstalled apache and php. This evening I have to create a .htaccess file for a production web site to generate custom error messages like
ErrorDocument 404 /errordocs/404 ErrorDocument 500 /errordocs/500
etc.... win 95 will not let me create a file called .htaccess, I never had this problem on the win 95 before the old HD died!! Anyone know how to fix this? No win program will let me create this file so I assume this is a win config issue???
any help appreciated.
rm
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
Windows is a little stupid
try this from windows
start/run/command
echo > .htaccess
you now have a blank .htaccess file, copy it to wherever you need and edit it with whatever contents you need.
-----Original Message-----
From: rm [mailto:richand2002
yahoo.com]
Sent: August 17, 2001 12:27 PM
To: List PHP
Subject: [PHP] OT win95/apache/ query
Couple of months ago my HD died, I replaced it, re-installed win95, reinstalled apache and php. This evening I have to create a .htaccess file for a production web site to generate custom error messages like
ErrorDocument 404 /errordocs/404 ErrorDocument 500 /errordocs/500
etc.... win 95 will not let me create a file called .htaccess, I never had this problem on the win 95 before the old HD died!! Anyone know how to fix this? No win program will let me create this file so I assume this is a win config issue???
any help appreciated.
rm
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Fri, 17 Aug 2001 13:57, rm wrote: > Couple of months ago my HD died, I replaced it, > re-installed win95, reinstalled apache and php. This > evening I have to create a .htaccess file for a > production web site to generate custom error messages > like > > ErrorDocument 404 /errordocs/404 > ErrorDocument 500 /errordocs/500 > > etc.... win 95 will not let me create a file called > .htaccess, I never had this problem on the win 95 > before the old HD died!! Anyone know how to fix this? > No win program will let me create this file so I > assume this is a win config issue??? > > any help appreciated. >
Been a while since I've installed Lose95; does it give you an option somewhere in the install to choose the filesystem type, say FAT16 or FAT32? If you chose FAT16 you might strike this problem.
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIAHow do you write zero in Roman numerals?
attached mail follows:
> The command "mysql_db_name" is not working in our installation. > We get no error, but no database listing either if we use this command. > -----
Now I know more: mysql_tablename is not working either - we tested both commands in a separate file. I wonder what else is not working...
phpMyAdmin cannot be used, we get "document contained no data" and sometimes corrupted pages, code cut off where PHP variables should be inserted. There is a for-loop which displays the db's and tables. The variable $j for example is correctly inserted twice and at the third time it breaks the code and kills the loop. If we work around 'mysql_db_name' and 'mysql_tablename' by using 'mysql_fetch_rows' and remove all JavaScript code from the phpMyAdmin page 'left.php' then we get a correct view in the left frame. But if I click on a link, the game starts over in the other frame :(
Solaris 8 on a Netra AC200. Apache is 1.3.20, PHP 4.0.6 static compiled into Apache. We installed the last MySQL for Solaris 8 (3.23.41) We tried old and new phpAdmin's, copying the older version from a running Linux server.
Does Apache with static compiled PHP not work on Solaris 8? Since the pages behave really crazy, we think it has something to do with our PHP. Does someone have a similar installation - which versions? Or any help?
TIA, Peter
attached mail follows:
Hello everyone,
I am having a problem and can't seem to find an answer. Maybe someone here can help. I have a gift store that has prices of items. Well each item has a retail price that I have added to the DB. Let's say I want to sell the products at a discount of 15% but I don't want to change all the records. I want to use PHP to configure the 15% off price. How does one do this? Does the MySQL field need to be formatted a certain way?
I want to show:
Retail Price: $100.00 Your Price: $85.00
Thanks in advance and let me know if you need more information.
David Smith Indy Web Design 877-347-1270 or 317-573-2486 http://www.indywebdesign.com
-------------------------------------- Visit our online gift store at http://www.123giftshopping.com.
attached mail follows:
What I have in code.
If the retail price is $139.95 and I use the following:
$aprice = $hotbuys["price"] * .15; // Determine Discount $bprice = $hotbuys["price"] - $aprice; // Subtract Discount
$bprice = 118.9575
How can I format that to just 118.96?
-----Original Message-----
From: David Smith [mailto:webmaster
123giftshopping.com]
Sent: Thursday, August 16, 2001 11:31 PM
To: php-general
lists.php.net
Subject: [PHP] Formatting Percents
Importance: High
Hello everyone,
I am having a problem and can't seem to find an answer. Maybe someone here can help. I have a gift store that has prices of items. Well each item has a retail price that I have added to the DB. Let's say I want to sell the products at a discount of 15% but I don't want to change all the records. I want to use PHP to configure the 15% off price. How does one do this? Does the MySQL field need to be formatted a certain way?
I want to show:
Retail Price: $100.00 Your Price: $85.00
Thanks in advance and let me know if you need more information.
David Smith Indy Web Design 877-347-1270 or 317-573-2486 http://www.indywebdesign.com
-------------------------------------- Visit our online gift store at http://www.123giftshopping.com.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
DOH, wouldn't you know it. As soon as I sent these messages I found my answer...
$sellprice = round ($bprice, 2);
-----Original Message-----
From: David Smith [mailto:webmaster
123giftshopping.com]
Sent: Thursday, August 16, 2001 11:50 PM
To: David Smith; php-general
lists.php.net
Subject: RE: [PHP] Formatting Percents
What I have in code.
If the retail price is $139.95 and I use the following:
$aprice = $hotbuys["price"] * .15; // Determine Discount $bprice = $hotbuys["price"] - $aprice; // Subtract Discount
$bprice = 118.9575
How can I format that to just 118.96?
-----Original Message-----
From: David Smith [mailto:webmaster
123giftshopping.com]
Sent: Thursday, August 16, 2001 11:31 PM
To: php-general
lists.php.net
Subject: [PHP] Formatting Percents
Importance: High
Hello everyone,
I am having a problem and can't seem to find an answer. Maybe someone here can help. I have a gift store that has prices of items. Well each item has a retail price that I have added to the DB. Let's say I want to sell the products at a discount of 15% but I don't want to change all the records. I want to use PHP to configure the 15% off price. How does one do this? Does the MySQL field need to be formatted a certain way?
I want to show:
Retail Price: $100.00 Your Price: $85.00
Thanks in advance and let me know if you need more information.
David Smith Indy Web Design 877-347-1270 or 317-573-2486 http://www.indywebdesign.com
-------------------------------------- Visit our online gift store at http://www.123giftshopping.com.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Fri, 17 Aug 2001 14:19, David Smith wrote: > What I have in code. > > If the retail price is $139.95 and I use the following: > > $aprice = $hotbuys["price"] * .15; // Determine Discount > $bprice = $hotbuys["price"] - $aprice; // Subtract Discount > > $bprice = 118.9575 > > How can I format that to just 118.96?
$discount = .15; $discount_price = number_format($hotbuys["price"]*(1-$discount), 2)
should do something like what you want.
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIAIt's smart to pick your friends, but not to pieces.
attached mail follows:
When you print out the value just use printf("%.2f",$bprice); Like in C
On Thursday 16 August 2001 21:31, you wrote: > Hello everyone, > > I am having a problem and can't seem to find an answer. Maybe someone here > can help. I have a gift store that has prices of items. Well each item has > a retail price that I have added to the DB. Let's say I want to sell the > products at a discount of 15% but I don't want to change all the records. I > want to use PHP to configure the 15% off price. How does one do this? Does > the MySQL field need to be formatted a certain way? > > I want to show: > > Retail Price: $100.00 > Your Price: $85.00 > > Thanks in advance and let me know if you need more information. > > David Smith > Indy Web Design > 877-347-1270 or 317-573-2486 > http://www.indywebdesign.com > > -------------------------------------- > Visit our online gift store at http://www.123giftshopping.com.
attached mail follows:
I know this will sound like a dumb question to most, but I am new to *nix OS's -
If my document root is something like /home/myname/dir/ (as per phpinfo()), and I put my include files in /home/myname/includes/, is that actually outside of the document root, or is anything under /home/myname/ actually the document root?
Tom Malone Web Designer http://www.tom-malone.com
attached mail follows:
If you upload your index.htm file into the /dir folder and it shows then this is your document root folder. I would say if you place something in /myname then that would be outside your document root.
-----Original Message-----
From: Tom Malone [mailto:tom
tom-malone.com]
Sent: Thursday, August 16, 2001 11:40 PM
To: PHP Users
Subject: [PHP] Putting Include files outside of document root
I know this will sound like a dumb question to most, but I am new to *nix OS's -
If my document root is something like /home/myname/dir/ (as per phpinfo()), and I put my include files in /home/myname/includes/, is that actually outside of the document root, or is anything under /home/myname/ actually the document root?
Tom Malone Web Designer http://www.tom-malone.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I am starting on php, coming from Perl. One thing I really like on the way we can use regex in Perl is the shorthand:
\w --> [a-zA_Z0-9_] \W --> [^a-zA_Z0-9_] \d --> [0-9] \D --> [^0-9] \s --> white space characters ...
Is this shorthand handled in php?
Thanks,
Guilherme
On 8/16/01 5:17 PM, in article
Pine.BSF.4.10.10108170003580.9813-100000
localhost, "Philip Olson"
<philip
cornado.com> wrote:
> It's probably a good idea to learn a bit about regular
> expressions.
>
> In short, PHP gives us two types of regular expressions
> to play with, POSIX and PCRE. For more information :
>
> PCRE : http://php.net/manual/en/ref.pcre.php
> POSIX : http://php.net/manual/en/ref.regex.php
>
> The following is an example rich tutorial :
>
> http://www.phpbuilder.org/columns/dario19990616.php3
>
> It uses ereg, which is POSIX :
>
> ereg() : http://php.net/manual/en/function.ereg.php
>
> Your question is "How can I make sure a string contains
> ONLY alpha-numeric characters?" That could look like :
>
> $string = 'examPle123';
>
> if (eregi("^[a-z0-9]+$",$string)) {
>
> echo 'String is alpha-numeric';
> } else {
> echo 'String is NOT alpha-numeric';
> }
>
> Which in english says :
>
> if the string :
> - begins with // ^
> - contains one to an unlimited number of // +
> - ends with // $
> the following characters :
> a-z // all lowercase letters
> A-Z // comes from i in eregi (case insensitive)
> 0-9 // all numbers
> then this is TRUE.
>
> Let's say we wanted to make sure the length was between
> 3-11 characters, tinkering with the regex the following
> works :
>
> if (eregi("^[a-z0-9]{3,11}$",$string)) {
>
> echo 'Is alpha-numeric and 3-11 characters in length';
> } else {
> echo 'Is NOT alpha-numeric and/or 3-11 characters in length';
> }
>
> Allowing spaces in $string is easy as : [a-z0-9 ]
>
> Also, some good variable and string functions exist :
>
> variables : http://php.net/manual/en/ref.var.php
> strings : http://php.net/manual/en/ref.strings.php
>
> Regards,
> Philip Olson
>
>
> On Thu, 16 Aug 2001, Brandon Orther wrote:
>
>> Hello,
>>
>> I am looking for a way to check a string if it has anything other than
>> Numbers or Letters. Does anyone know how to do this?
>> Thank you,
>>
>> --------------------------------------------
>> Brandon Orther
>> WebIntellects Design/Development Manager
>> brandon
webintellects.com
>> 800-994-6364
>> www.webintellects.com
>> --------------------------------------------
>>
>>
>
attached mail follows:
> I am starting on php, coming from Perl. One thing I really like on the way > we can use regex in Perl is the shorthand: > > \w --> [a-zA_Z0-9_] > \W --> [^a-zA_Z0-9_] > \d --> [0-9] > \D --> [^0-9] > \s --> white space characters > ... > > Is this shorthand handled in php?
Sure, all the preg* functions take Perl-style regular expressions like that. Read the manual: http://php.net/pcre
-Rasmus
attached mail follows:
Hi,
I have created a database with the backend of Mysql and i am accesing the database using PHP scripts.
In the database there is one field, which has the information of the structure of a molecule as a Coordinate data.
when i am using the mysql_fetch_array() command to retrive the data, it's just taking the text part of the file, which is simply a ASCII characters and displaying that on the browser screen.
I have a program whihc will take that coordinate file as the input and it will convert that file into a 3D structure, i have the exe file of that program.
Now my query is
how do i access this exe file in the php script???,
Is that Possible in some way???
so the data is retrived it has to automatically invoke the ./xxx file and it will give the 3D rendering of that data which is in the form of coordinate file.
Please give me some suggestiosn about this.
Thanks in advance.
Raji
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
first let me know about that exe file.
can u call that exe file in browser??? If yes can we give like http://path to exe//??input co-ords...
-Balaji
----- Original Message -----
From: rajarajeswari balasubramanian
To: php-general
lists.php.net
Sent: Friday, August 17, 2001 12:09 PM
Subject: [PHP] Help.
Hi,
I have created a database with the backend of Mysql and i am accesing the database using PHP scripts.
In the database there is one field, which has the information of the structure of a molecule as a Coordinate data.
when i am using the mysql_fetch_array() command to retrive the data, it's just taking the text part of the file, which is simply a ASCII characters and displaying that on the browser screen.
I have a program whihc will take that coordinate file as the input and it will convert that file into a 3D structure, i have the exe file of that program.
Now my query is
how do i access this exe file in the php script???,
Is that Possible in some way???
so the data is retrived it has to automatically invoke the ./xxx file and it will give the 3D rendering of that data which is in the form of coordinate file.
Please give me some suggestiosn about this.
Thanks in advance.
Raji
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
For additional commands, e-mail: php-general-help
lists.php.net
To contact the list administrators, e-mail: php-list-admin
lists.php.net
- text/plain attachment: Wipro_Disclaimer.txt
attached mail follows:
I install apache 1.3.20, php 4.0.6 and mysql on Red Hat Linux 7.0 but I must start thei manualy. I want to start this services automatically when starts the linux. How ?
roman
attached mail follows:
you're startup files are typically in /etc/rc.d/init.d on redhat
be *very* careful though!
Create a script which starts whatever you need in there.
create a text file which starts apache.
eg pico startapache
#start apache apachectl start
save file
chmod +x it to make it executable
do the same for mysql (I forget the command line at the moment).
restart and test.
you may need to be root to access /etc/rd.d/init/d depends on your system
cheers.
Lawrence.
-----Original Message-----
From: Roman [mailto:rduriancik
indprop.gov.sk]
Sent: August 17, 2001 2:47 PM
To: Php-General
Subject: [PHP] Startup
I install apache 1.3.20, php 4.0.6 and mysql on Red Hat Linux 7.0 but I must start thei manualy. I want to start this services automatically when starts the linux. How ?
roman
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hello Roman,
Friday, August 17, 2001, 8:46:45 AM, you wrote:
R> I install apache 1.3.20, php 4.0.6 and mysql on Red Hat Linux 7.0 but R> I must start thei manualy. I want to start this services automatically when R> starts the linux. How ?
R> roman
give a link to /etc/rc.d/rcxx where xx is a number of your runlevel.
or give the start script to /etc/rc.d/rc.local. On the end of this file.
I hope it helps
-- Best regards, Daniel mailto:danielrezny.sk
attached mail follows:
Dnia Fri, 17 Aug 2001, Roman napisa³(a):
> I install apache 1.3.20, php 4.0.6 and mysql on Red Hat Linux 7.0 but > I must start thei manualy. I want to start this services automatically when > starts the linux. How ?
try this:
as type 'setup', from menu select 'System services' and select httpd to start every time.
-- Krzysztof Helbin _______________________________________________________
attached mail follows:
Hello All, I receive the following warning message. When I reload the page, the message is the error message does not show up again. Funny thing is, that there are other parts of the page generated from the same database using the same mysql_pconnect and they are fine. I am using a standard $sql mysql_query($sql) mysql_fetch_array($result) kind of command, nothing too fancy. Did anybody have a similar experince?
Warning: Supplied argument is not a valid MySQL result resource in /xxxxxxx/xxxxxxx//index.php on line 45
thanks.
Roman <rduriancik
indprop.gov.sk> wrote: I install apache 1.3.20, php 4.0.6 and mysql on Red Hat Linux 7.0 but
I must start thei manualy. I want to start this services automatically when
starts the linux. How ?
roman
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
Mehmet Erisen http://www.erisen.com
--------------------------------- Do You Yahoo!? Make international calls for as low as $0.04/minute with Yahoo! Messenger.
attached mail follows:
Date: Fri, 17 Aug 2001 09:18:47 +0200 (GMT-2) From: Darius Ivanauskas <darius
nomagiclt.com>
To: Renze Munnik <renze
datalink.nl>
cc: Niklas Lampen <niklas.lampen
luukku.com>, php-general
lists.php.net
Message-ID: <Pine.LNX.4.21.0108170916380.16127-100000
banginis.nomagic.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
Content-Transfer-Encoding: QUOTED-PRINTABLE
Subject: Re: [PHP] How to resume session by id?
On Thu, 16 Aug 2001, Renze Munnik wrote:
> On Thu, Aug 16, 2001 at 05:41:47PM +0200, Darius Ivanauskas wrote: > > What we have here: registering variable $Session into current session. > > This code works perfectly if session id is propogated normally. > > Bu what i need is to set session_id and session_name so it can resume > > given session by given id. Normally session id is propagating through > > cookie. I have set [ini] session.use_cookie =3D 0; So it passes GET/POS= T > > session_id propagating method. And using url as i wrote before it doesn= 't > > gets session id and starts new session :(( So i need somehow to force i= t > > to use known session_id and start session using this session_id. > >=20 > > -- > > Darius Ivanauskas=20 >=20 >=20 I can't use cookies because i need to navigate through different dns, and http<-->https urls. But you can specify only one cookie domain for session cookies. :(
-- Darius Ivanauskas> Why don't you use session.use_cookie. When U use cookies for your > sessions, you can use whatever URL you like. PHP won't care about > that, and just use the cookie in order to determine the current > session. >=20 > --=20 >=20 > * R&zE: >=20 > -- =BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB=BB= =BB > -- Renze Munnik > -- DataLink BV > -- > -- E: renze
datalink.nl > -- W: +31 23 5326162 > -- F: +31 23 5322144 > -- M: +31 6 21811143 > -- H: +31 23 5516190 > -- > -- Stationsplein 82 > -- 2011 LM HAARLEM > -- > -- http://www.datalink.nl > -- =AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB=AB= =AB >=20
attached mail follows:
Hello All, I receive the following warning message. When I reload the page, the message is the error message does not show up again. Funny thing is, that there are other parts of the page generated from the same database using the same mysql_pconnect and they are fine. I am using a standard $sql mysql_query($sql) mysql_fetch_array($result) kind of command, nothing too fancy. Did anybody have a similar experince?
Warning: Supplied argument is not a valid MySQL result resource in /xxxxxxx/xxxxxxx//index.php on line 45
thanks.
Roman wrote: I install apache 1.3.20, php 4.0.6 and mysql on Red Hat Linux 7.0 but I must start thei manualy. I want to start this services automatically when starts the linux. How ?
roman
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
Mehmet Erisen http://www.erisen.com
--------------------------------- Do You Yahoo!? Make international calls for as low as $0.04/minute with Yahoo! Messenger.
Mehmet Erisen http://www.erisen.com
--------------------------------- Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
Content-Type: text/plain; charset="iso-8859-1" From: David Robley <huntsman
www.nisu.flinders.edu.au>
Reply-To: huntsman
www.nisu.flinders.edu.au
To: "ERISEN, Mehmet Kamil" <erisen
yahoo.com>,
"ERISEN, Mehmet Kamil" <erisen
yahoo.com>,
Php-General <php-general
lists.php.net>
Date: Fri, 17 Aug 2001 18:39:17 +0930
MIME-Version: 1.0
Message-Id: <01081718391703.03323
www>
Content-Transfer-Encoding: 8bit
Subject: Re: [PHP] MySQL Error.
On Fri, 17 Aug 2001 16:49, ERISEN, Mehmet Kamil wrote: > Hello All, > I receive the following warning message. When I reload the page, the > message is the error message does not show up again. Funny thing is, > that there are other parts of the page generated from the same database > using the same mysql_pconnect and they are fine. I am using a standard > $sql mysql_query($sql) mysql_fetch_array($result) kind of command, > nothing too fancy. Did anybody have a similar experince? > > Warning: Supplied argument is not a valid MySQL result resource in > /xxxxxxx/xxxxxxx//index.php on line 45 > > > thanks.
Use mysql_error() after your call to mysql to give you the error that is causing your query to fail.
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIADislexics of the world, UNTIE!
attached mail follows:
I sended this E-mail to two PHP mailing lists yesterday. Both this one and the installation mailing list. Doesnt seem that anyone can solve this problem for me but i dont believe that. Can someone PLEASE help me! > I get the following error message: > > gcc -I. -I/export/scratch/apps3/php-4.0.6/ext/mysql/libmysql -I/export/scratch/apps3/php-4.0.6/main -I/export/scratch/apps3/php-4.0.6 -I/export/scratch/apps3/apache_1.3.20/src/include -I/export/scratch/apps3/apache_1.3.20/src/os/unix -I/export/scratch/apps3/php-4.0.6/Zend -I/export/scratch/apps3/ldap/include -I/export/scratch/apps3/php-4.0.6/ext/mysql/libmysql -I/export/scratch/apps3/php-4.0.6/ext/xml/expat/xmltok -I/export/scratch/apps3/php-4.0.6/ext/xml/expat/xmlparse -I/export/scratch/apps3/php-4.0.6/TSRM -D_POSIX_PTHREAD_SEMANTICS -DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c my_getwd.c && touch my_getwd.lo > my_getwd.c:58: #error "No way to get current directory" > *** Error code 1 > make: Fatal error: Command failed for target `my_getwd.lo' > Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql/libmysql > *** Error code 1 > make: Fatal error: Command failed for target `all-recursive' > Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql/libmysql > *** Error code 1 > make: Fatal error: Command failed for target `all-recursive' > Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql > *** Error code 1 > make: Fatal error: Command failed for target `all-recursive' > Current working directory /export/scratch/apps3/php-4.0.6/ext > > Afterwards the compilation exits. > > If i compile without --with-ldap everything works great but if i do it with ldap i get this error message everytime. > > Can anyone please help me. > I have been struggled with this all morning. > > //Johan > > > Johan Vikerskog > Technician - CAE Tools Support > Research & Technology Development > ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' > Ericsson Mobile Communications AB > Mobile Phones & Terminals Telephone: +46 46 19 33 38 > Nya Vattentornet Telefax: +46 46 19 32 36 > SE-221 83 Lund, Sweden >
attached mail follows:
You're not giving enough information.. What is the WHOLE configure line you have used? On what system is this happening?
--Jani
On Fri, 17 Aug 2001, Johan Vikerskog (ECS) wrote:
> > I sended this E-mail to two PHP mailing lists yesterday. Both this one and the installation mailing list. Doesnt > seem that anyone can solve this problem for me but i dont believe that. > Can someone PLEASE help me! >> I get the following error message: >> >> gcc -I. -I/export/scratch/apps3/php-4.0.6/ext/mysql/libmysql -I/export/scratch/apps3/php-4.0.6/main -I/export/scratch/apps3/php-4.0.6 -I/export/scratch/apps3/apache_1.3.20/src/include -I/export/scratch/apps3/apache_1.3.20/src/os/unix -I/export/scratch/apps3/php-4.0.6/Zend -I/export/scratch/apps3/ldap/include -I/export/scratch/apps3/php-4.0.6/ext/mysql/libmysql -I/export/scratch/apps3/php-4.0.6/ext/xml/expat/xmltok -I/export/scratch/apps3/php-4.0.6/ext/xml/expat/xmlparse -I/export/scratch/apps3/php-4.0.6/TSRM -D_POSIX_PTHREAD_SEMANTICS -DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c my_getwd.c && touch my_getwd.lo >> my_getwd.c:58: #error "No way to get current directory" >> *** Error code 1 >> make: Fatal error: Command failed for target `my_getwd.lo' >> Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql/libmysql >> *** Error code 1 >> make: Fatal error: Command failed for target `all-recursive' >> Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql/libmysql >> *** Error code 1 >> make: Fatal error: Command failed for target `all-recursive' >> Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql >> *** Error code 1 >> make: Fatal error: Command failed for target `all-recursive' >> Current working directory /export/scratch/apps3/php-4.0.6/ext >> >> Afterwards the compilation exits. >> >> If i compile without --with-ldap everything works great but if i do it with ldap i get this error message everytime. >> >> Can anyone please help me. >> I have been struggled with this all morning. >> >> //Johan >> >> >> Johan Vikerskog >> Technician - CAE Tools Support >> Research & Technology Development >> ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' >> Ericsson Mobile Communications AB >> Mobile Phones & Terminals Telephone: +46 46 19 33 38 >> Nya Vattentornet Telefax: +46 46 19 32 36 >> SE-221 83 Lund, Sweden >> > >
attached mail follows:
Sorry! Here comes more information. This is how my configure looks when i am trying to compile. The ldap directory is were i installed OpenLDAP. The compilation of OpenLDAP was succesfull and uses BerkeleyDB's ldbm. I compile on a Solaris 8 machine and the compilation of PHP works without any errors when i compile without ldap.
./configure --prefix=$phpinstallpath \ --with-apache=$apachesrc \ --enable-track-vars \ --with-ldap=/export/scratch/apps3/ldap \ --with-config-file-path=$phpinipath
-----Original Message-----
From: Jani Taskinen [mailto:sniper
iki.fi]
Sent: den 17 augusti 2001 09:35
To: Johan Vikerskog (ECS)
Cc: php-install
lists.php.net; php-general
lists.php.net
Subject: Re: [PHP-INST] ldap compile problem. Please read.
You're not giving enough information.. What is the WHOLE configure line you have used? On what system is this happening?
--Jani
On Fri, 17 Aug 2001, Johan Vikerskog (ECS) wrote:
> > I sended this E-mail to two PHP mailing lists yesterday. Both this one and the installation mailing list. Doesnt > seem that anyone can solve this problem for me but i dont believe that. > Can someone PLEASE help me! >> I get the following error message: >> >> gcc -I. -I/export/scratch/apps3/php-4.0.6/ext/mysql/libmysql -I/export/scratch/apps3/php-4.0.6/main -I/export/scratch/apps3/php-4.0.6 -I/export/scratch/apps3/apache_1.3.20/src/include -I/export/scratch/apps3/apache_1.3.20/src/os/unix -I/export/scratch/apps3/php-4.0.6/Zend -I/export/scratch/apps3/ldap/include -I/export/scratch/apps3/php-4.0.6/ext/mysql/libmysql -I/export/scratch/apps3/php-4.0.6/ext/xml/expat/xmltok -I/export/scratch/apps3/php-4.0.6/ext/xml/expat/xmlparse -I/export/scratch/apps3/php-4.0.6/TSRM -D_POSIX_PTHREAD_SEMANTICS -DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c my_getwd.c && touch my_getwd.lo >> my_getwd.c:58: #error "No way to get current directory" >> *** Error code 1 >> make: Fatal error: Command failed for target `my_getwd.lo' >> Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql/libmysql >> *** Error code 1 >> make: Fatal error: Command failed for target `all-recursive' >> Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql/libmysql >> *** Error code 1 >> make: Fatal error: Command failed for target `all-recursive' >> Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql >> *** Error code 1 >> make: Fatal error: Command failed for target `all-recursive' >> Current working directory /export/scratch/apps3/php-4.0.6/ext >> >> Afterwards the compilation exits. >> >> If i compile without --with-ldap everything works great but if i do it with ldap i get this error message everytime. >> >> Can anyone please help me. >> I have been struggled with this all morning. >> >> //Johan >> >> >> Johan Vikerskog >> Technician - CAE Tools Support >> Research & Technology Development >> ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' >> Ericsson Mobile Communications AB >> Mobile Phones & Terminals Telephone: +46 46 19 33 38 >> Nya Vattentornet Telefax: +46 46 19 32 36 >> SE-221 83 Lund, Sweden >> > >
attached mail follows:
How can I create images with gd, so that the text (true type font) written on it will not be anti-aliased?
attached mail follows:
> How can I create images with gd, so that the text (true type font) written > on it will not be anti-aliased?
Supposedly by using a negative colour index. Although I have had limited success with that.
-Rasmus
attached mail follows:
What's a negative color index and how can I use it? My code so far is:
header ("Content-type: image/png"); $img = imagecreate (200, 200); $fontcolor = imagecolorallocate ($img, 0, 0, 0); $text = "This is a test!"; imagegetttftext ($img, 12, 0, 0, 0, $fontcolor, $text); ImagePng ($img); ImageDestroy ($img);
attached mail follows:
Read the documentation: http://php.net/imagettftext This stuff is not a secret.
-Rasmus
On Fri, 17 Aug 2001, Tobias Strauß wrote:
> What's a negative color index and how can I use it? > My code so far is: > > header ("Content-type: image/png"); > $img = imagecreate (200, 200); > $fontcolor = imagecolorallocate ($img, 0, 0, 0); > $text = "This is a test!"; > imagegetttftext ($img, 12, 0, 0, 0, $fontcolor, $text); > ImagePng ($img); > ImageDestroy ($img); > > > > >
attached mail follows:
Hello,
I've tried to execute the system function dnsquery, which works fine from a shell:
% dnsquery -h domain.net ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61611 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2 ;; domain.net, type = ANY, class = IN domain.net. 2D IN NS NS2.domain.net. domain.net. 2D IN NS NS1.domain.net. domain.net. 2D IN NS NS2.domain.net. domain.net. 2D IN NS NS1.domain.net. NS2.domain.net. 2D IN A 198.182.225.2 NS1.domain.net. 2D IN A 204.107.140.2
but not with PHP-functions, e.g.
system("dnsquery -h domain.net"); exec("dnsquery -h domain.net");
There is no output at all. I'm using FreeBSD 4.2 Server, Apache 1.3.11, PHP 4.04
Does anyone have an idea how I can get this work?
Thanks very much.
Juergen
attached mail follows:
I think you need to assign it to a variable and then echo that:
$dnsquery = exec("dnsquery -h domain.net"); echo $dnsquery;
HTH Jon
-----Original Message-----
From: J.Mueller, pro.vider.de GmbH [mailto:j.mueller
pro.vider.de]
Sent: 17 August 2001 09:29
To: 'php-general
lists.php.net'
Subject: [PHP] Dnsquery
Hello,
I've tried to execute the system function dnsquery, which works fine from a shell:
% dnsquery -h domain.net ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61611 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2 ;; domain.net, type = ANY, class = IN domain.net. 2D IN NS NS2.domain.net. domain.net. 2D IN NS NS1.domain.net. domain.net. 2D IN NS NS2.domain.net. domain.net. 2D IN NS NS1.domain.net. NS2.domain.net. 2D IN A 198.182.225.2 NS1.domain.net. 2D IN A 204.107.140.2
but not with PHP-functions, e.g.
system("dnsquery -h domain.net"); exec("dnsquery -h domain.net");
There is no output at all. I'm using FreeBSD 4.2 Server, Apache 1.3.11, PHP 4.04
Does anyone have an idea how I can get this work?
attached mail follows:
JH> I think you need to assign it to a variable and then echo that: JH> $dnsquery = exec("dnsquery -h domain.net"); JH> echo $dnsquery;
This is from the manual: "exec() executes the given command, however it does not output anything"
Use system instead.
Cheers, Gianluca
JH> -----Original Message-----
JH> From: J.Mueller, pro.vider.de GmbH [mailto:j.mueller
pro.vider.de]
JH> Sent: 17 August 2001 09:29
JH> To: 'php-general
lists.php.net'
JH> Subject: [PHP] Dnsquery
JH> Hello,
JH> I've tried to execute the system function dnsquery, which works fine JH> from a shell:
JH> % dnsquery -h domain.net ;; ->>>HEADER<<- opcode: QUERY, status: NOERROR, id: 61611 JH> ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2 JH> ;; domain.net, type = ANY, class = IN JH> domain.net. 2D IN NS NS2.domain.net. JH> domain.net. 2D IN NS NS1.domain.net. JH> domain.net. 2D IN NS NS2.domain.net. JH> domain.net. 2D IN NS NS1.domain.net. JH> NS2.domain.net. 2D IN A 198.182.225.2 JH> NS1.domain.net. 2D IN A 204.107.140.2
JH> but not with PHP-functions, e.g.
JH> system("dnsquery -h domain.net"); JH> exec("dnsquery -h domain.net");
JH> There is no output at all. I'm using FreeBSD 4.2 Server, Apache 1.3.11, PHP JH> 4.04
JH> Does anyone have an idea how I can get this work?
gianluca.baldo
bcninedita.com
BcnInédita EURO RSCG INTERACTION www.bcninedita.com Planella, 39 08017 Barcelona Tel.34 932 531 950 (directo 93 253 19 53) Fax. 34 932 114 546
attached mail follows:
On Thursday 16 August 2001 7:35 pm, Elias Santiago wrote: > I believe that IIS passes the script name to php.exe with the first %s. I > think IIS replaces the first %s with the script name. From the second > article, I suppose that if the %s is changed to %S, the name passed to > php.exe would be UPPERCASE. Can anyone verify this?
I can't verify that, but I can verify that I've had php running without any trouble at all ever on about a dozen NT4 boxes without %s %s anywhere in site without any problems at all :)
Maybe the default behaviour of IIS (since it is the sensible behaviour) is to pass the script name to the exe it calls.
Cheers
-- Phil Driscoll
attached mail follows:
Me too, I've never had any problems with PHP running it with or without the %s %s. I guess that IIS 3 required that, but IIS 4./5 not necessarily require it (a useful bug??). Nevertheless, it work without them anyways. I only wish that the PHP ISAPI module is FINALLY made stable (production quality) to use it on my sites.
"Phil Driscoll" <phil
dialsolutions.co.uk> wrote in message
news:E15XfM2-000Ane-0W
anchor-post-32.mail.demon.net...
> On Thursday 16 August 2001 7:35 pm, Elias Santiago wrote:
> > I believe that IIS passes the script name to php.exe with the first %s.
I
> > think IIS replaces the first %s with the script name. From the second
> > article, I suppose that if the %s is changed to %S, the name passed to
> > php.exe would be UPPERCASE. Can anyone verify this?
>
> I can't verify that, but I can verify that I've had php running without
any
> trouble at all ever on about a dozen NT4 boxes without %s %s anywhere in
site
> without any problems at all :)
>
> Maybe the default behaviour of IIS (since it is the sensible behaviour) is
to
> pass the script name to the exe it calls.
>
> Cheers
> --
> Phil Driscoll
attached mail follows:
Hi all,
I'm trying to make an URL validator, but I'm kind of stuck now.
What I awnt it to do is as follows:
It first checks to see if the server is up or down by doing a general fopen() on the URL.
It then opens the URL in some way, checks the HTTP response code and spews out a meaningful message to the user. E.g. if it's a 404, the user will get a message saying the the page was not found.
Has anybody done this before and have the kind heart to share it with me? ;)
TIA
-- Stig-Ørjan Smelror SystemutviklerLinux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway
tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/
attached mail follows:
<?php
$url = "http://url";
if($file =
file($url))
die("Invalid");
for($i=0;$i<sizeof($file);$i++)
{
if(eregi("<b>404</b>", $file[$i]))
die("Invalid");
if(eregi(">404 ", $file[$i]))
die("Invalid");
if(eregi("404 Error", $file[$i]))
die("Invalid");
if(eregi("not exist", $file[$i]))
die("Invalid");
}
echo $url." is Valid";
?>
----- Original Message -----
From: "Stig-Ørjan Smelror" <sos
LinCom.no>
To: <php-general
lists.php.net>
Sent: Friday, August 17, 2001 6:59 PM
Subject: [PHP] Meaningful URL Validator
> Hi all,
>
> I'm trying to make an URL validator, but I'm kind of stuck now.
>
> What I awnt it to do is as follows:
>
> It first checks to see if the server is up or down by doing a general
> fopen() on the URL.
>
> It then opens the URL in some way, checks the HTTP response code and
> spews out a meaningful message to the user.
> E.g. if it's a 404, the user will get a message saying the the page was
> not found.
>
> Has anybody done this before and have the kind heart to share it with me?
;)
>
>
> TIA
>
> --
> Stig-Ørjan Smelror
> Systemutvikler
>
> Linux Communications AS
> Sandakerveien 48b
> Box 1801 - Vika
> N-0123 Oslo, Norway
>
> tel. +47 22 09 28 80
> fax. +47 22 09 28 81
> http://www.lincom.no/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
I have been coding php for a while now but can't seem to get a grasp on which type of query I should use for a given situation.
mysql_fetch_array mysql_fetch_object mysql_fetch_row
Perhaps there is no right answer or perhaps the answer comes with experience. In any case, I would love to get some pointers.
attached mail follows:
It all depends on you, I basically get used on using mysql_fetch_array which returns an associative array. example: $result = mysql_query("SELECT name, lastname, age FROM table"); $ra = mysql_fetch_array($result); or $ro = mysql_fetch_object($result); or $rr = mysql_fetch_row($result);
now: echo "name is :" . $ra["name"]; // array (same as: echo "name is:" . $ra[0]; or echo "name is:" . $ro->name; // object or echo "name is:" .$rr[0];
. . . just like the mysql_fetch_array() cause it returns both enumarated and associative array.
"Kevin" <k
bigsky.net> wrote in message
news:001001c12700$255cb340$503ffea9
kl...
> I have been coding php for a while now but can't seem to get a grasp on
> which type of query I should use for a given situation.
>
> mysql_fetch_array
> mysql_fetch_object
> mysql_fetch_row
>
> Perhaps there is no right answer or perhaps the answer comes with
> experience. In any case, I would love to get some pointers.
>
attached mail follows:
Hello
I wonder whether there is any tutor about PHP objects. Could you help me with a URL?
Thank you
Ivo
attached mail follows:
Hello, Is there is a way with PHP (most probably headers) to go HTTPS mode? I don't want to specify https://www.myserver.com/secured_page.php I just want it normal but in it's header to tell the browser to initiate an HTTPS mode.
Thanks
attached mail follows:
Jim, I'm trying to figure out what in the world you are doing differently than me that you are getting any failures without the %s %s ? I have been running php for 9 months now, and having at one point 10 extensions turned on including added ones not from the php.net package, and I have never got failures of execution (not that I witnessed anyway) And I've run this on 4 different windows servers now. I'm not saying I don't believe you, I'm sure you are getting the errors you claim, I'm just boggled as to how your system is sensitive enough to get them!? What exactly are you running?
Angie Tollerson
Alliance Technologies
Web Programmer
(515)245-7628
tollerson
alliancetechnologies.net
>>> "Powell, Jim (EER)" <PowellJF
navair.navy.mil> 08/16/01 05:48PM >>>
I hate it when the messages don't reply to the lists!
> -----Original Message-----
> From: Powell, Jim (EER)
> Sent: Thursday, August 16, 2001 12:45 PM
> To: 'Angie Tollerson'
> Subject: RE: [PHP-WIN] Re: [PHP] Re: [PHP-WIN] Installation failed !
> Please Help!
>
>
> OK, pretty straight forward, I went through my list of
> failures, and Almost all of them (the ones that failed
> without the %s %s) used extensions to PHP (ming, crypt, etc,
> etc). They simply would return a CGI error bad header
> returned (or something along those lines, I forget what IIS
> put in there). Other things like mySQL and the other built
> in functions seemed to work fine without them (them = %s %s),
> so I guess it would depend on what you use PHP for as to
> whether the %s %s is needed.
>
> Of course Mr. Santiago has the official reason (at least from
> Microsoft's perspective) in another e-mail.
>
> Jim Powell
>
> > -----Original Message-----
> > From: Angie Tollerson [mailto:Tollerson
alliancetechnologies.net]
> > Sent: Thursday, August 16, 2001 5:25 PM
> > To: phil
dialsolutions.co.uk; php-general
lists.php.net;
> > php-windows
lists.php.net; PowellJF
navair.navy.mil
> > Subject: [PHP-WIN] Re: [PHP] Re: [PHP-WIN] Installation
> > failed ! Please
> > Help!
> >
> >
> > Jim,
> > Could you give us an example and explanation as to why no %s
> > %s is unstable? How has this failed you ? because I've never
> > had a problem with not having it in there that I know of.
> > PHP has always executed for me properly, NT 4.0 and w2k. But
> > if it is unstable I don't want to find out later. Thanks!
> >
> >
> > Angie Tollerson
> > Alliance Technologies
> > Web Programmer
> > (515)245-7628
> > tollerson
alliancetechnologies.net
> >
> > >>> Phil Driscoll <phil
dialsolutions.co.uk> 08/16/01 12:20PM >>>
> > On Thursday 16 August 2001 4:45 pm, Powell, Jim (EER) wrote:
> >
> > > > Second, make the application extensions point to php.exe (you
> > > > don't need the
> > > > %s %s stuff).
> > >
> > > This I have to disagree with. Without the %s %s, you are
> > rolling dice as
> > > to whether the page will work or not. I never had this
> > problem with Apache
> > > under win32, but I have with IIS. I would definitely leave
> > them in there.
> >
> > I'll have to strongly disagree with your disagreement ;)
> >
> > --
> > Phil Driscoll
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-windows-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-windows-help
lists.php.net
> > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> >
> >
>
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribelists.php.net For additional commands, e-mail: php-windows-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Elias, I spoke with the original developer for the windows version of php, Shane Caraveo. He told me and many others at the PHP conference last month that his #1 objective for php in the upcoming months is to build a stable version of the isapi module for windows. So it may be sooner than you think! ;)
Angie Tollerson
Alliance Technologies
Web Programmer
(515)245-7628
tollerson
alliancetechnologies.net
>>> "Elias Santiago" <eliassantiago
hotmail.com> 08/17/01 07:46AM >>>
Me too, I've never had any problems with PHP running it with or without the
%s %s. I guess that IIS 3 required that, but IIS 4./5 not necessarily
require it (a useful bug??). Nevertheless, it work without them anyways.
I only wish that the PHP ISAPI module is FINALLY made stable (production
quality) to use it on my sites.
"Phil Driscoll" <phil
dialsolutions.co.uk> wrote in message
news:E15XfM2-000Ane-0W
anchor-post-32.mail.demon.net...
> On Thursday 16 August 2001 7:35 pm, Elias Santiago wrote:
> > I believe that IIS passes the script name to php.exe with the first %s.
I
> > think IIS replaces the first %s with the script name. From the second
> > article, I suppose that if the %s is changed to %S, the name passed to
> > php.exe would be UPPERCASE. Can anyone verify this?
>
> I can't verify that, but I can verify that I've had php running without
any
> trouble at all ever on about a dozen NT4 boxes without %s %s anywhere in
site
> without any problems at all :)
>
> Maybe the default behaviour of IIS (since it is the sensible behaviour) is
to
> pass the script name to the exe it calls.
>
> Cheers
> --
> Phil Driscoll
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribelists.php.net For additional commands, e-mail: php-windows-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Awhile back someone asked about why when they hit the back on their browser that the forms results didn't show up, but an error saying that they have expired and if you would like to reload, did show up.
Here is how to not get that message:
Put above <HTML> tag <? header("Cache-Control: max-age=3600, must-revalidate"); ?>
This will let it stay there for an hour.
For more information on caching take a look at http://www.mnot.net/cache_docs/
Rick
attached mail follows:
Hi Is there a way to authenticate users who are connected to the linux-box with samba or the AppleTalk protocol (Netatalk)?
I don't need strong security, this is on the Intranett behind a firewall. I only want to recognise the users, and give them a personalised WebPage.
It's simple to get the users ID address with php, but I need the corresponding usernames from the smb or netatalk users.
I'm running php 4.06, netatalk 1.5pre6 and smb 2.2.1a on RH 7.1
Knut G. Sætre Harstad Tidende Gruppen AS
attached mail follows:
Hi all!
Please help me with this problem:
SHORT: how can I erase the content of a page currently displayed in client's browser? Or other solutions (see LONG)
LONG: I have a form generated with a php script that looks like: <? if(!isset($submit)) { do_form(0); } if($real_name=="" && isset($submit)) { do_form(1); } ...
function do_form($err_msg) { ................. if($err_msg==1) { printf("font color=red"); printf("Real name (*) :"); printf("</font>"); } else { printf("Real name:"); } ......... }
The script keeps writing forms each time something is wrong... Should I send a header? With what? Or please tell me where I can find what headers can I send from inside my php script?
Thanks all,
maxx
mail.dntis.ro
attached mail follows:
zend.com php.net
and lots more..
"Ivo Stoykov" <ivostoykov
hotmail.com> wrote in message
news:20010817114626.60987.qmail
pb1.pair.com...
> Hello
>
> I wonder whether there is any tutor about PHP objects. Could you help me
> with a URL?
>
> Thank you
>
> Ivo
>
>
attached mail follows:
Hi guys,
Is there any restriction on a multiple selectás name in an HTML file? Cos' If I give a name like 'msel' and not 'msel[]' I don't get an array named $msel just a simple string type variable.
Thanks in advance
attached mail follows:
Date: Fri, 17 Aug 2001 15:12:22 +0200 From: Daniel Rezny <daniel
rezny.sk>
Reply-To: Daniel Rezny <daniel
rezny.sk>
Message-ID: <5222771593.20010817151222
rezny.sk>
To: "Tamas Bucsu" <ta.bucsu
orion-infotech.com>
CC: php-general
lists.php.net
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Subject: Re: [PHP] <input type=select MULTIPLE?????>
Hello Tamas,
Friday, August 17, 2001, 3:03:31 PM, you wrote:
TB> Hi guys,
TB> Is there any restriction on a multiple selectás name in an HTML file? Cos' If I give a name like 'msel' and not 'msel[]' I don't get an array named $msel just a simple string type variable.
TB> Thanks in advance
If you want to have more than one value in one variable it must be array.
That's a explaining of naming convention for eg.select boxes.
I hope it helps
-- Best regards, Daniel mailto:danielrezny.sk
attached mail follows:
say I have $array1 = array("name"=>NULL,"thread"=>NULL,"id"=>NULL); $array2 = array("0"=>"fred","1"=>"3","2"=>"9999");
I want $array1 to have the values of array2 - or $array2 to hve the keys of $array1 A foreach loop works fine to do this - but I was wondering if there is a quicker way to merge the values of one array to another array.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]