RE: [PHP] Re: php mail() scaleability

2004-04-25 Thread Jason Sheets
Take a look at the Mail Queue class from PEAR, it enables you to put mail in the Queue instead of real time delivery. http://pear.php.net/packages.php?catpid=14&catname=Mail Jason -Original Message- From: Travis Low [mailto:[EMAIL PROTECTED] Sent: Sunday, April 25, 2004 2:43 PM To: [EM

RE: [PHP] Fetching XML for parsing

2004-04-25 Thread Jason Sheets
rb is correct, b should be used to ensure portability between operating systems with different line endings. Quoted from http://us2.php.net/fopen "For portability, it is strongly recommended that you always use the 'b' flag when opening files with fopen()" Jason -Original Message- From

RE: [PHP] phpedit

2004-04-22 Thread Jason Sheets
Took me about 30 minutes to install the development snapshot, the reason being that it downloads files from their website which is incredibly slow. Jason -Original Message- From: Andy B [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 10:51 PM To: [EMAIL PROTECTED] Subject: [PH

RE: [PHP] Tables in a pdf files

2004-04-13 Thread Jason Sheets
Also take a look at the fpdf class, it is a pdf generator written in PHP that is free for use. Implenting the PDF library in PHP results in slightly lower performance but greater portability because the client doesn't need third party libraries installed and free commercial use, pdflib requires yo

RE: [PHP] how do I make a script wait ?

2004-04-12 Thread Jason Sheets
Take a look at the set_time_limit function, it will allow you to set the maximum execution time to a greater value, note that when you call the function it sets the max time and resets the timer so if you set it to 100 seconds 20 seconds into the script the script will run for a maximum of 120 seco

RE: [PHP] Win2003 Slow

2004-04-12 Thread Jason Sheets
Also take a look at http://forum.rackshack.net/printthread.php?threadid=30312, it sounds like they had similar performance problems. Jason > > -Original Message- > From: Hotmail [mailto:[EMAIL PROTECTED] > Sent: Monday, April 12, 2004 8:27 PM > To: Jason Sheets >

RE: [PHP] Win2003 Slow

2004-04-12 Thread Jason Sheets
Did you install PHP as a module or as CGI? What web serve are you using? Jason -Original Message- From: Ataxia [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 10:48 AM To: [EMAIL PROTECTED] Subject: [PHP] Win2003 Slow Just installed PHP on a brand new W2k3 Server, and it works

RE: [PHP] cleaning up html output from php in apache

2004-04-10 Thread Jason Sheets
If you use Smarty you can use the {trim} m Otherwise you can also use output buffering to grab the output buffer and remove the sapces that you want. Note that you can't actually remove all whitespace as this sometimes has the side effect of breaking cetain scripts, etc. I'd rather implement g

RE: [PHP] page design and possible conflict??

2004-04-08 Thread Jason Sheets
Rather than doing something soley to comply with a standard you must sell your client on the idea or not do it, they are the ones that ultimately must live with the decision and be happy with it. As a programmer it is your job to make sure they have all the information and the pro's and cons of ea

RE: [PHP] smarty

2004-04-07 Thread Jason Sheets
Some excellent points, however Smarty makes it much easier to do certain tasks than doing it in strait PHP and Smarty is extendable with PHP both directly and indirectly, you can create Smarty modifiers and functions and if necessary write inline PHP code. Web development has an hourly cost eve

RE: [PHP] PDF Page Pulling

2004-04-07 Thread Jason Sheets
I'd suggest taking a look at ghostscript it, it is available under AFPL and GPL licenses and offers the ability to convert individual pages to jpeg or other file formats. http://www.ghostscript.com Jason -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Wednesday, Ap

RE: [PHP] smarty

2004-04-07 Thread Jason Sheets
I can see your point and have used this technique in very small applications where the benefit of Smarty or other template engines are negated by the performance/resource usage overhead. However intermixing markup and PHP has introduced many problems in too many PHP projects for me to use this tec

RE: [PHP] smarty

2004-04-07 Thread Jason Sheets
I use Smarty for most of my commericial and non commercial websites, it makes it very easy to share and re-use code because the appliciation logic is separate from the presentation logic. It also makes it possible to encode the scripts using Zend Encoder, Turck MMCache or similar projects which le

RE: [PHP] Efficieny: Include vs Array vs Function

2004-03-16 Thread Jason Sheets
> Rob Paxon >on Monday, March 15, 2004 9:24 PM said: > >> Bear with me while I dish out some details. My question concerns the >> efficiency of using multiple file includes versus storing segments of >> data in one include as arrays or functions. > > have you conside

RE: [PHP] How to mesure response time of php pages

2004-03-10 Thread Jason Sheets
You can also use something like Turck MMCache to accelerate the scripts. There is a class at http://pear.php.net for benchmarking PHP scripts and you can use a web client that times how long it takes to download a page. I would look at template caching and Turck MMCache to increase performance. j

RE: [PHP] gd for windows not working

2004-03-09 Thread Jason Sheets
] Sent: Wednesday, March 10, 2004 12:02 PM To: Jason Sheets Cc: [EMAIL PROTECTED] Subject: RE: [PHP] gd for windows not working I`ve tried to make my php configuration become error. But my phpinfo() always came right. I don`t know idea, how php read the php.ini. I`ve renamed all php.ini into another

RE: [PHP] time delay function?

2004-03-09 Thread Jason Sheets
Take a look at sleep() http://www.php.net/sleep It delays execution by a user specified number of seconds. Jason -Original Message- From: Scott Taylor [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 9:12 PM To: [EMAIL PROTECTED] Subject: [PHP] time delay function? I am wonde

RE: [PHP] gd for windows not working

2004-03-09 Thread Jason Sheets
Make a file named phpinfo.php in your webroot in it put Then visit it in your browser and see if GD is showing up in the output, if PHP hasn't picked up the module. Also make sure you are editing the right php.ini file, you can find out what php.ini file PHP is using by looking at the top of t

RE: [PHP] gd for windows not working

2004-03-09 Thread Jason Sheets
You shouldn't need to put the php_gd2.dll in your system dir, simply open your php.ini file (Usually c:\windows\php.ini or c:\winnt\php.ini) and change the extension_dir to point to your PHP 4 directory\extensions, Example: extension_dir = "c:\php4\extensions" Then uncomment the extension=php_gd2

Re: [PHP] PHP code encryption

2004-02-03 Thread Jason Sheets
I and another person am now maintaining Turck MMCache, another release will be made shortly but until then the current release should work fine. There is also a web based encoder for Turck MMCache at http://phpcoder.sourceforge.net The great thing about MMCache is it is open source and usually

Re: [PHP] what PHP really needs

2004-01-23 Thread Jason Sheets
Chris Boget wrote: I'm not really sure and am possibly wa off base but...cant something like this also be done by using "global" for variables? No, not really. That wouldn't be accessable by all users, which, as it turns out, is what the OP had asked for. Chris Like someone else ment

Re: [PHP] Debug code

2004-01-20 Thread Jason Sheets
You can write a sed or awk or perl script that will automatically remove your debug statements as long as they follow some form of convention. You could also write a form of preprocessor in this way that would also include files, perform substitutions, etc if you had the time. I have a sed scr

Re: [PHP] Thumbnails in database

2004-01-17 Thread Jason Sheets
The latest version of GD adds support for opening an image from a pointer to the C/C++ API but that support is not in PHP. It is recommended to create the thumbnail on file upload using the $_FILES array to get the temporary file name, if you need to create a thumbnail from a file only in the d

Re: [PHP] class design question

2004-01-12 Thread Jason Sheets
Take a look at the PEAR DB Abstraction layer, I usually store connection info in an XML or INI file and use parse_ini or PEAR Config to parse the configuration file. http://pear.php.net > hi there. > > i am working out the finishing touches on a authentication class that > uses mysql to store the

Re: [PHP] " " in a Variable

2003-12-02 Thread Jason Sheets
Try using htmlentities() to convert the characters to the html entities that can be stored and displayed. http://www.php.net/htmlentities Jason Dimitri Marshall wrote: Sorry, what I mean is... I have a field in a form where users input text. If the user inputs something like: Hi there, "thi

Re: [PHP] Working as a PHP/database developer..

2003-12-01 Thread Jason Sheets
Turck MMCache is a free optimizer/encoder. There is a free web based front end to the encoding part of it available at http://phpcoder.shadonet.com. You can find Turck MMCache at http://turck-mmcache.sourceforge.net It runs on Windows, Linux, BSD, and most other platforms and works with PHP 4

Re: [PHP] Slow searches in large database

2003-10-14 Thread Jason Sheets
Rather than searching every field for every search I usually provide a select drop down or checkbox that allows the user to indicate what information they are searching, then only hit those fields in the SQL query. MySQL is fast for simple queries but it doesn't scale well with larger database

Re: [PHP] Encryption question

2003-10-11 Thread Jason Sheets
I wouldn't use crypt, instead use one of the proven more secure hashes like md5 or sha1. For password hashing I'd use md5 (PHP 3 and 4) if you want broad support or sha1 for a little more security (sha1 hasn't been in PHP as long (only since 4.3.0) so you will lose some compatability, Ryan T

Re: [PHP] IRC & SOCKETS

2003-10-07 Thread Jason Sheets
If you do this on the server side with PHP you will need to reload or keep a connection open all the time to a web server process. Try using one of the many and free java IRC applets (http://www.freshmeat.net and search for java irc applet). Jason Paulo Nunes wrote: I am trying to implement

Re: [PHP] "Too many connections" fix?

2003-10-01 Thread Jason Sheets
Generally persistent connections will almost always be faster there are some considerations though, first resource usage if you are busy site and don't have enough memory to support one connection to the db for each apache process you will run into problems, second if you site is not busy enoug

Re: [PHP] apache logs reset at midnight

2003-09-27 Thread Jason Sheets
If you are running Linux/Unix check /etc/newsyslog.conf as well, this is a program run from cron that rotates the systems and other daemon log files. Jon Kriek wrote: Rob is aspsoletly correct; this has to be a rotation called from crontab. Jon Kriek http://phpfreaks.com "Robert Cumming

Re: [PHP] IIS Ports

2003-09-27 Thread Jason Sheets
Install ZoneAlarm, and configure your web server to listen to IP 127.0.0.1. If you aren't using ASP and you are using PHP you might consider installing Apache for Windows. If your brother is attempting to exploit you from your LAN set the LAN trust level in Zone Alarm lower so that it is the

Re: [PHP] is this possible?

2003-09-27 Thread Jason Sheets
It sounds to me like you are having them update their information on a central admin control panel for their site. There are a couple problems with your proposed method, first the .php file by default will get parsed by their server before it is sent to you so you will not be able to include it

Re: [PHP] [resource] memory size

2003-09-27 Thread Jason Sheets
Yes, http://www.php.net/manual/en/function.memory-get-usage.php Jason Decapode Azur wrote: Hi, is it possible to get, from a php script, the memory size it takes ? Is there documentations explaining how to manage resources in php ? thanks -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Urgent Help

2003-09-26 Thread Jason Sheets
Hello Ho, If you are using a printer that is postscript enabled (like HP LaserJet's) it is easy. Simply convert whatever you want to print to a postscript file (there are several utilities on freshmeat.net they do this) and then using PHP open a socket to the JetDirect card and send the data. HP's

Re: [PHP] best method to resize images

2003-09-26 Thread Jason Sheets
PEAR has a class for image manipluation, http://pear.php.net. Also there was an excellent class on phpclasses.org that allows you to easily crop, resize, shrink, etc, etc, I can't remember its name but I used it for a while. Dave [Hawk-Systems] wrote: have a situation where clients will be up

Re: [PHP] Accellerators and Encryptors: Taking Scripts to the Next Level

2003-09-24 Thread Jason Sheets
Search the archives for Turck and MMcache, yes they work, the degree differs depending on how much the database is used but you will see a performance increase. Turck is open source and very good, I wrote a web based encoder front end to it http://phpcoder.shadonet.com or you can use the inclu

Re: [PHP] How can I auto upload a file to the server?

2003-09-23 Thread Jason Sheets
You might look at SCP using the PuTTY SCP or another SSH client to securely upload the file. You could automate it in a batch file and make a short-cut to the batch file. Doing this over the web is not a good method like John said. If you use SCP you can setup an SSH key so that you are not

Re: [PHP] Full view of active sessions

2003-09-23 Thread Jason Sheets
I've used this technique quiet effectively in the past. I played around with some timeouts to try to prevent the second user from logging in but because of the nature of HTTP it is very hard to tell when someone has logged out when they don't click the logout button and you wind up preventing

Re: [PHP] $_SERVER['UNIQUE_ID'] question

2003-09-23 Thread Jason Sheets
Rather than using this number I'd suggest generating your own, use mt_rand or uniqid to generate a unique series of numbers and then use md5 or sha1 to convert them to a hash (I've generated 128 character session identifiers using a variety of these techniques). You may also convert it to hex

Re: [PHP] PHP Editor - which to use?

2003-09-22 Thread Jason Sheets
PHP eclipse is also nice, you need eclipse from http://www.eclipse.org and then you install the PHP Eclipse module http://phpeclipse.sourceforge.net. Very easy to install, I am a big fan of Komodo, I also like Vim, Kate and Eclipse. I tried Zend Studio 1 and 2 but it didn't live up to the exp

Re: [PHP] Whats wrong with my code?

2003-09-20 Thread Jason Sheets
Sounds like you might have an open { somewhere, PHP can't tell that you have a problem until it reaches the end of the file. Jason Burhan Khalid wrote: Stevie D Peele wrote: Can someone spot what Is wrong with my code? [ trim ] It says Line 195 which is the ?> Would it matter I don't have

Re: [PHP] precompile php scripts

2003-09-18 Thread Jason Sheets
Hello, take a look at http://www.turcksoft.com/en/e_mmc.htm. Basically there is a 2 to 10x performance increase generally. I wrote a web based front end to Turck MMCache to make encoding scripts easier, its available at http://phpcoder.shadonet.com If your scripts are database bound you wont

Re: [PHP] globals on globals off (help

2003-09-16 Thread Jason Sheets
You can enable them on a per directory bases with .htaccess, take a look at http://www.php.net/manual/en/configuration.php. I recommend using the .htaccess method rather than globally turning on register globals. Jason Frank Tudor wrote: This is more for a linux group post but I know someone

Re: [PHP] output to Excel

2003-09-16 Thread Jason Sheets
PEAR has an Excel Spreadsheet Writer class, view it at: http://pear.php.net/package/Spreadsheet_Excel_Writer Jason Payne wrote: Jackson Miller wrote: Is there a way to output PHP to MS Excel format? -Jac One you can do a dump with mysqladmin save the file as myfile.csv , excel can read cv

Re: [PHP] IP adress problem

2003-09-16 Thread Jason Sheets
Try using global $HTTP_SERVER_VARS at the top of your function or using the $_SERVER super global which is automatically global. Jason Webmaster wrote: Hi, why doesn't this work? ## IP FUNCTIONS ## function assignClientIP() { if (getenv('HTTP_X_FORWARDED_FOR') == '') { $this->aCustomer->setCl

Re: [PHP] How are variables called in current php?

2003-09-14 Thread Jason Sheets
Looks like that code depends on register globals being enabled which have been off for some time. You can either turn register globals on in php.ini (not recommended) or with an .htaccess file (better than using php.ini not as good as changing the code if that is possible). Information about a

Re: [PHP] Session stealing, ..

2003-09-12 Thread Jason Sheets
I wrote a custom session handler that encrypts the session before it is stored in /tmp that way even if someone has access to the session files they are useless. It stores the randomly generated encryption key on the user's client base64_encoded, which can be intercepted as well all know but it

Re: [PHP] Fatal error: Call to undefined function: mysql_connect()

2003-09-12 Thread Jason Sheets
Are you using the bundled MySQL libraries under Unix/Linux? What version of PHP are you running with what operating system? If MySQL compiled as a module that must be loaded? Jason Naintara Jain wrote: I get this error "Fatal error: Call to undefined function: mysql_connect() " in one scrip

Re: [PHP] Encrypt/Serialize Source Code for Sale

2003-09-09 Thread Jason Sheets
Take a look at Turck MMCache and Zend Encoder, both will require your user to install a free Loader. Turck MMCache is free, Zend Encoder is not, either will make your applications run faster. You should workout good licensing deals with your clients because with enough motivation and time they

Re: [PHP] Re: Mail() question

2003-09-09 Thread Jason Sheets
You can also use ini_set or .htaccess to increase the max execution time for the PHP script. I have some reports that used to take 5 or 6 minutes to run and this worked well, note though that IE has a timeout where it will close the connection if the page has not finished loading within n seco

Re: [PHP] Remove vars from memory?

2003-09-07 Thread Jason Sheets
I would recommend installing Turck MMCache as well and you will see immediate benefit for almost all PHP applications (assuming you are running mod_php not as cgi), you should get a 2 to 10x performance increase in many cases. MMCache is open source and is available free of charge at http://ww

Re: [PHP] Encrypt/Serialize Source Code for Sale

2003-09-07 Thread Jason Sheets
I wrote a web based front end to the free Turck MMCache PHP optimizer/encoder, a link is on the main Turck page near the bottom or you can go to http://phpcoder.shadonet.com. Turck was actually beating Zend in performance on the benchmark I ran as of a few releases ago. Jason Charles Kline wr

Re: [PHP] Question about Error Redirect (URL ShortCuts)

2003-09-04 Thread Jason Sheets
Hi ccj, GET data is passed in the URL, POST data is not so loss of the information would be expected. It sounds like you should use sessions, it is a better way of passing data between pages. Take a look at http://www.php.net/manual/en/ref.session.php Jason ccj wrote: Hi all Based on descr

Re: [PHP] suggestion: recursive calls

2003-09-04 Thread Jason Sheets
I wouldn't want to see a limit placed on recursion depth, IMHO it is the responsibility of the programmer to limit recursion not the language itself otherwise the language is limiting the programmer. Another possiblity is hitting the execution time limit, sounds like you are using IE with fri

Re: [PHP] Gripe

2003-09-03 Thread Jason Sheets
This isn't really a problem with PHP, you will encounter it with many other languages how is the parser supposed to know you haven't closed a brace until it reaches the end of the file? It doesn't match using indentation like humans do. Indenting code and code syntax highlighting make it very

Re: [PHP] register_globals

2003-09-03 Thread Jason Sheets
Rather than turning on register globals system wide I'd use .htaccess to enable register globals for the specific sites or applications that require them. Because the super globals have been introduced the problem with register globals and application security may be more prounounced for appli

Re: [PHP] Restart Apache with PHP???

2003-09-03 Thread Jason Sheets
More safely maybe, but even that solution could be exploited somewhat easily. The script that writes the file would be better off as a CGI than executed through the Apache module, this would allow you to restrict write access to the directory where the file that triggers the restart is stored

Re: [PHP] password systems

2003-09-03 Thread Jason Sheets
Take a look at pwgen, it is a command line utility that makes it easy to generate random passwords with a user specified length, it can generate random words that are easier to remember or truly random secure passwords with non alpha numeric characters in it. It is available in the FreeBSD por

Re: [PHP] In need of a script

2003-08-25 Thread Jason Sheets
One thing to be aware of, Location: /newpage.php will probably work with most browsers (I know it works with IE, Mozilla and Opera) but the spec requires an absolute path to the file you are redirecting to including protocol, server, path and file. As Wouter demonstrated you should always die

Re: [PHP] user-defined superglobals?

2003-08-23 Thread Jason Sheets
Someone wrote a php module that did this around 6 to 9 months ago. It was easy to install but you needed access to php.ini. Try using extract with the option to use references so you don't create a copy of the variable just a pointer to it. Jason Matthias Nothhaft wrote: Sorry this all is no

Re: [PHP] Re: naughty words / filter

2003-08-22 Thread Jason Sheets
Try using str_ireplace, it is str_replace but is case insensitive. str_replace and str_ireplace both can take arrays as parameters for the needle, replacement value. The string functions tend to be much faster than regular expressions, in any case you don't need the foreach.. Jason Chris Kra

Re: [PHP] HELP! I'm Desperate...

2003-08-19 Thread Jason Sheets
Why not go to a cybercafe every few days or once a week and check on the project? You can also go to Kinkos or your local library, most of them have internet enabled pcs. Jason Michael A Smith wrote: Hi, I'm going off to school and won't have computer access for like 9 months... :-\ .. and

Re: [PHP] How to open a save-as dialog and then redirect after donwload?

2003-08-19 Thread Jason Sheets
Use PHP's file functions to read the file and output it to the browser, sending the attachment header so it opens the save as dialog. After you finish outputing the file unlink() the file. Another way to do this is to store the files outside your www root, then authorize the user to access the

Re: [PHP] mod_php issues with security or stablility?

2003-08-17 Thread Jason Sheets
mod_php is the recommended installation for Apache. Thousands of people use mod_php with Apache. When I switched to mod_php from CGI I saw a significant performance increase, also you can not use things like Turck MMCache in CGI mode. In short not that I'm aware of, you might google for it

Re: [PHP] Sessions

2003-08-16 Thread Jason Sheets
Just a note, in most cases where you have your own private /tmp it is not the same /tmp PHP uses. You are in a chrooted or jailed environment with a virtual /tmp where usually Apache runs outside this restricted environment , the biggest reason being running a seperate set of Apache processes

Re: [PHP] Turck MMCache Feedback, Please

2003-08-15 Thread Jason Sheets
Hello Andrei, I've been using Turck MMCache for over 6 months now. I use it on several severs including FreeBSD (2), Windows (1) and Linux (3). I've been very happy with Turck MMCache and as of the last few releases it is actually faster than Zend's product though not by very much (granted c

Re: [PHP] Re: Frequent Mode Switching

2003-08-10 Thread Jason Sheets
Kevin Stone wrote: I used to program that way. The logic and presentation portions of my scripts were combined into one or two monolithic files. That worked well for small projects. But as I got involved in larger projects and had to juggle many code files at once I found that I prefered to s

Re: [PHP] Re: CURL

2003-08-04 Thread Jason Sheets
In most cases you can make Curl submit the login form itself, in which case Curl would become logged in. You can use Curl to get both GET and POST requests, the comments in the PHP manual are pretty decent. Jason John Ryan wrote: i was more asking for the actual curl commands to do so, i suppo

Re: [PHP] Functions in Safe Mode?

2003-08-04 Thread Jason Sheets
The problem is the owner of the script must be the owner of the file that you are accessing. If you fix your file ownership for your news directory or change your php script to be the same owner as the news directoryo you will be able to access the files. Look at the chown command,. you will n

Re: [PHP] grabbing variable from bottom to top

2003-08-03 Thread Jason Sheets
You can't get the intended value from a variable that hasn't been defined yet, obviously because you haven't given the variable a value. If you are trying to make something like a counter you may consider one of the following: 1. Insert the value into a database like MySQL or PostgreSQL, 2. Wr

Re: [PHP] mysql_real_escape_string

2003-08-03 Thread Jason Sheets
dbc looks like a MySQL Connection Resource, a connection returned from mysql_connect. It looks like this function is using the mysql escape function to make sure the data is properly escaped for that particular database. If you use a function other than mysql_real_escape_string you can remove

Re: [PHP] logging of mail() function?

2003-08-03 Thread Jason Sheets
This is something you would probably do with your e-mail server, not with PHP. You can log all of the emails sent by your scripts by writing a wrapper around mail though. Basically check your SMTP daemon's documentation whether it be sendmail, qmail or something else and look for auditing or

Re: [PHP] Forking PHP Processes on Unix (PHP4)

2003-08-03 Thread Jason Sheets
PHP can fork on Unix, just not from a web environment. So you need to execute the command from the command line or maybe an exec. Take a look at: http://www.php.net/manual/en/ref.pcntl.php Jason Damien G wrote: Hi Readers, Heres what i'm trying to achieve: A script, that uses multiple fsock

Re: [PHP] downloading a file using headers

2003-07-30 Thread Jason Sheets
You could use an iframe or you could turn on output buffering, when output buffering is enabled you can send headers after normal output has been sent. Just do ob_start(); at the top of your script. Not the most elegant way of doing it but it would work and not require you to use an iframe.

Re: [PHP] ip's behind proxy-server

2003-07-05 Thread Jason Sheets
By design many proxies are designed to allow the client to be anonymous as well as proxy the connection, so they will not ever reveal the clients IP address. Not only that but on some ISPS (AOL) the users proxy may change with each request, making tracking the user by the IP not practical or

Re: [PHP] Calculating if number is multiple of another number

2003-07-02 Thread Jason Sheets
Using the modulus operator it returns the remainder of a division operator. For example to find out if a number is divisible by 3 do this: if (($number % 3) == 0) { print $number . ' is divisible by 3'; } else { print $number . ' is not divisible by 3'; } If the remainder of dividing the ta

Re: [PHP] safe_mode and file/directory ownership

2003-07-01 Thread Jason Sheets
Take a look at safe_mode_gid, it tells PHP to do safe mode owner checking using the group id rather than user id. safe_mode_gid boolean By default, Safe Mode does a UID compare check when opening files. If you want to relax this to a GID compare, then turn on safe_mode_gid. Whether to use UID

Re: [PHP] php and gd

2003-07-01 Thread Jason Sheets
PHP 4.3.2 has GD bundled with it, if you compile it from source do --with-gd to use the bundled library. It sounds like you need to install GD2, you can find it on freshmeat.net or probably find an RPM for your distro somewhere. If you have libjpeg and libpng I've had no problems using the bun

Re: [PHP] 2values on form, help in catching as one.

2003-07-01 Thread Jason Sheets
You could do it a couple different ways, if you just want to combine the values the easiest way is: $v_template = $_REQUEST['TemplateOne'] . $_REQUEST['TemplateTwo']; If you want a space between the two values expand on this idea using: $v_template = $_REQUEST['TemplateOne'] . ' ' . $_REQUEST['

Re: [PHP] Close Connection to Browser

2003-06-29 Thread Jason Sheets
Take a look at register_shutdown_function, it sounds like it might do what you want just be aware that you obviously can't display output once the connection is closed because no one is listening . void register_shutdown_function ( callback function) Registers the function named by function to

Re: [PHP] PHPSESSID Length?

2003-06-29 Thread Jason Sheets
Hi Henrik, Take a look at session_id, you can use it to get or set the session id. Using some of my random generation functions I juse 72 to 96 character session ids for my more secure PHP applications. Remember if you want it to remain secure you need to pass it through SSL, longer keys do no

Re: [PHP] any package for lost and found

2003-04-06 Thread Jason Sheets
Take a look at the "Classifieds" section on www.hotscripts.com/PHP Jason SayOrange.com wrote: I am working on a project that shall have a section for 'Lost and Found' people lists with photographs. Does anyone knows of any package or code that could be reused here. Thanks in advance. -- PHP

Re: [PHP] chill out

2003-04-04 Thread Jason Sheets
You aren't required to be subscribed to post to the list, so if you are not subscribed you will not see the FAQ or the discussion about how to post properly. You could make it be sent in the confirmation email when someone first posts to the email address but then you are making the mail bigge

Re: [PHP] $_SERVER[REMOTE_ADDR]

2003-04-02 Thread Jason Sheets
It isn't always possible to get the visitor's real IP address, if the user's traffic is proxied the REMOTE_ADDR will be the proxy IP address, some proxies set the forwarded for header but for security and privacy some do not. If you are not being directed through a proxy REMOTE_ADDR does show t

Re: [PHP] Detect Current Page

2003-04-01 Thread Jason Sheets
If you are intending to do this with PHP $_SERVER['PHP_SELF'] is a variable containing the file name of the script being accessed. Jason shaun wrote: Hi, I would like to display certain items on certain pages. Is it possible to detect the page i am going to and if so display an item. I could a

Re: [PHP] Is there a PHP for Dummies?

2003-03-29 Thread Jason Sheets
There is a second edition of MySQL and PHP, the first edition was a very good book but was written before the super globals were introduced. I would recommend going on Amazon and bn.com and reading the reviews. There is a lot you can learn from the PHP Manual but if you are truly a beginner yo

Re: [PHP] need a reliable PHP host

2003-03-27 Thread Jason Sheets
I recommend pair (http://www.pair.net) they have excellent staff, excellent accounts, an excellent backbone and they have been profitable since their second month in business they will let you host more than one domain on your account (with a setup fee). They also host a lot of open source mir

Re: [PHP] Re: redirecting a domain

2003-03-27 Thread Jason Sheets
Rather than redirecting to a seperate HTML file you can also use the PHP Header command, something like: http://www.domain.net'); exit; } ?> Dan wrote: On Fri, 14 Jul 2000 22:26:05 -0400, [EMAIL PROTECTED] (Unknown Sender) wrote: I have an apache question and I have NO idea where to

Re: [PHP] SHA-1 + RSA + base64

2003-03-27 Thread Jason Sheets
I'm not sure why you would want to encrypt a hash of a string, a hash (sha1) is already non reversible and you also do not need to base64_encode a sha1 hash (try ).. If you want to do RSA public key encryption you will need to use an external application such as gpg or pgp. Also please note if

Re: [PHP] require_once for php3

2003-03-23 Thread Jason Sheets
You could write a wrapper around the include function that uses a global array, each time it is called it checks the global array to see if the file has been included, if it hasn't it includes the file and adds the file to the array. Jason daniel wrote: hi there is a way to include files once i

Re: [PHP] mail function

2003-03-23 Thread Jason Sheets
Hello John, Please make a copy of the file with a .phps or .txt extension so the code is not parsed by PHP. Thanks, Jason John Love wrote: The use of the standard mail(...) function is just not working and I would really appreciate some patient soul's time to access: http://www.up.net/~

Re: [PHP] Temporary Files

2003-03-23 Thread Jason Sheets
Rather than writing the code to a temporary file and then including the file why not just use eval() on the code fetched from the database (http://www.php.net/eval)? Otherwise you could use generate a unique filename yourself rather than using tmpfile. $filename = md5(uniqid()); Of course you

Re: [PHP] SSL

2003-03-22 Thread Jason Sheets
Hello Rodney, You can use Curl to send post requests, take a look at http://www.php.net/curl If you have compiled PHP --with-openssl you can also access https locations with functions such as file_get_contents. If Curl is not an option and you have PHP compiled with streams and --with-openssl

Re: [PHP] Password Authentication

2003-03-22 Thread Jason Sheets
You can use a static salt from within your application though. Jason Justin French wrote: on 23/03/03 2:02 AM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: On 23 Mar 2003 Justin French wrote: I just md5() the passwords, and reset them if needed... rather than retrieving. The advantage for me

Re: [PHP] Date Diff

2003-03-22 Thread Jason Sheets
Hello Adam, Since timestamps are in seconds you just subtract them and then use date to convert it to a more human readable format. You could also use the strtotime function to convert a string to a timestamp. PHP has many date and time functions, take a look at http://www.php.net/manual/en/

Re: [PHP] sha1 hash in old php?

2003-03-22 Thread Jason Sheets
Chris Monson has written a pure PHP implemntation of SHA. It is available on PHP Classes at http://phpclasses.promoxy.com/browse.html/package/65.html. Jason Bill Kearney wrote: Anyone got a php script for generating sha1sum hashes from a short bit of text? Hi Bill, The target platform does

RE: [PHP] web services

2003-03-21 Thread Jason Sheets
technical > > > one. If you're worried about the theft of your code (and, to be > > > honest, most code is worthless anyway), tackle it with a > > contract, not > > > a hack. > > > > Too many people use contracts like toilet paper... just my &

Re: [PHP] Which is quicker, if-else statements

2003-03-18 Thread Jason Sheets
y there's the time needed to parse the input stream > >(tokenize, add to symbol table, execute token and expression parser, etc > >etc). With interpreting languages the differences will rocket skyhigh > >compared to compiled executables. > > Doesn't PHP precompi

Re: [PHP] Does PHP run better under any specific unix os?

2003-03-18 Thread Jason Sheets
under most operating systems, get bad hardware and it doesn't matter anyway. Jason On Tue, 2003-03-18 at 17:55, Charles Kline wrote: > Just wondering. I am trying to decide whether to build a FreeBSD server > or other... open to suggestions > > Thanks, > Charles -- Jason Sheet

  1   2   3   >