[PHP] Very Odd Session Array Problem

2004-12-18 Thread Aaron Axelsen
We have the chunk of code at the bottom of the page. It is behaving very strangly under php 4.3.9. Basically, if it is not coded exactly as listed below, it will not work right. The development server is running 5.0.3, and it works fine. However, the live server has 4.3.9. Is there somethi

Re: [PHP] sanitizing/security

2004-12-18 Thread John Holmes
> From: "Sebastian" <[EMAIL PROTECTED]> > just a question, what is the best way to sanitize your scripts when you're > using $_GET or $_REQUEST in a query? > > eg, i usually just do: > > if(is_numeric($_REQUEST['id'])) > { > mysql_query("SELECT id FROM table WHERE > id=".intval($_REQUEST['id

[PHP] Re: sanitizing/security

2004-12-18 Thread Jed Smith
mysql_escape_string() is what you're looking for. Jed Sebastian wrote: just a question, what is the best way to sanitize your scripts when you're using $_GET or $_REQUEST in a query? eg, i usually just do: if(is_numeric($_REQUEST['id'])) { mysql_query("SELECT id FROM table WHERE id=".intval($_R

Re: [PHP] sanitizing/security

2004-12-18 Thread Robert Cummings
On Sat, 2004-12-18 at 22:50, Sebastian wrote: > just a question, what is the best way to sanitize your scripts when you're > using $_GET or $_REQUEST in a query? > > eg, i usually just do: > > if(is_numeric($_REQUEST['id'])) > { > mysql_query("SELECT id FROM table WHERE > id=".intval($_REQUES

[PHP] sanitizing/security

2004-12-18 Thread Sebastian
just a question, what is the best way to sanitize your scripts when you're using $_GET or $_REQUEST in a query? eg, i usually just do: if(is_numeric($_REQUEST['id'])) { mysql_query("SELECT id FROM table WHERE id=".intval($_REQUEST['id']).""); } what about when the GET is text? just use htmls

[PHP] Re: Storing binary data within a php script.

2004-12-18 Thread Jed Smith
This is done in a few examples using base64_encode() and base64_decode(). A particular OpenGL example I can recall encoded a small (~20k) DLL directly into the PHP source that relied upon it, then unpacked it at runtime. Ah, there it is: ** snip ** if ( is_file( "SimpleWndProc.dll" ) ? file

[PHP] Re: PHP 5 MySql 4.1 issue - can't connect to mysql.sock

2004-12-18 Thread Jed Smith
Try mysqli_connect("127.0.0.1", "user", "pass"); Then MySQLI will try to use TCP/IP as opposed to a local socket. Jed Barley wrote: I am familiar with MySql, Linux and database programming in general, but I have not used PHP very much. On my server, I had an application running just fine under PHP

Re: [PHP] Re: 4.3.10 breaking things? Back working after reverting to 4.3.9

2004-12-18 Thread Ben
Michael Sims wrote: Ben wrote: Reverting back to 4.3.9 with the same build configuration options used in 4.3.10 has fixed the problems with the various scripts. Do you use Zend Optimizer? No, but thanks for the suggestion! Turning off php accelerator in my php.ini seems to have solved the proble

[PHP] Recursive Directory Iterator

2004-12-18 Thread Gerard Samuel
This is my first time trying out the SPL iterators. Im trying to figure out how to recursively move over a directory. With the code that I've provided 1. Is this the correct way to use it? Im using recursive functions to go deep. I thought, that the class would do that for me somehow... 2. A

[PHP] Prado

2004-12-18 Thread Wiberg
Hi there! Anyone used PRADO? What's YOUR opinion? *curious* http://www.xisc.com/ /G @varupiraten.se --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.818 / Virus Database: 556 - Release Date: 2004-12-17 -- PHP General Mailing Li

[PHP] PHP 5 MySql 4.1 issue - can't connect to mysql.sock

2004-12-18 Thread Barley
I am familiar with MySql, Linux and database programming in general, but I have not used PHP very much. On my server, I had an application running just fine under PHP 4.1 and MySql 3.23. For various reasons, I needed to move to MySql 4.1. When I did so, the PHP application was broken. I poked arou

[PHP] Re: PHP + MSSQL Problem

2004-12-18 Thread Ben
Alaor Barroso wrote: It looks like PHP can't communicate with MSSQL but it connect! Strange... What server platform are you using? If you are on *nix you will need to install freetds and then build php with freetds support before you can use mssql with it. Under a windows server platform this m

[PHP] Storing binary data within a php script.

2004-12-18 Thread Jamie
Hi all, Well so far my attempts to make this work have failed so i thought i would try here. What i have is an installation script that has to write a few files to the webserver. Im trying to cut down on the amount of files that need to be uploaded/modified etc. So what im trying to do is inclu

[PHP] Strip of code - what could be wrong?

2004-12-18 Thread Wiberg
Hi there! I'm trying to figure out some code I haven't done myself, but I don't get what could be wrong. Check this code out: the coder says he when he import files, he gets a result that the line ends at wrong positions... Is it 4096 that is wrong? /G @varupiraten.se $file = $rad[url_productl

[PHP] File Upload Problem

2004-12-18 Thread Wayne Donaho
I am trying to run a file upload using PHP as a CGI script and am running into an odd error. The error I am getting is the dreaded Server Error -- Error 500 Premature end of script headers: php.cgi Here is the diagnosis I have done. 1. The php.cgi executable deals with scripts correctly when us

[PHP] mixed strings

2004-12-18 Thread Ian Firla
Hi All, I'm wondering if anyone knows if there's a way of sending strings of mixed type to a UDP socket. I'm storing the data I need to send in an array. Parsing the array with a foreach, I'm sending out the various pieces to the socket with fwrite. Unfortunately, it seems that UDP terminates e

Re: [PHP] Fax Gateway

2004-12-18 Thread Robby Russell
On Sat, 2004-12-18 at 13:00 +0100, Neo Theone wrote: > I have to setup a HTML-Form to Fax Gateway and I am looking for some way > to do this in PHP. Generally have the Fax-Modem and nothing more right now. > Does anybody have any experiancs with this? > > Thanks for any help > I did something s

Re: [PHP] PHP problem

2004-12-18 Thread GD-Aqua
First off i`m using windows 2000 advance server with PHP 4.3 i believe it is.I can reboot my server and it will go away for awhile. http://syp-triple-h.com/webpost http://automotionsclub.com/guestbook that is some links that will show the access violation and it is at the end of the script. Tha

[PHP] PHP + MSSQL Problem

2004-12-18 Thread Alaor Barroso
Hello guyz, sorry my bad english, im brazilian and i'll try to write in english... I use actually PHP 5.02 with MySQL in my site, but now i have to access an external server that use MS SQL Server running at windows 2000 server edition, firtly i tried to connect and it fails, because i don't have

Re: [PHP] Fax Gateway

2004-12-18 Thread Jason Wong
On Saturday 18 December 2004 20:00, Neo Theone wrote: > I have to setup a HTML-Form to Fax Gateway and I am looking for some way > to do this in PHP. Generally have the Fax-Modem and nothing more right now. > Does anybody have any experiancs with this? hylafax -- Jason Wong -> Gremlins Associate

[PHP] Fax Gateway

2004-12-18 Thread Neo Theone
I have to setup a HTML-Form to Fax Gateway and I am looking for some way to do this in PHP. Generally have the Fax-Modem and nothing more right now. Does anybody have any experiancs with this? Thanks for any help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.

答复: [PHP] header information problem

2004-12-18 Thread yangshiqi
And if you have some special intent, you can use ob_start(). Best regards, Yang Shiqi -邮件原件- 发件人: yangshiqi [mailto:[EMAIL PROTECTED] 发送时间: 2004年12月18日 19:36 收件人: 'Ahmed Abdel-Aliem'; '[EMAIL PROTECTED]' 主题: 答复: [PHP] header information problem I don't understand why you want to

答复: [PHP] header information problem

2004-12-18 Thread yangshiqi
I don't understand why you want to include header.html before you redirect the users to the login_success.php? By the way, you 'd better to add mysql_escape_string() with the username and password to ensure the security of your code. Coz we can't believe any users' input from web. May be the sql i

Re: [PHP] header information problem

2004-12-18 Thread Gareth Williams
In the else part, you have the possibility to echo to the screen and later on, then header("Location: ..."); This is the bit which isn't allowed. If you are doing header("Location: ...");, you are not allowed to echo before it. On 18 Dec 2004, at 11:52, Ahmed Abdel-Aliem wrote: Dear Groups memb

[PHP] header information problem

2004-12-18 Thread Ahmed Abdel-Aliem
Dear Groups members. i am making a user protected page, the script works excellent on my local server, but online it gives me this error : Warning: Cannot modify header information - headers already sent by (output started at /home/me2resh/public_html/apex/upload/header.html:10) in /home/me2resh/

答复: [PHP] IDE recommendation-- (Free?)

2004-12-18 Thread yangshiqi
Or may be you can use vim + ctags + cscope. I use these for months and I think these are best tools for develop on unix/linux. Very powerfull. Best regards, Yang Shiqi -邮件原件- 发件人: Jeffery Fernandez [mailto:[EMAIL PROTECTED] 发送时间: 2004年12月17日 21:45 收件人: [EMAIL PROTECTED] 主题: Re: [PHP] ID

[PHP] Re: Client does not support authentication protocol requested by server; consider upgrading MySQL client

2004-12-18 Thread Nic Begusarai
"Nic Begusarai" <[EMAIL PROTECTED]> wrote in message news:... > > I just install MySql and trying to connect on localhost using PHP > > Error: Client does not support authentication protocol requested by server; > consider upgrading MySQL client > how to correct this problem > > rana > > > > > > >