Grab the $SERVER_NAME environmental variable. Then parse the variable using
explode on the period in the domain name. Count the number of elements in
the array. and selcct the element you want to use
/dkm
- Original Message -
From: "Liam MacKenzie" <[EMAIL PROTECTED]>
To: "php" <[EMA
I've isolated the problem with MS Word and MS Wordpad; The problem does not
occur when pasting from Notepad. I want to make sure that all the text is
ASCII before converting to MIME encoding. This shoul alleviate the problems
that are occuring.
Thanks,
/dkm
- Original Message -
From: "
Everyone understands that Zend has to eat, but so do most of us small
developers. I have no problem with them charging for their products. IMO
they would make more money if the pricing for the encoder would be less.
This is a fundamental feature that most of us need. I would offer a Pro
versio
you cannot print or echo anything back to the browser before running the
header() function...
- Original Message -
From: "Varsha Agarwal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 29, 2002 4:00 PM
Subject: [PHP] Help Please
> Hi,
> I am trying to run a sample pro
I think you are SOL unless you use Javascript manage the display amongst the
frames/windows.
/dkm
- Original Message -
From: "Alberto Serra" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, July 18, 2002 3:31 PM
Subject: Re: [PHP] spawning scripts to different graphical targets
I forgot to mention that you can use Javascript to manage the open windows.
We the user closes the main window, you can direct the empty window to log
the user out and close its window as well.
- Original Message -
From: "Dennis Moore" <[EMAIL PROTECTED]>
To: &
If you do not want to use cookes and use SID or trans SID; Another method is
to track your logins via a database. This can be resource intensive
though.You need to update the database upon each click or have an empty
window refresh every 1-5 minutes. If there is no activity for 15 or 30
min
It really depends on how complex your site/application is... I really like
using a popup window with some Javascript that refreshes the parent/opener
page upon updating or executing the PHP. It then closes the popup window.
If the user says no, it just closes the window. This gives the use a mo
I think GIF support was removed from GD several releases ago due to
licensing reasons...
/dkm
- Original Message -
From: "Shane" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Wednesday, June 26, 2002 6:48 PM
Subject: [PHP] Image GD Wizardry!
> One would think that pulling bin
Don't you mean Javascript?
I am not sure if I understand your question...but here goes...
Your PHP code will be executed first at the server side. You can use PHP to
include or write out your Javascript functions in the head of your page.
>From here you can execute your javascript normally.
/d
I need to grab some data from a CGI program running on a different server. I have
been toying around executing LYNX using the passthru command. I seem to be able to
grab the data just fine using "lynx -source -preparsed $URL". I've started reading
about CURL. I am wondering if it is worth
I have written an PHP application using LAMP. However, I have a client who wants me
to install the application on his Win2K server. My application uses PHP sessions with
trans-SID enabled.
I remember reading on this list where people were having problems getting PHP on
Windows to work. I do
check to see if gd is actually activated by using phpinfo() assuming you are
using PHP4...
/dkm
- Original Message -
From: "LeTortorec, Jean-Louis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 28, 2002 2:35 PM
Subject: [PHP] Imagecreate and/or GD library not activated
Also make sure you trim() the input variables before your comparison...
2cents...
/dkm
- Original Message -
From: "Kevin Stone" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 4:30 PM
Subject: Re: [PHP] matching two form fields function?
> Tis a tad easier than
User the global variable
$SERVER_NAME
- Original Message -
From: "David Orn Johannsson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 10:00 AM
Subject: [PHP] Get domain name
>
> I need to find out what the domain of the site that I'm running a script
> f
Am I missing something? This is too easy... But here goes...
- Original Message -
From: "Joshua Baker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 5:18 PM
Subject: [PHP] Passing to an Applet
All right I've s
You may want to check permissions within your database. The web server user
may not have permissions to perform this action.
/dkm
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Philip Hallstrom" <[EMAIL PROTECTED]>
Cc: "Peter J. Schoenster" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
variable when the login form appears. This
allows me to redirect the user to the requested page when they log in. Works like a
charm!!!
Sometimes in explaining the problem, I see the solution.
- Original Message -
From: Dennis Moore
To: [EMAIL PROTECTED]
Sent: Monday, May 13
I am using Sessions with mod PHP4.0.6 with
trans-sid set on. Everything works fine. However, after loggin in, I
want to automatically redirect the user to a specific page if they came from an
external site or were given a link via emal. I realize that a
session variable is not actually s
I am running mod PHP 4.0.6 with Apache
1.3x.
I am using session variables to pass various access
information. Everything works like a charm until I popup a new window
using Javascript. The session variable is set but to the wrong
value.
Has anyone else run into this issue or have an
If it is a unix/linux box use the .htaccess file and define the settings
yourself.Please this file in the document root for your site... Assuming
the system will allow you to do so...
/dkm
- Original Message -
From: "David J Jackson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent:
Food for thought...
There are a lot of performance issues outside of PHP...
MySQL - version 4.0.x supports caching...
Apache 2.0 - is now threaded...
Memory is now cheap... Increase the server's memory
You may also want to consider Zends Optimizer and Accelerator if you need
additional boos
I needed to passed the REQUEST_URI string in a hidden variable within my
login form.
Voila!!! Everything worked fine.
I just wasn't seeing it yesterday. I was just too close to the code...
- Original Message -
From: "John Holmes" <[EMAIL PROTECTED]>
To: "
AIL PROTECTED]>
To: "'Dennis Moore'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, April 27, 2002 8:49 PM
Subject: RE: [PHP] Sessions and Query String Variable Handling
> $page = $_SERVER["SERVER_NAME"] . $_SERVER["SCRIPT_NAME"] .
&
Env: Apache
1.3.x/php4.0.6/mysql3.23.x
Scenario: I have built a system that uses PHP
sessions for user access. Within the system I send user notifications via
email. Within the email are links to certain pages with
variables. For example.
http://mysite.com/view_page.htm?id=6
My s
If your page is frequently access and the data does not change then by all
means store the image in the file system.
however, I have found it useful to store the images in the database for
certain applications which I want to maintain an additional level of
security over the images when using ses
I am not a LDAP expert, however I assume you can place a condition on your
bind command to kill the script or go to your error reporting...
- Original Message -
From: "Jean-Rene Cormier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 22, 2002 1:03 PM
Subject: [PHP] How
This sounds interesting... I am not familiar enought with PHP-GTK to give an
informed opinion. I think your decision should be based on how familiar
with the tools you take into the contest.Since you are not face with a
lot of time, will your competition be using Visual IDEs to aid the rapid
I think you are SOL... You may be able to kloodge something but mucking
around with a word doc without having MS Word or its ActiveX/DOM components
is not recommended.
/dkm
- Original Message -
From: "David McInnis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 04,
go to the PHP online documentation and look in the configuration section.
auto_append_file string
Specifies the name of a file that is automatically parsed after the main
file. The file is included as if it was called with the include() function,
so include_path is used.
The special value none d
You have no way of finding a user's email address without the user entering
it into a input tag and submitting it through a form. The users email
address is stored in their email application not the browser. So the short
answer is no.
/dkm
- Original Message -
From: "Martin Schichl"
I assume you want comments on the functionality. The first thing that
strikes me is why would I want to use the product. I read the desciption
and followed the diagram on the home. I then looked at the demo on
affero.net. I quickly got lost on the purpose of the application and why I
should u
Very strange... What environment are you runnign PHP? Do you have any
spaces in the file names or the file names named in a funny format?
/dkm
- Original Message -
From: "Carl Schmidt" <[EMAIL PROTECTED]>
To: "Bob" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 03
Take a look at OSCommerce at http://www.oscommerce.org.
/dkm
- Original Message -
From: "jeremy spielmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 01, 2002 11:13 AM
Subject: [PHP] Recommendation for PHP Shopping Cart
> I'm looking for an off the shelf shopping
I do not know about a separate php.ini file but you can assign specific
values in your settings or you can set them using your
.htaccess file pending on how you have set up your server. Assuming you are
running Apache on a UNIX type machine
ie
php_value upload_max_filesize 500
go to ch
Try the following...
// check the error code and generate an appropriate error message
switch($e) {
case( -1):
$message = "No such user.";
break;
case(0):
$message = "Invalid username and/or password.";
break;
case(2):
$message = "Unauthorized access
It all depends on what the needs for your site(s) are.
Typically, you use database driven web sites as a means of storing data
separate from the layout and style of your web site. The advantage of this
is that you can just update your data in the database without affecting the
layout and style
I am looking for opinions and other philosophy on a couple of XML issues. I have my
own opinion, but I am curious what others think and what they are doing...
I am in the process of updating many of my applications to include XML/XLST/ and/or
WDDX technologies. Many of my applications read a
Your popup window should be an normal PHP page calling your images in the
database. You can then setup your form to call the popup windows via
javascript using the window.open() method.
/dkm
- Original Message -
From: "Scott" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday,
I am currently evaluating the following IDEs that support PHP.
Zend's Studio 2.0
NuSphere's PHPEd
Active State's Komodo
My selection criteria are:
Code Completion
Debugging
Project Management
Versioning and Source Control
Documentation
Code Deployment
I have read through the documentation of
I use the $DOCUMENT_ROOT environment variable quite
ofter to build an absolute path to files in the web tree. I just ran into
a problem moving my code from a linux box (RH6.2) to a SunW Ultra
60. Both machines are running the same version of Apache 1.3.20 and
PHP4.0.6. Here's the rub.
You may consider the use of Javascript to control the parent and child
windows and frames of your application.
/dkm
- Original Message -
From: "Neil Kimber" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 04, 2002 9:51 AM
Subject: [PHP] Multiple browser instances - is i
Perfectly legitimate... it is much like having a switch statement without a
default clause.
- Original Message -
From: "Erik Price" <[EMAIL PROTECTED]>
To: "PHP (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, February 28, 2002 7:32 PM
Subject: [PHP] elseif without else
> For any of yo
Why not use javascript to launch a new window?
/dkm
- Original Message -
From: "Ali" <[EMAIL PROTECTED]>
To: "'Php-General (E-mail)'" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 8:23 AM
Subject: [PHP] header ("Location: URL");
> Hello,
>
> is there any possibility of redirecti
$qr="select DATE_FORMAT(date_field,\"%Y-%d\") as fmt_date from table
$whereclause";
then grab 'fmt_date' from the results...
> Don´t really want to bother you with these quickies - but:
>
> If i have a result from mysql that is a date (2002-02-09) - how do i
change
> that into a variable with
>
> in A web site where logins are managed with php sesions
> is it possible to count how many concurent users are loged in ??
>
> I believe that one way is to keep in a mysql table every login
> user but how can i delete a "loged-in" record when user session
> terminates abnormal
>
If you use th
Not sure what your exact problem is but I did notice you had back ticks(`)
in your insert statement. You should be using ('). You may need a where
clause in your insrt statement unless you want to populate all rows. Just a
couple of thoughts.
/dkm
- Original Message -
From: "Leif K-
What version of RedHat are your running?
You may want to install the image libraries manually via their
distributions. Not to say this will work but just a thought.
- Original Message -
From: "Ed Lazor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 11:0
$newstring=nl2br($string);
- Original Message -
From: "Jon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 29, 2002 11:11 PM
Subject: [PHP] Swapping for \n... ?
> I'm processing a form but all the functions I've found on the web only
seem
> to add the after the \n.
It is much easier to use the mysql DATE_FORMAT() function to format your
dates when retrieving directly from the data base. You do not have to
convert to a UNIX time stamp and all that other stuff.
Your select statement should look something like:
$date_format_long="%d:%m:%y at %T";
$qu
Just curious, why not use FTP for such a large file?
/dkm
- Original Message -
From: "Wei Weng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 8:39 PM
Subject: [PHP] why isn't this working? (many questions inside)
> First, I am running (currently) php 4.0.
All you need to do is the edit the php application type in your httpd.conf
file if you want to apply globally or insert a .htaccess file in the
directory you want to apply the change.
AddType application/x-httpd-php .php .waw-file
/dkm
- Original Message -
From: "Mårten Andersso
All you need to do is the set the field type for the id similar to :
ID smallint not null primary key auto_increment
you do not need to refer to ID in your insert statement.
/dkm
- Original Message -
From: "will hives" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January
make sure you set the max_file_size in your form.
ie
or set it in your php.ini or .htaccess file.
/dkm
- Original Message -
From: "Ronald Tezuka" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 21, 2002 5:50 PM
Subject: [PHP] Uploads
> If anyone can help me out,
Try using mysql_error() to display the mysql error message before issuing
your die(). this will give more information to troubleshoot. You may not
have the right privileges set up in your database where you can update or
insert into the database or table.
/dkm
- Original Message -
Fr
Try...
ALTER TABLE patients CHANGE id id MEDIUMINT not null primary key
AUTO_INCREMENT
/dkm
- Original Message -
From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 17, 2002 12:35 PM
Subject: [PHP] AUTO_INCREMENT problems
> I have an exsisting
You have to use Javascript to make this so... You may want to go to
hotscripts.com for examples...
/dkm
- Original Message -
From: "Torkil Johnsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 17, 2002 3:24 AM
Subject: [PHP] Changing form look without reloading
What is in line 205? It looks as though you are dynamically loading PHP.
Are you compiling with --with-apxs in PHP?Just a thought...
/dkm
- Original Message -
From: "R'twick Niceorgaw" <[EMAIL PROTECTED]>
To: "php general" <[EMAIL PROTECTED]>
Sent: Wednesday, January 16, 2002 12:03
Please provide more information on how you have set up PHP to run your cron
jobs. Are you trying to execute via LYNX or directly via a PHP script?
/dkm
- Original Message -
From: "Tiago Luchini" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 16, 2002 8:20 AM
Subje
More information is needed... what version of PHP are your running? I bit
of sample code on how you set up your sessions would also be helpful...
/dkm
- Original Message -
From: "Hawk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2002 11:19 AM
Subject: [PHP] L
I think you need to add the apache module extensions to your apache
configuration.
try adding --enable-apxs or --with-apxs (I can remember the exact syntax)
to the apache configure.
- Original Message -
From: "Gino Paoletti" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, Janu
move the following inside your while loop
echo "$row[item_id]","";
- Original Message -
From: "Dani" <[EMAIL PROTECTED]>
To: "PHP LIST" <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 8:54 PM
Subject: [PHP] Print ONCE ONLY?
>
> Hi Again!
>
> Why does this print only one
I assume you your displaying a web page. HTML ignores \n ... You need to
insert a .
- Original Message -
From: "Dani" <[EMAIL PROTECTED]>
To: "PHP LIST" <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 8:25 PM
Subject: [PHP] Please "\n" problem
> Hi!
>
> thanks for reviewing t
try str_replace() ... it allows you to pass an array into the replace
function.
/dkm
- Original Message -
From: "Paul Roberts" <[EMAIL PROTECTED]>
To: "Lauri Vain" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 4:35 PM
Subject: Re: [PHP] multiple replaces...
execute "phpinfo();" on a new page to see if mysql is still compiled in...;
- Original Message -
From: "Frederico Madeira" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 10, 2002 10:37 PM
Subject: [PHP] PHP x Mysql
> Hello !!
>
> My server was runing perfect th
The problem is most likely with your include statement. The include
path imay be incorrect...
"Bobby" <[EMAIL PROTECTED]> wrote in
message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...>
I have been using the following function declaration syntax for ages with
no> problems.> > Main p
Does anyone know of any good examples of
implementing time accounting with session management? I want to be able to
restrict the number of hours a particular user can view a site.
/dkm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addit
Make sure you include the tags in your include file for PHP
parsing. Included files are assumed to be text otherwise. You need to
provide more information if you have another problem.
- Original Message -
From: "Evansville Scene" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Mond
ation)
My question is why is my code still working? If so, what are the
consequences of using mysql() or mysql_db_query(0 with PHP4.0.6?
/dkm
- Original Message -
From: "Tyler Longren" <[EMAIL PROTECTED]>
To: "Dennis Moore" <[EMAIL PROTECTED]>; <[EMAIL PR
Not sure what you are trying to do, but try using
mysql_fetch_row ()
you can use SQL to limit your results.
/dkm
- Original Message -
From: "J. Roberts" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 4:08 PM
Subject: [PHP] Creating multidimensional array
I cannot seem to find in the documentation the what the function mysql() is aliaseed
to using PHP4.0.6. Any ideas?
Example:
$rez=mysql($dbname,$query);
Everything works fine... But I want to be sure what is actually being used.
/dkm
Has anyone run into the following?
I have set up a site using PHP4.0.6 sessions.
Everything runs fine with IE and Netscape on PC and UNIX. However, I
lose the session when using Netscape 4.75 on Mac.
Any ideas or clues?
Thx...
--
PHP General Mailing List (http://www.php.net/)
I am having problems using the fopen functions
within a while loop. I am having problems passing variables into the
function. Has anyone else had this problem?
Example:
$work_dir="$DOCUMENT_ROOT/click/oct01"; $ls_res=system("ls
$work_dir/*.html > $work_dir/ls.txt");
$ar_file_lis
Make sure you do not have an older version of gd on your system before
trying to compile gd a new version. This will save you hours of
frustration.
/dkm
- Original Message -
From: "Sebastian Wenleder" <[EMAIL PROTECTED]>
To: "Joseph Bannon" <[EMAIL PROTECTED]>; "PHP (E-mail)"
<[EMAIL P
I am not clear in what you want to do. I think the simplest solution is to
build a table in your favorite database with the tracking number and the
vendor. Make another table or switch statement that points to the URL for
the vendors tracking mechanism. Now you can just write a function that
lop in. Compiling extensions, however, is an entirely different
> > matter.
> >
> > I wish you luck, if/when you resolve the problem, please be sure to post
> > the solution, there are still several unanswered requests for assistance
> > in the Google/Dejanews archi
re quite a
> few reports of the problem, but no responses.
>
> If I learn anything, I'll be sure to let you know.
>
> Thanks
> Chris
>
> > -Original Message-
> > From: Dennis Moore [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 29, 2001 8
I am having a similar problem using gd-2.0.1 where the compilation complains
about "conflicting type gdIOCtx". I am getting a knot on my forehead from
the wall in front of me. Any ideas?
/dkm
- Original Message -
From: "Chris Mulcahy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent:
Another alternative is to send the email message via majordomo or some other
mail list management utility. The trick is how to manage the list
(subscribe and unsubscribe). You have to make the decision whether or not
you want to use the MLM or your PHP/database application as the primary
control
my_update("update sometable set col1=".$var1." where col2=".$var2);
and function:
function my_update($query){
global $host,$user,$psw,$name;
$conn=mssql_pconnect($host,user,psw) or die("Error: connection
failed!");
$rdb=mssql_select_db($name,$conn) or die("Error: DB does not exist"
I ran into this problem last week. I finally punted. My configuration
is: RH7, Apache 1.3.19, MySQL 3.23.36, mod_auth_mysql 2.20. The strange
thing is that I did not have any problems with RH6.0, Apache1.3.12, MySQL
3.22.x, and mod_auth_mysql 2.20.
If you run into a fix, please copy me as
I have a basic question regarding the printing quality using the PDF functions and
lib.
I need to place a high resolution image TIF or JPEG into a PDF file along with normal
text from a database. The desired output will be printed at 600dpi.
Are there issues associated in doing this with
I have searched long and hard to resolve this issue. I've tried many
variations for the header tag. However, I cannot seem to get it to work
with IE5.5.
I am trying to read an Acrobat created PDF file that I uploaded into my
MySQL database.
The problem occurs when I print the data via IE5.5.
83 matches
Mail list logo