Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Auto-generated Password - Which Characters Do You Disallow


When you autogenerate passwords, which characters do you keep out of your passwords? The obvious are

0 - zero
O - oh (upper case)
1 - one
l - el (lower case)

and perhaps

o - oh (lower case)

Any others that lead to confusion and users writing to say they keep entering their passwords, but they can't log in?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
I Am Trying To Pipe In Some Auto-generated PHP Into Php.exe
I am trying to pipe in some auto-generated PHP into php.exe, to no
avail:

Strange File Auto Generated?
I am using Linux/PHP4 + Smarty, sometimes I found some strange file
auto generated under the temp folder for smarty cache,

e.g. phpNd7W05

Anyone know the reason for this file?

Passthru + Auto Generated Headers
I'm slightly confused with the passthru() command. The program I call writes
html headers itself. However, passthru() makes apache sending some generated
headers first. There's no fault with spaches in the code etc, I think.
Here's an simplified example:

$ cat /www/example.php

<?
passthru("cat /tmp/output");
?>

$ cat /tmp/output
Content-Type: text/html

<HTML><HEAD></HEAD>Message</BODY></HTML>

$ curl -i "http://localhost/example.php"
HTTP/1.1 200 OK
Date: Sat, 16 Jul 2005 14:47:29 GMT
Server: Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7d DAV/2 PHP/5.1.0b3
X-Powered-By: PHP/5.1.0b3
Content-Length: 66
Content-Type: text/html

Content-Type: text/html

<HTML><HEAD></HEAD>Message</BODY></HTML>

How To Handle Special Characters In RSS Generated By PHP?
I generate RSS 2.0 using PHP from mysql DB, for example:
echo "<title>" . $title . </title>";
echo "<link>" . $link . </link>";
echo "<description>" . $description . "</description>">

The problem is, sometime there are special characters in $description or $title, for example, trademark symbol. Is there a function which can remove these characters? I tried to use htmlspecialchars ($description), which only work with HTML tags.

Auto Expire A Password.
I have a standard reg form that uses php/mysql. A user can sign and choose their own username and password. Is it possible to make the password expire or reset in 30 days?

Compare Tables To Disallow Row
I have 2 tables, the first one names "site_users" contains a list of users and their information. The second table called "user_status" contains information about whether a user is banned, etc. I am trying to get a list of the users from "site_users" that are not banned in "user_status".

I tried using a join but I did not get the results I need. How can I select results based on a certain condition in the second table? PHP Code:

Referer Based Allow/disallow
If referrer is internal (www.mysite.com), then show the page, else show an error message.
Basically do not want outside link, and would prefer not to have direct link through the browser either.

Disallow "HTTP Chunked" Transfer !
Yesterday, I posted a topic regarding to XML problem that I've been
having. The old topic can be found at:
http://groups.google.com/group/comp...a0eeb03626018f4

Thanks to Álvaro G. Vicario for pointing out "chunked" transfer thing.
Anyway, I tried to avoid "chunked" transfer in HTTP protocol. I have
looked at "transfer-encoding" on the web, but it doesn't help much.
What value/variable should I specify in HTTP request to ask the server
not using "chunked" transfer ?

If anyone experienced this problem/ know how to do this, please share
your thought.

Authenticate A User Using Same Password As Linux Password
We're working on an intranet site where we will require user's to only
be able to access their own page in some instances. Rather than
introducing another password to the mix, we were thinking about seeing
if we could use the same credentials (username and password) as their
linux credentials. The web site will be running off of the same machine
that we want to access the credentials on.

Password Protect Pages With The Same Password For Every User.
I am building a site where every user has to enter a password to go to the next page.
The passwords will be the same for everyone.

So for example, to go from page A to B everyone has to type the word "swordfish" into a box at the bottom of page A

And to then go from page B to C everyone as to type "afghanistanbananastan" at the bottom of page B etc.

Is this something I would use php to do and if so how? I don't want people to be able to view the source and see the passwords.

How To Hide Password In Password Field
I have a .html form which is used get input from user name, password then I will add these username and password into a table (add users).

However in this form, I can not hide charactors in the password field. Could you please tell me how to hide this charactors (for example when I type "abcde", it becomes *****).

( I will use a PHP file to grap this information (username and password) and insert it into a mySQL table)Code:

Php Script Generated By Php
I am trying generate a new PHP file from an existing page using PHP. Currently I'm using the output buffer to capture content destined for the page, and then am capturing that output and writing to a file.

The problem I am having is that all PHP scripts within the new page content are executed and the results are written to the new file, when I would like the PHP code itself to be written to the new file, unprocessed.

So now I am trying to just store the new page as a string and bypass the use of the output buffer, but do not know how to store php code within a string without having it execute...

Using Php Generated Pictures With HTML?
I am able to create images with the use of the GDLIB.
but I am not able to use these images together with HTML. I always get the
message "headers are already sent.

How To Farmat Php-generated Table
the font size declaration seems to be ignored. Is it possible to set format for
tables generated with php?

<?php

echo "<table border=1 font size=8>";
echo '<tr><th font size=8>Date</th>
<th>IP Address</th>
<th>Operating System</th>
<th>Browser</th>
<th>Referring Page</th>
<tr>'

?>

Getting MySQL Generated Keys
I am a Java/JSP developer by trade but am currently developing a
MySQL/PHP solution.

In JSP when I run an INSERT statement on the db I am able to
automatically get back a list of any generated keys (without having to
do some sort of subsequent query to get the information).

Is there a PHP equivilent of this?

Php-generated Png Transparency Issue In IE
I've been trying to get my page, which works perfectly in Firefox, to work in IE as well. one problem was getting the .png images to display properly, which was fixed by doing this:

filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='imagename.png')

but what of php-generated .png files? putting the php file as the src doesn't work. the php-generated images don't work at all in IE (but work fine in firefox).

(the php-generated image uses a transparent color made with imagecolorallocatealpha. when I just use imagecolorallocate it shows up, but is not transparent as I want it.)

Generated PHP Web Database Forms
I'm still gaining experiance in developing PHP applications, and have completed
a couple of projects already.

This has prompted me to look for ways to reduce the development time for web
enabled database applications. Every web database has basic operations such as
add,delete,update and search. I have been creating HTML forms and processing
the results with php code. I have managed to reduce the number of forms required
by using the smarty template engine.

I want to go a stage further and be able to produce the forms and the processing
code purely by looking at some sort of schema file , or using
"mysql_list_fields()" and "mysql_list_dbs()".

Before I start my quest of many late nights of coding. Can any of you guys
give me a head start by pointing me at a solution/hint.



Generated Images Not Printing?
I have a problem with IE and generated images (jpgraph). It displays
them fine but it's not printing them. They appear as little red crosses
in print preview.

I've fiddled with the cache control headers as I thought that was it.
Certainly IE refuses to cache pdf files sent using fpassthru and cannot
open them in acrobat.

Server Generated PDF Files?
Heres what I need to happen now, I know how to do most of it, except the generated PDF form.

- The server puts that information into a PDF file with a background of my chosing and emails it to a specified adress. (Its already set up to send the email)

My issue is I dont know how to have the server generate the PHP form. How does it work? How do I position the text over the PDF automatically?

I'm already donating $10 to the site, thanks to the help I received from UTAlan, Lytheum, and Waldir. Ill make it a total of $20 after this.

Image Src Generated Through Php File
I've built a custom image gallery, integrated with a database. all of the images are kept above the document root in a "media" directory (for security purposes); therefore, i am using a php script in the src attribute of the image tags to display the image in the browser.

to accomplish this, i chose to use the PEAR package "HTTP_Download", which worked great and performed fantastically on my staging server.  I chose to use content-disposition inline, and set caching options on.

the problem, the images don't cache on a users machine.  therefore, everytime the page is changed to display a new image, all of the thumbnails are downloaded once again...very annoying. let me re-iterate, these files are not being generated on the fly, simply sent to the user via php. Code:

Mail A Php Generated Page
I ask if it's possible to sent to email a php generated page as an html attachment or text file !?

I have searched on google, but I find only how to send mail from php not hot to send a page.

Any link, or doc is helpfull !

The story:
I have a long products list, from where I select some items what I want to send as a price list to some people.

PHP-generated RSS Feeds And .xml Files
I want to make an RSS feed for my site.  Obviously, it should be dynamic, so the only way that comes to mind is to use PHP to create the RSS.  But then the filename will be .php.  Most of the sites I see with feeds (digg, shoutwire, cnn, etc) have .xml files.  How do they do this? I would like to have a .xml that is dynamic/always up-to-date.

Problems Saving Gd Generated File
I'm using the gd library to build graphs from db generated data. I can output the result to the browser with no problems, but when I try to save the image, I get the following error message.

PHP Generated Pages & Search Engines
I'm trying to get a basic idea of how well PHP generated pages can be spidered by search engines? I'm working for a company that keeps two versions of it's site at the moment. One copy run off of a database using CGI, and one copy entirely in HTML so search engines will find them. I've told them that this is just a bad idea, and far too time consuming. I'm under the impression that PHP pages can be found by search engines, am I wrong? I'm going to be running almost their entire database of products off of one file, will the search engines be able to find these if there aren't direct links to them?

Any other suggestions as to how to keep their positions in the search engines (very good right now) would be appreciated as well.

PHP 5 Compilation Error: Libphp5.so Is Not Generated
I started from a clean, new system, with only SSH and Webmin. It's a VPS running on Fedora Core release 2.

1) I added my domain name to the BIND server

2) I downloaded the last stable Apache version, 2.2.3, and installed it
using:

./configure --prefix=/usr/local/apache --enable-so --enable-module=rewrite
make
make install

3) I tested it, it worked.
4) I downloaded the last stable PHP version, 5.1.6, and installed it using
the MINIMUM configuration possible (not even MySQL):
./configure --with-apxs2=/usr/local/apache/bin/apxs
make
make install

"make install" gave me that error:
==================================

[root@server php-5.1.6]# make install
Installing PHP SAPI module: apache2handler
/usr/local/apache/build/instdso.sh
SH_LIBTOOL='/usr/local/apache/build/libtool' libphp5.la
/usr/local/apache/modules
/usr/local/apache/build/libtool --mode=install cp libphp5.la
/usr/local/apache/modules/
cp .libs/libphp5.lai /usr/local/apache/modules/libphp5.la
cp .libs/libphp5.a /usr/local/apache/modules/libphp5.a
ranlib /usr/local/apache/modules/libphp5.a
chmod 644 /usr/local/apache/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish
/root/zzz/php-5.1.6/libs'
Warning! dlname not found in /usr/local/apache/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/libphp5.so
chmod: cannot access `/usr/local/apache/modules/libphp5.so': No such file or
directory
apxs:Error: Command failed with rc=65536

==================================

The problem is that libphp5.so is not generated from "make".

I found those related links:
http://www.fedoraforum.org/forum/archive/index.php/t-23665.html
http://bugs.php.net/bug.php?id=27795

Following the recommendations I tried:

1) using the bz2 version of the PHP distribution and not the gz one

2) I installed getText ( http://www.gnu.org/software/gettext/ ) because some
say an included library, "libintl.so", could help. But I couldn't find that
library after getText was sucessfully compiled.

3) I chomed everything to 777 in the php directory

4) I installed the last stable libtool, 1.5.22

Nothing worked, I still have that libphp5.so error.

Any help would be really appreciated. And I really mean it!

Dynamically Generated Results Table
I'm trying to write a script that dynamically generates HTML tables depending on the results from an SQL query. So far, I have managed to set the HTML table headers to be the same as those in the MySQL table. [thanks to rod k -cheers !]

Now i'm trying to put the results in the table. Basically, I need a MySQL function to retrieve data and put it into the table until there is no data left....

(At the moment I am using "mysql_fetch_array()", but with this it is necessary to know the names of the columns to retrieve the information for each result set. Since my table is dynamic and should be able to build itself from different MySQL tables, the column names aren't fixed and so i can't use this to put the data in the tables...)

Getting Dynamically Generated POST Data
I'm trying to get POST data that was dynamically generated and I'm not sure how to go about doing this.

Are Multiple GD Generated Images Possible On One Page?
I've been experimenting with generating PNG files via PHP and GD. All was going fine, until I tried to put more than one image on a single page.

<img src="draw.php?text=Picture1"><br>
<img src="draw.php?text=Picture2"><br>
<img src="draw.php?text=Picture3"><br>

The example above produced 3 images, but they all have 'Picture3' on them. Seems like theres only 1 temp storage area for the images?

Open URl Wich Is Generated By A Script?
I just started to get in touch with php
and use it as extension of
my Java Applets.....

How can I open a URL wich is of this kind:

http://www.host.com/?alotofdata

right now I use this script:

<?php
echo(" <W> ");
echo($key);
$file = fopen ($key, "r");
$contents = "";
while (!feof($file))
{
$contents .= fread($file, 8192);
}
fclose($file);
echo($contents);
?>

the first two lines are mere debugging help
the key ist set to the right URL
but it only receives
what it would get if I open the Address:

http://www.host.com/

is there a way to open the right connection?
(hopefully in an easy way)
maybe I searched for the wrong keywords but
google didn't bring anything

Loading Times For Php Generated Pages
I've just noticed on my own surfing of the net and some php pages that i've done. especially long pages.... that they seem to load in blocks... one section at a time

is there some sort of buffering or something that is doing this and can be turned off? I"m not that experienced in php... but know enough.

Storing Pictures Generated Witn GD
I'm trying to make php store a picture (on the server) that have been resized by GD. The picture is downloaded from a browser. But I would like to store this file in different sizes. To save downloadtime and cpu-power I wish to do this only once while downloading the file to the server.I can resize files, but I'm unable to store them.

Populating Dynamically Generated TextFields
If one assigns something to the value iattribute off an input /text field, that value will be displayed when the form is loaded. My problem is, when building a form dynamically, the only way I can get the text to show is by doing the above, however, as this is an update form, when the form POSTS to processUpdate.php,
both the data entered by the user AND the data in the value attribute are inserted/updated.

So, how does one dynamically build a form where the data is displayed in the text fields but value atttribute is not set. PHP Code:

Php File As String Generated To Html
I have a page going on a local server but the pages are going to be hosted on another server, which doesn't support php and MySQL. So basicly have to generate the php files into html files. The pages on the localserver are all based on a template page Main.php?Cat=Home

So this is what I'm trying to do. either...open the php template pages in another file then write them as html or...export the php template as html when viewed.So far all I got to see is resource id # 1 Just a little push on the file handling as a string would be much appriciated.

Highlight Dynamically Generated Text
I have a search form which makes queries to a database. In the form the user can search for many words (word1 && word2 && word3). I want in the results to highlight the words that the user has searched for. I 've searched in the internet and i've found some codes but none of them works with all the possible results.

What I have found so far which is closer to what I want is the following:

Forms Generated From Mysql Data
I can't figure out how to get PHP to tell me which boxes were checked and how I can use this information. PHP Code:

Magpie RSS Rejects PHP Generated RSS Feed
Can any see why Magpie RSS won't accept this RSS Feed (that is valid
according to the Feed Validator website).

This is the code that generates it. A SQL query is run first into
$result and then:

How To Retain The Elements Generated Using InnerHTML
Iam using PHP with Smarty template engine . I am
adding the row elements dynamically using innerHTML by
Javascript.But when the user pressed the back button
or refresh the browser the dynamically generated
elements goes off. I want to retain that with user
entered values for that what shall i do?

Files Details:

Returning A Variable Generated In A Function
I have a function that is being called from the main script using include() and there is a variable (generated inside the function),that I want to make available to the main script. I tried using "global $var" inside the function, but I get a NULL string as the value, although I should be getting a timestamp, since $var = time();

Generated Output Doesn't Start At The First Line
on my website I'm using the Drupal CMS. But I have a problem. All the
output which is generated doesn't start at the first line (when you
look at the source). All output starts at the third line. And that's
not good for the XML which is generated through the FEED functions from
the modules.

Because the XML is not valid when the XML-tag doesn't start at the
first line. Does anyone know of that? Maybe the htaccess-file ? I don't
know.

Maybe someone of you could help me. Here are the URLS
[color=blue][color=green]
>> http://www.infostand.net[/color][/color]

and the xml feed's[color=blue][color=green]
>> http://www.infostand.net/node/feed
>> http://www.infostand.net/atom/feed[/color][/color]



Uploading A Dynamically-generated Image
I have a script that generates an image based on users' inputs. How would I make it so that the script automatically uploads that image to a different folder on the server? I'm stumped on this one. Does anybody have any ideas?

PHP Generated Pages And Rewrites In .htaccess
My website has been written in PHP, and stores information in MySQL.  Objects are displayed on their own pages, with a multi-level url, made up of various PHP parameters.

eg. ?objid=1&mode=new&type=red

I have a rewrite rule in the .htaccess file, which translates the .php to a .html file - and this works successfully.  However, I am finding that these .html files are not being indexed by Google or other search engines.

The reason I put these rewrites in, was to create a simpler reference - eg object1.html, therefore increasing the chances of the page being indexed.

Does anyone have any advice / tips of what I can check - or can confirm that this approach does actually work with search engines?

Passing Data Into Generated Pages
I have a template page with items being displayed on it and the idea is when a user clicks that item it's item id gets passed into the next page so that it can be compared against the flat file database and then when matched displayed the item information.

I'll show you how i am displaying items on a page and then i'll show you the code i have developed so far to try and get the item id to pass pages and display the item details. Code:

Uploading Generated Text Fields
I have on a page 4 text fields shown for a user to enter an amount in. If they have more than 4 amounts to enter in i have a button which, when clicked adds another text field although the max amount of text fields avaliable is 15. I need my php script to take the values entered by the user and send them into my MS Access database and order them into one field within the table with each value separated my commas.

I have included  this post my php so far, and the javascript code which generates the text fields which are unique in name. Code:

Generated Images Vs Image File...which Is Better?
Shall we say you want to creae a banner, a button, and other images for your site. some create images on the fly through php using gd library. is this more advisable or more efficient compared to creating an image file (.jpg) shall we say using photoshop?

Inserting Link Into A Table Generated From MySQL
I'm trying to insert a link into a table that is generated through a MySQL Query. Here's the code:

Writing A PHP And Javascript Generated Page To A PHP Variable...
I have a form that posts data to a PHP mailer page I have created. When
it goes to the PHP mailer page it reads some of the data and modifies
the page accordingly using Javascript (hiding certain divs, etc...). My
goal, is to take all this data after it has been processed by
Javascript and send it through my PHP mailer as it is currently
formatted.

If it helps any, the track I am on right now involves encapsulating the
Javascript processed block in a div. I am then trying to take the
..innerHTML data from that div and store it in the PHP $message variable
for my mailer. This won't work because PHP is server side. So, I moved
on to generate some Javascript code (with PHP) that sends all that
messy HTML data that its processed through a URL variable to then be
read by PHP. This doesn't really accomplish what I want as it cuts off
about a quarter of the way through my data......

Any ideas?

One thing I thought of but don't know how to do or whether it's even
possible is using PHP to view the source of the current page and store
that as the HTML to be e-mailed. Or, is it possible to do something
similar to .innerHTML with PHP?

Unicode Generated By Php [iconv()] Doesn't Show Properly
with utf-8 before i go bald and the rest of my hair turns
white!

Platform:
Mac OS X 10.2.6
Safari 1.0 (v85)
Internet Explorer:mac 5.2.3 (5815.1)
Apache 2.0.47
PHP 4.3.2 (Apache 2 module)
libiconv 1.8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Unicode Test</title>
</head>
<body><p>
<?php
$macRom = 'métallique arquée' // typed in a bbedit for mac
echo iconv('MacRoman', 'UTF-8', $macRom);
?>
</p></body></html>

When I run this script, I get, both in Safari and Explorer,
métallique arquée
and not
métallique arquée

But, that's why I'm going crazy, *if* I save this output as an html
file and load it in Safari, *it shows the proper accents*!

Now, can somebody please explain me why a page generated using PHP is
behaving differently from the very same output of that page? What am I
missing?

Displaying Html Code On PHP Generated Page
I am trying to create a link page in my php application. this is a page that will display a block of html code that a visitor can copy and paste into their web site to create a link back to mine. My PHP page has a line in it like this:

define('TEXT_INFORMATION', '<html page code is here>');

I have added the html code to create the page as noted above. the page contains a same of the banner image file and the html code that goes alon with it. My problem is that I haven't been able to "quote" the html code so that ir will not be executed.

every time I try to run the application from my web server my page will display two copies of the banner iimage not on banner image and text block like it should. Any suggestions?

Dynamically Generated Form And Update Problems
In brief, in the following 2 portions of code I build a form based on data retrieved from a database. The second bit of code receives the posted data for processing and updating the database. Problem is that the update occurs for the first row of data but none of
the rest. I'm using a hidden field, written in dynamically (
name="tfHiddenId<?php echo $j ?>" ) where $j is a counter var in a loop.

When I print out the POST_VARS everything is as I want to be, fields all
named according ly, as above. Just the update either 1) only does one
row and quits or 2) updates same row with the same data over and over ( I
suspect the latter ). Apparently my counter variable is not being incremented, but only on one var, "tfHiddenId".$i , on the receiving page. Here's the code for where the form is built from the DB: PHP Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved